Technical checklist: How to start coding new project

Even a fresh graduate out of university or a college student can do programming. They can create websites, mobile applications, and much more stuff. But inexperience person with quick start of a project without considering important aspects can result in a lot of problems. In fact, seasoned programmers who don’t consider important factors before starting project end up with similar problems. Remember, experience is although listed in number of years, but maturity, quality and efficiency  don’t come only by understanding and fixing problems but also not doing same mistakes again and again. Maturity come by learning from own and others mistakes.

So whether you are a seasoned programmer or a new programmer, here is a check list having some important things to consider before starting your next project. Here I am more focusing on programming related stuff not project management side.

Understand the big pictures:

Even though we are not focusing on project management size but at any level understanding the big picture is very much important. Even if your work is a small part of something big, still you should at-least understand how your work is going to interact with and will be integrated with rest of system. This will let  you avoid many small mistakes which can later appear as big problems. Also based on big picture you can better decide about technology and approach for your work.

Some documents are helpful:

Yeah I know lot of documentation sometime overshadow actual development process. I am not asking for that. But you should at-least have some sort of  diagrams which clearly state important flows, rules and relations. If that is not possible then should have a bullet point document so that your client can understand what you are going to do before seeing something actually coded and working in-front of him and believe me it will be really helpful for you to develop something that is decided and listed instead of developing while thinking about missing pieces.

Have  a DB diagram:

If you are using a database in your project then you should at-least have an initial DB diagram ahead of coding business logic to keep you on track. Try to create a DB diagram even if you have decided to not making any other diagram.

Write and run Test Cases:

I understand that most of programmers don’t have time for writing test cases. It consume time to write more code for testing your code. But there are already such testing frameworks which can make your work a lot easier. It will still take time to write tests but it will really rescue you in case of any major change requested by client or due to some mistake . In the middle of project, developers hesitate to change existing functionality because that can break some parts of system that no body will know before shipping code that can break while in production.

But sometime it is crucial to do such major changes so here automated testing tools can rescue you. These test cases let programmer know that where change is effecting. So that programmer can fix those places before shipping and rerun all test cases. It provides much more confidence to developer over his code.  It is up to you  that which type of testing you want to use and which framework you want to use for that.

In fact, in my last project client 2 times asked for such major changes and we already had test cases written, so after doing changes I just ran test cases and it showed me the test cases failures. So I fixed those parts accordingly. So after doing all changes and fixing everything I again ran test cases and at the end I was confident that now there wasn’t any remaining broken thing due to that major change.

If still not convinced that Automated Testing can make your life better, then see a this question answer format article: Why to write test cases using Automated Testing tools?

Use Latest Stable version:

Always use latest stable version of a framework or library if possible. Because the product or project you are developing right now will be in production after some time and then it will remain in production for much more time. So use latest stable version available so that you or product owner don’t need to upgrade libraries or frameworks again and again and can utilize latest features from day one.

Version Control is always important:

Version control tools are not only useful for keeping versions and history but it can be useful as a tool for auto merging different team-mates’ work too. Other than that, it is very helpful for having an on-line backup other than on your system so one can access it from anywhere as well as it is safer to not rely on single system.

Use Dependency Injection:

If your framework or library provide a way of dependency injection then use that or get dependencies available for your class in class’ constructor instead of separately instantiating objects in different methods of a class. Because this way you will not only know your class dependencies easily but you can also replace them easily if you want.

Use Interfaces:

Try to always use interfaces instead of concrete classes for instantiating objects. Interfaces make your code loosely coupled and let you swap parts of system much more easily.

Use thinner Controller:

If you are using MVC pattern then your controller must only have, required things and should be thinner. And reusable stuff should never be in controller but in library, helper or model etc.

Respect SOLID:

As per wikipedia, SOLID (Single responsibility, Open-closed, Liskov substitution, Interface segregation and Dependency inversion) is a mnemonic acronym introduced by Michael Feathers for the “first five principles” named by Robert C. Martin in the early 2000s that stands for five basic principles of object-oriented programming and design. Here you can find more information about SOLID. https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)

However what I want to say is that SOLID will make your programming and work better. And your code will be much more flexible and clean.

So these are few things which are in my checklist, let me know if there is something else that you think that it should be added in this list. I will try to later attach detailed articles to most of these points which need more clarification or detail.

Thanks.

Share your thoughts