Think First, Code Later
8 Comments
Comments are ordered by helpfulness, as indicated by you. Help us pick out the gems and discourage asshattery by voting on notable comments.
Got something to add? You can leave a comment below.
Chris
Chatman R.
I’ve actually gotten into the habit of planning my projects down to how I’m going to implement functionality. I decide beforehand whether I’m gonna use a library or a bespoke solution in vanilla JavaScript. It depends on robustness vs performance for me.
Also, since I fell in love with Mocha and BDD testing a few months ago, I’ve made it part of my process, often writing my tests before the implementation so I can limit myself to expected results and possible edge cases. I write code defensively as a rule, and Mocha has only helped that. Although, this could all be obsessive on my part, as I’m not even building major web apps yet.
Sitll, it can’t hurt to prepare for future challenges now.
Ricky
Experience plays an important role,
once you have gone through a few projects you can understand how to adopt technologies wisely.
Shina
Just like Ricky has said … I think the more experienced you get, the more you realize what script is needed rather than packing all the libraries together just for a single animation.
Nice tips.
Stephen
Henk, absolutely right. Overall waterfall-style planning for the whole project is no longer very practical. By breaking planning down to pieces of major functionality (ideally using some kind of agile or scrum system) you’re not doing a load of work up front that might end up becoming irrelevant.
And even during development its no problem to change direction, but having a strategy in mind for your framework choices will still help. The best thing about these emerging modular build system is how easy they make it to pull things in and out.
No plan ever survives contact with the enemy, as the old military adage goes.
Tim
These are really great tips, thanks for sharing. I have ran into this problem a couple times, especially when I programmed C++ and Java. Alas my methods mature more and more every day!
Aras
Thanks for this article, it is good to read about the challenges I will most likely face down the road. It is my first time now working on developing a web application frontend as the only developer, and I oftern face the temptation of “can we just …”. I will try hard to keep things in perspective and avoid, quick and dirty solutions.
By the way, jquery UI allowes you to strip the library and only include sections you use: http://jqueryui.com/download/ so it is often actually a very good choice for building UI because you can add any other widgers or effects etc in future without having to search and test another plugin. Jquery UI has a very minimalistic approach and I find many of its widgets and effects are relevant to most web applications.
Thanks again!
Aras
Henk
Planning is all fine in theory and it is indeed important. But it is never 100% possible because projects change so many times because of the rapid evolution off the Internet. You can’t plan everything in advance. Some things come up during the task and you have to change parts of the coding immediately to make it work.
Funny you should say that; I got annoyed a few months ago with people including jQuery UI just to get tabs. I created this JSFiddle in response.
I’m no JS guru and I’m sure it could be improved, but if I can do it…