Wednesday, April 22, 2009

Bad, Bad News

Am I the only one who is worried about Oracle, with their fortress of death mindset, buying Sun, which coincidentally owns MySQL?  I can't see Larry Ellison being all fatherly to the little Open Source Database that could, considering that MySQL's continued existence is a major barrier to Oracle being a more major player on the web front.

Now, let's look at the possible outcomes of this little merger from MySQL's perspective:
  • MySQL as a corporate focus is de-emphasised to the point that they are to Oracle what Netscape was to AOL. The corporate version eventually dies, as Netscape did.  The silver lining is that the source code is already open, so it won't require the hail-mary pass that Netscape threw to the Mozilla foundation to give us a new and free OurSQL or whatever the fork ends up being called.  However, consider the interregnum between the death of Netscape and the rise of Firefox, and the ground that the beloved 'fox still has to make up against IE.  We can expect the same sort of thing; an era of Oracle dominance (or at least ascension) until the new Open Source RDBMS gains traction.
  • Another MySQL death scenario: a battle of FOSS databases. PostGRESQL vs. SQLite vs. who the heck knows all else.  the Open Source community is balkanized and again, we get a period of Oracle  (and SQL Server) ascension while the free systems sort themselves out.
  • Alternately, Oracle lets MySQL live.  Corporate pricing for service goes up to be in line with what they charge for their Oracle database product.  Upside: Free MySQL doesn't die; downside: paid MySQL suddenly gets a lot of proprietary addons that the free version doesn't see. This is already happening just with Sun. How much worse is Oracle going to be?
I could be completely wrong. Oracle could just see the value in Sun's line of products, and might be intelligent enough to leave them alone and just make money off of them.  But somehow I doubt it.

Wednesday, March 25, 2009

My only MacHeist3 Post, I promise!


Just as a little note, everything I did to this graphic, from capturing it (Little Snapper) to rounding the edges and creating a reflection (Picturesque), was done in software I got from MacHeist 3.  It's a great deal this year (as it is every year), and this year 25% goes to charity, instead of just 10%.  I can't recommend it enough.

By the by, if you do check it out, and decide to buy a bundle, I would appreciate it if you used my referral code:

http://www.macheist.com/bundle/u/33343/

Thanks!

Monday, March 9, 2009

Suddenly Loving AppleScript

Some things are instantly useful, and  you love them from the moment you set eyes on them.  Others take more time to become useful. 

For me, AppleScript has definitely fallen into the second category.  When I first got my iMac in 2006 I was excited to see what I could do with AppleScript and Automator. These, I felt, were what the world of Windows was wanting (alliteration free with every blog post! (not really! That would be really hard!))

So I dove in to attempting to script every aspect of my life. I wanted to automatically move things from my desktop to my FTP server, send batch emails to people about things, and basically just stop wasting time.  And it never worked.  Nothing I tried worked.  Finally, after much struggle, I made a nice little "app" that controls iTunes and DVD Player, so that you can sync a Rifftrax with a DVD, provided you are pretty lenient with the usage of the word "sync". Basically, it would pause one or the other, so that you could get them closer together.  In the end it was almost harder to use than the native interfaces for those two programs, and I pretty much stopped playing with AppleScript altogether. 

Well, not quite. I kept going back, trying to see what I was missing, why so many people thought that AppleScript was awesome, why there were long-running web communities that pass scripts back and forth, why programs went out of their way to be scriptable, and eventually decided that there must be something there.

So I scaled back my expectations of my first scripts.  And a few weeks ago I found the perfect use for Apple's little english language parser: file cruching.  You see, there's this system at work made by a company I'll call "Big Red" (not it's real name. At all), and when you export files from their server they are in Unicode 16.  The problem is that languages like Ruby, PHP, et al, don't like Unicode 16. They like Unicode 8, or else you have to fiddle around under the hood.  So instead of fiddling around under the hood, I wrote a script to start BBEdit, have it open all text files in a directory, and save them as UTF-8 files instead of UTF-16.  See? No big deal.

But it was finally a successful and useful "program".  I use it a few times a week, and it's quite handy.  With one success under my belt, I wondered what else I could do.  I wrote a script that runs on startup, maximizes Safari, and points it to a specific website. Bam!  instant display system.

Today I wrote the script I've been looking for for years.  All I wanted to do was loop a movie indefinitely.  Frustratingly enough, it used to be included with DVD Player, but not with the Leopard version.  So I kept seeing people say "just look in this folder (that existed in OSX 10.3) and run the 'loop' script."  Since it was included with every copy back then no one thought to copy it on to their blog post, so I was stuck loopless.  Still, I knew how to use the Dictionary, and I knew how to write scripts.  So I did.  What I have is functional, not pretty.  But for all of you who are also frustrated trying to make DVD Player keep playing your movie all day long, here's a good start:

--plays a movie through 5 times.
-- To Loop forever change maxLoops on each pass through
--as well as changing loops.

tell application "DVD Player"
    activate
    if has media is true then
       set maxLoops to 5
       set loops to 0
       repeat while loops is less than maxLoops
          delay 3
          --Wait for the DVD to load, then
          --press enter. Usually this will be on the
          --"play all" option.
          if dvd menu active is true then
               press enter key
               delay 2
               if elapsed time is greater than 10 then
                  set elapsed time to 1
                  play dvd
               end if
          end if
          --let the DVD start playing before getting all weird in the head.
          delay 4
          repeat while dvd state is playing
               if remaining time is less than 5 then
                    set elapsed time to 1
                    play dvd
               end if
          end repeat
         set loops to loops + 1
      end repeat
   else
      display dialog "No disc!"
   end if
end tell


I hope this helps someone else fix a common problem, and hopefully helps them also decide that AppleScript isn't a complete waste. Also, if you see easy ways to improve this script, please put them in the comments.

thanks!

Thursday, February 26, 2009

Jinks!

I love XKCD, even when they steal my ideas. Compare this comic with this blog post from 2007. Of course, I embedded an XKCD comic in my last post, so I guess we're even.

Tuesday, February 10, 2009

Analyze, Acclaim, Break, Repeat

There seems to be a pattern that we follow when we are faced with a new technology. First we (meaning people who are interested in technology as technology) first want to know more about the thing. What is it? How does it work? What OS? What's driving it? and so forth.

Once we've established some basics, if the idea is any good, we are usually pretty quick to declare that something is a breakthrough. We like breakthroughs! This is especially true in the world of Apple and its products.

Once we've decided something is good, then it's time to see how far we can push it before it breaks. At this point we start mocking it for not being perfect, but if it's good enough we continue using it.

Two recent real life examples are iPhoto '09 and the latest Android update.

iPhoto has the much-talked about "Faces" feature, which goes throgh your photos, locates faces and does as much as it can to help you sort them by who they are. My photo library is about 10 GB, mostly people, so I figured it was a pretty good test site. I went in and started tagging people that would be repeated over and over. Me, my wife, my two kids, various siblings, and so forth. It picked up on who I am pretty quickly; boxes around my face went from "Unknown face" to "is this Nate?" after about 30 pictures. My kids are both under the age of five, so it's understandable that iPhoto can't quite tell them apart yet, but it actually does a pretty good job. My wife, however, seems to be a complete mystery to the iPhoto daemons. It confuses her with her sisters, my sisters, and occasionally asks if someone's hand or shoulder is my wife.

And thus we hit the "Break" stage. I decided to see how off it is compared to human recognition. Because a human would never do that. If you showed me 40 pictures of my two sisters-in-law, just their faces, I could probably tell you with 100% accuracy which was which unless you pulled out the traditional "one-day-old" pictures, because those all look the same, man. iPhoto gets about a 40% on telling them apart. And while we may tell ourselves that we see faces in trees, shadows, the clouds, etc., we don't for a moment think that those faces are our brothers. So we get to feel superior to technology for a while longer, and completely miss the point that Apple taught the computer to recognize and categorize faces at all.

The other one I just got my hands on is Google's voice search. My G1 auto-updated yesterday, and when it was finished my Google search bar had a cute little microphone on it. I spent a happy 45 minutes asking it for truly strange things like "football sushi" or "directions to the Los Angeles lockers" and it understood my voice (if not my questions) every time. So I tried to show it off to my brother-in-law on the commuter train home and it failed every time. Well, let's be fair, I was having a hard time "parsing" the things my brother-in-law was saying on that amazingly noisy train, so we have to cut it a little slack. But it still gave me a momentary "I'm still better than the machine" feeling.

I don't really have a point, by the way. This is mostly by way of obervation. But I do think it's healthy, and the "break" step is the one that keeps technology moving forward and interesting. So let's go see what shiny new breakthrough we can break today!