Archive for July, 2006

Jul 31 2006

More Perl6 and TechCoffee

Published by Chris McAvoy under Projects, Perl6, TechCoffee

Went to my second TechCoffee this morning. I sort of completed Synopses 2. I sped through the last couple of pages. I want to jump into other stuff. Along the way, I spent some time moving some of the script I wrote last time into a Test.pm style test suite. It makes more sense to try and write this stuff as tests, at least it seems to right this minute. I spent some time hacking around with Test.pm. I tried to add a &eval_not_ok test function, but ended up breaking it. I also played around with the YAML compilation of P6 modules with PUGS, but didn’t have much luck. I think I used the wrong backend. I’m not totally firing on all cylinders this morning.

No responses yet

Jul 27 2006

Josh McAdams gets a White Camel!

Published by Chris McAvoy under Python, Perl

Woo hoo!

The announcement on use Perl.

Very exciting news. Josh is a great guy, and completely deserves the award. Way to go Josh.

One response so far

Jul 26 2006

First meeting of the RHS

The Rudolph Hering Society had its first meeting last night, at the Lincoln Lodge. Around 15 or so people showed up. The meeting went really well. It was pretty free-form, which I actually prefer to the sit down and watch a presentation style of meeting. Not that there’s anything necessarily wrong with having a projector and a laptop, but not having it is pretty freeing.

I’m really happy with how well the RHS concept has taken off. People are being really talky on mailing list, everyone is open to new ideas and learning from one another. Like Jason says, the idea of a non-language-specific Chicago group has been kicking around the after-user-group beer chats at ChiPy, ChiRb, and ChiCagoDotPm for a while now, it’s exciting that it finally happened, and clearly has an audience.

No responses yet

Jul 24 2006

Clean list of things to keep in mind when coding from creator of Mongrel

Published by Chris McAvoy under Blog

I’ve spent most of the day today looking a little bit deeper into Mongrel (for work-work surprisingly enough). Along the way, I read a lengthy O’Reilly interview with Zed Shaw, the creator of Mongrel. He seems like a pretty smart guy with a good work ethic. He boils down a list of things he looks for in code when he’s working on a project, I like this list:

With any of my projects I try desperately to do the following:

1. Keep the code as incredibly simple as possible. I call this “The Shibumi School of Software Structure” because I like the letter ‘S’ and because it’s the exact inverse of what most programmers do when they structure software.
2. Code reviews of my own code before releasing, constantly trying to find:
1. “missed assertions” — Unstated assumptions about inputs and outputs.
2. “missed else” — Logical branches that don’t cover all test domains.
3. “will it stop” — Looping errors that will cause classic infinite loops or short loops.
4. “check that return” — Return values that aren’t dealt with properly (which are really assumptions about other inputs and outputs).
5. “unexpected exceptions” — Exceptions are pretty darn evil since they’re rarely documented.
6. “simply readable” — Replacing clever code with readable simple code where possible, and documenting complex code so it can be reviewed by others.
3. Unit testing as much as possible. When writing networking software unit tests become really difficult since you can only actually test it over a network of some kind.
4. External thrashing and performance tests trying to break the system with unexpected inputs. Techniques I use are fuzzing, heavy loads, stopping interactions violently mid-stream, ripping out resources at random, and trying to think about ways someone could attack the system.
5. Usability reviews from potential or current users. My motto here is “If I KMFU (Know My F*ing Users) they won’t have to RTFM.” I really think if a system is easy to use then the security concerns are lower, but I don’t have much evidence to support this claim.

No responses yet

Jul 24 2006

Great Reminder from Dave Thomas

Published by Chris McAvoy under Ruby

Dave Thomas reminding us that we’re supposed to help each other. I was at Dave’s talk at Railsconf, but had no idea that it caused controversy. I just recently saw DHH’s keynote (I missed D-H-H for a B-B-Q (pun intended)). I guess his aside at the top of his speech rallied up the troops to somehow misinterpret Dave’s keynote. Bah. Bah on all of you.

I like the idea of Rails being “opinionated”, I also like the idea of Rails being pretty open to change via Plugins. Dave’s keynote, in my interpretation, had nothing to do with either bit. Dave’s keynote was about helping each other out. He was laying out a bunch of potential tasks for some enterprising enterprisey enterpriser to jump in and build some tools to get the banks on board. He wasn’t saying, “Rails needs XYZ to get legit,” he was saying “this is a list of pain points for some folks. Anyone willing to help them out?”

Jeez Rails-i-nauts, don’t forget your open source roots. Where’s the open mindedness? Where’s the go-get-em attitude? Where’s your hacky sack? Get out there and help the squares already!

No responses yet

Jul 17 2006

TechCoffee, Playing with Perl 6

Published by Chris McAvoy under Projects, Perl6, TechCoffee

I went to my first TechCoffee this morning. I want to use that valuable, early morning, low stress, bleary eyed time to explore Perl 6. I’m working through the synopses one at a time, and keeping notes as I go. The notes are executable. I’m checking them into my public repository here http://lonelylion.com/mcavoy_public/perl6_play/

They’re pretty train of thought, so they’re probably confusing. I tried to backtrack occasionally to write a wee bit more for people that aren’t me. I may end up jumping around the synopses a bit, as I’m not entirely sure the order is important.

I worked through the first ten pages of synopses 2 today. That’s about 1/3rd of the way through. Notes are here. It’s jumping around to a lot of concepts (like OO) that haven’t been introduced yet, which leads me to believe the synopses aren’t meant to be read in order, the numbering is just a tie back to the apocalypses and exegesis.

At this velocity, I should be done with all the synopses in July 2007. Egads. I won’t be able to make TechCoffee every week. I’m shooting for alternating Mondays. So I should be able to cover a synopses a month. I’ll probably poke around on the train too, so July 2007 might be a bit of exageration. I don’t anticipate being through these things anytime soon though. I want to take my time. This is an interesting project for me, I’m used to living in the “Learning [insert language]” book from O’Reilly tier of learning. This is a big change.

No responses yet

Jul 13 2006

Rudolph Hering Society

Published by Chris McAvoy under Blog

I put this out on the Chicago user group lists this morning.

Announcing the creation of *The Rudolph Hering Society*
=======================================================

Named for the man that hacked the Chicago River, the RHS preserves the legacy of this great engineer through the open discussion of technology that scares the squares.  Programming, development methodologies, testing paradigms, continuous integration, electronics, Radio Shack, bottle rockets, and bread baking are all open topics on the lively RHS mailing list.

How do I become a member?
————————-
You already are.  Just join the mailing list to start talking http://lists.rudolphheringsociety.org/listinfo.cgi/river-rudolphheringsociety.org

Do we have meetings?
——————–
Sure.

Do we have a website?
———————
Sort of, we have a wiki at http://rudolphheringsociety.org

Do we have an irc channel?
————————–
Sort of, #hering on irc.freenode.net  It’s not really “formal” yet.

Do I have to live in Chicago to join?
————————————-
Hell no.

Will we have buttons, t-shirts, and those funny little badges for my blog?
————————————————————————–
Hell yes.

Wait, this really has nothing to do with Rudolph Hering, you’re just using his name as a quirky title to your silly club.
—————-
Says you.  Project number one at the RHS is to research Mr. Hering and create a fitting wikipedia page for the man.  The RHS, in addition to being a silly club, is committed to preserving the legacy of the man whose feats make you go, “What?  How’d he do that?”

What’s this really about?
————————-
This really smart guy named Ed Summers wrote this: http://mail.python.org/pipermail/chicago/2006-July/000983.html yesterday, and it got me thinking that we really need a group that has no allegiances to any one language, platform, or hobby.  What we need is a society of like minded individualists who think that technology is about more than what you can get paid for.  Sure, we all like getting paid to do what we do, but chances are we’d still be doing it if we didn’t get paid.  Would Rudolph have reversed the flow of the Chicago River had he not been paid?  Probably not.  Quit being a nitpicker.

Do we have a headquarters?
————————–
Yes, it’s a mysterious building somewhere on the northwest side of Chicago.

Who is getting this email?
————————–
The first burst is going to chipy, chirb, chicago.pm, and luni.  Please pass this on.  This is an open society…we like Java, .NET, Fortran, and white bread.

One response so far

Jul 07 2006

Ruby Bees

Published by Chris McAvoy under Ruby, BeeSim, Projects

I finished the Ruby implementation of my world famous Bee Simulator. It’s especially fun as it’s the first functional implementation. I’ve made starts in Perl, Python, and Rails, but gave up on each in turn. Feel free to read into that as you see fit.

I’m really happy with how the ultimate “Bee API” turned out. Here’s the Bee logic method in all its glory:

def tick
if @nectar > 0 and is_hive?
log("dumping nectar in hive")
deposit
return
elsif @nectar > 0
go(where_hive?)
return
end

if ! is_flower?
direction = Cardinal[rand(Cardinal.length)]
move.send(direction)
return
end
f = get_flower
log("found flower")
suck_nectar if f.has_nectar?
log("sucked nectar")
end

Kind of a neat API, in my humble opinion. It needs tweaked, but it’s good for now. I’d also like to give the Bee’s their own DSL, so that I can easily make this into a web app that lets users test their own theories of bee logic. If you want to take a look at the code, it’s available via subversion here: http://lonelylion.com/mcavoy_public/trunk/bee_ruby/

One response so far