I do lots of integration. I mean, lots, so I’ve seen a lot of different systems, APIs and integration methods and the one rule that always stands is, ‘Know Thy System’. In theory that’s what you should do. In practice it’s always appended with ‘to varying degrees!’. This is almost always down to API documentation or the level of (or lack of) system knowledge of the people who look after it. The politics of integration is another matter entirely and prolly worth a book. Maybe I’ll write one!
I’ve been rebooting my interest in the Commodore 64 recently, after a layoff of around 20 years! The last time I used a 64 was back in 1992 when I wrote a BASIC word processor on which I typed my honours thesis and printed out on an MPS printer, if I remember the model correctly.
I still have the old machine, printer, tape drive etc but I’ve been relearning everything on VICE before I get round to powering them up again. So this is a wee tutorial on how to display a simple Hello World message in C64 assembler. It won’t be ‘type and run’ sort of thing as I’ll show how to add a BASIC header so you can compile the object code and run it as a normal program from BASIC. So, let’s crack on.
I’m working on an iOS app that lets me identify mountains based on my location and bearing but one of the first things I wanted to tackle was the navigation. How to get from screen to screen. Initially I tried a tabbed app layout but that seems so ‘yesterday’ these days and instead I plumped for a sliding navigation model, ala Facebook app. It’s not as complicated as it sounds once you’ve got your head round iOS development so this post takes you through constructing an app with three coloured views. Red, green and blue with a central controller handling the swiping to navigate among them.
This is a fairly simple wee tutorial on how to get the Raspberry Pi camera module working, taking a picture with it and uploading it to Dropbox using Ruby.
If you don’t have Ruby running on your Pi you can follow the steps on my Ruby on Pi tutorial.
So I’ve migrated the blog to Octopress, got FTP deployment working, and deployed via FTP so what’s left I hear you say? Well exitwp doesn’t change the internal post links. In the Wordpress post, an internal link to another post, for my blog setup is:
while the link to the same post in the Octopress version of the blog is:
clearly some ruby is required.
They say Octopress is for geeks and having converted my blog to it I needed a way to deploy as my hosting company won’t allow rsync access. Fortunately you can deploy over FTP using lftp but that’s for another post. I thought I’d done most of the geek work in converting the blog but, my oh my, was I wrong!
This is a weird one, yet not weird at all really. I was playing around with Grand Central Dispatch (GCD) in viewDidLoad:
dispatch_queue_t queue = dispatch_queue_create(“com.codebrane.onlineTimeQueue”, NULL);
… some code to retrieve the time from an online service
self.textField.text = responseAsText;
It worked fine when textField was a label but when I changed to use a textField to get the full response displayed, it produced this error:
Tried to obtain the web lock from a thread other than the main thread or the web thread.
This may be a result of calling to UIKit from a secondary thread.
I’ve been playing around with various integrations and decided to knock up a simple Twitter bunkup where you can login to a very simple Sinatra app using Twitter and send a tweet to say so. It’s very very simple as I wanted to concentrate on the Twitter integration rather than the app functionality. So how do you do it? First thing you need is a Sinatra app. I use rvm to manage dependencies so I like to create a .rvmrc file that loads the appropriate gemset whenever I cd into the directory:
The above will create a twitterauth directory, create a twitterauth gemset, install the required gems (note the high security on the twitter gem as it can do all sorts of things with your twitter account if you let it) and create an rvm .rvmrc file in the directory that will do the equivalent of rvm use 1.9.3@twitterauth every time you cd into it. The first time you cd in you’ll see gubbins about running the script for the first time and you have to choose to do so. After that it’s seamless and the gemset is loaded without any interaction.