Geeks With Blogs
Liam McLennan hackingon.net June 2010 Entries
Thoughts on a Sinatra-like DSL for Server-Side Programming with CoffeeScript
I read somewhere that Kent Beck likes to apply a strategy of taking a technique that works and exaggerating it, to see if the results are likewise exaggerated. He found that specifying the behaviour of components prior to implementation, and in small increments, produced good design, so he exaggerated it and now we have TDD. He found that strong engineering practices, rich communication and delayed decision making was a good way to run projects, so he exaggerated it and now we have Extreme Programming. ......

Posted On Sunday, June 27, 2010 6:20 PM

KeyRef Progress Update
Here are the original mockups for KeyRef and the implemented screens look like (apologies for the ugliness): both the application search, and the shortcut search, are working. I tweaked the application shortcuts page url, so now the url for visual studio shortcuts is: http://localhost:3000/app/s... Also, I have a page for entering new shortcuts that looks like: Now I can start adding shortcuts, which will be a big job. I’d like to get it online so ......

Posted On Tuesday, June 22, 2010 7:07 PM

.NET Configuration Service
My rule of thumb for storing configuration settings is: if it does not need to change hard code it if it needs to change but the user of the application can’t change it, store it in the configuration file if the user can change it, store it in a database This post discusses configuration data stored in the configuration file. To make my applications robust and testable I like to write a service that wraps appSettings. What I mean by robust is that it provides useful error data in the event that the ......

Posted On Monday, June 21, 2010 6:33 PM

Lessons Building KeyRef (a .NET developer learning Rails)
Just because I like to build things, and I like to learn, I have been working on a keyboard shortcut reference site. I am using this as an opportunity to improve my ruby and rails skills. The first few days were frustrating. Perhaps the learning curve of all the fun new toys was a bit excessive. Finally tonight things have really started to come together. I still don’t understand the rails built-in testing support but I will get there. Interesting Things I Learned Tonight RubyMine IDE Tonight I switched ......

Posted On Wednesday, June 16, 2010 11:53 PM

Ad-hoc String Manipulation With Visual Studio
Visual studio supports relatively advanced string manipulation via the ‘Quick Replace’ dialog. Today I had a requirement to modify some html, replacing line breaks with unordered list items. For example, I need to convert: Infrastructure<br/> Energy<br/> Industrial development<br/> Urban growth<br/> Water<br/> Food security<br/> to: <li>Infrastructure<... <li>Energy</li> <li>Industrial development</li> <li>Urban growth</li> ......

Posted On Wednesday, June 16, 2010 2:55 PM

.NET CoffeeScript Handler
After more time than I care to admit I have finally released a rudimentary Http Handler for serving compiled CoffeeScript from Asp.Net applications. It was a long and painful road but I am glad to finally have a usable strategy for client-side scripting in CoffeeScript. Why CoffeeScript? As Douglas Crockford discussed in detail, Javascript is a mixture of good and bad features. The genius of CoffeeScript is to treat javascript in the browser as a virtual machine. By compiling to javascript CoffeeScript ......

Posted On Sunday, June 13, 2010 10:43 PM

Photos from MS Webcamps Sydney
View Full Album ......

Posted On Saturday, June 12, 2010 2:43 AM

KeyRef – A Keyboard Shortcut Reference Site
The mouse is like computer training wheels. It makes using a computer easier – but it slows you down. Like many of my peers I am making a effort to learn keyboard shortcuts to reduce my dependence on the mouse. So I have started accumulating browser bookmarks to websites listing keyboard shortcuts for vim and resharper etc. Based on the assumption that I am not the only person who finds this untenable I am considering building the ultimate keyboard shortcut reference site. This is an opportunity ......

Posted On Friday, June 11, 2010 7:27 PM

Managing .NET Deployment Configuration With Rake
Rake is a ruby internal DSL for build scripting. With (or without) the help of albacore rake makes an excellent build scripting tool for .NET projects. The albacore documentation does a good job of explaining how to build solutions with rake but there is nothing to assist with another common build task – updating configuration files. The following ruby script provides some helper methods for performing common configuration changes that are required as part of a build process. class ConfigTasks def ......

Posted On Thursday, June 10, 2010 10:16 PM

Funny Captcha
I like this capture because it reminds me of the ‘England Prevails’ dialog from V for Vendetta ......

Posted On Thursday, June 10, 2010 4:25 PM

Less is more: The making of a 37 signals style pizza
For years now we have been hearing from 37 signals that the way to bake a great web app is to build less – well the same is true of pizza. Our western hedonism has led us to pursue ever cheesier and more stuffed crusts at the expense of the simple flavours. All we are left with is a fatty, salty heart attack in waiting. The Italians know that the secret to great taste is simplicity. With that in mind I decided to base my pizza masterpiece on these simple flavours: tomato sopressa (spicy aged salami) ......

Posted On Wednesday, June 9, 2010 5:32 PM

Console 2: An upgraded windows console
Lately I have been using the windows console a lot. I find that I often need a number of console windows open at once. The regular windows console does not handle this well. Console2 is a more advanced console for windows. It has a tabbed interface and a number of other nice features. It supports alpha transparency if you have Mac envy, it has improved text selection and copy/paste and it is far more customizable than the default console. If you look in the background of the above image you can see ......

Posted On Wednesday, June 2, 2010 5:08 PM

Twitter Customer Sentiment Analysis
The breakable toy that I am currently working on is a twitter customer sentiment analyser. It scrapes twitter for tweets relating to a particular organisation, applies a machine learning algorithm to determine if the content of tweet is positive or negative, and generates reports of the sentiment data over time, correlated to dates, events and news feeds. I’m having lots of fun building this, but I would also like to learn if there is a market for quantified sentiment data. So that I can start to ......

Posted On Wednesday, June 2, 2010 1:47 AM

Random MongoDb Syntax: Updates
I have a MongoDb collection called tweets. Each document has a property system_classification. If the value of system_classification is ‘+’ I want to change it to ‘positive’. For a regular relational database the query would be: update tweets set system_classification = 'positive' where system_classification = '+' the MongoDb equivalent is: db.tweets.update({system_cl... '+'}, {$set: {system_classification:'pos... false, true) Parameter Description { system_classification: '+' } the ......

Posted On Tuesday, June 1, 2010 7:15 PM

Refactoring an ERB Template to Haml
ERB is the default view templating system used by Ruby on Rails. Haml is an alternative templating system that uses whitespace to represent document structure. The example from the haml website shows the following equivalent markup: Haml ERB #profile .left.column #date= print_date #address= current_user.address .right.column #email= current_user.email #bio= current_user.bio <div id="profile"> <div class="left column"> <div id="date"><%= print_date %></div> <div id="address"><%= ......

Posted On Tuesday, June 1, 2010 1:43 AM

Copyright © Liam McLennan | Powered by: GeeksWithBlogs.net