Showing posts with label Fundebaazi. Show all posts
Showing posts with label Fundebaazi. Show all posts

Thursday, December 27, 2007

Revolution Lies Within !

I have been reading many of Steve Yegge's posts lately. Most of his posts that I have read, are in essence (and this is related to programming):
1) Think about your work.
2) Improve the depth of your knowledge by learning more on the subject.
3) Improve your programming wisdom by training yourself in various tools/languages.
4) Improve your maths, learn as much maths as you can.

The first two points are generic in nature. Even the third is generic if you try to understand the meaning at its core. The fourth one would be a bit surprising for many people but it is in fact the most radical of those points. This does not mean others aren't important but this one is an unorthodox advice. I want to talk here about the last two thoughts, as everyone is familiar with the first two (even if they don't follow them ;-).

You can have a look at the posts (and I really recommend you to go and read them).
Math For Programmers
Rich Programmer Food
Software Needs Philosophers
Execution In The Kingdom Of Nouns
Ten Challenges
Tour De Babel
Being The Averagest
Practicing Programming
Math Everyday

As I said earlier, the third one is generic too because it illustrates the importance of being open-minded, unprejudiced, unbiased. Here are some quotes (I found them on an interesting blog by Reg Braithwaite and they quite illustrate the third point),

Programming languages teach you not to want what they cannot provide. - Paul Graham, ANSI Common Lisp

An “X programmer”, for any value of X, is a weak player. You have to cross-train to be a decent athlete these days. Programmers need to be fluent in multiple languages with fundamentally different “character” before they can make truly informed design decisions. - Steve Yegge, Code's Worst Enemy

What I can conclude from reading these opinions and myself having a small look at functional programming is, that you definitely need to learn many different programming languages with different paradigms. You do not want to be one of those five blind men with the elephant, isn't it ? And, I really hate it when I see people raving over Java. I am not a Java-hater, though the language has got its own problems as many other languages do. I hate the sickening attitude of those Java-philes, because they look like a bunch of zombies to me. Zombies, zombie-d by Java, fanatically convinced of Java the Panacea, who have built a wall of 'bytecodes' around them and pretend that this enclosure with what it encloses is all that there is. Most of them are newcomers and less-experienced, as those who have been deep into the rabbit-hole of Java surely know that all is not well. Now, you may question my experience as I myself don't have years of experience behind me and that's perfectly valid. However, you have got to pay attention when senior programmers (those who have been there for more than a decade) point out problems with your current favourite language. As when Alexander Stepanov, the implementer of C++ STL and a hugely respected guru of generic programming, said the following:
"I find OOP technically unsound."
"I find OOP philosophically unsound."
"I find OOP methodologically wrong."
"I have yet to see an interesting piece of code that comes from these OO people."
"I think that object-orientedness is almost as much of a hoax as artificial intelligence."

When all you know is language X, you will fire up code without thinking whether X is a good candidate to solve the problem at hand. You will think in the terms of X, you will try to fit the problem into the mold of idioms of X, into a particular paradigm. When the only tool that you have is a hammer, everything looks like a nail.

Coming to the fourth point, its really appalling to see that people just don't know or want to do maths. Whatever they learned, software jobs have washed it out of their minds. Its a great loss and they don't realize it. As an example of why should you study some maths, consider that you have a new problem at hand. Now, most perhaps you will come up with a simple, naive solution to it and use that. This will show up as a problem when considering the efficiency of your application. Had you known some maths, you might have tried optimizing or finding a better solution to the problem. You can say that you can workaround this problem by doing a search on algorithms for such a problem. However, that's not very easy unless you follow points 1 and 2 listed above. Also, in the worst case it may be a new kind of situation and then you are left helpless. If you knew maths, you could try to formulate the problem in some mathematical models you knew, and try developing a better solution. Most wonderful would be the situation where you could model it from scratch and develop a solution. As a more practical example, suppose you had some algorithm (or data structure) which work on the kind of problem you have at hand, but the problem isn't directly fitting into the domain of those algorithms or data structures. You could tweak the data structure or algorithm to fit into your requirements, you could analyze the costs involved ... all possible if you knew maths. Computer Science at a fundamental level is maths.

People with engineering degrees from reputed institutes should be more technically-oriented rather than running for those management courses or jobs (its entirely my opinion). It just doesn't feel right to me. Our country needs a lot of technically skilled people to carry it into the league of advanced nations. The fire of real progress is going to be ignited through science and technology, not through management. Management makes sense only when you have some strong foundation, real growth and progress. So many managers and not enough technically-skilled people is a sure recipe for continuing to be the copycats that we are today. Little wonder why we don't have world-class software products, cutting-edge technology.

Ok, let me wind up. Forget Java or C++ or Ruby, the point is that you need to have an introspection session regularly, where you stop working in the routine manner, and you try to think. Try to think whether you are on the right track, are you working with an open mind, is there something you are missing in your toolset, is your language really giving you what you want, do you need to know a new area of maths ... questions like these. I feel that this kind of checkup and acting upon the conclusions from it honestly, can make us wiser and help us grow.

Friday, November 23, 2007

The Importance of Reading Classic Texts

Hi,
As the name of topic suggests, this is on classic texts. However, the domain considered is a narrow one. This is about technical books, mostly computer science books. This is one of the series of informal discussions that I keep on having with my friend Raghvendra. Raghvendra is from a Mathematics background and helps me with Maths, especially Algebra. I complement this by helping him (as well as I can) in the CS stuff. More importantly, he is fun-loving, sometimes lazy and casual like me and so we gel well :-)

Coming to the topic, this is an observation we had on the books that students study in colleges generally. Our observation leads us to conclude that most students prefer to read books that are easy-going, non-challenging and quick-fix solutions to exams. Let me once again remind you that this discussion is technical books centric, India centric.

Let me start with CS books. When you observe what books people read for programming these mostly turn out to be Kanetkars, Balagurusamys, Schaums, Teach Yourselfs, Schildts, Eckels and stuff like that. There is one fact I am going to tell you and I can bet on this. If you really want to learn a programming language, understand it's subtleties and nuances, develop your understanding so that you can appreciate deeper issues, you got to read the programming language creator(s) book PERIOD ... Why is this so ? Let me start with where these other books fail. First of all, if you take any of these books to a really good programmer, he will tell you how many incorrect statements they have. A classic example is telling that C is both call-by-value and call-by-reference. Second they talk too much on something and then miss out critical points which leave your understanding incomplete and dangerously insufficient. Third, they teach you bad coding styles. Look at code written in K&R, Stroustrup etc ... they look beautiful and elegant. Fourth, many of these books really mess-up your learning as they take you unnecessarily into things you don't need when you are starting to learn a language (stuff like hardware interaction, graphics, Windows and Linux programming). Last, and the most important and interesting reason is that they don't force you to think, they are too easy going. The creator books are difficult for beginners, I agree but, if you proceed patiently and put in some effort, you understand the right concepts and these things stick into your mind. You save a lot of time and effort later on.

Maths. There are so many classics, really wonderful books like Herstein's Algebra, Thomas-Finney's Calculus, Erwin Kreyzig's Engg Mathematics. I got some other names like Rudin's Real Analysis text, Dugundji's and Joshi's texts on Topology. Though, I really can't tell you why they are beautiful but Raghvendra prefers to read classics in Mathematics like I do in CS, so I believe they are going to be good. I am reading Herstein's Algebra and it is so wonderful when you have that AHA! moment, you can see the beauty that's there in those abstract structures. Thomas-Finney was one book I loved simply because of its style of presentation and the way it kept you showing how the mathematics related to some real world situations. Do you feel shaky about your concepts on limits, continuity and differentiability ? Pick up Thomas-Finney, give it a couple of days and you will see these things will come so naturally to you ever after.

Physics. Feynman's Lectures. Absolute joy to read this trilogy. You feel like attending a real lecture and the insights that you gain are awesome. Equations come but there are interpretations, the emphasis on understanding the content of equations is throughout the books. The difference between how a mathematician sees equations and what they mean to a physicist is something really important to know if you are serious about Physics, or are interested.

Hope, I got you to rethink on the topic of choosing a book when studying something. Let me know what you think, this is a nice thing to discuss :-)