[ Content | Sidebar ]

Archives for Programming

go refactoring!

In our last installment, we had this code:

def parenthesized_list(array)
array.process_and_interpose(”(”, “,”, “)”) { |element| yield element }
end

class Array
def process_and_interpose(initial, middle, last)
inject_with_index(initial) do |memo, element, i|
memo + yield(element) + [...]

parenthesized_list revisited

I previously lamented this code:

def parenthesized_list(array)
list = “(”
first = false

array.each do |element|
if (first)
list += “,”
else
[...]

ruby talking to mysql

My current programming project at home is to port my dbcdb code from Java to Ruby. So far, I’m working on porting over the CLI tool, which lets me update the database to add books that I’m reading, update information about them, etc.
Until today, I’d been using a fake database abstraction that I made [...]

sun street cred

One other fun thing about the Fowler-DHH interview that I mentioned recently: about 37 minutes into the podcast, the conversation turns to large companies and their involvement in open source in general, Ruby in particular. They initially start off dubious about the concept, with Microsoft as their example, which made me wonder “hey, what [...]

isolated podcast episodes

I recently ran into a couple of interesting episodes (if that’s the term) of podcasts that I don’t regularly listen to. Hanselminutes had an interview with Martin Fowler and David Heinemeier Hansson; great stuff. Lots of good talk about design, beauty (I didn’t know that Japanese Ruby code apparently has a rather different [...]

i love ruby

Recent non-work programming projects: I’ve been getting back to working on dbcdb, converting the database editing part from Java to Ruby. And, last Tuesday, BayXP had a hands-on session where we all did some pair programming getting us exposed to Behavior-Driven Development in Ruby. (See the RSpec web page.)
I don’t have much to [...]

weinberg quotes

I’m in the middle of rereading Gerald Weinberg’s Quality Software Management series, which is motivating me to type various quotes on mailing lists that I’m on. Not sure that they’ll do much without the context (actually, I have no reason to believe that they did much for anybody even with the context!), but if [...]

rejection in person; printf debugging

One of the least pleasant aspects of hiring is rejecting candidates. (More actively unpleasant for them than for me, to be sure.) It’s something which, until recently, I did almost exclusively over e-mail.
Sometimes, rejection over e-mail makes sense. I typically put candidates through up to three stages of filters. (Not counting [...]

misplaced hiring confidence

A bit from Bob Sutton’s Weird Ideas That Work (pp. 59–60) that caught my eye:
People sometimes get annoyed when I say job interviews are a weak, often useless, way to select new employees. I’ve had executives, middle managers, engineers, scientists, lawyers, a fire chief, and a minister respond with anecdotes that “prove” how skilled [...]

the recipient can arse it

I was looking at the HTML version of the HTTP standard on the W3C web site today. Apparently there’s a bug in their text-to-HTML conversion program, causing some words to lose their initial letters. Which led to this:
4.If the message uses the media type “multipart/byteranges”, and the ransfer-length is not otherwise specified, then [...]

streamstar launch

I had the pleasure of going to the StreamStar launch in New York. In a private jet, no less; Sun execs occasionally take them, Fowler was using one to get to the launch, and the rest of us got to tag along.
Which was fun. Not a transcendent experience or anything: the food was [...]

streamstar details

As promised, here’s some more information about StreamStar. (Which is officially known as the “Sun Streaming System”.) It’s an extremely high performance video server, targeted at cable companies and telcos trying to move into the video space; its distinguishing features are that it can pump out an extremely high number of video streams [...]

we’ve launched!

The product that I’ve been working on for the last four years has launched! I am very excited. I will blog more later; nice to be able to finally talk about this.

at rest with attributes

[ I apologize for all the acronyms in the first paragraph of the post. I will explain what one of them means over the course of this entry, but if you're here for, say, video game thoughts instead of technical geekery, then you would be correct in interpreting that as a sign that you [...]

mike cohn on estimating and planning

Last week, I went to a talk by Mike Cohn on “Agile Estimating and Planning”. Good timing: I’d been thinking that I should get around to reading his book on the subject. Which I won a copy of at the drawing after the talk; apparently my recent remarkable good luck has (correctly) decided [...]

don’t broadcast information

A quote from Morgan and Liker’s The Toyota Product Development System:
Toyota does very little “information broadcasting” to the masses. Instead, it is up to the individual engineer to know what he or she is responsible for, to pull what is needed, and to know where to get it.
Here’s the full context (pp. 95-96; [...]

random links: february 11, 2007

I didn’t realize it was possible to beatbox while playing the flute.
Gyoza stadium sounds awesome.
Star Wars in ASCII.
I spent a pleasant hour last weekend watching Ben and Fitz’s poisonous people talk. (And then caught myself exhibiting one of those symptoms on a mailing list last week. Sigh…)
I suppose you’ve already seen Peter Gutmann’s [...]

miranda, age seven

Miranda’s reading rather more comfortably now than she was in the past; at least partly because of this, she’s noticeably expanded the range of her desired sphere of competence.
Examples:

We’re finally letting her play Animal Crossing, because she’s reading well enough that she won’t constantly be nagging us to help her play. And she really [...]

ruby notes 5: sql libraries

One of the things I need to do in Ruby is read and update data stored in an existing SQL database. Not wanting to reinvent the wheel, I thought I’d look at existing libraries that provide this functionality. The pickaxe book didn’t give anything useful, but I saved some posts in a newsgroup thread on [...]

ruby notes 4a: overloading constructors

An addendum to my note from earlier today: the constructor problem is more annoying than I’d thought, because (as I just discovered!) the static constructor method is harder to carry out than I’d realized. After all, the static constructor method still has to create an object of the type in question, which means that it [...]