Alex headshot

AlBlue’s Blog

Macs, Modularity and More

NSConference 2013 Day 1

2013, conference, nsconf

Chapter V - A New Location
This is not the blog post you're looking for

This year’s NSConference has taken a leave of absence from its previous home and has relocated to the Leicester Athena, a centrally located wedding and conference centre with a focal stage. Many people who come by public transport really appreciate the move, with walking distance to hotels, bars and the train station – whilst those that come by car have let out a few expletives on the one-way systems in and around Leicester. Still, the Rutland Center car park, situated a stone’s throw outside the venue, offers all-day parking for £3.80 provided that the ticket is validated by the Athena staff (a much better deal than the £18.50 it would cost otherwise). There’s even a small car park on site, but since you don’t get to find out about this until you’ve already got there it’s a little late for that now.

It’s a brave decision to move away from the middle of nowhere and the NSConfDuck, but the new venue provides much more space (300+ people, up from 120 ish last year) and this means many more people get to attend NSConference. This year I think it will find its feet, and if it goes ahead next year in the same location many of the teething problems will be sorted out.

One such teething problem is the WiFi, which reliably works as long as you’re in the first three people to get a signal, and which reliably doesn’t work if you’re not one of the blessed trinity. For that reason more than anything else, the #nsconf twitter stream has seemed much more silent than last time. Still, a bunch of WiFi hotspots have turned up and whilst it probably doesn’t help the WiFi signal generally, it means some news is leaking out.

The conference theme this year is Star Wars, with “These aren’t the mugs you’re looking for” and “This isn’t the t-shirt you’re looking for” on the branded merchandise. Unfortunately, Scotty doesn’t appear to have that on the NSWhisky and found it during the opening keynote.

Bill Dudney – Building Better Apps

Bill Dudney (@bdudney) took everyone through the use of Instruments to find performance issues with Instruments. For those who haven’t spent time in Instruments, it is a seriously flexible tool for measuring all sorts of performance metrics from applications, including the amount of time spent on the CPU and how much work the GPU is being done with. One of the favourite featues was the use of the allocations to show which stack path was responsible for creating every memory item in a run of the code, by repeated drilling into the detail arrows.

Another interesting point is the distinction between ‘dirty memory’ and ‘allocations’. The former is all memory that has been allocated (through the use of malloc and friends) and written to, whereas the latter purely focusses on object-based instantiation. Since there are many APIs which create and consume memory but not in an object-oriented way, it’s possible to have an application which has a low allocation count but several hundred megabytes of dirty memory, particularly with the image processing routines.

He also demonstrated the core anmiation debug properties, accessible from the Core Animation instrument’s properties at the bottom left of the screen, where options such as ‘Color off-screen rendered yellow’ can be selected to highlight where images are being composited in an off-screen buffer (which can degrade performance). These paths can be taken with mask clipping and/or shadow generation and can slow the user interface down.

Searching for speedy searching

Simon Wolf (@sgaw) demonstrated how to add text searching to an application, by embedding a new copy of SQLLite with FTS3 enabled. This requires copying SQLLite into your application and compiling with the Full Text Search enabled. A future blog post on promises to go into more details, but a pointer to FMDB as a friendlier interface into SQLLite was suggested.

The key is to use SQLLite’s built-in text searching functionality, and to manually insert normalised strings when objects are updated (such as through the Core Data notifications that an object has been inserted/changed/deleted) and rebuilding the index accordingly.

UISS – UIAppearance on Steroids

Robert Wijas (@robertwijas) gave a blitz talk on the use of UISS as a style-sheet for iOS applications. Using a JSON like structure to hold CSS like data, a library in the application on the phone can render and apply styles via hte UIAppearance API. This allows for quick prototyping and near real-time results on the device or simulator, and has the advantage that it can be converted into executable Objective-C code once the design has been fixed.

WebKit UI Inspector Tips and Tricks

Daniel Jalkut (@danielpunkass) gave a great talk on the power of the UI Inspector in Safari, which can be enabled through the advanced preferences by selecting ‘Show Develop menu in the toolbar’ option.

Not only can the inspector be used to probe the current state of the user interface (including dynamically generated DOM elements, and not just the HTML source) but it can also be used to delete and modify elements themselves. This is particularly useful when printing out documents from sites with an abundance of cruft which doesn’t need printing; using the UI inspector to remove them all can save on ink and paper.

Daniel also showed that a WebKit based app can have developer mode enabled, by passing the -WebKitDeveloperExtras YES to XCode’s build parameters, or by using the setting defaults write -g WebKitDeveloperExtras -bool YES to turn it on for every application.

For those apps that don’t support a custom context menu on a web view, Daniel shared a tip to do this with lldb:

  • Attach to the target process (using lldb -n Mail)
  • Set a breakpoint on -[NSView menuForEvent:]
  • Control click in the application
  • Execute [[[$rdi _webView] inspector] show:0] to bring up the inspector

Finally, Daniel also shared a tip that it is possible to use the inspector with a mobile device as well; when a developer mode device is connected and the “Preferences → Safari → Web Inspector” is enabled, then the Safari on the Mac will show a link to the iOS device which can be used to debug and update content on the device’s browser.

Becoming a Product Company

Daniel Pasco (@dlpasco) from Black Pixel talked about his experiences in becoming a product company. Mostly an entertaining look about how not to do it, but with the advice that not talking about what features a product will have in the future means that you don’t end up lying if you can’t or don’t ship it in the next release. Also, the ‘release early, release often’ mantra came up – several products have stagnated through the lack of releases.

He also mentioned acquiring NetNewsWire and Kalidescope as means to bootstrap a product company, but the hidden costs of doing so, such as integrating automated billing or payment systems, as well as migrating bug trackers over, as issues which should be considered for future product acquisitions. Also, the lack of a ‘transfer’ opportunity in the App Store meant that releasing a new version under a different company is problematic without some form of introductory pricing mechanism to persuade those who have the older bits to migrate forwards.

Handling the Press

The day’s presentations finished off with Chris Phin (@chrisphin) who talked developers through how to write a good press release (see the demo slide at as well as other practical advice (spell correctly, target it to the specific editor/magazine you’re sending to, make your application stand out). A quick question-and-answer session and the end of the day was upon us.

Conference Dinner

The conference dinner was decked out in some (overly lavish) surroundings. They needed a couple of hours to prepare everything, so everyone mooched upstairs to the bar or retired to their hotels for a brief nap, before coming back again at 8pm. (Side note to organisers; yes, it looked pretty – but I’m not sure it was worth the 2h wait when lesser embelishments on the furniture would have sufficed.) The meal however was very good, as was the wine, and there was a lot of great conversations going on throughout.

In all, I’d say that the new location for NSConference has been a tentative success, and provided that the WiFi problems get sorted before next time it will probably be a good venue for the future. And what’s nice about the size is that there’s a lot of new people, so that although many of the old crowd are still here, it doesn’t feel like an old boy’s network or a clique any more; it’s a conference for all.