Sign in

code
code

Be the Best Bug Hunter in the JavaScript Universe

Do you ever wonder why your app isn’t doing what it’s supposed to?

I do, but only ALL.THE.TIME…

I have found it’s often a “handshake failure,” when some item of data being OVER HERE is passed so it can be used OVER THERE and something gets lost, overwritten, marked as the wrong data type, etc.

So, of course we use lots of “print” or “console.log” statements to log the data so we can compare what IS there with what we EXPECT to be there.

If you do this enough, you end…

train in siberia
train in siberia

I just attended a meeting on workplace diversity. One of the topics was “emotional tax,” basically the idea that it can be exhausting being “the only one of your kind” in an environment.

In the US, I’m pretty fortunate, being an educated, native-born, upper-middle-class white man. It’s rare that I’m the only such person in the room, and even when I am, I usually get a baseline level of respect.

Also, I don’t get a lot of requests to explain my culture, my hair, my clothes, why “my people” do things a certain way, etc…

But I have experienced this…

Developer Life

My Opinions

I was recently challenged by a co-worker to state my values and opinions as a developer, as part of my growth from a junior developer to an experienced developer to a team leader. Here is what I came up with. As always, this is a work in progress, and my values and opinions may be completely different at a different stage in my career. That said, here we go…

Pragmatism: There is a joke that a programmer is someone who will spend hours writing a script in order to avoid minutes of data entry. I get it, I…

So, I’ve been doing Test Driven Development for over three years now (Thanks Kent Beck!) and I have the basic cadence down:

Write a failing test that reflects a small step forward in developing the feature.

Write the implementation that makes the test succeed.

Refactor the code and make it cleaner.

Also known as Red-Green-Refactor.

This week, I had to REMOVE two already deployed features from some code (don’t worry, they are going to be added back into a different module in the same application later). …

Have you ever had something important to say, but couldn’t get your point across? You explain it once, and again, you try to diagram it, or use metaphors, or add detail, and the other people just don’t see it?

This is not me. This guy has better hair than I do…

This happens to me more than I would like. Am I surrounded by stupid people? No, I am actually surrounded by intelligent, thoughtful people, so I know that’s not it. And the common denominator here is me.

This situation played out when I was new to my job. We were writing some code that got some data from a database, and…

Yesterday, my pair and I spent several hours banging our heads over why ThymeLeaf was not importing some data into an HTML template. Maddening. Just made no sense. Our code looked like this*:

<tr th:each=”listed-company : ${listed-companies}” th:id=”’row’ + ${listed-company.id}”>

The data object passed by Java to Thymeleaf was called “listed-companies” and it was full of great data, that was NOT appearing in the page, and throwing an error to boot…

Then our senior team lead took one look and suggested that the name we were using for the data object might be the problem.

Perhaps Thymeleaf saw that hyphen…

OK, this was an impressive boo-boo, so much so that it deserves to be immortalized. I was moving a file from one directory to another, like this:

mv bigdir/littledir/filename.txt newbigdir/newlittledir/filename.txt

My pair noted that I could replace the filename with a period, so I wouldn’t have to type it all out, like this:

mv bigdir/littledir/filename.txt newbigdir/newlittledir/.

Great, I like saving time and effort. So when it came time to do a similar operation, what did I do? I did THIS:

mv bigdir/littledir/filename.txt newbigdir/newlittledir/*

See that little star? The one that is NOT a period? Guess what happens when you run…

Anyone who has finished a dissertation is a BAD ASS with personal and organizational skills that your company would be lucky to get.

You may think that the PhD after my name means I’m a pointy-headed academic who can endlessly quibble over trivia without accomplishing anything “real.”

You may think that PhD after my name makes me think I’m smarter than you, or better than you.

You may think that PhD means I know a lot of obscure facts that have little use outside of academia.

You’d be right about the last one, but wrong about the first two.

A…

During graduate school, I often worked as a carpenter during the summer. Carpenters spend a lot of time measuring, marking, and cutting wood so that it fits just right into the structure or space.

Sometimes we needed to make many pieces of a certain shape and size. In those cases, rather than measure, mark and cut each piece of wood separately, a very time consuming process, we would build a “jig.” This jig could be attached to the wood we were cutting, and it would guide our blades so that we could cut faster, and cut each piece identically, a…

David Kaiser

Collector of Photons; Wrangler of Parentheses; Language Guy (Human and Code)

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