[ Content | Sidebar ]

Archives for Programming

detailing carpets

I’ve been on a bit of a Christopher Alexander kick for the last couple of years. At first, I started reading his most famous books, but those were good enough to leave me curious about what else he’d written. Not all of which is great, but enough is to keep me going. Still, it’s taken […]

random links: july 28, 2007

Ayse Sercan’s thesis work sounds really cool. I’m just linking to this list of Ruby techniques so that I’ll be able to find it a year from now when I’m in a position to better use it. More good stuff from Karl on copyright. Rice paddy art. Echochrome looks like an Escher video game. Quite […]

xml, html output

My HTML output class is now at what I expect to be a reasonably stable state. It’s not by any means a perfect solution for the world’s HTML needs, but it can generate the output that I want without much excess typing, which is all that matters. Actually, it divided into two classes this morning. […]

generating html output

One decision that I had to make when doing the HTML output part of my book database: should I roll my own HTML generator, or use somebody else’s? I ended up going the ‘roll my own’ route, partly because it sounded like more fun, and partly because it would be easier to get the acceptance […]

array.join

I was missing Array.join: class Array def process_and_interpose(initial, middle, last) initial + (map { |i| yield i }).join(middle) + last end end

switched over to ruby version of the cli tool

I’ve switched over to using the Ruby version of the CLI tool for editing my book database; works great, as far as I can tell. Short, too: panini$ wc -l *.rb 9 author_writer.rb 18 book_writer.rb 11 closeable.rb 24 compound_author_writer.rb 21 connected_database.rb 30 connected_insert_row.rb 24 connected_result.rb 36 connected_result_row.rb 37 connected_table.rb 26 connected_write_row.rb 60 date.rb 21 decoder.rb […]

weinberg on incremental construction

I’m a fan of authors on construction whose works I can read in a programming context. On a related note, here’s a bit from Gerald Weinberg with a building/programming analogy that I like. (Quality Software Management, v. 4: Anticipating Change, pp. 216–217: Imagine building a house by bringing all the parts to the lot, then […]

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) + (i != length – 1 ? middle : last) end end end I’d extracted the latter method not because I thought […]

parenthesized_list revisited

I previously lamented this code: def parenthesized_list(array) list = “(” first = false array.each do |element| if (first) list += “,” else first = true end list += yield element end list + “)” end I still haven’t found a magic bullet in Enumerable or Array which will let me dramatically shrink it. But I […]

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 about […]

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 aesthetic than […]

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 say […]

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 I’m […]

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 the initial resume […]

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 this […]

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 so-so, […]

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 at a […]

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.