Home
Published on

Code such that Humans understand it. Computers understand binary Humans can't!

Authors

Coding the right way!

  • You always feel difficulty understanding what doctors write, right?
  • Ever found a code on the internet but found it difficult to understand?

Team members will be able to grasp how to operate within your applications if you use well-understood and good coding techniques that follow to industry standards, which is critical for organizations that want to continue to develop and produce faster.

  1. Exception Handling: Code in a defensive manner. Always consider the worst-case scenario. Think about input failures, event handling exceptions. This would help keep a track of possible bugs and catch the exceptions.

Computer Joke 1 Here

  1. Enhance code readability: Writing highly optimized code and creating complex libraries is easy but consider junior developers trying to understand 300 lines of code. Which more of a challenge than learning. Code that is clean and modular reflects the maturity, competency, and professionalism of the developer. A code logically structured into modules and functions is always more readable, efficient, and reusable.
  2. Minimize the memory footprint: Simple yet significant coding habits can change the performance of your final product. Memory management involves ways programmer/developer dynamically allocates memory to code when requested and frees it for reuse when not needed. Here are a few good blogs I came across:
  3. Refactor your code: Restructuring your existing code without changing its functionality. Aggregate groups of functions doing similar tasks into a single function, use of abstraction, deduplication of code, and polymorphism.

Computer Joke 2 Here

  1. Version Control: Tracking all changes and synchronization of codes, bug-resolve, managing changes to source code over time. Basic, niche practice every developer should master. Git, GitHub, Gitlab, Mercurial are tools used for version control.

  2. Code Testing: Isn't it nice when someone praises us after we dress up with a good outfit? Testing practices act just like that validation we need when coding the functionalities of any software. It guides and shapes the development process of the software. Unit tests, code coverage, and other testing techniques help maintain modular structure and good quality end-product.

  3. KISS-DRY-YAGNI :

    • “Keep It Simple, Silly” - keep your code as concise as possible
    • "Don’t Repeat Yourself" - reducing repetition and redundancies
    • "You aren't gonna need it" - Don't try to think far ahead in the future and add complex bits of code features. You don't need it, you ain't gonna need it!