Jay McGavren's Journal

How a Head First author spends his days off

View on GitHub
2007-03-27

Watching the Propellerheads Reason tutorial videos… If the thoughts a person can have are shaped by the language they speak, then Reason is the language of electronic music (or, at least, a major dialect). Just learning a bit about the tools of the trade teaches you volumes about why music sounds the way it does.

Read more...
2007-03-26

Wisdom...

Here’s some important stuff I have learned the hard way, or have read and believe to be true.

Be cool. Be nice. Winners focus. Losers spray. [Not mine.] No matter how far you’ve gone down the wrong road, turn back. [Not mine.] People are selfish. Projects that fight this fail. Projects that harness this succeed. 10% of people are assholes. 10% of people are really nice. Be brief. Latency happens. [Not mine.] Failure happens. Maliciousness happens. The last 20% of the work requires 80% of the effort. [Not mine.]

There’s probably more to be added here…

Read more...
2007-03-22

Me, working in Java: “God dammit. God dammit… GOD DAMMIT!!!” Me, working in Ruby: “Hey, neat. Hey, neat! Whoa, COOL!”

Read more...
2007-03-20

Also...

> [wscompile] invalid element “configuration” in > configuration file (line 2)

Read more...
2007-03-19

Shameless e-mail copy-paste!

> We’ve been encommunicado for a while, so just wanted to let > everyone know we’re doing well… > > Jeremy is growing at an amazing (alarming?) rate, > approaching 9 pounds now. The difference from the delivery > pictures is noticeable. (I’ll get new ones posted soon.) > He’s been pulling himself up on his arms to look around > since almost day one, something he’s not supposed to be > able to do for a couple months. (Still kinda wobbly, > though.) > > Sleep is still a rare commodity at the house, with Diana > losing the most thanks to feedings. She’s been a real > trooper, though, and of course I try to pitch in with the > bottle when I’m not at work. Every now and then the baby > will sleep 4 or 5 hours at a stretch, which is a welcome > respite. Mom and Dad have each made trips here, and both > have been huge helps, as has Judy. > > Anyway, that’s us. How are all of you? News from the > outside world would be nice, as we don’t get to see it that > often these days. :)

Read more...
2007-03-16

Ruby yield is cool.

Before:

	#Find playlist by name and add to list.
	if config.has_key?('playlist')
		config['playlist'].each do |name|
			playlists.push(interface.LibrarySource.Playlists.ItemByName(name))
		end
	end
	#Create playlist and add to list.  [Note the near-identical code.]
	if config.has_key?('create-playlist')
		config['create-playlist'].each do |name|
			playlists.push(interface.CreatePlaylist(name))
		end
	end
	#...etc.

After:

	#Invoke a block with each of the values for the given option in the given configuration.
	def with_option_values (key, config)
		if config.has_key?(key)
			config[key].each do |value|
				yield value
			end
		end
	end
	#Find playlist by name and add to list.
	with_option_values('playlist', config) do |name|
		playlists.push(interface.LibrarySource.Playlists.ItemByName(name))
	end
	#Create playlist and add to list.
	with_option_values('create-playlist', config) do |name|
		playlists.push(interface.CreatePlaylist(name))
	end

…Two completely different operations, but with yield and blocks, I’m able to remove the boilerplate around them. Multiply that across a dozen similar sections of code, and you start to see real readability improvements.

Read more...
2007-03-16

Gee, thanks for the info.

1) Failure: test_delete_playlists(TestItch) [src/test/ruby/test_itch.rb:128]: <false> is not true.

Read more...
2007-03-09

Wow. My inbox at work is actually empty. Considering I’m a David Allen acolyte, this should be an everyday occurrence, but it hasn’t been for months.

It really is a relief, though. Maybe this will motivate me to do the same at home.

Read more...
2007-03-09

Got the XBox 360… Not only have I not purchased any games on an actual disc yet, I don’t really care. Everything I’m playing has been downloaded to the hard drive (some actually purchased, some just demos).

I’m actually annoyed at the prospect of having to go pop a disc in once we buy something bigger. Downloads are definitely the future.

Read more...
2007-02-28

Diana’s got A Rush of Blood to the Head playing via the Tivo… Jeremy listens intently while the music’s playing but then starts hollering again whenever it stops.

Well, Death Cab had an obvious calming effect while he was in the womb, so I guess this shouldn’t be too surprising.

Read more...
Copyright © Jay McGavren.