Tips and Tricks

39 articles

How Encodo sets up new workstations

Published by Marco on in Tips and Tricks

     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... [More]

Who’s using up my entire SSD?

Published by Marco on in Tips and Tricks

Hard drives => SSDs

 In 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... [More]

An introduction to PowerShell

Published by Marco on in Tips and Tricks

On Wednesday, August 27th, Tymon gave the rest of Encodo[1] 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... [More]

REST API Status codes (400 vs. 500)

Published by Marco on in Tips and Tricks

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... [More]

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

Published by Marco on in Tips and Tricks

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... [More]

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

Published by Marco on in Tips and Tricks

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... [More]

A list of lesser-known OS X keyboard shortcuts

Published by Marco on in Tips and Tricks

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 (StackExchange) 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

  • + + 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.
  • + R reveals the currently selected item in a new Finder window.
  • + + L selects your ~/Downloads folder.
  • + + > 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 + tab to cycle through open applications.
  • Press + ~ (or <... [More]

Ignoring files with Git

Published by Marco on in Tips and Tricks

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


The helpful page, Ignoring files (GitHub), 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... [More]

Time Machine Backups

Published by Marco on in Tips and Tricks

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... [More]

Windows Live accounts and Windows 8

Published by Marco on in Tips and Tricks

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... [More]