Posted: November 13th, 2006 | Author: admin | Filed under: Books | View Comments
I’m deep into John Kelly’s The Great Mortality. I’ve found it to be an incredibly engrossing account of the most tragic and heartbreaking medical disasters to befall mankind. I think the power of Kelly’s account lies in his deft use of historical quotes from people who suffered through the events like Agnolo di Tura of Italy:
I , Agnolo di Tura, called the Fat, buried my five children with my own hands.
Heartbreaking. Simply heartbreaking.
Tags: books
Posted: October 22nd, 2006 | Author: admin | Filed under: Ruby | View Comments
I’m tired of Java. I’m tired of Struts. I’m tired of rehashing the same technology and debates.
I’m tired of reading spaghetti code to tack on dynamic features onto a static language.
I’m tired of writing metric tons of boilerplate code to do the simplest things.
I’m tired of reading about hacks and more hacks to get around Java’s shortcomings.
I’m tired of persistence and logging being a PITA.
I’m tired of a lack of original thinking.
To quote the esteemed Mr. Huey Lews: “I want a new drug”
And I think I’ve found it – its called Ruby.
It sounds totally cliched but its totally true – Ruby has made developing fun again. The closest I’ve ever felt to this is the year of part-time Lisp and Scheme hacking I did. I’d still be doing that except for the dismal state of library support on just about any implementation.
Ruby fits the way I think and the way I want to write code. The level of expression that’s possible in Ruby blows my mind. I’m writing this from my hotel room at RubyConf (excellent conference, btw) and the one thing that continues to impress me throughout most all of the presentations is the richness and expressivity of Ruby. Inspired by Evan Phoenix’s presentation on Rubinius I decided to try my hand at implementing aspects in Ruby. After about six hours’ of start-stop hacking I have a basic prototype working:
require 'aspect'
#Original class before any aspects are applied
class Foo
def say_hello_to(name)
puts \"Hello, #{name}\"
end
def say_goodbye_to(name)
puts \"Goodbye, #{name}\"
end
end
# Let's re-open the class and add some aspects to it
# Three \"positions\" are supported: before, after, and around
class Foo
before :say_hello_to do |name|
puts \"Before say_hello_to\"
end
around :say_goodbye_to do |name|
puts \"Around say_goodbye_to\"
end
end
The implementation is ugly in spots and certainly doesn’t follow some of the dominant Ruby idioms. But I’m happy with its state given the short amount of hacking time and my newbie level knowledge of Ruby metaprogramming.
So, I’ll keep doing Java at my day job (for now) but I’ll be spending all my free time hacking in Ruby.
Posted: July 19th, 2006 | Author: admin | Filed under: Ruby | View Comments
I’m playing around with Ruby’s socket API and process management and ran into a sticky issue. I’ve got this code:
def run
@server = TCPServer.new(@addr, @port)
while (@keep_running)
client = @server.accept
pid = fork do
client.close
end
if pid
Process.detach(pid)
end
end
end
When call to client.close is left inside the fork block, it appears to either never execute or not have any effect. My testing client (simple telnet session) is not disconnected. If I remove the fork block and call close directly, the testing client is immediately disconnected. Hmmm…..
Posted: July 17th, 2006 | Author: admin | Filed under: Life | View Comments
I was at my local Barnes & Noble this afternoon picking up a couple of magazines when I overheard two of the cashiers talking. They were discussing how the store was going to downsize the kids’ area and relegate it to a small corner downstairs in the area normally reserved for clearance items. Apparently the change is to make way for a new Movies and Music area.
If there’s such a thing as bad serendipity, then this must be it. I was also at my local Borders just a couple of days ago with my daughter and noticed how much smaller the kids’ area had become. A carpeted bleacher seating area had been removed so the store could pack in more marketing schlock for the hot new movie. Cars, Superman, and Harry Potter related schlock seemed to be the flavors of the day.
My family tries to get to the bookstore a couple of times a month to restock on reading material. My daughter absolutely loves going and really looks forward to picking out a dozen or so books, carefully examining each of them, and then selecting the 2-3 she gets to bring home. Downsizing the area dedicated to kids makes the trips a little less appealing. We’ll still make them, but it won’t be as fun as it was. I just wish the few locally-owned book stores had a better selection so a trip to them could allow each of member of my family to find something.
Posted: July 7th, 2006 | Author: admin | Filed under: Life, Misc | View Comments
Been a while, so just a quick post to summarize a few things:
- Deadlines at work have eaten my brain – I’ve had zero time for extracurricular projects. I expect this should change after this weekend
- I’m still planning on working on mugshot – see the above reason for why my progress has slowed/stopped
- Ruby is a cool language – I’m working my way thru Ruby For Rails and really like what I’m seeing. Here’s hoping Ruby is the next Java (at least in terms of popularity)
- I’m going to BarCampRDU! Really looking forward to meeting other local techies
More later when my brain has grown back…