Archive for the ‘Technical’ Category

Google using private APIs? Not really…

Friday, December 12th, 2008

app-apple
Google recently admitted to breaking the AppStore rules in their iPhone application, which fuelled a growing wave of resentment, prompted by the belief that Google were abusing their position as industry leaders to gain a competitive advantage in the market. The critics claim that a similar application submitted by anyone else would be rejected by Apple and never make it to the AppStore. Why should there be one law for Google, and another for the plebian masses? Shouldn’t the Google application be pulled from the AppStore until they abide by the rules, as others have been? (more…)

User-friendly (but not developer-friendly)

Tuesday, November 25th, 2008

Imagine you’re coding away on an IDE that you haven’t used for a while, and becoming reacquainted with it. You get to the point where you want to play with breakpoints, and, of course you have some trouble remembering the keyboard shortcuts. Some IDEs make your life easier than others…

In Visual Studio 2005, you hit Ctrl-B to set a breakpoint. If you want a really quick breakpoint with no conditions, hit F9. And use either Ctrl-Alt-B *or* Alt-F9 to manage them. That’s pretty simple. If I don’t know what I’m doing, I can do Right Click->Breakpoint->Insert Breakpoint, and Debug->Windows->Breakpoints (that last one is pretty well hidden!). I cut my teeth on PCs, so I’m probably biased, but I like Visual Studio.

xCode is even slicker – I can either hit Apple-\ to get a breakpoint, or do a single-click in the gutter. Smooth. Viewing all the breakpoints is relatively straightforward with Alt-Cmd-B, and from there I can easily see how to add a condition to an existing breakpoint. I reckon Apple win that one, though I’d have preferred the breakpoint shortcut to have something to do with the letter ‘B’.

Over to Carbide.c++ 1.3, an Eclipse-based UI, where I can either set a breakpoint with Right-click->Toggle Breakpoint, or use Ctrl-Shift-B. Now, how do I list them? Window->Show View->Breakpoints tells me that the shortcut is Alt-Shift-Q, then hit B. Yes, you heard it right. I had a play around, and found that the combinations Alt-B, Alt-Shift-B, and Ctrl-Alt-B are all completely unused. For some reason known only to Nokia though (and I thought they were supposed to be good at UI?!), a two part, four key sequence was more logical.

Guess what my least favourite IDE is…

Memory usage in UIImagePickerController

Wednesday, November 12th, 2008

UIImagePickerController has plenty of issues. One of the first to be widely discussed was its memory leak which shows itself when you try to access the PhotoLibrary on the simulator. Fortunately, this leak is limited to the Simulator and does not show up on Device. It has also apparently been fixed in iPhone OS 2.2 – though you obviously need to be aware of it if you are coding for older versions.

There is, however, another more serious problem with the image picker on device [1] (more…)

Views of UIImagePickerController

Tuesday, November 11th, 2008

The standard image capture in API in the iPhone SDK is the UIImagePickerController. There is much discussion on the web about how this can be customized via subclassing, both from the viewpoint of technical feasibility, and from the viewpoint of being allowed onto the AppStore. It is generally accepted that going direct to private frameworks is unacceptable, even though this arguably can give a better user experience. Phanfare had their app pulled from their AppStore for using the PhotoLibrary private framework, and returned with a new version that instead customizes the UIImagePickerController experience.

I took an in-depth look at the view structure that the standard UIImagePickerController creates. (more…)

SSH on the iPhone and iPod Touch

Wednesday, August 20th, 2008

SSH is undoubtedly a useful tool and the iPhone and iPod Touch are great portable ways of connecting to networks; put both together you can be a sysadmin on the move! So what are the options for this? The Apple AppStore has a few SSH clients, I decided to take three – SSH, iSSH and TouchTerm – out for a spin. (more…)

It Just (doesn’t) Work

Thursday, August 7th, 2008

The new iPhone SDK requires that developers upgrade to OS X Leopard, which is a nice excuse for most of us to drop 100 bucks on a new operating system that does, err, exactly what the old one did. I am sure I’ll come across some amazing new feature that I couldn’t live without soon enough… Obviously there is the addition of TimeMachine, but funnily enough I was already doing backups.

leopard.bmp

One thing I was expecting was a seamless upgrade. I was sorely disappointed. The first complaint from the Leopard Installer DVD was that my disk had the wrong partition map. I upgraded my macbook’s hard drive a year or so ago, and apparently had selected APM instead of GUID when I installed. To fix that, I followed the instructions at http://www.macosxhints.com/article.php?story=2007102511133285 which took several hours (LOTS of copying data to/from external drives). This involved the use of an excellent program called Super Duper which I am happy to report does Just Work.

The next complaint was harder to resolve. The verification process failed half-way through installing. Skipping the verification resulted in a failed install (not on my main drive, on my backup!). Googling revealed that apparently this problem was not uncommon, and was related to after-market RAM upgrades (that’s me) – though doing a full RAM soak test revealed no problems at all. I eventually managed to install the thing by restoring the DVD onto a partition on my external drive, and then booting from that.

The iPhone SDK was, fortunately, easier to install!

Homogenous Hardware?

Wednesday, July 30th, 2008

I have just been playing around with Stylizer, a Windows CSS editor. Why, you may ask, is the CTO of a mobile software company messing around with CSS editors? A very good question. Someone was extolling the virtues of this program on the Business of Software forum, and how everyone should take a look at the first-run experience. I went to the website, which is simple, clean, and attractive, and downloaded the program, which instantly launches into the tutorial.

Stylizer’s tutorial is well implemented, and compelling. I am no expert on CSS, and not much more knowledgable about CSS than I was when I started the tutorial, but I know a bit more about how to use Stylizer, and I agree that it is easy to use. Right up to the point where it asked me to hold down my left mouse button and then click with the right while the left button was still down.

Now, not only did I have to read that twice to work out what I needed to do, I could not actually do it. I use an Apple Mighty Mouse, and it is simply not possible to press any two buttons simultaneously, unless you press very hard enough (i.e. hard enough to break it).

All mice are not equal

Up to this point, all the shortcuts had been with the keyboard, so I didn’t quite see why we were suddenly using the mouse, particularly in a click combination that is hardly standard. In the case of Stylizer, it is simple enough just to achieve the desired action (insert a new rule) using the Insert key, but I am left asking myself why someone found it necessary to come up wth a completely non-standard action to implement a common action. In the same thought, I realise that Apple disabled simultaneous button clicks on the Mighty Mouse precisely to prevent people coming up with complex, non-standard UIs. More power to them.

Mobile Device Databases

Friday, May 2nd, 2008

I’ve just been taking a look at Device Atlas, which in its own words is the “world’s most comprehensive database of mobile device information”. I had high hopes, but unfortunately it appears to be rehash of the kind of information which is readily available, without anything more useful. I appreciate that this database is not designed for my sole delectation, but I surely can’t be alone in wanting to get a list of devices running S60 FP1 which have a camera? Not only does the Device Atlas apparently not allow any sort of search, it doesn’t tell me what operating system a phone runs, what JSRs it has, or allow any kind of user commenting (e.g. “HTTPS is broken on this device”).

My favourite part of the site is in the FAQ, where it says “Can I have a job? Yes, we’re hiring world class staff for the DeviceAtlas project. Call us.” Errr, call who? There’s no phone number. Click on “Contact” on the nav bar at the bottom of the screen. Still no phone number. I presume you’re supposed to call dotMobi (one more click away) rather than Device Atlas, but that’s far from clear. Also in the FAQ, we read that “We intend this to be the single largest, most comprehensive, and accurate device database on the planet”. A worthy goal – but Device Atlas has a long way to go to reach it.

Android Code Day

Thursday, February 7th, 2008

After a much-awaited Release Day and the obligatory pub afterwards, last Thursday marked the end of January and Android Code Day in London and Tel Aviv. It was my first time in Israel, which made it more exciting As much as I’d like to visit Israel, I wouldn’t be able to justify the expense (it might happen in the future with the current trend in ticket prices). The good news is that the train journey into London is relatively short and painless. (more…)

Why should I use static_cast?

Wednesday, January 30th, 2008

I recently had the dubious pleasure of debugging a User 42 Panic on a piece of Symbian code that was given to me by another company. You always need to make sure you understand what the system is telling you, so I went straight to the documentation:

User 42: This panic is raised by a number of RHeap member functions, AllocLen(), Free(), FreeZ(), ReAlloc(), ReAllocL(), Adjust() and AdjustL() when a pointer passed to these functions does not point to a valid cell.

(more…)