Does the HDD shortage mean that SSDs will soon be affordable for everybody?

The recent devastating floods in Thailand, in addition to causing hundreds of fatalities and leaving thousands homeless, have also brought many manufacturing plants to their knees. For anybody who uses a computer, this has a very direct impact: many hard drive plants were located in the flooded areas, and even those who were away from the area were affected as some parts (most notably spindle motors) were built by factories that are now under water. An up-to-date report of the situation can be found via Google News.

The demand and supply law was immediately brought into the picture. A 7200-rpm 2 TB hard drive, that just three weeks ago cost about €80, now costs in excess of €200. Substitute that with your currency of choice if you so prefer, but prices all over the globe have doubled, and in some cases even tripled. I have spoken with resellers I’m familiar with, and the price increases are being pushed from the bottom of the distribution chain: national distributors are selling at higher prices because they buy at higher prices themselves. I have been told that 250 GB hard drives, which were almost a rarity a month ago, have begun to bubble up through inventories, and they cost as much as 750 GB or even 1 TB drives cost just a month ago. I have witness a website pushing up the price of a 1 TB disk from €92 to €147 in a matter of hours.

It’s a big mess.

Projections for a return to normality are dire: some plants are under as much as two meters of water, and it will take no less than four weeks to purge it all out. Then equipment has to be fixed, when possible, or entirely replaced. Analysts have estimated that the shortage will last throughout all Q1-2012, with its peak at the end of Q4-2011. If you need a hard drive, buy now before it’s too late. Prices can and will go up even further; indeed, they increase pretty much daily.

I built a custom PC system for a client on October 17. A 7200-rpm 1 TB Hitachi hard drive cost him €47, VAT and taxes included. Two weeks later, it was €112. A few days ago I urgently found myself in need for storage, and after browsing as many online stores as I could, I found my way through a retailer and found a 2 TB USB2 unit whose price had not been raised, unlike the others (they probably simply forgot to do so.) I picked one of the two only remaining specimens, paid €99 for it, and when I got into the office I tore it apart and extracted the SATA disk that lay inside it. Granted, it’s a 5900-rpm disk and it’ll be painstakingly slow if I decide to do some serious work on it, but right now I need it for mere storage and I was lucky to get it. In fact, I should have gotten the other specimen too. At this rate, it’d be an investment.

As the price per GB on spinning platters increases steadily, the question can’t be eluded: is this the unexpected push that SSD needs for mass adoption?

Currently, 7200-rpm 1 TB HDD retail for about €100; that means that each GB costs €0.10. A 128 GB solid-state drive costs about €150, or about €1.17/GB. Granted, it’s ten times as expensive, but the speed increase is unbeatable — we’re talking about a ten-fold increase in access speed – and the perceived gain is priceless. With the spinning hard drive being the last bottleneck left in a modern computer architecture, SSDs can make all the difference. Just look at this video, which is over a year old, to get an idea. They are also much less power-hungry, as there is no motor that has to spin all the time.

Right now SSDs are still way too expensive for general usage. For this reason, most people (and some manufacturers) use a small one as a boot disk, and a regular HDD for data storage. But how long will this be true, given that the price per GB of HDD is bound to grow daily?

Moreover, flash memory plants were only marginally affected by the floods, if even. Will they ramp up production and therefore lower the costs of SSD for end-users?

Perchance we will be seeing new, more balanced hybrid drives. Right now the only common unit is Seagate’s Momentus XT, which couples a regular 2.5″ hard drive (up to 500 GB) with 4 GB of flash storage. The firmware automatically – and, most importantly, in an OS-agnostic way – moves the most-accessed blocks from the disk to the flash area, resulting in a continuously increasing performance at each reboot. A few days ago, Seagate also announced that it will streamline its Barracuda line by removing the “green” versions of its disks, and start producing a 3.5″ hybrid, aptly called Barracuda XT. Will it have a big chunk of flash, perhaps 16 GB or 32 GB, and less spacious platters, such as no more than 1 TB?

If I were a betting man, I’d put some cash on that. While spinning disks still have a long life ahead, computing is changing and the current shortage will undoubtedly force manufacturers to rethink strategies, and I’m pretty sure that hybrids will soon become more commonplace than we ever thought they would.

In memoriam: Steve Jobs, 1955-2011

Steve is gone. I waited a few days before writing about it, yet it still feels unreal. The man who created Apple, the company that essentially created modern computing and more, is gone.

It was widely known that he was sick, and those who follow Apple-related news and rumors had a feeling that it was only a matter of time when he decided to step down as Apple CEO in late August. He had said that, should his health not allow him keep that position any longer, he would do so; and a month a half ago, he did. We knew it was coming, there’s no denying that. The forum posts at that time were ripe of surreal optimism, as if we were all thinking the same thing but refused to speak it out loud: he may not be CEO, but he’s still in the board, so he will still direct the company’s future. Michael Grothaus of TUAW posted his first-hand experience with Tim Cook years ago and stated that he would be a good CEO, though of course he would be different from Steve; that was proven during presentation of the iPhone 4S, just two days before Steve’s departure. In hindsight, however, the people on stage certainly knew about Steve’s situation, and that explains the lack of enthusiasm. That was nothing, however, to what came later.

Indeed, the news of Steve’s death echoed through the world with unexpected force. I learned about it in the early morning, Central European Time, of October 6th. As usual, I had woken up and grabbed my iPhone 4 while still in bed, to check my mail and the news. It was on the homepage of Repubblica, an Italian newspaper; I figured it was a mistake, or perhaps I had misunderstood. I checked the online editions of other Italian newspapers: it was on their homepages too. I checked other international sources, and finally landed on MacRumors. I won’t deny that it hit me like a freight train on full throttle. Steve Jobs, dead. I imagined him peacefully resting on his bed, with his family around him, his John Lennon-style rimless round glasses on his bedside table. He was a Buddhist, so I had to refrain from thinking of him going to the gates of heaven and suggesting to god to use an app to sort souls out more efficiently. Again, it hit me: there would be no more “Stevenotes,” the nickname given to his keynotes. No more “reality distortion fields.” No more “one more thing.”

Worldwide press wrote about his life and his death. He has been defined a visionary, a man ahead of his time. His 2005 Stanford Commencement address has been widely referenced, because it shows what Steve was all about. He was a great speaker. He was able to share dreams.

A few voices rose against this media frenzy about him. He was just a skilled salesman, some said. He should not be hailed as a god on earth, because the company he founded is just another multinational capitalist group that abuses poor workers in remote areas of the world. These people forget that Apple last year started paying direct subsidies to Foxconn employers, and that Foxconn also manufactures products for other companies, such as Dell and HP. Moreover, there is nothing inherently wrong with being a skilled salesman.

Steve, however, was more than a salesman. He truly lived the American dream (his personal CV on mac.com, many years ago, stated something like “founded Apple in my garage; sold my VW minivan”) and his company literally anticipated the times. Its concept of a Knowledge Navigator, demoed in this video made in 1987, is stunningly allusiva to what the iPad would be in 2010. And 1987 was three years before the very first text-only web browser appeared. Indeed, the world wide web only saw the light of day in late 1990. This is what Steve’s vision was all about. He did not think of products: he came up with concepts, ideas, plans. The products Apple makes are merely tools to enable people to do what they want to do as efficiently as possible. In a 1998 interview with BusinessWeek, he stated: “A lot of times, people don’t know what they want until you show it to them.” Apple’s success history has proven him right many times, even when it looked like it was swimming against the tide. The rumors of Apple going bankrupt – something that was indeed almost bound to happen during Steve’s absence from the company  in the early 1990s – never ceased until recent times. Many analysts claimed the iMac was doomed to failure as it had no serial or parallel ports, only those new USB ports that meant virtually no device could be connected to it. A few years later, it was difficult to find peripherals without a USB connector. The same computer dropped the diskette drive. Apple built what people needed before those same people even thought about it, quite like John Ford, who claimed: “If I had asked people what they wanted, they would have said faster horses.”

I don’t know what will happen to Apple now. As an avid Apple user since 2001, and as an iOS developer (my app, Quick Whois, is available on the App Store), I am a little bit concerned. I switched to Mac before it created its “Switch” campaign, and I haven’t looked back once. That is not to say that I despise other systems: like any other craftsman, I realize that each job requires the right tool. I prefer to work on my Mac, however, and I am naturally interested in knowing whether it will keep innovating or not.

Some sources state that Steve left four years worth of plans for the company. As great as I think Steve was, I doubt that that’s the case. Certainly he trusted his closest colleagues and shared his vision with them, and I wouldn’t be surprised if, ten years from now, I will be posting on a blog – or whatever else we will post on then – that once again, Mr. Jobs had gotten it right. However, it is hard to believe that he left plans for future products. While Apple has indeed been ahead of the times and renewed the industry countless times, the technology Apple uses also depends from other manufacturers. Yes, perhaps next year Apple will introduce a MacBook Air based on an ARM-based CPU, but that’s as far as his “plans” could have gone. We don’t know, for instance, how long (and indeed, whether) copper-based Thunderbolt will be popular enough for people to consider switching to fiber optics. Still, I won’t deny that I find it somewhat amusing to imagine Steve as a real-world Hari Seldon, laying down future plans for humanity thanks to his studies in psychohistory.

In any event, I think that there truly was no better tribute to Steve’s influence than having tens, or indeed hundreds, of millions of people learn about his departure through a device he envisioned and blessed, whether it was a Mac, an iPhone, an iPod Touch or an iPad. Or, why not, a Newton.

And secretly, quietly, I, like many others, weak-heartedly keep hoping that this is just a stunt, yet another example of the Reality Distortion Field he created, and that he will be back on stage for an encore: “Oh, and one more thing…”

Steve Jobs 1955-2011

Here’s to the crazy ones.
  The misfits.
    The rebels.
      The troublemakers.
        The round pegs in the square holes.

The ones who see things differently.
They’re not fond of rules.
    And they have no respect for the status quo.

You can praise them, disagree with them, quote them,
    disbelieve them, glorify or vilify them.
About the only thing you can’t do is ignore them.
    Because they change things.

They invent.   They imagine.   They heal.
  They explore.   They create.   They inspire.
    They push the human race forward.

Maybe they have to be crazy.

How else can you stare at an empty canvas and see a work of art?
Or sit in silence and hear a song that’s never been written?
Or gaze at a red planet and see a laboratory on wheels?

We make tools for these kinds of people.

While some see them as the crazy ones,
    we see genius.

Because the people who are crazy enough to think
they can change the world, are the ones who do.

Photographic trends I just don’t understand

It is no mystery that I have a passion for photography. Having published two books and posting regularly on my Flickr stream, and knowing the theory of optics in addition to just snapping around, I think I know what I’m doing. Mind you, this does not mean I consider myself an artist. It may sound cliché, but I am strongly convinced that artist is a definition that others should cast upon you, rather that something you call yourself. In fact, despite what I am often told, I do not feel like my photography is that good. It’s not false modesty: I really don’t think so.

However, ever since the introduction of cheap compact cameras (and, god forbid, cheap reflex cameras), photography became mainstream. There is nothing inherently wrong with it – the more the merrier, right? – yet there are some trends in photography that I simply do not understand, and some that are just plain bad. Needless to say, these annoyances are most often perpetrated by hipsters or (gasp!) wannabe hipsters. Now, it has to be clarified that my concept of hipster includes not just the traditional, American-ish hipster, but more generally all those “subcultures” – trust me, quotes were never more appropriate – that strive to be alternative and ultimately fail to be unique. This includes, admittedly due to my cultural vantage point, the decadent leit-motif that seems to permeate the life of Italian teenage girls and young women. I may write specifically about this matter, as it’s not specific to photography.

So, without further ado, let me present a roundup of the most annoying trends in photography today. It goes without saying that this is merely my personal opinion.

Continue reading “Photographic trends I just don’t understand”

And so our story begins…

Earlier today, I joined the iOS Developer Program. After paying my entry fee and patiently waiting for about an hour for the meticulous Apple Robots to type an e-mail, I am now a registered iOS Developer, ready to attack, besiege, seize and conquer the App Store. I am currently targeting iPhone/iPod Touch only, reserving plans to expand to iPad land for later, after feeling the waters.
Stay tuned for updates. I plan to start writing on this blog again soon.

And so our story begins…

Pictures from the partial solar eclipse, Jan 4 2011

This morning, a partial solar eclipse was visible throughout Europe. I took some pictures, and posted them.
Click on the thumbnail to read more and view it in full resolution:
Partial solar eclipse of Jan 4, 2011 from Central Italy + sunspot

Flickr is the best place to showcase your photography, here’s why

After a long hiatus, a few months ago I started getting into photography again. The question immediately arose: how do I share my work?

Making a website from scratch was a no-go: too much work, too little motivation.

A CMS, such as Coppermine? Not really, I have used several in the past and they felt clunkier. Plus, a personal website is very slow to gain any traction, if it ever does.

I considered going back to my first love, Pbase, only to feel as if I were walking through Pripyat.

Two options remained: DeviantArt and Flickr. I wasn’t too keen on either, given the previous impressions I had had from both. In any case, since I already had basic accounts on both, I went ahead.

Continue reading “Flickr is the best place to showcase your photography, here’s why”

Printing in grayscale with AirPrint

Did you all think I was dead? Unfortunately for you, I am not. I’ve just been fairly busy with work and with my renewed interest in photography. Speaking of which, all of you should follow my Flickr photostream, which I update daily.

So, you’ve got the shiny new iOS 4.2 on your iPhone 4 and you have enabled AirPrint sharing on your Mac, using either the free Hacktivator or one of the commercial packages. You are very satisfied (albeit a bit doubtful about actually using it in the future), except for one thing: it prints in color, and you really wish it could print in grayscale, because toner is not cheap.

Continue reading “Printing in grayscale with AirPrint”

How to use resizeTo in Safari (if it doesn’t work)

Many people are probably familiar with the fact that most browsers allow Javascript code to be entered in the address field. That’s the magic behind bookmarklets, which simply spare the user the hassle of manually typing long, convoluted and obfuscated Javascript statements.

While it’s usually pointless to do so, there is one case in which it makes perfect sense: resizing the browser window to an arbitrary size, in order to test what a website looks like. Essentially, by setting the browser window to a size such as 1024 x 768, one can have a relatively reliable idea of what the current website would look at that screen resolution. In truth, one would have to take the graphical elements of the operating system in question, but it’s usually a fine way to get an idea.

The code to do so is very simple:
window.resizeTo(width, height);

Therefore, if we want to set the window to 1024 x 768 pixels, we type the following pseudo-address:
javascript:window.resizeTo(1024, 768);

and press enter. A few things worth noting:

  • Capitalization is important. It is resizeTo, with a lowercase “r” and a capital “T”
  • There is no space, nor any slash, after the colon
  • The width and height have to be separated with a comma, and (of course) have to be integers
  • The semicolon at the end is optional, but if you’re a programmer it will be natural to type it
  • In some browsers, you can omit the “window.” part, as the current window is implied

This is all good and great, and works in most browser.

Safari, however, only allows this intermittently. Since I spent some time making tests to figure it out, here is a tip: Safari will execute resizeTo only when there is one (and only one) tab in the window.

I’m not sure whether this is caused by a specific setting on my machines, or if it’s a default, or if it can be even changed, but I can see the point in this behavior. Since some websites have the bad habit of resizing the current window to full screen (an annoying and pointless habit, if you ask me), Safari blocks the execution of such command in order not to disrupt the concurrent navigation of different websites/pages.

It’s as if it said: “if this is your own window, do what you want with it; if not, you’ll have to respect your tab brothers.”

So, if resizeTo isn’t working for you, drag that tab out of the bar so it’s instantly opened in its own window, and try again.

Manual duplex printing on a laser printer

My laser printer, a Samsung CLX-3175, does not have any tool for automatic duplex printing. Achieving such result manually is not difficult, but may take some trial and error in order to get the settings right. That’s exactly what I’ve done, and I’m writing this post as a note to myself. Should it be useful to anybody else, however, by all means let me know with a comment.

Keep in mind that this is for my own printer, and that I use OS X 10.6 “Snow Leopard.” Results may vary with different printers and/or operating systems, so make your own tests. If your printer outputs pages “face down,” this will probably work as it is. Most ink-jet printers on the other hand output prints “face up,” so some adjustments will be necessary.

In any case the steps for my own printer are very, very easy (once you’ve figured them out correctly):

  1. Print all odd pages in normal order
  2. If the total number of pages is an odd number, take the last sheet and put it away for the time being
  3. Take the (remaining) sheets and put them back into the tray after rotating them 180°. Do not flip them in any way!
  4. Print all even pages in reverse order
  5. If you put the last sheet away in step 2, put it back at the end of the stack
  6. There is no step 6

Enjoy. :)

Prettifying URLs with fake subdirectories using mod_rewrite

Lately, I have been trying to define a common basis for most of my web projects, since I often end up reinventing the wheel every time. I have tried a few PHP frameworks, but none of them tickled my fancy, but I have complicated tastes. I am known for reimplementing something from scratch rather than wasting time adapting other people’s code to my needs, and it’s often much faster too.

Therefore I have been working on JBFW, my very own PHP/Javascript framework. One of the key components of it is pretty URLS and a centralized index.php to handle most of the things.

If you access http://mysite.com/news?lang=en, the server will transparently route that to http://mysite.com/index.php?pagename=news&lang=en. At that point, index.php runs the news module if it’s present, and then loads the news template (possibly showing the result of what was done in the module, if it was called at all.) I find that it’s a very slick and modular way of handling things, as static pages only need new templates and boom, they are live, with the rest of the framework readily accessible.

The mod_rewrite configuration for such a behavior is as follows:

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?pagename=$1&%{QUERY_STRING}

This means: if the requested filename is not a directory and is not a file, route the request as described (knowing something about regular expressions, or being proficient in creative swearing — which goes hand in hand with regexp — comes in very handy at this point.)

I used a similar, but coarser, approach on my own main website, http://www.nicolucci.eu. There, I even used fake subdirectories, so that http://www.nicolucci.eu/photography/book/glimpses will have it show the photography-book-glimpses template. Neat, but doesn’t work with real subdirectories. It’s not a big problem on that site, but when you need to have a separate administration section, you need real subdirectories. The problem is that, using the approach I described above, http://mysite.com/admin/login into http://mysite.com/index.php?pagename=admin/login, and while the correct function could be run in PHP by mangling the request as it’s done for the “top level” modules, it could quickly turn into a nightmare.

The solution is to add another set of mod_rewrite rules, as follows:

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^((.*)/)+(.*)$ /$2/index.php?pagename=$3&%{QUERY_STRING} [L]

Yes, that’s incredibly messy, and I’m pretty sure that there is a better way to do it. However it works, and for now I’m going to concentrate on finishing the website and go back to it later. What this does is: if the request has one or more blocks ending wish a slash (the directory), followed by something else (the file name), it is routed to index.php inside that directory, using the file name as a parameter to pagename, plus the original query string as usual. The [L] at the end tells mod_rewrite: please refrain from doing any other change, this is flaky enough. This ensures that http://mysite.com/admin/login effectively calls http://mysite.com/admin/index.php?pagename=login.

Note that this is another block of RewriteCond and RewriteRule, and goes before the original one. I tried to put them together, since the conditions are the same, but after fifteen minutes of trying all combinations I gave up. I’m sure I was one attempt away from getting it right.

A very clever thing (ok I’m kidding, it’s a side effect I hadn’t fully realized but I’m glad it’s there) is that addresses such as img/logo.png are not rewritten because those files do exist. It would probably make sense to exclude common file extensions, such as image files and javascript, from this kind of mangling; or even better, make it only work when the “file name” part does not have a dot in it. I’ll find a way to do it, at some point.

To finish up, an extra little trick that can come in very handy when you want to make sure that certain files are not downloadable by anybody:

<Files ~ "\.sqlite3$">
Order Allow,Deny
Deny From All
</Files>

Make sure that there are no spaces on either side of the comma in the first line. I was quite frustrated because I kept getting the infamous error 500, and there it was.

I hope this spares someone from wasting as much time as I did with this kind of thing!