Andy Loughran

Learning Development, or Developing Learnment :)

My background is not typical of a Systems Administrator. I started my life in IT as a marketing intern, the some time doing basic server administration and Desktop support; to now find myself working fully on Linux Servers. It's a long way from the Psychology and Business degree that I graduated with back in June '07.

I've never been a bedroom hacker, despite very much wanting to be. The majority of my time spent learning has been during waking hours, in the office. I've had a few projects that I've taken home with me, but due to my limited background, I found myself limited to fixing things other people had written, rather than writing stuff from scratch. I'd mostly learnt how it shouldn't be done, rather than how it should be done.

Ironically, this has meant that until now I've been fixing other people's problems, tidying up others designs, and adding my voice to conversations pointing out logical discrepancies and extending other people's ideas. This is one of the great freedoms that Open Source software has given me - I don't have to write anything from scratch - someone else has already done it for me.

However, I'm acutely aware that sooner or later my weaknesses are going to land me in hot water. It may be a casual observation, but most of the time I come across something that completely baffles me, I'll come back to it in a couple of weeks after either doing a bit of research on it or playing with something similar - and I get to understand it. There have been a few moments when I've looked back at decisions I've made and in the meantime have new knowledge that would have made the decision a "no-brainer", when at the time it seemed like a 50/50 split.

The more I experience these moments though, the more I realise that it's all about growth, and experience. I'm sure there are many CS graduates or other programmers out there who have got certain gaps in their knowledge that get filled over time. I'm sure there are many who are going through the same angst that I am, wondering "am I good enough to be doing this.. have I missed something?" In hindsight I'd say that's a brilliant attitude to have, because being overconfident about one's ability is likely to end you up in an even bigger spot of bother.

I guess the key is to never fool yourself into thinking that you've learnt enough. I've got a couple of books in the post, covering 'Pragmatic Programming' and 'Design Patterns' - I'm sure they'll provide me with the material I need to keep plugging my gaps, and improving my technical thinking, whether I end up moving into programming rather than Systems Administration, or some other field entirely.

Django League Table

I'm trying to write a league table for some sport results using django.  At the moment my model looks pretty basic:

class Scores(models.Model):
    matchnum = models.AutoField(primary_key=True)
    homeuser = models.ForeignKey(User, related_name="hmuser")
    hometeam = models.ForeignKey('teams', related_name="hmteam")
    homescore = models.IntegerField()
    wayuser = models.ForeignKey(User)
    awayteam = models.ForeignKey('teams')
    awayscore = models.IntegerField()
    pub_date = models.DateTimeField(auto_now_add=True, editable=False)
    def __unicode__(self):
        id = str(self.matchnum)
        return id
    class Meta:
        verbose_name_plural="Scores"

class Teams(models.Model):
    teamname = models.CharField(max_length=40)
    def __unicode__(self):
        return self.teamname
    class Meta:
        verbose_name_plural = "Teams"

However, with the information in this simple model - I should be able to generate a league table, with the following fields:

Team Played # Won Drawn Lost Goals For Goals Against Goal Difference Points

So how to put this into a Django App? Well I need some advice, as my original method was to edit the save() function of the model to input fields into a new model - however, I should be editing things at the form level. I'd also like a 'generate league' method, rather than a method where a league is generated at the end of each score addition. The main advantages of this approach is that I can:

  • Generate the League from existing score data.
  • Future Users can generate the League from their data.
  • Leagues can be generated at the end of each 'gameweek' - rather than just at the end of each game.

Django is a fantastic python framework that I'm immediately getting to grips with - but as this kind of application (simple as it is) - is one that's scalable and may be useful to many other users.. I want to get it right from the start.

I'll be tagging the posts with 'djangoleague' if you want to keep up with development - and if anyone wants to use the project/help me out with it - please post in the comments and I'll get back to you.

Me-ware versus Groupware

I'm sure I'm not alone amongst the ubuntu-uk crowd, in that I run my own mailserver.  With ubuntu, it was very easy to set up postfix and cyrus, and retrieve my email via IMAP.  The great thing about IMAP is that wherever I am, providing I have an internet connection, I am constantly up to date with my email.  It's all out there on 'the cloud' - the buzzword of marketeers in the IT industry in the moment.  To have data constantly accessible is fantastic - no need to work about syncronising between different PCs and the like - it's all there 24/7 (unless I throttle my VPS.. which has been known).

I've used squirrelmail, roundcube webmail, horde, and Zimbra on my server over the past two years.  The first two are targetted more at the individual email user (though can serve multiple unique accounts), whereas the latter two are groupware suites.. which include tools for collaboration, shared calendaring, shared email, file storage & exchange .etc.  However, they were a bit 'overkill' for a server running about 4 mail accounts.

Me-ware

The problem is, that I want the functionality of packages like horde and zimbra - but scaled down to suit me.  I want to be able  to syncronise my phone with my calendar, I'd love to have a centralised LDAP-based addressbook, which I could other packages to - but I don't need a multi-tiered directory service.  You might say I'm being a bit naive... the software is free so why complain when it does loads more than it needs to?

Well, Bongo to you.

Bongo?

Bongo is a project that caught my eye possibly over 12 months ago, when Daviey in #ubuntu-uk gave me a demo.  It's a smart looking project, that looks to answer exactly my needs.  It looks clean, simple - is open source and sticks to open standards.. so it'll link it with it's bigger cousins (like horde and zimbra) should I want to share calendars .etc.. but it's also targetted at users.. not organisations.  0.5 release is due out before linuxexpo in London, 23-25th October 2008. I intend to keep my eye on it, and hopefully even help out a bit; and get it running my own system aasap.

My programming career begins (with bugfixing).

It's taken me a while, but just over 12 months learning the basics of programming, I'm finally contributing and commiting code to my company's SVN repo.

One of the things I like about programming, is that it seems to suit me.  Having not done any programming at all before 12 months ago, jumping in at the deep end and going into a career that requires it wasn't an easy step to take.  However, I've had some good guidance from my colleagues - in that I've not settled upon a single language.  I wouldn't say I know any language well, but I'm reading and understanding code better than I've done before.

The hardest part for me, is looking at a problem and seeing my own solution - rather than the solution that's coded infront of me.  Once I've understood the train of though of the original programmer, it's alot easier.. however, at the start I was failing to do that.

At the moment I'm happy making modifications and bugfixes to programs.  It's simply enough stuff, where auditing and testing the problem takes by far the majority of the time.  However, I'm understanding things better - and feel like I'm finally making some decent progress.

I know it's possible to contribute to open source in other ways than just coding (I've been doing that for the last few years) - but now I'm coding I hope to submit code to the projects I like.  It's been my aim for a while.  I've set up my bzr repo, but most of my code at the moment I'd hope to submit as patches to other projects.  Who knows what the future will hold.