Jay Thrash (@jaythrash) is interviewed on the NSBrief podcast by Saul Mora (@casademora) during 360iDev

Podcasts I’m currently listening to

I previously posted a couple of times what podcasts I was listening to.  Back then, I was driving up and down the East coast every weekend between Maryland and Atlanta, so I had a lot of time to listen.  Now, my commute time is much less, thankfully.  That also means I spend less time listening to podcasts and audiobooks, and that time has a much more result-oriented focus. Read More

Google / Alphabet easter egg

My coworker just found a neat easter egg on the new Google Company, Alphabet

go to abc.xyz and search for the word “drone”

Sergey and I are seriously in the business of starting new things. Alphabet will also include our X lab, which incubates new efforts like Wing, our drone delivery effort.

at the end of that sentence, click on the period
and see where it takes you…down the rabbit hole 😉

students of knowledge working on Apple hardware

Google Analytics & Swift

I’m working on an iOS app written entirely in Swift that uses the Google Analytics library.  At Google I/O 2015 they announced full support for Swift and even CocoaPods (which doesn’t actually work if any of your other libraries use_frameworks! – but they are working on that and it’s not a trivial fix).  The initial intro documentation from Google has options to show the code sample in either Objective-C or Swift, but all the rest of the documentation still seems to be Objective-C, only.  I was listening to the More Than Just Code podcast tonight and Aaron Vegh was remarking on how going back to Swift code just wasn’t clicking, and he found it easier to just write stuff in Objective-C.  So I thought, hey, until Google updates their docs, why not list some Swift code samples for how to implement various things in Swift.

Here I just want to look at a simple task: Event tracking in Google Analytics.  Yes, this might seem trivial, but when you’re a developer switching back and forth between Objective-C and Swift, sometimes it’s nice if someone points out the syntax, as per Aaron’s comments.

Here’s the Objective-C code (adapted from the Google Docs, link above):

[tracker send:[[GAIDictionaryBuilder createEventWithCategory:@"ui action"
                                                      action:@"button press"
                                                       label:@"do something"
                                                       value:@1988] build]];

And here’s the Swift equivalent:

tracker.send(GAIDictionaryBuilder.createEventWithCategory("ui action", action: "button press", label: "do something", value: 1988).build() as [NSObject : AnyObject])

btw if anyone comes up with, or knows of, a nice plugin for WordPress to color code Swift appropriately, please let me know! 😛



Focus beyond the target

refactor your heart (or, “how not to collapse on the road with cramping triceps while trying to learn the Swift Programming Language”)

I came across this post by Janie Clayton-Hasz where she paints a frightening picture of her spending every waking hour, plus hours where she is supposed to be sleeping, engaged in an epic struggle to ingest the vast sea of knowledge that is the iOS development platform.  I didn’t get it; I asked her on twitter why she didn’t just slow down.  She replied, “I don’t feel like I can…am trying to catch up to everyone!”  If you’re a software developer, I’d recommend you read her post.  In fact, that led me to Ed Finkler’s post, Marco Arment’s post, and Matt Gemmel’s post.  Ever smell that burning scent when you’re driving and suddenly realize the handbrake has been engaged all along?

With the exception of Matt, I had a hard time conceptualizing their frustrations.  At least in Matt’s case, he realized at some point that the dev side of things wasn’t what drove him, so he switched to something that did.  I respect Matt’s perspective, though I don’t share his cup of tea.  I tried stepping away from dev, too – not out of frustration, but because I wanted to try taking a step back and just focus on managing my company.  I failed miserably – but in the process I realized that tech is what I love, dev is what I love – I have an innate need to stay in the midst of the code melee.

Not too long ago I went on an eighty-mile ride with my cycling buddies.  These aren’t a bunch of young guys with hopes of riding pro – these are all professionals, most of them middle-aged, majority of them physicians, mind you.  One guy is the VP of a sizable Virginia tech company.  My typical daily ride is about twenty miles.  The first twenty miles of this eighty mile ride, I was sprinting every climb.  I felt awesome.  I was leaving stronger, younger riders in the dust, in fact we almost dropped one of them.  Around mile sixty, I collapsed on the side of the road screaming in pain.  No, it wasn’t my legs – my triceps were completely cramped.  Sound kind of stupid?  Yeah, it was.  Lucky for me one of the guys was patient and kind enough to stick with me when everyone else dropped me (no, not one of the doctors – it was the VP!), and even gave me his bottle when my drink ran out.  Point being, I was an idiot for not focusing on the overall goal – getting to the end of that 80 miles, I failed to pace myself and I started burning out after 20 miles, and by 60 miles I was done, and the last twenty miles, I crawled to the end by sheer force of stubborn will.

Are you a developer feeling burned out trying to keep up with the ever changing landscape of technology?  For me, the constant change is what drives me, motivates me, and keeps me interested.  Otherwise, I would burn out, from sheer boredom.  Since transitioning from Flex development / Flash platform to iOS, things have ramped up considerably, too.  iOS isn’t just a new platform, for me, I’ve found that the depth and breadth of the platform go way beyond what I was used to.  Yeah, my bike rides and my drives are filled with listening to any one of eight different iOS-related podcasts.  I am concurrently reading four different iOS-related books.  And I dragged myself from my work-at-home life to commute eleven hours each way to work – a sacrifice I made for an iOS dev opportunity.  Up until Ramadan, when I ate breakfast in the morning it was in the company of WWDC 2014 videos.  But – none of this is work for me.  I enjoy this stuff.  I eat it up.  If I found it boring, or unexciting, as some of the aforementioned bloggers seem to feel, I would find something else to do.  That’s happened to me before – and I know myself – when stuff gets boring, I need to change things up or I fail miserably.

I still find time to ride my bike.  When I’m not riding, it’s not work that’s keeping me from it, its another non-work related activity (like taking my kids biking!).  I still find time to spend with my family.  And so on.  Yeah, I’m eating and sleeping iOS – but I’m still sleeping at night.  I still practice iaido, try to squeeze in another martial art or two and I still listen to at least thee other podcasts that have nothing to do with iOS.  No, I don’t find time to do everything – but I realize my time is precious and so I prioritize.

I guess what I’m trying to say is, to me, this stuff is all a matter of perspective. I don’t see any reason to get bent out of shape about work, or any reason or desire to “keep up” with what other folks are doing.  Everyone has their own strengths and weaknesses – there’s no need to compete with folks, rather be smart about knowing your own weaknesses and finding the right allies to help you where and when you need help.  I choose my own pace, and I feel like everyone else in the world can too, if they just make a conscious decision to do it, instead of letting the spectre of work, earning a living, a boss, etc. choose the pace for you.  Bottom line is, fix your priorities, and don’t make earning money one of those priorities, unless you actually want to lead a miserable existence.

OK, so if you’ve bother to read this far, you might be thinking, this is all nice talk, but it’s just talk.  In the real world people need to earn money to survive, and that means spending all your time playing catch up, because I got in the game late, because I need to be THE expert to get hired, and so on…there is no shortage of excuses.

When I was in grad school, I also worked part-time tutoring adult students at a community college in the inner city of Chicago.  These are mostly folks who never had time to go to college during the time that us other ‘privileged’ folks went to school – they spent their childhoods working three jobs to support their ten siblings and ailing single mom.  Now, as adults, they came back to school to get some sort of degree, to help make them more competitive in the work force.  These are driven folks, not burnt out folks.  One lady had her own shoe company – a real entrepreneur.  But the task of learning things like basic algebra, as an adult, is not an easy one.  One can feel like they are too old, the brain is too mature, and overall the prospect of learning can be daunting.

But, it’s all in your head.  This is one critical lesson I learned in my early days of martial arts training.  The first time a student has to break a board in Taekwon Do class, the board can seem like an insurmountable barrier.  It’s solid, it’s a tree that has spent a hundred years forming from the soil.  It’s a barrier against which your flesh and bones will be crushed.

Our TKD teacher taught us to realize, however, that in reality, the board is not actually there.  Once you visualize that board not as a board, but as a layer of water, or a layer of air, your focus completely changes – from the board itself, to the point beyond the board, where you are supposed to be focused.  For the student who focuses on the board, his hand stops at the board.  But for the student who focuses beyond the board, her hand passes through with zero effort, to the actual point of her focus.  And I swear to you from experience – if you focus properly, you don’t even feel the board – in fact sometimes you have to be careful of hitting the guys behind the board.

I taught this concept to my community college students.  Don’t focus on the problem – focus beyond it.  And it worked.  We shattered mental barriers.

About a decade and a half ago, when my wife was late in her second pregnancy, I was contracting for a consulting company contracting for a failing tech startup in Baltimore.  The contracting company had a ton of us “java developers” sitting in seats writing VB code, with the supposed intention that we were going to migrate their systems from VB to Java.  Sitting behind me was another developer who’s wife was also expecting.  He sat at his desk loyally tapping away at that keyboard until the moment his wife went into labor, he rushed home to take her to the hospital, and a half hour after the delivery, he was back at his desk.  In contrast, I let my manager know that I was planning on taking a break – about three weeks before my wife’s due date and a couple weeks after.  I had an hour commute to the project site, I don’t think there was any concept of telecommuting back in those days, and I wanted to make sure I was around to help my wife take it easy, get her to the hospital on time, and be there for my family in that critical time.  My manager said that the client was keeping a keen eye on the seats they were occupying, and that if I took time off, my seat might not be there anymore when I wanted to come back.  I said that was fine by me – I didn’t even have to think twice about it.  The guy who sat behind me and I, we had quite different priorities.

Life is an illusion.  Life is short.  If you are too busy with your nose on the grindstone – a grindstone that isn’t even real, mind you, you’re not only not going to smell the roses, they’re going to get crushed in that fake grindstone.

Don’t get me wrong, nobody’s perfect and we all make mistakes.  In fact, lots of mistakes.  That’s kind of the point – it’s how we grow – by learning from our mistakes.  And to Janie I’d like to say – nobody’s looking in the rear view mirror for you – in fact it’s probably the opposite.  I came to IT after a decade working in biotech labs trying to make molecular assays for HIV, and at least half the folks I know in the biz aren’t those young kids who grew up with keyboards in their cribs, either.  You’re speaking at iOS conferences – that’s an accomplishment!  I get that you love the platform – so do I – but get some sleep – you might be surprised how much more effective you are the next day…

Apple UX: Continuity

a different approach

so microsoft’s strategy has been, ‘one OS for ALL devices’

Apple’s strategy is, ‘one, seamless, continuous experience across ALL devices’.

It might sound like a subtle difference at first glance, but it’s a universe of a difference.  Microsoft demands the user make the same OS work no matter what device you’re on, so we find folks griping about a touch interface on a non-touchscreen device etc.

The Apple user might start writing an email on his/her iPhone, then sit down at a computer and finish it there – the half composed email is magically there.  The UX fits the device, and there is continuity of the task itself.

ProForm Le Tour de France trainer

Hacking the ProForm Tour de France (part 1)

I have the version 2 of ProForm’s Le Tour De France bike trainer.  Unlike a lot of other folks who have been posting about this bike since v1 I haven’t had any mechanical problems with the bike, to date, but then again we’ve only put around 200 miles on this trainer in the two years we’ve had it.  I primarily like to ride outdoors on a real bike, and to date I really hate riding on any type of trainer. Still, will heavy snow fall outside I thought it was about time to start using the trainer more regularly.  Part of why I chose the TDF was it’s advertised integration with google maps, being able to plan actual routes anywhere in the world online and then downloading the route to the bike, and then seeing the actual road and scenery as you ride using google street maps.

As it turns out, the ProForm TDF uses iFit.com for all its google maps integration and route access.  iFit.com basically is a joke – the only way they stay in business, I think, is they have somehow managed to broker deals with various hardware vendors, like ProForm.  Otherwise, basically they charge a steep premium membership fee and offer far, far less than what you can get for free from many other cycling & running sites, such as Strava, Garmin Connect, MapMyRide, and others.

Furthermore, users of iFit.com can neither import ride data from a Garmin or other GPS device or a file (TCX, GPX, etc), nor can they export anything from the site, either.  That’s an essential, bare-minimum feature that every other fitness site has.  The only way, therefore, to create a route to use on your equipment, then, is to go to iFit.com and slowly, painstakingly draw the actual route on a map.  And I do mean slowly – their route mapping software seems quite inefficient as it suffers from significant lag.

So I got to thinking, the TDF itself is a great piece of equipment, it even has a built in power meter so I can use it for my max threshold test…it would probably be well worth my effort and time to try to hack this thing so I can get at the ride data and export it to Strava, at the very least.

To that end, so far the only reference I’ve found online where anyone else has hacked it was this one by Bruce Potter:


If anyone has any additional info on hacking TDF, I’d love to hear about it.  Meanwhile I thought I’d start tracking my own attempts on this blog.

So, first off, I have been having an issue trying to get the firmware to update.  When I first got the trainer, I was able to update the firmware, but for about the last year or so I haven’t been able to get it to update.  I’ve filed a tech support request about this with ProForm, we’ll see if they respond or not.  As a side note, I found it interesting (and dismaying) that there is no link from the ProForm site to their support site.  Luckily I found the manual to my TDF, which lists their support site, http://www.proformservice.com.  Then again, that site is also pretty useless, unless you need to download the manual or order parts.

Even though the TDF was saying it was connected to my WiFi network, I thought maybe the issue was something in the WiFi configuration.  I was able to connect to iFit.com and login from the TDF, but I also couldn’t download my ride – it would get stuck on “Downloading: 0%”.  Setting up the WiFi on the TDF is a ridiculous pain, as the screen is not a touch screen and the interface is quite tedious to use.  However, I did discover this gem – the TDF has a WPS setup option.  Now, I have a Mac network, and a Verizon FIOS router.  I only use the Verizon router for my DNS, but the WiFi is all through an Apple Airport Extreme.  Apparently, the Airport Extreme supports WPS, which before tonight I had no idea about. I’ve created a separate post here explaining how to use WPS with the Airport Extreme.  Anyway, long story short, after doing the WPS setup, I was now able to successfully download a planned ride from iFit.com onto the TDF.  However, still no luck with the Firmware update – it just sits there and never downloads any update.  Nor does it tell me what the latest firmware version is – I have no idea if my firmware version (2.0.30) is the latest version or not, nor could I find an online resource anywhere that states what the latest version is.

Anyway in my next post on this topic I plan to attempt to get to the ride data on the machine from my mac…



Apple Airport Extreme

using WPS with Apple AirPort Extreme

I had no idea until tonight that Apple’s Airport Extreme has built-in support for WPS.  WPS is a service that lets you automatically setup a device such as a printer, or, in my case, a ProForm Le Tour de France exercise bike, automatically with your WiFi network.  On the device you are trying to setup, you may need to select a WPS setup option.  On your Mac, go to /applications/utilities and find the AirPort utility application.

WPS Setup

click on the image of your AirPort extreme base station, then go to the menu up at the top of the screen and select BaseStation -> Add WPS Printer

After running it, click on the image of your AirPort extreme base station, then go to the menu up at the top of the screen and select BaseStation -> Add WPS Printer.  Yes, it says “printer” but it should work for any WPS device – it worked fine for my TDF.

WPS setup

WPS setup