I’ve stopped doing april fools pranks, hoaxes and jokes, since unfortunately my jokes had a tendency to become true. “Dude, we’ve got a tax-misunderstanding” led to half a year of explaining why nothing was wrong. “DHL wants us to pay a strange import fee” wasn’t fun when DHL called three days later. I talked to your boss and hear Microsoft has bought your company… a couple of days later… you get the picture.

But, that doesn’t stop me enjoying aprils fools day, my favourite came early with the EU requiring online retailers to refund their customers before getting the merchandise back. Let’s have a look at great april fools jokes and pranks:

  • In 1957 a show called Panorama announced that a mild winter had increased the Swiss spaghetti harvest (see YouTube)
  • The BBC had a commercial for a documentary of Antarctica’s colony of flying penguins
  • In 1980, the Big Ben was reported to be switching to digital, and the clocks hands would be sold to whoever called in first
  • Branson’s hot air balloon that resembled a UFO in 1989 was a great one (video below)
  • What I’m sure would tame many flamewars online was also an april fools joke: the proposed law that it’d be illegal to use the Internet while drunk from 1994
  • The April 1998 issue of the New Mexicans for Science and Reason newsletter contained an article claiming that the Alabama state legislature had voted to change the value of the mathematical constant pi from ~3.14 to the Biblical value of 3.0

See these great clips:

Do you have other april fools jokes, hoaxes or pranks that are worthy to be included in this very informal all-time best list? Leave a comment :-)

 

It’s been two years since I first wrote on using SQLite for iPhone SDK. Since then, iOS has come a long way, especially when it comes to storing data. But still, much remains the same. For instance, FMDB is still a great way of accessing SQLite databases directly, and if you’re most familiar with SQL and don’t want to learn too much new stuff (learning Objective-C and Cocoa can be enough by itself), this is a great way to write your first apps.

But, with iOS 3.0 came Core Data, and I was so happy when it did. Marcus Zarra wrote a great book with PragProg that I wholeheartedly recommend: it’s easy to read and thorough at the same time. I followed his workshop at NSConf ’09, which was great, and I understand people have enjoyed the videos he and Scotty produced over at iDeveloper TV. I use Core Data in all my projects now, and its backed by SQLite, so I get a great mapping while having the performance of the database.

It being the year of the NoQL-databases, though, a post wouldn’t be complete without saying you can now ditch SQLite all together and use CouchDB. CouchBase have made a developer preview of CouchDB for iOS that I’m looking forward to try out. CouchDB has great replication, but I still need to learn more about how to handle security and access to data so to not give all my application users the keys to the “castle”.

Happy coding :-)

 

I’m “imported” to Denmark, and guess what: so is the Danish easter ale tradition. As far as I’ve understood, the tradition started at the end of the 19th century when a few pubs in Copenhagen around easter would import double-bock beer called Salvator from the German order of Paulaner. This was a beer the monks had been allowed to sell since the 1780s. Whether it was actually the beer of the Paulaner monks is somewhat of a mystery, as this brand was so strong that all the Bavarian stouts were simply called Paulaner Salvator. Serving these beers turned out to be a huge success, so in 1905, Carlsberg, the big Danish beer brewery would make their own easter ale and sell it on tap. The year after, Tuborg, their arch rival, followed with their own easter ale on tap.

Today, there are many small breweries all around Denmark, and each brewery with respect for themselves will have their own easter ale. Some will have them a pinch lighter than a christmas ale, some will have a bottle of pure summer. Speaking of christmas ale, it’s actually the easter ale tradition that has given us the christmas beer tradition, not the other way around!

 

Next up is an ecological beer from Ørbæk.

The first thought was that this beer aspires to be a trapist, yet isn’t as rich in the flavour. It has a pleasant darkness (I prefer dark beer), is well balanced, nice foam and it goes well with cheese (we tried that) and chocolate. It could have a bit more notes of flower and spice, it’s easter ale after all, but I get the impression this is a beer I wouldn’t mind serving guests all year around, perhaps except for christmas.

On a minus note, it has a faint metallic smell, but apart from that, this is a beer I can fully recommend, and I’ll be sure to buy a few more of. I should add that the hints of coffee were a nice plus. The label is nice, but I believe that previous years they used to have an easter bunny. In short: go bunnies! ;-)

 

As you might have noticed, I’m trying out different kinds of content on my blog lately. It’s all stuff I love doing, just interesting trying out new stuff. Next up on “new ideas” is “easter ales 2011″, where I thought I’d introduce this years crop of easter ale available in Danish supermarkets.

First up is Påskeæg, økologisk påskebryg by Thisted bryghus. It’s much like a traditional pils, so if you like a classic pils you’ll love this beer. It’s slightly sweet from the malte, but the hop taste is prominently bitter.

A bit too light for my preference in easter ales, but not a bad start on this short series. I’m usually a big fan of Thisted Bryghus, so I think I’ll stick with some of their other beers.

 

In this first video blogpost I follow up on my two blogposts from 2005, I show you how easy it is to put a Pentax m42 mount lens, one of the most popular kind of lenses from the 1950s up until the late 1980s, on a Canon EOS DSLR body. Back in 2005 I used the EOS 20D, now I use the EOS 5DmkII, but it’s just as easy.

The lens I put on the camera is a Helios 85mm f/1.5, second generation, meaning that it has a 42mm screw-mount instead of the original 39mm. The adapter is a m42 EOS AF confirm adapter that you can find on eBay for around $15.

 

I’ve been looking for a great-looking and great-sounding speaker system for my Mac. And just so we’re clear: great-sounding is for classical music, and I expect equal or better than my Celestion/NAD system I bought for ~10.000 NOK when I was 15. My problem has been that either the speakers filled too much in my office space (3.5 m2), and/or they looked really bad.

My brother-in-law recommended BOSE, and specifically the Companion system. I didn’t find anywhere to hear them, but I took a gut decision and ordered one. They simulate a 5.1 system, and in that they actually do a quite good job. The tweet/high frequencies isn’t all that great, but if you’re playing computer games, watch movies or listen to something else than classical and jazz, I’m sure out of the box you’ll have no problem with it.

What’s funny is that I’ve grown used to them, and having set the equalizer in iTunes to boost the high frequencies a bit, they actually do a fine job. For sure, I still prefer my HiFi system, but it comes pretty close at a third of both the space and price. I still believe there’s room for great-looking speakers that are worthy of a low-end HiFi system (meaning the equivalent of a relatively cheap Denon receiver with some not too expensive stereo speakers) that can outperform the BOSE, but until they come around this is a quite nice setup. They don’t fill much and listening to Fontana’s Sonata Secunda with one of my favourite recorder players is pleasant. Not like a HiFi system where it feels like the performers are in the room, but still really nice. And for those occational games, the 5.1 emulation works great.

 

A while back I bought an IRIScan 2, a little scanner that could be laying in the kitchen drawer to scan incoming bills. It’s not a very fast scanner, it doesn’t have battery for very many pages, but for incoming mail, perhaps some music scores and such, it’s quite good.

It scans to color JPEG which makes the files a bit large and gives many shades of white and black, and light bleed from the surroundings is actually a bit of a problem, especially in paper folds. But this is all forgiven with its ease of use: turn it on, insert paper, and it’s saved to either the internal storage, an SD card (my preference) or a USB key. The reason I prefer the SD card is simply I had it laying around, and it’s easy to take out and insert into a card reader.

The reason I use a card reader is simply that the device doesn’t transfer the images quickly off it. But if you’re not in a hurry, that’s even easier. When connected to your computer, it will only charge or transfer files, there’s no way to hook it up to a scanner program, and if you start scanning, it will eject the storage area first. This was a surprise to me, but no problem. The only problem I have with it isn’t even with the device, but with my iPad. For the iPad to recognize the images on the SD-card through the photo connector, you first need to rename the scanning folder to DCIM. It would be nice if either the iPad would look through more folders on the SD-card, or if IRIScan had a possibility of calling the folder DCIM. Then it would REALLY be portable scanning :-)

All in all, I’m very happy with the device. I use it for incoming mail, and it’s quickly done. Please find attached a letter scanned that has not been processed in any way. Example of a document scanned with IRIScan

 

Like many of you, this morning I went on the Apple Store online and ordere my iPad 2. I’ve had a chat with many shop keepers today, both Eplehuset, Elgiganten and Humac. What seems to be the genereal consensus is that less than 10% of the iPads they had asked for have been delivered. So there is a major shortage. My idea was that Apple would prioritize their own channels, but my order from early this morning when they opened is scheduled for delivery in more than a month! So I guess I was wrong, and just like so many others I’ll just have to wait…

 

Whoops, I seem to have killed my themes, plugins and uploads dir when upgrading… not good. So there might be some dead links that should have had content around. For that I apologize. I’ll do my best to restore them, but should you discover anything missing while surfing around on my blog, do tell.

 

I’ve been developing apps for the iPhone since the early betas of iOS 2.0, and one of the things I’d like back then was to use SOAP services. Back then, Apple had an old, half-implemented command-line program called wsmakestubs that you could use to generate some stubs that half worked. That program has not been updated, nor has any more SOAP support been added to iOS itself.

What has changed, though, is the eco-system. First off all, we can talk about it and share experiences. Secondly, people have made and shared interesting stuff. One of my favourites is SudzC. It’s very interesting, but has been stuck in alpha for a while. Commercial offerings such as WSClient++ are also interesting, but what I’ve found is that, for the most part, I don’t need all this support I was looking for.

Hand-crafting the XML is easy enough. Just grab SOAP Client and fire of a request, then get the raw request and modify that XML. Likewise, check out the raw response and use XPath to grab the parts of the answer you need. Fire off the request with ASIHttpRequest just to make it easier. All in all, getting hooked up to your SOAP service shouldn’t take long.

For examples of using XPath, check out this example at Stack Overflow.

So back to the topic, the state is that it’s not well supported, but it doesn’t need to. Doing it yourself has become easy with great supporting frameworks for requests and XML handling in the iOS eco system.

 

@adurdin has made a skin for the iPhone simulator that may wear less on your eyes when you’re sitting there developing all day: iPhone simulator beautified.
Visit his blog for instructions on how to install it.

 

The kind of errors I hate the most are the ones you cannot even find in the documentation. When you get no compiler warnings, and even an incentive from your preferred auto-completion tool to go straight into them.

Todays such error is the following:

byte[] buffer = /* something that fills the buffer with the contents of a string*/;
String stringBuffer = new String(buffer, Charset.forName("UTF8"));

What’s wrong here?? Compiles fine, looks fine…. let’s read the doc… fine. Except, as it turns out, for long buffers, it will truncate the string and add a trailing . So you need to do something like this instead

String stringBuffer = new String(buffer, 0, lengthOfBuffer, Charset.forName("UTF8"));

That gives you a correct string, not truncated and not with a at the end. *sigh*

© 2012 Niklas Saers' blog Suffusion theme by Sayontan Sinha