Thanks, Steve
Today is a sad day, as the industry lost a great leader. It is upsetting to imagine what contributions Steve Jobs may have made in the next 20 years if he had not lost his battle with cancer. His vision for democratizing technology by putting a computer on your desk, and later, in your pocket has undoubtedly changed the course of human history.
Thanks, Steve, for reminding us to ask ourselves if we love what we do, and not to settle.
Putting an SSD in my MacBook Pro
I decided to dip my toes into the SSD waters, however I was not ready to outlay more than a few hundred dollars yet. So I decided to go the hybrid route of having both a solid state and a spinning disk. This meant getting rid of my optical drive. Luckily, there are kits to do this. I purchased a data doubler kit from OWC, picking the 120GB Mercury Electra 6G, even though my MBP only has a 3G SATA interface. My MBP is a mid 2010 model, the MacBook Pro 6,2.
The upgrade process is straightforward, although a little tedious. There’s about a dozen screws, and a few fragile ribbon cables that you don’t want to break. Unfortunately, I ended up doing the process twice. I initially removed the optical drive and mounted the SSD in its place. Unfortunately, OS X (or the hardware) does not appear to like for the SSD to be in this position on the SATA bus. Partitioning with Disk Utility would come up with errors and just general funkiness. Contacting OWC support confirmed my suspicion that I should have put the SSD where the HDD was, and move the HDD to the optical drive’s position. After taking things apart again, and moving things around, I haven’t encountered any issues.
In order to take advantage of the SSD, but aware of the size limitations, I decided to follow Matt Gemmell’s recommendations regarding arrangement of system & user directories. In my case, I’ve symlinked my Downloads, Movies, Pictures, and iTunes Media directories onto the HDD. I’ve kept my Desktop, Documents, Library and project workspaces on the SSD. After doing so, I’m still sitting at about 48GB free on the SSD. So far, it is working out great.
One thing I ran into today was the need to copy some photos off of an optical disc. We have other machines, so the obvious answer was to copy them from another machine. But I wanted to use the Remote Disc feature of OS X feature. However, it didn’t appear to be possible from my MBP. I enabled disc sharing on the remote mac, and ran the following commands, as found from a post on MacWorld:
playa:~ jay$ defaults write com.apple.NetworkBrowser EnableODiskBrowsing -bool true
playa:~ jay$ defaults write com.apple.NetworkBrowser ODSSupported -bool true
After this, I logged out and back into my account and a Remote Disc entry showed up in Finder. You may be able to just restart Finder as well to get it to show up. The Remote Disc feature then worked as I expected.
Having the SSD gives obvious performance boosts. The install of Lion took 6-7 minutes. Startups are considerably faster, as well as the time to login. Overall, it would be hard to go back. Hopefully the SSD does not fail, which is one reason (other than cost) that I put off doing this.
HTML5/Canvas
I’ve been playing with html5/canvas recently, and I do believe this will kill off Flash player eventually. It is still early though, and a lot of things are hard to do currently. I bet in a year though, there will be a ton of frameworks to make this much easier. Even Adobe with their ‘export to html5′ feature in CS5 knows this is coming.
One feature that is currently lacking in canvas is text rendering (fillText). It is just missing completely in Mobile Safari right now. And when it does work on desktop browsers, it doesn’t look so hot.
As for IE, I began my experiments using the explorer-canvas library (vml), but soon shifted to using fxcanvas (flash). Performance reasons drove me to do this, as well as it supporting more of the API. The project appears to be a bit more active, and even just today it has a new major release I need to try.
It may take awhile for more complex flash apps to migrate to html5, but for simpler things like charts & graphs, it seems to be a no-brainer to start converting.
Apple Push Notification Service & Java
If you look at the documentation for APNS, it is relatively straightforward. The main thing that is probably new to many Java developers is setting up the SSL connection.
Assuming you have followed the documentation from Apple, you should have a certificate for your Push App, as well as a private key. Export each of these individually into a ‘p12′ file, then cat them together. Not sure if order matters here, I put the certificate first.
KeyStore keyStore = KeyStore.getInstance("PKCS12");
keyStore.load(getClass().getResourceAsStream(P12FILE), KEYPASS.toCharArray())
KeyManagerFactory keyMgrFactory = KeyManagerFactory.getInstance("SunX509");
keyMgrFactory.init(keyStore, KEYPASS.toCharArray());
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(keyMgrFactory.getKeyManagers(), null, null);
sslSocketFactory = sslContext.getSocketFactory();
sslSocket = (SSLSocket)sslSocketFactory.createSocket(HOST, PORT);
def cipherSuites = sslSocket.getSupportedCipherSuites();
sslSocket.setEnabledCipherSuites(cipherSuites);
sslSocket.startHandshake();
After this, you can grab the output stream of the socket and write to it. This is what works for me, of course there’s more to managing the socket, but this is the part that was not entirely obvious. You still have to encode your bytes correctly; the service is not very forgiving if you do it wrong. And without any response, you need to pay close attention to what you’re doing!
Demanding a faster horse
Apple definitely has success at developing organic growth, and a lot of that has to do with Jonathan Ive, at least when looking from the outside. In this blog post, the following excerpt jumps out at me. It really captures what frustrates me about working on enterprise software in a corporate environment.
“We don’t do focus groups,” Ive said firmly when asked how Apple decided what products to build. He explained that focus groups resulted in bland products designed not to offend anyone. (To which Sir Christopher added Henry Ford’s famous line that if he’d asked his customers what they wanted, they would have demanded a faster horse.)
The approach of cramming every feature possible into a piece of software is something I’m quite familiar with. When will companies start realizing they should be focusing more on what features to throw out?
Bad Branding
Whoever decided that Bank of America’s logo should appear atop a red background should be fired.
Unless they are preparing us for another version of the logo with white text, I don’t see why they went and did that. The new signs are ugly, and I honestly thought their sign installers made a mistake. Blue on top of red is just bad.
Macbook upgrades
My black Macbook is about 2 years old, and Apple says it is limited to 2GB of memory. However, unofficially it recognizes 3GB. I’ve been running with 3GB for over a month now without any problems.
Upgrading the memory is a breeze. You take out the battery, loosen 3 captive screws, and the memory slots are behind a metal strip. In addition to the memory, I upgraded to a 7200 RPM 320GB hard drive. Click the photo to link to several photos documenting the upgrade steps.