Things you should keep in mind.

Lets face it, every developer wants to improve and become better. The big question that most developers ask is how will I do it. Here are a list of things you should keep in mind while programming.

Code Presentation

Naming

class ItemList {

public int numberOfItems () {…}

}// numberOfItems is unnecessarily long, repeating the word Item// it could be renamed to size or even length

Write Less Code

Avoid Unnecessary Code

Common class of pointless code is the unnecessary use of conditional statements and tautological logic constructs. Flappy logic is the sign of a flappy mind.

// exampleif (expresion) {return true;} else {return false;}// which can be refactored toreturn expresion;

Duplication

Dead Code

Other manifestations of dead code include:

Comments

Improve Code by Removing It

How dead code spring up during development

Be wary of the Past

You thought it was perfect when you wrote it, but cast a critical eye over your old code and you’ll inevitably bring to light all manner of code gotchas.

How to go about an existing codebase

Coming into any large existing codebase is hard. You have to rapidly:

Dealing with Errors

Be prepared for the Unexpected

Bug Hunting

Always test your code

Unit tests specifically exercise the smallest “units” of functionality in isolation, to ensure that they each function correctly. This isolation specifically means that a unit test will not involve any external access: no database, network, or file system operations will be run.

How to deal with complexity

Practice Makes Perfect

Be a team player

If you found this post helpful, please share it so that others can find it. You can follow me on GitHub and LinkedIn. If you have any ideas and improvements feel free to share them with me.

Happy coding! 💪