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

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.
- - - - -

How to think about finding primes

Icon 1 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...
- - - - -

The Programmer's Bookshelf

Icon Leave Comment
Following is a list of some titles that I've found beautiful or useful or both. I'm not gong to say much about them here, but they're all likely to give you interesting things to think about.

  • Introduction to Graph Theory (Richard Trudeau)
  • The Art of Computer Programming (Donald E. Knuth)
  • ...
- - - - -

"Write a code" considered painful

Icon 2 Comments
Pet peeve time: "code" in the software sense is a mass noun, not a collective noun. It has no plural. You don't eat "an oatmeal" or several "oatmeals", you eat oatmeal. In the same way, you don't write "a code" or "codes", you write code. If you mean a unified body of code that can be run...
- - - - -

dd considered terrifying

Icon Leave Comment
If you don't feel a little twinge of fear any time you start typing an invocation of dd, you should probably not have admin access to anything at all, including your refrigerator. dd is the primal Elder Sorcery of unix. It is absolutely terrifying in the raw power that it commands, and the utter disregard it shows for safety. Its very syntax...
* * * * *

Death Marches Considered Harmful

Icon Leave Comment
Some Lessons Learned...
- - - - -

My First Scala "Hulk Smash" moment

Icon 6 Comments
Scala has tuples. Great, I like tuples. Immutable sequences, quite handy.
Here's one:
scala> val triple = (1,2,3)triple: (Int, Int, Int) = (1,2,3)


Cool. So how do I get a value out of one of these guys? Like this:

scala> triple._1res6: Int = 1
...
- - - - -

How do you pronounce xBB?

Icon Leave Comment
I was recently reminded of this, which I originally posted in the xkcd fora some months ago, but I figured some DIC folks might enjoy it as well:

Binary, hex, and so forth are written (or coded, or otherwise nonverbal) systems for representing numeric values. Typically, if you need to express a numeric value verbally, you use decimal. If you need...
- - - - -

Murach's Java Programming, 4th Edition

Icon Leave Comment
A review of Murach's Java Programming (4th Ed.)
Joel Murach, www.murach.com
ISBN 978-1-890774-65-3


Murach's introduction to Java would make an reasonably good textbook in a lecture-driven course. The explanations of individual procedures are clear and simple. However, as a guide for self-study, it is lacking in important areas. There is...

  • (2 Pages)
  • +
  • 1
  • 2

Recent Entries

April 2014

S M T W T F S
  12345
6789101112
1314151617 18 19
20212223242526
27282930