Category Archives: Uncategorized
Scalatra is a DSL in a string
Video of FOSDEM IronRuby presentation
At FOSDEM 2010 I got the chance to talk in the mono dev room about ironruby.
In this talk I extended the banshee application to work with IronRuby based plugins.
So without further ado here’s the link:
IronRuby: The .NET and Ruby love child
How I Got Started in Software Development
Michael Eaton started a meme with the question: How did you get started in software development?
Yesterday Simone Chiaretta tagged me in his post, so it’s now my turn to answer the questions and tag other bloggers:
On software development: the myth of no maintenance etc.
Jeremy Miller put a very intersting post up about the First causes in software development
While I don’t always like the how of delivering his messages, I think Jeremy is generally spot on. In fact he seems to voice my thoughts much more eloquently than I ever could. Anyway his post or series of posts is dealing with some of the choices he made concerning tools and development philosophy and it also tries to explain that while these tools seem to work today, there won’t be anything stopping him if something better comes along.
Now in that article he links to an article by the pragmatic programmers on the principle of DRY and orthogonality. For me the biggest problem of software development is not the techniques or the patterns but it’s the actual language people use. Till this day I still don’t know what orthogonality means although I understand what that word means in a development context. There are countless examples where people overcomplicate things by using difficult words, this is just one more. Anyway I digress
The article series he’s referring to is pretty interesting. If you have some time to kill I suggest you read them. It are 10 articles:
Part I – Don’t live with broken windows
Part II – Orthogonality and the DRY Principle
Part III – Good enough software
Part IV – Abstraction and Detail
Part V – Building adaptable systems
Part VI – Programming close to the domain
Part VII – Programming is gardening, not engineering
Part VIII – Tracer Bullets and Prototypes
Part IX – Programming defensively
The reason that I put these links up is not only because they are a great read but also because one of the things they say in one of the articles is that after you wrote 10 lines of code or so you’re effectively in maintenance mode the green field is gone. And that couldn’t be more true after I had some internal discussion about it I definitely agree with that statement and as such one of the primary goals of your development should not be on getting it out the door as quickly as possible but building it in such a way that you or somebody else can get in there and make changes without throwing away half the code base.
I hope you enjoy them as much as I did
And another view engine for ASP.NET MVC has been born
Andrew Peters wrote a view engine for HAML
NHaml (pronounced enamel) is a pure .NET implementation of the popular RailsHaml view engine. From the Haml website:
“Haml is a markup language that‘s used to cleanly and simply describe the XHTML of any web document, without the use of inline code. Haml functions as a replacement for inline page templating systems such as PHP, ERB, and ASP. However, Haml avoids the need for explicitly coding XHTML into the template, because it is actually an abstract description of the XHTML, with some code to generate dynamic content.”
Andrew and I share the same dislike for the xml family. XML is not fun to type, and I think his haml engine eases a lot of that pain. It results in far more readable views too.
2 view engines in one week and both from Wellington. Nice
Testing SSL on Vista
Today I had the requirement to add SSL encryption to some of the pages in one of my projects.
To test this I remembered that IIS6 had a tool SelfSSL and tried to use that.. failing my first attempt I also saw a folder OpenSSL in my tools folder. At which point i turned to google and google came up with this link to Scott Gu’s blog. I’m stoked about the fact that IIS7 has this ability built into it. Following the steps he outlines there helped me get going really quickly.
Thanks Scott
Doing a talk at the Alt.NET user group meeting
I’m doing my talk on the DLR and IronRuby again on wednesday for the Alt.NET user group meeting in Wellington. If you have the time please come along.
This is the invitation that went out:
Come along next Wednesday to our next .NET user group meeting. There’s
not that many left before the end of the year!Note that next weeks meeting will be at the Xero office, details
below. Please RSVP in a separate email to kirkj@paradise.net.nz so we
can organise catering.Cheers,
Kirk
Dynamic Runtime & Languages – What’s it all about?
Wellington, Wed 21/11/2007
Gather at 5:55pm, starting at 6:00pmPresented by Ivan Porto Carrero
Ivan will be presenting on the Dynamic Language Runtime and the Ruby
programming language.IronRuby is Microsoft’s implementation of the Ruby language over the
.NET CLR, and uses the new Dynamic Language Runtime to support the
dynamic language features of Ruby.Come along to find out what makes dynamic languages different to
object-oriented languages, and what make the DLR and Ruby interesting.Ivan is a regular speaker at New Zealand .NET user group events and
Code Camps, and is writing a new book on IronRuby.Venue
Xero
Level 1
Old Bank Building
98 Customhouse Quay
Wellington
(Above Workshop)
Generics overwhelming
Ayende put this post up which looks freakishly a lot like some code I wrote a couple of months ago.
public abstract class AccountServiceBase<T, K, Q> : IAccountService<K>
where T : BankImportSetup, IAccountData, new()
where K : class, IAccountData, new()
where Q : class, IEntityQueries<T, K>, new()
.....
The reason for building it this way is that I have to implement something for heaps of banks each one has a subtle difference in the way they are processed. But 95% of the code would be the same for every BankImportSetup entity.
This way I could save a lot of time by going a bit overboard on the generics side of it.
To cut a long story short. Generics are fun but they can be pretty overwhelming at first.
PS. My colours look very different on my pc. It's copy source as html that doesn't pick up all the colors resharper adds.
Get all the css classes in use on your page
By using javascript that can be done pretty easily. The script below requires prototype
var classes = [];
function collectClasses(ele){
var children = ele.childElements();
if(children.length > 0){
children.each(function(el){collectClasses(el);});
}
else{
ele.classNames()
.each(function(className){classes.push(className)});
return classes;
}
}
var body = document.getElementsByTagName(‘body’)[0];
collectClasses(body);
var myUniqueClasses = classes.uniq();
The myUniqueClasses variable holds all the classnames that are in use on your page.
VLite: Stripping down your vista install
One of my collegues at Xero put me onto this tool vlite which helps you build a custom ISO with only the features you need for your vista install.
Nowadays I’m running ubuntu x64 with vmware as my base system and I have a vista running in a vmware workstation virtual machine. I’m using vmware workstation instead of server because it allows me to use dual monitors inside my virtual machine which I think is abslotely fantastic. Thanks to Alex Henderson for pointing that out to me.
My vista has got sql server 2k5 and visual studio 2008 beta 2 installed.
So the stripped down version of vista fits on a cd instead of a dvd and is heaps faster than the regular install of vista. My vista only needs IIS I don’t need all the other stuff it has got.
I hope you will find this as useful as I did when I learnt about this tool.