Happy 2012 folks! :) In Feb it will be two years since I started working. There are things that come obviously to people. Then there are the ones which take some time. There are the ones that everyone tells you do but you don't follow until you've been bitten in the ass by not following them. Here are a couple of things (my resolution for 2012? Lets call them that) that I've realized make life easier for you as a developer:
- Use getter functions instead of directly referencing attributes. Helps you modify and control behavior in a much more centralized way (those from the Javaland, I know what you're thinking :D )
- Use debugging tools frequently: Breakpoints, logs, prints, inspectors. They're there to save your sanity.
- Write self-contained and pluggable/reusable code, as much as is possible while maintaining the cleanliness and without making it over-pluggable. Then you're just writing 2 lines of code to replace 1 line. Bad idea.
- Don't write even ONE line of code until you have planned how to go about building whatever it is that you're working on; be it a full project or a 3-line method. (Okay, there are exceptions to this one. But I'm gonna put it in anyways)
- Use a pen-and-paper or a whiteboard to write down points rather than keep them in your head. Its much easier to revisit things this way.
- Talk. Anything that you're doing new or have even the slightest doubt on how to do/what is the best way to go about it; its best to pull in 1-2 people and explain what you are trying to accomplish. Maybe they will tell you an easier workaround. Even if they're not able to answer, they might be able to ask questions that might help you come up with solutions that rule out the need to do, say, a big chunk of your task. [This one comes from the meeting after which we didn't have to replicate our ALL databases, as we realized there was an easier solution out there]
[Please note that these are just a few of those I have found helpful. This list is in no means comprehensive, complete or THE list. Also, these are things relevant to my development environment setup (python, django, mysql, mongodb, uwsgi, nginx etc.) Might be totally useless for you :) ] Oh look, its already the longest post on this blog till date. :P
**EDIT: **Adding from @nikunjlahoti's comment: If you don’t want to code then just plz don’t please anyone by writing crap. or copy pasting snippets. just get a better job. & if u r stuck for good then look at the best-practices (at least). make lives easier.