The amazing adventures of Doug Hughes

Archive for February, 2017

What is Java?

This is an article I wrote for my Java class at The Iron Yard. It’s being published here with permission.


Writing Software in Java

To write a program is to “speak” in a language a computer can understand. We don’t actually “speak” to a computer, but we can write messages that it can understand. These words aren’t in a natural language, though. Instead, they’re in a programming language.

My class at The Iron Yard is primarily about the programming language Java. Java is just one of hundreds of programming languages, but it has the distinction of being the most popular.

To a fresh eye, programming languages often look like gibberish. For example:

int total = scores.stream().mapToInt(Scoreable::getScore).sum();
return total / scores.size();

This Java code could be translated into english as something like, “Calculate the average score from a set of scores.” This example is intended to illustrate a point: Java isn’t english.

(more…)

Getting Help

This is an article I wrote for my Java class at The Iron Yard. It’s being published here with permission.


Getting help

Often you will run into problems where your debugging strategies just don’t give you anything useful to work with. In these cases, you have to turn to other resources.

Craft a good question

The first step in getting help is to figure out the correct question to ask. Vague questions don’t lead to specific answers.

Instead of saying “when I click this button, it doesn’t work,” explain what you hoped it would do and what it actually does. To do this, you have to understand what it is you’re actually trying to accomplish. It might be a surprise to realize that sometimes you don’t know this. (more…)

Debugging Tools and Strategies

This is an article I wrote for my Java class at The Iron Yard. It’s being published here with permission.


If debugging is the process of removing bugs from code, then what is programming?

Undoubtably you’ve already run into a few bugs in your code. Figuring out the cause of these problems can be a frustrating and tedious experience. But, it can also be incredibly rewarding. There’s nothing quite like the feeling of finally squashing a particularly challenging bug.

As a professional programmer, you’ll be spending most of your time debugging. It’s virtually impossible to write code that works perfectly the first time. In fact, code that appears to work correctly on the first test will probably start to set off your mental alarm bells. The worry being, “what am I missing?!” (more…)

Tag Cloud