June 12, 2009

On Programming

Here's some quotes, mostly pulled from here.

The difference between a Designer and Developer, when it comes to design skills, is the difference between shooting a bullet and throwing it.

Scott Hanselman

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.

Brian Kernighan

On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.

Charles Babbage

Beware of bugs in the above code; I have only proved it correct, not tried it.

Donald Knuth

Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem.

David Wheeler

Read More......

May 7, 2009

Simon .NET

So I got it into my head today that I'm going to build my own Simon game.

It should be relatively simple, to start with anyways. I'll start with 3 basic pieces, 1-2 of which are most likely going to be re-used.

  • A Simon Generator/Validator: really simple. Pass it the round number and it generates an random sequence of that many buttons. Pass in the sequence it sent out, plus the sequence the player it, and it verifies that the sequence matches.
  • A game logic piece: this will control starting/ending the game, flashing the lights/making sounds at the start of the sequence, validating the user's input in-place and using the validator piece whenever it thinks the user's turn has ended.
  • A GUI. 4 colored buttons that can flash and accept user clicks, plus a start game button and difficulty selector. Possibly also a game-mode selector, if I choose to to implement more that just the most basic game mode.
Here's the slightly insane part: I want to take this basic stuff and expanded it into a fully-logged, fully-networkable game. Play against your friends or play in ladder tournaments. That's the really crazy part.

Anyways, I plan on attempting to do this with TDD, or at least building some unit tests along the way. Wish me luck!

Read More......

April 9, 2009

Programmer Rage

Long time, no post. I'm currently prompted by a comment I saw today - I'd rather not say where - regarding a change-over from a deprecated method to a new one offering greater functionality. I'd mentioned that I'd noticed the change due to the "squiggly" lines - the lines that Visual Studio uses in its text editor to indicate that there's an error or informative message about the code so underlined.

The response? "We don't code by the 'squiggly lines' down here."

You know what? Neither do I, but I listen to what they say. In case of errors, especially - unless I'm expecting the lines and am immediately doing what will correct them. If it says, "Hey, this method is deprecated, go use this other one," I check to see if the new method will work for my purposes (i.e. it replicates or replaces all of the exact functionality of what the method I was using) and if it does I change the code. If it doesn't my reaction depends on where the reference comes from: if I know the developer, I may ask them directly what they plan to do about what I was using the method for; if I don't, or the developer in question is a team at Microsoft, then I may have to resign myself to finding another alternative.

In fact, I might pay too much attention to squiggles, but I only say that because it seriously bugs when I see the lines. It's the perfectionist in me going, "It doesn't think my code's correct - why?"

Anyway, I needed to vent.

Read More......

September 2, 2008

"Future Says Run", by Tonic

Holding lightly
Words that make you aware
Your head's spinning
No one knows you're not there
Blankly staring
Strangers call you a friend
The power you hold
Is a power that mends

You can't go on
No you can't even talk
Your future says run
But you can't even walk

So you harbor
Standing idly by
Indiscretions, slowly turn into lies
You're half empty
They don't know how it feels
The power inside
Is a power that heals

But You can't go on
No you can't even talk
Your future says run
But you can't even walk

Read More......

August 25, 2008

"The Future Soon" by Jonathan Coulton

Last week I left a note on Laura's desk
It said I love you signed anonymous friend
Turns out she's smarter than I thought she was
She knows I wrote it, now the whole class does too

And I'm alone during couple skate
When she skates by with some guy on her arm
But I know that I'll forget the look of pity in her face
When I'm living in my solar dome on a platform in space

Cause it's gonna be the future soon
And I won't always be this way
When the things that make me weak and strange get engineered away
It's gonna be the future soon
I've never seen it quite so clear
And when my heart is breaking I can close my eyes and it's already here

I'll probably be some kind of scientist
Building inventions in my space lab in space
I'll end world hunger I'll make dolphins speak
Work in the daytime, spend my nights and weekends

Perfecting my warrior robot race
Building them one laser gun at a time
I will do my best to teach them
About life and what it's worth
I just hope that I can keep them from destroying the Earth

Cause it's gonna be the future soon
And I won't always be this way
When the things that make me weak and strange get engineered away
It's gonna be the future soon
I've never seen it quite so clear
And when my heart is breaking I can close my eyes and it's already

Here on Earth they'll wonder
As I piece by piece replace myself
And the steel and circuits will make me whole
But I'll still feel so alone
Until Laura calls me home

I'll see her standing by the monorail
She'll look the same except for bionic eyes
She lost the real ones in the robot wars
I'll say "I'm sorry", she'll say, "It's not your fault...
Or is it?"
 
And she'll eye me suspiciously
Hearing the whir of the servos inside
She will scream and try to run
But there's nowhere she can hide
When a crazy cyborg wants to make you his robot bride

Well it's gonna be the future soon
And I won't always be this way
When the things that make me weak and strange get engineered away
It's gonna be the future soon
I've never seen it quite so clear
And when my heart is breaking I can close my eyes and it's already here

Read More......

August 18, 2008

More Mad Men

Read More......

August 13, 2008

Update?

Yeah, so I've been slacking. I think last week really drained me and I haven't been able to/haven't felt like updating. It's kinda crazy, really.

  • Braid is a pretty cool puzzler if you have an Xbox 360 and patience with platforming puzzles.
  • Empire Builder is a pretty cool board game, and if you're interested in a not-quite computer adaptation you can find someone's homebrew game Rails.

Read More......