Textastic

Textastic is a programmers editor for iOS.  It’s not perfect, but it’s very close to the app that I was waiting for ever since the first iPad was released.

Even before I had an iPad, I’d mostly stopped using my laptop.  The only time I did use it was when travelling overnight (I’d take it if I had to work while away, or in case there was an emergency and I had to work on something).  I don’t need a full computer for this – typing on a software keyboard on a 9.7 inch screen is perfectly adequate for emergency work, and when combined with a bluetooth keyboard (which is small enough to easily pack, and I already own) and a monitor (now a TV via AirPort mirroring) it’s quite useable as a work-while-travelling device.

The only missing component was the software: for a very long time there was nothing available.  There are oodles of word processing applications, note takes, and there are even a few HTML editors – but nothing designed for real programming work.  I’m not sure why this is, but I suspect that most professional programmers already have something along the lines of a small MacBook Pro or Air and find it convenient to travel with that, so wouldn’t use an iPad, even in these situations.  The best available was, unfortunately, using SSH (this was before Prompt, too) and doing the word in a command line on a server somewhere.

At $14, Textastic is expensive for an iOS app, but cheap for a programmers tool (it’s definitely worth the price).  This is a text editor, not an IDE, so you don’t get a debugger or interactive prompt or anything like that – it would be difficult to do that anyway given Apple’s restrictions, and I prefer a dedicated programmers text editor to an IDE anyway.  (You can easily switch to other apps that together provide most of what an IDE does).

It’s a good editor – it does syntax highlighting for many languages (including Python and everything else I’m interested in), shows line numbers, and you can switch the file’s encoding and line ending choice.  You can quickly jump to “symbols” (e.g. method), although I generally just scroll since I know where I’m going.  There’s a decent find (and replace), and you can choose from DejaVu Sans Mono, Courier New, Luxi Mono, Monofur or Inconsolata for the font.  There are a variety of colour themes, there’s control over tab settings (including soft tabs) and word-wrap.  Although you can set the font size, you can also just pinch & zoom to get the size that you’re after, which is far superior to manually picking a size.

Generally the app does what it should: it gets out of the way and lets you get on with writing/editing the code.  There’s an additional top row in the keyboard that offers symbols that you’re likely to need (this oddly scrolls horizontally to fit everything in) so that you don’t have to toggle between keyboards often (except for numbers) if you’re not using an external keyboard.

Where the app falls down for me is where iOS in general performs badly: moving data between applications.  You can share files to the app (e.g. from Dropbox), and there are actually many ways of getting files in and out (via WebDAV, iTunes, creating local files), but you’re left with the same issue that lots of iOS apps have: you end up with duplicates.  To its credit, the app tries to address this (e.g. it can know that a file you’re editing belongs in a particular Dropbox location and sync the changes back), but at the end of the day it’s clearly a hack.  The app is still useable, but this does mean that I more often read code in it than write it (it’s far better for reading code than the Dropbox app is).

It seems obvious to me how to fix this problem (I don’t understand why it isn’t already the case).  Surely nearly every programmer that would use this app has their code stored in some sort of repository (CVS, SVN, Git, Mercurial, Bazaar, etc).  The repository is the file system.  The app has a working copy checked out, and you can commit changes back to the repository.  The app doesn’t need to support every action that the VCS/DVCS offers – really just (in SVN terms) add/remove/update/checkout (and perhaps propset) – if you need to do something else, then you use a dedicated SVN/Git/etc app).  This completely solves the issue of multiple copies of files, because that’s exactly what these tools are designed to handle.

Unfortunately, the app would need to support at least SVN, Git, Mercurial, and Bazaar since there’s a lot of diversity at the moment.  However, it seems likely that there are libraries that can be used (even in iOS) that would handle a lot of the grunt work.  If the app let me check out a SVN working copy, make changes, and then commit them back, it would be absolutely perfect (I’d pay ten times the price if the app supported this).

If you need a programmers text editor on iOS, then I highly recommend Textastic.

Prompt

Panic’s Prompt is the SSH iOS application that I (and I’m sure many others) were waiting for from the release of the first iPad.  My only complaint is that it took over a year (a year of using considerably inferior alternatives) before the app was finally available.

SSH isn’t pretty, but somehow Prompt is.  Although there’s a lot of space required for the keyboard, connections, and settings, Prompt somehow makes the remote display quite large enough to be readable (and if you use an external keyboard, then it’s perfectly sized, and you get the control keys and arrow keys working as you’d expect).  Connection management is very simple, and all the settings you’d expect (initial command, prompt string, etc) are available.

The keyboard includes an additional top row that has the keys that you need to use most frequently in SSH (escape, control, tab, /, -, |, @, arrow keys) and are missing from the standard iOS keyboard.  It even autocompletes using the shell history, saving typing long paths and commands repeatedly.

There’s very little I can say about the app other than if you will ever need/want to SSH from your iPad, then this is, without any doubt, the application to have.  It’s $11, but worth easily five times that much; I’d grumble and probably try and convince work to contribute to it, but I’d pay $100 for it.  If you don’t know what SSH is, then this is not the app for you.

(Before Prompt, I used iSSH which also does VNC – I use VNC a lot less frequently, but still need it occasionally, so now I need to figure out which is the best VNC app, which are unfortunately all fairly pricey.  If you have suggestions, let me know!)

Cards (iOS App)

Cards is one of the lesser quality Apple iOS apps (think MobileMe Gallery rather than Keynote).  The premise is simple: you create a greeting card on your iOS device (just like you would in iPhoto) and through in-app purchasing you pay for it to be printed and sent (anywhere in the world) – unlike in iPhoto where you’d have to order many and they’d be sent to you to then send on.

Aspects of the app are good – the templates are very customisable and generally nice, and it’s a pretty simple process to create a card.  The pricing ($6.50 including postage) is extremely reasonable considering the cost of a decent (not customised) card elsewhere.

However, there are considerable flaws: the purchasing is odd – it doesn’t use the standard in-app purchasing system (I can’t understand why not), so you’re prompted for more information than simply your App Store password; the App is bizarrely iPhone/iPod resolution only (nearly the same interface would work perfectly well on an iPad, where you’ve got access to all your high-quality photos via Photo Stream anyway); and the cards take forever to arrive.

The latter is the most significant flaw, of course.  In a few cases (e.g. “thank you” cards) it doesn’t matter how long the card takes to arrive; in most cases (birthdays, anniversaries, Christmas, …) timing is actually very important.  We sent a card while visiting the Auckland Museum at the end of the school holidays, and it took over a week to arrive; one has apparently been sent to us (around the same time) and has yet to arrive.  The “shipping notification” email arrives days before the card does, indicating that the problem isn’t in the printing, but in the delivery (presumably they are being printed in Australia and there’s some sort of international shipping delay causing issues).

It’s likely that this is a problem specific to New Zealand (and perhaps isolated other countries).  Unfortunately, that does mean that it’s less likely that it’ll be quickly fixed.  We’ll probably try this again in a couple of weeks, and see if the speed has improved – if not, then the app is only useable in rare circumstances, which is unfortunate, because we’d likely otherwise use it quite frequently.

SkyTV iOS App

The SkyTV iOS app is free, and I rarely use it, but on occasion is is very handy.  The application is mostly a TV Guide – since SkyTV refuses to let anyone else have their listings, but they do have all the free-to-air channels, it’s clearly the best guide.  However, I don’t really have much use for a guide, because I’m never looking for something to watch (everything I’m interested in is scheduled to record).

Where the app is occasionally useful is that it can be connected to your MySKY box, and you can remotely schedule a program to be recorded.  This is essential for those times when you’re away from home and remember that a new program is starting in a few hours and you forgot to schedule it.  The scheduling is limited (e.g. you can’t set up a series link), but it’s good enough for these situations.

As you’d expect from SkyTV, the process of setting this up is incredibly painful.  You need to enter your SkyTV account details and the unique ID of the smart card in the MySKY box, and although this should be a smooth process, it never works first time – and then, without anything being done at all, will ‘magically’ start working at some later date (I’m guessing that the linking process takes time, and the app fails to tell the user this, leading them to believe they did something wrong).

Once it is finally set up, though, it’s very simple to use – just find the program you’re interested in recording and a few taps later it’s scheduled.  Test it at home first, of course!  (But not right away, because, as above, it doesn’t appear to work until a few hours have passed since the initial setup).

If you’ve got MySKY and an iOS device, then this is absolutely an app that you should have installed (it is free, after all!).  If you don’t have MySKY, but you do want to use a TV Guide on iOS, then this is the more comprehensive one for New Zealand listings, so (again given that it’s free), it’s worth having.

Note that the app doesn’t offer any sort of iSKY (on demand video) access.  It would be extremely nice if that was added in the future, but I’m skeptical that it will be.

PyPad

PyPad is a Python interpreter for iOS.  This sounds incredibly exciting, right – finally I can do proper development and run Python programs on iOS!  Unfortunately, that’s not really the case (mostly due to Apple’s restrictions).

PyPad lets you create multiple modules and execute each of them.  However, only a subset of the standard library is available, and there’s nothing iOS-specific available (so you can’t access the camera, or touch information, and so on).  Getting code in and out of the app is done via copy and paste.  The standard keyboard is provided, with start/pause/stop buttons.

I keep the app installed so that I can (via AirPlay mirroring) demonstrate simple Python snippets.  However, if I have an Internet connection available, then I can do that in Prompt (ssh’d to a server that has Python installed) much more elegantly.

The app is clearly limited by Apple’s restrictions as to what’s acceptable for iOS.  However, it does seem like it could do much more (e.g. see Codea) if more of the standard library was available (this would mean rewriting chunks, I presume) and if there were special iOS-specific modules available for accessing things specific to the device (especially for accessing touch and graphical output).  It could accept .py and text files from other applications, making it easy to get code in (e.g. from Dropbox) and share files (as text) – although perhaps that crosses Apple’s boundary for what’s ok.  It would be nice to include the Python documentation, too (I have a separate app for this, but it makes sense to have it in once place).

The app is only $2, so if you’ve any interest in Python on iOS, then I’d recommend buying it to have a look and to encourage more development.  You probably won’t end up using it that much, however.

TomTom New Zealand

The TomTom iOS app was recently updated to be universal (i.e. support both iPhone/iPod and iPad resolution in a single app) and this, combined with yet another navigation argument, was enough to convince me to buy it – at $95 it’s by far the most expensive iOS app I’ve bought (although as a percentage of the total app expenditure it’s not very much!).

I gather the interface strongly resembles the dedicated TomTom hardware.  It’s useable, but not as clean or elegant as I imagine Apple’s app will be when they finally reveal it (but I strongly suspect that Apple’s one will be iPhone only, at least at first).  Given that most of the time you’re glancing at the map or just listening to the turn-by-turn directions, the interface isn’t overly important anyway.

It’s done well with directions so far – no errors, and easily correcting when mistakes are made.  The maps have sufficient coverage even in Warkworth and Ahuroa, and being a proper navigation app there’s no need for a cellular connection (unlike with the built-in Maps app), which is essential in Ahuroa, since there’s barely any coverage.

The app is certainly better than having to rely solely on another person to navigate.  Although I don’t often need instructions (since I’m usually driving somewhere I’m familiar with), in the cases where I do, it’s useful to have, and over the course of a year, I think that’s probably worth $100.  (The monthly traffic subscription, however, is not – I haven’t even bothered trying this out).

I’ve tried various free/cheap navigation apps, and although they’re ok, they’re absolutely inferior to this one.  I’d recommend it to anyone that thinks that they’ll get $100 of value out of it, especially over the next year (it seems very likely that iOS 6 will have a built-in app).

Quarrel Deluxe

Quarrel Deluxe (Quarrel DX in Springboard) is a cross between Scrabble (which I don’t love, although I did, like many people, play Words with Friends for quite a while) and Risk (which I do love, but rarely play non-digital because of a lack of people to play against), and may well be better than either.

The setup is essentially like Risk: a board of locations (countries in Risk) that each have a number of armies and varying numbers of neighbouring locations.  The options in a turn are similar as well: attack, fortify (i.e. move armies from one country to a neighbouring one), or pass.  Even in fortification Quarrel beats Risk – rather than only being able to fortify at the end of your turn, you can do it throughout the turn, but once you’ve moved armies from one location to another, neither of those can then fortify or attack later in the turn (they can receive armies from another neighbour).

Attacking is where Scrabble comes in – rather than relying on the luck of the dice, like in Risk, each player is given the same eight letters (that always form at least one eight-letter word, as well as many smaller ones) and whoever makes the highest scoring word wins the battle.  Not only is there more skill (and less luck) than in Risk, there’s more than in Scrabble, too, since you always have the same letters to work with as your opponent.  The length of the word you can make depends on how many armies you have (so if you have three and your opponent has seven, you’ll need a pretty awesome three-letter word). All the ‘double letter’, ‘triple word’, ‘use a letter from another word’, ‘make multiple words at once’, and hard limits to board size elements from Scrabble are gone: these are the parts I hate most about Scrabble, so for me that’s a clear win.  It’s all about making the best word (i.e. longest and with the highest point letters).

Speed is also a factor – if your word is the same number of points as your opponent’s, then whoever finished first wins.  This comes into play quite a lot – it’s often better to go for a high scoring word really quickly than take a bit longer trying to find the best word possible.  Games can also be against the clock, which adds considerably to the difficulty.

There are many other subtle elements to the game, which clearly indicate that it has been well thought out.  In addition, the graphics and sound are very well done (cutesy little stylised fighters).

I’d recommend this game to anyone that likes word games and/or strategy games like Risk.  There’s very little luck involved (none, really, if you exclude the computer opponent behaviour), and a lot of strategy required.  Games can be quite simple but also range to very difficult.

I’d love to see a future version include a multiplayer (i.e. multiple iPad) game option.  It could also possibly borrow the concept of “continents” from Risk and have some additional larger boards where there are locations that give additional reinforcements if you’re holding the entire island.

Open source in government is not important

Labour’s “ICT” policy includes a statement on “Open software” in government, part of which is attempting to get two thirds of government agencies to use some sort of open-source software by 2015.  This is basically what you expect from politicians when talking about “ICT” (or nearly anything, unfortunately) – they jump on whatever bandwagon/buzzwords are popular without any understanding of what should be done.

Firstly, I would be shocked if more than two thirds of government agencies were not already using some form of open-source software already.  For a start, it’s nearly impossible to use the Internet without accessing something running Linux or Apache.

More importantly, it makes no sense at all to aim for governments to be using more open-source software.  They should be using the software most suited to the job at hand, whether closed source or open source.  What benefit is there in requiring open source?  If they think it’s cheaper, then they should look more closely, because it’s often not.  The same applies to being more secure.  There are absolutely situations where the best choice is an open-source one – but there are absolutely situations where closed source is better.  I don’t want government employees forced to use less than the best tools because of some ideological burden placed on them by someone wanting a cushy job for the next three years.

They have a few other requirements:

Software developed in-house will be made publicly available.  A nice idea, but (a) I’m fairly sure that most of the in-house software is of no use to anyone else, (b) I suspect most of the software you’d assume was in-house was actually developed by non-government contractors, and, most significantly, (c) not all code is ready to be shared.  If a government sysadmin writes a quick script to do a job, do we really want to add the pressure that it will be publicly available (and given that it’s the government, it’s reasonable to assume that someone will be looking at everything).  As long as the software does the job, that’s good enough (in the “in-house” context).  What would be worthwhile is ensuring that government agencies consider whether software should be released to the public – I’m sure that there is some that would be of general interest and where the quality is suitably high.

Agencies considering technology purchases over $2 million would first evaluate whether publicly available technology would substantially meet their requirements.

Ugh.  A technology purchase over $100 should involve consideration of whether there was an existing public tool that could do the job – this should always be the case, not just for obscenely costly jobs.

Labour would also create a government “app store” to provide “a short circuit for fledgling NZ software developers to get to market” which would allow local developers to submit software for purchase by government agencies. Labour promises to ensure “informed neutrality” in software purchasing with due consideration of open-source software.

I really don’t understand what this is trying to achieve.  There’s no indication that local developers would be preferred (only, with no reasoning, open-source software), so how does this help local developers?  This sounds like a way to spend a lot of money for very little gain.

What they are missing are the most important “open”s: open standards (and open formats) and open data.

Governments should only be using software that produces and accepts files that are in formats that are open standards (this includes Microsoft Office documents).  We do have a “New Zealand official interoperability framework definition” already, but it could be significantly expanded on (see what other governments require, for example).  Everything the government produces should be in some sort of open format and everywhere the government accepts data at least one open format should be accepted.  Open standards apply to other areas too, but open formats is the key in “ICT”.

We have a limited commitment to open data already (see data.govt.nz).  This should be significantly expanded on – every data set that the government creates (and there are a huge number of these) should be publicly available, so that (a) we have transparency, and (b) other researchers can benefit from the data.  The only limitation is privacy – unfortunately even when a data set appears to be anonymous it is often possible to identify individuals – it would be worth spending money on figuring out how to get past this so that we can share just about everything without breaching individual people’s privacy.

VSM

Keith Ng has a good post (apart from the unnecessary swearing) at Public Address about the VSM changes.  Most particularly: students in general just don’t care either way.  (Note that although most people use “university”, I’m using “institution” here, because it’s not just universities that this is relevant to).

I have mixed feelings about voluntary student membership.  In general, I much prefer the idea that students get to choose whether they are members – I would hate to be forced to join an employment union.  However, I was Vice-President of the Students’ Association for a year, and I know that at least some of the work that they do is very valuable, unlikely to be done by anyone else, and with apathetic students extremely difficult to get members to voluntarily sign up (even with great marketing, and great reasons, and a lot of work). Continue reading “VSM”

Bad Analogies

NetHui 2011 is currently in progress, so there’s a lot of discussion about Internet usage in New Zealand, and – of course – the controversial amendments to the Copyright Act.  TUANZ‘s Paul Brislen tweeted something I’ve seen and heard (in various forms) a lot recently:

Cf electricity. Won’t cut me off because I look at something I shouldn’t on my PC so why is it ok to cut off my Comms if I do? #nethui

Variations of this substitute other tools for electricity, and the analogy is generally used to say that the amendment (which allows a District Court to order an ISP to suspend the account of a user) goes further than other laws, which don’t take away the tools you used to break the law when you are convicted.  This is true in some cases – if I hit someone with a bat, I get to keep the bat and my right to use it, if I use lockpicks to break into someone’s home, I get to keep the lockpicks and my right to (legally) use them.  However, it’s not always true.  I believe if I use a gun to kill someone, I (permanently?) lose my right to a gun license, and I think that I also lose the gun.  To use an analogy that’s more likely to be something people have experience with, if I break the law while driving a court may temporarily suspend my right to drive, and I may also have my car impounded.  I pointed this flaw out to Paul, who responded:

cars are not a utility. Banning you from all transport is a better analogy for my analogy.

[…] it’s not your acc that’s banned, it’s you. Unenforceable.

This demonstrates my point about analogies being a flawed way to educate people about issues with changes to the law.  I am not a lawyer, but I am fairly certain that Paul is wrong, has been swayed into believing this by the analogy, and is making others believe this by repeating it.  The amendment states (Section 122O (1)):

A District Court may, on application by a copyright owner, make an order requiring an ISP to suspend the account of an account holder for a period of up to 6 months (emphasis mine)

You don’t lose the right to use transport – you lose the right to drive a car.  You can still use a friend’s car (Internet connection), or public transport (public Internet access is available at our wonderful public libraries).  I believe the transport analogy is significantly better than (e.g.) electricity, because of this similarity, and because the punishment must be enacted by a District Court, is limited term, and comes into effect only when the crime is significant enough or repeated enough to be warranted.  However, there are still areas in which it doesn’t work as an analogy – for example, I don’t lose the right to drive if I use my car as a getaway vehicle in a bank heist (although neither do I lose my Internet access if I rob a bank with it).

The problem here is in using analogies at all.  No matter how carefully you select the “lie-to-children“,  the analogy will be an imperfect match and will lead to people forming opinions based on an erroneous understanding of the facts.  The original furor over the S92A amendment was full of these – the amendment had plenty of problems, but most of the uproar was based on misunderstanding and propaganda.

I’m not saying that including the ability for a court to suspend an Internet account is a worthwhile part of the law: as Paul himself said, it’s useless (I’d say weak rather than useless) because it’s so easy to replace the account with another, and I feel it’s too specific (in much the same way as specifying talking on a phone while driving as illegal is too specific) to be enshrined in law, and there’s no evidence that copyright needs to be protected in this way as opposed to other crime (e.g. one does not lose Internet access for viewing child pornography, unless that happens to be a copyright violation).  What I am saying is that I’d like to see some informed debate about these changes to the law.

Paul’s right when he says that the law is complicated and hard for many to understand.  I thoroughly agree with his point that using examples and “what if” scenarios are a good way to help people understand.  However, I think it’s dangerous to let a lie-to-children carry on too far.  Eventually the children need to grow up and learn the truth (as we understand it), and when it comes to making laws, understanding the truth is essential.  You can’t fit an example into a soundbite, but you can give an easy-to-understand example of how suspension will (if this part of the Act is ever ‘turned on’) work in practice.  For example:

John downloads episodes of Outrageous Fortune illegally.  The owner of that content detects this, and informs John’s ISP, who gives John a warning.  John continues to download this material, and after a month the content owner again informs John’s ISP, who again warns John.  John still ignores the warnings, and continues to download the material.  A month later the content owner informs the ISP yet again, who again notifies John.  The content owner then applies to the District Court to have John’s account with his ISP suspended.  John admits to the Court that he is guilty, and the Court considers his specific circumstances and orders his ISP to suspend his account for a three-month period.

This example leaves out a lot of detail (e.g. the official names for each warning, the minimum and maximum periods between each notice, exactly what the court needs to consider, any action taken by the Tribunal, what happens if John denies the allegations, and more), but I don’t believe it contains any errors, and I do believe that it’s simple enough for anyone to understand what would actually happen in practice.  It doesn’t fit in a tweet, and it takes a minute or two more to express than an analogy, but isn’t informed debate about the laws of our country worth the extra time?