You are viewing posts in the Tech category.

In The Clouds

Microsoft has a bizarre new tv ad for Windows 7.

An innocent couple falls victim to airline shenanigans. So where do they go when they can’t leave the gate area for… well, for who knows how long? “To The Cloud” to access the recorded TV shows on their home PC. Three hour delay? Bring it.

When buzzwordy people refer to the “cloud,” they’re referring to a countless number of interchangeable servers that exist nowhere specific for the express purpose of serving you content. YouTube’s servers, for example, are “the cloud.” The word itself comes from the amorphous shape you’d have to use to represent these servers in a diagram.

The characters in this ad, instead of availing themselves of an actual cloud-based service (such as Hulu, where this ad is playing), prefer to log into their home computer with remote desktop (which would be impossibly slow, and would not make use of any clouds) and transfer a recorded tv show—why would they have recorded tv shows in the first place? Like from television?

The agency that wrote this spot obviously doesn’t understand the cloud concept in at least two ways, and, by extension, it sounds like Microsoft doesn’t either.

Upgrading Max Allowed Packet

This post won’t apply to everyone. If you’re a web developer like me and you have a local MySQL database on your Snow Leopard Mac, you’ll have noticed that every time you upgrade your OS it breaks MySQL, and the specific nagging error I get after it’s up and running again is that a transfer has “exceeded MAX_ALLOWED_PACKET bytes.”

Here’s the incredibly simple way of dealing with this:

  1. open terminal
  2. sudo cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
  3. edit /etc/my.cnf (this step assumes you’re using textwrangler, use whatever you like)
  4. max_allowed_packet is on line 31, change it from 1M to something more respectable, such as 12M
  5. save and restart mysql

No more packet errors!

Google Wave

Wow—really inspiring and in-depth beta demo from Google about their upcoming product Google Wave. I had seen headlines of the announcement last week, but it was Andy Ihnatko’s thoughtful Sun-Times article that got me to sit down and watch the 80-minute presentation. Some good quotes from the article:

Wave is an ambitious, brand-new infrastructure for communication in general … Wave is hugely ambitious. Which means that it’s bound to fail.

I have no idea whether it’ll fail (I hope not) but it will depend on the implementation. I second Ihnatko’s assertion that no other company could pull this off. He rightly points out that Microsoft would be too concerned with monetizing it, and Apple would be too concerned with tightly controlling every aspect of it. That’s probably true, but I think it’s also because no other company can come with the level of web magic that Google can.

As a developer, it’s really a joy to behold them reinventing the web every year or so. Gmail, then Maps, Reader, Docs, then Maps again, and now Wave.

They basically sat down and were like “we’re going to reinvent email. And while we’re at it, all other forms of internet communication. But let’s not try to own it, because then it won’t work.”

Who else does that? Part of their demo shows how a direct competitor can develop a skin for their implementation and not interact with Google at all. That’s just amazing.

Via Sun Times via Daring Fireball

Open Source Rules

Just to follow up on my earlier debacle/discovery with PostCommitWebHooks, an Italian PHP coder seems to have picked up the script I posted to the Google thread and added to it considerably!

The script I wrote listens for updates from Google’s server and maintains a record of those updates. This coder’s script takes those updates and gets the actual changed files and maintains a local copy.

I can already think of a nice way to extend his update: write a script that presents that local cache of files as a single ZIP you can download. I suppose the reason they don’t offer that is because they want you to connect over SVN. But I think a lot of people might want to use the code but don’t want to bother checking it out, at least at first.

Anyway, moral of the story: open source is great.

JSON / Google Code POST Mystery Revealed

So I must have spent six (not kidding at all) hours today figuring this out, so I think it’s worth posting up here in case it spares anyone else similar OCDishness. I was working with Google Code today, trying to see what is what, and I came across a service called PostCommitWebHooks, which uses a new technology called Web Hooks for sites to update one another when something mutually-interesting happens. It employs an update mechanism called JSON (XML I hardly knew ye!) with HMAC hashes and whatever else, basically I was way out of my depth.

But this Google support page seemed so straightforward and clear-eyed about the whole thing that I thought it can’t be that bad. Of course the examples are in Python and Java and I wanted to use PHP but this individual was trying it too a month back and well ok.

So I got the thing set up, and Google’s site was talking to my site, and passing me the special HTTP_GOOGLE_CODE_PROJECT_HOSTING_HOOK_HMAC variable (not important). But the problem was the $_POST variables I was getting were empty. As in zero. And $_REQUEST didn’t have it, and there were no $_FILES, so where was the JSON? And that’s when I googled some a lot more and came across a thing I’ve never ever seen in all Seven Years of coding PHP, which is the existence of something called raw POST data. All you need is this:

file_get_contents(“php://input”)

This will show you the JSON data that Google is posting to your page. I know. I make it seem so easy!

Posted on March 3, 2009

Very Useful

Here’s a really useful way to read the web: a bookmarklet called Readability. With it, you can turn the most gunked-up ad-ridden website (eg WaPo) and strip it out so it’s like an e-book.

You can refresh to get out of readability mode.

Via Kottke.

Posted on March 3, 2009

Safari 4

safari

So a beta of Safari 4 is out today. It works well, in my opinion! But in using it again now, I was reminded of the biggest usability block for me between it and Firefox: the different tab shortcuts. In Firefox, brilliantly, you can select each tab with Apple-1, Apple-2, Apple-3, etc. In Safari, you have to Shift-Something-Left or Right to cycle through.

It’s pretty minor, I know. But I did manage to fix it, with the help of this post by Marc Liyanage. I:

  1. created a folder in My Home > Library > Scripts > Applications
  2. copied a bunch of shortcuts in there (you can unzip this handy folder and drag it in)
  3. installed a copy of FastScripts by Daniel Jalkut
  4. went into FastScripts preferences, and added each shortcut with the corresponding keystroke

The only slight bummer here is that it’s not a free solution, because FastScripts is commercial software. I originally tried to pull it off by enabling the scripting menu using AppleScript Utility.app and assigning shortcuts with System Preferences > Keyboard and Mouse > Keyboard Shortcuts, but I couldn’t get it to work. My guess is it’s because these Apple-1, Apple-2 shortcuts were already assigned in Safari to the Bookmarks toolbar, but I don’t know for sure. Any suggestions there please let me know.

Posted on February 24, 2009

iPhone

Today’s iPhone feature wishlist:

  1. Preference not to display SMS popup alerts (on/off)
  2. Preference not to display phone missed call popup alerts (on/off)
  3. Preference not to display that phone is currently ringing (on/off and per-contact)
  4. Flag (or star) messages in mail

Update: Thanks Google Voice!

New WordPress

The new WordPress is very nice! It’s almost a compete redesign.

Posted on December 11, 2008

Screenshots

Screenshots can be pretty useful to demonstrate things, but I don’t take them often because I’m used to the old-school Shift-Apple-3 key command. That generates a monitor-sized PNG of your entire screen and saves it to the desktop. Ok. But I just discovered a newer, better way in System Preferences.

Go to Keyboard & Mouse > Keyboard Shortcuts, and reassign the impossible-to-remember control + apple + shift + 4 to something easier like F6 (in the picture I have F5, but don’t use that). Now taking a screenshot for pasting in an email is much quicker, just the sequence F6 / space / click and paste.

It even adds that nice dropshadow if you’re pasting into a mail message. Photoshop can’t handle it, but you can paste into mail and then copy and paste into Photoshop to get the effect.

Posted on December 10, 2008