Subscribe to ...considered harmful        RSS Feed
- - - - -

Ninjas and Black Belts

Icon Leave Comment
I'm often surprised by the number of times people say they're looking for a "ninja" of some sort. I generally have to wonder if these people really have any idea of what they're asking for. After all, ninjas are shady characters who come in out of the dark, kill someone, and leave. This is not something I want happening in my...
- - - - -

Some Useful Books for Developers

Icon Leave Comment
Everyone has a list of great books on software development.

Roland Huntford: The Last Place On Earth.
Scott and Amundsen's management styles present an important contrast. Particularly when you realize that one of these men succeeded in reaching his goal on time, and the other failed to meet his goal and left a number of his men dead along...
* * * * *

Some Notes On R: A Dialog

Icon 2 Comments
When beginning R, the user should expect a number of gasps of disbelief, face-palm moments will not be uncommon, and occasionally the responsible programmer will be tempted to take the language out back and shoot it in the head.

I'll get much of this reaction out of the way for you in one line:

- - - - -

Java: "Why isn't my input inputting?"

Icon Leave Comment
One of the most common beginner traps in Java is the behavior of the "convenience" methods of the Scanner class. The usual scenario is this: the assignment is to write code accepting inputs of various types and process those inputs in some fashion. For example the assignment might be to prompt the user for a String, a substring, an...
- - - - -

Switch Statements in Java

Icon 2 Comments
It has come to my attention, both here on DIC and in the real world, that many programmers do not actually know that there is a difference between a switch statement and a string of if-else clauses. This seems worthy of correction. You may have been told at some point in your path to becoming a developer that a switch statement is "just like...
- - - - -

The Easy Way

Icon Leave Comment
Just to clarify: "the easy way", in the real world, is the way that you can get done, and up and running, immediately. "The easy way" is not the way that would be easier if you just figured out how to do it - don't go down that rabbit hole!
If you have to choose between the clever way and the way you know, do it the...
- - - - -

Everything is done wrong

Icon Leave Comment
Everything in software is done wrong. This is because, by the time you know how to do it right, you've already done it. The only exception is when you do the same thing over and over - and that's a DRY violation, and so wrong by definition.
- - - - -

Dynamic Programming Example: Nim

Icon Leave Comment
Inspired by Tom Morley's Combinatorial Games course, I've whipped up a tiny little solver for one of the combinatorial games. This might be a useful case study for anyone curious about the Dynamic Programming paradigm for algorithm design.

The code is up at github...
* * * * *

How to think about finding primes

Icon 9 Comments
Finding primes is a common exercise in programming, and for good reason: it's a good exercise that combines mathematical thinking with programmatic thinking. The exercise comes in various forms, most commonly "find the nth prime" or "find the first n primes". Also common is "find all primes less than n". It turns...
* * * * *

++ considered hazardous

Icon 2 Comments
The postincrement (++) and postdecrement (--) operators (hereafter called "postinc" and "postdec") are a perennial source of befucklement for new and intermediate Java programmers. In particular, people get snagged on complex exp...

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

May 2021

91011121314 15


    Recent Entries

    Recent Comments

    Search My Blog

    1 user(s) viewing

    1 Guests
    0 member(s)
    0 anonymous member(s)