Suck it up and be a noob

Posted on Mon 17 September 2012 in Opinion • Tagged with angularjs, pain

This is a whine post, but I really need to get it out of my system. Apologies in advance!

I’ve battled with Angular for a while now. It’s a JavaScript framework that allows you to write rich client-side applications in very short time with goodies such as two-way …

Continue reading

One assertion per test, please

Posted on Wed 25 July 2012 in Coding • Tagged with assertion, qunit, testrules, javascript

When it comes to unit or integration tests, there are of course good ones and bad ones. There are few things more treacherous than a test suite filled with low-quality tests that don’t test what they’re supposed to, if anything at all. When the test suite goes green …

Continue reading

A Chrome extension for easy ID linking

Posted on Sat 21 July 2012 in Tools • Tagged with chrome, extension, linktoid

Occasionally I want to link to specific section of a web page. Previously, I would bring up the source of the web page to see if there was a named anchor tag for the section in question, then I would manually add the anchor name as the URL fragment. Recently …

Continue reading

Changing the user profile path in Windows 7

Posted on Thu 12 July 2012 in Sysadmin • Tagged with profile, windows7

Nothing programmatic about this post, unfortunately. Instead, a bit of rambling about Windows. :-) One of the reasons I don’t use Linux on my desktop computer is that it requires too much constant tweaking, configuring and fixing to get things to work together properly. I tried it twice, and I …

Continue reading

Offline repository sync using git bundle

Posted on Mon 11 June 2012 in Tools • Tagged with bundle, git

Keeping git repositories in sync is usually and easily done using git pull and git push. However, for those rare times when you don’t have network connectivity (or limited connectivity) and still need to transfer the contents of a repository to somewhere else, there’s git bundle.

The bundle …

Continue reading

Regular expression multiline mode - what's a newline?

Posted on Wed 30 May 2012 in Coding • Tagged with newline, regular expressions, csharp, java

I stumbled upon an interesting little detail as I was using a regular expression in a unit test case in a C# application. I had a multiline string and was searching for a particular substring in multiline mode. The newlines in the string were Windows newlines, meaning CR followed by …

Continue reading

Testing asynchronous background workers in .NET

Posted on Tue 08 May 2012 in Coding • Tagged with async, background worker, test, .net

When you build a GUI, all lengthy operations that can be triggered by the user should take place on a background thread so that the GUI doesn’t become unresponsive. Why would it? Well, it’s because all GUI operations take place on a single thread - the GUI thread (the …

Continue reading

Your decisions are likely to suck

Posted on Wed 25 April 2012 in Opinion • Tagged with agile, decision making, decisions

I apologize in advance for being blunt! And it’s not really as bad as the title suggests. But my point is that every decision you make, whether it’s about a small piece of isolated code or the architecture as a whole, may not stand the test of time …

Continue reading

Abusing XML literals in VB.NET

Posted on Wed 25 April 2012 in Coding • Tagged with, format strings, xml literals

One of the things I do like about VB.NET is XML literals. Given that XML is so common, it’s really a great idea! Here’s a tiny example:

Dim x = <p>Some test.</p>

I thought I’d write about how XML literals can be abused to create …

Continue reading

Swedish to not-so-Swedish through diacritics removal

Posted on Fri 06 April 2012 in Coding • Tagged with diacritics, Swedish, unicode

According to Merriam-Webster, a diacritic is:

a mark near or through an orthographic or phonetic character or combination of characters indicating a phonetic value different from that given the unmarked or otherwise marked element

Right! :-) In the Swedish language, there are three common letters with diacritics, namely å, ä and …

Continue reading