The Elegant Chaos Blog
Various thoughts and ramblings from the world of Elegant Chaos.

There comes a time in every programmers life when all the fancy symbolic debuggers let us down, and we have to fall back to that old standby, logging. Or to give it its full name “printf debugging”!

Actually there are lots of reasons why logging can be useful. Sometimes we have what I like to call a “heisenbug” - where the very act of stopping in a debugger to look at the problem causes the problem to disappear. Sometimes we have other timing issues. Sometimes we simply have too much data to analyse in real time, and we need a chance to process it or manually sift through it later.

In these cases the typical solution is to insert print statements into our code which output some text to the console or a file. In C this is typically printf(), or perhaps fprintf(). In Objective-C, we use NSLog instead.

more...

November 14, 2011

Ambientweet 1.0.1 is on it’s way, and has been submitted to the Mac App store today for review.

It brings with it a slew of syncing/caching updates which should result in more reliable fetching of tweets (especially after it’s been running for a while), and a faster startup.

The posting interface has also been improved - it looks more like a normal tweet window now, and it correctly deals with long urls, allowing you to post tweets that appear to be longer than 140 character, but which will be under the limit after Twitter has shortened the links.

more...

It’s hard to make good products if you’re working in a vacuum. That’s why one of the things that we like most is hearing from people who’ve used our software, even if the message is “it’s broken”!

So if you send us a good suggestion, or a report of a genuine bug that we didn’t know about, there’s a good chance that we’ll send you a free license in return.

No promises mind you - if you send fifteen reports, each about an individual spelling error in the manual, then you probably won’t get fifteen licenses back :)

more...

November 03, 2011

So, Apple have announced the deadline for developers to have their Mac App store apps work with sandboxing, and suddenly it’s March 2012, and not the November 2011 date that was widely understood amongst the developer community.

I guess I should be grateful, since the current sandboxing is distinctly half-baked as a plan. The only problem is, working on the assumption that we had to have sandboxing implemented by November, I’ve now got a relatively major update to Neu which uses it, and is waiting on just one sandboxing bug to be sorted out. Having removed the November deadline from developers, Apple have also conveniently removed the urgent need to fix the bug that’s holding me up.

So now I have to decide whether to hold back the Neu update - potentially for four months - whilst I wait for the bug fix (not a particularly attractive option), or to do more work turning sandboxing off again in Neu and splitting out the sandboxing-inspired changes from those that can ship regardless.

Sigh.

As I’ve said before, I’m broadly in favour of sandboxing, or at least the the motivation behind it. Anything we can do to protect users from malicious software is fine by me, as long as it doesn’t detract from what users actually want to do.

The way Apple have gone about implementing it though, has left a lot to be desired, and smacks of a certain hubris. They told us, rather than asked us, what we needed. Perhaps more worryingly, they got the answer quite substantially wrong. It’s good that they’ve seen sense and delayed it, but by announcing a new date they are still holding up a hostage to fortune, since we don’t have a fully working system yet.

Personally I think that they made a fundamental error in even considering using a metaphorical stick to force developers to adopt it. It would have been far better to use a carrot. If the Mac App store showed a subtle badge on sandboxed apps, with supporting material explaining that apps with the badge had “enhanced security” or some such phrase, it would create a positive incentive for developers which ought to translate directly into increased sales.

Using an application with “enhanced security” is going to be attractive to most users, regardless of exactly how much they understand about what the “enhancement” actually represents - but it leaves the choice in the hands of the user.

Whilst I’m not normally a great fan of marketing bullshit, or of overloading users with more information than they need, I think that this is a situation where presenting a simplified (but accurate) picture of the benefits of sandboxed apps is far preferable to forcing all apps to be sandboxed.

more...

October 28, 2011

… and another one!

Neu 1.2b3 is available for the brave of heart!

This one has a rough implementation of the new UI for managing your templates.

Rather than a separate templates window, you can now right-click on a template in the main UI, and do various things to it directly (rename, delete, reveal, open), or you can choose “Edit Template…” to open an editing pane. This pain allows you to set some per-template preferences, including a keyboard shortcut.

Known Issues

In grid view, the context menu commands on templates currently operate on the selected template, which might not be the one that you clicked on! So be careful with the delete command!

Per-template keyboard shortcuts don’t work yet.

The “Rename Template…” command doesn’t work yet.

Due to a bug in sandboxing, when overwriting an existing document you will be asked “Do you want to replace?” but if you say OK the creation will fail. The workaround for now is simply to give the new document a different name. Neu will always default to a unique name for the file, so this shouldn’t affect many people.

more...