Alistair’s cakeBlog

Software development and philosophical musings

Entries Comments


On the coolness of things

28 July, 2010 (07:57) | The Rantorium | No comments

Here’s an interesting take on “cool”. Not really sure whether to agree with the change of use of the word “cool” as I’ve never really used it. Cool for me has always been a Hollywood term but these days it more or less means “interesting for the next 5 secs”. A cool tweet, a cool video. Yes, that’s mildly interesting and I’ll completely forget about it in a minute or two. Cool means stop what you’re doing and waste some time watching a guy try to pull a caravan through an exit too small for it and see it get ripped off its chassis. LOL! or should that be ROTFL? Cool! Now for something completely different.

Dangerous Ruby!

14 July, 2010 (12:29) | Software Engineering, The Rantorium, ruby | No comments

In my last place, we employed a graduate software engineer and one day I was asked to review his code. So we sat down and had a look at an app he was working on. Can’t remember what it was now but I seem to remember it was written in Visual Basic, though ‘m not sure about that either now. Anyway, having a glance over the code, large chunks of it were commented out with a warning along the lines of “this code is dangerous, do not use!”. OK, fair enough, graduate and all that and we worked together to sort out problems. That’s a fairly common thing when you’re starting out in coding. You do things like that.

Then, years later, I came across Ruby and its “!” mechanism. Put simply, if you put ! after a method name, you’re saying “this method is dangerous, do not use”. It’s a coding convention which most people follow and what’s worse is, you’re not meant to write a “dangerous” method unless you’ve already written a “safe” version of the method.

Why on earth would you want to write “dangerous” code? Dangerous usually means the method changes a param, rather than returning a value computed from the param, so I presume dangerous equates to more “efficient”. Who’s kidding who here? Efficient for the compiler maybe but what about the maintenance programmer? Wondering where all those bugs come from and why every method ends in a !

What state has software engineering reached when languages positively encourage you to write “dangerous” code?

Blackboard heading for Supernova?

13 July, 2010 (13:25) | Blackboard, The Rantorium, eLearning, integration | No comments

A long time ago, during the early days of the Bodington collaboration, those that know about these things reckoned the LMS, or as it was termed in those days, VLE, would become an aggregator of learning services, rather than a monolithic blob of press ganged functionality and at the time, when open source was doing well in education, albeit quietly, that seemed a reasonable outlook. Indeed, we’ve seen the slow eduPunky rise of the PLE, although I’ve seen this transmogrify from meaning basically an offline VLE, sorry, LMS, to what it’s known as today, namely a loose and not very well connected collection of “MyStuff”. That I use for, learning like, well, you know what I mean. I keep all my bookmarks in Delicious, my feeds in Google Reader and my mates in Facebook and I ignore all institutional content or attempts to contact me to make me do stuff. Stuff that’s to do with my learning, like, you know what I mean. Coz learning’s just about reading a load of Stuff then turning up for the exam, innit? Read more »

A new slant on the discovery problem

7 July, 2010 (13:33) | FAM, The Rantorium, eLearning | No comments

For a long time now, users of e-resources that offer Shibboleth access have been confronted with the discovery problem. That first hurdle one must jump to get anywhere near the resource. The supplier must ask you, “Where Are You From?” but because you can’t speak to a web site and say “University of Blah”, you’re presented with the WAYF service, where you get to scroll endlessly through hundreds or thousands of institutional identity providers, if you don’t know the exact name of your institution as it is known to, for example, the UK Federation.

I’ve been a great fan of WAYFless URLs and probably a bit of a zealot in this area as there really is no need to force a user through a WAYF if the supplier supports WAYFless URLs. Such a URL takes the user directly to their institutional identity provider’s login page, otherwise known as their Identity Provider (IdP). Two click access. One on the link, one on the login button. Voila, discovery problem solved. However, not all suppliers have WAYFless URLs and they mostly all have their own versions of a WAYF service, which is confusing to the user and more than a bit annoying. The supplier has a resource the users wants, the user knows where they’re from and yet the supplier insists the user must trawl their awful WAYF. Read more »

Guanxi Engine 2.2.1 release

1 July, 2010 (08:34) | Guanxi | No comments

A minor bugfix and feature upgrade release for the Guanxi SAML/Shibboleth Engine. You can download it from sourceforge.

  • 2.2.1
  • Updated org.guanxi.sp.engine.service.shibboleth.ShibbolethProfileService. Fixed bug where it was sending the time param as Zulu time instead of Unix time
  • Updated org.guanxi.sp.engine.service.generic.GenericProfileService. Added support for loading a default entityID for a Guard from the config
  • Updated resources/log4j.properties. Fixed bugs in config for GenericProfileService, SAML2ProfileService, ShibbolethProfileService, which caused double logging to Tomcat log
  • Updated WEB-INF/guanxi_sp_engine/config/spring/services/generic/generic-profile-service.xml. Added entityIDs to genericProfileService

Listing files in a servlet directory with JSP

30 June, 2010 (10:44) | howTo | No comments

One of those tedious things I had to do recently, so I thought I’d publish as a gist here.

Language shifting in TIOBE

20 June, 2010 (07:24) | Software Engineering | No comments

Having a quick look at the June 2010 TIOBE index, it’s good to see the languages I use are top of the bunch, Java, C, C++ and PHP, with the fairly new addition to my portfolio, C#, moving up the list into sixth place, just below VisualBasic. The even newer addition to my portfolio, Objective-C,  has jumped up to number 9, from 45 last year. So it’s nice to see my portfolio of languages are all in the top ten. Read more »

Solving COM threading issues in a .NET durable topic subscriber

17 June, 2010 (12:23) | GADfly, c# | No comments

I’ve recently been adding Groupwise functionality to GADfly which means using COM as that’s the only way to access the Groupwise Admin API, via the Groupwise client. I’ll go over how to do that in a later post but once I’d plumbed the COM functionality into GADfly via my MatrixClient for C#, I started to get a weird error. The basic setup is I register a message handler to deal with GW messages with MatrixClient and when a message arrives on a JMS topic, my durable subscriber gets the message, parses out the info and create a Groupwise account from it. However, the event handler was causing the GW class to barf in a big way:

Unable to cast COM object of type 'AdminTypeLibrary.SystemClass' to interface type 'AdminTypeLibrary.DIADSystem'.
This operation failed because the QueryInterface call on the COM component for the interface with
IID '{35FC2357-811A-11D0-8A96-00805FC16077}' failed due to the following error:
No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)) Read more »

Programming : The Angel that needs The Devil

25 May, 2010 (08:12) | Software Engineering, The Rantorium | No comments

There’s a Buddhist adage that you must look to your impact on the world and how much harm is being caused by what you do for a living. It’s called Mindfulness. And there’s the concept of Green Computing, which is really just the word Computing preceded by the word Green. There’s nothing green about computing. It relies on electricity and plastic which rely on oil which is at the opposite end of the environmental spectrum. And as a programmer I need hardware, i.e. computers of some sort, in order to program.

Today I applied Mindfulness to what I do and it cut me to the bone. I program the iPhone but in order to get an iPhone on my desk, a 16 year old girl died of a heart attack in a Taiwanese factory. A 19 year old and a 21 year old jumped off the roof. One the one hand I hear Steve Jobs bandy around platitudes about customer satisfaction and porn free living, while the young kids who make his hardware commit suicide due to the working conditions. Young kids who not only could never afford the Apple Experience but who actually took their own lives bringing it to us. And what do programmers do with this hardware? They make Fart Apps. Read more »

Morning coding challenge – selection sort in C

20 May, 2010 (09:14) | C++ | No comments

It’s always good to start the day with some code. So I was overjoyed when I read the latest challenge at The Reinvigorated Programmer to create a Selection Sort in any language you want. The only proviso was you couldn’t test it first. i.e. no TDD, no tests, just thinking about the problem. You right the code, think, write some more, think some more, code, think, code think and so on and when you’re confident you’re finished, you run the program and see if it works. Read more »

« Older entries