Thursday, December 20, 2007

Reposition them to new positions they've never had ...

I was talking to a friend of mine who works in the financial sector in Wall Street, they do financial analysis and forecasting, so I asked him whether they use any software tools for their tasks and he said no since if there is a software, then that means there is something that everyone can do. In their case they wrote specific code themselves for their needs.

This is really important and true. It reminds me of the discussion that exists usually in the profession community regarding the use of a language like VB or C. VB programmers have some features ready to be used which makes life sometimes easier, but on the other hand, this means everybody can use those features. With C, you have to do a lot yourself, but maybe you can do something that others haven't done yet. Business applications can be created using .net language, easily but at the same time this is what lots of companies are doing and you can't be the cutting edge really on this platform, however with C, you can come up with some features that haven't been thought of and that gives you the cutting edge. Does Google use any of the popular web development platforms for its core engine technology? I am almost certain the answer is no.

Se lets try to generalize now. With any tool, you can perform some tasks, but so can anyone else. By knowing a process, you can do something, which others might not be able to, because they have to follow the process exactly like you did, which is not always easy and possible. An example, you buy microwave pizza (an entity) and put it in the microwave and serve it to your friends. The next week you are the guest and your friend serves microwave pizza. How different are the tastes going to be? In a parallel world, you Make a pizza yourself (a process) and eat your friend's microwave pizza, I bet you that you'll be their host forever. (or maybe the reverse !)

Now one more level back, what does it mean to know a process? Well if we know C instead of VB, do we know a process? What about Assembly?
Here goes a definition: "A process is how we arrange some entities in time"
When I can sort 10 numbers (sorting process), I know how to arrange them in time so that at the end they will end up sorted. I am not going to create a new entity. Entities are not created in the world, they all exist, its just how we arrange them in time that makes new things, or at least we think that we are making new things. A new chemical substance is just a re-arrangement of the molecules of other chemical substances. How different is a blank CD compared to a CD which contains a sophisticated scientific software? Anything but re-arrangement of bits on the CD?

Now the second question is : "What can be re-arranged?"

If we are going to create things, we know that we have to re-arrange things. What is the basic element of re-arrangement that we have? Well when you create objects using Lego blocks , your basic elements are the Lego blocks. You things that you can create are confined to the possibilities for arranging these lego blocks. If you you only two simple ones, you can create two artifacts, one when the red is over the yellow and the other one, yellow is over red. This is by far how creative you can be and if you are among 100 other people, that is what almost everyone can do. (Conclusive point : don't try to find out the most talented person by giving them only two lego blocks!)
Even if you have many lego blocks, then you are still confined. (This is why I hated Legos growing up since you couldn't create really cool cars or planes with them.)
You can draw with thin brushes or with thick brushes, on a fixed size paper, can you be more creative with thin brushes or thick ones?
The less granular our tool is, the more possibilities for re-arrangement, and the more possibilities for creativity and less similarity between different people.

C is less granular than VB, Assembly is less granular than C, so it is obvious how each one of these tools can provide the possibilities for new creations.

Conclusion, if you want to be able to do noble things, if you want to be surfing in the forefront waves and be an absolute avantgarde , then you have to rely on good processes, meaning you have to be able to do things in time that others can't follow, meaning you have to select the basic elements as small as possible compared to the context that you are working in so that there is lots of possibilities for re-arrangement and you using your knowledge and skills, can come up with wonderful new solutions.

"So should you use VB or C for your next project if you want to be avantgarde?"
The important thing is the context which you are going to work on. If your goal is an artifact which is made of elements and these elements can be UI elements and some simple Objects, then VB (having ready many basic elements) is going to be the lego blocks that you will use to create that, however if the monster that you want to create is made out of elements that are maybe specific arrangements of data in memory or specific configurations in instruction calls for high efficiency, then your legos should be called C. But of course the possibilities for novel ideas with the less granular tools are more so you won't lose anything by selecting C.

Last word, I am not implying that everybody needs to be on the cutting edge, some have to be, others are just experts that are great in a field, not necessarily unique. There is a nice article here about the differences between an Expert and a Genius.

6 comments:

Anonymous said...

On the whole, you're toughing on a very important and very correct point.
However, I think there's another important factor in any process, and that's time. It's obviously going to take more time making something using smaller building blocks, or "less granular" tools.
If we always had infinite time, it would be best to use assembly for every program, or use machine language (it's not always a one-to-one and onto relationship between these two!) or design a new machine from scratch, or invent a new kind of mathematical computation theory or a new kind of algebra altogether. (I don't see any less grannular tool than the mathematical roots of computation to choose.)
Anyway, since we have limited time, we need to make some kind of a trade off. Of course, people usually make it too soon, and go for worst tools when they won't run into any time-related problems with the better tools (considering the time for extension, expansion, adding new fetures, performance optimization, integration, etc.)
For yet another, rather different point of view about programming languages and their power, take a look at these two of Paul Graham's essays. There's more if you want on his site. But be ware that he is a Lisp advocate and won't mix with us C types!

MNO said...

The assertion about the need to apply different tools(in this case programming languages) to different context is highly true. However as computer people as we are we all know that there are a bunch of programming languages out there and each of them has sought an almost unique goal which is the reason for their existence. One of them has class abstraction the other is better in functional abstraction another one might be better in syntactic abstraction.

Now this feeling comes over me that we need to be familiar with a dozen of programming languages so that we can have a better insight while trying to solve a problem otherwise how can we find out the best tool to apply to a specific context? here is an analogy, if you have only one tool in your home then you will always try to fix everything with that single tool. Similarly if you have familiarity with one programming language then it is likely that you look at all the problems from one single perspective and finally applying the same tool to all the context all the time.

Is this really the case? Do we really need to know many languages?
I personally like to be familiar with many of them since I think each of them adds one dimension to the way I look at the world, however I don't have an strong logical reason for having such a feeling it is only a matter of personal preference.

What do you guys think?

yzt said...

(On the first line of my first comment, I meant "touChing", not "toughing"! Mea culpa!)

@mno:
I, too, believe that every serious programmer needs to know at least half a dozen different languages pretty well. And the more diverse these languages the better.
One of the reasons is what you said. If you have only a hammer, everything in the world starts to look like a nail. If you know only a single programming language, you'll always try to apply its mindset to every problem (unless you are a genius and can really think outside the box. If you are so, you shouldn't bother learning any existing language. Just go and design your own! Maybe it'll be another Lisp.)

There's another similar, but more practical reason. A language, aside from a mindset, bring with itself a set of tools (the standard library, third party libraries and applications, etc.) Some languages and tools are just better suited for some jobs, not because of their design, but because of the existing code. You can write a CGI program in C++ as well as in PERL, but writing it in PERL is just easier. One of the largest programs I've written is a server-side application using the Common Gateway Interface. I started it in C++, because I didn't know any more suitable languages at the time well enough. Even though the project turned out fine, with no major problems and it's very efficient, I now realize that I could have written the same program in a third of the time and probably much less code had I used Python. It's not because Python has all these nifty language features that help (it does!) but because all the required tools are already there. I had to write my own cryptography, AJAX handling, template engine, database connectivity, HTTP parsing, data and time handling, etc. because there's no library for these in C++ with correct balance of features and complexity (either too complex or too under-featured.)

One more reason that occures to me but is not mentioned as much as the above is that a programmer needs to be able to read other's code. For learning and other reasons. I mean, a writer, a painter, a journalist, a poet, a musician is always encouraged to read/look at/listen to the works of others. But not programmers. When was the last time we programmers downloaded a non-trivial body of code, and started reading through it, not to find a specific piece of code that does a specific thing, but to understand it as a whole and learn from it and become familiar with its intricacies? I believe that reading is an important part of learning, and to be able to read code, one needs to know the language it's written in. Not all the good code in the world is written in C/C++ (although most of it is! And I can say with confidence that almost none of it is in VB!) Reading other's code has other uses, like at the time of debugging a program or extending it, but I won't go into it since you already know that.

Tournesol said...

Sounds like you just had your first microwaved pizza to me ! :) ;)

Amir H. Fassihi said...

yzt, yes time is exactly a constraint that we are facing. You would've implemented your server code a lot faster in Python but there are chances now for your code to have some features that no python coder has been able to put in their server. Well, the trade off you mentioned, like everything else in the world. Your argument about reading other code is very nice, at least I see this being done a lot with in the art domain by the artists around me :).
This is what Bill Gates had said:"The best way to prepare [to be a programmer] is to write programs, and to study great programs that other people have written. In my case, I went to the garbage cans at the Computer Science Center and fished out listings of their operating system."


mno, other than what yzt said about different programs, knowing different languages has the advantage of looking at a problem from different angles and a lot of times broadens our understandings and view about problems and code.
Although sometimes many programming languages fall in the same style, for example java and c# and in this case one of them should be enough.

Amir H. Fassihi said...

Tournesol, I hate microwave pizza by the way ;), but I'm sure thats the best that you can do....