Category Archives: computers

Prioritizing Netflix traffic with DD-WRT

Network traffic shaping is an interesting topic, that allows you to ensure that certain traffic gets priority over other traffic. ¬†When applied at the ISP level, this can get controversial, as you start getting into Network-Neutrality issues (where one company’s traffic gets priority over another company’s, which could lead to large media corporations silencing grassroots […]
Posted in computers | Tagged , , , | 10 Comments

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 […]
Posted in computers | Tagged , , , , | 1 Comment

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 , , , , , | Leave a comment

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.

Programming 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...

Posted in computers | Tagged , , | 3 Comments

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.

Posted in computers | Tagged , , , , | 2 Comments

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.)

Posted in computers | Tagged , , | 4 Comments

Migrating URLs with Apache

I recently migrated this blog from Blogger, which was posting via SFTP to a shared hosting provider, to a self-managed Typo installation. One of the biggest reasons I didn't do this sooner was that I didn't want all of my old URLs (and the links that point to them) to stop working. After all, what is the point of a permalink if it stops working one day? It isn't that I have such high page rank with Google or anything, but I didn't want to have to start over from scratch.

I wanted to be sure that if someone either typed in a URL that used to work, or followed a link from an outside page, they would end viewing the content that they expected to land on. I thought some about having some kind of logging, so I can be aware of when people use these old links, and where they are coming from. I also thought about having some mechanism for alerting the user that the link they followed is old.

Posted in computers | Tagged , , | 3 Comments