Archive

Archive for November, 2007

My first Greasemonkey Script: Goodbye ASP.NET Forum Ads

November 21st, 2007

Greasemonkey is an add-on for Firefox. Through JavaScript it allows anyone the ability to dynamically modify a page as, or after it’s being rendered in the browser. This lets anyone trim the DOM, remove ads, and modify page in anyway they see fit (it also opens up some serious privacy concerns with XSS). Anyhow, I spend a fair time on the ASP.NET forums, but the advertisements have always made for a somewhat negative, but tolerable user experience.

Today I finally broke down and wrote my own Greasemonkey script – now formally known as “The ASP.NET Forums Beautifier” for lack of a better name.

The Script Before and After:

Before – usually the ASP.NET Forums look like this:

After – with my script running in Greasemonkey we get this:

note: the greasemonkey icon, and complete lack of fluff / advertisements on the second screenshot.

Creating this script was simpler than I expected. It was a matter of skimming through an article on How to write Greasemonkey scripts, using Firebug’s JavaScript Console and Firefox’s Error Console to test my code (after all, Firefox is the new IDE, Firefox as an IDE), and an hour later, Viola! No more ads.

The YUI blog and Douglas Crockford in particular, have inspired my JavaScript renaissance. JavaScript is really interesting, it’s a functional, loosely typed programming language that uses prototype-base inheritance. Developing in JavaScript is a real treat from some of the more statically typed languages.

Download Greasemonkey and “The ASP.NET Forums Beautifier” for yourself. :)

Author: Adam Kahtava Categories: CSS, DOM, Firebug, Firefox, JavaScript, greasemonkey Tags:

Alberta TechFest 2007 was a success : My highlights

November 12th, 2007

This past weekend I attended the Alberta TechFest (an event put on by Calgary .Net User Group). TechFest resembled a code camp, but provides more seminars / sessions geared at a higher level. The sessions were geared towards: project management, the big picture of the Agile process, open source alternatives, as well as some in depth (show me the code type) presentations on Mock objects (using Rhino Mocks), Microsoft’s new Acropolis framework, Test Driven Development (TDD), and Refactoring.

My highlights:

  • The session on Agile Project Planning With User Stories, and Refactoring Automated Unit Tests Using Test Smells and Patterns presented by Gerard Meszaros. I’ve been on a couple projects that could be characterized as “Bad Agile”, so Gerard’s presentation hit many chords, one of the comments he made really stuck out. He said something like: “it’s not about the Agile process, it’s about the results, it’s about delivering…don’t be dogmatic”. Sure it’s obvious, but it’s nice to hear it from someone else.  I’m currently in the process of purchasing Gerard’s book: xUnit Test Patterns: Refactoring Test Code.
  • Mock objects with Rhino Mocks was another great session (by Shane Courtrille). I’ve been using Rhino Mocks for a couple months now, but there’s always so much to learn from someone with more experience.

I’m trying to make it a point to attend more of these events in an effort to expand my community.

Author: Adam Kahtava Categories: .NET, Calgary, Code Camp, Events, Musings, Software, Testing Tags: