I've been making custom google search engines for things I find useful. Tonight I was doing some research on ruby metaprogramming and I decided to create a search of some of the better ruby blogs. Let me know if I am missing any in the search. In the meantime, I hope this comes in handy. Check it out!
Monday, March 30, 2009
Searching my favorite ruby blogs
I've been making custom google search engines for things I find useful. Tonight I was doing some research on ruby metaprogramming and I decided to create a search of some of the better ruby blogs. Let me know if I am missing any in the search. In the meantime, I hope this comes in handy. Check it out!
Sunday, March 29, 2009
Artful Food Blog Search

So people have been using the artful food blog search (see previous post), but google gives their custom search engines such terrible default URL's I had to create a homepage for it. Turns out blogspot is good for that stuff when you get rid of the blog part. Just add JQuery.
Check it out.
http://flavorsearch.blogspot.com/
Pycon 2009

PyCon is wrapping up and I just thought I'd mention a few things of interest that I saw.
Adam Christian gave a presentation on windmill which is a functional test tool like selenium, written in python. It looks pretty good, but I didn't really see how it differentiated itself from selenium.
Adrian Holovaty gave a talk called "Behind the scenes of EveryBlock.com" If you don't know about everyblock you should check it out. His talk was mostly about technical challenges they faced and how they addressed them. I won't go into detail, but want to say this is a very cool project and I think it offers a glimpse into the kind of useful things that would be possible if government could find a way to share their public records online.
Michael Foord gave a great lightning talk called "Metaclasses in 5 minutes" Plus he has an awesome "Knuth is my homeboy" shirt (see picture). Be like mike and get one here.
Guido Van Rossum gave a keynote. Two things about that: First, he is trying to "fade away" from being in charge of the python community. Second, python is very similar to lisp. If someone could explain to me what he meant by python and lisp being close, I would be grateful.
Joe Gregorio gave a talk on "The (lack of) design patterns in python". It was good and really applies to most any dynamic language. Read the slide deck to see that popular design pattern names are less likely to be talked about on the python mailing list than say, "the pope" or "sausage". Also some great quotes in there about why dynamic languages with metaprogramming basically have all these common patterns built in.
Jack Diederich Gave a very detailed talk on class decorators in Python, and how they make your code more readable than metaprogramming. Good info about this python language feature can be found here.
Finally, Gregor Lingl a high school teacher from vienna who wrote the turtle module from python 2.6 and 3.x spoke about "Seven ways to use Python's new turtle module" He showed off this beautiful demonstration that animated the path of the earth and moon going around the sun. Check out slides 15 and 16 of his talk. Also see slide 28 for a screenshot of his nice animation of building a penrose kite. He wrote a book on this "Python für Kids" Too bad it is in German. Logo rules!
Tuesday, March 24, 2009
Crunchbang Linux

Soooo, I have gone and dual booted my MacBook Pro. What distro did I pick? Well I like the convenience and hardware support of Ubuntu, but can't stand the bloat of gnome, and even xfce seems slow to me these days. I wanted something lightweight, but easy. And lo and behold look what I have found: a new linux distro called #! Crunchbang Linux. Quoth the Crunchbangers:
CrunchBang Linux is an Ubuntu based distribution featuring the lightweight Openbox window manager and GTK+ applications. The distribution has been built and customised from a minimal Ubuntu install. The distribution has been designed to offer a good balance of speed and functionality.I installed it on my mac (after installing refit.) After getting the proprietary nvidia drivers going, all the hardware worked right out of the box (minus the keyboard backlight and light sensors). All I had to do was configure the multitouch and I immediately felt comfortable. It is truly wonderful little distro. No it isn't perfect, and I'm not sure if I'll ever get rid of OSX on my laptop, but I am considering it. Here is a list of things that could be improved (this is probably mostly stuff ubuntu, debian and the upstream packages would have to work out, not crunchbang).
- Short battery life (1 hour vs 3 hours in OSX) due to the wired ethernet driver.
- Decreased Wifi reception (about half the range of the OSX drivers) due to wireless driver.
- Occansional issues with mouse locking up after a suspend (but only since I enabled multitouch).
Monday, March 23, 2009
ThoughtWorks and Clojure

I'm happy to say that Chicago now has a Clojure user group! Props to Cosmin Stejerean for making this happen. I'm also happy to say that the first meeting will be in ThoughtWorks office April 15th. I'm going to be there and I'm bringing along my absolutely-zero-Clojure-experience. Confession: I haven't played with any lisp dialects since college.
ThoughtWorks has been heavily invested in JVM based languages for some time starting with JRuby. Hosting the Chicago Scala and Clojure groups is for me more evidince of that commitment. Lets face it, all of us would like to see less Java code in the world, but we don't need to dump Java becuase it turns out that it is still useful. People see JVM based languages like JRuby, Scala and Clojure as a way forward for big enterprise shops who have invested heavily in Java. If this comes to pass than by some strange twist the JVM will have just been a really, really well engineered trojan horse for getting more beautiful languages like JRuby and friends into the enterprise.
On a different note, let me mention how happy I am that somebody finally named a Java project without dropping the 'J' bomb at the beginning of the name. Emphasizing the 'J' by putting it in an unusual context should be the new hip way to name your Java project. With that in mind I'm going to keep the trend going by announcing a new JVM based language that I just invented on the spot! Hear-Ye, Hear-Ye. I formally announce a language designed for search and manipulation of text and structured data. I will call it Seijure becuase nothing goes together better than Search and Seijure. Hark! What's that I hear? It is a phone call from Google about using it to re-write their aging search engine.
Sunday, March 22, 2009
Google Custom Search Engines
Today I was looking a good veggie fried rice recipe. The usual delimma I face when searching the web for a recipe is that I never get the result I want. Inevitably google returns some crappy commercial site like foodtv.com or about.com or something becuase loads of people link to them. Unfortuantely, when it comes to recipes the stuff they serve up is uninspired.
What I really want is a veggie fried rice recipe from one of those artsy little food blogs like "everybody likes sandwiches" or "eggs on sunday". But how to find the artsy food blog links among all the commercial noise on google? Technology will have a solution, right? Yes. The solution is a Google Custom Search Engine. Give google a list of urls and it will let you search them exclusively.
Here is my custom food blog search:
It covers about 150 artsy little food blogs. Where did I get the URL's? I wrote a simple little ruby script to scrape urls out of HTML. While I was at it I made another search engine I thought would be useful. It is a search of every blog listed on blogs.thoughtworks.com. Here is the widget if you are interested:
Incidentially, here is the fried rice recipe that I ended up with. You gotta love the not eating out in new york blog.
Thursday, March 19, 2009
How to break the back button with javascript and how to fix it.

Firefox has a known bug where it can fail to restore the state of a form when you hit the back button or reload the page. Here is a situation in which I encountered this and how I got around it.
We have a project that has some fancy jQuery "flyouts" (think jQuery's datepicker meets a select box) that replace standard select boxes, but we want the page to degrade gracefully if javascript is disabled, and that means when you disable javascript you should be able to see select boxes. The way to do this is to hide the select boxes on page load with jQuery and then to add the text boxes with flyout functionality to the form. It works great until you submit the form and hit the back button. Firefox only partially repopulates the previously selected form values. With javascript disabled everything works fine. What is the problem? Turns out firefox has problems repopulating forms when form elements have been added or moved with javascript. This is because form elements are repopulated based on their position in the dom, not based on the name of the elements. Bummer. But, if you know what causes the bug it becomes easy to work around. The solution is to simply not move or replace anything on the form. Most of the time you can replicate this behavior by showing and hiding elements. So for our case it was simple enough to put the textboxes for the flyouts on the page in a "hidden" state. Then if javascript is enabled they will become unhidden on page load at the same time the select boxes are hidden. Now firefox has no problem repopulating the form on reload or with the back button, and in the case of no javascript we still degrade gracefully.
I posted this because it took us a couple days to realize this was a limitation of firefox and not something we were doing wrong. Hopefully this will help someone else. Incidentially Safari doesn't have this problem, so clearly there is room for improvement in the way firefox repopulates forms. Probably something based on both form element name AND position, instead of a purely positional approach.
Sunday, March 15, 2009
Hackety Hack is Backety Back

Oh my, sorry about the title. I couldn't help myself. If you follow _why's blog: hackety.org then you heard _why was demonstrating his new version of hackety hack, based on shoes, at the art and code conference at CMU. Unfortunately I couldn't make it to the conference, but I was itching to try the new hackety. Though the main hackety site isn't helpful our old friend google is. A search for "hackety hack" will deliver the download page as the second result. Yea! I'm hackety hacking at this very moment!
Friday, March 13, 2009
Pair programming with multiple mouse pointers and keyboard foci

I've been practicing XP for 3 years now, but I remember having some doubts about it when I first started. It just didn't seem natural for two people to sit at the same computer all day. Right away I realized that my concerns were unfounded and, in fact, I found myself to be a more focused, productive, and happy programmer while pair programming. The one thing that has always bothered me was that computers are just not designed to have multiple participants. Usually there is one monitor, one mouse and one keyboard. Sure, you can supplement a second monitor, mouse and keyboard, but it is a bit like having two strings attached to the same kite or two handles on the same shovel. No matter how many input devices you connect you are forced to share control of a single pointer. Obviously our tools aren't up to the challenge of real time, in person collaboration!
There is, perhaps, a solution to this problem. MPX is a fork of the X server that allows for multiple mouse pointers and multiple keyboard foci! (up to 18 of them) See this video.
One obvious drawback to MPX in a pair programming context is that it could be considered a distraction for the pair. One person could pull open a web browser or otherwise lose focus. Also there could be contention for control of what is happening on the screen. But honestly, both of these problems exist without MPX, and it is a matter of etiquette and professionalism, not a matter of tools and technology.
I look foward to playing around with MPX, and pair programming, seeing what works and what doesn't. I expect that IDEs and editors could find interesting ways to capitalize on this new way of working. What sort of benefits and drawbacks do you think MPX would have for pair programming? What kinds of editor and IDE enhancements would you like to see?
Most likely we are still a long way from this technology becoming a part of our favorite linux distrobutions, but it is fun to imagine the possibilities. I think it would make our tools more suited to collaboration.
Monday, March 9, 2009
The RPG, distilled

This weekend I came across a flash based RPG by Sophie Houlden called 'The Linear RPG'. It really is a boiled down version of what many RPG's are. Essentially you make your character travel around and increase statistics like HP and experience, except in this RPG you are moving on a line so you can only go forward and back, but like other RPG's there is a gradient of moving from easy to hard, so you can't just go directly to the end, you have to back track and spend time in easier places 'training' before you can proceed to the hard places. Sophie did a nice job doing some 3d bending of the line to make the game more visually stimulating and having the story scroll by as text behind your character's position is a nice touch. It is a game that you can play through and complete in 5 minutes or less. And it is free and in browser. Enjoy a great idea that was well executed for a few moments. Play
'The Linear RPG'
Tuesday, March 3, 2009
Googling for Ruby Quiz finds an outdated site

Ruby Quiz is an awesomely fun programming challenge that comes out on the ruby-talk mailing list every week. There has even been a book of them published by the prag guys a couple years ago. Anyway, I can't stay up with the ruby-talk mailing list because there is just too much stuff flying around there. So how to get your hands on all the quiz loveliness? You could find all the quizzes in the archives of the mailing list if you had some time on your hands. Fortunately there are some websites that collect them. Unfortunately, no website (that I know) collects ALL the ruby quizzes. There are three websites though that, put together, contain all the quizzes. Old skool ruby quiz site has quizzes 1 through 156. Mid skool ruby quiz site has quizzes 157 through 188. The new skool rubyquiz site has 157 - 194. Why do they do it like this? I don't know! It is really annoying! If you google for ruby quiz the old skool site is the only one that shows up in your search. I just thought I would link to the new skool site from my blog in the hopes that someday when I search for ruby quiz I'll get a link to the site that has the latest quizzes.
By the way the newest ruby quiz "Polyrhythm Trainer" #194 sounds like a really fun problem to solve. If I had time to do it I'd make my solution a shoes app. Whee!
Subscribe to:
Posts (Atom)