Monday, October 19, 2009

Stack Overflow



While other people may be addicted to Facebook, or MySpace, the site that got me hooked over the last year is StackOverflow.

StackOverflow (SO) is a Q&A site for developers and a heaven for geeks. Unlike the multitude of other sites that purport to fulfill this function, it’s easy to use, full of talented people, and most important: free.

SO is the brain-child of Jeff Atwood (if you haven’t read his blog, Coding Horror – you owe it to yourself to add it to your “must read” list) and Joel Spolsky, who I quoted many a time on this blog.

But the best thing about the site is its community. Not only does it help you get out of sticky code situations, but it also edits, filters and tags questions, throws out spam and inappropriate material, and basically governs itself. Borrowing from the Xbox Live Reputation System, SO rewards users for answering questions, asking interesting questions, commenting, editing and grading other users’ content.

It’s not enough to just answer questions – your answers have to be accepted by the community as good/interesting/contributing to a solution. Your answer can be voted up – or, as I’ve sadly discovered – voted down. On a question regarding password policies, I found out that so many people dislike such policies that they voted me down 3 times yielding a –6 points to my reputation. You can see all the questions I asked/answered by clicking my profile at the top of the post. The reputation badge is dynamic and will always show my current reputation.

You can also win badges, such as “nice answer”, “supporter” and “scholar” but also “tumbleweed” – the dubious honor of asking a question with no answers, no comments, and low views for a week. You can earn bronze, silver and gold medals – although the last type is extremely hard to get. But most of all, you gain the ability to edit content on the site – oh, and bragging rights smile

The site was such a success, that 2 sister sites (using the same web app, but a different color scheme) popped up: ServerFault for server-related issues, and SuperUser for miscellaneous computer issue. An SU user actually saved me money recently: my Xbox 360 controller stopped responding, the guy from Microsoft Support advised me to buy a new one (after over an hour on the phone without resolution) – but the answer I got on SU was actually simple and effective.

Today I attended the first SO conference. StackOverflow DevDays was held at Fort Mason in San Francisco, overlooking the Golden Gate bridge on one side and Alcatraz island on the other. During the day StackOverflowers met Joel, Jeff and each other. There were several interesting development lectures (I liked Rory Blyth’s iPhone dev – mainly because of the way he presented, and Scott Hanselman's from Microsoft showing the new beta of Visual Studio 2010 and Asp.NET MVC beta 2). During the break, a guy from Microsoft gave everyone 4Gb of memory for their laptops – all in all, a very cool day.

If you are a geek like me, StackOverflow is highly recommended. If you’re an IT guy, you’ll find your crowd on ServerFault. And if you are just a regular computer user, post your questions on SuperUser. Whatever it is you are struggling with, chances are other people solved it before.

Wednesday, October 7, 2009

My (First) Chrome Extension

My attitude towards developing in new languages/environment has always been: you’ve seen one, you’ve seen them all.
All I require is a brief documentation of the new environment, a sample code or two and 15 uninterrupted minutes. Oh yeah – and a mission.

A good idea motivates you to learn the practical aspects of the new language, and forces you to merge your experience and existing skill set with the new tools you learn. I learned the hard way that if I can’t find something interesting to develop, my interest tapers off and I leave the new toy untouched.

I’ve been testing the Google Chrome web browser ever since it came out. While it was quite faster than FF (not to mention IE), I never completely switched to it, mostly due to the lack of extensions support. I’ve gotten used to the AdBlock Plus extension in FF, which allowed me to not see a single ad on any web site for the last 3 years (so much so, that for the brief time I had Google Ads on this site, I had to add my site to the exceptions list). But since Google lives of those ads, I was sure hell would freeze over and pigs become kosher before Google will support those extensions.

Wrong. The latest Dev releases of Chrome (version 4.0.213 and higher) started supporting simple extensions. I couldn’t wait to develop my first one. But I needed a theme – something my extension will do.

Introducing the Traveling Tech Guy RSS Marquee extension.

This little extension lives in your Chrome’s status bar, and scrolls the last 10 posts from this blog. Clicking a link takes you to the post. Hovering over a link shows the first 2-3 sentences from the post (thanks to Yaniv for the suggestion), clicking the icon collapses or expands the marquee, allowing you to save precious space in the status bar.

How to install:

  1. Get the latest version of Chrome (v 4.0.220 and higher) from FileHippo, and install it (takes less than a minute).
    [For advanced users: by default, Chrome only updates to release versions – v 2.*. You can subscribe to the Dev channel, or use the Google Chrome Channel Changer so your Chrome updates automatically to the Dev trunk 4.*].

  2. Browse to the Traveling Tech Guy RSS Marquee extension, click “save” and then “install”.

  3. In the status bar, you can see the blog’s icon:
    Clicking it will expand the marquee:
    Clicking it again will collapse it.

  4. To update, inspect, or uninstall (why would you?) the extension, select “Extensions” from the “Wrench” menu:
    or type “chrome://extensions/” in the address bar.


    You will then be able to see the extension details:

In the future, I hope to add more features to this extension, such as the ability to specify a different RSS feed, theme support, preferences support – who knows? I’m open to suggestions.
I also started working on an FF version for this – stay tuned.

Funny enough, the challenge wasn’t developing the extension, but hosting it. My server uses IIS7 and plain out refused to serve a file with the CRX extension. After a couple of days of back and forth with my hosting provider, I ended up adding the extension’s mime type to my site’s web.config file – and that did the trick.

Oh, and last piece of good news: hell may still be hot and pigs are definitely not kosher, but there’s an AdBlock+ extension for Chrome now smile (not working as well as FF’s, but getting there) - so Chrome is back on my menu.

And if you need an extension or a web applet developed for your site/product/company - you now know who to ask wink.