Hard disk failure imminent!

Original picture by http://www.flickr.com/photos/tenorshare-data-recovery/

A couple of weeks Windows 7 informed me that my hard disk is failing, and that I should back up immediately. Skeptical of Windows messages about things like this, I decided to run Spinrite on the disk. After making a backup with Carbonite.

Apparently I should have not done that. The better course of action would have been to copy the whole hard disk to a new one, and then run Spinrite on the old disk.

By doing this, I apparently pushed the disk just enough so it ran out of spare sectors for relocating bad tracks. I found this out after I got a new 1TB disk, placed it in the same computer, and tried to copy the old disk to the new disk.

Copying the disk turned out to be an adventure as well. At first I tried to do it the old fashioned way: boot in Linux, and run a dd from the old disk to the new disk. This works great on working disks, but failing disks disrupt the dd command…

Finally I ran across CloneZilla and tuxboot. Tuxboot is actually a great utility that lets you turn a CloneZilla Live, DRBL Live, GParted Live or Tux2live installation into a bootable USB or DVD disk, without too much thought. CloneZilla is the open source equivalent of Norton Ghost.

After downloading tuxboot and selecting the CloneZilla Live installation, the download quickly completed and I now had a USB stick to boot from. Taking it back to the PC with the failing hard drive, reboot, and voila, CloneZilla.

CloneZilla has a lot of options, and there are great step-by-step instructions available here. I chose the disk-to-disk clone option, and after tweaking the options a bit, was able to recover most of the hard disk. There were a number of clusters that CloneZilla complained about not being able to recover, but it seems they are not in any files that I use on a regular basis.

Lessons learned from this:

  1. Make sure you always have a backup. I use Carbonite, but there are several other great options out there.
  2. Use Spinrite for maintenance, and not for diagnoses. It may work in the ultimate attempt for recovery, but it’s better to know in advance your disk is failing, than to be notified by Windows and then scramble around.
  3. Don’t use the disk that is failing, get a duplicate disk as soon as possible, and use CloneZilla to copy your whole installation.

Macro for Pivot table dates

I have a small Excel workbook with two Pivot tables, linking each to their own Analysis Services cube. The purpose of these two pivot tables is to daily compare the bookings and shipments data. This involves making a change to the date filter, making sure that both pivot tables use the same date, and formatting the tables to the content.

I finally broke down, and dove into the macro editor in Excel. Since I had no idea how the macro editor works, I decided to record the actions. When I pulled the editor, this is what I saw:

Sub Macro1()
'
' Macro1 Macro
'

'
ActiveSheet.PivotTables("PivotTable1").PivotFields( _
"[Calendar Filter].[Calendar Year - Quarter - Month - Date].[Calendar Year]"). _
ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields( _
"[Calendar Filter].[Calendar Year - Quarter - Month - Date].[Calendar Year]"). _
CurrentPageName = _
"[Calendar Filter].[Calendar Year - Quarter - Month - Date].[Calendar Year].&[2013].&[1].&[01].&[2013-01-03T00:00:00]"
ActiveSheet.PivotTables("PivotTable2").PivotFields( _
"[Transaction Date].[Calendar Year Qtr Month].[Calendar Year]").ClearAllFilters
ActiveSheet.PivotTables("PivotTable2").PivotFields( _
"[Transaction Date].[Calendar Year Qtr Month].[Calendar Year]"). _
CurrentPageName = _
"[Transaction Date].[Calendar Year Qtr Month].[Date].&[20130103]"

End Sub

The important parts are the reference to the date filters in the cube. These will become driven by a variable containing a date. However, the trick is to change the date into strings, and specifically parts of the date into strings. We need the year, quarter, month, and actual date in two different formats. I used two different functions to accomplish this.

  • DatePart can take a part of the date, specified by the first parameter.
  • Format changes between different data types, like integer to character.

So, to replace the hard coded quarter 4 with the quarter of the date variable, you would use Format(DatePart(“q”,vtDate),”d”). Using these functions, and a few others, I wound up with the following code:

Sub ChangeDate()
'
' ChangeDate Macro
' Update the date in both date boxes to same date (yesterday)
'
' Keyboard Shortcut: Ctrl+d
'
Dim vcDateName As String
Dim vcDateYear As String
Dim vcDateQuarter As String
Dim vcDateMonth As String
Dim vcDateTime As String

Dim vtTheDate As Date

' Get Yesterday's date
vtTheDate = Date - 1

' Format the various necessary fields
vcDateName = Format(vtTheDate, "yyyymmdd")
vcDateYear = Format(vtTheDate, "yyyy")
vcDateMonth = Format(vtTheDate, "m")
vcDateQuarter = Format(DatePart("q", vtTheDate) + 1, "d")
vcDateTime = Format(vtTheDate, "yyyy-mm-dd")

ActiveSheet.PivotTables("PivotTable1").PivotFields( _
"[Calendar Filter].[Calendar Year - Quarter - Month - Date].[Calendar Year]"). _
ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields( _
"[Calendar Filter].[Calendar Year - Quarter - Month - Date].[Calendar Year]"). _
CurrentPageName = _
"[Calendar Filter].[Calendar Year - Quarter - Month - Date].[Calendar Year].&[" + vcDateYear + "].&[" + vcDateQuarter + "].&[" + vcDateMonth + "].&[" + vcDateTime + "T00:00:00]"
ActiveSheet.PivotTables("PivotTable2").PivotFields( _
"[Transaction Date].[Calendar Year Qtr Month].[Calendar Year]").ClearAllFilters
ActiveSheet.PivotTables("PivotTable2").PivotFields( _
"[Transaction Date].[Calendar Year Qtr Month].[Calendar Year]"). _
CurrentPageName = _
"[Transaction Date].[Calendar Year Qtr Month].[Date].&[" + vcDateName + "]"
Cells.Select
Selection.Columns.AutoFit
End Sub

Link this macro to a keyboard shortcut and instead of editing two date fields manually, we now only have to use the shortcut to retrieve the newest data.

iOS6 podcast problems and solution

I installed iOS6 this morning on my iPhone 4.

I’m not sure why.
There are now separate apps for all the stuff that used to be integrated in Music: Podcasts, iTunes U, and I’m sure there is more. Not that that’s a bad thing, but I wish the new apps had at least the functionality of the old Music app. And they don’t.
I learned that the hard way this afternoon when I started working in the yard. To have some entertainment, I always listen to podcasts or audiobooks while working in the yard, exercising, shopping or driving to and from work. So I got out the lawnmower, plugged in my headphones, and tried to listen to my podcasts.
Which had moved.
And no longer were sorted in order received.
And didn’t play whenever I locked the phone.
There were some 4 letter words uttered. Teeth were gnashed. But I settled for an audiobook that I hadn’t listened to yet.
However, it didn’t sit well with me. Why would Apple cripple a perfectly good option to listen to free podcasts? There were rumors on the discussion boards that Apple tried to steer people towards their paid content. But that wouldn’t improve the functionality of the obviously broken app…
Luckily, I ran across a post on Geek News Central, describing exactly this problem: the new Podcast app was unusable for someone who listens to a lot of podcasts. The comments reflected the same sentiment, and people suggested several alternatives for the Podcast app, amongst which were iCatcher and Downcast. I wasn’t looking forward to installing a new app, and setting up all my feeds again.
Then, lo and behold, the very last comment on the post held the solution:
  1. Remove the Podcast app
  2. Shutdown your iPhone or iPod
  3. Restart
And now your podcasts are back in the Music app. Better yet, the playlists you’ve set up with podcasts are populated again!
I hope Apple improves the apps on the next update, because this was a major step backwards.

The Internet – a source of unbridled information sharing

Years ago, I posted an article about “Kunt U Mij De Weg Naar Hamelen Vertellen, Mijnheer?” (Can You Tell Me The Way To Hamelin, Sir?), a Dutch Children’s TV show from the 1970s. In 2003, the story was converted to a musical.

One very nice person has posted the first hour of the slightly over 2 hours of the musical. However, there were problems uploading episode 7, leaving the viewers hanging. Fortunately, someone else posted the completed musical.

Thank you very, very much. This is a series I watched as a kid, eagerly awaiting every new episode (which was broadcast once a month for most of the series). It is absolutely fabulous to see Loeki Knol retelling her story, of how the children of Hamelin were taken by the Pied Piper, and how they found their way back, as an adult to her daughter.

Google I/O 2012 kicks off June 27th

Aygul Zagidullina, http://instagram.com/p/MSNFCtu3St/

In a little less than 24 hours, Google I/O 2012 will start with a keynote, most likely hosted by Vic Gundotra. The rumor mill is in full speed, and here’s what we expect to be announced at I/O 2012:

  • A Google TabletBuilt by Asus, the price (around 200 dollars) and form factor (7″) seem to put it more in competition with the Kindle Fire than with the Apple iPad. Plus point: a reference tablet for Android.
  • Android 4.1Code named Jelly Bean, it is rumored to have a new search bar, and a Siri-like  voice activated assistant (Google Assistant, or should we nick name her Gia?).
  • Maps on iOSThis will be interesting. Google announced a new version of Google Maps very shortly before Apple’s official announcement that it will replace Maps with its own mapping app in iOS 6. Will Apple actively block Google Maps on iOS, claiming it duplicates functionality in the system? And how will that fly with the European Union’s legislation…?
  • Google GlassesTraditionally Google has put together a very nice goody bag for attendees, including phones, Chrome books, etc. It seems everyone is hoping to find the latest implementation of Project Glass under their chairs this year.
  • More hardware in the Play storeVery recently, we were surprised by the appearance of a (very old) cell phone in the Google Play store. Expectations are high that the selection of unlocked phones and other hardware will increase. If the cell phone selection increases, how will carriers react to this…?

There are more than likely a few other surprises coming up, so be sure to check out the Google I/O pages (see the widget on the right hand bar for quick access).

Judging by the headlines presented to me by LinkedIn, there are some problems with the LinkedIn security:

Luckily the Top Headlines widget on Linked is not biased… 🙂

How to disable WPS on the Netgear N600 router

Recently a vulnerability in the WPS wireless network setup was discovered. I will not go into great detail on that vulnerability here, but will simply show you how to turn this off on the Netgear N600:

  1. Start the Netgear maintenance tool by going to http://www.routerlogin.net. This takes you into the setup tool installed during initial setup.
  2. Locate the Advanced Wireless settings
  3. Make sure the check box next to “WPS disabled” is checked.

Normally the “WPS disabled” option is checked when the router detects an intrusion attempt, and you can clear it here. In this case, we do the opposite – we disable the WPS by telling the router it is getting hacked.

Microsoft’s vision of how we will work and live in the future

Microsoft is working on its view of the future. This is a video of how Microsoft envisions Office in the (near?) future, and how it impacts our work and home live. Pay close attention to the recipe the girl selects at the end – it shows the ingredients being displayed on the kitchen counter. What it leaves out is something I’ve seen in another video, where the ingredients are put on the counter, matching the displayed ingredients – and it detects mismatches in the items.

Exciting to see this kind of vision, and I’m really curious how far away this is. We have face to face talk, interactive surfaces, touch screens, etc. Maybe 10 years from now, this will be the norm…