Masters of Doom: A book you should read if you’re a programmer

Masters of Doom Book Cover

You’re probably surprised I haven’t mention “Code Complete” or “Pragmatic Programmer” or any of those books you’ve read reviews of in numerous programming blogs. Those are great books by the way, and should take the time to read at least some of them.

Masters of Doom will not teach you how to be a better programmer, it won’t preach the best practices of software development. Because it’s not a book about programming at all! It’s a biographic tale of two great programmers, John Carmack and John Romero, how their passion for playing and creating games drove them to achieve superb mastery at programming and produce legendary games, like Doom, Quake, Wolfenstein 3D and so on.

Neither Carmack, nor Romero had what you would call a healthy upbringing. They were from broken families, at odds with their surroundings. Playing games was one of the few things they would enjoy, and eventually they started learning how to create them. They had dreams of making it big in the gaming industry, creating and publishing under their own names.

These two brilliant minds met each other at their youth as coworkers. Each admired the unique qualities in the other one. Carmack was more adept in technical details of game development, while Romero had a knack for the creative direction. Together, along with some like minded programmers and designers, they founded id Software, and set out to produce hugely popular franchises. Not only were these games commercially successful, they achieved technological breakthrough in PC gaming. Commander Keen was the first side-scrolling game in PC. Wolfenstein 3D had immersive 3D graphics never before seen in games, And Doom set the bar even higher. These were the games that drove innovation in graphics programming, and established gaming as a part of pop culture.

So what do you, a programmer, are likely to gain from reading this book? The simple message that this book conveys, is that if want to succeed in the field of programming(or any other field) you must have passion for what you do. No amount of training would make you a better programmer if you lack this key ingredient. If you are a start-up founder(or work in a start-up) and have started your journey in the scary world of entrepreneurship, this book will prove to be inspirational to you.

So if you are a programmer who is looking for something to get him inspired, I strongly urge you to read it. Or read it anyway, it’s fun.


Google Chrome OS – Lets try to be positive


Google’s announcement of stepping into the OS market with Google Chrome has generated quite a stir in the Net. While many have welcomed Google’s new venture, others have been busy with making absurd predictions. Some are talking about what current operating system it’s going to kill? Some saying they don’t need a new OS because they already have one they like. This fellow got more creative and ranted about ‘features’ of the OS before it’s even released! It’s like blaming an unborn baby for being bad in sports?

Personally, I don’t understand the motive behind this kind of negative thinking. Why not think about what new things Chomre might offer, rather than which popular OS it’s going to kill? Let Bill worry about possible market threat of Windows, we should worry about how to use Chrome. You already have the perfect desktop? May be that’s what you think and may be you are right. But should that stop others from trying to innovate, seek answers to problems you never realized you had? Google’s new browser introduced radical concepts in terms  of usability, may be the OS will do the same.

As developers we should be more open minded towards innovations, and throw away this die hard slash fanboy culture.  Technology isn’t religion, you won’t be denied entry to heaven for switching to a newOS/programming language. If nothing else, competition is good. It brings the best out of people. Let’s hope it’ll force Microsoft to make a more secure Windows, or inspire Linux people to create much user friendly desktop systems.

I have a dream : Programmer’s edition

Here are a few things that I would like to see happen in the next few years:

1. Internet Explorer will cease to be the number one browser in the world wide web.

2. Ubuntu will surpass Windows as the most used desktop system.

3. A cease fire will be declared on the Prgramming Language Wars. Java and PHP guys will respect each other and live in harmony.

4. The JavaScript language and its programmers will recieve their true recognition.

To be continued…

Working on Netbeans 6.5, and loving it


Netbeans has recently released version 6.5 of their powerful IDE. It comes with PHP support which can either be downloaded as a plug-in or installed as a stand-alone module. I’ve started working with it few days ago and am really impressed with it. Here are a a few things that I like about it:

User friendly

Creating new projects is really easy. They can be created either from scratch or from existing source files. The interface is clean and useful. It has file and project explorer, a navigation panel to quickly access the methods/members of your class files, a pallet to create HTML pages in drag-and-drop manner and lots more.

Code Assistance

It provides your basic PHP/JavaScript/HTML/CSS code auto-complete features like most other IDEs. Interestingly you can add your PHP framework/library files in the include path of your project and have the IDE suggest methods/members of the classes you have included in your script. It also supports code assistance for JQuery, Prototype and Scriptaculous.


It has a smaller footprint on system resource compared to Eclipse PDT and Aptana Editor, and even its predecessor Netbeans 6.1. It loads much faster than those on my Windows XP machine. I am yet to try it out on Ubuntu.

It free!

Yes. The last but not the least!

The thing that I don’t like about it, that it no longer separates the project specific files from the source files, as the 6.1 did. I work on Windows Desktop connected to a Linux server through Samba share. So I am left with ‘nbproject’ folders on the development server, which I have to manually remove when migrating the sources to production server.

Still Netbeans 6.5 is a decent 8 out of 10 on my book.

Download Link:

Here’s a couple of screencasts to get started with the IDE:

Rasmus who?

A friend of mine had a hypothesis on common human behavior: they love to argue, even on simplest of issues. If he had seen the discussion thread of Hasin’s recent post, he would have been proud of himself. Hasin wrote that he wouldn’t hire a guy for his company if he didn’t know the name of the inventors of PHP or MySQL or any other technology that the guy had been using for his profession. This was entirely his personal opinion, but it had sparked a lengthy debate in the follow-up discussions. There was a generous use of analogies: toasters, telephones, engines, wheels and what not. Someone even brought Rasmus Lerdorf’s mother into this! The poor lady!

Personally I am leaning a little bit on Hasin’s opinion. If a PHP developer can tell me the name of the inventor of PHP, I won’t hire him right away (or show him the door if he can’t), but I’ll definitely have some respect for him. Having some idea on the development background of a technology is usually considered as a good trait in the developer. Especially if the technology itself is a product of collaboration, such as PHP or MySQL or Linux or whatever. I believe it is called the Ecosystem of the technology.

On a lighter note, it might be possible that some people got upset with the term history on Hasin’s post. Many of us don’t have much fond memories of history classes in high school 🙂

P.S. I don’t have anything against history. I like watching the History Channel.

PHP is a good second programming language(but never a first)

I was a bit surprised to read the blog titled Is PHP a good first language? The author of the blog haved bashed C (instead of Java, which is a common trait in PHP fans). However, the author’s argument was not the fact that C is incapable, but the fact that it is too difficult to learn for a newbie programmer.

Contrary to the author’s opinion, my idea of a good first programming language is as follows:

  • It should encourage you to do problem-solving
  • It should enable you to think logically
  • It should teach you to approach the solution in a structured way

Firstly this is not a PHP bashing article. I am a PHP developer myself and I like my job. But there are reasons for which I believe PHP should not be the first language when you begin to learn programming. It might be a good second one. I should also make it clear that I am not suggesting C to be the first one, the choice is entirely yours. I am just going to mention C as an example in the rest of my article.

PHP is a specialized language

PHP was created to solve the Web problem. It was and still remains the most popular language to build web applications. No one expects you to write a web application in C. It will be like building a console calculator in machine language. But if you are someone absolutely new to programming, you should start with language that is generic in nature, and structured. After you have gained sufficient knowledge and skill in that language, moving into a specialized arena, be that web or system programming, won’t be much of a challenge for you. If you ask a C programmer to learn PHP, he’ll need little or no time get himself acquainted with it. And he’ll most likely love it. But If a PHP guy (which is his first language) wants to learn C, it is less likely that he’ll enjoy it. Eventually he’ll hate the very language that implements PHP itself!

PHP is a loosely typed language

Despite what some theoreticians say, I am quite fond of the loose typing feature of PHP. It provides much flexibility and ease of coding. 0 compares equal to ‘0’ without the need of explicit type casting. But this feature is not without its disadvantages, and if you are not careful enough it may lead you into programming pitfalls. What will be the reaction of newbie programmer when (0 == 'test') will return true in PHP? It’ll scare him off PHP, if not programming.

Dynamic variables in PHP

Variables are (kind of)the heart of a code. To understand programming, you have to really understand what a variable really is, what is its lifetime, what is its scope, what part of the code are going to see it, and how are they going to see it. In PHP variables are created on the fly. This is a great ease for development, but not so good for debugging; readability may also take a hit if the coder is not careful. If you start programming with a structural language as C, you would be forced to use variables properly i.e. you will have to declare it first. You have to specify what type it is. Than depending on how you declare it, it will be visible to some code, and hidden from others. You have to understand these things properly and correctly if you want your skill in the language to grow. After that moving to PHP, or any other dynamic language, will be painless for you.

Built-in library functions

My fifth-grader cousin could not figure out how much is 42 times 25 with a pen and pencil, He had to be provided with a calculator. My point is, built-in library functions will make your life really easy. But to be a better programmer you should have an insight of how things work. I am not saying that you must know how each of the function works; or avoid using functions and do things yourself. But if you really like programming, you should know things, like how does a certain sorting algorithm works, what sort of data structures are there, pointers are really P-I-T-A, but they still give you an insight on memory manipulation. Having a sound conception on topics like these makes you better at problem-solving.

The world of software development is diverse and ever changing. Knowing one or two programming languages won’t help you much if you want to progress. Selecting an easy language may benefit you at the beginning. But it’ll make you pay when you need to switch to some other sophisticated technology. So choose the first language wisely. And if PHP is your second language, you’re gonna enjoy working with it.