ucantblamem

Archive for the 'Work' Category

FAAD: AAC Decoder Issues on Ubuntu 7.10

14th Nov 2007

Musicadium has been a fairly significant focus for the development team here at SM2 for a while now. One of things I’m working on at the moment is putting together a library to manage the cross-coding of sound files for the various stores we supply content to.

Although we’re not actually going to be using this tool, I was playing around with the FAAC/FAAD encoding/decoding on Ubuntu-server and ran into some issues which I thought I’d share in-case other people have had them also. (more…)

Hack: spacing inline elements with CSS

5th Oct 2007

Inline (HTML) elements don’t do left or right margins… No, really; you can’t put margin’s on an inline element and expect it to behave. Quite often I’ve been able to hack my way around this by adding padding to the element instead, but this doesn’t always work, especially on images.

For many months I’ve had this issue with breadcrumbs (pathways) in Joomla! 1.0.x. An example of the type of output you’re likely to find from Joomla’s mospathway() function might be as follows:

<span class=\"pathway\"><a href=\"#\" class=\"pathway\">Home</a>
<img src=\"#/arrow.png\" alt=\"arrow\" />
<a href=\"#\" class=\"pathway\">Sub page</a></span>

You can see that it outputs images without any surrounding elements, so we can’t use my little padding hack. However, today while working on a project it hit me: Hmm… I wonder if word-spacing will affect images the same way it does text???

So, I gave it a go and sure enough, word-spacing works a treat. My simple solution works as follows:

.pathway {
	word-spacing: 1em;
}

.pathway a {
	word-spacing: normal;
}

You can see that we add the word-spacing (duh!) and then reset the word-spacing inside the anchors, that way we’re only really affecting the spacing around the images.

This little solution is going to be a welcome addition to my little “toolkit” as this problem has often found me going to such length as floating all the elements, using margins and then clearing a whole bunch of stuff to make it work; which is both expensive (in code length) and messy. I haven’t tried this trick on other issues (like spacing inline list-items for columns) etc, but I can only imagine it’s going to pretty much make my year!

Back me up scotty

24th Sep 2007

After a recent evaluation of our current systems, we have been doing quite a few infrastructure updates in preparation for three new work-mates and the launch of some high-traffic websites. As part of these updates, we realised that our development rack has a serious lack of backup power. In fact, a couple of weeks ago we accidentally tripped the buildings’ breaker and our Windows Server 2003 box hadn’t even shut-down before the UPS ran out of juice.

In light of this, my Technical Manager introduced me to APC’s UPS selector; A neat little web-application which helps you figure out how many volt-amps of power you’ll need to run your specified hardware for a specified amount of time.

After putting in all the details of the hardware you want to run, the application gives you a few options, listing the volt-amp rating of each UPS. From this you can get a rough idea of the size of UPS you’ll need and then check out other brands and retailers to get the best price.

Unfortunately, the amount of power our development rack requires is fairly substantial and as a result the cost of the recommended UPS gave us quite a shock (no pun intended). But it was interesting to play around with the tool and see some of the ridiculous products (check out the photos) APC have on offer.