Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reductions in programming

Tags:

c#

.net

vb.net

ide

Sometimes to make a variable/method/class name descriptive I need to make it longer. But I don't want to, I'd like to have short names that are easy to read. So I thought of a special addin to IDE like Visual Studio to be able to write short names for class, method, field but be able to attach long names. If you need to - you can make it all long or you can make single name long. If you want to reduce it - use reduction, like two views of the same code. I`d like to know what others thinking about it? Do you think it is usefull? Would anybody use the kind of addin?

like image 533
Yaroslav Yakovlev Avatar asked Aug 07 '09 09:08

Yaroslav Yakovlev


People also ask

What is reduction in data structure?

We can define reduction more formally as a three-step process: Transform an arbitrary instance of the first problem to an instance of the second problem. In other words, there must be a transformation from any instance I of the first problem to an instance I' of the second problem.

What are reduction operations?

A computation that transforms an array into a scalar is called a reduction operation. Typical reduction operations are the sum or product of the elements of a vector. Reduction operations violate the criterion that calculations within a loop not change a scalar variable in a cumulative way across iterations.

What is reduction and reduction algorithm?

A reduction is any algorithm that converts a large data set into a smaller data set using an operator on each element. A simple reduction example is to compute the sum of the elements in an array.

What does it mean to reduce a problem?

A reduction is a way of converting one problem into another problem such that a solution to the second problem can be used to solve the first problem. We say the first problem reduces to the second problem.


1 Answers

Why not just use the standard XML commenting system built into Visual Studio. If you type /// above the Class/Method/variable etc, it creates the comment stub. These comments popup through Intelisense/Code Completion with extra info.

This way you keep your naming conventions short and descriptive whilst commenting your code. You can run a process to then create documentation for your code using these comments.

See: http://msdn.microsoft.com/en-us/magazine/cc302121.aspx

like image 145
Mark Redman Avatar answered Sep 24 '22 08:09

Mark Redman