tag:blogger.com,1999:blog-62011027873269241562024-03-04T20:47:59.511-08:00Bryan Kyle's BlogBryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comBlogger68125tag:blogger.com,1999:blog-6201102787326924156.post-12305913011200561862012-11-12T22:23:00.000-08:002012-11-12T22:24:07.168-08:00I've Moved<p>A few months ago I decided to move my blog over to Tumblr. The choice was made based on the fact that I could easily make link posts as I tend to come across interesting articles during my Internet wanderlust.</p>
<p>In the future, please join me over at my new Internet home: <a href="http://bryankyle.com/">bryankyle.com</a></p>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-80003896390003044672012-08-21T21:49:00.001-07:002012-08-21T21:49:37.899-07:00Universal Command
<p>I used to love emacs. It was a great text editor and while it had a reputation for being somewhat difficult to use when first learning, the amount of stuff you could do with it was jaw dropping. With a piece of software as big and complex as emacs there needs to be some way for users to not only quickly do what they want to do, but also discover things that they didn’t know they could do. Emacs has such a feature. It’s called the minibuffer.</p>
<p>The minibuffer is a small area at the bottom of your editor window that allows you to quickly type in a command to execute. Emacs is essentially a framework built out of small functions that when combined together make an editor. There’s a function for moving forward one letter at a time. There’s a function for moving backwards one word at a time. There’s a function to insert the letter being pressed into the buffer<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">[1]</a>. There’s a function for basically everything you can do with it. Many, but not all of these functions are <em>interactive</em>, meaning they can be executed directly by the user. And these commands can be executed by typing their name into the minibuffer.</p>
<p>For example, to move forward a word you can type <code>M-x forward-char <RET></code>. That is: press the meta key<a href="#fn:2" id="fnref:2" title="see footnote" class="footnote">[2]</a> and the ‘x’ key at the same time. This focuses you on the minibuffer. Type in ‘forward-char’, and hit the return key. This will move the cursor to the next cursor. Trivial example, I know. Obviously moving forward one letter has been bound to the right arrow key so you don’t need to do this, but you get the idea.</p>
<p>One thing I always missed when using other programs was the ability to just tell the program what I wanted to do with the keyboard instead of having to use the mouse. I wanted to be able to tell Pixelmator to duplicate a layer; something that Pixelmator doesn’t have a keyboard shortcut for. Well, OS X actually lets you do this. It’s not exactly the same thing as the minibufer in emacs, but it gets pretty close.</p>
<p>So what exactly is this feature? Well, under the Help menu in every program on OS X there’s a search box. If you type in the name of a menu command into that search box you’re able to arrow down to it and not only will OS X show you where the command is for future reference, but it will also allow you to invoke it by pressing the enter key. Just having the menu isn’t enough though. It needs to be accessible via the keyboard. Good news, it is. Pressing Command-Shift-? will open the Help menu with the Search box highlighted.</p>
<p>This is something I use on a daily basis to get my job done. It’s great for those times when you need to invoke some feature of an application that doesn’t have a keyboard shortcut assigned to it.</p>
<div class="footnotes">
<hr />
<ol>
<li id="fn:1">
<p>In emacs parlance, a buffer is an editor window. <a href="#fnref:1" title="return to article" class="reversefootnote"> ↩</a></p>
</li>
<li id="fn:2">
<p>More emacs parlance here. The <em>meta</em> key means either the escape key, or the left alt or left command key if you’re on a Mac. This is just left overs from the era in which emacs was created. <a href="#fnref:2" title="return to article" class="reversefootnote"> ↩</a></p>
</li>
</ol>
</div>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-6294154391550909582012-07-31T06:37:00.001-07:002012-08-23T18:31:44.072-07:00Locking Your Mac with a Keyboard Shortcut<p>I like to leave my MacBook Air on most of the time so that I can access it from where ever I go. But with 2 kids running around the house sometimes the keyboard will get stolen or have random keys mashed, the trackpad or mouse will get moved or buttons clicked. With all this entropy and Murphy’s law, the odds are not in my favor. So whenever I get up to leave the machine for extended periods of time I like to lock my screen.</p>
<p>Locking the screen basically just ensures that no one will accidentally delete a bunch of files. In a less secure environment it helps to protect the data that you have on the machine as well.</p>
<p>There are various ways to lock the screen on your Mac. The few ways that most people are familiar with are setting the screen saver timeout to be really low and installing the Keychain Access menubar extra. I’ve found that neither of these approaches really works well for me.</p>
<p>I tend to do a lot of thinking and not a lot of mindless clicking or moving the mouse. Having the screen saver turn on just because I haven’t touched the computer in a while doesn’t work for me. Installing the Keychain Access menubar extra is an option, but locking the screen from it is a hassle since it can’t be done with a keyboard shortcut.</p>
<p>To work around this, I decided to write my own custom OS X Service to start the screen saver. I then assigned a global keyboard shortcut to it, and Behold! A screen saver that turns on whenever I hit a certain key combination. Not a big deal, I know. But it’s the little things that count.</p>
<p>If you’re interested it doing something similar, follow the steps below.</p>
<h2>Create a Service</h2>
<ol>
<li>Start Automator.</li>
<li>Create a new Service.</li>
<li>Set the Service to not receive any input and be available in any application.</li>
<li>Add a Run AppleScript Action.</li>
<li>Set the script to be<pre>
on run {input, parameters}
tell application “System Events”
start current screen saver
end tell
return input
end run</pre></li>
<li>Save the service as “Lock Screen”.</li>
</ol>
<h2>Assign a Keyboard Shortcut</h2>
<ol>
<li>Open System Preferences.</li>
<li>Open Keyboard.</li>
<li>Select Keyboard Shortcuts.</li>
<li>Select Services from the list on the left.</li>
<li>Scroll to the General section.</li>
<li>Click on the Lock Screen service.</li>
<li>Click on add shortcut.</li>
<li>Assign the shortcut you want, I use Cmd+Opt+Shift+L.</li>
</ol>
<h2>Use it</h2>
<ol>
<li>Invoke the service from the services menu; or</li>
<li>Use the keyboard shortcut</li>
</ol>
<p>Like a boss.</p>Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-78595025549297828842012-07-23T22:55:00.000-07:002012-07-23T22:55:02.132-07:00Matte Screen Protector<p>As much as I love my iPad, one of the few things I really dislike about it has always been the glossy screen. It looks great but it’s highly susceptible to both finger prints and glare. It was a poor choice for usability, and here’s why.</p>
<p>Touch screen devices are meant to be touched with fingers. Bodies naturally produce oils, so the natural state of your finger is to be slightly oily. Obviously this means that the screen is going to be exposed to lots of oils through normal use. This isn’t so much an issue on devices you put in your pocket like the iPhone or iPod because typically these devices are put into a pocket between uses. The device moving around in your pocket will naturally buff off any oily residue on the screen. This isn’t the case with the larger screened devices though.</p>
<p>The iPad is too big for a pocket, and it’s designed to be used for longer sustained times. So what can be done about the oils that get on the screen for the iPad? Well, there’s the Smart Cover, which buffs some of the oil off of most of the screen and leaves giant lines running down other parts of it. </p>
<p>Another option is to just keep a cleaning rag with you where ever you go. I wear glasses so I tend to have one handy with me anyway. This approach works pretty well. Aside from the fact that you look like a maniac trying to clean your device before using it.</p>
<p>Lastly, you could just learn to get used to it and ignore the prints all over your screen. This appeals to my inner nihilist. It certainly requires less effort than the other options, but if you have any respect for your gadgets you’ll likely steer clear of this one.</p>
<p>The other design concern is that the iPad is designed to be used laying more or less flat on a surface. Guess what’s usually directly above most surfaces that you would put your iPad on? Sources of glare: overhead lights, tall lamps, the sun, etc.</p>
<p>Having such a large reflective surface and pointing it towards source of glare results in poor usability.</p>
<p>Glossy screens do look much more vibrant though. They tend to produce an image that’s much more saturated, than glossy screens. This in turn makes people believe that they’re getting a better product. I know for the longest time I wanted a laptop with a glossy screen. And I do love the glossy screen on my MacBook Air. But a laptop has a totally different usage pattern from iPads.</p>
<p>So, for these reasons I decided to try out a matte iPad screen protector. Now, I’m not the kind of person that likes to put screen protectors on his devices. For the most part I find that screen protectors make the device less usable, come off easily<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">[1]</a>, wreak havoc on accessories<a href="#fn:2" id="fnref:2" title="see footnote" class="footnote">[2]</a>, and in general tend to be a kind of snake oil. I suppose they do protect the screen, but how often do you put items that are likely to scratch your devices right next to them? My guess is: if you care about your device, never. So, this is a screen protector only insofar as its a providing a matte finish on the screen.</p>
<p>In the few days that I’ve had it on I’ve really enjoyed it. Glare is totally gone. Fingerprints and smudges show up. I haven’t tried it outside, but since I never really used the iPad outside in the first place I don’t see it as a big use case for me. Bu the really interesting thing is that it makes the iPad feel new again. I don’t know why this is. I could be just that it looks so much different that it feels new and exciting, or it could be that this is what I always wanted. Time will tell.</p>
<p>If you’ve had issues with glare and oils on your iPad I highly recommend trying out a matte screen protector. I bought a cheap one at Walmart for $12, so it’s not exactly expensive to try it out. Putting the screen protector on can be pretty tricky. I takes lots of time and patience to get it right. Even after an hour or so of applying and re-applying the film I have a few bubbles around the bezel. I’m living with these for the time being. If I find that the matte screen protector is something I want to stick with longer term I’ll fiddle around with it some more.</p>
<p>For those of you looking at applying a screen protector, here are a few tips:</p>
<ul>
<li>Wash your hands really well before working with the film. This will remove dust and excess oil from your hands during applicaton?</li>
<li>Clean the screen thoroughly using a screen cleaner and lint-free cloth.</li>
<li>Apply the film in an area that has little or no dust in the air. Applying the film in the bathroom after running a hot shower for a few minutes will cause dust in the air to become heavy and fall.</li>
<li>Use a pencil with some scotch tape, sticky side out, on it as a “dabber” to remove dust and hair from the screen and film that works its way in during application.</li>
<li>Use a credit card to push air bubbles to the sides.</li>
<li>Take the time to line up the cut outs before laying down the entire film.</li>
<li>Apply the film slowly, no need to rush.</li>
<li>Don’t feel as though you need to buy another screen protector if you get lots of dust underneath. Potentially remove the dust particles using the dabber. You only need to replace the film if it gets creased or loses its stickiness.</li>
</ul>
<div class="footnotes">
<hr />
<ol>
<li id="fn:1">
<p>In the past, I’ve found that screen protectors tend to come off fairly easily if you expose them to an environment that’s constantly rubbing the edges of the protector, pockets for example. If you put a screen protector on, then cover the edges of the screen protector with a case you won’t run into this issue. But you’ll have an abomination of a device. <a href="#fnref:1" title="return to article" class="reversefootnote"> ↩</a></p>
</li>
<li id="fn:2">
<p>Try putting a Glif on an iPhone that has a screen protector on it to see what I mean. The screen protector needs to come off for the Glif to fit. <a href="#fnref:2" title="return to article" class="reversefootnote"> ↩</a></p>
</li>
</ol>
</div>Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-883978648510440222012-04-03T22:20:00.001-07:002012-04-03T22:25:27.132-07:00OmniFocus Mail Rule Now Works with Attachments<p>OmniFocus comes with a rule that can take a specially formatted email message and transform it into an action. I use this feature running on a Mac Mini to allow me to add actions to OmniFocus from my Windows PC at work.</p><p>One things that has always bothered me about it is that it doesn’t do anything with attachments. If you create one of these specially formatted messages and attach a file, you would expect that the attachment would be added to the newly minted action. It doesn’t. I’m sure there are good reasons for it. I can’t claim to know them but suffice it to say I want this functionality , dammit. So I did what any self-respecting geek would do: I rolled up my sleeves and started hacking.</p><p>In the end I managed to modify the mail rule that comes bundled with OmniFocus to attach all mail attachments to newly created actions. You can download the <a href="http://github.com/bkyle/mailaction">modified MailAction.applescript</a> and try it out for yourself.</p><p>With this script installed, any mail messages that OmniFocus would normally pick up will also have their attachments added to the OmniFocus action that is created.</p><h2 id="installation">Installation</h2><p>Installing this modified mail rule requires a little bit of hacking on your part.</p><ol><li>Locate the OmniFocus.app bundle in your /Applications folder.</li><li>Right click on the OmniFocus.app bundle and select <em>Show Package Contents</em></li><li>Navigate from the root of the bundle into Contents/Resources</li><li>Locate the file called MailAction.applescript and rename it to OldMailAction.applscript<a href="#fn:oldmailaction" id="fnref:oldmailaction" title="see footnote" class="footnote">1</a></li><li>Copy the <a href="http://github.com/bkyle/mailaction">modified MailAction.applescript</a> into the Contents/Resources folder.</li></ol><p>If you already have the mail rule set up through OmniFocus the next time the rule gets run the new script will be used.</p><h2 id="thanks">Thanks</h2><p>I’d like to thank The OmniGroup for creating such an awesome product, for creating something that’s even remotely hackable, and lastly, for giving me permission to share this with you.</p><div class="footnotes"><hr /><ol><li id="fn:oldmailaction"><p>The actual name doesn’t matter here. What’s important is that a backup copy of the file MailAction.applescript is created. In the event that something goes wrong you can just restore this file by renaming it and you’ll be back up and running.<a href="#fnref:oldmailaction" title="return to article" class="reversefootnote"> ↩</a></p></li></ol></div>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-89707167599237892712012-04-01T22:02:00.001-07:002012-04-01T22:02:50.127-07:00Byword Review<p>I’ve been a big fan of Byword for OS X for quite some time. I like how it strives to be simple but still allows you to make your own choices about a few things. When Byword came out for iOS a few weeks ago with iCloud support I thought it would be great. Below are some of the things I’ve found.</p><h2 id="occasionalcrashes">Occasional Crashes</h2><p>In my limited use of Byword for iOS I’ve noticed a few crashes. Nowhere near an Instacast<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">[1]</a> level of crashy-ness, but crashes nonetheless. Crashes aren’t the end of the world, but for an app that feels<a href="#fn:2" id="fnref:2" title="see footnote" class="footnote">[2]</a> as simple as Byword it makes me wonder.</p><h2 id="limiteddocumentmanagement">Limited Document Management</h2><p>Overall I’ve found the document management options in Byword for iOS to be lacking. You get to chose up front whether you want to use iCloud or Dropbox syncing. But you can’t have it both ways and simply storing documents on the device is a no go. You can’t swap documents between iCloud and Dropbox on the fly.</p><p>On the positive side, conflict resolution is done quite elegantly. Instead of saving both copies to Dropbox and having you sort out the differences a little icon appears next to the file in the list. When you open the file you’re asked if you want to use the local or remote copy. It’s not perfect, and it’s certainly not magic. But it doesn’t leave a mess for the user to clean up, and it doesn’t force you to make a decision until you need to.</p><h2 id="cumbersomeinterface">Cumbersome Interface</h2><p>The developers behind Byword have spent a great deal of time stylizing the UI of the application. For the most part it looks really good, but I have a few issues with it. For starters, all of the buttons are custom to suit the color theme of the application. In what I believe is an attempt to make the UI chrome blend away the contrast has been turned way down making the buttons difficult to see and read. Don’t get me wrong, it looks great, but maybe the contrast could get turned up a bit for the next release.</p><p>Another issue I have is when attempting to use the application on the iPad with an external keyboard. Opening and selecting a document are pretty easy, but once a document has been selected and you begin editing all of the chrome disappears. There is no visually discernable way of getting to the document selector or showing the title bar to rename the document or preview what you’ve written.</p><p>As pointed out by <a href="http://shawnblanc.net">Shawn Blanc</a> in his <a href="http://shawnblanc.net/2012/03/byword-review/">review</a>, the way around this is to swipe the document from left to right which will bring up the document selector. From there you can either select another document or tap on the title bar which will hide the document selector bringing the document back into focus, but with the title bar visible – until you tap on the text area that is.</p><p>Lastly, I tend to do a lot of writing either early in the morning or late at night. In both cases I find that editors with light color schemes to be distracting. Byword for the Mac has both a light and a dark color them which allows me to switch between as needed. The iOS version of Byword only has the light scheme.</p><h2 id="conclusion">Conclusion</h2><p>Byword is definitely a 1.0 release. There’s certainly room for improvement, but the bones are solid. Despite the problems I’ve noted I keep coming back to Byword over both <a href="http://www.iawriter.com/">iA Writer</a> and <a href="http://getwritingkit.com/">Writing Kit</a>. In the case of the former I prefer the font selection under Byword even though iA Writer’s document management runs circles around Byword’s. In the case of the latter, I really like how Byword doesn’t spew conflict files all over Dropbox and leave a mess for me to clean up.</p><p>Going forward, I’m hoping to see improvements in the areas I’ve noted. Specifically I’d like to see the following issues addressed (in order of importance):</p><ul><li>Add a dark mode color theme.</li><li>Fix the UI so that the app can be used efficiently with a bluetooth keyboard.</li><li>Improve file management to the point where it’s at least on par with iA Writer.</li><li>Reduce/eliminate crashes.[reduce-crashes-why]</li></ul><div class="footnotes"><hr /><ol><li id="fn:1"><p>I don’t know if it’s just me, but Instacast crashes on me all the time when downloading new podcasts. It might have something to do with the crappy WiFi that I’m on during the days, or maybe its just an inherent problem with the app. Either way, it shouldn’t crash as much as it does. <a href="#fnref:1" title="return to article" class="reversefootnote"> ↩</a></p></li><li id="fn:2"><p>In my mind one of the hallmarks of good design is making something really complicated feel really simple. Hiding complexity means that users don’t have to worry about things. But this only works as long as the abstraction doesn’t leak. <a href="#fnref:2" title="return to article" class="reversefootnote"> ↩</a></p></li></ol></div>Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-26933726231829459542012-03-24T22:16:00.001-07:002012-03-24T22:16:12.900-07:00What Information Are You Sharing?<p>The <a href="http://www.nest.com/">Nest Learning Thermostat</a> looks like a really cool device. I really like its overall design, and the technology behind it is pretty cool too. The amount of innovation in the less-than-sexy thermostat market has been pretty poor up until this point. Yes, yes. I really like the idea of the Nest. But there’s something that bothers me about it. Auto-Away.</p><p>The Nest has a feature called <a href="http://support.nest.com/customer/portal/articles/178864-what-is-auto-away-">Auto-Away</a> that automatically turns down the temperature in your house when it notices that no one is around. How does it do this you might ask?</p><blockquote><p>Nest uses Nest Sense (an exclusive combination of sensors and algorithms) to notice when you’re away and when you come home.</p></blockquote><p>Sounds pretty cool to me.</p><p>But consider too that the Nest also allows you to view the state of the thermostat and adjust its settings remotely via a <a href="http://support.nest.com/customer/portal/articles/178946-exploring-your-nest-account-on-the-nest-web-app">website</a> and <a href="http://support.nest.com/customer/portal/articles/179118-exploring-your-nest-account-on-the-nest-mobile-app">mobile app</a>. What would happen if their site was to be hacked? Or your phone stolen? Or your credentials compromised?</p><p>Someone without your knowledge would be able to tell if there’s anyone in the house right now. They’d also have access to your heating schedules which could be used to glean information about when you’re usually out of the house. As your house gets smarter, it needs to be extremely careful about to whom its giving details to.</p><p>If the information that Nest knows about your house was to fall into the hands of people with bad intent, they would know exactly when you’re not home. “When’s a good time to break into that house?” “I don’t know, check Nest.”</p><p>This problem isnt limited to just the Nest. Recently the power company has been installing <a href="https://en.wikipedia.org/wiki/Smart_meter">Smart Meters</a> – a new type of power meter that can wirelessly transmit information about power consumption. The data that it sends out includes how much power has been used, obviously, but also what times of day the power was used at, what sort of load, etc. These meters coupled with <a href="https://en.wikipedia.org/wiki/Power_line_communication">power line communications</a> would enable your appliances to tell the power company that they’re in use, or allow the appliances to be shut off remotely.</p><p>I know I’m starting to sound like a crank, or one of those crazy people that march around outside of the power company’s offices. I don’t actually believe that we should stop progress because bad things <em>could</em> happen. The point I’m trying to make is that we, as a society, need to be diligent about what information we freely give out to others. So the question is: what information are you sharing?</p>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-61772936988738071942012-03-21T06:15:00.001-07:002012-04-01T22:03:06.730-07:00Enough<p>I recently has the chance to read <a href="http://patrickrhone.com">Patrick Rhone's</a> latest book: <a href="http://enoughbook.com">Enough</a>. I'm generally not much of a reader these days but I've been following Patrick and his message for quite some time now and when I opportunity came up to review his latest book I jumped at it. I wasn't disappointed. </p><p>Enough is very approachable. It's a short book of essays. You could easily get through the entire book in an afternoon, but you'd be missing the point. Enough isn't instructive. Enough isn't prescriptive. Enough is about slowing down and teaching you to be more mindful. Mindful about what you have. Mindful about what you use. Mindful about what you do.</p><p>Enough is best enjoyed slowly. It contains a vast amount of wisdom. But in order to unlock that wisdom, it needs to be consumed slowly. Each essay needs to be treated as its own. Savor each one for what it is. And reflect upon it to understand what it means, and how it applies to you.</p><p>After reading Enough I find myself trying to slow down; appreciating the things that I would have normally taken for granted. I find myself more critical of the things that attempt to enter my life. I find myself more mindful of how I spend my time, and what I spend my time on. I find myself feeling more in control.</p><p>Patrick has done an excellent job taking his message and distilling it into Enough. It's an excellent book. You won't find a book that's more dense with wisdom, thoughfulness, and mindfulness. I cannot recommend this book highly Enough.</p>Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-47222041192704122382012-03-15T23:22:00.001-07:002012-04-01T22:03:19.157-07:00ZAGGfolio Review<p>When I first saw keyboard docks for tablets I always thought it seemed like a stupid idea. The first one I saw was the iPad Keyboard Dock. It seemed pretty clumsy and riddled with design problems. It was oddly shaped making it hard to pack around; it only supported portrait mode; it was a wired dock making it only useful for the iPad; it was expensive at about $100.</p><p>The idea of using a physical keyboard always made a lot of sense to me. Using a physical keyboard was certainly more productive than using the on-screen one. I could touch type just like I was used to. Plus, the physical keyboard doesn’t take up any screen real estate. But it also meant having the cart around 2 devices: the iPad and a keyboard. And if you didn’t have a smart cover you would need a stand of some kind. In the end, for all the sense it made to have a physical keyboard it just seemed like a big hassle to effectively reproduce the laptop experience with a tablet. By the time you add up the cost of all of the accessories you may as well have just bought the laptop.</p><p>But this line of thinking is flawed. An iPad with all of these accessories is not the same as a laptop. For one thing the laptop is usually much larger. Full laptops have less battery life. They don’t have touch screens. They don’t have built in 3G connectivity<a href="#fn:3g" id="fnref:3g" title="see footnote" class="footnote">1</a><a href="#fn:mifi-rocket" id="fnref:mifi-rocket" title="see footnote" class="footnote">2</a>. They’re less versatile – you can’t leave the keyboard and mouse behind. They allow for more distractions with multiple windows and multi-tasking.</p><p>With the advances in OS X Lion a regular laptop can help with focus using full screen apps. But battery life is still a problem. And you have no choice but to cart around the keyboard and trackpad with you where ever you go. The difference between and touch screen and a mouse is huge. The touch screen feels much more intimate and tactile; like you’re interacting directly with the machine. Using a surrogate virtual finger just isn’t the same; it’s less accurate and fiddly.</p><p>So, after much pondering I decided to give the ZAGGfolio a try.</p><h2 id="thecase">The Case</h2><p>The case has a hard plastic exterior with a soft lining inside to protect the iPad from scratches. When opened and laying flat the keyboard takes up one side while the iPad slides into the other. The case is designed such that both the keyboard and iPad can be removed. During my tests I found it cumbersome to remove the keyboard. More often than not I would end up not having the keyboard properly aligned. In practice the removal of the keyboard is something I can’t imagine anyone doing with much frequency. The iPad on the other hand didn’t have this problem.</p><p>Inserting the iPad is very simple; so is removing it. The slide for the iPad is snug, but not so tight that it’s impossible to align it properly. If I had to complain about the snugness of the case I’d say that removing the iPad can be on the difficult side. I like to be very gentle with my iPad so the amount of force I had to use to grip the iPad while pulling it out was too much for me. I noticed that the LCD started showing some pressure effects which made me nervous. In order to remove the iPad I had to hold the iPad at the bezel and push the case off. This is in contrast to the feeling of pulling the iPad out of the case.</p><p>When the iPad is in the case all of the external ports and speaker are still available. The volume buttons and mute switch are along the top of the device when it’s open. The home button is halfway up the right side. The headphone jack is safely at the bottom on the left.</p><p>Speaking of the headphone jack: the case is has a notch, not a hole for the headphone jack. When I first saw this I didn’t understand what it was for. But after playing around with the case it became clear. Having a notch means that you can open and close the case with your headphones plugged in. If Zagg had chosen to just use a hole for the headphone jack you would have to remove your headphones any time you wanted to open or close the case. Smart.</p><h2 id="thekeyboard">The Keyboard</h2><p>With the keyboard out the iPad can be put into it and used as an easel in any orientation: landscape or portrait, upside down or right side up, left or right. In addition to the keyboard’s ability to be used as an easel, the case can also act as a stand so that just the keyboard can be removed and used separately. I haven’t tried this configuration since I don’t see the utility, but it’s nice to know its there if I need it.</p><p>As you would expect, the keyboard contains the standard compliment of keys. In addition, there is a line of “function” keys along the top row of the keyboard. These keys give you quick access to all sorts of features. These keys are:</p><ul><li>Home, to go to the home screen.</li><li>Spotlight, to go to the spotlight search.</li><li>Picture Frame, to lock the screen and show a slide show of the photos in your camera roll.</li><li>Keyboard, to toggle the on-screen keyboard.</li><li>Cut, Copy and Paste, to do what you’d expect.</li><li>Previous, Play/Pause, Next, to control media playback.</li><li>Mute, Volume Up and Volume Down, to control volume.</li><li>Lock, to turn off the screen and lock the iPad.</li></ul><p>The keyboard is smaller than I’m used to. Even so, I found it to be perfectly be usable for anything I needed to type up. Using the external keyboard has been a really great experience. I like having the tactile feedback from a physical keyboard. Plus, having the physical keyboard means that I have more room on screen for the document I’m working on.</p><p>I did notice a few strange things with the keyboard layout though. For one, the screen lock key is directly above the backspace (or delete) key. If you mistype a word and need to correct it, you may end up inadvertently locking your screen. Many of the function keys really seemed like a stretch to me. Do I really need special keys dedicated to clipboard functions? If you’ve used a computer at all in the past 30 years you’ll probably be familiar with the standard key combinations for these commands. Do I need a key to turn on the on screen keyboard? Probably not. I bought an external keyboard so that I wouldn’t have to use the on screen one.</p><p>Perhaps I’m an outlier, but if I had to chose between having those function keys and having a larger inverted “T” for the arrow keys I would have picked the arrow keys.</p><p>Also, the caps lock key doesn’t have an indicator light. I never know if it’s on or off without first typing something. In practice I found this to be more of a nuisance than anything, but it still feels like an omission. My Apple Bluetooth keyboard has an indicator light and it runs on batteries, same as the ZAGG keyboard. Under normal usage, the indicator would only be on a tiny fraction of the amount of time the keyboard is in use.</p><h2 id="batterylife">Battery Life</h2><p>When I got the ZAGGfolio home I opened the box, put my iPad in and started working with it. I never bothered to give the battery an initial charge; I just started using it with whatever juice came from the factory. In the month or so since I bought it I have yet to charge the keyboard battery. This is par for the course as far as Bluetooth keyboards go. I’m guessing I’ll need to charge the battery sometime in the next few months. But that brings up an interesting point.</p><p>The ZAGGfolio, and in fact all of the ZAGG Bluetooth keyboards for the iPad, have an internal, non user serviceable battery. This is a design trade off. On the positive side Zagg is free to design the keyboard however they want. Without any constraints around standard batteries and how the user will have to replace them Zagg was able to make the keyboard slimmer. But this also means that the user can’t replace the batteries when the run out. The user has to charge the device using the provided USB cable instead. The keyboard doesn’t come with a wall wart for charging, so you need to be near something that can charge a USB device.</p><p>Luckily, the charging light on the keyboard will flash when there’s about 20% battery remaining which should give enough time to find an outlet.</p><p>I thought the ZAGGfolio would be an interesting experiment. I knew it would make typing on the iPad a lot easier and make it more useable as a content creation device. What I didn’t know was how deeply it would affect me. When first using the Zaggfolio with the iPad I would constantly be trying to reach for a pointing device (mouse, trackpad, trackball) when I needed to move the cursor. After a while I got used to using the touch screen. But, after using the ZAGGfolio almost exclusively for a few days going back to the MacBook Air was a little jarring. I’d constantly be trying to reach up and touch the screen to tap on icons to drag things around. After using direct interaction for a short time, using a surrogate seemed crazy, slow, and abstract.</p><h2 id="keyboardnavigation">Keyboard Navigation</h2><p>Unfortunately iOS isn’t designed from the ground up to use external keyboards and all of the interaction baggage they carry along. Specfically missing is the ability to tab between fields in data entry applications. I use OmniFocus to keep track of tasks that need to get done. But I can’t tab between fields when entering new tasks. I have to type, reach up, tap, repeat. It works alright, but it’s certainly not ideal.</p><h2 id="conclusion">Conclusion</h2><p>I’m still sort of on the fence about the ZAGGfolio. I think it’s an interesting idea and very well executed. I’m just not sure it’s for me. At $100 it’s no small chunk of change. If you’re the kind of person that can get by without a laptop, need the extra versatility that it provides, or someone that travels a lot then you’d be hard pressed to find another accessory that offers what the ZAGGfolio offers.</p><p>If you don’t travel often, or are just as comfortable with a laptop then it’s a much harder sell.</p><div class="footnotes"><hr /><ol><li id="fn:3g"><p>Although 3G connectivity isn’t built into every model it’s an option unlike a regular laptop.<a href="#fnref:3g" title="return to article" class="reversefootnote"> ↩</a></p></li><li id="fn:mifi-rocket"><p>It’s true you can get 3G connectivity on a laptop using a MiFi or a Rocket Stick but these are addons. One’s an extra device you need to carry, the other is a USB dongle you have to plug in. Either way these are poor substitutes for built in support.<a href="#fnref:mifi-rocket" title="return to article" class="reversefootnote"> ↩</a></p></li></ol></div>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-88607083053147504672012-02-27T06:42:00.001-08:002012-02-27T06:42:29.283-08:00Converting Shell Scripts into Applications<p>OS X doesn’t allow shell scripts to run as Login Items. Adding a shell script as a login item causes the script to be opened in an editor; not exactly what I had in mind. Login items need to be applications, but how do you convert a shell script into an application? Easy: <a href="http://sveinbjorn.org/platypus">Platypus</a>.</p><p>Platypus is an open source project that packages up scripts as Mac applications. It works with pretty much any scripting language you can think of. It’s a really simple concept and it works well.</p><p>To convert a simple shell script into an application using Platypus you’ll need to follow these steps:</p><ol><li>Enter the name of the application you want to generate. This will be the name of the file and what appears in the Finder, so be as descriptive as you need to be. </li><li>Select the type of script being wrapped and configure any arguments to the interpreter. If you’re wrapping a shell script you won’t need to do this as the default will work just fine.</li><li>Select the path to the script to wrap up as an application either by using the Select button or dragging and dropping the script into the field.</li><li>If the script generates output you might want to configure the output format. If there is no output from the application, or you don’t care about the output you can safely select “None”.</li></ol><p>There are a bunch of other options such as the icon to use for the generated application, additional files to bundle, etc. Since I wanted my application to be used as a Login Item I wanted it to be as unintrusive as possible. The configuration options for my application were:</p><ul><li>Set “Output Type” to “None”.</li><li>Check the “Run with Administrator privileges” checkbox.</li><li>Check the “Run in background” checkbox.</li><li>Uncheck the “Remain running after initial execution” checkbox.</li></ul>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-63671530004551576692012-02-23T06:39:00.001-08:002012-02-27T06:46:22.826-08:00Shell Command to Unmount Volumes<p>I recently decided that I wanted to have a 2nd installation of OS X laying around for testing purposes. Initially I thought of using VMWare Fusion or something similar. Being that my machine only has 4GB of RAM I didn’t think this would make for the best experience in the world so I discounted it.</p><p>The only other option was to either partition my hard drive or use an external drive. External drives are horrendously slow (when compared to the internal SSD of the MacBook Air) and aren’t portable. So partition the hard drive it was. For my own sanity I wanted to keep each of the installations as separate as possible. I really didn’t want each installation to see the other’s data. In a pinch I wrote up a quick shell script that takes care of this problem.</p><p>Here’s the script:</p><blockquote><p>#!/usr/bin</p><p>mount | grep “/dev/” | grep -v “on / ” | awk ‘{ print $1}’ | xargs -n1 diskutil umount</p></blockquote><p>It’s pretty simple when you break it down into its parts. This single command works because the Unix shell allows the output of one command to become the input for the next. Here’s a breakdown of what’s happening:</p><p>The <code>mount</code> command is executed which outputs a bunch of lines, one for each mounted volume. Each line looks similar to the following:</p><blockquote><p>/dev/disk0s2 on / (hfs, local, journaled)</p></blockquote><p>This is saying that the disk <code>/dev/disk0s2</code> is mounted at the root of the file system, <code>/</code>, with the <code>hfs</code>, <code>local</code>, and <code>journal</code>led options. Of these pieces of information all I really care about is the name of the disk. I really just want to isolate the local disks from other disks and file systems. That’s where the first <code>grep</code> command comes in.</p><p>The listing of volume information is used as the input to <code>grep</code>, a program that filters out the lines that don’t match a regular expression. In this case we’re looking for lines that contain <code>/dev/</code> somewhere on them. This initial processing with <code>grep</code> takes care of all of the non-local volumes. But there’s a problem. The system is booted from a local volume. If that volume isn’t filtered out then there will be problems later on. Likely one of the commands will fail. That’s what the 2nd invocation of <code>grep</code> is for.</p><p>The output of the <code>grep</code> command can be inverted so that it will only output lines that <em>do not</em> match a regular expression. Since I wanted the script to be generic, and the device name will be different for each installation I couldn’t filter based on the name. Luckily however, I could just filter out the line that contains the expression <code>on /</code>. The reason I can do that is because the volume that contains the system will always be mounted at the root of the file system. Note here that the expression contains a trailing space; this is important because without it all of the lines would match and therefore there would be no output.</p><p>With the output of the <code>mount</code> command successfully trimmed down to just the lines containing local volumes that aren’t the startup volume I can remove the pieces of information from the lines that I don’t care about. Or, to put it more precisely, just output the data I do care about: the device name. Say hello to <code>awk</code>.</p><p>The <code>awk</code> command is a handy tool that can perform all sorts of manipulations to its input. <code>awk</code> works well in situations where the data being processed is columnar. In the case of the output of <code>mount</code> the data could be considered as space-separated-values with the device name in the first column. In order to get <code>awk</code> to just print out the first column of each record we use the script <code>{ print $1}</code>. If you were to just execute the command pipeline up to the end of the <code>awk</code> command you would see a listing of all of the device names that contain currently mounted volumes that are not the startup volume. The last thing we need to do is unmount them.</p><p>There are several ways to unmount volumes on a Mac. I’ve chosen to use the <code>diskutil</code> command but others I’m sure would work fine. One of the shortcomings of the <code>diskutil</code> command is that it will only allow you to pass a single device name to the umount subcommand. It also expects that the device name will be passed on the command line; it won’t read device names from standard input. That’s where the wonderful and magical <code>xargs</code> command comes in.</p><p><code>xargs</code> takes as arguments a the first part of a command to execute. To that it appends the contents of each line that it reads from standard input. By default <code>xargs</code> tries to batch the data into as few commands as possible but since <code>diskutil</code> will only take a single device name at a time the <code>-n1</code> switch needs to be used. <code>-n1</code> tells xargs to execute the command for each line.</p><p><code>xargs</code> is an amazing command. It took me a while to get my head wrapped around it but once I did it opened up a world of possibilities. It’s the most complicated piece of the pipeline but it’s also the one that makes it work as a single command. Without <code>xargs</code> I would have had to resort to some kind of a loop and variables. That may be easier to read but it’s certainly less concise.</p><p>But this script alone doesn’t solve the problem. It needs to run at login, and that requires a <a href="/2012/02/converting-shell-scripts-into.html">different solution</a>.</p>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-40123682377472697492012-01-23T06:09:00.001-08:002012-01-23T06:09:09.218-08:00Waking Up at 5am to Code: A Response<p>I recently read a post by <a href="http://www.mattgreer.org">Matt Greer</a> titled <a href="http://www.mattgreer.org/post/2fiveam">Waking Up at 5am to code</a>. I’ve been doing something similar for about a year now so I figured I’d post my 2 cents on the matter.</p><h2 id="alittlebackground">A little background</h2><p>Quite some time ago I realized that the amount of time I spent working on personal projects had been greatly diminished. I wanted to spend time working on those projects, but during core waking hours my time was tied up with work and family commitments. I needed to spend time at work during the day on week days, I wanted to spend time during the evening and weekends with my family.</p><p>Since pretty much all of my waking hours were accounted for I thought I’d try getting up earlier. At first I started getting up at 6:00am. That gave me about an hour or so to get some work done. And it worked well for a while, but life changes and so does the family schedule. As a result I started having to get up even earlier: 5:30am.</p><p>Getting up at 5:30am is were I’m at these days. In theory, that gives me a solid 1 1/2 hours to get stuff done in the morning. Reality on the other hand isn’t as optimistic. It usually takes a good 10 minutes for the morning fog to clear. I also have a few small morning chores that need to be done no later than 6:00am. Since I don’t want to interrupt my flow I need to get those done early too; those take an additional 10 minutes. Lastly, in order to make sure everyone is able to get themselves ready and out of the house on time I need to be completely dressed and out of the bathroom (we only have one) by about 7:00am. Figure 15-20 minutes there for the morning routine.</p><p>By the time these taxes are paid my gross working time has gone from 1 1/2 hours down to 50-55 minutes. It can be really demotivating to realize that I don’t even have a full hour to get things done. But on the flip side it can also light a fire to make sure everything that needs to get done gets done.</p><p>I’ve had some success with my morning routine over the past year. It’s been a rocky road, but for the most part I think I’ve done alright. I haven’t produced much, as my desire to work on side projects comes and goes. Having the time set aside does really help though. I know that I’ll have guaranteed time to work on things that I’d like to. But typically that time is spent reading or relaxing; everyone needs down time, and I find that without that morning time I don’t get enough of it.</p><h2 id="forthoseofyoudoingthisorwantingtodothis">For those of you doing this or wanting to do this</h2><p>Ultimately rearranging your schedule can be a fairly disruptive change in your life. The disruptions for myself have been quite minimal, but you need to make sure that those closest to you understand what you’re doing, why you want to do it, and are on board with it. If they aren’t you might start running into some problems. For those considering this kind of change, here are a few pointers:</p><ol><li><p>If you’re up early, people start assuming that you won’t mind doing things for them. This encroaches massively on personal time and can be a real problem. Saying “No” is vitally important to protecting your few precious hours. That being said you can’t always say no. There will always be times when you have to carve off a piece of those hours as needed; just keep those to a minimum.</p></li><li><p>Don’t be militant about getting up early every day. Sometimes you need a break. I find myself sleeping in about 1 day a week. It’s a nice treat, just don’t get used to it.</p></li><li><p>Getting up early also means going to bed earlier. This can be a social problem if you have friends and family that are night owls. Staying up late on their account will only serve to sap your energy for the next morning. Don’t stay up late unless you’re ok with sleeping in the next morning.</p></li><li><p>Always have a plan for what to do the next morning. If you don’t wake up and know exactly what you need to work on or get accomplished you’ll either not want to get out of bed or get up and zone out. Neither of these is desireable; so make sure you have a plan for the next morning.</p></li><li><p>Make sure your work area is comfortable. I’m sure this goes without saying, but having a comfortable, and in the winter warm, work place really helps to motivate you to get out of bed. If the bed is warm and comfortable, why would you want to sit in a cold office in an uncomfortable chair?</p></li></ol>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-16730027763665372312012-01-21T17:24:00.001-08:002012-01-21T17:24:12.936-08:00Mute Switch Bike Sheds<p>A few days ago there was a big kerfuffle about the ring/silence switch on the iPhone. People have been coming out of the woodwork with their thoughts and opinions on the matter. Don’t worry. I’m not going to post my thoughts on the issue here. Yes, I have an opinion, but really what I want to highlight is the debate itself. More importantly, I want to discuss why this is such a polarizing issue.</p><h2 id="butfirstalittlebackground">But first, a little background</h2><p>If you’re reading this post anywhere near the posting date you can safely skip this section.</p><p>During a performance of the New York Philharmonic a very distinctly iPhone ring started to play. It continued making noise for quite some time. Finally the conductor had had enough and stopped the performance to confront whomever had their phone ringing. Unbeknownst to the owner, his phone had an alarm that was set to go off during the performance. He didn’t know about the alarm as he was given the phone just prior to the performance and thought he had set the phone to mute.</p><p>Due to the design of the iPhone, alarms will sound even if the mute<sup id="fnr1-20120121"><a href="#fn1-20120121">1</a></sup> switch is turned to off. Pundits and non-pundits alike have been arguing the finer points of the switch and the design over the past few days.</p><p>Should the mute switch prevent the device from making any noise, or should it make noise for some select or important events? That’s what everyone seems to be focused on. What I’m interested in is: why does everyone have an opinion on this issue?</p><h2 id="whydoeseveryoneandtheirdoghaveanopinion">Why does everyone and their dog have an opinion?</h2><p>The mute switch is a <a href="http://bikeshed.com/">bike shed</a>. No, it’s not literally a bike shed, but as a solution to a problem it is. What is a bike shed problem exactly? A bike shed is a problem that’s reasonably well understood by the common person. Since the problem is well understood everyone feels that they are entitled to an opinion on it. In fact, it’s been said that the amount of noise in the decision making process is inversely proportional to the complexity of the problem.</p><p>From the definition of a bike shed:</p><blockquote><p>Parkinson shows how you can go in to the board of directors and get approval for building a multi-million or even billion dollar atomic power plant, but if you want to build a bike shed you will be tangled up in endless discussions.</p><p>Parkinson explains that this is because an atomic plant is so vast, so expensive and so complicated that people cannot grasp it, and rather than try, they fall back on the assumption that somebody else checked all the details before it got this far. Richard P. Feynmann gives a couple of interesting, and very much to the point, examples relating to Los Alamos in his books.</p><p>A bike shed on the other hand. Anyone can build one of those over a weekend, and still have time to watch the game on TV. So no matter how well prepared, no matter how reasonable you are with your proposal, somebody will seize the chance to show that he is doing his job, that he is paying attention, that he is <em>here</em>.</p></blockquote><p>Since everyone has a stake in how the mute switch on the iPhone should work, and the complexity of the problem is low, everyone has an opinion. Those following the debate will point out that the complexity of this problem is anything <em>but</em> low.</p><p>It’s a difficult problem with no 100% correct solution. Regardless of the choice made by the designers there would be some class of user that the solution was wrong for. However, that won’t stop people from arguing over what colour this bike shed should be.</p><hr /><ol><li id="fn1-20120121">I say mute switch because that’s the common term for it. In actuality it’s call the Ring/Silence switch. The difference between the terms is splitting hairs as far as customers are concerned.<a href="#fnr1-20120121">↩</a></ol>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-77798747175668363592011-12-22T05:50:00.001-08:002012-04-01T22:03:50.474-07:00Twelve South Compass iPad Stand<p>I recently had a chance to try out the Twelve South Compass iPad stand. I’ve had my eye on it for a long time but never had opportunity to give it a test run for myself.</p><h2 id="thepackaging">The Packaging</h2><p>Unlike pretty much every other accessory maker, Twelve South totally nails it when it comes to packaging. They know that the packaging is the first taste of the product that the customer gets. Well designed, tasteful, easy to open packaging gives the customer a glimpse of how much effort they put into designing the product inside.</p><p>In the case of the Compass stand, the package consists of a box containing the stand encased in a plastic shell. The box doesn’t have a lid so the customer can see the stand inside the box through the outer plastic shell. There’s no tape to fuss with, just open the packaging and slide out the box. The Compass sits on a cardboard table in the box and is held in place with white elastic. The fact that they chose to use elastic instead of twist ties is a gift in and of itself.</p><p>Underneath the cardboard table there’s a slipcase. The slipcase is simple and speaks for itself. Under the slipcase is a spartan instruction manual with the sole words “Thank You” emblazened on the front. The instruction manual is fairly short: one page. Simple directions for how to use the stand are included. At the end of the instructions is a whimsical section on some uses for the box that the stand came in.</p><p>These little touches: the easy to open packaging, well designed box, the full front page of the instructions dedicated to thanking the customer, and whimsical instructions aren’t frivolous. They all come together to give the customer a great first experience. Not just a great first experience with the product, but potentially these details serve as an introduction to the company that made them. They exhibit the ethos of the maker: its attention to detail, its gratitude towards customers, and its fun side.</p><p>But enough about the packaging, lets talk about the stand.</p><h2 id="thestand">The Stand</h2><p>The Compass isn’t just an iPad stand, it’s a work of art. The stand is solidly built and feels great. It’s heavier than you’d think for something of its size. The brushed finish nicely matches the finish on Apple’s own hardware making the Compass feel at home with your iPad and MacBook Air.</p><p>When folded up the Compass is very compact; it’s small enough that you could fit it easily in your pocket or bag and hardly know its there — aside from the weight that is. The small carrying pouch for Compass is a nice touch; it protects not only the stand but anything else that might be rattling around with it in your bag.</p><p>The Compass has 2 different modes when unfolded. It can either prop the iPad up like an easel or lay the iPad down at an incline providing for a nice keyboarding surface. When using the Compass as an easel the iPad can sit in either landscape or portrait orientation. In addition, the legs that the iPad stands on are quite a bit longer than needed. The legs being longer means that the compass will work with both iPad 1 and 2, with or without a case. Both of these features make the Compass stand one of the most versatile stands I’ve seen. The versatility coupled with its elegant design, and compact size make for a very compelling and attractive stand.</p><p>Unfortunately, as compelling and attractive as the stand is, it has some problems. The main problem I found with the Compass is that the hinge on the back leg was extremely loose. When handling the stand I had to be careful otherwise it would open up. Putting it in its case could sometimes be troublesome as well. But these are minor inconveniences when compared to the biggest problem with the hinge being loose. After some use the Compass would fold itself up and collapse.</p><p>The rubberized feet on the bottom of the legs, the shallow angle of the back leg, and the loose hinge worked together to produce a perfect storm. Tapping around the center of the screen would cause the front 2 legs of the stand to lift off the table. With all the force in the back leg and the loose hinge the leg would eventually move into a position where it would fold up and collapse onto the table. If the hinge were tighter not only would this not be a problem, but the stand would also feel much higher quality.</p><p>I’m sure they had good reasons for the hinge having as much friction as it does. But a tighter hinge isn’t the only solution. A pin or something similar that holds the back leg in one of two positions would do the trick.</p><p>Ignoring the collapsing issue, I’m not sure that the Compass provides a lot of value if you have and iPad 2 with a Smart Cover. The only thing that the Compass provides over the Smart Cover is the freedom to choose orientation — portait or landscape.</p><h2 id="conclusions">Conclusions</h2><p>While the Compass Stand looks and feels great, but it’s expensive for what benefit you may get out of it. If you have an iPad 2 you likely already have a Smart Cover which provides more value for your money. Regardless, the fact that the stand collapses after moderate tapping is a major problem in my books. </p>Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-1893073750821078902011-11-24T06:50:00.001-08:002011-11-24T06:50:25.670-08:00The iPad HDMI Connector<p>I've been fighting a bit of a cold for the last few days. With a baby and mom that I don't want to give it to I've been sleeping downstairs on our futon. It's actually suprisingly comfortable. But one thing that's been getting tedious over the past few nights is our selection of movies. I usually like to turn on a movie as I wind down for the night, but since our Apple TV with Netflix is upstairs ensconced in the bedroom I've been forced to watch DVDs. As I'm sure you can imagine, its been a while since we've bought any of those, so our selection is pretty thin.</p><p>Seeing as I have a perfectly good iPad and HDMI connector I thought I'd give watching Netflix on the TV using the iPad a shot. The good news is that it works as advertised; you plug it all together, set the input on the TV the voila: your Netflix movie on the TV. The bad news is the decidedly un-Apple-like experience of using the thing.</p><p>To start its ugly, if utilitarian. It connects through the only multipurpose port on the device: the 30-pin connector. The connector is really wide and the HDMI port is offset to one side with a 30-pin connector next to it. This design makes the whole thing feel bigger than it is and awkward. A better design might have been vertically stacking the HDMI and 30-pin connector ports so that there is a closer ratio of size between the two ends of the HDMI connector.</p><p>Thick HDMI cables have a mind of their own in terms of how they bend. Through its own force of will it bends the HDMI connector in all sorts of directions that seem like they'll either break the wires in the connector by twisting them or pull the connector out of the iPad by its weight. I found the contortions of the HDMI connector with a thick HDMI cable to be really worrying.</p><p>If I was trying to use the HDMI connector to mirror the iPad's display for a presention it would certainly feel awkward. But these things don't really matter that much if you're just using the dongle as a way of getting the iPad's screen on to the TV for watching a movie as I was. Once the connector and HDMI cable were connected and the iPad was laying down these issues weren't so bad. But then I ran into another problem: the device cannot be asleep while playing and the Smart Cover has to be open.</p><p>Once you close the Smart Cover or press the sleep/wake button the signal to the TV shuts off. I can see why this is done when you're running on battery; you want to conserve power so if someone has put the iPad to sleep then don't waste power sending the display over the HDMI connector. I get that, but its a horrible user experience in some situations. A better design would have been to just turn off the display if full screen video is playing when the device is put to sleep and the HDMI connector is attached. Then after the video stops playing automatically sleep the whole device after a minute or two. Wouldn't it be better for battery life to allow the display to be off when the user is doing something non-interactive and using the HDMI connector?</p><p>In any case, it did what I needed done so for that I'm thankful. But there are a few design bugs that I think need to be worked out. For an extra $60 you can get an Apple TV that does display mirroring without having to physically attach your iPad to the TV, plus a whole lot more. Either way you go, the iPad has to be awake when the display is mirrored to the TV which is an issue I hope gets addressed in a future release.</p>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-46077715221331899692011-10-31T06:27:00.001-07:002011-10-31T06:27:10.020-07:00SuperDuper! Pro Tip<p>As much as I love my new MacBook Air, the transition to the new machine hasn't been completely seamless. Like any transition to a new computer, there are bound to be hiccups. One of these hiccups was around my backups. Since I take my backups very seriously, this was something that really bothered me until I was able to figure out what was going wrong.</p><p>After migrating all of my data to the new machine I made sure to run SuperDuper! (the best disk cloning software in the universe). It ran perfectly for quite some time but after a few weeks it started to fail by running out of disk space on the backup drive.</p><p>When I first partitioned my backup drive I made the clone parition the same size as the boot drive: 120GB. But the MacBook Air has a larger drive in it, double the size at 250GB. I've been careful to make sure that I don't use more than 120GB on the new machine, so <em>surely</em> the problem wasn't that I was using more space than I should be. Or at least that's what I thought.</p><p>It turns out that Lion comes with some enhancements to Time Machine. Under Lion, if your backup drive is not connected, Time Machine will continue to run. The backups are stored in <code>/.MobileBackups</code> -- a hidden folder at the root of the boot drive. Since this is effectively temporary storage, Lion doesn't report any of the space used by this directory in the Unix <em>disk free</em> or <code>df</code> command or in the Finder. Essentially, Lion hides the fact that it's using this space from you at all. It does this because it will automatically remove old backups to make room for new files written to disk if need be.</p><p>Since SuperDuper! didn't know this it would attempt to copy this directory to the backup drive. Ordinarily this wouldn't be a problem since the clone drive is usually the same size as the drive being cloned. This wasn't the case for me however. After I figured this out I created a new backup script and excluded the <code>/.MobileBackups</code> directory. After applying the changes I haven't had any problems.</p><p>So, if SuperDuper! is complaining about running out of disk space when running on Lion, you might want to either:</p><ol><li>ensure that the size of the drive you're cloning from is the same size as the drive you're cloning to. or;</li><li>exclude <code>/.MobileBackups</code> from your SuperDuper! backup script.</li></ol>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-90149807794034612872011-10-27T05:43:00.001-07:002011-10-27T05:43:57.834-07:00MacBook Air<p>A few months back I bought a new MacBook Air. I absolutely love it, it's the best computer I've ever owned. I'm pretty sure I say that about every new computer I get, but this one is head and shoulders above the rest.</p><p>Upgrades in the past used to be just incremental updates to the processor, memory, and hard drive. This machine has all of that, but what's amazing is how much faster it feels than every other upgrade I've done. It's really no surprise when you think about it.</p><p>There are really only 2 main driving forces that relate to the performance of any application: its use of the procesor, and its use of the hard drive<sup><a href="#1">1</a></sup>. Yes, I'm simplifying here, but typically when you want to optimze a program you need to look at those 2 things.</p><p>When a program uses a lot of processor cycles its said to be CPU-bound. That is, the program's performance is bound by the speed of the processor. Conversely, when a program reads and writes to the hard drive a lot it's said to be I/O bound; the performance of the program is bound by how quickly it can read and write data. Very rarely will you ever see a program that's solely CPU bound or I/O bound. Usually different parts of every program have different performance characteristics.</p><p>So why is it no surprise that the MacBook Air feels so much faster than any other computer I've ever owned? The MacBook Air has a solid state drive. Solid state drives are a new class of storage media. They optimize for speed while sacrificing total size. To give you an example, you can buy a 256GB SSD for roughly the same price as a 4TB spinning rust<sup><a href="#2">2</a></sup> drive. But the speed of these drives is amazing due to how they work. SSDs have more-or-less direct access to any piece of information on the drive. Traditional hard drives have to wait for a spinning platter to come within range of a little arm that can picks the data off the drive. There are physics involved here, traditional hard drives will never be as fast as an SSD, but if you need a lot of storage space you can't go wrong.</p><p>You can get an SSD for pretty much any computer, but at this point they're a fairly expensive upgrade. It's been said before that installing an SSD is just like getting a new computer. And while my MacBook Air is certainly a new computer, it feels amazing every time I use it. It's fast. Faster than anything I've ever used before, and that's mostly thanks to the SSD.</p><p>There's a lot more that can be said about the MacBook Air. It's simple, tossing out things that most people rarely need anymore like DVD drives, FireWire, and extra USB ports. It's ultra lightweight, something that's really nice to have regardless of whether you care about the weight or not. The choices you have to make are pretty minimal; pick a screen size, processor and memory. The price is very reasonable for a premium product. The fit and finish is excellent. All told, the MacBook Air truly is the Volkscomputer.</p><p><small></p><ol><li><a name="1"></a> Yes, I'm simplifying quite a bit here. Performance can also be affected by how much parallel computation a program can do, the layout of the program in memory so that it makes efficient use of the CPU's caches, etc.</li><li><a name="2"></a>The term spinning rust refers to the fact that traditional mechanical hard drives contain rust colored platters that spin. Wikipedia has a <a href="http://en.wikipedia.org/wiki/Hard_disk_drive">great article</a> about how these types of drives work.</li></ol><p></small></p>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-87209330482401667542011-10-02T21:06:00.001-07:002011-10-02T21:06:20.332-07:005 Things You Can Do to Ensure Safety of Your Data and Recoverability of Your Computer<p>In my previous article I described some of the problems with the approach most people use to secure their data. The problems were all essentially the same: security theatre. In this article I'll outline 5 things that you can do to ensure that your data is safe and increase the likelyhood that you'll be able to get your computer returned.</p><p>The advice in this column isn't meant to be prescriptive. Instead, read through the suggestions and make sure that they make sense to you, and for your situation. If you have backups and don't need to be bothered with ensuring the returnabilty of your computer by all means, tighten your machine down. If you're like the rest of us, read on.</p><h2>1. Backup Your Data -- Offsite</h2><p>This one's a no-brainer. Backing up your data is one thing, but making sure that you have a good copy of it off site is another. If someone breaks into your house a backup isn't going to be much good to you if it's sitting on the external hard drive conveniently located next to your computer. It doesn't matter if you use one of those automated off site backup solutions like <a href="http://www.backblaze.com/partner/af2220">Backblaze</a> or <a href="http://www.carbonite.com/en/">Carbonite</a>, or if you use an old fashioned sneakernet like me. Just make sure you have a recent copy of your data off site.</p><h2>2. Make Your Computer as Inviting as Possible</h2><p>If you're used to a higher level of security, this tip might not make a ton of sense. It's true, your computer will be wide open if you do this. While you may want to lock down your computer for the most part, in order to ensure the safe return of your computer you'll want me make it as easy and inviting as possible for a thief to use your computer. If you make it too difficult either they'll never use it, or they'll find someone to wipe it clean so that they can start fresh. If they do the latter you'll never see your data again.</p><p>So what do I mean by "make your computer as inviting as possible"? I mean that you should:</p><ol><li>Set up your account to automatically log in.</li><li>Remove a power-on password</li><li>Remove disk encryption</li></ol><p>By doing these things you'll ensure that anyone that sits down at your computer will be able to use it for whatever purposes they want. It also means that everything on your computer will be wide open to anyone that wants access to it. To fix that you're going to want to:</p><pre><code>1. Lock your keychain
2. Use encrypted disk images
</code></pre><h2>3. Lock your Keychain</h2><p>The Keychain Access application on the Mac is the unsung hero of password management. Applications use it to store credentials for web sites you go to and services you use. The Finder uses it to store passwords for remote file shares, logins for wireless access points, etc. By default the password to unlock your keychain is synchronized with your login password, and the Keychain remains unlocked while you're logged in. These defaults optimize for user experience, not necessarily security. But hey, at least these can be configured.</p><p>To change these settings your going to want to open the Keychain Access application and open its preferences. From the preferences window select the <em>First Aid</em> tab and uncheck the last 2 checkboxes: Set login keychain as default, and Keep login keychain unlocked.</p><p>By changing these settings you will need to enter your password whenever an application wants to access some data within the keychain. This will certainly be more annoying than the default settings, but your passwords and anything else stored in the keychain will remain safe should your computer fall into the wrong hands.</p><h2>4. Use Encrypted Disk Images</h2><p>As I discussed in a <a href="/2011/09/safety-and-security.html">previous post</a>, encrypting your entire hard disk is a one way street. Your data will be safe if your computer gets lost or stolen, but it also means that the computer is completely useless to anyone that finds it. But what if you have sensitive data on your computer? Clearly you want that data to be secure, you just don't want blanket security across the entire hard drive. That's where encrypted disk images come in.</p><p>Disk Utility will allow you to create encrypted disk images to store any sensitive data. You can make them virtually any size you want, and use either 128- or 256-bit AES encryption. As of later releases of Mac OS X you can also use a sparse image format. Sparse formats allow you to create a disk of virtually any size, but it will only take up as much physical space on disk as the files that are contained within it. For example if you had a 500MB sparse image but only put 50MB of data in it, the image on disk would only be about 50MB. The best format to use a whole other discussion. But for our purposes, it doesn't matter which one you pick, just make sure its encrypted.</p><p>Once you have an encrypted disk image you can then store all of your files within the image. Images can be configured to be mounted automatically upon login by adding them as a login item, but if you don't need to access those files very frequently, its best to leave the images un-mounted until they're needed.</p><p>With all of your sensitive data stored in encrypted disk images you can be assured that your data will be safe if your computer gets lost or stolen.</p><h2>5. Install a Snooping Tool</h2><p>Lastly, to have any hope of getting a stolen computer back, you're best bet is to install a snooping tool. These tools take screen shots and pictures with a computer's camera, report location and IP information, and do many other things to snoop on a thief or help get your computer back. An excellent and free tool that does this is <a href="http://preyproject.com/">Prey</a>.</p><p>Once installed, Prey sits idle until you log into the web site to report your computer as lost or stolen. From there you can configure it to snoop on the thief at selected intervals. By using information gathered by Prey and the help of police many people have been able to retrieve their stolen computer.</p>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-4279981913246273142011-09-25T22:41:00.001-07:002011-09-25T22:41:01.070-07:00Safety and Security<p>It occurred to me recently that if someone were to steal a computer there are really 2 things the victim needs to think about: the privacy of their data, and whether or not they'll be able to get their computer back. These goals aren't entirely opposed, but it does require a little bit of work in order to have it both ways.</p><p>There are lots of choices available to ensure the privacy of your data. You can use a power-on password to prevent the machine from being booted without the correct password. This is a fairly good trade off between a hassle for you and protection, but it does have some serious flaws. Using a power-on password doesn't actually do anything other than the name implies. The data on the disk is still unencrypted. If someone wants to get at the data, they can simply put the hard drive in another machine and have free range access to anything on the disk. A power-on password will just make the machine less valuable to the average thief, but they won't know that until after they've taken it.</p><p>Another option is to leave the machine without a power-on password but instead password protect your account. In this scenario, the computer will boot into the OS, but will not allow anyone to use it without first logging in. The only difference between account passwords and power-on passwords is that it requires the password later. Account passwords have a side benefit in that if you forget your password you can re-install the OS and retain all of the user files from the previous install. Your data isn't safe; someone can put the hard drive into another machine to get access to your information. But it does make the machine slightly less valuable. And as with power-on passwords they won't know until after they've taken it.</p><p>These solutions are all privacy theatre; they appear to protect your data when in actuallity your data is still unsafe, just more difficult to access. As any security expert<a href="#1"><sup>1</sup></a> will tell you, security through obscurity is not security. The only true way to protect your data is to encrypt it. Most operating systems support some for of full disk encryption, whether its built into the operating system ala Mac OS X Lion, or provided by a 3rd party with PGP. Full disk encryption does what the name implies. It encrypts the entire contents of the disk. If someone was to take the encrypted disk from one computer and put it into another, the contents of the disk would still be inaccessible without a password. This is about your only option in terms of ensuring the privacy of your data.</p><p>But this is all for naught if you need your data and your computer gets stolen. It doesn't matter how private your data is if you'll never see it again<a href="#2"><sup>2</sup></a>. If you've got <a href="/2011/03/my-backup-strategy.html">a backup strategy</a> then at least your data will be safe, but computers aren't cheap and if you're like me, you'd like to get it back<a href="#3"><sup>3</sup></a>. So what can you do to protect your data and help to ensure that you get your computer back if it gets stolen?</p><p>That's a good question, worthy of its own post. Come back next week to find out.</p><p><small></p><ol><li><a name="1"></a>Is there really such a thing as a security expert?</li><li><a name="2"></a>It does matter since all of your secrets will remain secrets. But if you're storing that data it's likely that you need it.</li><li><a name="3"></a>Really, I'm not sure I'd want</li></ol><p></small></p>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-81606392872725745252011-08-13T06:35:00.001-07:002011-08-13T06:35:03.968-07:00Starting a New Project<p>I'm between personal projects right now. I don't have any ideas for interesting applications or libraries to write, so I've been doing a lot of thinking. I've come to the conclusion that when starting a new project, there's simply too much room for choice. I don't think I'm alone in feeling this way, but I'm convinced that it's not a problem most developers experience.</p><p>There's only one reason anyone starts a new project: to solve a problem. The average developer doesn't need to look much further than their known solution domain to start their new project. They have one language and some libraries that they're comfortable with and they forge the solution using them, not pausing to think about whether the tools are the right fit for the solution.</p><p>Thinking about whether the tools are right for the job is something that more senior developers tend consider. They tend to think about their craft in way different from other developers. Through experience they've developed a spidey-sense about how well tools and solutions work together, and when that spidey-sense starts tingling they can look back one their experience to find a set of tools that will work well for the solution, or at least something that they know will work.</p><p>The problem I think I'm running into is that, while I think I've developed that spidey-sense, I'm not satisfied with any of the tools I have for something so personal as a project to call my own. Sure, I can look at my experience and pull out some tools to get the job done, but I also want to enjoy the experience. So what's a guy to do when he's unhappy with all of the tools he has? Start learning how to use some new ones.</p><p>When I speak of tools I don't mean just frameworks and libraries, languages are tools too. They define what you can do and how you can do it. None of the languages I know feel right for me. They're all too constricting, or inconsistent, or too new, or too complicated etc. As for frameworks and libraries: there's just too many of them, and most of them have the same afflictions. Supposing that I do find a language and framework that I like there's always nagging question of where the holes are. Usually these tools were written for a specific need. Once that need was addressed they didn't develop it further, and therefore there will be things that I want to do that either just aren't possible or are only possible with herculean efforts. Neither of these is what I would consider a good time.</p><p>Unfortunately, near as I can tell I have 2 choices. Either go with the status quo or blindly forge ahead into the unknown with tools and languages that I don't know. The former while boring is less frustrating. I know I'll be able to accomplish whatever I want to accomplish. I may not have the best time doing it, and I probably won't learn much of anything. But at least I'll have produced what I set out to produce. The latter offers no guarantees. I might succeed in accomplishing what I set out to do, or I might not. I might enjoy the experience, or I might not. At least with the latter I'll learn something new, which definitely counts for something.</p><p>So where do I go from here? While waiting for an idea to pop into my head I've started going through the <a href="http://rubykoans.com/">Ruby Koans</a>. After that I'll have to take a look at Scala. Maybe inspiration will strike, maybe it won't. But at least I'll have a deeper pool of knowledge to pull from when inspiration does strike.</p>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-47820758159686971632011-05-11T07:15:00.001-07:002011-05-11T07:15:27.733-07:00The JavaScript Curse<p>There are 2 fundamentally opposing approaches to programming language design: large and small. Large languages have lots of features, most of which will include some sort of syntax. As the language gets larger, so too does the syntax. This means that there can be a lot of memorization involved for the programmer. In extreme cases (C++) no one really uses the entire language. Instead everyone uses their own subset that they’re comfortable with. One nice thing about large languages is that they have codified a way of performing certain tasks. For example: there is a single way to define a class. There are only a handful of ways to loop over a list or branch.</p><p>Small languages by contrast are very spartan in terms of their syntax, but this by no means affects what the language is capable of. Small language designers tend to pull in very few, but few powerful features that can be combined in numerous ways. Since the language is so small everyone tends to use all of it. However, there is such a thing as too much power. While larger languages have a chosen and blessed way of performing certain fundamental tasks small languages do not. Instead each developer comes up with their own way of doing things. This is the crux of the <a href="http://www.winestockwebdesign.com/Essays/Lisp_Curse.html">Lisp Curse</a>.</p><blockquote><p>Lisp is so powerful that problems which are technical issues in other programming languages are social issues in Lisp.</p></blockquote><p>I posit that this same curse affects JavaScript, however the penalty for this curse isn’t nearly as high in JavaScript as it is in Lisp. Before I explain why I think that, let me first try to convince you that JavaScript is also affected by the curse.</p><h2 id="classesvsprototypes">Classes vs Prototypes</h2><p>JavaScript took a different approach when it came to designing its object system. Unlike most other object-oriented languages JavaScript uses prototypal inheritance instead of the more common class-based model. We could argue until we’re blue in the face about which is better or more expressive, but that’s not the point. Developers weren’t happy with this model. And so, since the language is extremely malleable and the effort required to implement class-based inheritance is minimal everyone and their dog rolled their own.</p><p>Now we have a fractured situation. Every JavaScript library has their own prescriptive way of doing inheritance. Learning a new library is no longer about learning an API, now you have to learn an object system and its library-specific syntax too. Granted, all of the different syntaxes are made of the common building blocks present in JavaScript, but how they’re assembled is generally quite different. The issue of how-do-I-write-a-class is now a social issue since how you do it depends on the library you or your company decides to work with.</p><h2 id="concurrency">Concurrency</h2><p>JavaScript is a single threaded language. This means there is only ever a single thread of JavaScript code running at a time. Some might consider this a good thing, I know I do. It makes JavaScript programs easier to reason about since you don’t have to worry about dead locks, race conditions or much of the complexities of writing a multi-threaded program. This also means that it needs a strategy for performing long running operations “in the background.”</p><p>In the context of a web browser, a typical long running operation would be using the XMLHttpRequest object to make an HTTP request. Due to network conditions or response size the amount of time it takes to make a request and get a response varies. If this were done in a single thread as a blocking call the JavaScript thread would pause until the response was received. This in turn means that the browser’s UI thread would block as well. Effectively it would look to the user as if the browser had hung. The solution to this problem is to perform the request asynchronously (hence the first A in AJAX – Asynchronous JavaScript And XML).</p><p>Asynchronous requests work by registering a callback and performing the operation in another OS thread. Given the restrictions of the language this implies that the asynchronous call is done by a native component (XMLHttpRequest). When the operation is complete or something interesting happens the a call to the callback is issued. This more or less works well. But cracks start to appear when you need to chain asynchronous operations together or perform several operations concurrently and proceed when they all complete.</p><p>In my experience this is something that happens quite often when writing programs in node.js. At least, when you’re doing asynchronous I/O with node.js. The language itself gives you no help at all. Instead you need to either handle the complexity yourself or use a library that someone else built. While this is not a trivial as implementing classes, it’s a fairly well understood problem and a library can be written if fairly short order. As with classes, this issue which should be addressed at the language level ends up being addressed at the library level, which in turn becomes a social issue.</p><h2 id="thewayforward">The Way Forward</h2><p>Hopefully I’ve convinced you that JavaScript has at least a few problems. The language is extremely powerful in terms of its capabilities. But some of the fundamental building blocks that are needed or expected aren’t present. And due to the power of the language, developers can and go off and write the pieces that they’re missing.</p><p>This effort at the library level, while fun and impressive, is ultimately not productive. Every body either writes their own library or uses an existing one leading to fragmentation. Since there a hundreds of different libraries for doing essentially something that should have been provided at the language level, the language suffers.</p><p>This is similar to the Lisp Curse in that the power of the language enables developers to do this sort of thing. The language can be tailored to the needs of the developer or software under development. While this was a curse for Lisp which lead to its niche status, the same fate will not befall JavaScript.</p><p>There were several issues that lead to Lisp’s downfall, but the biggest one, aside from having too much power, was the ability for developers to switch platforms. Developers could retreat to another language that better suited their needs. They could do this because Lisp works at the machine level. Programs developed in Lisp are compiled directly into machine code. This effectively puts Lisp on the same footing as C, C++, and other native languages. With JavaScript this isn’t the case.</p><p>JavaScript is the native language of the web. To compare, writing in JavaScript is akin to writing in assembler. There isn’t a level below JavaScript that a web developer can write to. It goes without saying that JavaScript as a language is fairly stagnant. Sure, the mailing lists are quite active, and Mozilla is incorporating new features from the standards body. But ultimately there is a several year delay on the wide spread use of these language features. Older browsers that are still in use and supported don’t get these updates. As a result, developers tend to aim for the lower common denominator. In order to get a more modern language there is only one way to go: up.</p><p>Languages and tools have started to emerge over the past few years that allow developers to write code for the web in languages other than JavaScript. <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a>, <a href="http://jashkenas.github.com/coffee-script/">CoffeeScript</a>, <a href="http://cappuccino.org/">Objective-J</a> are a few examples. These languages treat JavaScript as their target, much like a traditional compiler would treat assembler or machine code. But why are these new languages croping up instead of enhancements to JavaScript? I think it goes without saying</p><p>So while the Lisp Curse was fatal to Lisp, it is simply a nuisance that most developers have to deal with. For a few there are languages that compile down into JavaScript that can provide the missing features that we’ve all come to expect from a modern language. But, as I’ll discuss in a later post, these present their own issues.</p>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-48288039561515635272011-03-10T06:45:00.001-08:002011-03-10T06:45:05.415-08:00Xcode 4 Features Single Window Interface, new Price Tag<p>Yesterday afternoon a noticed a big storm of tweets about Xcode 4. One in particular caught my interest:</p><blockquote><p><a href="https://twitter.com/jimroepcke/status/45579474577801217">@JimRoepcke</a> Can you imagine being a Mac App Store Reviewer, looking at your queue and seeing Xcode 4?</p></blockquote><p>At first I figured it was just a thought experiment but a few minutes later I started seeing more tweets about Xcode 4 and Mac App Store. Since the Developer Preview for Lion was sent out through the store I put 2-and-2 together and figured that Xcode 4 was finally released. What I found out shortly there after is that you now have to pay for it.</p><p>That's right, Apple now charges for its developer tools. The whopping 4.6GB (that's giga, with a G) is $4.99. Naturally, this set <a href="http://www.reddit.com/r/programming/comments/g0o01/xcode_4_is_out_new_features_a_price_tag/">Reddit</a>, <a href="http://news.ycombinator.com/item?id=2306289">Hacker News</a> and my <a href="http://twitter.com/bryan_kyle">Twitter feed</a> on fire.</p><p>Now, I'm not opposed to paying for developer tools. Back in the day I used to do a lot of development on Windows. I went through several versions of Delphi (best language evar) and numerous editions of Visual Studio. The price though, $4.99? What's that about?</p><p>After a few minutes of thought a tweeted that the price seemed too low to offset the bandwidth costs. But bandwidth costs aren't what this is about. Neither is offsetting the cost of development for that matter. Remember a few years back when iPod Touch owners were charged a nominal fee to upgrade to a later version of iOS 3.0? After some thought I'm guessing that the same thing is happening again. And like the iOS on iPod Touch, later versions of Xcode will probably not cost anything.</p><p>Putting the precedent of iOS 3.0 aside, Apple has come out on several occasions and touted that they give away all the same tools to build apps that they themselves use. This has been a big point for them in the past and it's unlikely that they'd want to make a change now. Granted, Apple has been known to change its mind, and make decisions that are in its best interests. But $4.99 is too low of a price to charge if their planning on breaking even. Especially when you look at the fact that Google gives away all of the development tools for Android -- a platform that currently has more market share.</p><p>No, I'm pretty sure that this isn't a money grab. It's probably just a blip required by the bean counters.</p>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-42919447593109877222011-03-08T00:21:00.001-08:002011-03-08T09:09:07.196-08:00My Backup Strategy<p>Both my wife and I have suffered through a catastrophic hard drive failure in
the past. Neither of us really enjoyed losing irreplaceable photos or countless
hours trying to piece back together our digital lives. Since then, we've
learned our lesson and took a few steps to reduce the likelihood of ever going
through that again. So what exactly did we do? In short, we've started
applying the <a href="http://www.dpbestflow.org/backup/backup-overview#321">3-2-1 backup rule</a>:</p><blockquote><p>We recommend keeping 3 copies of any important file (a primary and two
backups) We recommend having the files on 2 different media types (such as
hard drive and optical media), to protect against different types of hazards.
1 copy should be stored offsite (or at least offline).</p></blockquote><h2>The Hardware</h2><p>Recently I bought 2 1TB hard drives. I opted for the <a href="http://www.wdc.com/en/products/products.aspx?id=120">Western Digital Caviar Green</a>. They offered a decent amount of size and performance for the price. An added benefit of these drives is that they're fairly quiet and turn themselves off when they aren't in use. For drives that are only in use sporadically throughout the day these were perfect.</p><p>To hold these drives, I first considered using a SATA drive dock. However, being a Mac user I prefer the things on my desk to be well designed and look great. I had a really hard time finding a dock that met my standards. Design concerns aside, I've got a few cats that like to walk all over my desk. I'm not sure that having exposed electronics would be such a good idea. Moreover, I also needed a safe place to store the drive that wasn't in use. Hard cases do exist, but NCIX, the place I ordered my backup stuff from didn't sell any -- yet another nail in the SATA dock coffin.</p><p>Instead, I opted to get a few enclosures by <a href="http://www.macally.com/EN/Product/Homes.asp">Macally</a> -- the <a href="http://www.macally.com/EN/Product/ipod4show.asp?ArticleID=255">G-S350SUAB</a> to be precise. These enclosures look just like tiny Mac Pro towers. Being made of aluminum they don't require any fans to keep quiet, and since the tolerances are fairly tight they don't rattle when the drive spins up.</p><h2>The Software</h2><p>I sliced up each of the drives into 3 partitions: a 120GB, 240GB, and 640GB.</p><p>The 120GB partition is the same size as the internal drive in my MacBook Pro and is used as a clone of the internal drive -- cloned with <a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html">SuperDuper!</a> an awesome tool for cloning drives for the Mac. Having a clone means that I don't need to go to the trouble of replacing the internal drive, installing the OS, and restoring data immediately. All I need to do is reboot off of the clone and I'm up and running with a fairly recent backup. However, just having a clone isn't enough. Typically cloning takes a long time to run and therefore is done less often. In my case it's done nightly but sometimes I'll go a few days without running it.</p><p>With the 240GB partition I use Time Machine. Every hour or so Time Machine will make an incremental backup of what's on my Mac. Having this partition be larger than the internal drive means that I can keep several revisions of files in case I need to restore old versions or deleted files. Incremental backup decreases the mean time between backups. I can't boot off of the Time Machine backup, but the number of files changed since the last clone will probably be small and can be restored to the clone if need be.</p><p>The last partition, large partition stores archived data -- photos, music, old projects, etc. Stuff that I don't need to work with regularly. The archived files on this partition are cloned from a Time Capsule I have running on the network (2 copies of everything, remember).</p><p>In order to get the offline side of the 3-2-1 backup I swap out the hard drives once a week. If the house were to burn down, or someone stole everything the most I'd be out is a week's worth of work. And since most of my work is stored in <a href="http://db.tt/FAo6Cjy">Dropbox</a> anyway it's likely that I'd lose less than that.</p><h2>Weaknesses and Pain Points</h2><p>So far this strategy is working fairly well. It can be a pain to have to swap the drives but since I only have to do this once a week the pain is tolerable. I could have opted for an online storage system like <a href="http://www.carbonite.com/">Carbonite</a> or <a href="http://www.crashplan.com/">Crashplan</a> but decided that I wanted to do the whole thing myself without worrying about long restore operations, monthly fees, or feeling socially obligated to host someone else's backup. This does mean, however, that if there were an earthquake and the city was levelled I'd lose my data but I'm pretty sure that my data would be the last thing I'd be thinking of if that were to happen.</p><p>Time Machine automatically remembers some identifying information about the drive used as the backup drive. When I do my weekly swap I have to force Time Machine to do an initial backup. This prompts Time Machine to warn me that I might be backing up to another drive and performs a fairly long scan and backup on that first hit. It doesn't back up every file, it's still smart about just backing-up the files that have changed, so it's not as bad as it could be.</p><h2>Conclusion</h2><p>In the end I'm fairly happy with my backup plan. It's not perfect, but I feel safe knowing that my data is well protected and that the chance of me losing all of my and my families important data is low.</p>Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-71476457670500663142011-02-13T07:11:00.001-08:002011-02-13T07:11:13.803-08:00Scripting Inkscape<h2>tl;dr</h2><pre><code>$INKSCAPE/Contents/Resources/bin/inkscape in.svg -e out.png -D -h 100 -w 100
</code></pre><hr/><p>SVGs, like all other vector graphics formats are scalable and work well for any
sort of graphic that needs to scale well to different resolutions. So if you
have an image that needs to displayed at many different sizes vector graphics
are a good bet.</p><p>Vector graphics take much more overhead to render than do raster images. Since
raster graphics are simply an array of bytes in memory that represent each pixel
of the image they are relatively simple for a computer to perform operations on.
Vector graphics on the other hand are usually stored as a series of drawing
operations: draw a rectangle, fill it with a gradient, clip it with circle, etc.
Because these operations have to be executed in order, sometimes drawing over
the same pixels a few times they can be slower. Hence, vector graphics
applications, such as Inkscape, have a rasterizer in them that takes the output
of the SVG and converts it into a raster image. You might think of a vector
graphic as a recipe, or the source code, for a raster graphic.</p><p>Using Inkscape to rasterize images can be a chore since you have to open
manually adjust the size of the output graphic and filename for each different
size that you want to generate. Luckily inkscape includes a command line
rasterizer that you can script!</p><p>On the Mac, the actual executable is within the Inkscape.app bundle in
Contents/Resources/bin/inkscape. You can invoke it from the terminal with
options to control the height and width of the output graphic, it's name as well
as a few other options. Running <code>inkscape --help</code> will list all of the
available options. The ones we're concerned with are: <code>-e</code>, <code>-C/-D</code>, <code>-h</code>, and
<code>-w</code>. <code>-C</code> is used when you want to export the drawing and <code>-D</code> when you want
to export the entire page. The difference between the two being that exporting
the page will export everything including white space around your drawing and
exporting the drawing will trigger Inkscape to find the smallest rectangle that
includes everything you've drawn (which might be smaller than the page) and
export that.</p><p>To export the drawing contained in "Scenery.svg" to a 100x100 PNG called
"Scenery.png" you would use the following command in Terminal:</p><pre><code>$INKSCAPE/Contents/Resources/bin/inkscape Scenery.svg -e Scenery.png -D -h 100 -w 100
</code></pre><p>Where <code>$INKSCAPE-APP</code> is the location of Inkscape.app.</p><p>Since rasterizing SVGs is something you might be doing frequently you can always
write a script to run the above command with different sizes and output names.
If you want to get fancy you could even automate the process using Make or
another build tool.</p>
Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.comtag:blogger.com,1999:blog-6201102787326924156.post-9345871597231208812010-11-18T22:33:00.001-08:002010-11-18T22:34:57.218-08:00The Playbook<p>RIM recently released a <a href="http://www.youtube.com/watch?v=s72rGDUn2uo&feature=player_embedded">video</a> "previewing some of the cool stuff [they're] doing with the Blackberry Playbook browser." From the video, it certainly looks like the Playbook wipes the floor with the iPad. It loads pages faster. It supports "dynamic" content, by which they mean Adobe Flash. It passes the ACID3 test. Of course the video is incredible, they'd be fools to release a video that wasn't. But after thinking about it for a little while, I came to the realization that it wasn't really that amazing at all.</p><p>This video is showing a speed comparison between 2 devices. Yes, they're both tablets but it's not really a fair comparison. The iPad has been shipping to customers for about a year. Since Apple doesn't rev the hardware between releases that makes the hardware at least a year old, if not older. As for the Playbook, there's no official release date yet. All we've so far is early 2011, which means sometime between January and March. Assuming that the Playbook's hardware specs have been nailed down, the video is comparing a brand new device with one that's a year old. Of course the new one's going to be faster, no surprise there.</p><p>The sites that RIM picked for the demo were obviously not chosen at random. Clearly these were sites that they knew would show off the features of the Playbook. Almost any site would loaded faster and performed better on the Playbook given that it's newer. Similarly, the Playbook claims that it has better ACID compliance than the iPad. Both devices, as far as I know, use WebKit. Safari on the iPad is just using an older version of it. Maybe we'll see better ACID compliance out of Safari on iOS 4.2 which should be released in the next week or so.</p><p>While the video was certainly impressive at first glance, after some thought it's really not that amazing at all. In fact, it leaves a lot of open questions. What's the battery life like on the Playbook? Sure the device appears faster and supports flash, but if you can only use it for a few hours what's the point? How smooth is the UI? Where are the Apps? I'm sure RIM has a good answer for all of these questions, I just wish they'd stop releasing marketing material and just ship the damn thing and let it stand for itself.</p>Bryan Kylehttp://www.blogger.com/profile/00203916547608565106noreply@blogger.com