Articles tagged 'coding'

Ooh, embarassing Apr 10 2006

Hows that for cross-browser compliance? Just realised (thanks to my bro) that when viewing this very blog using Internet Explorer it appears it was asking users to download the page as a file. This will be down to the work I was doing on accept types and content types a while back, and it must have snuck by my rigourous multi-browser regression testing system ;-)

Anyway, one quick fix later and even IE users can see the content now :-)


Technorati Tags: , , , , ,

Comments

Building blocks Apr 10 2006

So before I get cracking with a few ideas I’ve got going on, I wanted to get my base framework and build environment sorted. After taking xFramework offline and turning all of the useful code I wrote into a more condensed, useful set of libraries, I then decided to work on a few build tools.

First up was to refine the unit-testing libs and console tool that was part of xFramework. Re-named, and re-built, I made it leaner and faster. Previously, there was one core library - this was the same one the console tool used to execute tests, and the client library containing the unit-tests referenced to tag unit-test classes. Now, it’s two separate libraries - a client framework lib referenced to mark up unit-test classes with attributes, and a console tool with core library (and a reference to the framework lib) to execute unit-tests themselves.

Secondly, I wanted a build server. I searched a while back, and came up short. There are plenty out there, but the criteria I’m after is:

  • Automated build setup, with an easy-to-use configuration structure
  • Plugin interface for a totally extensible build and reporting process
  • Cross-platform, runs on both Linux and Windows, and preferably Mac OS X too
This is the basics of what I wanted, but it’s a start. Anyway, I decided a while back I’d write my own, and got a way through it before more important stuff took precedence. This time, I decided to stick at and get it done. I started from scratch, only referring to the code I wrote previously for a couple of things, more as a source of comparison. I now have a fully extensible build system, which so far has the ability to:
  • Checkout a working copy from a Subversion repository, either using the “file” or the “svn+ssh” protocol. I’ll write further SCM support as and when I need it.
  • Build the project, so far the only supported plugin is an MSBuild plugin, for building MSBuild project files such as Visual Studio 2005 solutions and projects (of course the API should be fairly similar to the XBuild tool for Mono, which was a port of MSBuild, and I’m thinking about a NAnt provider somewhere down the line)
  • Run some code metrics, so far just a simple line counter for each file meeting the configured criteria, and a total line count
  • Run unit-tests on the code, using my unit-testing framework, and a bridging plugin for the build system
  • Generate some documentation, using my own documentation engine (see below)
  • Cleanup after itself
All of this can be done using a series of plugin schedulers, also extendable to provide further scheduling options, however currently providing hourly and daily schedulers, aswell as a run once scheduler (runs immediately, once only) and a continuous build (building over and over) for testing. Eventually I plan to write a scheduler that queries the source code system for updates, thereby turning it into a continuous integration build system too.

Now that this is done, and tested, there are a few other plugins I want to write for it, but on the whole it’s good enough for me to develop with now. The build reports are also extendable - an interface is defined so that plugins can be written to deal with the build report, and so far I’ve written one provider that saves this report to file, and one that mails it to me, both of which I use. This means I now have my project building nightly, with everything automated, and me being notified of the results.

The third and final tool I’ve written, is a documentation engine. This came about purely because I tried writing an NDoc documentation plugin for my build system, to no avail (it didn’t like my .Net 2.0 assemblies). I browsed around, and found two things: 1) there is little or no activity currently occurring on the NDoc project, and 2) a few users are starting to modify the source themselves to provide a source distribution of NDoc with support for .Net 2.0. I took one look at the Xml documentation files that the C# compiler outputs (the ones that NDoc uses) and decided instead of using unsupportable, possibly unreliable user hacks to get my documentation needs accomplished, I’d write my own little engine, and in this way I’d get exactly what I needed. And so my third development tool in my toolchain, a core library defining a plugin interface for document generation, was born. It allows project files to be configured (defining the Xml document input files to use), and it allows plugin documentation generators that handle the actual output - I wrote one simple plugin to provide Html output for now, more advanced output could be Linux style man files, a Windows style help system, MSDN docs, or a multi-page Html documentation web site solution (currently it chews out one Html file, using JavaScript to allow expanding/collapsing of elements). I have written a console tool to build documentation from the project file, and of course the build server plugin is used to generate documentation directly from within the automated build process.

I now have an end-to-end build process, which, while some tweaking and a bit more code writing is necessary, does the job more than adequately for me. I feel far more confident going on to build upon a lot of my ideas, knowing I have the building blocks in place to write and develop applications more reliably.


Technorati Tags: , , , , , , , , , , ,

Comments

Muby, or Ronad Apr 6 2006

Two interesting points of view on a debate between two technologies that I didn’t think could be so comparable - Monad (MSH), and Ruby. Ted Neward puts forward his case for using Monad, because of its scripting ability, and provides some interesting usage of the scripting syntax to back his views up. Glenn Vanderburg says he’s sticking with Ruby however, and goes on to explain why, cleverly writing the same script that Ted did using Monad, in Ruby - just 17 lines of code, instead of 37 using MSH. Both posts are worth a read, however my opinion? I think Ruby has my vote all the way - it’s cross-platform nature, and the fact that it is a dedicated scripting language (rather than a shell with a neat syntactical scripting language to back it up) are really winning points for me. After all, I’d be happy combining Ruby with Rails to write a fully-fledged web application - but besides utilities/maintenance scripts, I don’t give Bash a run out very often. In the same way, I think at first people may say “look at how cool Monad is, look at what it can do!” but in the long-run, it’s use will be relegated to command line oriented tasks, and the “real code” will be written with languages like Ruby. My $0.02 on an interesting topic of conversation.

UPDATE: it looks like the original script in Ted’s article actually originated from a post by Lee Holmes - and since the debate, he has re-written the script, matching the Ruby version almost line for line - I guess that blows the whole lines of code argument out of the water then. Really it just comes down to what you are trying to write - in this case there’s not a lot between the two, however in other projects there may be a clear advantage to using one or the other. I’m happy to have both at my disposal :-)

Technorati Tags: , , , , , ,

Comments

I'm getting real Apr 6 2006

I’ve decided to get real - today I went ahead and purchased a copy of Getting Real from 37 Signals, and I plan to get stuck in over the next few days. Expect a review soon.


Technorati Tags: , , , ,

Comments

So true it makes me cry Apr 4 2006

This is a funny post, however it’s so true it actually smarts a little. I’ve been the developer on the end of it, the recipient of the nonsensical buzz words, lingo, quizzical looks and random remarks. It is obviously some kind of global experiment into the limits of a developer’s mind, the level’s at which he or she cracks and loses it. I’m sure this is just the beginning - I bet middle management types could write entire book’s of this kind of material :-)


Technorati Tags: , , , , ,

Comments

Read the signals Apr 4 2006

Here’s an informative review of 37 Signal’s online-only book, Getting Real. It’s something I wanted to get round to reading, so I think I’ll have to lay down the meagre $19 and pick myself up a copy. Of course, I mean, download myself a copy. Interestingly, Jason at 37S provides a 30 day update on the book, and DHH comments on how well the self-publishing route has gone for them. I think I’m now convinced it’s worth my time to read it (I’ve got a Rails book, a Ruby book, an ASP.NET book, and I’m part way through an Avalon book right now), even if I do have to sit at my PC to read it (may have to investigate - is there a decent PDF reader for the Sony PSP yet?). In the mean time, I wonder what 37 Signals next hit will be, how will they keep it real, but still provide me with another interesting, functional, useful product?


Technorati Tags: , , , , ,

Comments

Link blogging Apr 4 2006

Ok, in order to cut-down on the amount of link blogging I’ve been doing, here’s a post with the rest of the links I’ve been wanting to get off my desk last few days:

  • MSBuild Community Tasks Project - a collection of community written, useful MSBuild tasks
  • Scott Hanselman’s experiences of toying with an experimental Monad Subversion provider, as part of the AnkhSVN project
  • More Monad/MSH related tomfoolery - a tool for working with and scripting with MSH, MSH Analyzer
  • Some kind of uber-guide / set of articles on home studio recording, and how to get a decent setup together (sound engineering and home recording has always interested me - I’m going to organize my thoughts, so expect more on this soon)
  • iFolder goes open-source!
This is it for now, enjoy the links.


Technorati Tags: , , , , , , , , , ,

Comments

Stick this in yer pipe Apr 3 2006

A great demo of the power of the ASP.NET processing pipeline.


Technorati Tags: , , ,

Comments

Ex-Framework Apr 3 2006

As some people may or may not have noticed, I have given up on the xFramework project. The various related project url’s now point to this very blog, and I guess the reason I gave it up is because I figured it just wasn’t that useful. There were no other contributors, so there are no licensing issues - obviously any one who took a snapshot of the licensed code is free to continue to work with that code based on the terms under which it was licensed, however going forward the repository has been retired, and I will no longer work on or continue to update xFramework. Going forward, for those that are interested, I will take the most useful parts of xFramework (namely the reflection helper code, the unit-testing framework, and the web/Xml stuff) and use it to form my own “internal” framework, upon which I will base a few applications I’ve been dreaming up. I’m hoping this will be a more streamlined approach for me, and might work out with better results than if these applications were based on a separate open-source framework I had to maintain aswell.

More news to follow on the result of this change, and the applications I’m working on, shortly I hope.

And for those wondering what happened to my series of articles on Ruby on Rails, I’m working on a BIG next installment, that’ll be a complete walkthrough of my experiences creating a simple database web application, from start-to-finish. The idea is that all the basics, resulting in a fully functioning app, will be completed by the end of this next part, and the following tutorial will then fill in some fancy details, like some advanced style techniques, AJAX, alsorts of extras.


Technorati Tags: , , , , , ,

Comments

Free software at it's finest? Apr 1 2006

This is why I’m starting to switch over where possible to free software, and in particular, why I wanted to get a fully functional Linux desktop up and running (which I’ve now done with my old shuttlebox, an AMD64 3200+ with a gig of RAM, and Fedora Core 5 on it).

Diva is fully functional, commercial grade video editing software, that’s open source and free. Although this is the initial 0.0.1 release, it’s already looking professional, and feature packed. A product of the Google Summer of Code, kudos to the main man behind it, and a real testament to the power of Mono/Gnome, and some keen coding. Awesome.


Technorati Tags: , , , , , , , , ,

Comments

Aesthetics Mar 18 2006

Few minor updates to the blog software yesterday evening, resulting in only a few visual changes, but giving me even more power over the design. After the last round of changes I made I still wasn’t satisfied with the level of customization that could be achieved, but now I think that pretty much anything should be possible with it! For the time being I’ve kept the changes modest, over the next few days and weeks I’ll be making some design changes to the blog, and also hopefully launching a few sites using the software, all with differing designs ;-)


Technorati Tags: , , ,

Comments

Scrawl updates Mar 4 2006

Big updates last few days to the software I use for this very blog. Firstly, an almost complete rewrite of the software itself (Scrawl), turning it into a fully blown content management system, allowing far greater customization. I can now use Scrawl to host multiple sites, mapped to different domains, and each site allows static content to be added, new blogs to be created, posts to be added, aswell as comments and blog categories too. I still have feeds available for each blog, and an XML-RPC interface so that I can write this very post, and all my others, from within Performancing. On top of that, the way Scrawl has been restructured makes it nice and easy for me to write new plugins, to host other types of content, such as reviews, polls, charts, stats, anything I can think of!

The style can be fully customized - expect the style of this blog to change over the coming days as I play with it, and each site hosted on the Scrawl software can have its own design. I plan to host more sites, for different projects and ventures, using the software.

It uses a nice model view controller architecture now, using my recent additions to xFramework to great advantage, and then it uses Xml and Xsl transforms to display the data. All in all, much better, faster, and more reliable!

So that’s it really, the only downside was the url change required, however the old url now redirects to this page (the RSS feed url redirects to the blog HTML page too however). But with the new system, I can change my blogs design as many times as I want, aswell as add features and updates, without affecting any of the core stuff, like the post data, or the url structure. Scrawl is here to stay, and soon I want to allow people to use it for their blogs, sites, project pages, anything. If you have an idea of what you might want to use Scrawl for, do get in touch.


Technorati Tags: , , , , , , ,

Comments

Page 3 of 3 | Previous page