Wednesday, September 03, 2014

On .Net Rocks Talking about the Swift Language

Last week, I recorded an episode of .Net Rocks about what it's like learning Apple's new Swift language. I think it went well enough, although I wish I could go 10 seconds without saying "you know", and I did go into the weeds giving my impressions of what motivates Apple.

An hour is just not long enough for the topic, and we only just did a very impressionistic coverage of the language.

Regardless, I thought it went fairly well, and worth the time to listen to.

Saturday, August 30, 2014

My Thunderbolt Display Started Flickering and Going Blank...

I had a strange experience over the week involving my local, Nashua, NH, Apple Store. It all started when my Apple Thunderbolt Display started flashing black rectangles and then going blank. As it did this with both my MacBook Pro and the family MacBook Air, I figured it was something wrong with the display. So, I booked a Genius Bar appointment.

I boxed up the display and took it to the mall. Sitting it on the Genius Bar, we weren't able to recreate the problem immediately with the Store's Air, so they took it into the back for observation. The next day calling to tell me that the panel had failed which would be an $833 repair, as this would be on a display that I could probably find for $900 if I searched online, and I would end up with a used Thunderbolt Display, I told them to scrap it and set about rearranging my home monitor situation. I have a Viewsonic monitor with an even nicer panel than the Thunderbolt that I could repurpose as my primary monitor, although I was not happy about losing the Thunderbolt's docking capability. 

And here comes the strange part. A couple days later, the Apple Store calls back to tell me that since they had the parts anyway, they had decided to try switching out the motherboard instead of the panel, and the resulting display was no longer showing the failure even after 6 hours of testing. So I could have my monitor back for $185. I jumped at that. I had been missing it. 

At the store, the Genius who took me my display told me the odd story that the original diagnosis of a bad panel was just the worst case scenario, and they hadn't been sure at the time. Which is definitely not what they had told me when I'd told them to scrap it. I had thought the symptoms I was seeing were pretty strange for a bad panel, and I'd argued at the time with the woman on the phone that it might be a bad power supply, and at the time she was adamant that it was the panel. So I had accepted the Store's diagnosis. 

So, I have my monitor back. Time will tell if the repair worked. I'm glad the Apple Store repair people didn't scrap it, and had taken the time to try something even after I had given up hope, but I have to wonder why they gave me such a bum diagnosis in the first place.

 [Update: well I've had it on my desk for a few hours and it's starting to go directly to a blank screen every few minutes, which is different than what I had been experiencing before where it was mainly large black rectangles followed by sometimes going blank . Plugging and unplugging brings it back. So maybe it wasn't the motherboard, or maybe this motherboard is going bad too. Hooking up a spare Thunderbolt cable to the Thunderbolt port on the display allows me to drive the monitor 'backwards', and I have not seen any blanking in a couple hours, so my current diagnosis is that the integrated cable is bad.]

[Update: After several days of driving the monitor 'backwards', I have seen zero problems. So I'll be heading back to the Apple Store to ask them to replace the Thunderbolt cable and give them a suggestion about testing before telling someone their $900 monitor is scrap worthy.]

Thursday, July 17, 2014

Some Old TV Show is Always the Most Recent on My Apple TV

In January, I purchased a copy of the 'Culture Shock' episode of 90 Day FiancĂ©.  And ever since it's been shown as the most recent episode whenever I select the TV Shows section on my Apple TV. Finally got sick of seeing it enough that I investigated, and it turns out that somebody mistyped 01/19/14 as 01/19/24 which means that unless somebody edits it, it'll be the most recent for the next 9½ years.

I contacted iTunes support and they got back to me wanting my order number for some reason when they could have just searched for the problem. Oh well, I hope they fix it.

[Update: after 5 e-mail exchanges, being asked to re-download the show (which made no sense) and 2 consultations with a manager, iTunes tech support let the producers of the show know about the error, and now my Apple TV is showing the appropriate image for the most recent TV show.]

Friday, June 06, 2014

Something in /var/folders is Preventing My Mac from Booting

A couple months ago, my MacBook Pro stopped booting reliably. It would just sit at the Apple screen and spin, sometimes all night. I could use the repair partition to re-install OS Mavericks and get back to work after a couple hours of downloading, installing, but it would get back to this bad behavior the next time I needed to reboot, which thankfully is not often. And safe mode booting didn't help same symptoms, so the problem wasn't in a cache known to safe mode.

I read on the support forums talk about the /var/folders directory which is used by the OS for some sort of caching. So this morning, when my son left my MacBook without its charger and drained it to the point of needing to reboot, I got another hang, and instead of two hours of reinstalling, I booted into the recovery partition, launched the Terminal app, cd into my normal boot partition, found the boot partition's /var/folders and deleted it.

And I then rebooted normally. So something in that folder is hanging up the boot process, I just don't know what.

Tuesday, May 20, 2014

On Making Sure You Test Against the iOS Versions You Support

I am not used to getting 1 star reviews against TV Towers USA. My small niche of RV enthusiasts are usually a happy lot. However, I made the big mistake of pushing an update (I guess the first one was 1.6) which was marked as supporting iOS 5.1 (i.e. the last for the original iPads) without testing against either a device—which I don't own—or the iOS 5 simulator—which Apple no longer provides. And it crashed on first launch, and if it had survived that crash it would have crashed again, and if it survived to finish launching it would have crashed on showing a detail page.

My father, of all people, had an iPod Touch still running iOS 5 that one of my sisters had given him, and he was nice enough to overnight it to me. It's not his favorite device; an iPhone without the phone he calls it.

Crash number one was probably the issue of iOS 5 not handling binaries which include a 64-bit compile. I had fixed that one in TV Towers USA 1.6.2 when I was blindly trying to fix the app.

Crash number two was at the linking stage. My own SVGgh library included a routine to build up an attributed string version of an SVG path and it had included a reference to the NSForegroundColorAttributeName constant string. Which wasn't available under iOS 5 and caused the app to exception out during launch with a symbol not found error. It isn't even used in this app, but the linker doesn't know that.

Crash number three was that some of my xibs were marked to be of the 6.0+ format instead of 5.0+ format.

And crash number four was that the table data source in the tower detail pane was using the category on NSIndexPath that returns an item instead of the archaic row property. This is a bit of syntax sugar made for use with UICollectionViews, so it, of course is not available under iOS 5.

Everyone of these issues was quickly fixable. And I failed my users by not keeping track of my supported OS versions and at a minimum running through the app before overwriting their existing, working copy.

And, I still don't have an iPad running 5.1.1, so I will just have to pray that there is nothing in the small amount of iPad only code with some similar present for me.

Sunday, May 11, 2014

On Dropping Support for the Original iPad

As an iOS developer, I'm often forced by my development tools to make support decisions. Xcode running on OS X 10.9 no longer allows me to run the iOS 5.1 simulator. Nor will it build an iOS app that simultaneously generates 64-bit instructions and supports iOS 5.1. Therefore, the version of TV Towers USA I just submitted for review (1.6.2) will be the last thing I'm likely to ever write which will run on the original iPad which maxed out at iOS 5.1.1.

I think the decision to limit the original model to 256 MB of RAM turned out to be a poor one on Apple's part as it shortened its usable lifespan hugely. If it had shipped with 512 MB, it would likely have gotten at least to iOS 6.  As it is, the last time I touched an original iPad, I was struck by how unresponsive it was compared even to my iPad Mini. Giving customers such a poor experience is not something Apple usually does, and I hope they've learned their lesson.

Saturday, May 10, 2014

A Developer of Code Taking the SalesForce Dev Certification

For reasons I won't get into, I took the Salesforce Dev Certification exam this week. Salesforce, for those who don't deal in enterprise software, is a cloud based solution for providing ways for companies and other organizations to keep track of things like sales leads, or the effectiveness of marketing campaigns. It's practical, focused and unsentimental. Salesforce developers normally create custom apps by "clicks not code" using the web interface to build up data models and work flows. Salesforce provides a series of certification exams, the Dev certification having a reputation as being the easiest to take.

Therefore, I spent much of the last few weeks reading, watching videos and walking through tutorials and workbooks. And for a developer who creates custom apps through code, and then more code, it was darn hard. Harder for an experienced coder because Salesforce co-opts common programming terms for new usages all the time. Think you know what an 'object' or a 'field' or a 'record type' is? Well think again. Think a 'checkbox' is a kind of a widget, well how quaint.

And it is all so arbitrary, 2 Master-Detail fields per object max, 3 External IDs per object, workflows can create Tasks but not Events, or is it Events but not Tasks...

I've been trying to polish up an explanation for programming constructs that are nearly universal, unchanging and therefore transferable from system to system: those made by God like the for loop or the delegate pattern, and those constructs that are ad hoc, arbitrary, and require memorizing every corner because there is no pattern to recognize, those made by Men like, oh I don't know, the Win32 API. I was taught to be a scientist, I got through college and graduate school not through memorizing every little thing, but in learning the patterns and principles of the universe and applying them. You can do a lot in an hour's Physics test with Newton's laws of motion and courage.

Getting ready for a test by rote memorization is not my thing.

Which is not to say that Salesforce is bad. In fact, for what it does it's kind of great. While I was studying away, I could observe my wife manually preparing to cold call a large number of organizations to sell them on a new (let's say) product. A big mess of phone numbers and eMail address she was gathering and putting into Excel. I realized how better organized and efficient she'd be if I just took what I was learning and made a few customizations to a Salesforce 'org'. And that would be for just a one-woman sales team. The network efficiencies for a large team would be huge. Same thing with my Dad's private plane brokering service, if I could get him better organized, he'd sell more planes.

So I went to the local proctored test center, took the test and by some miracle of preparation and methodical mastery of the multiple-choice form, I passed.