Pragmatic Programmers website is broken.

WillFuckingShipley.png

Food Chain

foodchain.jpg

via Don’t Eat My Brain.

Evil Xmas

evilXmas.png

Finished evil xmas shopping. Bought junk that’s the wrong size & color for everyone so waiting in line to exchange is guaranteed.

Battery...

Dear Apple,

Please send me the battery that you said you would. I’m not really liking when I see this:

battery.png

That’s not much fun at all.

Regards,

Matt.

Bleed The World

This video is totally worth it too. Follow the link to see this one.

At Christmas time we should always spare a thought for those less fortunate than us. After 20 years of bleeding the world, the global financial community has fallen on hard times. These people desperately need our thoughts, prayers and lots of our money. If you have any investments or savings left, or any money left over at the end of the month please, please give generously. Merry Christmas.

From Bleed The World

YouTube - Fainting Goats

Thanks to the Macalope, I came across this video on youtube:

Fainting Goats: From YouTube - Fainting Goats

Mac OS X Internals: A Note on Automounting MacFUSE File Systems

A Note on Automounting MacFUSE File Systems

Mac OS X, like many other Unix-like operating systems, includes the “autofs” file system layer that make automatic on-demand mounting of remote resources possible. See the man page for automount(8) for more details.

From Mac OS X Internals: The Blog » Blog Archive » A Note on Automounting MacFUSE File Systems

Awesome. This might replace the need for ExpanDrive. And be even more automatic.

Sometimes, the bugs aren't mine...

I’ve just spent about five hours working out some kinks with data migration between an SQLite database, and a PostgreSQL database. I’m using SQLAlchemy as the transfer tool, since the newer PGSQL database is created and only ever used through this interface.

The big issue I’ve hit is with some Numeric types. One table has Numeric values, which are NULLABLE, but for some reason when I try to load objects from this table, decimal.Decimal throws an exception.

But here is the weird bit. If I rerun the query, and try to load the same object a second time, it succeeds.

Since I needed to access all of the rows from this table, I had to keep trying to load them until I’m no longer throwing exceptions, and then finish. I had a nice code sample from SubEthaEdit, but that seems to have a bit of a bug with the Copy As XHTML feature in the newest build (submitting a bug report now).

Using Self-signed Certificates with WSMethodInvocationRef

I’ve played quite a lot with the Cocoa methods for doing WebServices: lots of people whinge about how little support is given to SOAP from Cocoa, but I actually think it’s not too bad.

To create a SOAP request is quite complicated, but it’s easy to abstract most of this out.

The first step is to create the WSMethodInvocationRef, using WSMethodInvocationCreate. This takes three arguments, one of which is the endpoint URL, which for most cases will be the same across all of your application’s requests. The second is the method name, and the third is the protocol you are using.

You then just need to set the parameters, namespace, headers and so on. This takes care of generating all of the SOAP Envelope stuff, and you can then just use this object to pass to WSMethodInvocationInvoke. This returns a CFDictionaryRef, which is toll-free bridged with an NSDictionary, and gives you status information, as well as results. Notably, this dictionary contains one with the key “/Result”, which contains another dictionary with all of the result data - and this is the cool part - it has already been converted back from XML into whatever structure it represents!

I’ve wrapped this up a little further into some classes - they are still a little under construction, but I’ll release them on bitbucket or something when I’ve cleaned them up a little. I may even make it into a Framework. Which I have been meaning to learn how to do.