Flash-free (the G4 version)

Software

After successfully going flash-free on my MacBook Pro (my main machine), I was eager to see the effects of Flash removal on my faithful little sidekick, the 12″ PowerBook G4. If, as I witnessed with the MacBook Pro, the main benefits of removing Flash are a much lighter impact on the CPU and a longer battery life, the experience on the PowerBook G4 should be equally (or even more) satisfactory.

Another factor that urged me to remove Flash from the PowerBook G4 as well was this recent article by John Gruber: Masquerading as Mobile Safari to Get Websites to Serve HTML5 Video to Safari on Mac OS X, especially this bit:

  1. Without Flash installed, my Mac uses less ambient CPU power. The machine runs cooler, faster, and the battery lasts longer.
  2. Video that plays back via the HTML5 video tag instead of Flash Player is smoother and uses less power. My MacBook Pro’s fan almost always kicks in when I play 720p video via Flash. It almost never kicks in when I play 720p video without Flash.

If you still own and use a PowerPC G4 Mac, even machines with decent CPU clocks and graphic cards (like, say, a PowerBook G4 at 1.67GHz with a 128 MB graphics card), you surely have noticed that Flash video playback is not exactly a smooth and pleasant experience. Videos are jittery, frames get dropped to keep up with the audio track, etc. On my 12″ PowerBook G4 with a 1 GHz CPU and a 32 MB graphics card, playing YouTube or Vimeo videos (well, any Flash video as a matter of fact) is basically impossible. When trying to play one, even if Safari is the only application open with just the tab of the website hosting the video, playback makes the CPU usage skyrocket, the fan kicks in immediately, and everything slows down rendering the PowerBook unusable.

After removing Flash from the PowerBook, the positive effects mentioned by Gruber were noticeable right away. Also, with the Mobile Safari for iPad user agent trick, I was able to watch some YouTube and Vimeo HTML5 videos without much hassles. With non-HD, lightweight videos, the PowerBook G4 was able to play them almost without hiccups, and with an overall smoothness simply unattainable on this Mac with the Flash counterpart. And even when the playback wasn’t smooth (because of the size/quality of the video), CPU usage was high but not through the roof, and the PowerBook kept a usable degree of responsiveness. At times the fan still kicked in, but at minimum speed, and certainly not immediately after hitting the Play button.

In the end, removing Flash from the PowerBook G4 felt like relieving it of a burden. Your mileage may vary, of course, but I really suggest you do the same on your G4 Mac — it has proven to be a good diet so far. 

Le critiche a Lion sono premature

Mele e appunti

L’amico Lucio Bragagnolo ha accennato sul suo Ping! (il blog, non il servizio dentro iTunes) alla notizia per cui Apple ha reso disponibile agli sviluppatori il primo seed dell’aggiornamento a Mac OS X 10.6.6 ancor prima che Mac OS X 10.6.5 abbia raggiunto ufficialmente gli utenti. Secondo Lucio, questa notizia è un’ennesima prova del fatto che, a dispetto di quanto sostengano molti (eterni) scontenti, Apple non sta affatto trascurando il Mac.

Mi colpisce più che altro la chiosa di questo commento:

Le critiche rivolte alla nuova versione di OS X sono giustificate dal fatto che dopo un signor sistema operativo come Snow Leopard (di gran lunga il migliore OS che abbia mai usato) la gente si aspetta tanto. E di questo tanto, a parte un market place che fa gola solo ad Apple, si è visto ben poco.

Mentre sono d’accordo con il commentatore (“Casper”) sul fatto che questa solerzia nell’emettere il seed di Mac OS X 10.6.6 possa anche essere dovuta all’essersi accorti di qualche bug non ovvio spuntato quando era già troppo tardi per sistemarlo nell’aggiornamento 10.6.5, la parte finale del suo commento, che ho qui riportato, mi spinge a fare la seguente osservazione.

È vero, di Mac OS X 10.7 Lion si è visto poco, e magari quel che si è visto non fa certo gridare al miracolo dell’innovazione. Onestamente, però, che senso ha criticare Lion adesso? Jobs ha detto che Lion arriverà nell’estate 2011, e considerando il calendario delle ultime WWDC (WorldWide Developer Conference), questo significa giugno-luglio 2011. Mancano quasi nove mesi. Che cosa pensavate di vedere all’evento Back To The Mac? Un’approfondita disamina di tutte le funzioni della versione di un sistema operativo non ancora completamente formata?

Io la vedo così: Apple aveva bisogno di parlare di Lion soprattutto per confermarne l’esistenza e per mettere a tacere troppe voci che davano per spacciato lo sviluppo di Mac OS X a scapito della piattaforma iOS. Ecco quindi Jobs che ci dice: ci stiamo lavorando, uscirà la prossima estate e (dettaglio per me importante) stiamo rispettando la tabella di marcia. Più che fare uno show delle funzioni più rivoluzionarie, sono stati presentati gli indizi più significativi della direzione in cui Apple si sta muovendo a livello di interfaccia utente, ovvero far rientrare in Mac OS X gli aspetti più interessanti e i punti forti di iOS.

Ma, appunto, s’è trattato di un abbozzo. Credo sia troppo presto per pretendere di avere già tutta una serie di dettagli approfonditi su come sarà Lion sotto il cofano, o quali saranno le fantasmagoriche innovazioni.

Sono convinto che, finché non verrà pensionata la metafora della scrivania e relative implicazioni, le prossime versioni dei sistemi operativi, e di Mac OS X nello specifico, presenteranno migliorie sempre meno eclatanti da un punto di vista visivo, superficiale, e molto più consistenti dietro le quinte. È quel che si è visto nel passaggio da Leopard a Snow Leopard: una serie di rafforzamenti agli strati profondi, due sistemi molto simili a prima vista.

Dal poco che si è visto di Lion, a mio avviso, l’unico tipo di discussione sensata riguarda la direzione di sviluppo, non tanto l’elenco di feature. Lion potrebbe presentare qualcosa di grosso come un nuovo tipo di filesystem, oppure potrebbe non presentare nulla di straordinario di per sé, ma estremamente significativo in quel percorso convergente fra Mac OS X e iOS. Sicuramente prima dell’estate vi sarà almeno un altro evento dedicato a Lion, per tenere pubblico e sviluppatori aggiornati, e vi sarà più carne al fuoco di cui discutere.

A Xserve il benxservito

Mele e appunti

Apple ha recentemente annunciato che Xserve, la sua macchina server dedicata, verrà prodotto fino al 31 gennaio 2011, poi ne cesserà la produzione. In un documento PDF chiamato Xserve Transition Guide, vengono proposte due alternative per il futuro: usare un Mac Pro o la versione server del Mac mini. Ovviamente gli attuali utenti Xserve potranno continuare a usufruire delle garanzie legate alla macchina, e Apple continuerà a fornire pezzi di ricambio per i prossimi 5 anni (7 anni nello stato della California).

Luca Accomazzi stamattina scrive un tweet provocatorio:

1: Sospesa la produzione di Apple XServe. 2: Presentando OS X Lion, Jobs non menzionò server software. Chiaro il trend o devo aggiungere altro?

E per la rete c’è chi si straccia le vesti (pochi, ma ci sono sempre).

La mia opinione? Apple sta liberandosi della zavorra, e se devo essere onesto mi meraviglia che Xserve sia durato fino a ora. È lampante che il mercato dei server non è — e non è mai stato — veramente congeniale ad Apple. Xserve è una macchina dignitosa, ma probabilmente la quantità di unità vendute non ha soddisfatto certe aspettative. In quest’ottica, liberarsi della palla al piede ha senso.

Con Xserve, però, muore solo Xserve, non Mac OS X Server. Almeno, così la vedo io. Altrimenti non ha senso avere in produzione un Mac mini ‘edizione Server’. Altrimenti non ha senso introdurre una nuova configurazione Server per il Mac Pro — peraltro con un rapporto prezzo/prestazioni mica male: il Mac Pro server è sostanzialmente simile alla versione base del Mac Pro (stesso processore 2,8 GHz Quad-Core Intel Xeon “Nehalem”), ma per 500 dollari in più ci si ritrova con:

  1. 5 GB di RAM in più (8 GB contro 3)
  2. Un disco rigido interno da 1 TB in più
  3. Mac OS X Server unlimited client edition

Si noti che solo Mac OS X Server unlimited client costerebbe, separatamente, 499 dollari.

Diciamo che offrendo la soluzione Mac Pro Server, Apple prende due piccioni con una fava: continua a offrire una soluzione server, e non deve sopportare i costi di produzione di due hardware differenti.

È vero, Jobs parlando di Mac OS X 10.7 Lion non ha menzionato una versione server. A mio parere non vuol dire niente. Per quello che è stato presentato di Lion (ossia la punta della punta dell’iceberg) non azzarderei troppe previsioni. Di Lion si sa sostanzialmente che ci stanno lavorando, che sono in tabella di marcia, e che vi saranno alcuni cambiamenti nell’interfaccia utente. Cioè, appunto, quasi nulla.

Mi sbaglierò, ma con Xserve muore solo Xserve.

Installing Instapaper’s Read Later bookmarklet on iPhone & iPod touch

Software

A word of warning

[2013 update] — Since this post is still getting some views a few years after it was first published, I think it’s only fair to point out that it was written in 2010, when I was using an iPhone 3G with iOS 4. Many things have changed since then, both in Instapaper and in iOS, so this guide may be less useful than it once was.

A Visual Guide for Dummies

I hold Marco Arment in high esteem. He’s the developer of Instapaper and former lead developer of Tumblr. He is also a brilliant writer, and I really enjoy reading his technical insights and analyses on his blog.

In many occasions he has expressed his frustration regarding the installation of the Instapaper Read Later bookmarklet directly on the iPhone/iPod touch (and presumably on the iPad, too). The procedure isn’t one of the most intuitive (though personally I don’t think you need to be an engineer to follow it), but Marco is not at fault: it’s a current limitation of iOS, that doesn’t let you install JavaScript bookmarklets in a more straightforward manner. In his post titled An open enhancement request to the Mobile Safari team for sane bookmarklet installation or alternatives, Marco writes:

Most Instapaper customers install the bookmarklet directly in Mobile Safari. The process of doing this is extremely complex and user-hostile, and a large percentage of them abandon the process and are extremely dissatisfied with Safari, my app, and me as a result.

As I said, when I had to install the Read Later bookmarklet directly in Mobile Safari, I followed Marco’s instructions and everything went fine. Sure, not a one-click operation, but nothing exceedingly complex either. Anyway, since many people seem to have difficulty with it, and wanting to offer my humble support to Marco, I hereby offer this Visual Guide. It builds on Marco’s instructions and adds iPhone screenshots for each and every step. I hope this will help the less tech-savvy with the procedure.

Instapaper 1

We start here, and we’ll follow Marco’s instructions. Let’s begin by tapping the ‘+’ button…


Important Update: From iOS 4.2, MobileSafari has been slightly redesigned. Instead of the ‘+’ button, you’ll find this one (marked with a yellow circle).  Don’t let this detail mislead you — apart from the icon, nothing has really changed. It retains the exact same function as the ‘+’ button.

Different icon, same function.


.

Instapaper 2

…This menu will appear. Tap ‘Add Bookmark’.

.

Instapaper 3

You’ll see this. Don’t do anything, just tap ‘Save’.

.

Instapaper 4

Ok, we’re back in Mobile Safari. Let’s proceed to the next step. You have to select all the text in the box on the left. To do that, tap inside of it…

.

Instapaper 5

…The keyboard will appear, and also a cursor where you tapped. Now tap on the text and hold…

.

Instapaper 6

…The magnifying glass will appear. Now release your finger…

.

Instapaper 7

…The Select/Select All/Paste pop-up menu will appear. Tap ‘Select All’…

.

…The Cut/Copy/Paste pop-up menu will appear. Tap ‘Copy’…

.

The text in the box is now copied.

.

Now we are at Step 3 of Marco’s instructions. The text we have just copied is the JavaScript code for the bookmarklet. Now we’ll have to paste it as the bookmarklet’s ‘URL’. Tap on the Bookmarks button (the open book icon).

.

…Here’s the Bookmarks folder. You can see the ‘Instapaper: Read Later’ bookmark we created before. Now tap on the ‘Edit’ button…

.

…The Bookmarks are ready to be edited or deleted. Now Tap the ‘Instapaper: Read Later’ bookmark…

.

Here we are. The URL field should be automatically selected, ready to be edited. We will delete this field and paste the code we copied before. To delete the text field, tap the ‘x’ icon on the right.

.

Now the Address field is blank. Time to paste…

.

Now tap and hold your finger in the Address field. First the magnifying glass will appear, then, when you release, the Paste pop-up will show up. Tap on it…

.

…and here’s the JavaScript code we copied a few steps back. Now tap ‘Done’. Hang tight, we’re almost there…

.

Ok, we have saved the changes in the ‘Instapaper: Read Later’ bookmarklet and we’re back to the Bookmarks list, still in edit mode. Tap ‘Done’.

.

All right, back in the regular Bookmarks view. Now tap ‘Done’ again…

.

Back again to Marco’s instructions. Installation should be complete. Now let’s test if the bookmarklet works. Tap again on the Bookmarks icon, then select ‘Instapaper: Read Later’ from the Bookmarks list, and…

.

Ta-daaah! Bookmarklet correctly installed.

Flash-free

Software

The other day, after reading this post by Steven Frank, I felt tempted to follow his steps:

When I heard that the new MacBook Air models were shipping without any Flash plug-in installed, the first thing I did was check to see if one of my long-standing Safari annoyances was fixed. It was.

It used to be that if you completely removed the Flash and Shockwave plug-ins, by deleting or moving them out of /Library/Internet Plug-Ins and (Home)/Library/Internet Plug-Ins, you would get alerts constantly while browsing telling you that they were missing.

No longer. Now you just get a “missing plug-in” image inline where the Flash object would have been.

If you want to do as I do, quit Safari, and move ClickToFlash, Flash Player.plugin, flashplayer.xpt, and NP-PPC-Dir-Shockwave from those folders to somewhere else. I made a folder called “Internet Plug-Ins Disabled”.

But I wasn’t 100% sure. Then I read this. And finally, today I did just that, I went Flash-free too. And boy, what a difference.

John Gruber has just done the same and has written a thorough entry on Daring Fireball talking about his experience. Gruber writes:

Here’s what I did last week.

First, I disabled the Flash Player and old ClickToFlash plugins. On my system, Flash Player was in the default location: /Library/Internet Plug-Ins/. I moved “Flash Player.plugin”, “flashplayer.xpt”, and “NP-PPC-Dir-Shockwave” out of that folder and into a new folder I created next to it named “Internet Plug-Ins (Disabled)”. All you need to do to disable them is move them out of /Library/Internet Plug-Ins/. I also moved ClickToFlash (“ClickToFlash.webplugin”) to this disabled plugins folder. (ClickToFlash, if you have it installed, might be in the Library/Internet Plug-Ins/ folder in your home folder, rather than at the root level of your startup drive.)

After logging out and logging back in to my user account, Flash Player is no longer available to Safari or Firefox. This is more or less the state Mac OS X is now shipping in by default.

[…]

Without Flash installed, Safari effectively tells websites you visit, “Hey, I don’t have Flash installed”, which allows the sites to send alternative content. Static images instead of Flash for ads, for example. With ClickToFlash, Safari is effectively telling websites you visit, “Yes, sure, I have Flash installed,” but then not actually loading Flash content. I see far fewer “Flash missing” boxes in web pages now than I did with ClickToFlash.

This is all fine and dandy” — I hear you say — “But what if there’s some Flash content I do want to see?”. Well, there are a couple of ways to do that. If you’re thinking about YouTube content, as Frank and Gruber suggest, you can install the YouTube5 Safari extension by Connor McKay. As Gruber explains:

With this extension installed, embedded YouTube videos are modified to use the HTML5 video tag rather than Flash Player for playback. This is possible because behind the scenes, all YouTube videos are encoded using H.264.

Since I don’t like extensions, and I want my copy of Safari to stay extensions-free as well, I’ve chosen the Google Chrome way. Gruber again:

But that doesn’t mean I never run into Flash content I wish to view but for which there is no HTML5 alternative. Google Chrome offers a workaround — Chrome includes its own self-contained Flash Player plugin. Removing Flash Player from /Library/Internet Plug-Ins/ prevents Safari and Firefox (and almost all other Mac web browsers) from loading Flash content, but not Chrome.

So, whenever I hit a page with Flash content I wish to view, I open that page in Chrome. As soon as I’m done watching it, I quit Chrome, which ensures Flash Player isn’t left running in the background.


 

Before removing the relevant plug-ins, I had Safari open with 9 tabs. Most of them were light-to-medium websites, content-wise. Then there was The New York Times, which was open on its homepage, a medium-to-heavy load for the browser since there were two or three boxes with Flash content (blocked by ClickToFlash, but still). I fired up Activity Monitor, and before opening the New York Times website, Safari was using 9–13% of CPU resources (my Mac is a mid-2009, MacBook Pro 15″, with a 2.66 GHz Core 2 Duo processor and 4 GB RAM). When the New York Times homepage was fully loaded, Safari’s CPU usage jumped to 98–100%:

Safari before removing Flash

Then I closed Safari, removed the plug-ins, reopened it, told it to ‘Reopen All Windows from Last Session’, and the previous 9 tabs began reloading. First thing I noticed: they reloaded much faster than they usually do (I usually keep 6 of those tabs open, since they’re frequently visited sites, so I know how much time they need to load). Then, after the New York Times homepage finished rendering, I opened Activity Monitor again. Surprise:

Safari after removing Flash

I know it’s not a scientific test and everything, but I assure you that the difference, performance-wise, is definitely noticeable after removing Flash. And while before the New York Times had a few Flash-enabled boxes, now that it detects that Flash is lacking, it serves me static ads in a couple of places, and in the video section I get this:

Flash-less NYT

But I can live with it, I just open Google Chrome to do the dirty work. To make things faster (and even before reading Gruber’s piece), I enabled a keyboard shortcut for the command Develop > Open Page With > Google Chrome.app, so that when in Safari I arrive on a webpage with Flash content, I just hit that shortcut and the page opens in Chrome.

Hint #1: if you don’t have the Develop menu in Safari, you can enable it in Safari > Preferences > Advanced; Hint #2: to create a shortcut for an item that it’s actually a submenu (like in this case), you just ignore that it’s a submenu. In other words, when you have to add the command description for the shortcut in System Preferences > Keyboard > Keyboard Shortcuts, you do not enter “Open Page With Google Chrome.app”, you only enter “Google Chrome.app”).