Wednesday, November 19, 2008

The Need for Feeds - Part 2

Not willing or don't think you have the time to subscribe to all of the blogs I listed in my Need for Feeds post? No problem, Google Reader has cool sharing functionality. When I read a post that I think is especially helpful or interesting, I will mark it as shared. All you have to do is subscribe to my shared feed, and you can see the items that I mark as shared.

Consider it the "J.D. filter". I read all of my blogs, weed out the noise, and you get a single feed with just the good stuff I find.

My shared items web page:

The RSS feed:  rssimage

Tuesday, November 18, 2008

"Scripting" Languages and Utilities

OK, calling them "scripting" languages these days is a disservice. What I would traditionally call a scripting language is a language that doesn't require a compiled executable, is dynamically typed, has great string manipulation functions or classes, and has regular expression support. These days there are tons of choices, and most of them are full fledged languages with functional frameworks that can accomplish anything a compiled language can. This post is a summary of a recent experience with some "scripting" languages, and the cool tools I found to make the experience much more enjoyable.


I recently worked on two tasks that together put me in front of Python, Perl, and Ruby. I like it when I have a task that requires using any of these languages, but the problem is I dabble in them so infrequently that I often spin my wheels getting back up to speed. I fumble through old scripts stealing bits and pieces of code. I litter print statements here and there so I can tell what is going on. I basically revert to my freshman year of college in CS101 labs.


Now that I'm a "professional", however, at the first sign of trouble I started looking around for tools to help me figure out what was going on. My first dilemma centered around a Python script that was stopping at an unexpected error. I didn't write the script, I really needed it to work, and I don't know a thing about Python. What I really needed was a debugger to help me browse around the script and quickly understand the data structures it was using and what it was trying to do when it failed.


A command line debugger was not going to do the trick. I have no problem resorting to something like gdb or Perl's command line debugger when I really have to, but those debuggers are really at their best when the developer is already familiar with the script and has a bit of an idea of what they are up against. A visual debugger is a must when you are stepping through code for the first time and just trying to get a feel for what is going on.


A few web searches under my belt, and I was happy to find winpdb, a platform independent visual debugger for Python. The debugger was easy to use, and had a great watch window that not only showed local variables as they entered and left scope, but also correctly displayed control characters inside variables, which made debugging regular expressions much easier (click the picture below for a larger screen shot).




In a separate task this week I needed to write a script to clean up some "garbage" characters that our legacy help file authoring system was randomly placing in our HTML help. I chose Ruby for the task, as I had written quite a few Ruby scripts in the past and I really like the language. I ended up stumped on a regular expression never matching text that I thought it should (and I knew the expression was sound because I had already tested it in my editor). While I could have resorted to some "printf debugging", my Python debugger experience had me anxious to find a visual debugger I could use with Ruby in this and future projects.


Google to the rescue and soon I was debugging my Ruby scripts inside Visual Studio. This thing is brilliant! The screen shots below are from Ruby in Steel. Note the black background is my Visual Studio preference, not an oddity of Ruby in Steel. While Ruby in Steel is not free, it is very inexpensive and I'll be buying a license this week. Debugging my Ruby scripts in the familiar Visual Studio environment put a huge grin on my face. It felt like cheating.






The real kicker for Ruby in Steel was the intellisense. Since I don't use Ruby all the time, when I do start writing a script I find myself constantly referencing the documentation to find class methods. I love being able to type a class name, hit dot, and browse for methods without leaving the editor.




There are other .NET based implementations like IronPython and IronRuby which I imagine use the Visual Studio debugger as well, but for basic script debugging I found these utilities extremely useful.

Sunday, November 2, 2008

The Need for Feeds

I'm an RSS addict. I love reading technical blogs, and I seriously think my thought processes and career would be on a different track if it were not for the great content I have been exposed to over the last few years of blog reading. Not only has it helped me solve technical issues, but it almost always provokes thoughts and ideas on how I can improve our product, our teamwork, and our development processes.

With that said, something scary has been happening lately; Google Reader has had very few new posts for me to read. A lot of this has to do with my addiction at home to firing up mobile Reader on my phone and catching up during college football timeouts and commercials.

The solution? I propose a trade. I'm going to list some of my favorites, in return for your comments with some feeds you read that I might like. I seriously used to consider this list a bit of a competitive edge and was weary of giving it out. I recently had a change of heart and realized that was fairly lame, so here is my complete list of software related feeds:


First the usual suspects:

Now a few you might not be aware of:

Software Business

ianywhere blogs

Web Development

FoxPro Blogs