How to Become Better at Coding – A Revitalizing Journey

Every programmer wants to become better at coding. There is absolutely no doubt about it.

However, there are so many people who are either clueless or lack the discipline and motivation to better themselves.

This article is aimed to address the following points

  • Propose reasons why you are not improving at your desired rate.
  • Provide practical, actionable steps towards becoming better at coding.

This article is aimed at programmers that want to improve, find motivation or become better at coding by conducting a thorough diagnosis. 

I will systematically bring you through a journey where you evaluate your rate of growth, identify bad habits and practices that are holding you back from becoming better at coding.

We will end the journey with tips and advice (derived from personal experience) on how to become better at coding.  

Hopefully, this list will help you as a reader become better at coding. I plan on continuously updating the post as I continue to ponder about ways to become better at coding (and of course with your feedback as well).

Without further ado, let us begin this journey of refinement, growth and self-discovery!

Continue reading

Unraveling Map Filter Reduce in Functional JavaScript

Map filter reduce are considered the fundamental functions in functional programming with JavaScript. In the previous post on the JavaScript Map function, we explored the map function in detail. How map works behind the scene, implementing the map function and using map() to create utility functions to make our lives easier.

We also discussed the concept of deep vs shallow copy, the identifying reference and value types, as well as their behavior in JavaScript.

Needless to say, we covered a lot of ground in the last two posts on functional programming. If you have been following through my series on functional programming, give yourself a pat on the back. Great job!

If you don’t know what functional programming is, read an introduction to functional programming before proceeding. I also recommend reading my post on map (link attached in the first sentence of this post) and going through the exercises.

You need to understand how map() and forEach() works on an intimate level to get the most out of this tutorial.Continue reading

Quick Sort Algorithm | Language Agnostic QuickSort Guide

The quick sort algorithm (sometimes known as QuickSort or partition-exchange sort) is a very useful sorting algorithm that employs the divide and conquer approach.

Before proceeding, if you do not understand how the merge sort algorithm works, I recommend reading up on how the merge sort algorithm works before proceeding.

This will help you conceptualize the quick sort much more quickly.

Other topics that will help you conceptualize the quick sort algorithm include a knowledge and understanding of how recursive data structures such as the binary search tree works.

Once again, this post will be language agnostic. I will be writing out the logic in pseudo code so that regardless of programming language, you will be able to follow along.

At the end of this post, the source for the quick sort algorithm will be provided in JavaScript, C++, Java and Python.Continue reading

JavaScript ES6 The Best Parts

JavaScript ES6 has revolutionized the programming language, adding new features that make the language better suited to handling a variety of cases, especially after JavaScript can now be run on the server via Node.js.

For each JavaScript ECMAscript 6 (henceforth, referred to as ES6) features, I will be explaining exactly why I believe that the mentioned feature is a great addition to the language.

For now, I am going start off with 5 features (there are a few more that I want to add to the list, but those will come in the near future).

This post is meant to be a summary of what I think are the best parts of ES6 and a summary of why I think it is. Therefore, unlike most of my other posts, I will not be diving into the specific behavior, theory and idiosyncrasies of each of the features mentioned in this post.

For the aforementioned reason, I would like to point out that this is not a detailed guide on each of these new ES6 features.

Rather, it is a overview of what I think are the best features that were shipped in ES6.

Continue reading

Understanding Recursion in JavaScript with Confidence

Understanding recursion in JavaScript is not only considered difficult, recursive function calls in it of itself have a bad rap to its name. Some people go far as to even dub it as the unnecessarily memory intensive and complex version of a for/while loop. Okay, I may have slightly exaggerated the aforementioned statement. Before proceeding, I want to debunk the following beliefs that

  1. Recursion is impractical.
  2. It is something that I will never fully understand.

First of all, recursion is not impractical. It may be difficult to understand at first, but this is why I wrote this post. To bring clarity to this issue. Recursion is a great way of breaking a big problem into smaller, identical problems. Thus, it brings greater clarity to the readers of the code.

Before proceeding however, I recommend that readers brush up and study the following topics.

  1. The stack data structure.
  2. JavaScript functions.
  3. Variable scope and hoisting.

The language of choice for this tutorial will be JavaScript. On demand, I am also more than happy to write out the source code examples in either Java or C++.

Objectives

By the end of this post, I hope that the readers will

  • Have a deeper understanding of recursion in JavaScript.
  • Understand cases or problems where a recursive function would be a great tool to use.
  • Utilize recursion to make newly written/existing code more readable.
  • Identify and distinguish between good and bad use of recursion.

Continue reading

Learning New Programming Language – Python

​Hey guys, just wanted to share about my personal experience learning a new programming language.

On Wednesday evening June 15, 2017 (GMT +9), I took my first baby step towards learning Python.

You might ask why?

A friend of mine, who is also a programmer asked me if I wanted to try the data analyst Udacity Nanodegree.

I wanted to learn Python, mainly because of its rising popularity.

But then again, there is also TensorFlow. I also wanted to delve into machine learning and AI as well.

In this post, I want to share about my personal thoughts and feelings regarding my experience learning Python or a new programming language.

Continue reading