[ Content | Sidebar ]

Archives for Programming

finished converting dbcdb to ruby

I’ve finally finished converting dbcdb from Java to Ruby. I’ve been using the Ruby version of the tool to write the database for about four months, but I’d still been using the Java version to write the web pages.
Nothing too deep going on here; I was actually done with everything but the indexes as [...]

agile open california: the sessions

And now to some actual content from Agile Open California. As I mentioned before, I hosted a session called I Don’t Like Pair Programming, since the topic had been on my mind after our team meeting the previous week.
The title isn’t really accurate: I usually enjoy pair programming when I’m doing it, but my [...]

random links: october 6, 2007

Deterministic and probabilistic software product management.
Pen tricks. I’ve been doing what he calls “the helicopter” for decades (though in a slightly different way); obviously I have more to learn.
Beautiful movies. (Sorry about its non-embeddable nature, and for all the talking and the fact that it’s an ad; I couldn’t find anything [...]

game pictures

Apologies for my recent silence; the cause is a combination of watching movies (well, DVDs, mostly Last Exile) and being pretty busy last weekend. But now I am, for once, caught up with my other odds and ends (i.e. reading blogs) early enough at night to actually be able to write something.
As I mentioned [...]

random links: august 26, 2007

Ninja Town. I love the character names.
A great video review. (Even though it’s of a demo of a game I’ve paid no attention to.)
Tim Bray speaks sense on drugs. “Um, let’s see… the cost of pushing back a brutal ugly slow path to death is getting high from time to time. [...]

game development

For the last several months, Miranda has been repeatedly talking about ideas that she has for a computer game. I idly encouraged her without thinking too much about it; recently, however, she’s been actually filling up notebooks with designs for the game, so it looked like time to start getting serious.
She doesn’t show any [...]

ide assumptions

On the XP mailing list, somebody recently pointed out that never changing IDEs is a sign that you’re in a rut. Which is true; I love Emacs, but I love it less with more recent languages, so why not learn a bit more about what’s out there? Tim Bray recently posted about how [...]

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

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 the summary of the latest [...]

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

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

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, [...]

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