iPhone 3.0 upgrade from beta 5 to final
For the past few months, I have been running the iPhone OS 3.0 betas on my iPhone without too many issues. Thus I assumed that when the final version of OS 3 was released, it would be easy to upgrade to it. This has not been the case. The current beta on my iPhone was beta 5, and then yesterday when the final version was announced, I assumed after a simple plug in to iTunes, I would be upgraded to the released version. Nope, iTunes kept telling me that I have the latest version of iPhone OS 3. It seems as though it is not checking the build number, only the OS level. The next thing I tried was doing a restore, this didn’t work either because it gave me an error saying it could not connect to the site to download the file.
Finally, after some Googling around, I found that others with the same problem circumvented it by putting their iPhone in recovery mode and then upgrading from there.
If you are currently running beta 5, you were supposed to upgrade to the GM version posted last week. I skipped it thinking their would be another release in the next few days with the final version. I have now learned that the GM version is the same as the final version. Unfortunately, now it is too late to download the GM from the developer website, as Apple has taken it down, and according to their documentation, you should obtain the final version through iTunes. Thus if you are in the same boat as me, on beta 5, you will have to install the latest version via recovery mode.
Easy Upgrades
Who doesn’t like easy upgrades? Easy upgrades are great when implemented correctly. There are two speciifiic easy upgrades I have been (enjoying) using recently, namely, Wordpress and Ubuntu Server.
This blog has been powered by Wordpress for a long time, and has been upgraded many times along the way. Download the latest tgz file, unzip it, save your wp-content directory, upgrade your database, and then you are good to go. Keep in mind this was a very simple procedure, as they call it their “famous 5-minute installation”, which it typically was.
Once upgrading to 1.7, the procedure became as easy as clicking a link on the admin page, and stepping through a wizzard This blog is now running 1.8, so it has been through several automatic upgrades already, and each one of them has been completely boring, which when talking about upgrading an environment, is a very good thing. This magic does not only apply to upgrading the entire platform, as you can automatically upgrade your plugins as well.
Many years ago I set up several Ubuntu Gutsy Gibbon (7.10) Servers in my basement to serve different purposes on my internal network. These servers have been running without issue for the past 2 years. They would probably run seamlessly for another 2 years, but unfortunately, I needed to install a new package that didn’t have a deb available for the current version of Ubuntu. At first I was trying to find ways around this, installing the sources instead, but that didn’t work well for me, as it needed a newer version of a dependent library. Even considered trying a different software package, but it seemed like all of the software packages I was trying to install, required a newer version of Ubuntu.
What was I left to do? Either upgrade or rebuild from scratch. Based on past experiences with other distros, upgrades have been nothing but headaches for me. Since, I really didn’t want to invest the time to rebuild the server from scratch, decided to try my first Ubuntu upgrade. Again, based on my past experiences, I assumed I needed to download the media, and then hook up a monitor to the server, and finally go through a set of upgrade screens.
To my delight, after a little bit of research I found that you can do the entire upgrade from the command line, no user interface required, no media download required, no monitor required! This was too good to be true right? Well, no. I ran the do-release-upgrade command, and now my server is running Hardy Heron (8.04). Couldn’t be any easier. Ubuntu’s upgrade infrastructure is very impressive.
What is the moral of the story? If you want to build a loyal user community, treat the members of the community well by providing them with an easy upgrade path.
Scala reduceLeft
As you know, during the past few weeks (time permitting), I have been spending time studying the Scala programming language. After reading the first few chapters of Programming In Scala, I have come across the first feature of Scala that would have been totally useful for me on one of my Java programming tasks a few months ago.
The actual programming task was quite complex, but for the purposes of this post, we will work with a dramatically simplified example. The simplified task is: given a list of Stocks figure out which one has the highest earnings per share.
Here is one way the problem can be solved in Scala:
class Stock(ticker:String, earnings:Double, shares:Int) {
override def toString = ticker + " has eps of: " + eps
def eps = earnings / shares
def > (that: Stock):Boolean = {eps > that.eps}
}
val portfolio = List(
new Stock("aapl",4.73E9, 878876000),
new Stock("ibm",1.23E10, 1384331000),
new Stock("goog",4.19E9, 314754113)
)
println(
portfolio.reduceLeft(
(s1, s2) => if (s1 > s2) s1 else s2
)
)
// goog has eps of: 13.31
If you have never seen Scala code before, this code will look quite foreign to you because there are a lot of concepts in Scala that are not present in Java. In a few weeks (again time permitting), will begin writing a series on Scala for Java programmers, but for right now, please bear with me, and try to follow along.
The most interesting things to me about this code are:
- Line 04: You are reading it correct, that is operator overloading!
- Line 07: It is great to be able to populate a list so easily without having to mess around with add methods.
- Line 14: This is the coolest feature of them all so far, the ability to reduce a list of elements down to one based on a binary operator.
This is just a small demonstration of the very basics of the Scala language. If you find this at all interesting, you can find out much more at scala-lang.org.
Note: obviously, this is not the most optimal Scala solution so if your a Scala guru, criticisms are welcome. I hope to come back to this example every few weeks, continually improving it as my knowledge of Scala grows.
Quicksilver is a timesaver
It has been a while since a single program changed my workflow as much as Quicksilver has.
Over the years, it has been covered a lot on the Mac sites, but it never really seemed like something that would help me. Guess it was the stubborn side of me refusing to try something new. So the question is what changed my mind now? Two things:
- The Productive Programer – In his book Neil Ford describes several work flows involving Quicksilver that actually made sense to me, especially the Subversion plugin.
- Pragmatic Thinking And Learning – Again, the virtues of Quicksilver described in such a way, that made a lot of sense to me.
After reading these two excellent books, it was time for me to give it a try, and see what it has to offer. It has been about a week now, and it is hard to imagine using my Mac without it. It has increased the efficiency of my workflow tremendously. The mouse has become optional for most tasks. It has sped up common tasks for me such as checking in/out files from Subversion, opening documents to edit, quickly composing emails and attaching files, and my favorite time saver is this neat trick that allows you to lock your computer with a simple keystroke. Previously, it required clicking on the “lock screen” option in keychain.
If you are a Mac developer like me, and you are in to efficiency, you need to at least give Quicksilver a try. You won’t be disappointed.
