Oct 6th 2008 How the Other Half Lives - Bandwidth Throttling on the Mac Using WaterRoof/ipfw

Have you ever needed to test your website as if you were a dialup user? According to a Pew research study earlier this year 55% of Americans have broadband at home, and 10% still have dialup (with the remainder having no connectivity at home). This means that almost 20% of home browsers are on dialup. If you want to make sure that you’re app isn’t completely unusable for this population it could be useful to know how to slow your fat pipe down to dialup speeds.

Under the covers, Mac OSX uses a tool called “ipfw” (IP firewall) that allows for all kinds of fancy traffic shaping and piping. It’s a very unix tool though and it’s not the easiest thing to use if you’re not familiar with parsing through man pages.

There is a GUI called WaterRoof (http://www.hanynet.com/waterroof/) that makes things a little better, though it still isn’t the most intuitive thing.

Here are the steps to slow your connection down using WaterRoof.
Read More »

No Comments » Posted by tednaleid / command line and osx

Sep 23rd 2008 StackOverflow.com

I’m pretty impressed with the community that’s forming over at StackOverflow.com (Jeff Atwood and Joel Spolksy’s new developer focused Q&A startup).

I just asked a fairly detailed question about working with mercurial. Something that wasn’t (obviously) covered on the mercurial wiki, through googling, or in the mercurial handbook, and got a quality answer back in only 8 minutes. That’s fantastic for a general purpose development website and is a great start after only being open for a couple of weeks.

They’ve started up an interesting reward/karma system over there where they award badges (similar to achievements on Xbox360) for a bunch of different positive behaviors. A nice little token system that’s paired with “power-ups” at different point levels. It’s easy to get the first few badges with just a little participation on the website, and I can see how certain personality types that are common in engineers would get big rewards out of collecting these.

No Comments » Posted by tednaleid / Uncategorized

Aug 26th 2008 Ubiquity - interesting looking command line for Firefox

Just ran across Ubiquity over on on waxy.

It’s an alpha Firefox plugin that’s attempting to be a command line for the internet. It reminds me a little of yubnub, but quite a bit more powerful as it’s available on every page and is context sensitive.

Essentially, it has a set of built in commands (that you can add to an extend) and it’s aware of the current browser context, so if you have something highlighted, it can act on that subset of the current page.

Previously, I’ve been a heavy user of Firefox smart keywords, which allow you to assign aliases to bookmarks and type the aliases in the location bar. I’ve created smart keywords that allow me to search wikipedia, amazon, imdb and the dictionary. Ubiquity has all of these, plus a lot more built-in.

I’ve only been using it for a little bit, and there are some rough edges, but I think that there is quite a bit of promise here as well and thought that there might be a few other keyboard jockeys out there that would appreciate what Ubiquity is trying to do.

1 Comment » Posted by tednaleid / Uncategorized and command line and osx and shortcut

Jul 29th 2008 Pitfalls with Mercurial, ZSH and SSH

I ran into a couple of issues trying to clone a mercurial repository over ssh tonight. I’m documenting the solutions here in case they’re useful for anyone else (or me when I forget what I did in 6 months :).

The first issue was that I’m running ssh on a non-standard port and the repository does not reside in my home directory.
Read More »

No Comments » Posted by tednaleid / Uncategorized

Jun 3rd 2008 Distributed Source Control with Mercurial Presentation

I gave a presentation at work today on Distributed Version Control Systems and Mercurial. We’re currently using Subversion, and I’m nudging my co-workers into getting interested in the benefits of distributed version control over a centralized system.

5 Comments » Posted by tednaleid / command line and grails and mercurial and osx

May 27th 2008 Syntactic Sugar in Groovy and Ruby

Over on the RailsEnvy blog (the guys who made the “Rails vs. X commercials” last year), there’s an article that highlights some of the nice syntactic sugar that Groovy has that’s currently not available in Ruby.

I actually came to Groovy/Grails after working with Ruby/Rails for about a year. Both languages and framworks have their strengths and it’s nice to see cross-pollination of good ideas going both ways. From the comments, it sounds like Ruby 1.9 is getting some of the features that we’ve had in Groovy for a while.
Read More »

4 Comments » Posted by tednaleid / grails and groovy

May 19th 2008 Groovy: Don’t Fear the RegExp

Some people, when confronted with a problem, think “I know, I’ll use regular expressions!”
Now they have two problems. — Jaime Zawinski

There is a common and well-earned aversion in the Java world to regular expressions. Prior to Java 1.4, regular expressions weren’t even part of the core language. Post 1.4, using regular expressions is still a painful task of working with Pattern and Matcher objects. Lots of typing is involved to make anything happen. It’s difficult enough that most Java devs don’t end up using them enough to actually remember how to read a regular expression, and they need to dig up the JavaDocs (or cut and paste an old example), every time they want to use them.

This aversion has persisted into the Groovy community to a level that I haven’t seen in other dynamic scripting languages like Ruby, Python, and (obviously) Perl.

The current regexp docs that pop up when doing a google search are all outdated and don’t use any of the best techniques that are available in the groovy 1.5.X and 1.6-beta code that is now available. The recent Groovy Recipes book doesn’t have an entry for regular expressions in the index, and I was unable to find a single example of a regular expression in the entire book.

This is unfortunate because Groovy makes using regular expressions much easier than in Java. Under the covers, you’re still working with the same old Java Pattern and Matcher objects, but the Groovy syntax and additions to those classes are pleasant to work with.
Read More »

10 Comments » Posted by tednaleid / grails and groovy and unit testing

May 9th 2008 Top 3 Shortcuts for the Terminal

As my coworkers know, I’m a keyboard shortcut junkie. It’s a problem (and I need help), but I’d rather give you a taste of what I’ve been smoking and drag you down with me :).

Why only 3? Because people don’t learn a couple of pages of keystroke combinations at a time. But with only the 3 of the best keystrokes, there’s a good chance I’ll get you hooked and you’ll seek out some more.
Read More »

1 Comment » Posted by tednaleid / command line and osx and shortcut

May 7th 2008 What methods does my Groovy/Grails class have?

If you’ve ever wondered what methods a groovy class has available for you to call, all you need to do is ask the metaClass:

"foo".metaClass.methods*.name

Result:

["equals", "getClass", "hashCode", "notify", "notifyAll", "toString", "wait", "wait", 
"wait", "charAt", "codePointAt", "codePointBefore", "codePointCount", "compareTo", 
"compareTo", "compareToIgnoreCase", "concat", "contains", "contentEquals", 
"contentEquals", "copyValueOf", "copyValueOf", "endsWith", "equals", 
"equalsIgnoreCase", "format", "format", "getBytes", "getBytes",
 "getBytes", "getChars", "hashCode", "indexOf", "indexOf", "indexOf", 
"indexOf", "intern", "lastIndexOf", "lastIndexOf", "lastIndexOf", "lastIndexOf", 
"length", "matches", "offsetByCodePoints", "regionMatches", "regionMatches", 
"replace", "replace", "replaceAll", "replaceFirst", "split", "split", "startsWith",
 "startsWith", "subSequence", "substring", "substring", "toCharArray", 
"toLowerCase", "toLowerCase", "toString", "toUpperCase", "toUpperCase", 
"trim", "valueOf", "valueOf", "valueOf", "valueOf", "valueOf", "valueOf", 
"valueOf", "valueOf", "valueOf"]

There’s a lot of duplication in there, and the order is random, so I’ll often fix that like this:

"foo".metaClass.methods*.name.sort().unique()

Result:

["charAt", "codePointAt", "codePointBefore", "codePointCount", "compareTo",
 "compareToIgnoreCase", "concat", "contains", "contentEquals", "copyValueOf", 
"endsWith", "equals", "equalsIgnoreCase", "format", "getBytes", "getChars",
 "getClass", "hashCode", "indexOf", "intern", "lastIndexOf", "length", "matches", 
"notify", "notifyAll", "offsetByCodePoints", "regionMatches", "replace", "replaceAll",
 "replaceFirst", "split", "startsWith", "subSequence", "substring", "toCharArray", 
"toLowerCase", "toString", "toUpperCase", "trim", "valueOf", "wait"]

Read More »

4 Comments » Posted by tednaleid / grails and groovy and shortcut

May 1st 2008 Using Mercurial as a “super client” for Subversion

There’s a blog post by one of the subversion developers talking about the future of subversion in a DVCS world.

I agree with parts of the post (and many of the comments) that subversion will continue to be around for a long time, but that more and more developers will start using tools like mercurial and git as a “super client” for a normal centralized version control repository.

Read More »

3 Comments » Posted by tednaleid / command line and grails and osx and shortcut

Next »