Last week in review

September 29, 2008 § Leave a comment

Ok, that’s a week of employment official over… and I’m certainly not regretting it 😀 As an added bonus of more mb_server hackage, you guys will also be seeing an increase in blog posts – with at least one a week of this nature (i’m hoping to do Sundays, but was too busy yesterday).

Starting back at Monday not too much interesting stuff happened – I just spent time fixing some minor issues in the code and getting it up and running on my new dev system. This had a nice bonus of allowing me to refresh myself with the code, and make a mental roadmap, if you will, of what I need to be doing.

Tuesday saw some changes to make the codebase more consistant in some areas, which makes certain things in templates much easier (like [% %]).

Wednesday saw the first new feature additions, and added: verification of user registration via emails, conflicting artists are detected by the add/edit artist form, and the data quality changing form was created; this is modular, so I should be able to support other entity types using it easily; and finally I quickly added some code for artist subscriptions (no links to unsubscribe, but the code is still there!)

On Thursday I reworked the authentication system and thus removed one more wrapper module. Now Catalyst’s authentication system interacts directly with our MusicBrainz user model – again, cleaner code. I added the remove track form, along with merge artists (which was more complex than I expected – as I had to write code for searching).

After working with the form system (which I’m generally really happy with), I decided it needed a bit of refactoring. I re-wrote the system for compound fields first. Compound fields are parts of forms that require multiple user inputs, but should be treated as one data value. Examples include dates, and I also wrote tracks as compound inputs (track number, track title and duration). This allowed me to create the Add Non Album track form quickly, and then I made a final change to the form presentation layer (ooo, look at how businessy I sound) – just something a little more modular.

So, I’m happy with the weeks progress, and have no large concerns about moving forward. The immediate next steps will be to continue working through the huge amount of forms to implement – but I’m aiming to get 2-3 a day done.

In lighter, more general news – check out the up-and-coming flamewar in mb-devel 😉 I joke of course, but choosing a new VCS (if that’s what we do) is a tricky topic – so if you are a developer, or are interesting in becoming one, we could really do with your feedback!

Oliver Charles, professional computer programming consultant, signing off! 😀



September 23, 2008 § Leave a comment

Ok, time for an update I think!

Since my last entry I have removed facades from my codebase (hurrah!) – this means that internal we now through one object around, which reduces complexity quite a bit (no more checking if something was exported to the template or not). Because I’ve been enjoying working with objects like this so much, I’m slowly changing a few subroutines that returned “derived data” (eg, a track returning artist name) to return that data through the correct object. Let’s return to the track, for a better example.

In the old code, if you needed to find the artist for a track, you’d do $track->artist_name. This stinks though, because there’s more than just the artist name, so now we do $track->artist->name – which is better, because it’s what we actually meant (and thought about in our heads). Furthermore, this makes it dead easy to get other artist information:

$track->artist->LoadFromID; # Load everything we can from the database about artists.
my $sort_name = $track->artist->sort_name;

I’ve considered making that LoadFromID implicit (that is, if something is undef, then the artist will load itself and try and again) – but I think I like this explicit form more. Thoughts?

In other news… I’ve introduced some slight changes to the templates, mainly exporting a few “prettifying” subroutines that map integers to names (ie, the release type and status names) – but still have some thoughts about how to make this a bit more organised.

Now, as for the future. I’m going to make a few more changes to make our system act more like a relational system should (ala the above changes), and then I can finally resume work on the editing interfaces! This work should be pretty fast – I’ve already worked out the details with the edit artist page, so I just need to extend that over different edits.

And… there’s some quite exciting news that you’ll hear about soon… but I’m not quite ready to mention it yet 🙂 Stay tuned!

Where Am I?

You are currently viewing the archives for September, 2008 at Cycles.