Web developers’ ultimate challenge

It started with one simple question – what is the ultimate challenge in web development?

Well, some of my fellows answered – ‘may be, it’s solving problems!’. But trust me, web development is not rocket science – it’s relatively much much easier than most other programming jobs. Problems that web developers face everyday are pretty much less computational. We don’t usually have to invent new data structures or new algorithms to solve problems. In most cases, they are already solved – the challenge is here to find out the solution. Honestly, that’s not a real challenge at all, even people having no programming know-how can search that out using Google, given they know the right keywords. Well, may be for them, the challenge is rather to find out the most suitable and the best one. Bad news for those lamerz, Google will not always suggest them which one is better and why. They have to have the skill to judge the solutions or they have to depend on the community opinion.

Anyway, it’s easy to find out a solution, but it’s tough to find the best one, it’s even tougher to modify that one to fit your need. Sadly that requires a minimal skill. It is very unfortunate for us that many no-brainers have started web development professionally. I saw them modifying the code in a horrible manner – seems like they have no idea of how the original code actually works. They follow a unique process that’s pretty much a trial and error approach. As like, they are trying to solve a Rubik puzzle. They move/modify the code here and there, back and forth, trusting their intuition and then test if the code works. Though the whole process is really pathetic, in most case they do succeed. No worries, it does not matter how the code looks, it works! I am unlucky enough to see such codes and the first thing that comes in my mind is yaak! these are real stinky pieces of shits!

Now we can make best use of Google, we can search out and modify the code and make it work but our code looks pathetic. Well, still it’s alright (If our boss/client is code-quality-ignorant)! But how much time did it take (our boss/client will count that for sure )? Did we try to think about the possible solutions before searching? Trust me, craps are all around and in most cases it’s better to write out our own rather than searching. Well, I am not trying to convince you to re-invent the wheel. My point is clear and loud – sometime it’s better to create a new wheel than taking an existing wheel and modify it in way so that it works with your vehicle seamlessly and overall it looks good and the design looks perfect as well. Also, I am not against ‘Google search’ and ‘DRY’, it’s absolutely alright to choose and use a particular solution as long as they meet our need or as long as we are smart enough to use that without making our system crappy. Also, it’s good to see how people have tackled the problem, it always helps us to judge and improve our knowledge. It’s a reusable object, a library or framework or anything, go use it but in the right way. Go with a solution, if and only if,
1) It is the right solution to the problem it is addressing
2) We can modify it easily and rapidly to fit our need or it is simply what we need.
3) We are smart enough to plug-in the code without hampering the over all design.

But still there are cases when we have to solve our problems on our own. They may be small, easy and simple problems relatively. But still we have to solve them. We can at most search and find helpful clues. “Problem solving capability” is a combination of 3 qualities – skill, knowledge and creativity. In most cases, we need a very minimal skill (good programming basics – that’ enough to start with). Learning new things and gaining knowledge is certainly one of the challenges. There are thousands of technologies out there. But the good thing is that those technologies are pretty simple to learn and to work with – given that we have got good basics. Gaining knowledge (in the domain of web development) does not require reading thousands of books; it does not require extensive mathematical background. It rather requires our interest and passion towards learning new things. Skill can be developed out of the knowledge -through hands on experience. Creativity – yes little bit of that is required as well but we don’t have to be a right brainer artist.

Well, solving problems efficiently is a challenge but it is not the ultimate one. It’s infact the easiest one. But the most efficient solution most of the time produces the most unmanageable code. We can certainly speed up the execution time by putting everything in a file, instead of using classes, object orientation that slows up the execution. But that results a crap – an unmanageable codebase – that’s hard to maintain, hard to extend and tough to debug.

All modern web apps are built for change. Changes are fast, frequent, necessary and inevitable. Well, that’s the fact right? So, prepare your code for change, design your app for change – that’s the ultimate mantra. Web apps are generally not mission critical. The overall process is most likely to be agile, and the project timeline is very short – that means it’s hard to be preemptive, it’s hard to challenge bugs to enter. Bugs will enter and when we will find one we have to fix that quickly – at the same time making sure that our new fix is not introducing any new bug. Our code must be such that it’s easy to extend, easy to modify, easy to reuse and easy to debug. That leads to one conclusion – write manageable code. But writing manageable code for web applications is pretty hard, tricky and non-intuitive. And hence that’s the ultimate challenge – no doubt.

But as I mentioned before, manageable codes are not necessarily the most efficient and most optimized one. Rather usually the contrary is true (just an irrelevant example, Ruby is >100 times slower than native C++, if we want to write the most optimized and efficient one we would use C++ for web development). The fact is hardware is cheaper than development time. So, if manageable code makes our code slower but minimizes our development time, we should go for it. Of course there’s a balance, the ratio between the development cost and the hardware cost etc. etc. need to be considered. Unless we are writing too freaky routines that take unbelievable amount of time it is always recommended to lean towards the manageability, sacrificing the efficiency. There is always a trade-off anyway. In some rare cases (given that your app gets thousands of hits per hour), we should count performance seriously. But as I said it’s rare. And we all know what the root of all evil is. So, manageability comes first and optimization/performance comes later. Even though gearing up performance is pretty easy – use caching and optimizing tools. These are simple techniques and having good programming basic is well enough to get acquainted with them. In some really exceptional and extraordinary cases, performance is pretty crucial and it’s pretty hard to scale our application even after using catchy caching mechanisms. Put in more hardware, use distributed system, is what to try out. But that’s not the domain of the web developers; it’s the job of the network engineers. Also we can try to find out hot spots and then try to use any non-scripting language to solve that particular problem (like in PHP building extensions using C++). But still web developers are not C++ experts, it is the job of the C++ guys. So, without mere caching and using some other simple tools web developers do not have any other weapon to face the performance challenge. And using those weapons are relatively easy, it can not be anyway the ultimate challenge.

So, to conclude, here is a list of challenges that are to be faced by the web developers, from hardest to simplest -
1. Writing manageable code
2. Learning new things
3. Improving performance
4. Writing efficient code
5. Solving problems

This post contains only my point of view. Anyone can oppose, anyone can find it ignorant, anyone can think it’s arrogant and rude – but still it’s my view. The point of writing this post is to document the facts that are responsible for igniting frustration inside me. Well, I am sorry if the content or the language hurts anyone.

Also, most of the facts are very much intended to PHP developers (which include me) and relevant to web development using PHP.


About this entry