Nine Common Traits and Ways of Identifying Bad Code

From experience, bad code is often born out of the desire for instant gratification. Instead of writing a couple of extra lines of code and being more intentional with how we structure our code, we just love copy and pasting solutions on the internet to reach our goal.

Why? Because it is easier, quicker and more convenient.

This post is aimed mostly towards new developers. Developers who are new to the game are mostly focused on just making things work. While not inherently bad, without guidance, new developers can quickly develop bad habits that will set them back in the long run.

This post aimed at opening the eyes of developers by pointing out common code smells. Also common actions and habits of that usually result in bad code. Before the desire to see some visible results degenerates into bad coding habits.

To those that are interested, prepare to feel the sting!Continue reading

Beginning my Journey to Learn C Programming

Hey guys, for those that do not know, I have decided to go back and study the C programming language.

In light of some feedback that I received, I am currently in the process of re-evaluating and changing the way I write.

However, because this is a personal post, I will be reverting back to the style I write. Although this post is more for equipping myself, I hope that those who decide to read through my incessant rambling will find some value in some of the things I process.

Earlier on last week, I had lunch with a developer who wrote out the source for an embedded wireless communication device for controlling LED lights. I did not see him in quite some time, so I used this opportunity to pick his brains. As a developer, he is somebody that I respect, also as well in terms of work ethics.

I am a backend developer/system architect that is currently working on the entire system. From coming up with the system architecture, designing the database, writing queries and procedures, doing both backend and frontend development, as well as UI/UX. Needless to say, I have a lot on my plate (on top of also managing this blog and taking a Nanodegree at Udacity).

I am not saying this to brag. But rather, to admit to my weakness, as well as my slowness in realizing that I was unknowingly being spread thin.Continue reading

Good Coding Practices – Five Tips to Enhance Code Quality

Good coding practices are like a bright beacon guiding unwary developers to the shore at night. Good code is predictable. Easy to debug, extend and test.

Good coding practices help your teammates become more productive and makes working with your code base an overall pleasant experience.

What I will share with you are five universal good coding practices that will improve the readability, extensibility and overall value of your code. The sooner you understand and apply these principles, the greater the benefits will be.

Let’s get started.Continue reading

Best Practices != Writing Good Code – Evaluating code quality

Writing good code is the dream of passionate developers.

However, it does not help us that the measuring bar for determining good code is quite relative. It is not like a test score, which states that you scored 89 out of 100. People read and write code differently, resulting in a variety of proven and tested solutions to common problems which are known as best practices.

Best practices such as ideal naming conventions differ for each programming language. For example, writing good code in Java and its best practices may not be in perfect alignment with writing good code in JavaScript.

The most common misconception that I want to tackle is that

Writing good code is all about following best practices

Following best practices is important, as they are proven solutions, ways or methodologies that help developers write value-adding code. However, blindly applying these practices without understanding the purposes and intent behind it will eventually lead to the developer shooting themselves in the foot.

The purpose of this post is for us (myself and those that read this article) to re-evaluate the way we write code by being mindful of what good code is.

This tutorial will examine

  • common criteria for determining code quality.
  • the importance of immediately refactoring poorly written code.
  • the pros and cons of the prevailing mindset towards best practices.

I want this to be informational, meaningful and of great help to developers in all stages of their journey. We will be working from the ground up starting from what is good code, and working out way up towards scrutinizing the initial mindset and view of modern developers when they hear the term “best practice“.

Continue reading

Doubly Linked List Implementation Guide | Data Structures

The doubly linked list data structure is a linked list made up of nodes with two pointers pointing to the next and previous element.

I will assume that readers are comfortable with the basic singly linked list. If not, I recommend reading about the singly linked list before proceeding.

Let’s get started shall we?

Continue reading

Introduction to the Queue Data Structure – Array Implementation

The queue data structure (we will look at queue array implementation in this post) is one of the fundamental data structures in computer science.

Queue is an example of a FIFO data structure.

In this tutorial, we will be exploring the following concepts regarding the queue data structure.

  • Key features and properties.
  • Implementation details.

Without further ado, let’s dive into the content.Continue reading