Posts

Showing posts from May, 2016

Yo! - I'm a Lambda.

I've just been reading up on the new JavaScript/ECMAScript 6 features and in particular the new fat-arrow syntax for lambdas. It's funny, but whenever I see this syntax () => { } in C# code, my mind always shouts to me "Yo!! - I'm a Lambda". - Okay, I understand that might sound weird... It is weird and I don't know how to stop it! Let me explain! What I mean is, as programmers, when we read code our brain automatically identifies the cryptic string of characters and converts them to a mental model of what the code will do on the fly. For example, when scanning code, if you come across a for or while keyword your brain automatically tells you: "oh... there's a loop coming". If you see an if you automatically know there is a condition and a branch coming. This happens instantaneously without fore-thought. It's like words on a poster. Your mind reads the words even if you're not interested in what the poster is advertising. In fact

Windows Command Line Goodies

Image
With the news that Microsoft is bringing Bash to Windows (what a crazy world we live in!), it looks like I'm going to add "bash" to my "one more thing to learn" list. In the meantime, I thought it would be good to list the common daily windows cmd.exe tools that I use and find useful. You can't beat the command line for performing fast, repeatable, scriptable actions that you might need to schedule or run ad-hoc. Let's start the list: Get the hostname of the computer you are on If you are like me and can be logged into many remote desktop sessions, then it can be useful to find out the hostname of the computer you are on. To do that, the command is: hostname . This means you will never get caught deleting files from the wrong server again! :) Another simple command is the whoami command which will tell you the user you are logged on as for this session Change the title of the command prompt window Okay, you might laugh, but this is more usefu

Observations on Software Package Managers

It’s interesting to watch the landscape of software development evolve over time. One of those evolution's is the advent of package managers. As an application developer, having access to a global library of code packages which can be pulled down in an automated way, is such a valuable addition to the development experience. They are everywhere! For example: JavaScript has the NPM C# has got Nuget Python has got Pip Ruby has got RubyGems and Bundler Swift has one built into the build system Go has the "go get" command Java has Maven PHP has Composer Rust has got Cargo built right into the language Package managers are here and they definitely increase productivity by making common code easier to include in your project. When I first uploaded my projects to Github, I mistakenly included all my third party Nuget packages and forgot that one of the other jobs of a package manager is to install/restore missing packages when required. Beautiful… That, is