Pedals that Bite

Nice pedal. Shame about the knife edges!

Nice pedal. Shame about the knife edges!

I bought Shimano XC Race Pedals (Grey) when I found them cheap on Wiggle, as my older SPD pedals were creaking. I hate noise when I ride. The XTR pedals look great, notice the milled surface just above the logo? Better shoe-pedal engagement says Shimano. But there lies the problem.

 

Pedal Wound!

Pedal Wound!

The edges of these pedals are sharp! I wrote about this in a review on Wiggle but they didn’t publish it – why would they publish an honest review that doesn’t help sell pedals? They work fine so I’m not returning them, I just need to get around to Dremeling those edges to make them less like James Bond’s DB5 tire shredders.

Aston Marton DB5 Optional Equipment

Aston Marton DB5 Optional Equipment

Knog Blinder Road 3: Not Impressed

I was in the bike shop for no good reason other than there was a bike shop in my way, and this light caught my eye. It’s a Knog Blinder Road 3 – neat little package with a very bright light that looked great in the shop. Australian company too. My riding has been frequent enough that I felt OK spending another hundred-odd on lights, so I bought this and a matching rear light, a Blinder 4V.
At first glance the Blinder Road 3 is a neat design – a rechargeable light with a fold-out USB connector built in! Except that the curvature of the light’s mount and the position of the USB connector is such that it can’t plug directly into anything much, so a short USB extender cable is provided. And this connector is positioned under the mount, so the light has to come right off the bike for it to be charged. That’s strike 1.
Next the mount itself. It’s a stretchy silicon strap that has a hook and lever design, the lever meets with the strap behind whichever bar you are going to attach the light to and then is folded back flat against the bar. Just like a guitar case’s latch. That’s fine, except that my bars are a bit thin, so the stretch wasn’t tight enough to stop the light from drooping after bumps. (Perhaps this was not an issue with the lighter-in-front Blinder Road 2) I padded it with some rubber, but then the latch wouldn’t stay shut.
One morning I noticed the latch wasn’t shut as I rolled down the bike path. I tried to grab it, but my gloved hands were a bit clumsy and soon it was bouncing down the road. It didn’t break but did get scratched up. That’s strike 2.

Probably seemed like a good idea at the time...

Probably seemed like a good idea at the time…

Two buttons control the light. One selects the mode of the light and the other toggles a high beam mode, so whichever mode you are in it can get a lot brighter – in high beam, the green indicator light turns blue. A long press on the mode button turns the light on and another turns it off. A short press switches between the modes. Time your press wrong and it does the wrong thing, and the buttons are very small and hard to press in gloves. I’m not sure why there is a high beam button since it is all but impossible to find while riding. That’s strike 3.
I wish I had not spent the money to find out about the Knog Blinder Road 3, I am back to using the Moon X Power 500.

Moon X Power 500, detached from mount.

Moon X Power 500, detached from mount.

The Moon light has a mount that attaches securely to the bike, then the light slides off for charging via a mini-USB connector. It has one button that is large enough to press while wearing gloves, though even larger would be good in winter. It seems as bright or better than the Knog light but I admit I have not tested them objectively. My only big complaint is that it doesn’t use a stainless bolt in its mount, so I found it had rusted somewhat as I took it off after 6 months, but grease on the thread made it better and should keep it from rusting further.

Knog Blinder Road Rear

Knog Blinder R

I am less disappointed in the Blinder R rear light, it is still on my bike. Apparently my seat post is just the right diameter for the mount to work, and since there is only one button (and choosing the right mode is far less critical) I can live with it – but it’s still too small and in an awkward place. I expect I’ll go back to using the Tioga Dual Eyes once the power runs out since the hidden USB plug is still a problem on the Blinder 4. Weeks have passed and it’s still going strong so I have to give it some credit for battery capacity.
Final note – if you ride with a high-powered front light on your bike, point the beam down at the ground a few metres in front of your bike. Don’t blind everyone coming the other way – and that means don’t stick a high-powered light on your helmet, blinding everyone you look at. Thanks.

The Next Mac mini

I love the Mac mini. In 2005, after the WWDC keynote, I couldn’t order one fast enough. When I opened one up and found it used a laptop-sized IDE connector, inspiration struck – I built a tiny PCB with a female 2.5″ drive connector and a male 3.5″ drive connector, allowing use of a cable to connect a full-sized drive (with its own power supply) for better speed and higher capcity. I made and sold hundreds of those little boards, it was my 15 minutes of internet fame.
Over the years I have had several minis. Early on there were two G4s, both with the larger drive modification. After the switch to Intel I’ve owned at least three or four. Most of my iOS programming has been on a mini. Right now the family still uses a late 2009 2.26GHz with maxed RAM and a OWC Data Doubler allowing an extra drive internally.
The little 2009 mini still chugs along. It gets a real workout from kids playing Flash games, serves music and video around the house and even gets used for Xcode sometimes. My main workhorse now is an 11″ MacBook Air 6,1. The Air is almost perfect – surprisingly fast, and 8GB RAM hasn’t been the compromise I thought it would be – but it isn’t quite portable enough. When I bicycle to work I wish it was smaller because I rarely use the screen or keyboard, I plug it in to a monitor at both ends of the trip.
There is no question that this, the smallest of Apple’s laptops, is far more capable than the 2009 mini and it’s comparable in performance to a current mini – because the Mac mini has always been basically a headless laptop. In 2009 this was a performance problem since laptop performance lagged far behind desktops. Thes days, not so much.
So what could a new Mac mini look like? Like this:hero_macpro
…but smaller. Inside the Mac Pro is a central triangular heatsink extrusion around which the two GPU cards and CPU card are arranged. A mini only needs a single board containing a CPU with integrated graphics. Sometimes I want discrete graphics but the Air’s HD Graphics 5000 graphics is adequate, I play Diablo III on it. It won’t be good enough for Star Citizen or Day Z on a big screen but no mini ever has been. It will be the usual choice, Core i5 at the bottom end, Core i7 with more cores at the top. I don’t think ARM is at all likely this iteration.
Overall size is probably dictated by the drive, assuming the mini doesn’t get PCIe-based flash like the Pro. If it did, how small could it get? Probably smaller than industrial designers would consider ideal. With SSD the machine would need to be built around a cylinder capable of accepting 2.5″ drives vertically. It could have a small door on the bottom allowing this drive to be replaced by the user, or the cylinder could lift off as it does on the Mac Pro to allowing access to memory modules. I’m not sure if soldered-on RAM is the future of Apple and it doesn’t bother me much but I would like a next generation machine to have a 16GB RAM option.
Cooling would be just like the Mac Pro, an aluminium extrusion to which the hot components are thermally coupled. A fan of similar design to the Mac Pro’s could cool the machine if necessary but with the opportunity for a bulky heatsink and adequate convection it would rarely activate.
So what connectors would you expect to find on the back? Two Thunderbolt connectors. Four USB, headphone/line out and microphone. And MagSafe.
Using MagSafe to power the mini would take a bulky component out of the machine. Thunderbolt Display users don’t need a power supply since the display already has one – making the display an even more attractive accessory. Everyone else could use an adapter, just like laptop users do.
MagSafe can disconnect, that’s true – in practise it doesn’t unless you make it, and I don’t believe it would be a problem in a situation where the mini sits on the desk and the cable is routed away from hands and feet. If it did get yanked I think I would rather have it disconnect and the Mac lose power than for it go go flying. But what if a small battery were included giving the mini built-in UPS functionality, just like a laptop? It could be just enough for the mini to safely suspend to disk.
Not Ethernet – I got over my distrust of WiFi and it is perfectly adequate for this kind of machine. If you must have Ethernet then buy the Thunderbolt adapter.
Not HDMI – minis aren’t for driving TVs or projectors. For Apple TV and larger laptops it makes sense. If you need it buy the Thunderbolt adapter.
That’s the mini I want, and what I hope is announced at WWDC. If they do I bet they put it in on-screen and let everyone assume they are seeing a Mac Pro before pulling back to reveal the Mac Pro sitting next to it.

Pneumonia and Pleurisy

From about mid-January this year I have been sick. It started out as a cold and moved around the body, one week just a persistent cough and the next it was sinus congestion and pressure. Then an earache, then back to the chest and around again. I didn’t go to the doctor – my doctor doesn’t give out antibiotics for this kind of thing because it has no effect on the viral cause. Why pay for a consultation when only your own body can sort it out?
I nearly got better several times but each time I would feel good, do a day in the garden and get tired, then be back to square one the next day. Total rest would have been great but when you are responsible for taking care of the house it isn’t always an option. Everyone at work more or less got used to me coughing. People warned me I would get pneumonia if this continued but I didn’t take that very seriously, only old people get that.
Then last Wednesday I woke up and just couldn’t go to work. The dreams are strange with a fever. I have industrial-themed dreams where some process or operation is repeating with great noise and huge scale. I couldn’t balance and it was an effort just to get in the shower. The doctor said I probably had pneumonia and gave me Roxythromycin to take. Feeling as sick as I did I took it seriously and stayed in bed after that, only sleeping and watching TV. No internet. My birthday came and went and I didn’t want to know, I couldn’t eat or even talk much.
That Sunday evening my parents came to visit and I got out of bed. I didn’t think I was shaking that much but apparently I was shivering, so I was taken off to a weekend clinic where the doctor said to head straight for hospital. At Cabrini Private they didn’t take too long to see me but then I was stuck in the ER cubicle for a few hours before moving to a ward. While there I had a cannula inserted into my hand and started the antibiotics.
That night was about the worst fever I have ever experienced. Twice I woke on the ward and had to ask for a new gown and new sheets. My head was like a fountain of sweat. Strange dreams again, of people who ran across a huge grid as living pointers to data in some huge machine my brain never came up with a purpose for.
First thing in the morning the nurses made me get out of bed and sit up in a big chair, they even had me walking around the ward pushing my IV pump ahead of me. What I didn’t know was that lying down is a bad thing for pneumonia, but I had been doing it for days. Maybe if my GP had told me that I would have made a recovery without going to hospital?
The IV drugs sorted out the infection very quickly. Each day I had the same thing, a large syringe of a yellow antibiotic pushed straight into the cannula and a bag of clear antibiotic through the IV pump. I don’t think my bacteria was cultured and identified as the infection responded well to these broad-spectrum drugs. On Monday I felt extremely rough, on Tuesday I was a lot better and thinking about home, on Wednesday I was ready to leave. On Wednesday I did go home with a ten-day course of two kinds of oral antibiotics – I can’t even have beer until that’s all over.
There’s no sleep in hospital unless you have a private room and even then a nurse will be in to do observations every couple of hours. I was in a four-bed ward as I have been on nearly every other hospital visit. The other guys were about thirty years older than me and while nobody snored everyone had IV pumps that had alarms ringing every hour or so, lights are on and off all the time, and on one bad night the man next to me had chest pains resulting in visits from five doctors in the small hours of the night. I knew I was going to get better but they didn’t necessarily. I never felt like I wasn’t going to come out of there but I did come away with an appreciation of how fragile we are, I would not have had to be much sicker to be very seriously worried.
At home my lungs have felt clear and I have had no fever, but pleurisy is ongoing and is perhaps worse than the pneumonia. The pleura is the lining surrounding the lungs and when it becomes inflamed that’s pleurisy, a common counterpart to pneumonia. The best way I can describe it is that when you breathe it feels like being stabbed. The worst pains have been with the sudden intake of breath that comes with yawning. It means I can’t lie on my side at the moment and I have to take Ibuprofen regularly. It does cut the pain a little but more importantly will clear up the inflammation, paracetemol + codeine is masking the pain so I can sleep.
My fitness is very low now. Lung capacity is reduced following pneumonia and it will take months to get back to the point where I can ride the round 30km to work each day. Just walking around the house sees me out of breath and sweating, but that’s what I have to keep doing to build up fitness again. This Tuesday back at work I’ll need to walk a few city blocks and I’m going to have to take that very easy.
Financially it wasn’t pleasant. The ER doctor sent a bill for several hundred dollars for an “extended consutation”. I talked to him for five minutes total. I heard him talking to the specialist about me for five mintes too, he must have spent a lot of time on me I don’t know about. Each day in the hospital cost hundreds. The medicine cost more hundreds. The lung specialist hasn’t sent his bill yet but I don’t expect it to be small. On top of all that I’m out of sick leave, so no pay either.
What are the lessons from this?

  • Don’t push yourself too hard when sick, nothing beats rest.
  • I was right not to see a doctor until the fever hit, they all said they could not have helped.
  • if you get pneumonia you sit up, you don’t lie down or sleep all day.
  • you can’t possibly thank nurses enough. They get paid far too little.
  • while this was expensive it would have been orders of magnitude higher in a country without universal health care. Look after Medicare, be proud of it.
  • Next time I’m going to a public hospital. I’ve got no reason to think the staff will be any different and my health insurance covers so little as to be useless – its only purpose is to avoid the extra tax imposed on anyone without private health insurance. John Howard introduced this to prop up the failing private health insurance industry years ago. Of course private health premiums rose by just a little less than the tax penalty very soon after he did that.

Rocksmith 2014 Guitar Package

In December this year I heard about Rocksmith 2014. Sounded good, but then I found it was Mac-compatible and it got upgraded to must-have. Steam got it installed with no fuss, an eBay seller provided the cable and it was ready to go. The cable is essential – Rocksmith will not work with other guitar-USB adapters, though GarageBand can get a low signal from the Rocksmith cable. There’s the famous Ubisoft DRM, I guess.

The voice of Rocksmith sounds like you would expect given a voice actor and a brief to sound like a Rock Dude (searched, but can’t find his name). He guides you through the intro sequence, asks you to identify the headstock and to calibrate the level coming from your guitar. Once that is done you can get right into “Learn a Song”, though new players can use the lessons, from basics like “holding a pick” up to stuff I have yet to learn. From the start, little tasks keep popping up to keep you moving along (same as starting a new World of Warcraft toon) and if you just stick to one song it will remind you to try something else, or do a lesson or play a game.

Small annoyance: “Log in to UPLAY” pops up every time you switch users and I don’t want an account with them. That means hitting ESC twice each time and when you play alternate songs with someone else, switching users each time, that’s a lot of ESC. I play without logging in and I might miss out on an “exclusive” song but the are plenty left.

I’ve spent almost all my time in Learn a Song with brief Guitarcade sessions. The games are OK but I don’t much care for the 8-bit look even though it’s what I grew up on. I did some lessons and liked the interaction – you try out the idea about halfway through most lessons, then you get a practise track. You can repeat the practise track until you get 100% accuracy or until you quit out.

The repeating is what really makes this system work. As you start on a new song it starts out very easy and your rating is 0%. As you hit each note the system detects that you’re doing OK and makes things harder for you, adding notes or switching simple note for chords or adding variations like bends or mutes. Each time you finish the song you get graded on accuracy and difficulty and your song score goes up if you have done well enough.

My Blitzkrieg Bop is at 108%, so there’s some strange math going on there. What this shows is that you don’t have to be perfect to get to 100% because even with that 108% I know I’m not playing perfectly. Losing My Religion is at about 70%. Detection is accurate though, in the R.E.M. track there are parts switching quickly from an Em chord to an F# note and it will get me evry time if I miss, same with the mandolin sections. Rocksmith is tough but fair and will definitely make you play better if you put in the time. If those songs sound too easy check out the songlist, if there are no challenges left then my hat is off to you.

Riff repeat is a great feature to stretch out any part of the (or the whole) song without altering the pitch so you can get tricky sections down without feeling like it is impossible. You still play in strict time, you just get to vary that time. And I feel this is another huge Rocksmith advantage when you are learning – the tempo is the tempo and if you miss, you miss. With tab you can learn a song incorrectly because you always take just a bit longer to get your fingers in position on hard parts. Who has the discipline to practise with a metronome?

I play a lot with my son who is ten and has been having weekly lessons for a year. While the songs he is learning are nothing like what he does in lessons the overall guitar experience (string and note positioning, finger strength and stretch etc.) have obvious benefits. I can’t think of this as a game is that it’s something that’s just fun, it is one of those rare things that is in no way bad to do and it’s still a lot of fun.

Now we’re on summer holiday for a few weeks and the thought of leaving Rocksmith behind wasn’t a happy one. With budget airline tickets carrying a guitar wasn’t an option even if the risk of damage was acceptable. Why not buy another guitar! I read a couple of reviews saying that the included guitar was OK so decided to give it a shot. Of course there were people who said it was garbage but you can take any kind of guitar and someone will hate it.

The Guitar

This is the main point of the post, so you can decide whether you want this guitar or not. I couldn’t find much information about it before committing to buy so I hope this helps you.

A bit of background is in order. You’ll want to know whether I am at all qualified to have an opinion on this which is fair enough. I’ve had guitars for about twenty years, acoustic and electric. Currently I have a Chapman ML-1, a Korean Epiphone Les Paul from around 1997, a Heritage “Class of 59″ (similar to model H 157 in Korina, an Ed Roman special – opinions vary!), a Maton EM100 and a Maton EML6. They range from OK to excellent; the point is not to brag but to show my frame of reference for writing about the included guitar in the Rocksmith package. I’ve built a Tele-style guitar with a Stew-Mac neck also, and done a lot of minor repairs so am familiar with how these things are put together.

front of headstock

The guitar is the usual shape with the big “Junior MODEL” label on the headstock in the same style as all the Les Paul models and it is the usual Les Paul dimensions. Just to be sure you know what you have the truss rod cover has “Les Paul JUNIOR” on it.

back of headstock

Paint is a very glossy black and from the rounded edges on the headstock it looks to be a very thick coat of paint. Tuners are a generic Grover-style and they work well enough, no slop in the mechanism and they have the usual screw to tighten up. The nut is big and chunky and the slots are varying quality – some deep, some shallower but not too sloppy. I’ll be making and fitting another nut if I ever take this back home but the plan is to leave it here for the next visit. The “Made in China” sticker, QC, recycle sticker and serial number are found hereabouts.

closeup of nut slots

The neck is a very similar profile to my other two LP shaped axes, nothing to complain about. Fret wire is nicely finished and well polished. Slots are cut and wire is trimmed so the edges are not visible from the side of the neck. Markers are simple pearly dots, small dots on the player’s side of the neck.

Neck meets body

Heading down to the body itself the neck attachment is by bolt and big square plate, very Fender! There’s no angle relative to the body like most Gibson/Epi guitars with a set neck. The fretboard continues with a small gap over the body, overlapping the 3-ply pickguard, and is chopped off about one fret’s space away from the 22nd fret.

neck bolts & plate

The pickup is an uncased humbucker and it is black and it works. Can’t say much more about it than that with no other guitars and no amps here to compare it to. The surround is cream plastic and it is really cheap and lightweight, chrome would look a lot nicer and it would be easy to replace – could have added a dollar to the build cost though.

one humbucking pickup

The bridge is a one piece mounted on two large screws with intonation ridges cast into the top. The strings pass through the center of the bar and wrap over, the assembly is not unlike the regular LP tail piece except that there is no extra piece between this and the pickups. Because there is only one pickup there is no need for a switch or extra control knobs. Only two knobs decorate the front of the instrument in the familar transparent “speed knob” style. The top is flat and the Fender-like three-ply pickguard covers a large area.

guitar body

In the first session with this guitar I noticed the action was really high. So much so that on the high strings I’d think I was about to hit the ‘e’ string and find the ‘B’ in the way. Without any tools I could not do much about it except screw the bridge down further until the ‘E’ just started to buzz, then back it off a little. It is playable but I think a new nut could help a lot.

Back of guitar

Here’s the bottom line on the package including the guitar: this is incredible value. As above, it’s a good guitar for the money and if you are learning you absolutely do not need anything better. You get a lead which is not covered in fancy vintage woven cloth but it does work. You get a strap and two picks, which are nice if you have none but they are pretty much junk. Two Allen keys – no word of explanation, what’s a beginner to think they are for? Best to leave them out in a package like this. You get a Rocksmith cable, and you get a disc with the game. I needed an extra cable so my son and I can play together and I’ll sell the PS3 game disc alone, so the guitar probably cost around $160 Australian in the end, not bad at all. There are much worse guitars for that money.

Front of guitar

I’m playing on a Mac, an i7 2013 11″ MacBook Air to be exact. Sometimes I play on a 27″ monitor and sometimes not. It will install and run on the Late 2009 Mac mini (2.26GHz, GeForce 9400M) but is not playable – video features can be turned to make it acceptable but too many notes aren’t detected, the old mini just can’t keep up. It is also available for PC, for PS3 and for XBox 360. I’m told by friends that have consoles that you cannot run PS3 games on a PS4 and you can’t run XBox 360 games on XBox One so if you just bought the latest console hopefully they will release a version for you.

This “game” is amazing and has done more for my playing in a month than years of downloading tabs and wasting money on gear I didn’t needed ever would have. The guitar is a testament to repeatable CNC manufacturing in volume and before you sneer at such a cheap instrument, try one out. I wouldn’t hesitate to recommend the package to anyone who wants to go a long way in guitar for relatively little money. Smart marketing too, I know one person who went out and spent $3000+ on a nice new Gibson a couple of weeks after buying Rocksmith. No doubt I’ll be spending money on DLC, even more when the Steam issue that stops you buying Rocksmith 1 DLC is fixed – they are compatible but right now Steam requires you to buy Rocksmith 1 before buying DLC for Rocksmith 2014. Now I’m going to go play it again.

Continuous Integration with Jenkins and Xcode

Last week (15 November 2012) I gave a short talk on setting up a continuous integration environment with Jenkins at Melbourne Cocoaheads. This is pretty much the content, converted into a blog post. Some said afterwards they would like more detail on various parts, so here is the whole thing with the shell script at the end. I hope you find it useful. I have to give a lot of thanks to all the other bloggers who wrote about their own experiences in doing this and to Stack Overflow.
Motivation
First up, why would you do this? There are two big problems that this setup solves. First and most broadly speaking, continuous integration solves the problem of a broken build where nobody really knows how it got broken, which change broke it or how long it has been like that. If you let your project get into that state then it will be a miracle if you ever deliver anything, dealing with this issue is a huge part of success when working in a team. Because the build is performed every time anyone submits to the repository you will know right away that there is a problem and you can fix it right away. You can also apply some appropriate penalty to the person that did it – they can buy the team a coffee or something, pour encourager les autres1.

Secondly and more closely tied in with iOS development is that you can have your automated build sign and deploy a build so that anyone can point their iOS device at your distribution server with mobile Safari and have it install your build using Over The Air (OTA) provisioning. This is a feature of iOS available since release 4. You, the developer, will no longer have to deal with Important People tapping you on the shoulder asking for a build – you can direct them to your server. Remote testers can easily grab a build too.

There are some services that do this for you. Two I know of are Hockey and Testflight but this article deals with neither. They work well and provide a lot of extra features, particularly around bug and tester management, but it’s good to know what’s going on underneath. When you’ve done this setup you may choose to move on to one of those services for those extra features.

Build on Success
Before getting started with this process, make sure you can do a successful Archive build in your regular work environment. If you can’t then it isn’t going to be any easier attempting to do it headless and automatically. That means all private keys, developer certificates, provisioning profiles and Xcode functioning together happily – sometimes this is not a trivial task. As a little refresher, here’s how all the developer pieces come together in code signing.
Provisioning Ingredients diagram created in Core Data model editor
Virtually Risk-Free
Having configured Jenkins and OTA provisioning once or twice before I hesitated to install Jenkins and jump into command line changes on the machine I work on every day. Instead I installed a clean install of OS X 10.8 (Mountain Lion) using VMware Fusion, version 4.1.4 – couldn’t be easier. OS X came from the Mac App Store, the .dmg was converted to a CDR and VMware treated it as a boot CD. According to the Mac OS X 10.8.2 EULA, you are licensed to do this if you bought your copy from the Mac App Store2.

In addition to not potentially screwing up the machine on which you earn a living, virtualisation allows you to make a snapshot of your Virtual Machine (VM) – a saved game, if you like. Any time you know you have got something right you can pause the machine and take another snapshot. Any time things go badly wrong you can revert. The cost of this is nothing but disk space.
First up, the new VM needs Xcode installed. When done it is a good idea to license Xcode for all the users on the machine using the terminal:
sudo xcodebuild -license
The reason for this is that your build system will not be interactive, it can’t pop up the click-to-accept license dialog. About 7,109 presses of the space bar will be required before you can type “agree” to accept the license for all users on the system. I would never advocate using ‘G’ to make less skip straight to the end of the license agreement, you should read it all. (This is the first of many useful bits of information from an excellent session from WWDC 2012, hereafter simply called “404″3)

Next up, java. Theoretically java should be installed for you automatically when Jenkins tries to start. Once I installed Jenkins and it did not start, reason unknown. Now I type “java” at the command prompt and cause it to be installed before installing Jenkins. This will download and install java from the Mac App Store, nice and easy.
Before installing Jenkins I like to create the “jenkins” user. If you install Jenkins first the user is created but not as a regular, interactive user. Creating the user will make it easier to deal with some keychain operations later. You can create this user in the normal way with System Preferences. I made “jenkins” an administrator but it probably does not have to be.
Finally, time to install Jenkins itself. Because of my VM strategy I downloaded the Jenkins package on the host machine then copied it into the VM via a shared folder. If things go wrong this will save you from having to download it again. The Jenkins installer is fairly simple and nothing needs to be changed though you might want to look at the customize button to check that settings have not changed since I wrote this. Jenkins should be made to run as “jenkins”, the user you just created.
Following a successful Jenkins installation the Jenkins console should pop up in your browser – but this isn’t successful just yet. As of version 1.489, Jenkins includes a property list that must be edited first. At the console,
sudo launctl unload /Library/LoadDaemons/org.jenkins-ci.plist
then edit it to point to user “jenkins” actual home folder, (/Users/jenkins) and
sudo launctl load /Library/LoadDaemons/org.jenkins-ci.plist
Jenkins home page
Jenkins is now configured to load when the system starts and should be running! If you launch a browser and enter http://127.0.0.1:8080 you should see the Jenkins console, ready to go to work.
In your clean system + Xcode you have git installed, but Jenkins can’t find it yet. You need to go to “Manage Jenkins” and specify the path. That path will be
/Applications/Xcode.app/Contents/Developer/usr/bin/git.
Jenkins supports SVN as installed, but I’m using git. For git users, you will want to install the Jenkins Git plugin. Github users will also want to install GitHub and GitHub API plugins. The way Jenkins uses git is to clone the repository you want to build before each build commences. I guess you could do this with a simple copy or ftp also, but I hope you are using some kind of revision control.
Before configuring the Jenkins build job, user “jenkins” needs a bit of setup. In your day-to-day environment, the one where you can successfully build an Archive of your project for distribution – remember that “Build on Success” section? – you have a keychain containing your developer credentials, and “jenkins” does not. You need to export them and then import them into a keychain for jenkins to use during the build. Your private key and your distribution certificate are required to make an OTA build, so export those and transfer them into the jenkins account using your public folder or similar.
A note about privacy – your private key is private, and important. Don’t leave it in your public folder. There is discussion on StackOverflow about how sharing a key like this is actually a bad idea, but I don’t know how to do it better.
Switch to the jenkins account and it’s time for some terminal magic:
security create-keychain -p jenkins JenkinsCI
security default-keychain -s JenkinsCI
security import -k JenkinsCI -P security import -k JenkinsCI
These commands create a new keychain named “JenkinsCI”, set it to be the default keychain, and then import the private key and distribution certificate you have transferred in to this account. The password “jenkins” is used throughout. During the build these assets will be used to sign the code with your developer credentials.
The provisioning profile is the last developer artefact needed. In your own account you will find it in ~/Library/MobileDevice/Provisioning Profiles, where Xcode puts it. You might choose to put that in the same place in the jenkins account, or you might choose to check it in with the code in the repository. Either way it must be available during the final stage of the build.
Now the configuration of the Jenkins job can begin. Each job in Jenkins is a series of steps that you define to produce some useful outcome. Here the outcome is a downloadable, installable iOS package on an accessible web server. Start by clicking “New Job” in the Jenkins console.
New Job
This job is configured as a “Free-style software project”. A Multi-configuration project is shown in 4043 but this is only slightly different, a little simpler. There are six main phases to configure and once you have chosen a name for this job you are done with stage one. It remains to fetch code from the repository, build it, sign it and upload it. Finally you will set up when the job will execute.
Fetch
Assuming you are a git user, in the Source Code Management section of job configuration you can just select git and then enter the repo location, such as https://github.com/[GitHub account]/[Project Name].git/ – on every project in your GitHub repository you will find the clone path at the top of the repo page. If your repos are not public you will need to deal with creating an ssh key for your jenkins user in your GitHub account– or use HTTPS, or any method that works your your repo. At the start of every job execution Jenkins will clone the entire git repository and use it for the build.

Build
At this point it is time to be sure that jenkins has access to the keychain created for this build. In the Build section of job configuration you need to add a build step, “Execute shell”. You’ll get a window that accepts shell commands which will be run. The first command to enter is
security unlock-keychain -p jenkins JenkinsCI
As you might guess this unlocks the keychain, allowing the rest of the script access to developer artefacts as required.
In this script one very important variable set for you here is $WORKSPACE – it is set by Jenkins and is your pointer into the place where everything happens. It is used many times in the build commands.
Before building with Xcode in Jenkins, another important variable should be set. The xcode-select command sets the default installation of Xcode that will be used. The DEVELOPER_DIR variable can override xcode-select, so it is a good idea to be sure it is set to the right value before proceeding even though in this case there is only one Xcode installed. In future you might lift this script to run on some machine with more than one.
The build itself is deceptively simple:
xcodebuild \
-project [Project Name].xcodeproj \
-target [Target Name] \
-configuration Release \
-sdk iphoneos \
CODE_SIGN_IDENTITY="${SIGNING_IDENTITY}"

The command xcodebuild is the main command used to execute builds from the command line with Xcode. My project is a project rather than a workspace, so I am specifying the .xcodeproj rather than the .workspace here. The target is the target name as you would see it in Xcode. The configuration is Release (but it could be Debug) and the sdk is iPhone rather than simulator.
Initially I had a command that looked a lot more like what is presented in 4043 but I got an error message that indicated the code signing identity was not set. Why this happened I do not know, but specifying the code signing identity, like
SIGNING_IDENTITY="iPhone Distribution: [Developer Name]" fixed it. Now Xcode is building your code.
Sign
When the build has finished you have a .app file, which isn’t very useful. Because it is built for the iphoneos sdk it doesn’t run on the simulator and because it isn’t signed it doesn’t run on a device. Let’s sign it.
The other command used with Xcode on the command line is xcrun – it is a two-phase thing, finding and then executing commands included with the Xcode distribution. To sign, xcrun is using a perl script included with Xcode called PackageApplication.
xcrun -sdk iphoneos PackageApplication \
-o "${WORKSPACE}/[Target Name].ipa" \
-verbose "${WORKSPACE}/build/Release-iphoneos/[Target Name].app" \
-sign "${SIGNING_IDENTITY}" \
--embed "${PROVISIONING_PROFILE_DIR}/${PROVISIONING_PROFILE}"

It can take a lot of options. The ones I found necessary are the output, where you specify where the .ipa archive will be place. The input, which is the .app built in the xcodebuild stage. The signing identity, also the same as the xcodebuild stage. Finally the provisioning profile, which you may have copied into the jenkins account or you may have committed with your code.
At this stage you may get an error – I did. Some searching revealed the cause of the error is a misconfigured Xcode installation, a soft link that should be present is not. The message is “Object file format invalid or unsuitable” which may lead you to think that the failure has something to do with the object file format. Bad error message!

It is fixed with this variable set in the script:
export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
Then – happiness. You should see “Finished: SUCCESS” in the Jenkins console output, and if you have been executing the job along with the description then the ball will be blue.
Upload
After all that, OTA deployment is easy. There are three parts necessary before you can get a successful download to a device. The html, which must include a link with the itms-services:scheme, linking to the property list; the property list, which must contain the location of the IPA archive created in the Sign phase; and the IPA archive itself, the payload. If all these things are together on an accessible web server, a device whose UDID is included in the provisioning profile will be able to install the app. While you have created the IPA with this process you will probably create the html and plist manually and commit it to the source repository.
cURLis a great tool included with OS X. If you have ever worked with web services you may have used it to take a look at raw JSON or XML to figure out where interesting data is. What I didn’t know is that it can send data too. Sending files via ftp turned out to be simple. one of those rare trial-and-success experiences:

curl ${HOSTING_ADDRESS}${HOSTING_PATH} \
-u ${HOSTING_NAME}:${HOSTING_PWD} \
-Q "TYPE I" \
-T ${WORKSPACE}/${TARGET_NAME}.ipa

Most of this should be very easy to understand. You have a host address and a path on that host where you want the html, plist and IPA to be placed. You know the name and password of an account on that server which has the required privileges to upload to it. You have the thing to send, specified by the -T argument – here the IPA is being transferred. A final note about the ftp protocol: it is ancient and assumes everything is 7-bit text unless you specify otherwise. If you transfer binaries without specifying “TYPE I” then the binary will become corrupted. For the html and plist assets this -Q argument can be omitted.
And you’re done! if all went well you should now be able to connect to your sever and install the app.
Build Triggering
Hang on, this isn’t continuous integration yet, it only happens when you click “Schedule a build”. It should happen whenever code is pushed to the repository. This is easily done. The most easy way to do it is to poll the repository at intervals to see if anything changed. In the Build Triggers section of job configuration, Poll SCM allows you to set a schedule for this polling. Once every five minutes is specified by “*/5 * * * *”.
If you feel that polling in general is bad (and it is) and you are using GitHub, AND your build machine is accessible to GitHub (i.e. is on the public internet) then you can have GitHub notify your build machine when a job should be executed. Mine isn’t so I didn’t try this.6

Either way your final test is to push to your repository and wait to see if Jenkins starts a build. Make some change that you can see on your device, let it go through the whole process and download the result. Ah, satisfying.

Next…
This has been a very basic kind of how-to article. A lot more can be done to automate build, packaging and deployment and shell masters will find plenty of room to improve what I have shown here. It would be good practise to archive each deployed build. Multiple versions and configurations could be built at each build trigger. Automated testing could be run. Build lightscould be set to show the result of each build. You could convert the VM to a physical machine to make use of a mini or similar as a build server.

The Source
Shell commands used inside Jenkins:
HOSTING_NAME="[your account name on your deployment server]"
HOSTING_PWD="[your password on your deployment server]"
HOSTING_ADDRESS="ftp://ftp.[your server's address]/"
HOSTING_PATH="[path you will serve the build from]"
#
# interesting to know the path
#
echo ${WORKSPACE}
#
# your provisioning profile can be called, and stored, as you like
#
TARGET_NAME="[Your target name]"
SIGNING_IDENTITY="iPhone Distribution: [Developer Name]"
PROVISIONING_PROFILE_DIR="/Users/jenkins/Library/MobileDevice/Provisioning Profiles"
PROVISIONING_PROFILE="[Target]_Ad_Hoc.mobileprovision"
#
# always set for xcodebuild
#
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
#
# Lucky I found this on Stack Overflow. My build wasn't working until I did.
#
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate"
#
# Unlock the keychain containing code signing keys and certificates
#
security unlock-keychain -p jenkins JenkinsCI
#
# Do the actual build
#
xcodebuild \
-project [Project Name].xcodeproj \
-target ${TARGET_NAME} \
-configuration Release \
-sdk iphoneos \
CODE_SIGN_IDENTITY="${SIGNING_IDENTITY}"
#
# sign the .app so that it is ready for OTA
#
xcrun -sdk iphoneos PackageApplication \
-o "${WORKSPACE}/${TARGET_NAME}.ipa" \
-verbose "${WORKSPACE}/build/Release-iphoneos/${TARGET_NAME}.app" \
-sign "${SIGNING_IDENTITY}" \
--embed "${PROVISIONING_PROFILE_DIR}/${PROVISIONING_PROFILE}"
#
# place the new assets on the server so everyone can get them
#
# index.html
curl ${HOSTING_ADDRESS}${HOSTING_PATH} \
-u ${HOSTING_NAME}:${HOSTING_PWD} \
-T ${WORKSPACE}/Crawler/OTA/index.html
# plist
curl ${HOSTING_ADDRESS}${HOSTING_PATH} \
-u ${HOSTING_NAME}:${HOSTING_PWD} \
-T ${WORKSPACE}/Crawler/OTA/${TARGET_NAME}.plist
# IPA
curl ${HOSTING_ADDRESS}${HOSTING_PATH} \
-u ${HOSTING_NAME}:${HOSTING_PWD} \
-Q "TYPE I" \
-T ${WORKSPACE}/${TARGET_NAME}.ipa

And that’s it – I hope you get something out of this post.
1. Voltaire wrote in Candide, of Admiral Byng’s execution: “In this country, it is wise to kill an admiral from time to time to encourage the others.”
2. Apple Mac OS X 10.8.2 EULA – see section 2 (iii).
3. Apple WWDC 2012 Session 404, Building from the Command Line with Xcode – this is a very practical and useful session.
4. GitHub instructions on creating and installing SSH keys
5. cURL website
6. GitHub instructions in “WebHooks”
7. My “Angry Murloc” build light.

Digital Radio – DAB+ in the van

About 6 years ago I bought a Volkswagen T5 Multivan, the family situation (requirement for child seat restraints) made it a choice between that or a Mercedes Vito. The Vito is great but was a fair bit more money. Or there was the hilariously ugly SsangYong Stavic, but that’s no choice at all. Google for some amusing comments on this last abomination. (update – several other minivan choices became available about 6 months too late for us)

If you have to drive a van the VW is a good one. I don’t have much to complain about, although I could mention the horrible turbo lag and general hugeness, but that’s balanced by the internal hugeness, convenience of sliding doors, being able to get to any seat from any door or the amazingly tight turning circle. The thing I seriously hated since day 1 was the sound system.
VW Australia installed some Eurovox 6-CD changer as original equipment but it had a fault, the display didn’t illuminate at all. So it went back to the dealer and was replaced or fixed, but in the process they broke a trim piece. On the next service that was “fixed” with glue but of course it didn’t hold up long, we lived with it. Who’s got time to keep taking a vehicle back to the dealer? The dealer knows this.
One issue it had was crackles and static on all but a few Melbourne FM stations. Another issue was the weird angle you have to insert a CD at for it to be loaded right. A third is that nobody ever remembers to bring new CDs so once out of radio range you’re listening to an album you used to like.
There are at least three iOS devices on the road on any family holiday so playing music from one of those seemed like a good idea. With no front AUX jack and no information on how to interface this Eurovox thing to an iPod any other way a FM transmitter was the only choice. But they barely work in metropolitan areas and will be overpowered by every regional station you get within 100km of – do not waste your money. I have had three different kinds and all worked equally badly.
Finally I decided to replace it, and AUX-input was priority number one. Mechless seemed like a good idea. Didn’t care much about Bluetooth or phone integration. Zero gauge wiring, subwoofers, mono block amps and hojillion farad capacitors interest me about as much as neon underbody lights. I did notice there were a couple of models with DAB+ though.
Sony, JVC and Kenwood have models available in Australia. I couldn’t find much information about them, probably because DAB+ is limited to a small selection of regions right now. I have a JVC in my other car and it’s OK. I used to be a huge Sony fan but got very tired of everything being incompatible or proprietary. In the end I bought a Kenwood KDC-U5049DAB. Got it online for way less than JB Hi-Fi offer.
Installation – DAB+ works on a different frequency to AM or FM so a separate antenna is required. Job No. 1 is to install the DAB+ antenna, a stick-on conductive film that needs to mount close to a pillar so you can stick the signal amplifier unit onto the glass, contacting the antenna itself, and run the cable back to where the head unit is mounted. There are clear instructions included in the box.
glass-mounted DAB+ antenna
Sticking film onto glass is easy but getting it installed behind the neatly-fitting trim pieces looked like it was going to be the tough bit. I would rather change a head gasket than get upside down under a dashboard again so I wasn’t looking forward to this at all. But it wasn’t so bad…
The grab handle on the passenger side A-column has a clip-off cover exposing two T30 Torx bolts. When that is off the whole trim piece unclips with careful steady force. The glove box (mine doesn’t contain gloves either) is held in by eight T26 Torx bolts, five under black plastic covers. Lid and box remove as one unit, allowing the cable to be snaked through behind on the way through to the centre console. Getting it all back in place was easy too. The antenna and amplifier block are not very noticeable on the window, certainly not when you’re the driver. In a van this wide it is basically side-on and invisible from the right side.
Removing the original head unit was also easier than expected. The tray on top of the dash just lifts out from the window side once the clips let go, then the centre panel has two Torx screws to remove before it too lifts away. Detaching the wire from the driver’s seat heater control allowed it to all swing away for the duration. Then there were just two phillips head screws holding the head unit’s bracket in – one hole was stripped, thanks Volkswagen service department. With the physical restraints removed the whole unit came out revealing a harness adapting the Eurovox connector to ISO10487 – sweet!
Wiring harness behind dash
The only wart was a power connection made to the FM antenna signal amplifier. Or so I thought… I happily went off to Repco and bought the Kenwood to ISO adapter, pushed my luck by plugging it all together one hour before a family trip, but it was as easy as I had hoped. Until we set out and I discovered the thing had gone back to demo mode with no station memory – so no permanent power connection. Still, it worked.
Back home I pulled it out and did some comparing between the Kenwood and Eurovox harnesses – it was as simple as the permanent and switched 12V connections being swapped. Which is why you don’t do these things in a hurry, and why you should never completely trust an off-the-shelf adapter. I didn’t have to cut any wires, just used a tiny screwdriver to release the spade connectors from the plastic housing and swapped them over.
Finished installation with extra storage
All finished – with extra storage space. The original unit was double DIN so I needed to fill up the space with a $15 Aerpro single DIN pocket. It’s got some rubbery mat from Bunnings in it to stop things sliding around.
So what’s it like?
Aux: Works like you’d expect – a stereo 3.5mm lead from something with a headphone or line out plays music, sounds great. Everything is controlled by the connected device. If you forget to pause the music when you turn the car off it keeps playing, could cost you just your place in the music or all your battery.
USB: Interesting – basically you plug in the iOS device and get a hierarchical menu controlled by the main knob and back button. It’s not as easy as selecting music from the iOS device of course but it’s usable and might be the best way if you just want to pick one playlist. While connected via USB the device is charging too.
I didn’t try playing any music from a thumb drive, but they are going the way of optical media and chances are I never will.
Tuner: Nothing much to report here – without the power to the VW’s antenna signal booster a few stations came in, with power they all come in strong. I haven’t been out driving next to a tram yet but I am hopeful it will be better than the old one for resistance to interference.
DAB: This is a good feature but whether it is worth $100 over the price of a head unit without depends on how much radio matters to you. I like to hear Melbourne’s PBS FM and it’s on DAB+. There are more stations available generally and to me they are more interesting stations, they certainly run less ads. If you want to hear the football you can browse around FM, or you can pick SEN or ABC Grandstand by name and know you’ve got the right station.
BUT it isn’t CD quality. It is better than AM for sure but I don’t think it is any better than a strong FM signal. I’ve been reading people with serious stereo tuners complaining about the possibility of their superior analog FM being turned off and now I think they have a point. But in a car DAB+ is seriously good, for the extra choice you get, for the ease of finding what you want and for the clear, no-static sound. That’s worth $100 to me.
However Kenwood’s display during DAB setup is kind of confusing. The unit needs to download information about the digital stations available but until it has some you get no indication of what is going on, in fact if you use the display button to switch to signal strength report it will say NO SIGNAL. I thought this meant I had done something wrong with the antenna installation when I saw this.
The manual explains how to initiate download of station info – when you do it reports that it is updating and that it has finished, but still no stations. However after ten minutes or so I tried scan tuning again and plenty of stations came up. I guess signal strength only means “this station’s signal strength” because then it reported plenty of signal. There really needs to be more feedback during this process.
Remote: It comes with a remote, but I can reach the controls from where I sit and there’s no way I’m passing control back to one of the kids. I’d rather pay $2 less and not have a remote, OK Kenwood?
If you want to see an (exhaustive) demo of the Kenwood KDC-U5049DAB, see this video by Simonskie250 from Adelaide. He’s wrong about one thing though, it does not have to do the scan on each startup – that’s configurable.
While I feel like I have bought an early adopter model – there will be something twice as good next year for half the money – I’m very happy with this change. I hope this post helps someone who might be looking into DAB+ for the car, or who needs to know how to install in a T5 Multivan.

Why I quit Day Z

Death Screen for Day Z
Day Z has two big problems. One is hackers, the other is motivation. I wouldn’t have discovered the second without the first.
What this isn’t is a post about blaming Bohemia Interactive (makers of Arma II) or Dean “Rocket” Hall for anything. I admire both for what they have produced and I’m grateful for the fun I had while I was playing it. I just don’t have enough game time to waste on something that is so totally broken.
Here’s a post I wrote on arstechnica.com that starts right after a great game session but ends with me removing the game:
More fun and games with hackers but I’m benefiting more than losing. I started again near Elektro after something happened to kill my previous character, a shame but not incredibly surprising. With nothing to lose I ran in and found a hatchet in the first shed, then when into church. Two bodies… uh oh. Sure enough something unseen knocked me out but when I recovered no bleeding and no further attacks – down to 7000 blood though. I got a fair bit of stuff from one of the bodies including NVG, GPS, all the usual hacker stuff. No weapons to speak of. I needed food after the big hit I took so went and looted the store where I picked up a Lee Enfield. A residential got me a Makarov. Then a zombie hit me and broke my leg, damnit. I was only a couple of blocks from hospital so decided to try and crawl there but took a fall off a doorstep while sneaking through the multi-level residential – must have been at least 8 inches high – and died. So I spawned and decided to run back and reclaim those NVGs, never had them before. I made it but came across another survivor – let him have a whole Makarov clip to himself and probably hit him more than once because I snuck away and didn’t get followed. I hit the hospital quickly to stock up then it was time to get out of town. I crawled up the hill, cresting to find the big red square on the map was another fire station and got that sinking feeling, expecting to die – I saw another survivor ahead of me sneaking in there and didn’t want to lose all my just-recovered stuff. Then I got the good idea to use the NVGs by switching to a server where it’s night time. Crawled in, found three bodies in the parking bay, one ghillied – maybe someone dropped a grenade because nobody else was about, or so I thought. I looted a M4A1 and a 1911 and was feeling pretty happy with myself when someone else appeared – no NVGs so he didn’t see me, and was crawling towards me. I still had the pistol equipped and I did a bad thing, shooting him – not killing, but he turned and ran out of there. So did I a short interval later, deciding to get out and enjoy my gear while I had it. I nearly ran into another guy but ducked in time and he didn’t see me either, then I crawled on out of there and headed NW following the power lines. I expected to hit the road and then move north to Pusta. Somehow I missed Pusta (never saw the road) and found myself north of Prigorodky where I enjoyed the NVG experience, watching some new spawn swinging a flashlight around wildly, then watched it move a bit more quickly for a short while before stopping – then a death message. I moved further west looking over the fields hoping for a cow since my health was down around 6000, figured I would do some cooking. A chicken popped up in front of me so I aimed my 1911, was just zooming in to line it up in the sights when I heard the loudest gunshot I have ever heard and I was dead – AS50? Bugger. I nearly called it a night and said easy come, easy go, but the next spawn was just a little west of Elektro so I decided to do the impossible and run back to my corpse in the dark. The rocks of Pik Kozlovo were nearly impassable on a moonless night and on a server with 55 players I knew I would be dead if I used the flashlight. I got to the railway line sw of the rocks finally and made it to the first building in Prigorodky then headed north to pick up the power lines against the sky that I had been following previously, then west in the hope of hearing flies. To my amazement I did, I zeroed in on the sound and the flashlight confirmed that I had found my corpse unlooted. I geared up again, didn’t attract the sniper’s attention again (probably felt sorry for anyone dumb enough to turn on a flashlight in an open field) and headed out to the north toward Mogilevka, fully geared with 12000 blood! That’s a pretty steep hill so it took me some time, even zigzagging. It had been raining since a little before the previous death. As I crested the hill I started coughing with temperature flashing, no antibiotics of course. I decided to head back down into the deeper woods to see about lighting a fire to warm up, but while I had picked up the matches, no wood and no hatchet! In hindsight probably not a great idea since fires would attract a lot of attention – maybe I should light one then hang out and see who comes to investigate, mwahaha! Into Mogilevka then. Heading down to the road I nearly tripped over a quad bike parked on the side of the hill. It was loaded: FN FAL scoped, Bizon, L85, shotgun with flashlight etc. I left the bike because last time I rode one it somehow flew in the air and killed me. Did replace my M1A1 with a L85 and three mags. The thermal scope is awesome and for once I felt secure that I could look around and see anyone. The laser is nice in NVG view also. Probably I should have blown up the quad bike but I might have alerted the owner, I left it there – can imagine his confusion – “What, I didn’t make a shitty iron sight M4A1!?” Then into the big barn where my temperature stopped flashing quickly, I saw a rabbit and decided to test out my new rifle! I missed high of course, forgot to zero the sights. And lots of zombies heard me but in the dark they didn’t do much towards entering the barn. I ended the night in a small residential in town hoping the cough would go away.
Not sure how I’m feeling about this game. Now I have just about all the gear I ever wanted I’m not sure what to do – still haven’t done a cow barbecue so maybe that’s my next plan. The thing that keeps my attention is that you’re never ever safe. Unlike Warcraft where you can gear up and run through noob areas like a god, you can die in the blink of an eye. Even this cold could end up taking me out.
- update – I shot and ate a sheep and that kept me going long enough to declare myself Lord of Castle Zub, and to spare a guy I saw crawling through the bush through my thermal scope. Back in Cherno in the military tents there was a box of antibiotics! Cough gone, but down to 6000 blood. And stupidly I didn’t just take the STANAG mags I found for my L85, I tried to put the M4A3 CCO they were lying with in my backpack. ALL the mags disappeared. Now I have M4A3 CCO & L85 but no ammunition.
- update – logged back in, got one STANAG and a G17 with four mags. Then, instakilled by some hack – teleported into a field with everyone else. I think I am done with this game. Hacking giveth, and hacking taketh away.
There were some incredible moments in that life and I really felt the adrenalin that Sacriel42 describes in his great videos of Day Z squad gameplay. (But even there, notice how his squad finds a working helo, a L85, a SVD camo and so on – that’s not just great luck.) The death from falling off a doorstep or the broken legs that arise from stepping over a tent I can ignore. It started to go downhill due to an inventory system that is so broken things disappear when they don’t fit in a pack (really, four STANAG mags just vaporised). Then it was all taken away by some loser who downloaded a script.
This wouldn’t be so bad if these were university days again and I could spend 6 hours a day gaming but time is at a premium now. There’s no point in playing a game where progress can be wiped out by some chuckling idiot whose life is so meaningless that assuming a bunch of strangers have been inconvenienced brings satisfaction. I probably should have known better than to be playing right after school finished.
Second problem – once a character has all the gear they want there’s nothing to do. So people with sniper rifles hang out on spots overlooking popular spots and snipe other players. Nothing wrong with that, I’m fine with losing everything to a skilled player. When it gets hard to take is when everyone has a hacker-spawned AS50 or L85 and there are 10 snipers camped all around the starter towns. And everyone does have all that gear, I found it less than two hours into the life I posted about.
If the script kids couldn’t get anything they want instantly – and if their bodies and vehicles full of the rarest weapons and gear weren’t lying around for any new spawn to find – then this problem might not exist. With death as near as it is in this game nobody would have their gear very long. Everyone would have to adapt to what they find, maybe settling for an AKM as a good primary weapon. There would be a lot more people just sneaking around Cherno and Elektro getting a basic kit together before heading out to the wilderness to begin the process of surviving by hunting, cooking and finding water. Which I think is the original vision of this mod.
I’ve tried to think of what could comprise an endgame if that wasn’t the case, if people did survive, gear intact for long periods. World of Warcraft has endless raids to do, and heroic versions of those same raids to get even better gear. I’m not sure scenarios like assassinating a general or capturing a hill could fulfil the same role in Day Z but something is needed.
Could there be other regions that open to players who complete certain challenges? A ferry that can only be operated after enough fuel is gathered to make it run, opening the path to a new region? A currency (cans of beans, naturally!) that can be spent with NPCs to buy ammunition? Nethack’s shopkeepers come to mind – they would have to be tougher than players obviously, or protected behind armour somehow. The ability to attract followers or gain rights to a stronghold complete with border defences? Finding a cure for the Zombie sickness?
“The War Z” is a commercial effort that owes a lot to Day Z. It’s pretty much a copy for all I know about it at this stage. I bet it isn’t the only one in planning right now though. Like all the WWII games that appeared in the early 2000s, these things come in groups. Some big and well-funded studios have to be working on similar things as Day Z must have caused the “why didn’t we think of that?” reaction all over the industry. It’s the WoW killer everyone has been dreaming of. Competition should be interesting – even if all the copies do dumb it down to console levels of difficulty, and I fear they will. Sorry to say that Day Z seems to have missed the boat by being based on Arma II, a system designed to allow easy scripting and without much thought of policing those scripts.
Technical notes – I played the game on a 2012 15″ retina MacBook Pro running Windows 7 under Boot Camp, with the Arma II/Operation Arrowhead bought from Steam. Handled it easily, as you would hope from this year’s hardware running an old game. Windows 7 doesn’t handle a 2880×1800 screen too well though – lots of squinting going on until you adjust text size. I used Day Z Commander to download the mod, updates and join servers – too easy, if you play you need this. An external full-width Apple keyboard gives access to all the keys you need for Day Z, there are some important ones on the numeric keypad you just don’t have on a laptop. The machine handled the game easily. My old Beyerdynamic MMX 2 headset was excellent as always. I was going to buy a TrackIR 5 for this game but won’t need to now.

PVC Conduit Laptop Stand

On Monday 11th of June I was at the WWDC Keynote to see the Retina MacBook Pro announced and I felt pretty satisfied knowing my cunning plan had worked. Months ago, rather than ask for the laptop I wanted at work I settled for a maxed-out Mac mini, expecting the team to grow, and with that growth there would be a need for a machine to do continuous integration. That machine would be the Mac mini, with me in obvious need of the anticipated 2012 machine free of optical drive, with Ivy Bridge, etc. etc.
So I was all set to say thanks, I’ll have the new shiny and a 30” monitor too please – I’ve been using two Thunderbolt 27” displays and I find that side-by-side they are just too wide for comfort – but that 30” wouldn’t have been a retina display. Better to live with just the laptop for a little while, getting the monitor when retina displays become available or other choices present themselves. Current displays do look pretty ugly next to the retina MacBook Pro, no matter how good they look up until the time you see one. And living with one smaller screen would have the beneficial effect of encouraging me to get more efficient with my use of Mission Control and gestures.
In the meantime I would need a laptop stand. I looked around a bit, didn’t feel like spending $70 on a bent aluminium thing, and while searching came across the AIAIAI Laptop Pipe Stand. Couldn’t find any reasons not to just build one…
img_0838-2
The thing is as you see it, about an hour’s work cutting 20mm conduit and inserting it into fittings. Luckily the mitre saw still had its aluminium/plastic blade installed so no time wasted changing it. I used bulky inspection T-pieces because there weren’t any regular T-pieces on the shelf at Bunning’s – they’re always out of something you need.
I want a sloping stand so gravity can help the machine stay in place. PVC conduit fittings do come in 45° angles but Bunning’s don’t stock them. Chopping one of the large radius joins to get around a 30° angle was my first thought but the outside diameter of the fitting isn’t the same as 20mm conduit so there would be no joining to that piece once cut. So I needed to bend some PVC – first time but it turned out to be easy. The bends are made identically using a form made from two wooden blocks clamped to a flat board, forming an angle for a softened conduit to rest against. A heat gun got the PVC soft and then it was just a careful, rotating bend and a couple of minutes to let it cool and set in position. Unless the angle is the same on both pieces the front of the stand won’t be square.
One wrinkle is that the 90° elbow pieces are not actually 90° bends, more like 85°! I expect electricians just use the natural flex of the conduit to place everything square as they go. I used a heat gun to soften the elbows and a carpenter’s square to get them set at the right angle. If this wasn’t done the result would be a stand that doesn’t look right or sit flat on the table.
img_0840
Finally everything got a little clear PVC adhesive before being set in place and checked for square. I like the result and at a cost of well under $20 I can do it again if it needs to be a little bit different. It is sized for an 11” MacBook Air and it should support anything up to a 17” comfortably. It is too wide for an iPad – the keyboard shown is a useful size reference since the MBP isn’t here for modelling yet.
Googling before the build I found that a few people have done things like this over the years, no doubt AIAIAI got the inspiration from them and I’m just completing the circle. I did not choose to do any “cable management” because these machines just don’t have enough cables to worry about. I might cable tie the MagSafe cable to a pipe somewhere near where it connects to the machine but that’s all.

Angry Murloc Build Light

If you have ever played World of Warcraft you know what a Murloc sounds like. You’re running along on some quest and you hear RWLRWLRWLRWLRWL!! and then you know you’ve got a Murloc to fight. Then because of their overlapping patrol patterns you hear it a bunch more times, and pretty soon you’re on a ghost run. I picked up the J!NX talking plush Murloc when I bought a Battle.net authenticator, waste of money to pay shipping to Australia on just one item.
pasted-graphic
Why a build light? When you work in a team on a software project sooner or later someone will break the build when they commit code to the shared repository. It’s no big deal as long as you catch it quickly and fix it. If the break goes unnoticed you get Confusion and Delay as you back out change after change and everyone wonders who is to blame and hopes it wasn’t them.
The solution is continuous integration. One popular solution is Jenkins (formerly known as Hudson), an Open Source tool that among other things can trigger a build when a commit is detected. The result of the build has to be made known to the team right away. If the build machine is local you can play a sound but the sound could be missed.
Lots of things can be used to make a visual indicator including pre-made lights intended for industrial control, a big screen showing results from Bamboo or similar or maybe Brian the Build Bunny. All of these things have their advantages and disadvantages but they all have visual indication of a problem and a way of communicating with the build server.
(DO NOT put your giant build status plasma right in some unfortunate developer’s field of view. Do you really want someone distracted by a continually flickering, updating display? This seems like obvious advice but it happened to me.)
I really like the Nabaztag but they are hard to buy now, so last year I built a simple build light using an Atmel 8-bit microcontroller to drive three very bright LEDs (from Sparkfun) in RGB arrangement, hidden in a diffusing dome. I used Dean Camera’s LUFA library to make USB communications trivially easy. I wrote a small Mac OS X program to send state commands via USB and I had a neat build light that could be made to display any colour. It worked well because the build machine was a centrally located Mac mini and a directly connected USB light was right where it needed to be.
This year I’m in a new job on a project that more programmers will soon join. The machine that I can use for our git and build server is also a Mac mini, but it is not in the same room as the developers. USB is therefore not a good solution this time! I need ethernet, or maybe wireless.
After a bit of thought I decided to make it easy on myself and use Arduino. I bought the Sparkfun Inventor’s Kit for Arduino and the Ethernet shield. I downloaded the Arduino Software, asked our network administrator for an unused IP address, grabbed some sample code and within an hour I had a web server. Right away I was able to use curl to send requests to the board and display the GET string – too easy!
Ten minutes later I was controlling the RGB LED. How disappointing, what was going to be a fun project was nearly over!
To keep the fun going I decided to improve it a bit. The LED needs to do something while building so developers and others can see that something is happening.
Also so that anyone interested can see that their code was received, it did kick off a build as expected, and it might be worth looking at the light again soon to see how the build went. Also to make it obvious that lots of code is being checked in and the iOS team really is incredibly productive.
I tried a naive approach to RGB colour cycling first, incrementing an 8-bit value for R, then G when it ticked over and B when G ticked over, treating it like one big 3-digit base-256 value. It worked but not in a particularly pleasing way. What looks better is to use colours from the HSV colour space, sweeping the hue value right around the circle and converting the hue to RGB values for use with Arduino’s analogWrite(). With a small delay() on each angle change, done!
One outcome of a build is failure, and that’s the fun part. Steady red, I discovered last year, is not enough to grab attention. I wanted the light to pulse so that it isn’t incredibly annoying but doesn’t go unnoticed. That was fairly easy with a state variable to decide whether to increase or decrease intensity on every pass through the loop and to toggle direction when the maximum or minimum values are reached.
At this point I noticed that while varying the H part of HSV changed colour very effectively, S and V appeared to do nothing much. The values passed to the RGB setting function were fine, but always full intensity. I took a shortcut and just added a brightness multiplier applied after the colour is decided – it’s not a very big sin because colour accuracy is not critical and it does exactly what I want. With this brightness multiplier varying over time the light pulses nicely.
pasted-graphic-1
Physically the light is a very cheap light fitting from Bunning’s, an Australian hardware chain. Having the base and dome made it really easy. For the old build light I built a wooden base and used Liquid Nails to attach the glass dome from a discarded light fitting, way too much work. This base gives plenty more space to work in, a platform to attach hardware both sides using spacers and bolts, and plenty of space above the LEDs for a thin layer of tissue to help diffuse the light.
pasted-graphic-2
Experienced Arduino users will notice that’s not a Uno + Ethernet Shield used in construction. I used one of Sparkfun’s Ethernet Pro models, essentially a Uno + Ethernet Shield in one. This held up construction a little because I was not aware of the requirement for a FTDI USB-serial cable and had to wait for it to arrive.
The finishing touch is sound. The plush Murloc is a good match for the size of the light fitting I picked out to house the build light. And if he sits over the glass dome it’s like he’s guarding an egg… I didn’t want to have any cable between the light and the Murloc though as it would make the whole assembly fragile, so I took the Murloc’s voice box out and built it into the base.
pasted-graphic-3
The voice box should be familiar to anyone who has disassembled any talking toys, there’s a speaker, a black-blob integrated circuit on a tiny PCB, batteries and a simple button. I first took the batteries and case away and powered the Murloc sound board from the Arduino board. The button is a rubber dome bridging PCB contacts – I traced the PCB track back to the blob, noticed the other half of the contact was ground and decided to try simply pulling the pin down to logic zero. Success!
Now when the build breaks, “Rwlrwlrwlrwl!” And a minute later, “Rwlrwlrwlrwl!!” – until the build is fixed.
The other outcome is that everything is fine. For that I picked a nice muted green, no pulsing, just a steady colour that won’t bother anyone. And it matches the Murloc.
If someone issues a command that isn’t recognised the light goes purple.
How’s it working? All tests show it’s fully functional. In use we’ll see whether the Murloc is too annoying, I have a feeling I should make the Murloc noise only every ten minutes or so.

In the background you can see my command window issuing curl commands to the light’s IP address. It responds to GET requests for Building, BuildGood and BuildBroken. If I need more states in future they will be easy to add, as Arduino just isn’t difficult enough to seem like an embedded system at all. Try it!