<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
    <channel>
        <title>Niklas Saers' blog</title>
        <link>http://www.saers.com/</link>
        <description>Niklas Saers' blog</description>
        <item>
            <title>My thoughts on VR today</title>
            <link>http://www.saers.com/archives/2016/06/05/vr-today/</link>
            <guid isPermaLink="true">http://www.saers.com/archives/2016/06/05/vr-today/</guid>
            <pubDate>Sun Jun 05 2016 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
            <description>&lt;p&gt;Lots of companies are working on VR, and we’re led to believe that this 
is the defining technology of the near future. I’m an optimist when it 
comes to new technologies, so I wanted to try it out to get a status of 
where we are today.&lt;/p&gt;
&lt;p&gt;My background in VR is not great - I tried a giant helmet once in the 
90s at a technology fare. It was a very pixelated rollercoaster, it was 
all very interesting, and nothing became of it. I tried a VR setup in a 
Medialogy lab ca 2007, and it looked better but it was mostly a very 
expensive way of doing storytelling with better immersion.&lt;/p&gt;
&lt;p&gt;The reason I find VR interesting today is that it has become cheap, 
because you can use your smartphone for all the tech and just add some
lenses via &lt;a href=&quot;https://vr.google.com/cardboard/index.html&quot;&gt;Google Cardboard&lt;/a&gt;. A DIY kit can be had for a dollar or 
two on Amazon, and complete headsets can be had for $20. To really give 
it a shot, I bought what I thought was a high-end one for $59, that 
according to the reviews I read had the best immersive experience. It 
was the &lt;a href=&quot;https://www.hypershop.com/products/bobovr-z4-virtual-reality-headset-for-smartphones-iphone-android&quot;&gt;BoboVR Z4 from HyperShop&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The BoboVR Z4 comes with a headset for 3D surround sound (how this is 
not just plain stereo, I don’t know), and the connector was neatly 
tucked on the left hand side of the device, very easy to connect. That 
requires, though, that the iPhone 6S Plus that I connected is oriented 
in one orientation. Such a shame that virtually every app I installed 
required the phone to be oriented the exact opposite way. Oh well, I 
ordered &lt;a href=&quot;https://www.amazon.co.uk/gp/product/B01CZNLTJA/&quot;&gt;an extension cord from Amazon&lt;/a&gt; and that was that. It also 
comes with a button I can tap on my helmet, but that button was 
extremely unreliable, working the first tap or two and then working 
less and less. But it’s the wrong place for a button anyway, so I 
ordered a &lt;a href=&quot;http://www.ebay.co.uk/itm/111982730003&quot;&gt;game controller via eBay&lt;/a&gt; that I can hook up. I have no 
idea if this is the preferred setup for VR, but this is what I explore 
the VR world through.&lt;/p&gt;
&lt;p&gt;Now, what do I want from VR? I’m a developer, so I’d love to 
treat it as a giant monitor and have a window manager that would let me 
juggle terminals and text editors in a more productive way than I do at 
my 5K iMac today. I expect this VR experience to be roughly the VR 
equivalent of what fvwm and xterms were for a desktop experience back 
in the days where X11 was my environment.&lt;/p&gt;
&lt;p&gt;Other than that, seeing videos in 3D, or where it makes sense, 360 
degrees videos, would be interesting. And although I’m not much of 
a gamer, I know there is much VR exploration going on there, so I’d 
love to be blown away with a good game that really utilises the 
immersiveness in a (to me) novel way.&lt;/p&gt;
&lt;p&gt;I searched the App Store for VR and downloaded about 200 apps and games 
(for the rest of the post I’ll just call them apps), some paid, 
some free. I wanted a good mix to see what was going on in this 
landscape. I won’t call out many apps in particular, but give you 
my general experience.&lt;/p&gt;
&lt;p&gt;There are many not particularly good apps in the app store, and the VR 
apps are no different. I expect there is a blog that could help me sort 
to the cruft, but I had already dived head first in before thinking of 
this. ;-)&lt;/p&gt;
&lt;p&gt;Input is something that needs working on, especially head input from 
head movement. Most of the apps I got expected you to do rather large 
head movements. That means more work for the user, more chance to bump 
into things, and you needing more space. I want more fine-grained 
control with smaller movements, so that I can do most things sitting on 
my couch instead of having to stand beside my couch to be able to turn 
all the way round.&lt;/p&gt;
&lt;p&gt;Even though mobile phones aren’t heavy, wearing it together with 
lenses and headset feels a bit heavy in total. That limits how long a 
user can use a VR application before being fatigued. Speaking of fatigue,
wearing a setup like this for an hour is both eye straining and warm. I
have no input on how that could be solved, so for now, doing serious work
on a virtual 3D-space of terminal windows seem illusive.&lt;/p&gt;
&lt;p&gt;While the idea of using a mobile phone to power the VR experience seems 
good, it won’t be really good until the operating system on the 
phone embraces VR. At the moment there are annoyances to downright 
interruptions from having notifications come in, the occasional 
vibrating of the phone when a mail arrives, or even worse - people 
calling you (it’s a phone - that’s what people do). So to get a 
good experience, you need a dedicated phone for VR apps, which totally 
defeats the purpose of a cheap entry-level VR system.&lt;/p&gt;
&lt;p&gt;Another part where the need for OS-level VR integration is glaringly 
obvious is that many apps move back and forth between VR and non-VR 
interaction. This is really bad, because that means taking the headset 
off, putting my glasses back on, opening the headset, disconnecting the 
audio cable, taking the device out, fiddling with the interface while 
holding the headset, putting the device back in, connecting the audio 
cable, closing the headset, removing my glasses and putting the headset 
back on again. What kinds of stuff do they require this for? Clicking 
away from an ad, choosing a new level or scene, settings, etc.&lt;/p&gt;
&lt;p&gt;Lastly, I have a QR code that about half of the apps want me to scan on 
first launch so they know what headset I have and can configure 
accordingly. The OS should know, and I should not have to carry a QR 
code around. To fix that last issue, I’ve glued it to my VR 
headset. Guess what headset doesn’t look all nice anymore? ;-)&lt;/p&gt;
&lt;p&gt;Remember I told you about the giant pixels in the 1990s? Well, the 
pixels are still here. Not as giant, but still very, very visible. I 
was using an iPhone 6S Plus which has a Retina display of 1920x1080, or 
401 DPI. Retina is marketing speech for not being able to see 
individual pixels in the distance you’re expected to have the 
device from your eyes. Having the device in a VR headset changes this 
distance dramatically, so this is not a Retina VR experience at all. So
we should expect the resolution game to continue at least until we 
reach Retina level for VR. This must frighten my iPhone 6S Plus, 
because when running VR experiences, it runs pretty hot doing all this 
GPU work - and I just told it that it needs to do a whole lot more. And 
it needs to stop running as hot, because VR is quickly eating up my 
battery. That needs fixing too.&lt;/p&gt;
&lt;p&gt;One experience I liked a lot is apps that use the camera to give me an 
augmented reality experience. This can become nice a whole lot nicer 
when we get more wide-angle lenses on the phone and photo sensors 
allowing more wide-angle video than what the current crop of phones do.&lt;/p&gt;
&lt;p&gt;So this is what I’ve found so far. My experiment is of course not 
done yet, so I’ve ordered a &lt;a href=&quot;https://www.indiegogo.com/projects/vicovr-teleport-your-body-into-virtual-reality#/&quot;&gt;VicoVR Sensor&lt;/a&gt; that has an 
estimated delivery time in november 2016. For wanting more fine-grained 
motion for input, attaching a full-skeletal tracking system is probably 
going the wrong way, but it’ll be interesting to try out.&lt;/p&gt;
</description>
        </item>
        <item>
            <title>The 12&quot; Macbook for iOS development</title>
            <link>http://www.saers.com/archives/2016/04/12/macbook-for-ios/</link>
            <guid isPermaLink="true">http://www.saers.com/archives/2016/04/12/macbook-for-ios/</guid>
            <pubDate>Tue Apr 12 2016 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
            <description>&lt;p&gt;I’m an iOS developer at Snapsale, and I spend some time on the road, either travelling to our main office in Oslo, or to conferences. For my out-of-office work, I chose the entry-level Macbook.&lt;/p&gt;
&lt;p&gt;The specs were not very powerful: a 1,1Ghz dual-core Broadwell Core-M with 8GB of RAM and 256GB SSD. But then again my expectation was mainly to do meetings and notes, UI review and the occasional Xcode hacking. Thus I chose 12” to optimize for being able to “comfortably” work from the flight seat and the coach seat, and retina for working on UI together with our designer.&lt;/p&gt;
&lt;p&gt;Optimizing for the screen is something I would not have expected to do five years ago, and I must admit to being a bit hesitant to how the Macbook would deal with Xcode. The answer is: surprisingly well. What I had not factored in was that the SSD is actually a quite fast SSD, and since development work is quite I/O intensive, that made a significant difference.&lt;/p&gt;
&lt;p&gt;One of the big benefits of this Mac that is easily overlooked is no fans. I actually didn’t notice for the first couple of weeks until my colleagues Macbook Pro spun up to a whine. Of course, the worst part is that the CPU is not powerful enough to need those fans, but buying a Macbook, you should be very aware of this going in.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/MacbookXcode.jpg&quot; width=&quot;600&quot; alt=&quot;Macbook and Xcode&quot;/&gt;&lt;/p&gt;
&lt;p&gt;So how is the Macbook for Xcode? It’s decent: I’d say about half the speed of my Skylake iMac (2015 model). The amount of stuff on my screen is of course limited, but laptop development work usually has this drawback, and dealing with that is not hard.&lt;/p&gt;
&lt;p&gt;So instead of only occasional Xcode work, I use it heavily for Xcode even when I’m not travelling: at home when I don’t want to go into my home office but be in the living room, and even in my office when I want to run another branch of the git repo in parallel.&lt;/p&gt;
&lt;p&gt;With this in mind, I expect to be able to recommend a Skylake Macbook (the rumoured early 2016 model) as an all right Xcode environment.&lt;/p&gt;
</description>
        </item>
        <item>
            <title>Original content</title>
            <link>http://www.saers.com/archives/2015/03/19/original-content/</link>
            <guid isPermaLink="true">http://www.saers.com/archives/2015/03/19/original-content/</guid>
            <pubDate>Sat Mar 19 2016 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
            <description>&lt;p&gt;Welcome to my website. The reason I have a website is that I like to maintain a space where you can find my content. But the way I use the internet, which is not so different from so many others, I leave much of my original content in places like Facebook and Twitter. I don’t mind sharing, if I did I’m sure this content would have been behind a paywall and no-one would read it, but I do like to remain in control of it. When I give it to Facebook and Twitter, they can do more or less what they would like with it.&lt;/p&gt;
&lt;p&gt;I’d therefore like to put it out there that I’m investigating options to have what I write there appear here also. Either as a carbon-copy, or even better, with this space as the original source. I could do that as a separate micro-blog feed, but I think that I perhaps prefer embedding it between the blog posts. We’ll see, that’s what I’m thinking so far anyway&lt;/p&gt;
&lt;p&gt;Let me know what you think and how you deal with this, preferably as a post that you have full control over on your own site :-)&lt;/p&gt;
</description>
        </item>
        <item>
            <title>Treadmill - millionth step</title>
            <link>http://www.saers.com/archives/2016/01/06/Treadmill-millionth-step/</link>
            <guid isPermaLink="true">http://www.saers.com/archives/2016/01/06/Treadmill-millionth-step/</guid>
            <pubDate>Wed Jan 06 2016 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
            <description>&lt;p&gt;I started using a treadmill under my desk August 21st 2015. Today, January 6th 2016, I did my 1.000.000th step 
at the end of my working day. (or 425 kilometers in 45 days - yes I have been travelling much)&lt;/p&gt;
&lt;p&gt;I wrote about &lt;a href=&quot;http://sae.rs/archives/2015/08/24/Treadmill-first-impressions/&quot;&gt;my first impressions&lt;/a&gt; of using the treadmill, and since then I have really been loving it. I’d 
like to use this opportunity to give you my impressions one million steps in. :-)&lt;/p&gt;
&lt;p&gt;First of all: I’m being at least as productive working while walking on a treadmill as I was before. I believe 
I’m being more productive, but if that is because of the treadmill, better tooling, better architecture or what 
is hard to say.&lt;/p&gt;
&lt;p&gt;My ambition was 15.000 steps a day, but my daily average is about 23.000 steps a day, and that is a little less 
than 10km a day. I’ve settled in to a speed of around 3.5 km/hour, but I vary from 2.8 km/hour to 4.5 km/hour. 
So you can already guess my biggest surprise, it is that I don’t get more hours walking than I do. Apart 
from obvious stuff like bathroom- and coffee-breaks, I stop the treadmill often while debugging, while having 
meetings and while talking on the phone. Then I stand on the treadmill instead. I haven’t lowered my desk to sit 
since the end of August.&lt;/p&gt;
&lt;p&gt;I used to be very happy to work from home, so if the weather was bad and I didn’t have a specific reason for 
being in the office, I would just work from home. Since getting the treadmill, it is not that I make a point of 
going to work, but I actually really want to get to work so I get to use the treadmill there. I’ve switched jobs 
in this period, and this want to get in has been the same in both places.&lt;/p&gt;
&lt;p&gt;My iPhone still doesn’t get all the steps I take since it’s on my desk and my Apple Watch is on my wrist and my 
wrist is resting on the desk. So my move metrics are often way below what they actually have been. This sucks, 
but I have stopped caring as much. I hope a good solution will present itself, preferably as an integration from 
the treadmill software. The included Lifespan treadmill software is still rubbish.&lt;/p&gt;
&lt;p&gt;The treadmill is just as loud as it used to be, even after being lubricated well. However, I’ve found just how 
much difference the office can make to the sound. I used to think my former office wasn’t that resonant, but now 
that I’m in a larger office, the treadmill doesn’t sound as bad, even though the treadmill itself hasn’t 
changed.&lt;/p&gt;
&lt;p&gt;While I did get a bit sweaty when I began using the treadmill, I don’t find I do that anymore. I attribute this 
to it being winter now and I started using it in the summer, we’ll see if half a years time.&lt;/p&gt;
&lt;p&gt;I’ve become a big advocate for the treadmill, and I really do think it is one of the best things I’ve done for 
my work life. If you are nearby Tarp, come by and try it and see how you like it.&lt;/p&gt;
</description>
        </item>
        <item>
            <title>Device Setup</title>
            <link>http://www.saers.com/archives/2015/12/14/device-setup/</link>
            <guid isPermaLink="true">http://www.saers.com/archives/2015/12/14/device-setup/</guid>
            <pubDate>Mon Dec 14 2015 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
            <description>&lt;p&gt;November 2nd I started working at Snapsale as the head of iOS development. At the moment that means the head of me, so I get to do all the fun stuff myself. :-)&lt;/p&gt;
&lt;p&gt;In that context I’m setting up an iOS test lab, that I’ve called “Snapsale iOS Lab” (yes, I’m that original in my naming). For my own sake, to remember with future devices, and to inspire other iOS developers (this might even apply to some degree to other mobile app devs), here is the list of tasks I do for each device.&lt;/p&gt;
&lt;p&gt;When setting up a new iOS device: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set it up with the labs iCloud account&lt;/li&gt;
&lt;li&gt;Set no TouchID or PIN code&lt;/li&gt;
&lt;li&gt;Turn off key sound&lt;/li&gt;
&lt;li&gt;Give it a name with the template “iOS Labs [iOS/iPhone/AppleTV] [modelNumber] w/iOS [version]”&lt;/li&gt;
&lt;li&gt;Turn off automatic screen lock&lt;/li&gt;
&lt;li&gt;Turn on automatic downloads and updates of apps&lt;/li&gt;
&lt;li&gt;Set up email with Gmail account associated with the labs iCloud account&lt;/li&gt;
&lt;li&gt;Download all the purchased apps from the app store, remembering especially&lt;ul&gt;
&lt;li&gt;TestFlight&lt;/li&gt;
&lt;li&gt;Facebook&lt;/li&gt;
&lt;li&gt;Instagram&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Install the latest apps from TestFlight and say yes to notifications&lt;/li&gt;
&lt;li&gt;Set up Facebook&lt;/li&gt;
&lt;li&gt;Set up Instagram&lt;/li&gt;
&lt;li&gt;Attach to test server, remember to trust the device on the Mini and the other way around, including Watch if paired&lt;/li&gt;
&lt;li&gt;Grab the device UDID and register in Apples Developer Member Center&lt;/li&gt;
&lt;li&gt;If this was the last device, update the developer and ad-hoc provisioning profiles to all registered devices. Download the provisioning profiles, put them in the servers “Provisioning Profiles” Dropbox folder, and replace them in the repos that have them committed&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I expect the last two steps can be automated through Fastlane.io, but I haven’t come around to that yet.&lt;/p&gt;
&lt;p&gt;I also expect that many of these steps can be fast-forwarded by taking a backup with encryption enabled through iTunes on the test server and then restoring it onto the new device&lt;/p&gt;
</description>
        </item>
        <item>
            <title>How I take control of legacy code</title>
            <link>http://www.saers.com/archives/2015/10/13/taking-control-of-legacy-code/</link>
            <guid isPermaLink="true">http://www.saers.com/archives/2015/10/13/taking-control-of-legacy-code/</guid>
            <pubDate>Tue Oct 13 2015 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
            <description>&lt;p&gt;I’m leaving &lt;a href=&quot;http://www.trifork.com&quot;&gt;Trifork&lt;/a&gt; to start working on &lt;a href=&quot;http://snapsale.com&quot;&gt;Snapsale&lt;/a&gt; at 
&lt;a href=&quot;http://skylib.com&quot;&gt;Skylib&lt;/a&gt;. I will be taking over their iOS code base. I’ve taken over 
maintenance of many codebases before, and I thought it was time to 
describe my process.&lt;/p&gt;
&lt;p&gt;I have two goals for this process:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;learn the code that is there&lt;/li&gt;
&lt;li&gt;make sure I end up with a maintainable project&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This piece is a bit lengthy, and I’m not saying I’ll need to do it all 
on Skylibs code, nor should this be seen as a fixed guide to any 
project. I do recommend following the same steps for anyone taking over 
code that I have maintained at Trifork, so it is also not meant to be 
any judgement. It is simply a description of my current process for 
accomplishing these two goals. With that said, let’s go through the 
steps:&lt;/p&gt;
&lt;p&gt;Step #1, the most important step, is to gather a list of features and 
use-cases, so I understand what the app does. So far I have never been 
able to complete this step, I always come back to add to this list 
later, and I really wish I could become better at this step. It really 
helps every step going forward.&lt;/p&gt;
&lt;p&gt;Step #2, does it compile? Very often it does not. It depends on 
something installed on the developers computer he or she took for 
granted (hello protobuf), not everything was committed because of a too 
loose .gitignore file, or the project simply hasn’t been maintained for 
long because the customer was happy with it being in the store and did 
not want any expenses maintaining it without there being a “fire” or a 
new business-critical feature&lt;/p&gt;
&lt;p&gt;Step #3, run and read all the tests. Do the tests cover the list from 
step #1? If so, I am forever in the debt of the author I have taken the 
project over from and he or she is now my personal hero. And I’m happy 
to say I have a few of these heros.&lt;/p&gt;
&lt;p&gt;Step #4, get the certificates and accompanying private- and public keys 
and put them in a separate keychain file (without a password) that I’ll 
commit to the repo. If you have been granted access to the repo, I’ll 
want you to have this information.&lt;/p&gt;
&lt;p&gt;Step #5, are there any build scripts? If so, do they run? Do they work? 
I’m no wizard at reading shell scripts, but I need to understand what’s 
going on during my build. &lt;/p&gt;
&lt;p&gt;Step #6, is there a build server? If so, make sure I have access to it 
and that I can trigger a build and understand the process of what is 
happening to it.&lt;/p&gt;
&lt;p&gt;At this point, I have gotten to know the project a bit, and I know what 
makes it tick. Now I will begin pruning away what I don’t think belongs 
in the project and improve on the code, in order to improve 
maintainability. It being more maintainable will help me understand the 
code more in-depth later. So let’s get at it!&lt;/p&gt;
&lt;p&gt;Step #7, take control of dependencies. All too often I get a .xcodeproj 
with a lot of external code and libraries thrown in and hacked together 
into the build. This is no way to live! If I’m lucky enough to be able 
to talk to the original author, more often than not I get the line “I 
used to be a Java developer, and I got stuck in Maven hell”. I feel for 
you, bro, but this is not Java, and managing dependencies does not mean 
downloading the internet Maven style. And doing it by hand is probably 
not managing the at all.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://cocoapods.org&quot;&gt;CococaPods&lt;/a&gt; is great for managing dependencies. So I will gather a 
list of the dependencies, and write the list of them in a Podfile. Then 
I will use CocoaPods to manage these dependencies and remove them from 
the .xcodeproj. Usually the dependencies that were there are 
embarrassingly out of date, often exposing know security holes or just 
not supported any more by their service providers. Yes, I’m looking at 
you, AFNetworking, Facebook, Flurry and Fabric. So I will try updating 
them all to the latest version and see if it compiles with only minor 
modifications. If it does, great. If not, I’ll evaluate whether I should 
back down a couple of versions, or whether I should accept that the app 
is now broken and work to fix that. And even if they work, I’ll need to 
compare it to what was in the release we had at step #6 to see if this 
has given unintended consequences. If it has, back down to the original 
versions (although still in CocoaPods) and make a ticket for upgrading 
these in the task management system I use.&lt;/p&gt;
&lt;p&gt;Yes, I will check in the Pods directory into the repo. I want to be able 
to check out the repo and have it compiled on any Mac with Xcode 
installed - I don’t want to depend on neither CocoaPods nor the 
internet.&lt;/p&gt;
&lt;p&gt;CocoaPods is great at compiling a list of acknowledgements in either 
plist or markdown format. Too often these are not reflected in the app, 
so I’ll make a ticket to include them, either in an About page or in the 
Settings bundle.&lt;/p&gt;
&lt;p&gt;Finally, if Core Data is a dependency, I will usually add 
&lt;a href=&quot;https://github.com/rentzsch/mogenerator&quot;&gt;mogenerator&lt;/a&gt; and &lt;a href=&quot;https://github.com/magicalpanda/MagicalRecord&quot;&gt;Magical Record&lt;/a&gt; - my go-to tools for making 
Core Data easy to handle and maintainable. And yes, I’ll include the 
Mogenerator binaries in the repo.&lt;/p&gt;
&lt;p&gt;Step #8 is cleaning up the Xcode project and git repo further. I’ll 
remove any accidentally committed userdata, .DS_Store files, .bak files 
and other temporary files. I’ll add entries in the .gitignore file so 
they don’t reappear. &lt;/p&gt;
&lt;p&gt;I’ll remove code that has been commented out. If I’ll ever need it 
(probably not), it is in the repo and I can look it up there.&lt;/p&gt;
&lt;p&gt;I’ll turn TODOs, FIXMEs and the like into warnings. If it’s an all 
Objective-C codebase, I’ll turn them into #warnings, if there is Swift 
in the project I have &lt;a href=&quot;https://gist.github.com/niklassaers/f18eabb67f3547573064&quot;&gt;a little script&lt;/a&gt; that will turn these into 
warnings at build time.&lt;/p&gt;
&lt;p&gt;Lately I’ve explored having a scheme that will build with the latest SDK 
as a project that will only run on the latest iOS version. I’ll run this 
on a build server, and this will make any deprecated methods or 
constants light up, so that I can be sure not to use them anymore.&lt;/p&gt;
&lt;p&gt;Step #9, readable code. I’m sure the code you write is consistent and 
easily readable. While that is my goal too, it is hard to be consistent. 
But code is written to be read, and having a high degree of consistency 
and low variability accross projects makes for an easier read. That’s 
why I love &lt;a href=&quot;http://uncrustify.sourceforge.net&quot;&gt;Uncrustify&lt;/a&gt;. Uncrustify will take a &lt;a href=&quot;http://sourceforge.net/projects/universalindent/?source=typ_redirect&quot;&gt;config file&lt;/a&gt; of 
how the code should be formatted and apply that. This means that all 
code will read the same, making me only having to read what is actually 
going on in the code, instead of parsing different syntax from code to 
code.&lt;/p&gt;
&lt;p&gt;But Uncrustify can’t do it all. So after that I’ll go through the ivars 
and make sure they have an underscore as a prefix, just like we’ve been 
taught. It makes it really easy to see what are ivars, without having to 
resolve to workarounds such as prefixing them with self-&amp;gt;. At the moment 
this 
is the only task I’ll take out &lt;a href=&quot;http://www.jetbrains.com/AppCode&quot;&gt;AppCode&lt;/a&gt; for. I probably should spend 
more time with AppCode and find other areas for it, but for now, this is 
where it shines in my toolbelt.&lt;/p&gt;
&lt;p&gt;Step #10 is reducing the number of targets. Targets are 
high-maintenance. They drift apart and have buckets and buckets of 
options. Chances are you only want every few of those options to 
diverge. This is why I prefer configurations and schemes instead. If 
there is some variability I cannot fit into this, I’ll use &lt;a href=&quot;https://github.com/niklassaers/PreBuild&quot;&gt;my PreBuild 
tool&lt;/a&gt;, and with this in hand I’ve been able to deliver many apps 
that share a code-base but diverge in both features, looks, app store 
details and languages. The benefit is that this is just configuration, 
expressed as JSON, and thus easily followed over time in the git repo. 
In contrast to your project.pbxproj.&lt;/p&gt;
&lt;p&gt;Step #11 is grouping functions belonging to a protocol together. For 
each Objective C class, I’ll run use #pragma mark for each protocol, and 
for Swift I’ll use class extensions.&lt;/p&gt;
&lt;p&gt;Step #12, while grouping functions, this is a great time to remove dead 
code, meaning code that has been commented out, that can never be 
reached or which isn’t included in the compile.&lt;/p&gt;
&lt;p&gt;Step #13, another thing that I’ll do at this time is looking at the 
class interfaces and see if only what should be public is public, and 
possibly refactor parts into a protocol. Then I can begin writing 
missing tests to ensure that I’ve understood the code correctly.&lt;/p&gt;
&lt;p&gt;This step is one of those usually-never-complete steps, and I’m not 
going to be too rigorous about it. If I can devote a week or two in a 
medium sized project, this is usually well worth the effort. It’ll 
increase my knowledge of the code base, and reduce technical debt at the 
same time&lt;/p&gt;
&lt;p&gt;Step #14, understanding how State is managed in the app. Usually this is 
too intertwined in the code to reasonably be done anything about, but at 
least I should understand it. Then as I write new code, I’ll probably 
transform it slowly and try to bring those changes back to the old code. 
If there is one thing I’m really holding my fingers crossed for when 
entering a new project, it is good state management. And to be perfectly 
honest, I haven’t quite figured out what that is myself yet. But I’m 
confident that I’m on a good path.&lt;/p&gt;
&lt;p&gt;Step #15, warnings. Another thing that is good doing at this stage is 
fixing all those warnings that either were in the project already, or 
that cropped up because of TODOs and FIXMEs. Also, rigorously running 
build &amp;amp; analyze probably yields interesting code paths. And finally, run 
instruments to check for leaks and other memory buildup, high CPU or GPU 
usage, and framerates dropping below 60 FPS on the target devices.&lt;/p&gt;
&lt;p&gt;Step #16, dependency injection. Scary word? Not really, it’s just 
creating properties that can be populated by whoever creates an object, 
and that will be used instead of the singletons that too often litter an 
iOS project. This is usually counted as minutes per class, and makes the 
classes so much more testable.&lt;/p&gt;
&lt;p&gt;Step #17, when refactoring, if there is no logging framework beyond 
print() in Swift and NSLog() in Objective-C, I’ll probably include 
&lt;a href=&quot;https://github.com/CocoaLumberjack/CocoaLumberjack&quot;&gt;CocoaLumberjack&lt;/a&gt;. Also, if there is an analytics library, I’ll 
probably add the &lt;a href=&quot;https://github.com/orta/ARAnalytics&quot;&gt;ARAnalytics&lt;/a&gt; wrapper so that it is easy to add 
another one if it provides interesting metrics and services. My current 
gang is &lt;a href=&quot;http://www.flurry.com&quot;&gt;Flurry&lt;/a&gt; and &lt;a href=&quot;https://fabric.io&quot;&gt;Fabric&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Step #18, move graphics into asset catalogs, and make sure all the 
graphics are there. Way to often there is just the @2x.png file, which 
of course is no good as it’ll slow down slow non-retina devices, and 
look blurry on @3x devices. More often than not I will ask the designers 
to re-create all the files as PDFs, and use them in the asset catalogs 
and have Xcode create PNGs for the different resolutions.&lt;/p&gt;
&lt;p&gt;Finally, step #19, is to move code into components. There are three 
parts to this: if there are any parts (usually custom controls) that can 
be moved into a CocoaPod, this should be done at once. I’m not saying it 
has to be open sourced, having an in-house repo is just fine.&lt;/p&gt;
&lt;p&gt;Then the code that can be shared between extensions and apps for other 
platforms such as Apple Watch or OS X should be moved into a framework.&lt;/p&gt;
&lt;p&gt;At last I’ll move the rest of my app code into a framework. I do this so 
that I can import it into a Playground and use the Playground to work 
with views and animations instead of having to do compile-and-run to 
show a proof-of-concept or navigate to the place in the code where it is 
being used. This should make me more efficient when working together 
with the designer.&lt;/p&gt;
&lt;p&gt;Wow, that was a lot of steps, and a lot of important work to do. Some 
may be redundant because it has already been done, others may be 
deprioritized because of project constraints. Sometimes it is fine 
incurring more technical debt in order to get to market. But if I get to 
do it my way, this is what I will do - and I’m sure I’ll have a better 
understanding of the project, and a more flexible project for it. Which 
means being able to more reliably deliver those new features and 
versions month after month.&lt;/p&gt;
</description>
        </item>
        <item>
            <title>Then and now</title>
            <link>http://www.saers.com/archives/2015/10/11/Then-and-now/</link>
            <guid isPermaLink="true">http://www.saers.com/archives/2015/10/11/Then-and-now/</guid>
            <pubDate>Sun Oct 11 2015 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
            <description>&lt;p&gt;I’m setting up my travel computer for work, the retina Macbook, spring 
2015 base 
model. It’ll be my travel Xcode companion. It’s the first 12” laptop I 
use since the one I Fujitsu-Siemens I bought in 2000 before travelling 
to Australia. The Fujitsu-Siemens was an ultra-portable Lifebook S-4510, 
by far slimmer 
than the average laptop of its time - I knew no-one who had a slimmer 
one for years. So I thought it was time to compare dimensions. And, 
well, this laptop was thinner in my memory than sitting side-by-side the 
Macbook&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/12inch1.jpg&quot; width=&quot;600&quot; alt=&quot;Closed lid&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/12inch2.jpg&quot; width=&quot;600&quot; alt=&quot;Open lid&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/images/12inch3.jpg&quot; width=&quot;600&quot; alt=&quot;90 degrees tilt&quot;/&gt;&lt;/p&gt;
</description>
        </item>
        <item>
            <title>Time to learn photography again</title>
            <link>http://www.saers.com/archives/2015/10/10/Time-to-learn-photography-again/</link>
            <guid isPermaLink="true">http://www.saers.com/archives/2015/10/10/Time-to-learn-photography-again/</guid>
            <pubDate>Sat Oct 10 2015 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
            <description>&lt;p&gt;Live Photos is one of the most interesting new features of the iPhone. 
The iPhone is the most used camera I have, because it is always with me. 
And until now I have been quite all right at taking the photos I want. 
Live 
photos adds a time dimension to my photos, and this means I have to 
re-learn what it is to compose a photo, what it is to frame a photo, 
what it is to shoot a photo.&lt;/p&gt;
&lt;p&gt;Right of the bat, the first thing I wanted was to bring a tripod with 
me. Because even though I could capture the movement in the situation, I 
actually caught a lot of movement in my hand. And this is on the iPhone 
6S Plus that has image stabilization. Obviously I’m not going to carry a 
tripod around, but it means I have to re-learn how to hold the iPhone 
while shooting a photo.&lt;/p&gt;
&lt;p&gt;Apple proposed that this feature gives context to the photos, but the 
fact it can be used for a lock screen and as a Watch face means that the 
entire live photo is your composition, not just a photo with context. I 
think I’ll read a bit up on how people shoot short video clips to get a 
couple of pointers for framing and composition.&lt;/p&gt;
&lt;p&gt;So, time to learn more photography&lt;/p&gt;
</description>
        </item>
        <item>
            <title>iPhone upgrading</title>
            <link>http://www.saers.com/archives/2015/10/09/iPhone-Upgrading/</link>
            <guid isPermaLink="true">http://www.saers.com/archives/2015/10/09/iPhone-Upgrading/</guid>
            <pubDate>Fri Oct 09 2015 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
            <description>&lt;p&gt;Today my new iPhone arrived. Upgrade time!&lt;/p&gt;
&lt;p&gt;First failure - don’t back up to iCloud, it’ll take forever. Back up to 
your Mac. Remember what Mac it is you back up to. And enable backup 
encryption. Because if you don’t, it’ll forget all your health data and 
all your passwords, and apparently also apps that require encryption. 
News to me.&lt;/p&gt;
&lt;p&gt;Before this, though, unpair the Apple Watch from the phone. Because, it 
turns out that this is the only way to back it up.&lt;/p&gt;
&lt;p&gt;So by unpairing (it takes about 5 minutes) you get a backup on your 
phone. Then you can backup your phone to a Mac, remembering to have it 
an encrypted backup, and THEN you can restore your old phone on the new, 
and only have half the apps be gone for no good reason.&lt;/p&gt;
&lt;p&gt;Now you’re just a confused panda, compared to the sad panda you’d be if 
you did it any other way.&lt;/p&gt;
&lt;p&gt;Did I mention that the process around switching iPhones really needs 
improving? Apple engineers, I would expect you guys are doing this three 
times a day. Why is this not worked through? Let me just set up the new 
phone with a nod to the old phone, have all my info moved over securely, 
including the Apple Watch pairing and pairing with all other devices, 
and then have the old phone know it is now only a backup until at some 
point it is cleared out?&lt;/p&gt;
</description>
        </item>
        <item>
            <title>Treadmill - first impressions</title>
            <link>http://www.saers.com/archives/2015/08/24/Treadmill-first-impressions/</link>
            <guid isPermaLink="true">http://www.saers.com/archives/2015/08/24/Treadmill-first-impressions/</guid>
            <pubDate>Mon Aug 24 2015 00:00:00 GMT+0000 (Coordinated Universal Time)</pubDate>
            <description>&lt;p&gt;It’s now been four working days since the treadmill arrived, and it’s time to go through my first impressions.&lt;/p&gt;
&lt;p&gt;This treadmill is heavy! Delivery didn’t go as smooth as I had expected, the delivery guy placed it in front of the wrong side of the building and never called me to ask where to deliver it, so I had to carry it through the building and up some stairs together with a co-worker. That was some real exercise! But on the other hand, that also means it is very, very stable. I have not have it move accidentally even a millimeter.&lt;/p&gt;
&lt;p&gt;I do use it almost all the time. And it took no time getting used to working this way, even though I had expected it would take some getting used to. I find it easy to focus and consentrate on the task at hand. It does make it more obvious to me those little breaks I take when getting water, coffee, or going to the bathroom, because I have to pause it first.&lt;/p&gt;
&lt;p&gt;The treadmill comes with a dashboard that should be mounted under the desk, close to my belly. I found that weird, and even though that means I can’t use the safety release strap, I have placed it on my desk, just in arms reach. With an average speed of 2.6 km/h I think I’ll be fine safety-wise. :-)&lt;/p&gt;
&lt;p&gt;I had set a goal of 15.000 steps a day. I thought that was ambitious, but I find I should be able to up that to 21.000 steps a day. My goal of 12 km a day is still a stretch goal. In actual fact I’ve been going more like 7 km/day. So that reveals two insights: I take smaller steps when walking on the treadmill than when I walk outside. And, I don’t get 6 hours of walking a day. I haven’t yet figured out where the rest of the time goes, and I expect to get back to that later.&lt;/p&gt;
&lt;p&gt;I was not prepared for how loud this treadmill is. It is really noisy when I walk on it. Noisy enough to annoy my collegues. So I’m better at closing my door, and if I forget or need to get fresh air in, they will close theirs.  I find I can ignore it quickly enough, but I’m not sure if this will be a problem long-term. However, this is not a good thing for close cooperation.&lt;/p&gt;
&lt;p&gt;A treadmill is also really not good for pair programming, even when it’s turned off. It’s in the way. This can be solved easily enough by using the other persons computer, but that just means that not everyone can use a treadmill, or there will have to be treadmill-free zones where we can bring laptops to pair. More frustrating is when I quickly want to show something to a collegue. It’s like asking them up on a podium, and I’ll quickly climb down to let them have the space. But it’s absolutely odd. Also, when someone comes in to chat I prefer to climb down to be at an even level as the other - the extra height of the treadmill really makes it feel like you’re standing on a podium.&lt;/p&gt;
&lt;p&gt;What I did not expect is that I build up a little bit of a sweat. But hey, it’s still early days and I’m experimenting with finding a speed that is comfortable - not to slow but not something that’ll make me sweat either.&lt;/p&gt;
&lt;p&gt;The only basic treadmill functionality I was very surprised not to find, was walking at an angle. I wanted to set it to a 10 degrees climb, thus walking uphill. When I couldn’t find out how I should set that, I contacted my supplier, who told me that it could not do this. As far as I understand, tilting it manually is not recommended and could reduce its lifespan. So no climbs or descents for me, even though I have never seen a treadmill that does not provide this.&lt;/p&gt;
&lt;p&gt;So apart from being limited to a 0 degrees climb, the basic treadmill functionality is good, and I’m happy with it. I must say that I really enjoy using it, and look forward to coming to the office, and going for a walk. The main drawback, apart from the noise that makes me isolate myself a bit, is all the bad puns I come up with during the day. &lt;/p&gt;
&lt;p&gt;Now, what I’m not happy with is the extra-functionality that it provides: Bluetooth pedometer. I hit Bluetooth pairing and asked my iPhone to pair with it. The iPhone said no thank you! Really!? I mean, this is 2015, it is a really expensive device, and its makers haven’t bothered either getting the MFi certification for it, or adding BLE to it and have it comply with a basic service such as the pedometer service? That is crazy! So what they want me to do is pair the treadmill with my Mac, download and run a separate application that will take the input and upload it to a “customer club”. It duplicates some basic stats that the treadmill display are already showing, and for more basic information (such as how long have I been using the treadmill for today? How many steps have I made? What distance have I walked?) I have to press a button to be taken to a website. I don’t want a website. I want the information to be captured and entered into my Health app, the Health app that has come together with every iPhone for quite a while now, and where all my other health related information from my iPhone, from the BLE heartrate monitor and my Apple Watch are gathered. But alas, all LifeSpan can tell me is that an app is coming later this year. I asked my vendor if that means the console will have to be updated, since it doesn’t pair with my iPhone, but he assured me that it will work with my existing console. I wonder how that’ll work, and will be sure to write a review after it has arrived.&lt;/p&gt;
&lt;p&gt;But this issue with the Health app integration has me wondering - how does it work when multiple sources track the same data? I already wear my Apple Watch, and it tracks my steps. So does my iPhone when it’s in my pocket, and I’m sure they coordinate fine. But when I’m on the treadmill, my hands are resting on the desk and my iPhone is connected to my Mac on the desk. So the only thing tracking my steps is the treadmill. That is, until there is something I need to read. As a developer, I read an awful lot during the day. Especially code. And for that I may fold my arms, leading the Apple Watch to start tracking my steps. Now there are two sources tracking my steps. How would they figure out when they overlap? I don’t want to say that during office hours, only use the data from the treadmill, because I’d like to count the steps to and from the coffee machine as well. So how these would integrate, or how it already now integrates with all kinds of devices that count steps, is a mystery to me at the moment.&lt;/p&gt;
&lt;p&gt;Settings on the treadmill are horrible. I knew I could go into settings to turn of the beeping when I press a button and to have it start at the speed I had last set it to. But settings was a set of options that were called F001 to F021. More than half of them were undocumented, and some options were 0 or 1, in the case of setting it to English or Metric, they were En or Si. What is Si? But the four out of 21 settings that were documented in the manual were fine: I got to turn off anoying beeping sound, set it to metric, make it remember the last speed I entered and don’t bother about the safety pin I didn’t see the reason for. I have no idea why all of this was not default. After I set it the first day, though, I did not have to set anything again.&lt;/p&gt;
&lt;p&gt;In conclusion, I love the walking - much more than I expected I would. I look forward to walking tomorrow. The first day, I walked 15.000 steps and got used to the mode of work almost right away. I feel I’m doing something good for my body and for my health. And that is awesome, especially since I do it while getting my job done at least just as good as I used to. Cooperation around my desk will be affected, but I can work around that. And I’m hoping that lubricating the belt with a silicone spray as the manual suggests will reduce much of the noise. And finally, I can’t wait for an app that will integrate with the Health app.&lt;/p&gt;
</description>
        </item>
    </channel>
</rss>
