<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
   <title>Code and cars</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/" />
   <link rel="self" type="application/atom+xml" href="http://unlogica.com/blog/atom.xml" />
   <id>tag:unlogica.com,2009:/blog//1</id>
   <updated>2009-01-31T03:17:47Z</updated>
   <subtitle>Documenting the two closely related fields of programming and towing.</subtitle>
   <generator uri="http://www.sixapart.com/movabletype/">Movable Type 3.35</generator>

<entry>
   <title>Just what you always wanted</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2009/01/just_what_you_always_wanted.html" />
   <id>tag:unlogica.com,2009:/blog//1.49</id>
   
   <published>2009-01-31T03:17:40Z</published>
   <updated>2009-01-31T03:17:47Z</updated>
   
   <summary>Printable templates for designing iPhone interfaces, in PDF form. The screens have 20-pixel grids, as well as guide lines for the status bar, nav bar, toolbar, tab bar, wet bar, and picker or keyboard. 1 phone/page 2 phones/page 6 phones/page...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      <![CDATA[Printable templates for designing iPhone interfaces, in PDF form. The screens have 20-pixel grids, as well as guide lines for the status bar, nav bar, toolbar, tab bar, wet bar, and picker or keyboard.

<a href="http://unlogica.com/bhamon/1phone.pdf">1 phone/page</a>
<a href="http://unlogica.com/bhamon/2phones.pdf">2 phones/page</a>
<a href="http://unlogica.com/bhamon/6phones.pdf">6 phones/page</a>

And it's not even your birthday.]]>
      
   </content>
</entry>
<entry>
   <title>Disconnects</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2009/01/disconnects.html" />
   <id>tag:unlogica.com,2009:/blog//1.48</id>
   
   <published>2009-01-14T12:24:59Z</published>
   <updated>2009-01-14T12:25:02Z</updated>
   
   <summary>One minor annoyance about iPhone development, especially with someone already versed in Mac development, is that the classes are mostly the same, but every once in a while, there&apos;s a land-mine, pothole, or other surprise when what works for the...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      <![CDATA[One minor annoyance about iPhone development, especially with someone already versed in Mac development, is that the classes are mostly the same, but every once in a while, there's a land-mine, pothole, or other surprise when what works for the Mac doesn't work the same for the iPhone.

Bindings have been a part of the MacOS since 10.3, and are a very useful and valuable feature. And they're missing on the iPhone. I've tried a few techniques to make up for the lack, but none of them are as elegant as I'd like. And then, in the shower, I came across a brilliant idea, involving a way to keep track. It'd involve making an NSObject subclass, and using +poseAsClass:, but it'd work!

It's now 4:30 am, and having the class not exactly work has led me to discover that not only has 10.5 depreciated +poseAsClass:, and has it missing from the 64-bit version, it's gone outright from the iPhone. And now I'm updating for no other reasons than to vent. Core Data and bindings have made me soft, but I <em>like</em> soft.]]>
      
   </content>
</entry>
<entry>
   <title>Marketing Immunization</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2008/12/marketing_immunization.html" />
   <id>tag:unlogica.com,2008:/blog//1.47</id>
   
   <published>2008-12-23T17:29:00Z</published>
   <updated>2008-12-23T17:29:02Z</updated>
   
   <summary>There are a few words or phrases that rub me the wrong way. One is to &apos;go viral&apos;. A virus is something that latches onto a host and uses the host. The results are for the benefit of the virus...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      <![CDATA[There are a few words or phrases that rub me the wrong way. One is to 'go viral'. A virus is something that latches onto a host and uses the host. The results are for the benefit of the virus and not the host. In short, it implies to me that the general public, the host, will actively do something for a company, the virus, with little or no benefit to the hosting public. And it means that the average person will somehow be compelled to spend time, money, and effort to advertise or otherwise add more value to an item then he gets back out.

Who works this way? What mental model makes this possible? If our fictional user is selfish, they would only do what is necessary for themselves, and not bother with working or a company without pay. If our fictional user is caring and charitable, they would focus on charities and causes they care about, and working or a company without pay is not one of them. And in reality, it's not a case of being selfish, it's a case of being busy. I have a limited amount of time on my hands, and if something isn't for the good of myself, my friends and family, or the general good, well, someone else has to do it.

However, even if I had a time machine, I wouldn't be helping random companies owned by strangers. No, the first thing I'd do is to show off. I'd take a modern laptop, or iPhone, or even a gameboy, travel back to the 50s, or even seek out Babbage in 19th century London and go, "Look what I've got! In the future, we get cool stuff like this!" I would travel to the 70s and 80s, find a company with a supercomputer, and show off a handheld consumer device that crunches more numbers than their multimillion-dollar behemoths. <b>And!</b> And I'd inform them that future computing power is so cheap, we toss the CPU cycles away rendering Mario in realtime.

This is why I am fortunate to not have a time machine. I'd end up with a broken nose.]]>
      But this is why things like Twitter and blogs and IM clients and Facebook thrive. They are ways to show off. To let the world know that you&apos;re washing your car, or to spout their wisdom and make it known, or tell others things that they care about, what music they like and show off how many friends they have. They do this not to connect with others nor contribute to the company&apos;s market value. They do it to stroke their own egos. There is nothing wrong with ego-stroking; it&apos;s natural and it&apos;s human.

If your hypothetical user utters the words, &apos;Go to&apos; or &apos;you just have to&apos;, it won&apos;t be done by others. If it has to come across as a demand, and it&apos;s not from an authority figure or a valued friend, it won&apos;t happen. This is because we don&apos;t have time for that. If your user says, &apos;Check this out&apos;, or &apos;come see this&apos;, then it&apos;ll happen. But it happens not because we told them to check it out. It happens because it&apos;s an opportunity for us to show off. If we see what they do, and do it ourselves, we&apos;ll get to be the ones to say &apos;check this out&apos; to someone else. And it doesn&apos;t even require a time machine.
   </content>
</entry>
<entry>
   <title>I was at a meeting</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2008/12/i_was_at_a_meeting.html" />
   <id>tag:unlogica.com,2008:/blog//1.46</id>
   
   <published>2008-12-23T06:18:10Z</published>
   <updated>2008-12-23T07:28:41Z</updated>
   
   <summary>I was at a meeting of various javascript developers. I do not know javascript enough to claim proficiency. I don&apos;t want to know javascript; my biases are for Objective C and the desktop environment. It&apos;s a long story as to...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      I was at a meeting of various javascript developers. I do not know javascript enough to claim proficiency. I don&apos;t want to know javascript; my biases are for Objective C and the desktop environment. It&apos;s a long story as to why I was there in the first place, and I left early.

However, one thing stood out to me was one of the presentations, done by some Yahoo employees. In it, they are talking about the myriad of frameworks, collectively known as YUI, built for the site. And I don&apos;t mean to demean it, because it is impressive. And lets them do some fancy things with their front page, showing all sorts of news and information. But that&apos;s where they didn&apos;t get it.

In full disclosure, I know people who work at Yahoo, and I know people who work at Google. They&apos;re all great and brilliant people. I mean this only as an example, although it&apos;s one I feel Yahoo could learn from.
      During their speech, I loaded up www.google.com, viewed the source, and did a character count. 6,083 characters. Then I did the same for www.yahoo.com: 137,880 characters. Over 22 times the file size. Admittedly, this doesn&apos;t include images or any other external resources, but given the amount of content, this probably would increase, not decrease the difference.

If I want general news and horoscopes, Google&apos;s front page doesn&apos;t offer that, and Yahoo wins. However, if I want to simply search, Yahoo will take over an order of magnitude longer to load, and Google is the winner. Unfortunately for Yahoo, I have no desire to read up on Brittney or the latest tv episodes.

Sometimes, when offering multiple services or features, some services can actually reduce overall effectiveness merely by being there, even when there is no confusion added. Of course, this is old knowledge, given the term software bloat. But the lesson still needs to be repeated, with the following advice: When adding or removing services, know which are useful features, and which are bloat. This is harder than it sounds.
   </content>
</entry>
<entry>
   <title>In Defense of the IPhone API Limitations; the Compatibility Contract</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2008/11/in_defense_of_the_iphone_api_l.html" />
   <id>tag:unlogica.com,2008:/blog//1.45</id>
   
   <published>2008-11-14T20:57:46Z</published>
   <updated>2008-12-09T21:00:42Z</updated>
   
   <summary>The iPhone API is new. It has yet to mature. Yes, it does use a very mature 20-year-old foundation steeped in the NeXTSTEP heritage as its foundation, there&apos;s a lot that was removed or didn&apos;t make the translation from AppKit/Cocoa...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      The iPhone API is new. It has yet to mature. Yes, it does use a very mature 20-year-old foundation steeped in the NeXTSTEP heritage as its foundation, there&apos;s a lot that was removed or didn&apos;t make the translation from AppKit/Cocoa (The Mac OS X API) to UIKit/Cocoa Touch (The iPhone OS API). This even includes things like the tools, where Interface Builder is limited in what it can do for iPhone files as opposed to Mac files. It&apos;s a matter of time before things improve, and they are improving. But it&apos;s frustrating, despite there being very good reasons for it.

Sometimes it&apos;s simply a case of the code not being there, that iPhone controls resemble Mac controls in function and name, but are instead cousins, with a mismatch of abilities and feature support. Other times, it&apos;s classes and code that are outright missing because they have no use in the new OS. An obvious example would be Applescript. Sometimes, it&apos;s a case that code is depreciated on the MacOS, and rather than adding depreciated code, it&apos;s missing outright on the iPhone. Then there is the code that is in the private frameworks, undocumented but with names that provide more than just a hint that promises cool features and abilities that would solve things.

Because we can see them, on the other side of the fence, that makes them all the more tantalizing. Honestly, it&apos;s not even a fence, more a line in the sand, because none of the reasons to not use them are technical in nature. It&apos;s simply a case of Apple hanging a &quot;Do not touch&quot; sign on them. But it&apos;s best to respect this. This is part of the contract between the API and our code.
      <![CDATA[It's an unwritten contract, but it goes like this: Apple publishes a subset of their frameworks (The public frameworks) with the promise that, if you link to these documented means, the code will continue to run fine, even in subsequent generations of the OS. The other half of the contract, the part the application must do, is to stick to only these published methods and means.

In doing this, the applications have freedom to use the public APIs without worrying about land mines of odd functionality changing, and Apple is free to refine, rename, refactor, and revise the code that is not public.  Many frameworks introduced in Mac OS X first started life as a private framework in a previous version of the OS, and were made public only after all the major bugs have been squished. However, if this contract is violated, that apps depend on undocumented functionality, bad things happen, and one of two options are open:

This first option is for Apple to ensure backwards compatibility in a way called bug-compatibility. This is what <a href="http://blogs.msdn.com/oldnewthing/archive/2003/10/15/55296.aspx">Microsoft did during the 90s</a>, and in some ways, is suffering consequences for <a href="http://blogs.msdn.com/oldnewthing/archive/2003/12/23/45481.aspx">letting happen</a>. All these checks and recreating bugs means bloated code, and blocks to improvements. It means having all sorts of warts in the code; odd lines long forgotten, acting as an anchor to prevent serious change.

The second option is what Apple has historically done: let the apps break, as the contract was not adhered to. If the quirk still persists and the app in question still runs, that's great. But certainly don't go changing the operating system to check the application's name, in fear that actions must be done differently than what is best. I'm biased, but I prefer this, because I feel that this significantly contributed to the rapid changes and improvements that have happened in Mac OS X and what made the iPhone OS even feasible.

The problem is that the iPhone is not a desktop computer. It is an embedded device. And while an app breaking is to be expected every once in a while on a desktop computer, it's unacceptable on a cell phone or other important embedded device. And regardless of whose code it is, Apple would be blamed by the customer. So to avoid this, breaks in the contract must be treated as show-stopping bugs, ones that do not happen now, but could possibly happen in the future.

Bundled apps are exempt from this because of the very nature of being bundled. Suppose the Maps app included in iPhone OS 2.0 does not work with iPhone OS 2.1. This would not be a problem because the 2.0 Maps never will run on the 2.1 OS. iPhone OS 2.1 has its own version, which has been patched and modified to keep up with the shifting frameworks it uses. And for the same reasons, the 2.1 Maps app need never fear compatibility with iPhone OS 2.0 or 2.2. Third party applications that appear in the App Store, however, do not have this luxury and must be forwards-compatible. And as such, using undocumented calls should and are grounds for rejection from the App Store.]]>
   </content>
</entry>
<entry>
   <title>No maps of the forest, only pictures of trees</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2008/09/no_maps_of_the_forest_only_pic.html" />
   <id>tag:unlogica.com,2008:/blog//1.44</id>
   
   <published>2008-09-25T19:57:20Z</published>
   <updated>2008-12-09T20:58:06Z</updated>
   
   <summary>Writing iPhone apps are hard. True, it could be much worse, and as cocoa developers, we&apos;re spoiled by the MacOS, but the iPhone App Store is quickly gaining notoriety as full of crappy apps and flashlight programs. A great deal...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      Writing iPhone apps are hard. True, it could be much worse, and as cocoa developers, we&apos;re spoiled by the MacOS, but the iPhone App Store is quickly gaining notoriety as full of crappy apps and flashlight programs. A great deal of blame is laid at the feet of those rushing in without cocoa backgrounds, especially by the old guard. Even more is laid at the feet of the NDA, which limits idea exchange, and this has a lot of truth. But I&apos;ve come to believe that the NDA causes an even more subtle issue. That of reliance on demo code.
      Whenever someone is interested in iPhone development, I point them to the Hillegasse book, which deals exclusively on Mac programming. However, Hillegasse does two wonderful things. First, he teaches a lot of the design concepts of Cocoa that are universally portable, especially to cocoa touch. Second, the book teaches concepts in a way that is rare, and one I&apos;ve learned to appreciate.

He doesn&apos;t do demo apps, one for each chapter to show off a technique. Instead, over the course of the chapters, he slowly develops and integrates the techniques into a handful of apps that have real (if fledgling) utility. In doing so, not only are the techniques of the chapter taught, but overarching design methodologies that don&apos;t fit into any one section. These can not be taught by demo code apps.

Demo code apps, almost by definition, demonstrate a specific technology or feature. But in order to focus on that one aspect, the rest of the app is paired down and stripped. The job they do is to demonstrate a small subset of the API, and in that they excel. However, they are never designed to demonstrate the entire API as a complete whole. This becomes a problem in the vacuum created by the NDA. A great many iPhone developers are new to Cocoa, and have not developed on the Mac. As such, all they have seen is the demo code, with things like its rampant mixing of model, view, and controller into one.

My own code still has much to go, as there is so much more I want to make. But it involves not only reinventing the wheel due to the lack of outside support, but also unlearning the demo code app techniques that have sadly become the de-facto standard in this vacuum.
   </content>
</entry>
<entry>
   <title>Sutters Mill Again</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2008/09/sutters_mill_again.html" />
   <id>tag:unlogica.com,2008:/blog//1.43</id>
   
   <published>2008-09-11T19:56:18Z</published>
   <updated>2008-12-09T20:57:14Z</updated>
   
   <summary>It&apos;s interesting, this iPhone rush. People that have never before touched a Mac suddenly are jumping into this fray because of the buzz of the iPhone. As a Cocoa developer, it&apos;s a wonderful feeling of &quot;Our time has come!&quot; For...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      It&apos;s interesting, this iPhone rush. People that have never before touched a Mac suddenly are jumping into this fray because of the buzz of the iPhone. As a Cocoa developer, it&apos;s a wonderful feeling of &quot;Our time has come!&quot; For years, everyone focused on Java, or .Net. Because of Apple&apos;s decision to use only Cocoa or native app development, the vast majority of the industry is ill-prepared. It&apos;s as if Objective C was this ugly girl in school, the one who shows up at the reunion and her success has suddenly made her the center of attention.

I keep joking that someone should make an iPhone app that simulates a pan of water, so people can actually pan for gold with the iPhone.
      
   </content>
</entry>
<entry>
   <title>Off the Market</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2008/09/off_the_market.html" />
   <id>tag:unlogica.com,2008:/blog//1.42</id>
   
   <published>2008-09-11T19:55:33Z</published>
   <updated>2008-12-09T20:56:08Z</updated>
   
   <summary>How time flies. The last article was posted in late may, and soon afterwards, I was hired for a neat little startup. I joke about how towing and software engineering are so closely related, but going from a large company...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      How time flies. The last article was posted in late may, and soon afterwards, I was hired for a neat little startup. I joke about how towing and software engineering are so closely related, but going from a large company to a small company is almost a study of polar opposites. It&apos;s to be expected, of course, from a job with clearly delineated start and stop times to a calling where clocking in isn&apos;t as important as getting the tasks done. There&apos;s still a lot of adjusting to do.
      
   </content>
</entry>
<entry>
   <title>Frigidaire ads, written in Inuit</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2008/05/frigidaire_ads_written_in_inui.html" />
   <id>tag:unlogica.com,2008:/blog//1.41</id>
   
   <published>2008-05-20T19:41:27Z</published>
   <updated>2008-12-09T20:55:53Z</updated>
   
   <summary>This morning, while driving, the radio was playing. The station that was on not only had the paid advertising of pre-recorded clips, but also where the DJ will evangelize a product, in that they use it, etc. etc. I don&apos;t...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      This morning, while driving, the radio was playing. The station that was on not only had the paid advertising of pre-recorded clips, but also where the DJ will evangelize a product, in that they use it, etc. etc. I don&apos;t exactly consider it astroturfing because there is no attempt to hide that it&apos;s a paid product announcement. Instead, it harkens back to the older commercials, when whole shows were sponsored by one company. It&apos;s rather quaint in a way. Only, this time around, it was for the Microsoft Zune.

It&apos;s no secret that I ally myself with Apple and their products; I have several macs, an iPod, and am looking into making programs for the iPhone. So it&apos;s easy to write off that I would not be amenable to this specific product placement. Perhaps I was inserting my own biases in that the DJ sounded awkward, forcing themselves to hit all the right paid buzzwords, trying to turn the adjective &quot;Social&quot; into a noun. But regardless of how well or poorly the advertising went, one thing stuck in my mind. I couldn&apos;t recall any iPod advertisements on the radio.
      I&apos;ve seen this pattern before. It&apos;s a last-ditch effort. At a nearby mall, the food court tables have advertisements embedded in them. The advertisements, sadly enough, are advertisements for advertising. &quot;You noticed this ad! Think of how many others will notice your ad if it was here!&quot; However, the advertisements are on the losing side of a catch-22. If they truly did work, they would be advertisements for something else. Their very presence is a testimony to their ineffectiveness.

Similarly, the Zune advertisement is a no-win situation. Those that are disgusted with radio and its advertisements wouldn&apos;t be listening to the radio in the first place, so they would not be interested in the stored music-side of things. And in order to hear the advertisement, the would-be buyer has already proven themselves to have a radio, mooting the need for the Zune once again. Either they don&apos;t want a Zune, or don&apos;t need a Zune.

Compare, as I hinted at, the iPod advertising campaign. If I recall, it has focused on television and billboards. Both of which are alternatives to the radio, in a way, yet not direct competitors to the iPod. To those that are viewing media, the television is key, but the television isn&apos;t portable. Thus, a portable device like the iPod will get their attention, filling a gap. The billboard, alternatively, is visible while someone&apos;s out and about, or possibly even driving, bored but with the radio off. It&apos;s the other side of the equation, in that the billboard is where the audience is mobile, but not entertained. Neither of these campaigns hinge on the audience having both the ability and desire to use the competition.

It, perhaps, serves as an object lesson that demographics in advertising is more than just nationalities, age ranges, and genders. The medium of the advertisement also has a way of selecting the audience, and in this way, it&apos;s important not to end up, as the saying goes, trying to sell refrigerators to eskimos.
   </content>
</entry>
<entry>
   <title>Mea Culpa</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2008/05/mea_culpa.html" />
   <id>tag:unlogica.com,2008:/blog//1.40</id>
   
   <published>2008-05-11T19:41:06Z</published>
   <updated>2008-12-09T20:42:20Z</updated>
   
   <summary>Logistically speaking, it&apos;s impossible for a towing service to cover the entire nation single-handedly. Instead, CSAA, and all AAA clubs subcontract out to towing companies already in place. Where you call from determines which tow company shows up. However, the...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      Logistically speaking, it&apos;s impossible for a towing service to cover the entire nation single-handedly. Instead, CSAA, and all AAA clubs subcontract out to towing companies already in place. Where you call from determines which tow company shows up. However, the AAA logo is still emblazoned on the truck, along with the specific tow company&apos;s name, to give an impression of cohesion. Every once in a while, one tow company is unable to service members in a timely fashion, either through manpower or equipment issues. In those cases, other companies can take those calls, and service the member outside their usual territory.

I&apos;ve run quite a few of these calls, and they are the most challenging in terms of customer service. By the time I&apos;m even aware of the call, the member has been badly treated or has been left waiting for a long time. So what is the first thing I do when I finally show up?

I apologize.

This is something that much of the computer industry has yet to learn.
      <![CDATA[Certainly, I will afterwards tell them of the unfortunate events that led up to their mistreatment, which does make it easier and lower the stress involved. I was not the one that caused the problem. I did not manufacture the car, answer the phone, show up, make the mistake, or leave the member stranded. This is through no fault of my own, and in many cases, not even the fault of anyone at the tow company I worked for.

But I do not disown the problem, and have stressed to them to contact AAA. I even gladly offer all the information so that they can better make their voice heard, despite the risk that my association to the problem call might reflect badly on me. It is because of this that I had several letters of thanks, where my actions literally convinced them to stay with AAA when they were ready to terminate their membership.

So why does this apply to the computer industry? It's because there's a myth, best demonstrated in comments like this:
<blockquote>I think people are frustrated with Windows and Spyware and take their frustration [out on] the manufacturers. Dell is not responsible for Microsoft's issues.</blockquote>
The myth part is two fold. The first part is the belief that the end customer will care about which part is failing. They bought a single device, and expect it to function as a whole. And whenever the vendor, either hardware or software, claim otherwise, it does nothing but to further infuriate the customer.

The second myth is the belief that it actually matters which part is failing. The customer is right in this one; finger pointing does nothing to fix things. Dell is responsible for Microsoft's issues, precisely because Dell made the decision to sell their hardware with that software. Can we excuse a restaurant for serving subpar food simply by stating that the farmer provided low-quality ingredients? Or do we demand the chef to know the difference, and ensure the taste of their food by choosing better?

While I am heavily biased, and will admit as such, this is one thing that Apple has gotten right, either consciously or unconsciously. They own both the hardware and software, so they are unable to use the finger-pointing excuse in many cases. They don't need to resort to shovel-ware, and thus avoid their first impressions being sullied by actions of third parties. So what chance does the other PC vendors, such as Dell, have?

The first option is unlikely, but an amusing mental experiment: to own their own software. Fork a BSD or Linux distribution, and ship computers using that. The key here is to own it, not license it. In doing so, they have a chance to maintain the tight integration that Macs have. They could build the kernel to use features that they add, and only those features, maximizing stability and minimizing bloat. That's not to say they can't license and bundle software, but they have to be picky about what does go in, and if something is lacking, to replace it or make their own. By doing this, they can test much more readily against their own machines, and ensure that updates are less likely to do things like what Vista SP1 did.

But not since the 80s were there many consumer-level computer companies that built the whole machine. It's part of a distant age of Amiga, Acorn, Atari, and other companies that started with A. Even modern high-end computer companies like Silicon Graphics and Sun are less likely to roll their own OS. And those like Dell don't have the OS experience. Furthermore, for vendors that rely on Windows, well, they rely on Windows.

So what then? Well, if Dell is serious about fixing its consumer-level tech support image, it needs to own the problem. Enterprize-level Dell doesn't have this issue, <a href="http://unlogica.com/blog/2007/07/you_are_not_their_customer.html">for reasons I mentioned before</a>. But for Dell's image to return in the consumer space, it needs to care about the ingredients in their products, both software and hardware. For a company whose culture is one of commodity, this will be an uphill battle; the very word implies that quality is too similar across multiple sources to really matter. But the consumer has spoken; quality does vary enough to matter. And to survive in the future, this quality has to be ensured, from each and every part of the product.

Until then, there should be a lot of apologies.]]>
   </content>
</entry>
<entry>
   <title>Language Barrier</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2008/04/language_barrier.html" />
   <id>tag:unlogica.com,2008:/blog//1.39</id>
   
   <published>2008-04-25T19:40:50Z</published>
   <updated>2008-12-09T20:41:53Z</updated>
   
   <summary>I have often joked that my first language isn&apos;t English, as I&apos;m more fluent in C. Truth be told, while I can&apos;t claim to be bilingual in any real sense (I understand some french, and have picked up only a...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      <![CDATA[I have often joked that my first language isn't English, as I'm more fluent in C. Truth be told, while I can't claim to be bilingual in any real sense (I understand some french, and have picked up only a few spanish words), I do pride myself in being a polyglot in that I know several computer languages. Of course, C is my core language, as I can claim consistent coding proficiency in it all the way back to my college years. But beyond that, I know quite a few other languages, including assembly, C++, and as of late, Objective-C.

Not only that, but on the languages that I have used but have since forgotten, I've made sure to remember a few of the design patterns from them. For example, the Eval/Apply loop used in Scheme's interpreter. There's an aphorism to the effect of "A language which doesn't change the way you think isn't worth learning." I'm a firm believer in the contrapositive: All languages worth learning will change the way you think.

With that in mind, it makes me really wonder and ponder about <a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html">this list</a> that was pointed to in <a href="http://www.psynixis.com/blog/2008/04/25/did-apple-make-a-mistake-choosing-objective-c-for-iphone-sdk/">this article</a>.]]>
      <![CDATA[Of  course, not being fluent in Java, and wanting to break into the tiny world of Objective-C coding will heavily bias me against the list. At the same time, the list even acknowledges this major difference, emphasis theirs.<blockquote> The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. ... Observe that the TIOBE index is not about the <em>best</em> programming language or the language in which <em>most lines of code</em> have been written.</blockquote>This is simply a list of the languages mentioned the most in several forms. Which makes me wonder: How many times was one language on the list mentioned with another? That is, which languages were most popular among polyglots?

True, knowing several computer languages does not a good programmer make, nor should one ignore those who know a single language really well. But at the same time, knowing diverse languages does require a degree of flexibility, and knowing only a single language would make one blind to solutions outside their realm.

Furthermore, the gap between mediocre programmers and exceptional programmers is well known, and I would argue that a mediocre programmer is far more likely to be the 9-to-5er, the one who learned programming only for the money. They would flock to the most popular language and stick only to that one, since they're not interested in it outside their paycheck.

Here's the part where I venture into theories unknown. Because Objective-C, to the best of my knowledge, is not taught as a beginning language in colleges, and is almost completely unheard of in trade schools. Therefore, most if not nearly all Objective-C programmers learn it as a secondary or tertiary language and are by definition polyglots. And those who know only Objective-C would have to be ones who did so on their own, showing a natural drive to program.

I currently have no evidence to back up these assumptions, but if they're right, it means that nearly no Objective-C coders would be the 9-to-5er sort, having learned only one language. And while that doesn't guarantee good programming, it might imply improved chances, as fewer of the mediocre, paycheck-driven pool would be included.]]>
   </content>
</entry>
<entry>
   <title>Making C++ and Objective C play nice</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2008/04/making_c_and_objective_c_play.html" />
   <id>tag:unlogica.com,2008:/blog//1.38</id>
   
   <published>2008-04-11T19:38:34Z</published>
   <updated>2008-12-09T20:41:41Z</updated>
   
   <summary>Ah, sibling rivalry. C++ is one year older than Objective C, and while they have the same parent, C, they&apos;re quite different. But, sometimes, you want to harness code written in C++ from your nice and comfy Cocoa-based app. Sure,...</summary>
   <author>
      <name></name>
      
   </author>
   
   <category term="20" label="Advanced programming" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="18" label="Aside" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="22" label="Cocoa" scheme="http://www.sixapart.com/ns/types#tag" />
   <category term="2" label="Code" scheme="http://www.sixapart.com/ns/types#tag" />
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      Ah, sibling rivalry. C++ is one year older than Objective C, and while they have the same parent, C, they&apos;re quite different. But, sometimes, you want to harness code written in C++ from your nice and comfy Cocoa-based app. Sure, you can try Objective C++, the hybrid as of late, but you risk losing Objective C&apos;s pure superset abilities, and the compiler takes a speed hit trying to be bilingual. And if other coders either can&apos;t or won&apos;t handle C++, well, then it&apos;s time to break out some pure C wrappers and contain things. Here&apos;s a few tips I&apos;ve learned the hard way.
      <![CDATA[The first step, of course, is to make a header file to be our bridge keeper. Since Objective C reads C straight across and is <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/CarbonCocoaDoc/Articles/interchangeableDataTypes.html">toll-free with some Core Foundation structs</a>, and C++ will let you use a plain C header if you uglify things, the common ground of choice is a C header and a C++ wrapper, using Core Foundation.<p>

<h3>External circumstances</h3>
<pre>#if __cplusplus
extern "C" {
#endif
#include &lt;CoreFoundation/CoreFoundation.h&gt;
//Your function declarations here!
#if __cplusplus
} //Extern C
#endif</pre>
It's also good form to leave the CoreFoundation include in the <code>.cpp</code> file instead. Cocoa.h already includes CoreFoundation, so you don't need to worry about the objective-C end of things. Since we care only about using the C++ library, and not making a C++ citizen ourselves, it's okay to keep it all in the extern C world. This means no operator overloading of our functions among other things.

Furthermore, the overloading ban only applies to function declarations. That means the actual <code>.cpp</code> file can have that comfy extern wrapper all about, instead of prefixing each function with extern "C".

<pre>#if __cplusplus
extern "C" {
#endif
int foo() {return 1;}
int bar() {return 0;}
#if __cplusplus
} //Extern C
#endif</pre>
is the same as

<pre>extern "C" int foo() {return 1;}
extern "C" int bar() {return 0;}</pre>
While the latter has less lines of code in the example, the former will help you from tripping up and forgetting the wandering extern C calls in front of each function. If you're used to Objective C, you'll want to do this. Trust me on this one.

<h3>Cocoa to the Core</h3>
I suppose in theory you could simply use Objective C++ constrained to one file, but in unfamiliar territory, it's good to ensure strong language boundaries. Thus, using Core Foundation with Toll free bridging. Apple's already done a lot of the work explaining it, but I want to add this tidbit that slipped under my radar.

Core Foundation classes can do more than NSObjects. In fact, it's possible to use a CFArrayRef to store structs and other non-object items. But we <em>want</em> NSObjects. So don't forget to use the pre-made callbacks.

That is, you'll want <code>CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);</code> and <code>CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks);</code>. If you use NULL instead in the callback arguments, keys and values will be neither retained nor released, causing either crashes or memory leaks.

<h3>Sausage Links</h3>
Last but not least is if you really want to contain the C++, not even letting it into your main project, but keeping it in a static <code>.a</code> library file. Things get strange. In test projects, it'll all link properly. In projects that make the new wrapper library, it'll all link properly. But in the final project, when I tried to build, I got dozens of linker errors, spanning kilobytes if not more:

<pre>Undefined symbols:
  "std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::end()", referenced from:
      Foo() in libMyFooLib.a (foo.o)
ld: symbol(s) not found</pre>

It's a huge huge mess of text, and at first I thought my new library wasn't finding the c++ library it wrapped. I tried all sorts of linker arguments and prelinking paths and hopping on one foot while doing a rain dance. Finally, I threw in a dummy voodoo.cpp file, just because it was worth a shot. Lo and behold, it compiled! And sure enough, the devil's in the build details. A plain cocoa app uses <code>/Developer/usr/bin/gcc-4.0</code>, whereas any that has a cpp in the mix uses  <code>/Developer/usr/bin/gcc++-4.0</code>! Since having a voodoo.cpp is bad form, the workaround is rather simple: make sure <code>/usr/lib/libstdc++.6.dylib</code> is also in the link chain.



That's about it for now! I was going to add in a little trick involving redefining classes as structs, but it turns out it's too unreliable to suggest. So if you absolutely can't find common interlanguage data types, there's always <code>void*</code>. Just be careful, and keep it under wraps.]]>
   </content>
</entry>
<entry>
   <title>On the market</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2008/04/on_the_market.html" />
   <id>tag:unlogica.com,2008:/blog//1.37</id>
   
   <published>2008-04-02T19:37:30Z</published>
   <updated>2008-12-09T20:40:09Z</updated>
   
   <summary>Almost as if on instinct, I updated my resume last month. And today, I discovered that the local office of the towing company will be closing its doors. Sure, I could move to where the office is relocating. But I...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      Almost as if on instinct, I updated my resume last month. And today, I discovered that the local office of the towing company will be closing its doors. Sure, I could move to where the office is relocating. But I really can&apos;t justify the commute, especially at a driver&apos;s pay rate. While it&apos;s been fun to drive a tow truck, and I definitely have gotten my exercise, it&apos;s time to return to the software industry.

UPDATE: Off the market again. And since there&apos;s been a server crash, I haven&apos;t uploaded the old files.
      
   </content>
</entry>
<entry>
   <title>It&apos;s like a mountaintop, but with more grease and the guru swears a lot</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2008/03/its_like_a_mountaintop_but_wit.html" />
   <id>tag:unlogica.com,2008:/blog//1.36</id>
   
   <published>2008-03-29T19:37:14Z</published>
   <updated>2008-12-09T20:39:03Z</updated>
   
   <summary>I am a computer programmer, a software engineer if you will, but I&apos;ve had a different job of late. As the story goes, I graduated in &apos;99, was in the industry full time for a few years, and was laid...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      <![CDATA[I am a computer programmer, a software engineer if you will, but I've had a different job of late. As the story goes, I graduated in '99, was in the industry full time for a few years, and was laid off. Then, after a while of contract work, I was job hunting and my car broke down. I'm a AAA member, and when I jokingly asked the tow truck driver if they were hiring, he said yes. I applied, and for the last four years, I've been driving a tow truck.

It's been fun, and I've gotten a lot of exercise, but I do want to fully return to the computer industry. One of the hardest parts, however, is selling myself, and explaining these last few years. To be honest, it's not mutually exclusive; I have been programming all this time. But at the same time, this is definitely the path less traveled by. For the most part, the computer industry is one of specialization, where there's more call for people with a specific set of knowledge than for people who are generalists.

This is a shame, because I believe that those who focus on one tiny subset of the field are at a disadvantage. I remember, years ago, a time back at my first job. It was a great company &mdash; small, with a lot of open communication &mdash; and I was rather fresh out of college. Their primary product ran on Windows NT exclusively, and was the brainchild of the CTO. Believe me when I say the CTO was a brilliant man, who knew both Windows and the product inside and out.

So believe my surprise when, during a group brainstorming for a new product that would be cross-platform, he admitted to having no knowledge of how Unix did file permissions, the read/write/execute bits that can be changed with chmod. Me, a new hire, knew something the CTO didn't!]]>
      To his credit, he knew that he did not know, as opposed to some lesser man who would try to fake it. And the other engineers also didn&apos;t know, either. This was during the time of MacOS 8 and MacOS 9, long before Linux and MacOS X had made their big mark in the landscape, so the non-windows OSes were still very much in the margin. But for the rest of my employment there, I was the man to go to for Mac questions. Everything from which iMac to purchase for QA to test browsing with, to maintenance and repair. To this day, I still remain surprised that I knew something that the rest of the company didn&apos;t.

Deep but narrow knowledge is still the order of the day in many circles, and I am coming more and more appreciative of a wide base. I sometimes joke that I can tell which AAA members I assist are java programmers, because they don&apos;t know much about the hardware of their car. Mean, but sadly not too far from the truth. Part of the emphasis of the blog has been to show relationships, ties between the two worlds, and that something as far outside of computing as cars can still be relevant and useful for discovering insights or gaining a different perspective.

And it&apos;s why I do list my towing experience in my resume. Not only is it to stand out for uniqueness&apos; sake, but also because it is valuable. Where have I been, in the computing world for the last few years? Nowhere. But at the same time, very few fast-track employees will have gained the crisis management, problem solving, or people management skills that I have while pulling a Mercedes Benz out of a fence or rescuing a kid locked in a car. And I&apos;ve come to appreciate good design beyond matching brackets and understand the non-technical user, meeting with them in a context that few will.

And in five years&apos; time, when all of our hot buzzword-compliant technologies have been replaced by entirely new hot buzzword-compliant technologies, these skills will still remain as potent and useful as they are now and have been during the age of the man-month. And that will make all the difference.
   </content>
</entry>
<entry>
   <title>Security Update</title>
   <link rel="alternate" type="text/html" href="http://unlogica.com/blog/2008/03/security_update.html" />
   <id>tag:unlogica.com,2008:/blog//1.35</id>
   
   <published>2008-03-28T19:29:35Z</published>
   <updated>2008-12-09T20:37:02Z</updated>
   
   <summary>I&apos;m not sure if anyone ever reads these posts (Save for spambots and the search hits for wanting to break into Fords. Seriously) but there&apos;s been a sizable gap of posts. And honestly, I started writing Bit Rot back in...</summary>
   <author>
      <name></name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://unlogica.com/blog/">
      <![CDATA[I'm not sure if anyone ever reads these posts (Save for spambots and the search hits for wanting to break into Fords. Seriously) but there's been a sizable gap of posts. And honestly, I started writing Bit Rot back in February. Since then, there's been the iPhone release, and just this morning, <a href="http://daringfireball.net/linked/2008/march#fri-28-miller">Daring Fireball</a> linked to Charlie Miller owning (in both senses of the word!) a MacBook Air. He also was able to already find exploits for the iPhone.

So why do I mention this? Well, in many ways, the iPhone is going to be a whole new data point. Since it's so popular, the argument of market share is going to be removed. And the user base is going to be so diverse as to make PEBKAC a real threat. So how is Apple going to ensure security on the iPhone? 100% unbreakable software is like magic pixie dust. You can get close to it, and it definitely shows up in advertisements, but it's not really feasible. And, for better or for worse, Apple keeps its cards really close to its chest. Perhaps for the better, because otherwise armchair iCEOing would be much less fun.]]>
      <![CDATA[<h3>Pay no attention to the computer behind the phone!</h3>
Back in MWSF 2007, in an <a href="http://youtube.com/watch?v=YgW7or1TuFk">interview</a>, about 1 minute 40 seconds in, Phil Schiller was careful to stress that the iPhone is not a computer.

And a lot of the <a href="http://www.rogueamoeba.com/utm/2008/03/11/iphone-sdk-bug-filing/">limitations mentioned</a> on the Rogue Amoeba illustrate the discrepancy. Phones typically don't have external installers, multitasking, and full access. Computers do. And while I can sympathize with the demand for this opening up (I don't own an iPhone- I've got a Sidekick II because of its telnet and SSH support), I can see why Apple did it this way.

Apple's solution appears to be to combat bit rot, on a couple of fronts. By acting as guardians of the phone, both in terms of what the apps can do and how the users can get the apps on the phone, Apple is getting users accustomed to treating Apple as an authority, of what apps are safe and which aren't. Furthermore, by restricting the data flow in this way, reinstalls are relatively painless. When a computer performs a software update, it has to take the pre-existing software into consideration. But if iTunes already knows the settings your phone has, the user files, the applications, and the OS, what part of a reinstall must the user do by hand?

So, here we stand with the iPhone. What market share protection the Mac has, the iPhone won't. The user issues that plague the windows world will affect the iPhone. And we know that antivirus software is limited in removing infections. So Apple is pushing for the iPhone to not be considered a computer, so that they can make an environment hostile to malware.

By requiring that all apps be installed by the store, Apple can serve as a guardian, reducing rogue sites from offering up trojans. By dictating the parts of the API the program can and can't use, Apple has a very rough filter that will make it harder for malware to slip through the approval process. By requiring all apps to be signed, Apple can shut down malware authors from the store, by knowing who made the code. By insisting that the phone be responsive, Apple can reduce bit rot.

And, most importantly, if and when the malware's made it onto the phone, the user can use iTunes to <a href="http://www.imdb.com/title/tt0090605/quotes">nuke it from orbit,</a> restoring all the approved files and applications.

It's the only way to be sure.]]>
   </content>
</entry>

</feed>
