The Guinea Pig in the Cocoa Mine

Underground Cocoa Experiments

NSConf: Rethinking Syncing

I am back from NSConference 5 that took place in Leicester last week. The event was incredible, and I have never come back so tired from a conference.

The talks were of very high quality. Thanks to Scotty’s organization, they were also varied in topics and varied in lengths. I had never been to NSConference before, but it seems that blitz talks were separate from the main talks in the past. This year, “blitz” talks (15 mins) were nicely interspersed between “full” talks (40 mins), which resulted in well-balanced sessions. The result: time seemed to fly.

The evenings were also fun and a great occasion to meet new people and drink beer. Between the intense days full of inspiring talks and the engaging nights, I did not get a lot of sleep. As an extra, I managed to catch some kind of virus before the trip to the UK. The coughing and sore throat did not help with the sleeping.

The icing on the cake was that I was selected for a blitz talk on Wednesday morning. The loud talking and the coughing had the unfortunate result of leaving me voiceless on the morning of my talk, but with enough medication and a good microphone, it was not as bad as I had feared. In case you are curious, the talk was called ‘Rethinking Syncing’. I presented the approach we are currently taking for Dropbox-based syncing in a new app in development. I am making the slides available in two formats:

Integral Rectangles

I was recently bitten by the silly behavior of NSIntegralRect:

NSRect NSIntegralRect (NSRect aRect);

… If the width or height of aRect is 0 or negative, this function returns a rectangle with origin at (0.0, 0.0) and with zero width and height…

For some reason, I had figured integral rectangles were better for some of my views, so they would be pixel-aligned (maybe not such a smart idea to start with), and NSIntegralRect seemed like the perfect API for that purpose. The problem was those same views had a dynamic height set in code, that started with a value of 0 before content was added. As documented, as soon as one of the dimension is zero, the rectangle is deemed rubbish by NSIntegralRect, and the other dimension as well as the location are thrown out with the bathwater. The bottom line: my views were not showing.

You are warned.

Upload CSS Files to S3 Using Transmit

My inexperience with web publishing has caused me a few days of questioning and frantic reloading. The content of this blog was being displayed, but without any of the CSS applied. And this even after I checked again, and again, and again, that the css file was there, and that I could even download it from my web browser. Finally, after browsing the files on S3, and looking at the file metadata, I was reminded files on the web have a ‘content-type’. Of course, had I googled for transmit s3 css, I would have found the answer.

Welcome to the Cocoa Mine

Hello, world! This blog is aimed at developers. Most of the posts will probably deal with the development of native applications on OS X and iOS, in particular using the Cocoa framework.

I make my living from the sales of Findings, a lab notebook app for scientists and researchers. The best way to support me is to check it out and pass the information to your friends working in science or in research. Thanks!

This blog is managed using Octopress, with the static files hosted on S3. To get this to work, I followed the instructions posted by more adventurous souls. I like the design and the way it works, I like using Markdown, and it seems to work OK for now.

Why is it called “The Guinea Pig in the Cocoa Mine”? For this, you just need to understand why my other blog is called “The Guinea Pig in the Coal Mine” (which I use very occasionally to post very random, mostly boring, thoughts). From there to here, the subtle variation in title should be obvious, and it should be very clear that I could not have picked another name.

This is me on stage at NSConference 7.

Credits: @danielpunkass