Howdy! This is mostly stand-alone content, for greater context you can read more here.

Coding is fun! And coding can be very hard, the worst part is how beginner programmers can shoot themselves in the foot and make things harder than they need to be. One paradigm of coding that helps reduce errors in data transformation is functional programming. If done right it also makes code very testable, so if something breaks you can see where it broke easily.

If you want to learn what makes some code more difficult than others, read on!

let data1 = 'This is a…

One essential algorithm tool to have under your belt is where you identify the number of times a data point presents itself in some amount of data. This could be an array, or a string, or a complex Json tree you need to dig down into. If data comes into your function and you need to know how frequently each piece of data is repeated, this is the blog for you.

I’m doing this one in JavaScript because I love JavaScript, but you can do it in most languages that have loops and objects/sets/hashes.

let data1 = 'This is a…

Have you ever used a map, filter, or reduce function without thinking about it? Many of us who’ve been coding for a while have and we take it’s built in functionality for granted. I know I have. This is an appreciation blog for the wonderful functionality and components built into a coding language that I didn’t have build.

So one cool functionality I discovered built into the higher level functions of several JavaScript functions is the inherent index argument. Pulling the syntax for first three enumerable functions I learned from mozilla…

let newArray =[, index[, array]]) {

Two thirds of the way through this saga we have an avatar that moves around a screen, bumps into the edges of the screen, and has a single object that it “knows” is there and bumps into.

The last part of this is the most epic! For those of you who’ve stayed with me it’s been worth the wait. Remember in part 2 where I said ignore the forEach and objectArray part? Ignore them no longer. …

Alright, so abstraction is an incredibly powerful tool we all should respect what does that look like in code.

Well I had one point of origin I was using for my avatar the bottom left corner, why? :shrugs: Had to start somewhere. So my movement code looked like this.

function moveavatarDown() {  let bottomNumbers ="px", "")  let bottom = parseInt(bottomNumbers, 10)  if (bottom > 0) { = `${bottom -4}px`  }}function moveavatarLeft() {  let leftNumbers ="px", "")  let left = parseInt(leftNumbers, 10)  if (left > 0) { = `${left -4}px`  }}

You can imagine…

During my journey into coding, I’ve felt like a small child handed a rubiks cube, given a cursory explanation of what the box is and what the colors are, and the objective is to make the colors of each side the same. Sure I “know” everything now, but can I solve the puzzle?

The project I wanted to create was an arcade where I could continue to create games for my own entertainment and edification. To do that I needed to create an avatar that could walk around the arcade. I knew how to do that create an HTML element…

Allen Lea

A software engineer living in lonely world! He took the midnight train going anywhere.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store