Every command I enter on my computer is written to a log file. These logs have come in handy countless times; I tell anyone who will listen to save their logs too. My inspiration for doing this came from this atomic object post many years ago, and I am so glad I followed their advice. […]
Archives for March 2023
Javascript map function
The javascript map() function takes in a callback function, applies that callback function to each element of an array, and returns a new array containing the results. Many languages have a map function, and they all behave roughly this way. Javascript map basics map() accepts a single callback function, and passes each element of the […]
Javascript forEach
Javascript’s forEach method is one of its basic array methods, and it’s used all the time. It does as its name suggests, and performs a function for each element of an array: In the function above, I only accessed one argument, item. However, forEach actually makes 3 arguments available to its callback function if you […]
Python for loops
For loops in Python are one of many features that make Python so popular; they’re as close to plain English as you can get when writing software. They generally look like this: What is an iterable? According to the Python docs an iterable is: An object capable of returning its members one at a time. […]
Pointers in Go
If you’re used to working in dynamic languages like Javascript, Ruby, or Python, Golang feels very different. One of the big differences is the explicit use of pointers. You might find yourself asking these questions: I have practical answers! Golang ampersand & and asterisk * Obtain an address with & Let’s start with &. It […]