-
Recent Posts
Recent Comments
Categories
Tags
apache beer beernutz bigbrother boston bottle buttons cartography computers conditioning css database deadlock draft economics firebug freedom gmail hexadecimal homebrewing html java javascript maps mbta mustache outlook performance podcasts politics productivity programming quality random recipe sea stackoverflow subway surveillance taxes testing tricks tv web wedding
Author Archives: Patrick
Speed Improvements for Mapping Site
Here is just a quick update on my site that allows you to map multiple locations on Google Maps. If you use the site regularly, you may have noticed that it has been slow, and sometimes unresponsive, lately. (Also, you may have noticed some very wonky behavior today, but that was because I was tweaking [...]
Hexadecimal arithmetic in Google
Did you know that you can do hexadecimal arithmetic in Google? I didn’t, but I knew that Google’s calculator feature would often just do ‘the right thing’, so I decided to try it out. I wanted to use the Google Chart API to create a grouped bar chart. I wanted each of the four bars [...]
a tip to prevent deadlocks on database connections (or, at least detect them early)
It seems there were a lot of points in our code base at work that are ripe for deadlocking on database connections. We are acquiring a connection, and then calling some other methods, and a few frames down the stack, we acquire another connection (before releasing the first). This, of course, can result in a [...]
Posted in computers Tagged database, deadlock, java, performance, programming, testing Leave a comment
Bottle Conditioning in Growlers
Well, today seemed to be a busy day for people asking me beer-related questions on facebook. I like to repost things like this here, since the facebook wall doesn't really stick around very long.
So, a friend of mine who is just getting into homebrewing, posed this question:
hey, So the directions I have say no screw top bottles. I was planning on filling mostly just growlers, is that cool? and why is it that the net has so much contradicting information? mostly about the times for fermenting and carbonating
Well, I've experimented some with bottle-conditioning in growlers, with some mixed (but never disastrous) results. I've also heard the warning from people on the Internet about bottle bombs.
Read on for my response, which I elaborated on somewhat to fit this format (my blog), since facebook imposes character limits on wall posts and comments.
Hi Patrick, I have a beer question.
Today on Facebook, my mom asked me a question that I couldn't answer in the short limits that Facebook imposes on wall comments/posts. I reposted it here in full form.
Here is the question:
Hi Patrick, I have a beer question.
Unfiltered and unfettered Hefeweisen... I had that recently at 12 Crane and it didn't taste right. I am sure I have had it before, or at least tasted it at a beer bar in Boston with you and I liked it. When I asked the waitress about it, she said the beer was as it should be but may have seemed strange because of the "unfettered and unfiltered". Does that sound right to you or is she just a good waitress with an intelligent sounding response? I am keeping my question "filtered" because I don't want to cast aspersions on any beer makers.
love, Mom
Read on for my response:
Wedding photos are coming in!
This will be a very quick post, but the wedding photos are trickling in from everyone.
Be sure to browse and share!
Programming at Sea
Recently, on stackoverflow, Jeff Atwood has been concerned with 'joke' questions. One of these, which is now going to live in infamy due to all the discussion about it, is about "Programming at Sea". Now, I got curious about the questions when I heard about it, so I tried to find it. The Stack overflow moderators had already removed it, but I found it in Google's cache. I decided to exercise my rights under the Creative Commons license and repost the questions and some selected answers here, so it doesn't die forever. I, for one, think this post is both funny and interesting, though I agree that it probably isn't 'programming-related', so it doesn't really belong on SO.
So, here is the question, originally posted by Out Into Space:
I've decided to cast off from this dreadful economy and program out at sea.
I've acquired a 40ft sailboat. Should be sufficient for me and my cat (Ender).
What do I need to be a sailor/programmer? I have a basic sailing knowledge... so I'll wing that part. But the programming! THAT requires some juice which as I understand, is in short supply on long voyages.
So what do I need SO? A genset and some fuel? Would solar be enough to charge a single laptop? What about internet connection out there, got to be something?
So, my question is, what kind of setup should I create to sling code on the high seas?
Read on for some of my favorite responses...
Gmail-style buttons with no images
Earlier this week, Gmail rolled out new buttons to the site. As I understand it, these buttons are meant to make the UI more consistent across browsers, and make the experience more streamlined.
These buttons have a gradient background, making them appear rounded, and they are grouped together in "pills", to keep related actions together. The buttons on the ends of the pills have slightly rounded corners. The cool thing about these rounded corners is that they are pure HTML/CSS (they don't use any images) and they work in all browsers (unlike the firefox-specific -mox-border-radius directive). The drawback is that you can only get slight rounding; no a gradual curve. Also, the markup is far from simple.
I thought they looked pretty sweet, so I got to wondering how difficult it would be to try them myself. Douglas Bowman, from Google, wrote a post about how these new buttons evolved. He didn't come out and say how they were done int he final result, but he did invite people to reverse-engineer the new buttons. I decided to take him up on that invitation.
Deval Patrick to raise taxes on beer
The Boston Globe is reporting this morning that Massachusetts Governor Deval Patrick has announced he will raise taxes on beer, as well as other alcoholic beverages (and candy and soft drinks):
Patrick would raise $75 million, for example, by increasing charges at the Registry of Motor Vehicles, including hikes of $25 for getting a title for a car and $2 to renew a license. Eliminating an exemption on the state's 5 percent sales tax on alcohol, candy, soft drinks, and juice drinks would raise $150 million and be placed in a special health fund. (Administration officials have defined a juice drink as one that is less than 50 percent natural). Patrick would also expand the 5 cent deposit charge on carbonated sodas, beer, and malt beverages to include beverages such as water and juice drinks.
Beer Nutz…Where have I been?
Well, maybe I've been living under a rock for the past three years, but I never heard of this show, Beer Nutz, until I just found it on Hulu.
So basically, these two guys travel from city to city, and profile the best beer spots in town. I just watched the first episode, filmed on location in my home town of Boston, MA. I got to see a couple friends of mine, Bob and Tigh, and plenty of places I've enjoyed a pint of two before.
I don't know what happened to this show, but it seems it hasn't been on since 2006. I, for one, miss it. Even though I just found it.
Jim is looking for one of Jamil’s recipes
If you are a homebrewer, or just a beer lover, I cannot recommend joining the American Homebrewers Association enough. In addition to a subscription to Zymurgy, plenty of discounts to pubs and other places beer lovers are bound to frequent, and also a subscription to Tech Talk, the AHA-only email forum. Now, there are plenty of online homebrew forums, and many of them are great. Tech Talk is one of the best (in my opinion, at least).
I had a question once, shortly after joining the AHA, so I figured I'd give it a try. Within 2 hours of the email going out, I got about 2 responses directly to my email, and another five or so responses came in the next issue of Tech Talk. It was amazing, and it proved, once again, that homebrewers are the best type of people.
So, in that spirit, I have decided to re-publish my responses to other people's question on Tech Talk here. Hopefully this will help me reach more people, in case anyone has these same questions. With that being said, if you find this useful, you will find many more helpful people on Tech Talk, so join the AHA.
So, a little while ago, a guy named Jim D. asked the kind folks of Tech Talk if we could suggest an extract version of Jamil Zainasheff's Brown Ale recipe, which was published in Zymurgy in a recent issue. Here is my response:
If you are looking for one of Jamil's recipes, and you don't have his book, you can listen to the podcast he did. He went through each recipe in Brewing Classic Styles and discusses it in some pretty good depth, as well as gives out all grain and extract versions of the recipe. The archives listing is at http://www.thebrewingnetwork.com/jamil.php. There are actually two episodes on English Brown Ale, one for the southern style, and one for the northern.
Beer and Homebrewing Podcasts

Podcasts are great for commuting. You get fresh content regularly, on almost any topic out there. I hardly ever listen to music on my iPod, since the only time I really ever listen to music is when I'm at work, and that is really just to help drown out distractions around me.
So, about half of the podcasts I subscribe to are beer-related, and half of those are homebrewing specific. Here is a listing of what I subscribe to. If you know of any other good ones, please let me know.
Big Brother on the Orange Line
I got on the Orange Line (one of Boston's subway lines) yesterday, and noticed this little guy watching me. There was one watching the inside of each door, and one looking either direction down the car from the center (there are three doors on each side of the car, so 8 cameras total, per car). Not all cars have these cameras, so I imagine they are testing them in some cars, or slowly rolling them out. I noticed them in cars numbered 01214 and 01248.
I wonder what prompted this, or is it just part of the general trend to watch everyone, at all times? Does anyone watch this live? Is it even recorded? Is it just for Panopticon effect?
At a time when the MBTA is massively in debt, this kind of surveillance is not cheap, especially with 8 cameras per car. I don't see this helping catch fare evaders. Are violent crimes on the subway very common? I've never seen or heard of any (though I have certainly heard of shootings on the busses). I doubt the transit police would bother even reviewing the tapes (let alone, install the system) for non-violent crimes, like pick-pockets.
Is this meant to catch those people that molest women in crowded subways? How would the camera see what was happening if it was that crowded?
Or is this all just more money spent to give us the illusion of security and safety?
Customize Firebug shortcut keys
For a web developer, Firebug is indispensable for debugging javascript and CSS. Like any good debugger, it supports shortcut keys to control the execution (step in, step over, step out, and resume). Firebug's keys (by default) are as follows:
- F8 - Resume
- F10 - Step Over
- F11 - Step In
- Shift-F11 - Step Out
However, these keys are not configurable. They may conflict with other shortcut keys in your system. They may not be the same as other keys you have already learned (eg, the keys in Eclipse). In my case, I found myself reaching for F5 - F8, which are the shortcut keys for Eclipse. Also, the Firebug keys conflict with the default Exposé keys in OS X. (Yes, I know I could change those shortcuts, but I've grown accustomed to their defaults.)


Experimenting with Panoramic Photography