Write better code
When you look at well written code, you know straight away whats going on.
The code is organised in an way which is easy to understand and navigate, when debugging.
The better code make it easier for you or anyone in your team to work with now or in a few months, years times.
One of the main element of bad code is duplication, well written code you should not see any or very little duplication of code

Use a Coding Standard
One of the best ways to help with good code, is using a coding standard. There is a number of different coding standard\practices out there. I try and use SOLID, but you could use any. Create your own or create a hybrid, which take one or more than one with a twist of your own.
They will help from naming conventions to the way you build your methods, classes and even the whole solution.

Write Comments in Code
There was a believe if you needed to comment, then you code is not readable and you will need to rewriting and make it more readable. Tried this logic, but after a bit you miss the comments and you notice how important they are.
A comment should be simple, straight to the point, relative and not a novel.
There are known instances where Microsoft developer added comedy comments in the development of some of their products, but really your not a comedian and does comady really help here.
Comment in Code

Use Meaningful Structures
This is very important for the current and future development of the solution. The way this is done will be guided 80% by most programming standards.
Once you have chosen the structure you need to try to keep to in, specifically within the give solution. You don't want to go back to a solution a year or so later and try and work out whats going on and where everything is because of a bad or multiple structures have been used.
The good meaningful structure will help reduce bugs and improve debugging and testing. (As well make the developer happier, when they work within it)

Global Code
When I've look over this topic I have seen people against global code, like variables. But within my believe, using global variables can help the code be simpler and more readable.
I don't agree with the below quote. If your code is millions of lines then you need to re-think your code and maybe re-write. A method should not be scroll-able and a class should only do a single thing, not multiple things and surely not millions of lines.

Global variables and loops are a mess and can prove problematic when your application grows to millions of lines of code.

You shouldn't put everything as global,but sometimes it helps the code. Really depends on the coding standard you are using and what it allows and advice

Use Version Controlling Software
This is very important when you are developing small or large solutions with one or multiple developers.
If your a developer it can save your life. Recover lost code. Rollback to before a something has gone wrong. If your working within a team, it can help merge everyone work into one solution without a headache (on paper)
There are multiple paid and free solutions are out there in the wild. Most popular version control tool like Git or Mercurial, both are free software/open source and very powerful.

Simple short documents can be life savers, when your working in a team or if you working on multiple project, just to know whats going on and how it works.
These should always be short and only contain the bear-bones and not a Novel. There are many automated application, which can go through your code and create a simple document.

The type and content of a document really depends on the methodology your using, but there is always room for a small document.
Created: 10/10/2016 Total Comment: 0


(Not Displayed)
Human validation
Enter 7297 number, before submitting to confirm your human
[Home] [All Blogs] [Contact] [Me]