Category: Development

  • AngularJS ng-options syntax

    I keep forgetting the correct syntax for ng-options in angular dropdowns. The documentation can be found here: https://docs.angularjs.org/api/ng/directive/ngOptions The syntax used in the documentation is a bit confusing: A concrete example for the syntax would look like this: I hope this helps myself and maybe someone else as well…

  • Don’t use magic numbers

    Quick note to start a new category on this blog: Good practices/Training Everyone who doesn’t know what a “Magic number” in coding is, please quickly read this: http://stackoverflow.com/questions/47882/what-is-a-magic-number-and-why-is-it-bad In some rare cases it might be allowed to use magic numbers (like 0/1 or in a circles calculation you may use 90/180/270/360 if it is clear…

  • Install rails >=1.9.3 on Ubuntu 12.04 (for Redmine) with RVM

    Quick reference on installing specific versions of rails on an “older” version of ubuntu without the need of having all packages in the ubuntu repositories. After doing so, you can continue to install redmine as described in http://www.redmine.org/projects/redmine/wiki/RedmineInstall This will fail if the environment is not set correctly – this helped me a lot: http://stackoverflow.com/questions/12127603/usr-bin-env-ruby-noexec-wrapper-fails-with-no-file-or-directory…

  • Typesafe viewmodel for MVC frameworks

    Ever since I was working with MVC projects, looking at sample code even from Microsoft, I always wondered why everyone is using ViewBag and other “unsafe” techniques for the data to be displayed. I would have sticked to developing PHP applications if I wanted to do that. (And maybe even some PHP frameworks might do…

  • Bézier curves

    Some time ago I did some interview question that I just wanted to share mostly because I want to keep a backup of it. The questions were the following: We start with three dots (green) on the screen. We need to connect these dots with a smooth line (blue) rather than direct lines (grey). What would…

  • play! framework and Google App Engine

    I just uploaded my first app to the Google App Engine – which is unbelievably simple with play! framework and the gae module. The application for my test is just 10 lines of code in the controller and all it does (for now) is to extract the URL of the latest Chromium Build from the…

  • Synchronize a long-running task to the UI-Thread in WPF/.NET

    This post explains how to process data from a task in WPF in a way I’d consider “best-practice”. The main code could or should be in the view-model. Code-behind (keep it short or better yet use a delegate command) And the code in the view-model: StartSearch() is a method in the view-model class and sets…

  • Howto: Task and issues tracking with Redmine and Eclipse Mylyn

    Howto: Task and issues tracking with Redmine and Eclipse Mylyn

    While working on one of my current projects I came to realize the importance of good task management and issue tracking. Sadly the use of an expensive Team Foundation Server does not guarantee good task tracking when the tasks are only used to do the rough planning in MS Project. Much more important than the…

  • Useful SQL Server Management Studio extension

    Today I discovered a very useful plugin for MS SQL Server Management Studio that has a big feature list and can help out when you miss code completion or need to create stored procedures for CRUD operations. http://www.ssmstoolspack.com/ Enjoy!