1 2 3 4
How Encodo sets up new workstations

Windows 8.1UbuntuClonezillaChocolateyVirtualBox

We've recently set up a few new workstations with Windows 8.1 and wanted to share the process we use, in case it might come in handy for others.

Windows can take a long time to install, as can Microsoft Office and, most especially, Visual Studio with all of its service packs. If we installed everything manually every time we needed a new machine, we'd lose a day each time.

To solve this problem, we decided to define the Encodo Windows Base Image, which includes all of the standard software that everyone should have installed. Using this image saves a lot of time when you need to either install a new workstation or you'd like to start with a fresh installation if your current one has gotten a bit crufty.

Encodo doesn't have a lot of workstations, so we don't really need anything too enterprise-y, but we do want something that works reliably and quickly.

After a lot of trial and error, we've come up with the following scheme.

  • Maintain a Windows 8.1 image in a VMDK file
  • Use VirtualBox to run the image
  • Use Chocolatey for (almost) all software installation
  • Use Ubuntu Live on a USB stick (from which to boot)
  • Use Clonezilla to copy the image to the target drive

Installed Software

The standard loadout for developers comprises the following applications.

These are updated by Windows Update.

  • Windows 8.1 Enterprise
  • Excel
  • Powerpoint
  • Word
  • Visio
  • German Office Proofing Tools
  • Visual Studio 2013

These applications must be updated manually.

  • ReSharper Ultimate
  • Timesnapper

The rest of the software is maintained with Chocolatey.

  • beyondcompare (file differ)
  • conemu (PowerShell enhancement)
  • fiddler4 (HTTP traffic analyzer)
  • firefox
  • flashplayerplugin
  • git (source control)
  • googlechrome
  • greenshot (screenshot tool)
  • jitsi (VOIP/SIP)
  • jre8 (Java)
  • keepass (Password manager)
  • nodejs
  • pidgin (XMPP chat)
  • poshgit (Powershell/Git integration)
  • putty (SSH)
  • smartgit (GIT GUI)
  • stylecop (VS/R# extension)
  • sublimetext3 (text editor)
  • sumatrapdf (PDF viewer)
  • truecrypt (Drive encryption)
  • vlc (video/audio player/converter)
  • winscp (SSH file-copy tool)
  • wireshark (TCP traffic analyzer)

Maintaining the Image

This part has gotten quite simple.

  1. Load the VM with the Windows 8.1 image
  2. Apply Windows Updates
  3. Update ReSharper, if necessary
  4. Run choco upgrade all to update all Chocolatey packages
  5. Shut down the VM cleanly

Writing the image to a new SSD

The instructions we maintain internally are more detailed, but the general gist is to do the following,

  1. Install the SSD in the target machine
  2. Plug in the Ubuntu Live USB stick
  3. Plug in the USB drive that has the Windows image and Clonezilla on it
  4. Boot to the Ubuntu desktop
  5. Make sure you have network access
  6. Install VirtualBox in Ubuntu from the App Center
  7. Create a VMDK file for the target SSD
  8. Start VirtualBox and create a new VM with the Windows image and SSD VMDK as drives and Clonezilla configured as a CD
  9. Start the VM and boot to Clonezilla
  10. Follow instructions, choose options and then wait 40 minutes to clone data
  11. Power off Clonezilla
  12. Shut down Ubuntu Live
  13. Unplug the USB drive and stick
  14. Boot your newly minted Windows 8.1 from the SSD
  15. Install Lenovo System Update (if necessary) and update drivers (if necessary)
  16. Add the machine to the Windows domain
  17. Remote-install Windows/Office licenses and activate Windows
  18. Remote-install Avira Antivirus
  19. Grant administrator rights to the owner of the laptop
  20. Use sysprep /generalize to reset Windows to an OOB (Out-of-box) experience for the new owner


We're pretty happy with this approach and the loadout but welcome any feedback or suggestions to improve them. We've set up two notebooks in the last three weeks, but that's definitely a high-water mark for us. We expect to use this process one more time this year (in August, when a new hire arrives), but it's nice to know that we now have a predictable process.

Who's using up my entire SSD?

Hard drives => SSDs

imageIn the old days, we cleaned up our hard drives because we didn't have enough space for all of our stuff. Our operating systems, applications and caches took up a reasonable portion of that hard drive.

Then we had gigantic hard drives with more than enough space for everything. Operating systems, applications and caches grew. Parsimonious software was no longer in vogue because it was a waste of time and money.

SSDs replaced hard drives, improving speeds drastically and ushering in a new era in performance. This did not come without cost, though. SSDs were much more expensive to make, so the affordable ones were necessarily much smaller than our existing hard drives. Our operating systems, applications and caches have not made the adjustment, though, at least not on Windows.

We are left with drives 70-80% smaller than the ones we had a couple of years ago -- 256MB vs. 1TB. Developers, in particular, tend to have software that uses space indiscriminately.

Drive space: critical

I recently noticed that my system drive had filled up to almost 80% and took a little time to do something about it. I downloaded TreeSize Free from Jam Software to get an idea of which folders took up the most space. I also referred to Guide to Freeing up Disk Space under Windows 8.1 by Scott Hanselman: there are a lot of great tips in there.

Without further ado, here are the locations that struck me as being "space hogs" -- locations that were large but didn't seem to offer much utility or seemed to be logs, caches or backups.


imageThis folder is almost 22GB on my machine. It seems to contain MS installers, updates, service packs and hot-fixes. There are a few tips online -- some from Microsoft -- on how to clean up this folder. Even after running a couple of them, I didn't notice a significant difference in size. I didn't spend a lot of time here, but cleaning up this folder would yield significant savings.

SQL Server

There were several gigabytes -- I had 2.8GB -- of older versions and installers in the main SQL Server folder, located at /Program Files/Microsoft SQL Server/110/Setup Bootstrap. If you have large databases, consider moving them to another drive or location and setting the default data directory to somewhere other than the Program Files directory on the system drive.


I use this player for podcasts. It stores almost 1GB in something called the "icon cache", located at /Users/<username>/Roaming/Participatory Culture Foundation/Miro/icon-cache


SmartGit updates itself automatically now and they have very regular builds and updates, especially if you use preview releases. It never seems to delete these updates, instead retaining them in /Users/<username>/Roaming/syntevo/SmartGit/updates.


I use this to keep track of my day, referring to it to fill out my timesheet. Screen captures are located in /Users/<username>/Local/TimeSnapper/Snapshots. The default settings are to capture 100%-quality PNG files for all monitors every ten seconds. I have two large monitors and the default 5GB cache fills up in less than a day. This is not very helpful and wastes a lot of space. Instead, I recommend these settings:

 * **File Type:** JPG
 * **Resolution:** 50%
 * **Quality:** 50%
 * **Interval:** 60 seconds
 * **Remove images older than:** (not set)
 * **Maximum allowed space:** 1000MB


If you build XML documentation locally, you might have a sizable cache left over from the last build. I had over 800MB in the \Users\<username>\AppData\Local\EWSoftware\Sandcastle Help File Builder\Cache


imageJava also likes to update itself regularly and never throws away its older versions. Unless you know that you absolutely need a specific version, you can throw away the older versions found in C:\Users\marco\AppData\LocalLow\Sun\Java


The Visual Studio documentation extension keeps quite an extensive cache in the \Users\<username>\AppData\Local\SubMain\Cache directory.


imageThis is another company that squirrels away all of its installers for its various products -- I use DotPeek, DotCover, DotTrace, ReSharper, PhpStorm and 0xDBE -- in this folder \Users\marco\AppData\Local\JetBrains. Feel free to throw away old installations and installers.


This mysterious folder located at the root of the system drive has been around since time immemorial. It appears to be 0 bytes when examined with a standard user. When you run TreeSize in administrator mode, though, you'll see that it's 2.4GB of ... stuff. This stuff is apparently installers for all of the office products that you have installed on your machine. They are cached in this folder in order to avoid requesting installation media if Office decides to install something on-the-fly. That's right: if you elect not to install certain features to avoid wasting drive space, Office obliges by putting all of the stuff you didn't install into a 2.5GB directory that you can't delete. Documentation is spotty, but this article claims that you can remove it by using the standard disk-cleanup tool.

This list is meant to show where space is being wasted on a Windows developer machine. I wasn't able to find a way to remove all of these, but cleaned up what I could quickly clean up.

If you're really tight on space, you can turn off hibernation -- which uses 13GB on my machine -- or reduce the size of the page file -- which is 6GB on my machine. And, as mentioned above, Scott Hanselman's guide is quite helpful.

An introduction to PowerShell

On Wednesday, August 27th, Tymon gave the rest of Encodo1 a great introduction to PowerShell. I've attached the presentation but a lot of the content was in demonstrations on the command-line.

  1. Download the presentation
  2. Unzip to a local folder
  3. Open index.html in a modern web browser (Chrome/Opera/Firefox work the best; IE has some rendering issues)

We learned a few very interesting things:

  • PowerShell is pre-installed on every modern Windows computer
  • You can PowerShell to other machines (almost like ssh!)
  • Windows developers should definitely learn how to use PowerShell.
  • Unix administrators who have to work on Windows machines should definitely learn how to use PowerShell. The underlying functionality of the operating system is much more discoverable via command line, get-command and get-member than the GUI.
  • You should definitely install ConEmu
  • When running ConEmu, make sure that you start a PowerShell session rather than the default Cmd session.
  • If you're writing scripts, you should definitely install and use the ISE, which is an IDE for PowerShell scripts with debugging, code-completion, lists of available commands and much better copy/paste than the standard console.
  • The PowerShell Language Reference v3 is a very useful and compact reference for beginners and even for more advanced users

ConEmu Setup

The easiest way to integrate PowerShell into your workflow is to make it eminently accessible by installing ConEmu. ConEmu is a Windows command-line with a tabbed interface and offers a tremendous number of power-user settings and features. You can tweak it to your heart's content.

imageI set mine up to look like the one that Tymon had in the demonstrations (shown on my desktop to the right).

  1. Download ConEmu; I installed version 140814, the most recent version marked as "beta". There is no official release yet, but the software is quite mature.
  2. Install it and run it. I didn't allow the Win + Num support because I know that I'd never use it. YMMV and you can always change your choice from the preferences.
  3. Show the settings to customize your installation. There are a ton of settings, so I listed the ones I changed below.
  4. imageSet the window size to something a bit larger than the standard settings, especially if you have a larger monitor. I use 120 x 40.
  5. imageChoose the color scheme you want to use. I'm using the standard PowerShell colors but a lot of popular, darker schemes are also available (e.g. Monokai).
  6. imageCheck out the hotkeys and set them up accordingly. The only key I plan on using is the one to show ConEmu. On the Swiss-German keyboard, it's Ctrl + ยจ.
  7. imageThe default console is not transparent, but there are those of us who enjoy a bit of transparency. Again, YMMV. I turned it on and left the slider at the default setting.
  8. imageAnd, finally, you can turn on Quake-style console mode to make it drop down from the top of your primary monitor instead of appearing in a free-floating window.

  1. and one former Encodo employee -- hey Stephan!

REST API Status codes (400 vs. 500)

In a project that we're working on, we're consuming REST APIs delivered by services built by another team working for the same customer. We had a discussion about what were appropriate error codes to return for various situations. The discussion boiled down to: should a service return a 500 error code or a 400 error code when a request cannot be processed?

I took a quick look at the documentation for a couple of the larger REST API providers and they are using the 500 code only for catastrophic failure and using the 400 code for anything related to query-input validation errors.

Microsoft Azure Common REST API Error Codes

Code 400:

  • The requested URI does not represent any resource on the server.
  • One of the request inputs is out of range.
  • One of the request inputs is not valid.
  • A required query parameter was not specified for this request.
  • One of the query parameters specified in the request URI is not supported.
  • An invalid value was specified for one of the query parameters in the request URI.

Code 500:

  • The server encountered an internal error. Please retry the request.
  • The operation could not be completed within the permitted time.
  • The server is currently unable to receive requests. Please retry your request.

Twitter Error Codes & Responses

Code 400:

The request was invalid or cannot be otherwise served. An accompanying error message will explain further.

Code 500:

Something is broken. Please post to the group so the Twitter team can investigate.

REST API Tutorial HTTP Status Codes

Code 400:

General error when fulfilling the request would cause an invalid state. Domain validation errors, missing data, etc. are some examples.

Code 500:

A generic error message, given when no more specific message is suitable. The general catch-all error when the server-side throws an exception. Use this only for errors that the consumer cannot address from their endnever return this intentionally.

REST HTTP status codes

For input validation failure: 400 Bad Request + your optional description. This is suggested in the book "RESTful Web Services".

How to configure Visual Studio 2013 with licenses from a multi-pack

If you're only interesting in what we promised to show you in the title of the article, then you can jump to the tl;dr at the end.

Silver Partnership

Encodo is a member of the Microsoft Partner Program with a Silver Competency. We maintain this competency through a combination of the following:

  • A yearly fee
  • Registration of .NET products developed by Encodo (Punchclock and Quino in our case)
  • Customer endorsements for .NET products that Encodo has developed
  • Competency exams

This involves no small amount of work and means that the competency isn't that easy to get. You can also use Microsoft competencies (e.g. MCSE) but we don't have any of those (yet).

We've had this membership for a while in order to get partner benefits, which basically translates to having licenses for Microsoft software at our disposal in order to develop and test .NET software. This includes 10 licenses for all premium versions of Visual Studio, up to and including the latest and greatest.

The partner web site

In previous versions, we were able to go to the partner web site and, after a lot of effort, get license keys for our 10 licenses and distribute them among our developers.

I mention the effort only because the partner site(s) and page(s) and application(s) are so notoriously hard to navigate. Every year, Microsoft improves something on the site, generally to the style but not the usability. I pluralized the components above because it's hard to tell how many different teams, applications and technologies are actually behind the site.1


  • You have to log in with your official LiveID but some pages mysteriously don't use the common login whereas others do use it and still others just log you out entirely, forcing you to log in again.
  • Some pages work in any browser whereas others highly recommend using Internet Explorer, some even recommending version 11. If you don't use IE, you'll always wonder whether the site failed to work because it's so buggy or because your browser is not properly supported.
  • The downloads page includes Windows operating systems and server software of all kinds as well as productivity software like Office and Visio but mentions nothing about Visual Studio.

It's basically always been a mess and still is a mess and our suspicion is that Microsoft deliberately makes it hard to redeem your licenses so that you'll either (A) just purchase more licenses via a channel that actually delivers them or (B) call their for-fee hotline and spend a bunch of money waiting on hold before you get forwarded from one person to another until finally ending up with someone who can answer your question.

The convoluted path to licenses

That question being, in case we've forgotten, "how can I please get your software to recognize the licenses that I purchased instead of threatening me that it will go dark in 90 days?"

The magical answer to that question is below.

First, what are we actually trying to accomplish? We have a multi-pack license and we want some way of letting our users/developers register products. In most cases, this still works as it always has: get a license key and enter it/register it with the local installation of the product (e.g. Office, Windows, etc.)

With Visual Studio 2013 (VS2013), things are slightly different. There are no multi-pack license keys anymore. Instead, users log in to their Visual Studio with a particular user. VS2013 checks that account for a license on the MSDN server and enables its functionality accordingly. If you have no license registered, then you get a 90-day trial license.

If the license is a multi-pack and the user accounts are individual...how does that work? Easy: just associate individual users with the partner account and assign them licenses. However, this all works via MSDN, so it's not enough to just have a Windows Live account. That user must also be registered as an MSDN subscriber.

So, for each user, you're going to have to do the following:

  1. Get them a Windows Live account if they don't already have one
  2. Add that account ID to the partner account
  3. Enable that user to get premium benefits (this can take up to 72 hours; see below for more detail)
  4. Register that Windows Live account as an MSDN subscriber
  5. Enter your credentials into VS2013 or refresh your license

The solution (with screenshots)

Sounds easy, right?. Once you know what to do, it's not so bad. But we had a lot of trouble discovering this process on our own. So here are the exact steps you need to take, with screenshots and hints to help you along.

  1. Log in with the Windows LiveID that corresponds to the account under which the Silver Membership is registered.

  2. Navigate to the account settings where you can see the list of members registered with your account.

  3. Add the email address of the user to that list of members2

  4. Make sure that the "Premium" box is checked at the end of the list3

  5. A six-character TechID will be generated for that user. The site claims that it can take up to 72 hours for this number to be ready for use on the MSDN site. Our experience was that it took considerably less time.

  6. Give that user their ID and have them register with MSDN to create a subscriber

    1. Get the Tech ID for your user from the steps above;
    2. Browse to the MSDN home page and click "Downloads"4
    3. Click "MSDN Subscriptions" in the sub-menu under "Downloads" (totally intuitive, right?)5
    4. Ignore the gigantic blue button enticing you to check out "Access benefits" and click "Register a subscription"6
    5. You'll finally be on the page to "Activate your subscription". Use the exact same address as registered with the partner account and enter your Tech ID.7
  7. Once the user has a subscriber, that user can log in to VS2013 from the registration dialog to enable that license8

Logging in has other benefits: you can store your VS2013 settings on the Live server and use them wherever you work with VS2013 and have logged in.

  1. You can confirm our impressions just by looking at the screenshots attached below.

  2. image

  3. image

  4. image

  5. image

  6. image

  7. image

  8. image

ELI5 answer to: How and why do computer programs crash?

This article originally appeared on earthli News and has been cross-posted here.

ELI5 is the "Explain LIke I'm Five" forum at Reddit. I recently answered the question "How and why do computer programs crash?" and thought the answer might be worth cross-posting (even though the post itself never gained any traction).

What is a program?

Programs comprise a limited set of instructions that tell them what they should do when they encounter certain inputs under certain conditions.

Who writes programs?

People write computer programs. Therefore, programs only do what those people can anticipate. Unanticipated situations result in crashes.

Anatomy of a crash

A "crash" is when a program is no longer able to process further input.

Here's roughly how it works:

  • The environment in which the program runs applies input events to the program.
  • The program checks for an instruction that matches its current state plus the new input.
  • If one is found, it applies that instruction to create a new, current state.
  • A program "crashes" when it receives an input in a given state that it was not designed to handle.

Different kinds of crashes

This can happen either:

  • When the program enters an infinite loop and is no longer capable of responding to new input (sometime called "hanging").
  • When the program terminates itself as a result of not being able to handle the input ("hard crash" or "unhandled exception" or "segfault", etc.).

This does not mean that the program behaves unpredictably. The crash is perfectly predictable.

Avoiding crashes

Crashes can be avoided with one or more of the following:

  • Good design
  • Good programmers
  • Good libraries & programming languages
  • Good testers
  • Time
  • Money

Hope that helps.

A list of lesser-known OS X keyboard shortcuts

This article originally appeared on earthli News and has been cross-posted here.

The post Please share your hidden OS X features or tips and tricks yielded a treasure trove of keyboard shortcuts, some of which I knew and many that I'd never heard of or had long ago forgotten.

I collected, condensed and organized the ones I found the most useful below.

Finder & Open/Save dialogs

  • (-cmd) + (-shift) + G shows a location bar where you can type a path (/ or ~ also works in Open/Save). This text field supports ~ for the home directory and has rudimentary tab-completion.
  • (-cmd) + R reveals the currently selected item in a new Finder window.
  • (-cmd) + (-opt) + L selects your ~/Downloads folder.
  • (-cmd) + (-shift) + > shows/hides hidden files and folders (Open/Save dialogs only).
  • Dragging and dropping a file or folder into an Open/Save window re-targets that window on that file or folder

Managing applications

  • Press (-cmd) + tab to cycle through open applications.
  • Press (-cmd) + ~ (or < depending on keyboard layout) to cycle through open windows in the currently selected application.
  • While cycling, you can press q to quit the highlighted application or h to hide it
  • Press (-cmd) + (-opt) + esc to show a dialog that lets you force unresponsive applications to quit (you can even relaunch the Finder)
  • Hold down (-cmd) while clicking a dock icon to reveal that application in the Finder

Managing your Mac

  • Hold down (-opt) while clicking the "apple" menu on the top-left to execute commands (e.g. "Log out", "Shut down") without a confirmation dialog
  • Press ctrl + (-cmd) + (-opt) + (-eject) to shut down
  • Press (-cmd) + (-opt) + (-eject) to put the computer to sleep
  • Press ctrl + (-shift) + (-eject) to put the display to sleep
  • Press ctrl + (-cmd) + (-eject) to restart


  • (-cmd) + (-shift) + 4 lets you select an area to highlight and saves the screenshot to the desktop
  • (-cmd) + (-shift) + 4 + space lets you select an entire window, the dock, menu bar, etc. This will also include the drop shadow with transparency in the PNG screenshot.
  • Hold down ctrl with either of these to copy to the clipboard instead

Volume controls

  • Hold down (-shift) while adjusting the volume to mute the volume-changing sound (useful when adjusting volume during a call).
  • Hold down (-shift) + (-opt) while adjusting the volume to adjust in quarter-increments.
  • Hold down (-opt) while clicking the "sounds" menu-bar item to show a menu that lets you select the input/output devices without opening preferences

Screen & Brightness

  • Hold down (-shift) + (-opt) while adjusting the brightness to adjust in quarter-increments.
  • Hold down ctrl while scrolling with two fingers or the mouse wheel to zoom in/out on the entire screen
  • Hold down (-opt) while clicking the "bluetooth" or "wi-fi" menu-bar items to show a menu with more details about your connection, including options to show/generate diagnostics.
  • Hold down (-opt) while clicking the "notifications" icon to toggle it on/off
Ignoring files with Git

This article originally appeared on earthli News and has been cross-posted here.

The helpful page, Ignoring files, taught me something I didn't know: there's a file you can use to ignore files in your local Git repository without changing anyone else's repository.

Just to recap, here are the ways to ignore a file:

  • Global .gitignore: you can designate basic exclusion directives that apply to all repositories on your system. This file is not committed to any repository or shared with others. Execute git config --global core.excludesfile ~/.gitignore_global to set the file to ~/.gitignore_global (for example). See the linked article for sample directives.
  • Per-repository global exclusions: add directives to the .git/info/exclude file in any repository. These directives are combined with any system-global directives to form the base exclusions for that repository. This file is not committed with the repository. This is the one I'd never heard of before.
  • .gitignore: add a file with this name to any directory. The directives in that file are merged with those from the parent directory to define the patterns that are excluded in that directory and all child directories. This is definitely the most common way to exclude files.
  • Exclude versioned files: and, finally, if your repository has files that are changed but not committed (e.g. configuration files), you can ignore future changes to those files with a call to git update-index --assume-unchanged path/to/file.txt. While this can be useful for legacy projects, it's best to structure new projects so developers don't have to rely on easily forgotten tricks like this.
Time Machine Backups

This article originally appeared on earthli News and has been cross-posted here.

I continue to be mystified as to how Microsoft has not managed to create a backup system as seamless and straightforward and efficient as Time Machine for OS X. The software is, however, not without its faults. As is usual with Apple software, Time Machine becomes quite frustrating and unwieldy when something goes ever so slightly wrong.

When it works, it works very well. It is unobtrusive. You have hourly backups. It is as technology should be: serving you.

At the beginning of the year, I bought an NAS (Network-attached Storage) to improve file-sharing at home. I then moved my Time Machine backups from an individual external hard disk for each OS X machine with Time Machine support (a grand total of two of them) to the home cloud (the aforementioned NAS).

This all worked quite well. I connected each machine to the NAS directly to create the initial, full backup and, after that, the machines burbled along, backing up efficiently over the wireless network.

That is until, one day, something went mysteriously wrong. Both of my machines have experienced this, seemingly without cause. The helpful error message is shown below.


If you read through it carefully, you'll see quite an implicit threat: the "Start New Backup" button, offered as the "quick-win" solution, will simply throw away all of your previous backups.

Don't be seduced by the "Back Up Later" button. All it does is show you the exact same message one day later. You are free to put off the decision indefinitely, but you will become well acquainted with this message.

Thanks Apple! Is that really the best that you can do? You just give up and tell me that I have to either (A) reconnect my machine to the LAN and run a backup that will take 12 hours or (B) just go ahead and try the same, but on the wireless LAN, which will take four times longer.

This is a typically technocratic software failure: the error was caught and acknowledged, so ... mission accomplished. That is most decidedly not the case. Apple should be eminently aware that this message will be shown to people for whom a fresh non-incremental backup entails not just dozens of hours but possibly days. Not only that, but uninterrupted hours/days. It is just not acceptable to give up so easily without even trying to repair the problem.

So that's where we stand: the automated backup -- lovely as it is when it works -- performs some sort of verification and then gives up. But a manual verification has, to date, never failed. And I've applied the solution below several times now, for both machines.

The solution is documented in Fix Time Machine Sparsebundle NAS Based Backup Errors by Garth Gillespie[^1]:

  1. su Admin (change to an administrator/sudoer account, if necessary)
  2. su - (change to the root user)
  3. chflags -R nouchg /Volumes/marco/Magni.sparsebundle (fix up flags/permissions)
  4. hdiutil attach -nomount -noverify -noautofsck /Volumes/marco/Magni.sparsebundle (attach backup volume, which automatically starts a file-system check)
  5. tail -f /var/log/fsck_hfs.log (show the progress for the file-system check)

The final command will show progress reports of the file-system check; if the check does not start, see the link above for more detailed instructions. Otherwise, you should see the message,

The volume Time Machine Backups appears to be OK.

in the log. Once this has run, you have to reset the status of the backup so that Time Machine thinks it can use it again:

  1. Browse to /Volumes/marco/Magni.sparsebundle in the Finder
  2. Right-click the file and select "Show Package Contents" from the menu
  3. Open the com.apple.TimeMachine.MachineID.plist file in a text editor
  4. Remove the two lines:
```Change the value of `VerificationState` to 0, as shown below:

VerificationState 0

It's not very straightforward, but it's worth it because *you won't lose your entire backup history*. In my experience -- and that of many, many others who've littered their complaints online -- Time Machine will, at some random time, once again fail verification and offer to chuck your entire backup because it can't think of a better solution.

Not only that, but once you've reset everything and Time Machine has run a backup, you might catch it surreptitiously re-running the verification. I highly recommend canceling that operation. Otherwise, despite the image just having been verified -- and used for backup -- not ten minutes before, Time Machine will once again throw its hands in the air, declare defeat and deliver the bad news that there's nothing for it but to start from scratch.

Irritating as it is to have to perform these steps manually, it doesn't even take that long, even when run over a wireless network. It would be utterly lovely if Apple could get this part working a little more reliably.


[^1]: The example path -- `/Volumes/marco/Magni.sparsebundle` -- is for a volume called "marco" on my NAS where the Time Machine backup for the machine "Magni" is stored. Obviously you will have better luck if you replace the volume and backup names in the path with those corresponding to your own NAS and machine.
Windows Live accounts and Windows 8

This article originally appeared on earthli News and has been cross-posted here.


tl;dr: If your Windows 8 is mysteriously moving your Windows and taskbar around, it might be because of your Windows Live account synchronizing settings from one machine to another.

Starting with Windows 8, you can connect your local user account to your Windows Live account, sharing your preferences and some Windows-App-Store application settings and logins.

I had this enabled for a while but recently discovered that it was responsible for mysterious issues I'd been experiencing on my desktop at work and my laptop at home.

The advantage of using a synchronized account is that, once you log in to Windows 8 with these settings -- no matter where -- you'll get a familiar user interface. Two of the more visible, if mundane, settings are the lock-screen wallpaper and the desktop wallpaper.

Synchronizing wallpaper makes sense because, if you took the time to change the desktop on one machine, there's a good chance you want to have the same desktop on another.

On the other hand, I wonder how many people will be surprised to see the racy and dubiously work-friendly desktop wallpaper that they chose for their home computer automatically show up when they log in at work on Monday morning. Especially if they updated the lock screen as well as the desktop wallpaper. While this type of synchronizing might endanger one's employment status, it's also exactly the kind of synchronizing that I would expect from Windows because it's not hardware-specific.

For the last several months, I've been smoke-testing Windows 8 for general use at Encodo and it's mostly been a quite pleasant upgrade from Windows 7. I don't really make much use of features from Windows 8, but it's very stable and noticeably faster on startup and coming back from hibernate than its predecessor.

Though there are some minor quibbles1, it was generally a no-brainer upgrade -- except that Windows could not seem to remember the taskbar location on either my laptop at home or the desktop at work.

Maybe you see where this is going.

In hindsight, it's bloody obvious that the taskbar location was also being synced over the Windows Live account cloud but, in my defense, Windows moves my application windows around a lot. I have two monitors and if one of them is turned off or goes into a deep sleep, Windows will oblige by moving all windows onto the remaining monitor.2 When you restore the missing monitor back to life, Windows does nothing to help you and you have to move everything back manually. At any rate, the taskbar being moved around coincided enough with other windows being moved around that I figured it was just Windows 8 being flaky.

That the issue also happened on the laptop at home was decidedly odd, though.

Now that I know what was causing the problem, I've turned off the synchronization and each copy of Windows 8 now remembers where it's taskbar was. I guess that, in the trivial situation, where the hardware is the same on both ends, it would make sense to synchronize this setting. But in my situation, where one side has a 15.4" laptop screen and the other has two monitors -- one 24" and the other 27" -- it makes no sense at all.

It's a bit of a shame that I had to resort to the rather heavy-handed solution of simply turning of synchronization entirely but I couldn't find a more fine-grained setting. The Windows 8 UI is pretty dumbed down, so there are only controls for ON and OFF.

  1. The Windows-App-store UI for wireless networks and settings is poorly made. There is no consistency to whether you use a right or left click and you can only choose to "forget" a network rather than just disconnect from it temporarily.

  2. And resizing them to fit! Yay! Thanks for your help, Windows!