Category Archives: Uncategorized

iPod nano 2nd generation on Ubuntu 6.10 (Edgy)

My girlfriend and I both have iPods. I have a 2nd gen shuffle, she has a 2nd gen nano. Both were working fine on my Edgy install, however, the 2nd gen nano wasn’t being ‘found’ by Gnome, and therefore not appearing in Banshee (which is what I really wanted).

There is a workaround, it’s a replacement for Gnome’s HAL. Simply follow the instructions here for results:
http://www.tigert.com/archives/2007/01/09/ipod-and-ubuntu-edgy/

Tesco Internet Phone for Linux

After wasting many hours messing around with VoIP solutions, I’ve finally decided that Tesco Internet Phone is the way to go. There’s a few good reasons why I think this, it’s easy for anyone to obtain and install. This was one of the main factors in my decision. With Tesco Internet phone, you don’t have to open ports on your router, it comes with a USB handset, so no need to get one of those, and you can just pop down to tesco and pick one up for really cheap (£15 I think) WITH a £5 calling credit thing.

Anyway, on to setting it up on linux. You’ll need to install kiax or some other IAX capable client. Unfortunately, Ekiga CVS still doesn’t support IAX (as far as I can see) so you’ll be stuck with a qt or kde client.

You’ll probably have to set up on a windows machine unfortunately, but basically, the main thing you’ll need to know is the Tesco IP server address, which is:
vrv.lon.uk.voicestream.net.au
Use your phone number as login and the password you set up. Then under Kiax’s settings you should be able to choose /dev/dsp1 to use the handset. There’s a few little quirks. The hash key doesn’t work, as don’t the volume controls, although there’s probably a way of getting these to work. More later!

Quickones – Short, useful linux screencasts

I recently stumbled upon a really interesting site called Quickones which has a series of screencasts on how to use various things in Ubuntu (among other distributions).

For example, there’s a short guide on how to get flash to work on Ubuntu. Alan Pope delivers a very well paced and easy to follow screen cast. These screencasts are highly recommended to newcomers to the Ubuntu Linux distribution.

CakePHP

This was written haphazardly in a forum, please take it as-is (or as a rant of some kind)!
Ok, so before I started using cake I went in to the #cakephp channel on freenode and asked:

“yes, but what about when my application gets really complicated?”
“don’t worry, it’s totally flexible”
“I love cake”
“etc..”

I was still skeptical, but we had a small project coming up at work and a fair bit of time to do it in. Cake fit the bill perfectly. A success!

We’re just coming to the end of a project say, 2 or 3 times the magnitude of that first one. I’ve now had time to form some real solid opinion about CakePHP.

CakePHP has some good points and bad points. One of the nice things about cake is it throws you into the MVC (Model/View/Controller) pattern way of thinking, and without having to learn ruby or something weird like that. The code I’ve been working on has been a lot easier to code because of this nice seperation..although in some cases it has taken slightly longer.

For example, a simple login form can take slightly longer to make as you have to create an login action member to your controller (a function), and then the view (template) and then the model (I’ll get on to that) rather than one quick bodge.

Having said that, I really like it so that gets thumbs up!

Now for why it isn’t quite as good as people say (or at least why I think it’s a bit shit). Models.

So instead of just doing $data = mysql_fetch_assoc($query, $handle) or whatever, you use cake’s ‘model’ abstraction layer, so you’d do something like $this->Model->fetch($data) or something..I don’t remember exactly.

There are a few problems with this:

First and foremost, you need to learn quite a lot, and it’s poorly documented for when you have many to many relationships etc..
CakePHP is poorly documented anyway!
It’s silly, because like a lot of these ‘bright’ ideas, it ends up being wayy more complex than just throwing in a simple (or complex) query.

Yes, for quite simple projects, you (me) could probably get away with using Cake’s modeling bit. However, for complex stuff, you’ll find you’re using $this->Model->query();

That brings me on to why I might continue to use cake in the future…

It’s nicely flexible, next time, I won’t bother trying to use any of Cake’s modeling features to get my data. I’ll just use normal queries..we found we were doing that by the end of the project anyway. I think for beginners, Cake’s modeling language *might* be easier to learn than SQL, but I know SQL and that works well for me…and you don’t have to be messy with it either.

Second thing I really like about cake is that a lot of stuff can be done for you by it’s helper library, for example, $html->dropdown() (or something to that effect) adds a drop down list from an array in your view.

What would be really cool is a cakephp without all the chaff of the model stuff…some kind of cakephp for people who know and love SQL perhaps?

Well, that’s my take on it. If you’re thinking about using it, first I’d suggest you think very hard. Cake is still in it’s infancy, and you’ll find quite a bit isn’t documented at all (I had to speaker to the developer to get some answers). Secondly, it might be easier/better..especially if it’s a one person project to write your own framework based around all this. I’m talking about a very ‘lite’ framework, perhaps just a few files, no more than 200 lines of code?

I’ve had a bit of experience writing my own framework, first one I tried sucked, second one worked really well and I’m now in the process of making a third simply for knocking up sites really quickly. How often do you find yourself coding the same things?

Happy baking!

Internet Explorer 7

Yup, Microsoft’s IE7 is finally out. You’ll notice every link here actually goes to www.getfirefox.com instead of Microsoft’s site. This is because there’s no point in getting IE7 as firefox has been able to do everything IE7 does and more, and still continues to. Check it out, it’s far more stable, you can get loads of cool extensions for it and it doesn’t support Microsoft.

Using IE7 also makes it much harder for people like me (web master guy), as we now have to make work arounds for yet another of Microsoft’s buggy browsers that don’t support well known standards. Can you imagine being a kettle maker and having to supply 6 different plugs for your kettle? Same thing.

VoIP – Best SIP provider / overall solution

So anyway, for those of you that don’t know…Laura and I are moving to Australia next year. This means we’ll need to sort out a proper voice over IP solution, but with so many different deals and packages around, what’s best?

I’ve ruled out Skype as it’s non-standard and therefore you’re quite limited on what hardware and software you can use, also I don’t like the idea that other people’s phone traffic will pass through my internet connection. I’ve also recently started using a SIP provider called sipgate which is really cool as you get a free local PSTN number. However, I’ve just learnt that some friends of mine are using Tesco Internet phone.

If anyone has any experience with the Tesco internet phone, please leave a comment…I could do with knowing whether it uses SIP, whether it’s easy to use with analogue telephone adapters and SIP routers…what the settings are, whether it’s possible to dial an internet IP etc.. thanks!

[Update]

Ok, I’m pretty sure Tesco Internet Phone is the way to go:

  • The rates, although not the best are still pretty competetive.
  • It’s very easy for someone else to get a tesco phone and use it.
  • The mobile call rates are also good.

When you put the tesco solution together with Pipex’s free local/international calls adsl package and this Billion VGP router, it’s quite cool.

[Update]

Well, today I went out and bought two of the tesco internet phones…I’ve since discovered they use the IAX protocol (and not SIP), which although open, isn’t the best as not many clients (and pretty much no hardware) supports it.

So looks like I’m taking one of them back.. I don’t think I’ll be allowed to take back the other as I’ve used some of the free credit for testing. Not a total loss though, the handset will come in handy, and is worth a tenner itself. Seems to work fine just by plugging it in on Ubuntu dapper.

[Update]
There is some hardware out there. And software, and I also managed to connect to the Tesco service using a different client which confirms that it is indeed IAX2. Unfortunately it isn’t as popular as SIP, which is a bit annoying. However, I think it could well be the way to go once I get the right software/hardware… Ekiga should support IAX2 soon. And I found the AG-168V which is perfect, although it’s hard to get hold of.

[Update]
After buying two atcom 168V’s, I discovered atcom is a terrible make of ATA and should be avoided at all costs. They basically don’t work. Lots of problems connecting to the net.

CakePHP – Static pages under the root

I’ve recently started using CakePHP, I don’t really understand it too well, but the first thing I noticed was that any static pages you have normally would go under www.site.com/pages. I thought ‘this sucks’, so I’ve made a very simple work-around, which isn’t great, but it seems to work.

The idea is that someone will go to www.site.com/something and then cake will look for the something controller, if it can’t find it, it will normally throw up an error. By altering this error page, we can get cake to do the pages controller action instead of the error one.

So what I did was add the file: views/errors/missing_controller.thtml which contains:

$this->requestAction('pages'.stripslashes($_SERVER['REQUEST_URI']));

That seemed to do it. Not elegant at all, I know, so if you find a nicer way of doing it, or write some nicer code, please give it to me and I’ll post it on here.