Blog - Arthur Dick

The Sneaky Side of Zero

Friday, May 17th, 2024

In the vast landscape of programming languages, JavaScript stands out as one of the most widely used and versatile languages, powering much of the web as we know it today. However, beneath its seemingly straightforward syntax lies a potential pitfall that many developers often overlook – the importance of specifying the base when working with numerical values. Today, we'll explore this crucial aspect through the lens of a peculiar example: 052.

At first glance, 052 may appear to be a simple numeric value. However, its interpretation can vary drastically depending on whether the base is specified or not. In JavaScript, numerical literals prefixed with '0' are treated as octal (base 8) numbers. Let's delve into the implications of this behavior:

Read More...

Tags: software developmentoctal

Code With Comfort

Friday, May 3rd, 2024

For software developers, spending hours pounding away at keyboards is practically a rite of passage. While the passion for coding burns bright, the toll on our hands and wrists can be undeniable. In the quest for efficiency and comfort, many developers have stumbled upon a hidden gem: the Dvorak keyboard layout.

Dvorak, designed in the early 20th century, is an alternative layout that rearranges the keyboard to place the most frequently used letters on the home row, minimizing finger travel and strain. This blog post delves into the potential benefits of Dvorak for software developers, exploring its impact on speed, accuracy, and ergonomic comfort.

Read More...

Tags: dvorak keyboardergonomics

Battling the Memory Monster

Friday, April 26th, 2024

Have you ever been happily coding along, querying your database with trusty PDO, only to encounter a cryptic Fatal error: Allowed memory size of 134217728 bytes exhausted error? It can be a real head-scratcher, especially when you're dealing with what seems like a reasonable amount of data. Well, the culprit might be hiding in plain sight: PDO's default buffering behavior.

Read More...

Tags: phppdo

What's in a Name?

Friday, April 19th, 2024

In the grand language of code, variables, functions, and classes play together to create the symphony of our programs. But what makes the music clear and beautiful? Just like a well-written piece relies on each note, the readability and maintainability of code depend heavily on one crucial element: naming.

Sure, you can technically name a function "doStuff" and a variable "temp," but future you (or any poor soul collaborating with you) will be left scratching their heads. Meaningful names are the cornerstones of clean code, and in this post, we'll delve into why they matter and explore best practices for crafting names that sing.

Read More...

Tags: software developmentclean code

Thriving in Silence

Friday, April 12th, 2024

The stereotype of the programmer as a lone wolf, toiling away in a basement lit by a single monitor, holds a grain of truth. But for introverts like myself, this isn't some caricature - it's our happy place. While the world of programming might seem extrovert-central, filled with collaboration, meetings, and code reviews, introverts can not only survive but thrive in this field. In fact, I'd argue that our introversion grants us unique strengths that make us valuable assets to any development team.

Read More...

Tags: software developmentintroversion