Programming practices
This page will cover some bullet points and explanations to things learned about programming. Please feel free to contact us, so we could make this list of useful tips for getting in to programming.
-
Learn new languages, technology’s or coding styles
Every time you tread new ground and learn something new you broaden your horizon and become more useful and therefore better programmer. Knowing enough about much will help you when coding with your technology, language or style of choose.
-
Comment/Document your code well
This doesn’t imply that you should write an essay every time you get some extra space. But just have in mind that what something does is pretty easy to remember or figure out, even one year down the line. But coming back to a piece of code a few years later and be able to change the code, so it will do what was intended even better than when you wrote it, is a powerful experience. -
Reuse the knowledge you have instead of code
Reusing code is pretty easy and time saving but in the end the application may not handle in the way it was intended and you end up writing a lot of code again and perhaps when you don’t have time to do so. -
Try to put yourself in the shoes of the users
This part could be subtitled “What could a user do wrong?” or “What will the user expect?”. These kinds of questions is really important. If your able to create an application that works seamlessly and no one asks you how to use it. You have either documented it well or built a really intuitive application. -
Always assume that you have done something wrong
Usually you have made some fault during the development. Either some thought was wrong, you misspelled something or you just hadn’t thought about something. Be grateful every time someone finds a bug because if you fix it, that’s one more piece to perfection. -
Try to find all error points
Go though your code and try to find everything that could go wrong and handle it appropriately. Even if this never should happen, just creating an “humanly understandable” error message when it does will help you in the event of it actually occurring. -
Improve your code or functions when ever you get the opportunity
It’s a pretty empowering feeling when you build something that just works and you come back to it 6 months down the line and think, “What a piece of rubbish! I could do that so much better now”, and then sit down and do just that. Perhaps the application will hammer on for 6 more months before you have to change it again.
This will be updated with everything forgotten or fix what ever is wrong with this, there should be something right
Keep up the good work, and have fun.