Posts in November 2017

Customizing Android Manifest in Cordova

November 17th 2017 Cordova Android

Cordova has well documented support for modifying the contents of AndroidManifest.xml file from a plugin by adding config-file and edit-config elements to its plugin.xml file. It's less obvious that these same configuration elements can also be used directly inside the application's config.xml.

Specifying Android SDK Version in Cordova

November 10th 2017 Cordova Android

In native Android applications, the version of build tools and SDK to build them with can be specified directly in the Gradle build script. In Cordova applications, the build file is automatically generated, therefore any manual changes to it will be overwritten. The question is, where do the values in the generated file come from.

My Visual Studio Video Course Published

I've been pretty busy since early summer, spending most of my spare time recording a video course about features for debugging and testing in Visual Studio 2017. Since Monday, the first part of this video course is finally available to everyone.

Posts in October 2017

Reporting JavaScript Error Details from Promises

October 27th 2017 JavaScript

Promises make it easy to handle errors in asynchronous method calls. The rejection handler can be used to log full error details from a rejected promise. It will also catch any errors that might happen in the fulfillment handler. However, the Error object details might not get logged as you would expect.

Querying ContentChildren of Unknown Type

October 20th 2017 Angular Ionic 2

To reference DOM elements in the component template from the component code, ViewChild and ViewChildren decorators can be used. Similarly, ContentChild and ContentChildren decorators will provide access to DOM elements in the component content. Still, I had a hard time coming up with a way to support a scenario where the component consumer should be able to tag some of the DOM elements that need to be processed by the component.

Access Parent Component from Angular Directive

October 13th 2017 Angular Ionic 2

Angular directives are a great way to extend behavior of Angular components and HTML elements. As long as you only need a reference to the host HTML element to implement your functionality, Angular dependency injection will easily inject it as an ElementRef, along with a Renderer to modify it. If you also require a reference to the host component, it gets a little more complicated.

Hidden Advanced Features of Ionic's Slides

October 6th 2017 Ionic 2 Angular

Slides is a very flexible Ionic component for presenting multiple slides to the user who can swipe between them. However, not all its customization options are exposed as Angular Inputs and Outputs or even fully documented. To see all supported options, one can peek into the source code. The only way to learn more about them is to check the Swiper API reference, which the Slides component is based on.

Posts in September 2017

Handling Hardware Back Button in Ionic

September 29th 2017 Ionic 2 Android

Ionic applications have built-in support for Android's hardware back button. For the root page it closes the application by default. There are ways to change that behavior, though.

Functional Array Operations in JavaScript

September 22nd 2017 JavaScript TypeScript

JavaScript's Array prototype provides a comprehensive selection of methods which lend themselves nicely to functional programming approach, such as ma and reduce. Surprisingly, when doing code reviews I often see that developers are not aware of them or not used to using them. In this post, I'll do an overview of these functions with examples how they can simplify your code.

Faster Ionic Tests Without TestBed

September 15th 2017 Ionic 2 Unit Testing Angular

Although the official Ionic templates aren't preconfigured for unit testing, there is no lack of guidance in this field. It's not all that difficult to get started with unit testing any more. However, as the number of tests in the project will start to increase, it will soon become obvious that the test are quite slow.

Writing an Ionic Native Wrapper

September 8th 2017 Ionic 2 Cordova TypeScript

Ionic Native makes it very convenient to use Cordova plugins from Ionic applications. Although Ionic Native provides an impressive collection of wrappers for many Cordova plugins, there are still Cordova plugins out there without a corresponding plugin. In such cases you will need to either use them directly without a wrapper or write your own wrapper. The latter option is much simpler than you might think.

Detecting Camera Permission Dialog in Browser

September 1st 2017 HTML 5 JavaScript Web Analytics

When trying to capture camera video from browser using MediaDevices.getUserMedia, user consent is required. On first call the browser will show a dialog to the user who can either allow or block access to the camera. It might be useful to have some analytical data for your application on how many users blocked the camera access, but unfortunately there's no direct way to detect from code when the dialog was shown and how the user answered.

Posts in August 2017

Google Analytics Send Timeout in Ionic

August 25th 2017 Web Analytics Ionic 2

If you want to use Google Analytics as the analytics tool for your Ionic mobile application or progressive web application (PWA), there's an Ionic Native wrapper available for the Cordova plugin with support for mobile platforms as well as the browser (web) platform. Unfortunately, it consistently threw errors for me, when I tried to send a screenview event for the entry page.

Scaling 3D Secure Iframe for Mobile

August 18th 2017 Braintree Ionic 2

When implementing 3D Secure with Braintree for a web page, the bank's verification page is passed into the JavaScript function as an iframe element to embed into the web page. Unfortunately, the bank pages have fixed 400px width, therefore they don't fully fit on narrower mobile screens.

Roboto Font Missing Characters in Ionic

August 11th 2017 Ionic 2 Web Fonts

By default, all text in Ionic 2 uses Roboto font, which is also bundled with the framework and automatically distributed with every created application. This all sounded great, until I noticed that some characters are rendered with a different font.

Firebase Push Notifications in Ionic and Cordova

August 4th 2017 Firebase Ionic 2 Cordova

Ionic has no built-in support for Firebase Cloud Messaging (FCM), which is now also Google's official push notification infrastructure for Android. However, since Ionic is based on Cordova, it's still easy to make it work with one of the available Cordova plugins.

Posts in July 2017

Order of Cordova Plugins Matters

July 28th 2017 Cordova iOS

I was convinced that it doesn't matter in what order plugins are added to a Cordova project. However, I recently encountered an issue with unexpected entries in iOS Info.plist file, which turned out to be caused by incorrect order of plugins in config.xml file.

Breaking Changes in Android SDK 26

July 21st 2017 Android Cordova Ionic 2

I have finally updated Android SDK to the latest version, because I wanted Android Studio to stop informing me about available updates on every startup. Unfortunately several breaking changes have been introduced since the version I was using before, which altogether broke my regular flow of work.

Proguard Configuration in Cordova

July 14th 2017 Proguard Cordova Android

Proguard is an optimizer and obfuscator for Java code. It can easily be enabled with only a few entries in the Gradle build script. In Cordova applications, the build script is regenerated on each build, therefore you'll need a plugin to add the required entries to it unless you want modify it by hand every time.

Extending Cordova Google Maps Plugin

July 7th 2017 Cordova Google Maps Android

While you could use Google Maps JavaScript API in Cordova hybrid mobile applications, native Google Maps SDKs for Android and iOS offer much better user experience. There is a plugin available, to use them from Cordova. It even has an undocumented extensibility model.

Posts in June 2017

Slides and Code from My SLODUG Session

The last Slovenian Developers User Group meeting before the summer break consisted of the two most popular sessions from Microsoft NT Conference, as voted by the user group members.

Configuring VS Code for Ionic Development

I've been doing a lot of Ionic 2 development lately in Visual Studio Code lately. The editor has great out-of-the-box support for TypeScript, HTML and CSS editing. There's also a lively ecosystem for extensions, which can improve the development experience even further. I'm going to describe my current configuration and the selection of extensions that I'm using.

Generating Swagger Client-side Code

The biggest advantage of having a formal description for a RESTful API is the ability to programmatically generate client-side code for calling the service. Unfortunately, it turned out that Swagger tooling still leaves much to be desired, at least for generating TypeScript Angular code.

Change Detection in Non-Angular Callbacks

June 9th 2017 Angular Ionic 2

Recently, I was troubleshooting a curious bug that only happened on one page in my Ionic 2 application: new values from an HTTP request only showed on the page after a click instead of immediately. Wrapping the update code in NgZone.run() helped. However, it bothered me why this was only necessary in this single instance.

Auto Refresh with Manual Override

June 2nd 2017 ReactiveX Ionic 2

Let's create an Ionic 2 page that auto-refreshes at regular intervals with a twist: there's also a button for manual refresh which triggers an immediate refresh. We'll implement it in two different ways: with standard JavaScript functions and with RxJS.

Posts in May 2017

Dynamic Dependency Injection in Angular

I keep getting impressed by how feature-rich dependency injection in Angular is. This time I needed it to inject the appropriate implementation of a dependency based on runtime information. Of course, the scenario is well supported.

Slides and Code from My NT Conference Session

At the beginning of this week the traditional NT Conference was taking place in Portorož. I had my only session this year on Monday, where I talked about .NET Core and .NET Standard.

Intercept HTTP Requests in Angular and Ionic 2

Angular has an impressive dependency injection system, however some aspects could be documented better. Old blog posts explaining how things worked before the final release don't help either. Hence, it took me a while to successfully intercept HTTP requests and inject a common parameter.

Passing Data Between Tabs in Ionic 2

May 5th 2017 Ionic 2 Event Aggregator

When using tabs in Ionic 2, each one of them contains a page that doesn't know anything about the other pages nor their common parent page hosting the tabs. This makes it challenging to switch tabs or pass data between them.

Posts in April 2017

Slides from Global Azure Bootcamp

April 28th 2017 Azure Visual Studio Speaking

On Saturday the fifth annual Global Azure Bootcamp event was taking place all around the globe. In Slovenia the event was organized in Ljubljana at the premises of the local Microsoft subsidiary. I showcased the Visual Studio integrations for Azure Storage, Application Insights and publishing of ASP.NET Core web applications to App Service on Windows and Linux.

Custom Angular Validators with Dependencies

April 21st 2017 Angular Ionic 2 TypeScript

Angular has great support for validating data in forms, both template-driven and and reactive ones, built imperatively with FormGroup. It is also easy to create own custom validators. However, I did not find it obvious, how to use injected dependencies in non-directive validators for reactive forms.

Modify Protractor Configuration for Build Server

As a part of setting up the Ionic 2 project I am currently working on, I decided to also configure end-to-end testing using Protractor. I based it on the excellent Clicker demo project. It worked great for running tests during development, but lacks support for headless test execution on a build server.

Sharing Ionic 2 Code Between Projects

April 7th 2017 Ionic 2 Angular Git

Ionic 2 includes many components and native wrappers out of the box. However, you will probably want to share some of your own code between projects if you are working on more than one of them and they are at least remotely similar. Since Ionic 2 builds on top of Angular, shared modules are the right tool for the job.

Posts in March 2017

Configuring Ionic 2 Web Applications

March 31st 2017 Ionic 2 Cordova

Although there's a lot of talk about Ionic 2 being suitable for creating progressive web applications (PWA), there's little guidance on how to actually configure a project to achieve this. In this post I am listing everything I changed in my project, to build a mobile web application (not yet progressive).

Unit Testing Code with Observables

Many Angular 2 and Ionic 2 APIs return RxJS observables. To unit test your code that's consuming them, you will need to create your own observable streams with test data. With this approach I wrote tests for code reacting to user's current geolocation.

Render Captured Video to Full Page Canvas

March 17th 2017 HTML 5 JavaScript

In modern HTML 5 browsers you can render video from your camera inside a web page using the video element. However, to further process the captured video or add some custom rendering on top of it, the canvas element needs to be used. Due to the ever changing APIs in this field, it's not easy to find up-to-date working sample code for achieving this.

Slides from Visual Studio 2017 Launch Event

March 10th 2017 Visual Studio Docker Speaking

Tuesday was the Visual Studio 2017 release day. To celebrate this occasion, Microsoft organized an official 2-day launch event. It was accompanied by a large number of local events all across the world. One of them was organized in Ljubljana as well. I had a short session there, presenting the most important new features and improvements in Visual Studio 2017.

Custom Data in Braintree Hosted Fields

March 3rd 2017 Braintree ASP.NET Core

Braintree's Hosted Fields offering is a great compromise between payment form customization and PCI SAQ A compliance requirements. Although it is not immediately evident from the documentation, the payment form can also easily be extended with custom data fields that your business might require. This post demonstrates how to do it in an ASP.NET Core application.

Posts in February 2017

Importing JavaScript Libraries in Angular

February 24th 2017 TypeScript Angular

Angular makes heavy use of ECMAScript 2015 modules. All components and other Angular objects are modules themselves, therefore the tutorials explain early on, how to import and use them. However, how does one import a third party library which still exports legacy CommonJS or AMD modules?

Challenges of Ionic 2 Production Builds

February 17th 2017 Ionic 2 Angular TypeScript

By default, Ionic 2 produces unminified development builds. To force an optimized production build, you need to add --prod switch to ionic build or ionic run command. Since development build doesn't include Angular AoT (Ahead of Time) compilation, your production build might turn out broken even if development build of the application worked just fine.

Git SSH Key Management with OpenSSH and Putty

February 10th 2017 Git SSH Putty

In Windows, there are two approaches to accessing Git repositories using SSH. Command line Git distribution and posh-git are preconfigured for OpenSSH, while SourceTree by default relies on PuTTY. The two stacks use different formats for storing both private and public keys. Fortunately, there is a way to convert between the formats using PuTTY's key generation utility.

Offline Installation of .NET 3.5 in Windows 10

February 3rd 2017 .NET Framework Windows

Windows 10 by default doesn't come with .NET Framework 3.5 installed, however some older applications still require it. You can install it by enabling the corresponding Windows feature, however you need to be online for this to work. Fortunately you can use DISM.exe to work around that requirement.

Posts in January 2017

Angular Tutorial with Async and Await

January 27th 2017 Async TypeScript Angular

In version 2.1 that was released in December 2016, TypeScript finally added support for downlevel transpilation of async and await keywords for ES3 and ES5 targets. To give this new feature a try, I decided to convert the Angular Tour of Heroes tutorial to use async and await.

HTTPS in TeamCity with Let's Encrypt Certificate

January 20th 2017 TeamCity Let's Encrypt PowerShell IIS

When exposing your TeamCity build server to the internet, you'll want to use HTTPS so that users won't have to send their passwords over an unencrypted connection. Thanks to Let's Encrypt, you can now get the SSL certificate for free, but there is still some work involved to get everything configured correctly.

Debug Ionic 2 Apps in VS Emulator for Android

The official Android emulator has a big disadvantage for regular users of Hyper-V: you cannot run the emulator accelerated when Hyper-V is enabled. Fortunately, there is an alternative: Visual Studio Emulator for Android, which uses Hyper-V for hardware acceleration.

Enabling Font Ligatures in Code Editors

Many operators and other symbols in programming languages consist of multiple characters, but still represent a single token. Although as programmers we learned to view these symbols as single logical units, ligatures allow joining of multiple neighboring letters into a single glyph. With correct fonts and editor support these can be used to improve the rendering of source code on screen.

Posts in December 2016

Advent of Code 2016

December 25th 2016 C# LINQPad .NET Framework

For the second year in a row, I spent a significant amount of time in December solving the Advent of Code programming puzzles. Before writing the first line of code, I created a repository for my solutions. Unlike last year, I wanted to have all the code readily available for future reference. More than once, I actually looked up previous solutions while solving a more recent puzzle.

Testing Modular Client-Side TypeScript Code

December 17th 2016 Unit Testing TypeScript

In my previous posts I've already addressed unit testing of client-side JavaScript and TypeScript code, however since browsers don't natively support the ECMAScript 6 module system, simply transpiling the code is not enough for the tests to run in the browser.

Posts in November 2016

Debugging Ionic 2 Apps in Chrome from Visual Studio Code

November 22nd 2016 Ionic 2 Debugging Visual Studio Code

Ionic 2 is the successor to the quite popular hybrid mobile framework. It is based upon Angular 2, but unlike it, it hasn't yet reached the final release; the latest version is Release Candidate 3. This makes it still a bit rough around the edges and lacking in documentation. Debugging with source maps is one of the features, which still pose a challenge to set up for many developers.

Posts in October 2016

Debugging Karma Tests in a Browser

Having unit tests usually drastically reduces the need for interactive debugging. However, being able to debug unit tests can sometimes prove very useful. Nowadays, any browser includes a fully featured debugger as part of its developer tools, and Karma test runner has a dedicated feature for in-browser debugging. I wrote short instructions on how exactly to use this feature for a project I am working on.

Configuring Karma for Bower Dependencies

October 15th 2016 AngularJS TypeScript Unit Testing

Although, I have now configured my Cordova project to automatically copy distribution files from installed Bower packages and reference them from HTML pages, there's still one final part of Bower-related configuration left: unit tests also require Bower dependencies. I don't want to manually update the configuration of my test runner every time I install an additional Bower package.

Injecting Bower Dependencies into HTML Pages

October 13th 2016 Cordova Gulp Visual Studio

I selected Bower as the package manager for client-side JavaScript libraries in my Cordova project. I already took care of copying the required JavaScript files to a folder that will be packaged into the application. However, to use the scripts, they also need to be referenced from the HTML page(s). I don't want to do it manually if I can automate the process.

Posts in September 2016

Find Invalid Links in Excel That Cannot Be Broken

September 18th 2016 Microsoft Office

If an Excel file contains links to other workbooks, Excel will offer to update the data every time you open the file. If the linked workbook doesn't exist, it will provide an option to edit the invalid link. There is an option to remove it in the dialog that opens. Unfortunately, the command silently fails in certain scenarios.

Slides and Code from My Sessions at Cancel Conference

September 17th 2016 Async C# .NET Core Speaking

This week the second community organized Cancel conference was taking place in Ljubljana. It spanned over two days. Thursday was the main conference day with 20 sessions grouped in 4 tracks. On Wednesday afternoon preconf was organized at the premises of Microsoft Slovenia. I had my sessions on both days.

Posts in June 2016

Distinguish Between Manual and Programmatic Map Movement in Leaflet

June 26th 2016 Leaflet AngularJS

Leaflet map state can be manipulated in two ways: manually using mouse to pan and zoom or programmatically with a set of methods for this specific purpose. In some cases it can be useful to know which of these two approaches was used for manipulating the map. Unfortunately Leaflet doesn't have a built-in way to distinguish between the two map manipulation modes, but with a good enough understanding of the JavaScript runtime this can still be achieved.

Package Management for TypeScript Cordova Apps in Visual Studio

Visual Studio Tools for Apache Cordova is a Visual Studio extension for developing Cordova apps inside Visual Studio. Although it comes with a TypeScript based project template, it is not fully preconfigured for package managers that can simplify the use of JavaScript libraries and TypeScript definitions. This post describes how I configured a project I recently started working on.

Running Code Analyzers on Build Server

The introduction of diagnostic analyzers in Visual Studio 2015 significantly lowered the bar for development of custom static code analyzers. The supporting infrastructure makes it easy to have the same static analysis run after every commit as part of continuous integration on your build server - you just need to configure your Visual Studio projects correctly.

Posts in May 2016

Slides and Code from My Sessions at NT Conference

May 20th 2016 Async C# Speaking

It's May again, which means the annual NT Conference was taking place in Portorož at the beginning of this week. This year I had two sessions scheduled, the first one on Monday and the second one on Tuesday.

Posts in April 2016

Lifeline-like Notifications in UWP

April 2nd 2016 Universal Apps

When Lifeline was originally released in 2015 for iOS, it became the number one paid app in the App Store. Although, in essence it was just a text based adventure, it took full advantage of interactive notifications introduced in iOS 8, creating an illusion of real-time communication with the stranded astronaut Taylor. While Windows Phone 8 and 8.1 had no support for custom toast interactions, making the experience impossible to recreate, notifications in Windows 10 are on par with iOS and Android.

Posts in March 2016

Redirection from Namespaced Controllers in Grails

March 19th 2016 Grails

Post requests in web applications can often confuse less technically savvy users and in the worst case even cause inconsistent data if a non-idempotent post request is repeated. Post/Redirect/Get is the design pattern that's typically used to avoid most of the undesired side effects of post requests. Of course, the pattern can easily be implemented in Grails, as well. Though, when using namespaced controllers, things can get a bit more complicated.

Accessing Application Files from Code in Grails

March 13th 2016 Grails

In web applications, server-side code will sometimes need access to additional external resources, such as font files, certificates etc. If you want to distribute them as part of your application, the path to the corresponding files will need to be determined at runtime, as it depends on the deployment location. As far as I could determine, there are two options, where to put such files.

Versioning Application Data in Universal Applications

March 5th 2016 Universal Apps

New versions of applications introduce new features. Sooner or later this inevitably causes the format of locally stored application data and settings to evolve, as well. To avoid loss of data or even application crashes, newer application versions must be able to at least read older data formats or convert them to its own native format. The option of having data roamed between different devices with potentially different versions of application, can make handling data format changes even more complex.

Posts in February 2016

Create a Reserved IP for a Classic Azure VM

February 29th 2016 Azure PowerShell

Newly created classic virtual machines in Azure have dynamic public IP addresses. Although, Resource Manager is now the recommended deployment model, there are still image templates in the marketplace that requires classic deployment model. If you don't want the IP addresses of these virtual machines to change when they are stopped, you will need to reserve the IP. At the moment this can only be done using Azure PowerShell.

Setting Up Docker in Azure VM

February 28th 2016 Docker Azure ConEmu

Having leftover Azure credit from my MSDN subscription made Azure a logical choice for hosting Docker in a Linux virtual machine. This post documents the steps I took to create a convenient working environment on my Windows workstation.

Get Notified When a Background Task Completes

February 27th 2016 Universal Apps

At first sight there doesn't seem to be a way for a universal Windows application to be directly notified, when one of its background tasks has completed. Fortunately, there is an event that will get raised when a specific background task completes. In this post I'll explore how to take advantage of it and what it allows you to do.

Multibinding in Universal Windows Apps

February 21st 2016 Universal Apps XAML

There are a lot of features in WPF that are not available in other XAML dialects, such as the latest one for Universal Windows applications. One of them is multibinding, which allows binding of multiple view model properties to a single dependency property of a WPF control. Fortunately, there is a third party library available which makes this possible in UWP apps as well.

Deploying ASP.NET Core RC1 Application to IIS

February 14th 2016 ASP.NET Core IIS Visual Studio

If you're used to the old ASP.NET, it's not all that obvious how to deploy an ASP.NET Core application to IIS. Although, there is documentation available for the process, I still struggled a bit, before I got everything working. This post contains the steps I had to take, so that I can simply follow them the next time. At least, until something changes again with one of the future releases.

Handling Events with Angular Leaflet Directive

February 8th 2016 Leaflet AngularJS

Leaflet JavaScript library includes comprehensive support for events, raised by the map itself or by one of many objects rendered on the map. Detailed documentation covers all aspects of working with events: management of individual event listeners, structure of arguments passed to listener functions, and a list of supported events for the map and for each individual object type. Angular Leaflet directive broadcasts all these events as standard JS events, but the documentation is much more scarce.

Strings in .NET Are Not Null Terminated

February 7th 2016 C# .NET Framework

Are you used to the fact that strings are null-terminated? Well, in .NET framework they are not. In this article I explore the consequences of that, explain the circumstances under which you might stumble across it, and suggest, how to avoid being affected by it.

Posts in January 2016

Continuous Testing with Wallaby.js

I first stumbled across wallaby.js while working on my previous articles about continuous testing in the JavaScript ecosystem using Karma. After reading more about it in Scott Hanselman's blog post, I decided to try it out myself.

Bringing a Marker to Front in Leaflet

January 23rd 2016 Leaflet AngularJS

Leaflet is an open-source JavaScript library for interactive maps. It's very feature rich, but its sometimes hard to find resources on approaches that deviate from the most common ones. When handling many markers in a small region, clustering is the go-to solution, but certain scenarios can require every markers to be rendered all the time. Leaflet has features to keep individual markers easily accessible nevertheless.

Continuous Testing of TypeScript Code

After taking a closer look at continuous testing of JavaScript code, I'm moving on to other languages that transpile to JavaScript. I'll mostly be focusing on TypeScript, but there aren't many differences with other languages. I'll mention some of them at the end of this post.

Continuous Testing of JavaScript Code

Unit testing is a crucial part of development in any language, but its even more important in dynamically typed and interpreted languages such as JavaScript because there's no compiler doing at least basic validation of the code. Just like in .NET development, quick feedback is very valuable, and nothing can beat continuous testing in this field.

Using Nested Resources in JSData

January 3rd 2016 JSData

JSData is built around resources and CRUD operations on them. It is an easy to understand abstraction as long as our domain maps well to it. Getting a filtered subset of resource instances is a common enough operation which can introduce subtle bugs if not implemented correctly. Defining nested resources in such cases is a good idea when wanting to avoid too many parameters in query strings.

Posts in December 2015

Continuous Testing in Visual Studio

Ever since I have tried out NCrunch, I never looked back. Continuous running of tests as implemented in NCrunch significantly changed how I look at tests. Since then continuous testing has become much more mainstream and today both ReSharper and stock Visual Studio offer support for it. It was about time I took another look at the other tools and see how they compare to NCrunch today.

Unit Testing JSData Code in AngularJS Services

December 20th 2015 JSData AngularJS Unit Testing

JSData is a feature rich data modeling library for JavaScript with good support for AngularJS. Although the documentation isn't perfect, it's not too difficult to get started with the library. Testing the code which uses the library, is a different matter altogether. There is a mocking library available, but it literally has no documentation.

Don't Overwrite Plugin Assets with Your Own

December 13th 2015 Grails Asset Pipeline

Grails web application framework does a great job at taking care of the plumbing, without the developer having to know about all the details. Grails Asset Pipeline plugin follows the same general approach in doing the processing of static assets, such as JavaScript and CSS files. However, not knowing about the implementation details can become a problem, when troubleshooting issues that arise because of them.

Can a Static Field Be Initialized Multiple Times?

December 12th 2015 C# Universal Apps

Under what circumstances can a static field be initialized multiple times? C# language specification makes it pretty clear that static fields are initialized only once, before the class is first used. This meant, it was time for some creative thinking, when I encountered an issue, seemingly caused by the static field being initialized multiple times.

Be Careful When Copying Visual Studio Projects

December 5th 2015 Visual Studio .NET Framework

You might not be aware of it, but Visual Studio projects have additional identity beyond their project file name and path. Each one of them contains a GUID value which should by definition be unique in normal circumstances. The troubles begin, when you create a copy of a project by copying its folder and renaming the files.

Posts in November 2015

Windows Phone Emulator Unable to Connect to Windows Phone OS

November 28th 2015 Hyper-V Windows Phone Universal Apps

When I tried to run a universal application in the Windows Mobile 10 Emulator today, I was greeted with an error. The phone OS in the emulator was unresponsive and Visual Studio couldn't deploy the application to it. Here's the solution that worked for me in the end.

Resources From My Sessions at TechDays 2015

November 24th 2015 Universal Apps Speaking

Today the first TechDays conference of 2015/2016 took place at the premises of Microsoft in Slovenia. Me and Andrej Tozon, a fellow Slovenian Microsoft MVP, did a track on Windows 10 Universal Apps. He started with 2 overview sessions about what's new and how to migrate existing Windows Store and Windows Phone applications to the new development platform. I followed with a deep dive into 2 more specific topics.

Windows 10 Media Creation Tool Fails to Start

November 22nd 2015 Windows PowerShell

I recently broke my streak of 3 Windows 10 upgrades without any issues whatsoever, when I needed to upgrade my new Lenovo laptop. I downloaded MediaCreationTool to create a bootable USB stick for a clean Windows 10 installation. After the download got stuck at around 30 %, I killed the MediaCreationTool process. When I tried to start it again, it failed with the following error: Setup couldn't start properly. Please reboot your PC and try running Windows 10 Setup again.

Posts in October 2015

Running Windows Store Tests in TeamCity

October 18th 2015 Unit Testing Windows Store TeamCity

Based on Visual Studio user experience, one would think running unit tests for Windows Store apps is not all that different from running standard .NET framework unit tests using MSTest testing framework. When you try running them on a build server, it turns out there are a lot of differences.

Deploying Additional Files for MSTest Command Line Runner

Whenever I'm developing a non-desktop Windows 8 application I prefer having as much business logic in portable class libraries as possible. The test project can then be a standard .NET class library, allowing mocking frameworks and other helper libraries to be used which are not available elsewhere. Having a dependency on a native platform specific library, such as SQLite, can still complicate things a bit.

Reconfiguring Local AWStats for Azure Web App

October 5th 2015 PowerShell AWStats Azure

When I moved my blog to Azure, I broke the AWStats statistics, which I had configured, when I was still hosting the blog myself. Almost a month after the move it was about time to get it working again.

Running NDepend Analysis in TeamCity

The new version of NDepend brought many new features; among them also integration with TeamCity build server. This convinced me to give it another closer look; evaluating how taking advantage of this can contribute to increasing code quality in larger development teams.

Resources From My Sessions at Cancel Conference

This week the first Cancel conference was taking place in Nova Gorica. I had the last two sessions in one of the development tracks: Diagnostic analyzers in Visual Studio 2015 and Debugging in Visual Studio 2015. Slides and demos are available for download.

Posts in September 2015

Pass Sensitive Information to Grunt Using Command Line Options

September 22nd 2015 Grunt

Before I finally settled with using Web Deploy for deploying my site to Azure, I was also considering using FTP directly from Grunt. I quickly chose grunt-ftp-push as the most promising package for this purpose. A greater challenge was finding a way to keep my FTP credentials out of my gruntfile and source control.

URL Rewrite Rules for DasBlog Month and Date Pages

September 20th 2015 DasBlog IIS

Redirecting old URLs to their new counterparts is an important part of restructuring an existing web site or migrating it to a new engine. In a previous blog post I've already described, how I kept all permalinks working after the migration. I didn't want to create full rewrite maps for redirecting month and date pages; creating a more generic rule made much more sense in this case.

TeamCity Stopped Working After Installing Web Deploy

September 10th 2015 Web Deploy TeamCity

After the last reboot my TeamCity build server suddenly stopped working: 404 errors were returned instead of TeamCity dashboard. It turned out some other process was already listening at port 80 when TeamCity was starting up. It must have been something new I installed since the previous reboot.

Deploy from TeamCity to Azure Using Web Deploy

September 6th 2015 Web Deploy Azure TeamCity

Although Git-based continuous deployment of my site to Azure seemed like a good idea, it turned out too unreliable. I didn't manage to get to the bottom of the issue. Instead I started exploring the alternatives. I decided to use Web Deploy, because it is reasonably easy to set up and it also supports deleting of removed files from the deployment location.

Book Review: Learning .NET High-Performance Programming

September 5th 2015 .NET Framework Book Review

I was expecting in-depth content, describing the good and bad practices in different scenarios supported by measurements, pitfalls to be aware of, options to consider. Instead I only got a high-level overview of several performance related aspects, at best.

Posts in August 2015

Modifying Document Properties in Nested DocPad Layouts

August 15th 2015 DocPad

One of the main DocPad features is support for layouts, which are used to ensure a common design for multiple pages. Layouts can even be nested, which opens doors to a new set options. A typical scenario for using them would be several different types of pages in a single site with a common basic design.

Creating Rewrite Maps for Redirecting Old DasBlog URLs After Migration

After successfully migrating the content from the old DasBlog site to the new DocPad based one, it was time to generate permanent redirects of old URLs to new ones. Since the site is going to be hosted in Azure, I decided to use the URL Rewrite module - rewrite maps to be exact; because I need to map a large number of individual URLs, which can't be covered by a generic rule.

Hosting Font Awesome (or Other Web Fonts) in Azure

August 8th 2015 Web Fonts IIS Azure

I recently deployed my new web site to an Azure web app for the first time. The site seemed to load correctly, but a closer inspection with Fiddler revealed a couple of 404 errors. Font Awesome web font files appeared to be missing, although they were present on the web server, but by default files with .woff2 and .woff extensions are not served.

Continuous Deployment of a DocPad Site to an Azure Web App Using Git

August 2nd 2015 Azure DocPad Git Node.js

In the scope of changing my blogging platform I also decided to switch from self-hosting the blog to hosting it in a Microsoft Azure web app. One of the available features, I want to take advantage of, is continuous deployment from a Git repository at one of the supported repository sites. Of course, the repository only contains the sources for the site, therefore it will need to be built every time the latest version is retrieved from the repository.

Posts in July 2015

Implement Gated Commit Using TeamCity Automatic Merge Feature

July 26th 2015 TeamCity Git

TeamCity has built-in support for gated commit build pattern in the form of pre-tested commits. Unfortunately, to make them work, you need to use a supported IDE or a command line tool. That's why I decided in favor of an alternative approach: automatic merge feature.

Migrating DasBlog Content to Markdown Based DocPad Site

One of the most daunting parts of replacing my current blogging platform DasBlog by a site created with DocPad, is the migration of existing content. Being a software developer, I wanted to automate as much of the process as possible. Even if the total time required wouldn't be all that much shorter, I'd rather spend it writing scripts and learning new tools and technologies, than doing mundane tasks.

Installing Native Node.js Modules in Windows

July 12th 2015 Node.js C/C++ Windows

Npm packages need not only be written in JavaScript, they can also include native Node.js modules. Their sources need to be compiled when the package is installed on the local computer. Making that work in Windows can be a bit challenging.

Using WebStorm to Debug CoffeeScript Grunt Scripts in Windows

July 4th 2015 Grunt CoffeeScript WebStorm

Since WebStorm is my JavaScript IDE of choice, I also wanted to be able to debug my Grunt scripts directly inside it. WebStorm has built-in support for debugging all kinds of Node.js scripts, including Gruntfiles written in JavaScript or CoffeeScript. It just needs to be configured correctly.

Posts in June 2015

Book Review: SignalR Real-time Application Cookbook

If you're looking for a book to learn SignalR from, you can't go wrong with this one. On the other hand, if you're already fluent in SignalR and just want to learn more, it probably isn't your best choice, unless you're interested in one of the above mentioned topics.

Book Review: Mastering TypeScript

June 15th 2015 TypeScript Book Review

I have no reservations about recommending the book to any existing or future TypeScript developer. It can serve as the first book to start learning the language, but can teach you a lot even if you have already been programming in it for a while.

Free Learning Forever Initiative by Packt Publishing

June 4th 2015 Book Promotion

Packt Publishing has started a new initiative; offering a different ebook for free every day. You have a 24 hour window during which the daily book is available, before it is replaced with the next one. You should check the page every day and download any books that might interest you.

Posts in May 2015

Assembly Binding Log Causing Slow Assembly Loading

May 24th 2015 .NET Framework Debugging

Recently I was involved in troubleshooting a strange performance issue, manifesting itself in the form of long initialization time of each newly created process or AppDomain on one of the servers. In the end it turned out, it was caused by assembly binding log being enabled on that machine for a long time.

Using NuGet in Visual Studio Tools for Unity

May 23rd 2015 NuGet Unity Visual Studio

Visual Studio Tools for Unity enable the convenience of developing Unity scripts inside Visual Studio. A naive attempt to install a random NuGet package into the UnityVS project will still most likely fail. To make it work, the NuGet package will need to comply with special requirements. Even then, there will still be some manual work left.

Resources From My Sessions at NT Conference

This year I had 2 sessions of my own at NT conference: What's New in C# 6 and Diagnostic analyzers in Visual Studio 2015. Slides and demos for both them are available for download.

Presenter Mode Alternative in Visual Studio 2015 RC

May 17th 2015 Visual Studio

Productivity Power Tools for Visual Studio 2013 introduced a great feature called Presenter Mode, temporarily increasing the fonts both in the text editor and Visual Studio itself, without having to change the settings and thus affecting your working environment. Since the extension is not (yet) available for Visual Studio 2015, we need to make do with one of the alternatives.

Using WinDbg for the First Time

When an application starts misbehaving in production, attaching a debugger to alive process is out of the question. Creating a memory dump and analyzing it in WinDbg is the way to go. Most of us are required to do this on rare occasions only. To make it easier for me in the time of crisis, I created a short cheat sheet.

Quick Guide to Unit Testing Diagnostic Analyzers

Effective development of diagnostic analyzers strongly depends on unit testing. Debugging diagnostic analyzers requires a second instance of Visual Studio to be started which will host the debugged analyzer as an extension. This takes far too long for being useful during development, therefore using tests instead is a must.

Posts in April 2015

Setting Up Visual Studio 2015 CTP 6 for Diagnostic Analyzer Development

April 19th 2015 Diagnostic Analyzer Roslyn VSIX

Diagnostic analyzers are a new extension point in Visual Studio 2015, performing source code analysis both at compile time and inside Visual Studio during development. I've created a complete list of software, which is required for you to start developing your own diagnostic analyzers.

Book Review: Learning NServiceBus Sagas

The content is not focused only on sagas at all. The samples are very contrived and almost impossible to make sense of by just reading the book. Not even the basic functionality and structure of sagas is properly explained, much less any advanced concepts and usage scenarios. I can't really recommend the title to anyone.

Posts in March 2015

Book Review: Continuous Delivery and DevOps - A Quickstart Guide

The book falls a bit short and remains just an overview of methodologies and approaches, with lots of pointers to further resources. It is still a good starting point to learn about DevOps: what it is and why you might want to take on the task of implementing it.

Book Review: Learning NServiceBus - Second Edition

Whether you're starting to learn about NServiceBus, considering the adoption of distributed architecture in a .NET framework based project, or just want to know what NServiceBus is about, you should read this book.

Running Grunt Build Scripts in TeamCity

Writing a build script was only the first step in setting up continuous integration. In this follow-up post I describe how to configure TeamCity for Grunt and provide a couple of hints how to make it work even better.

Creating a Build Script For a DocPad Site

Since my first DocPad project is slowly nearing completion, it was time to create a build script for it. I decided to use Grunt, which allowed me to achieve everything I wanted to: generate the static site, detect broken links in it, and deploy it to the web server.

Posts in February 2015

Compile Error: 'ResourceDictionary' Root Element Is a Generic Type

February 22nd 2015 WPF XAML Build Error

ResourceDictionary is not a generic type, hence the above error makes no sense. Still, you can encounter it in a WPF project if certain conditions are met. The post describes these conditions and suggests the workarounds I know of to get rid of this bogus error message.

Invoking Commands from Events in WinRT

February 21st 2015 MvvmLight Windows Store

On most platforms MvvmLight includes a helper class to invoke commands from events. In WinRT it is suspiciously missing. Fortunately, since Windows (Phone) 8.1 you can find a replacement for it in the Behaviors SDK extension.

Book Review: Swift Essentials

February 14th 2015 Swift iOS Book Review

The book is actually a step by step guide to iOS development in Swift for complete beginners. By the end of it the readers should have enough knowledge to write their first simple iOS application even without any previous experience.

Posts in January 2015

Resources from My Visual Studio 2015 Session at TechDays

January 31st 2015 Roslyn NuGet Unit Testing C# Speaking

On Tuesday Microsoft Slovenia organized the second TechDays event leading up to the 20th NT conference. The event consisted of 4 tracks; I had the opening session for the Visual Studio 2015 track. As always slides and demos from my session are available for download.

Configure Drivers to Maintain Aspect Ratio When Scaling the Image (NVIDIA and AMD)

January 25th 2015 Drivers NVIDIA AMD Windows

For some reason display drivers for both NVIDIA and AMD graphics cards have a tendency to scale image to full panel size instead of keeping the default aspect ratio. If you don't like to see your image stretched, you can change the behavior in the corresponding control panel. After recent driver updates both control panel applications got broken somehow on two desktop machines I'm taking care of.

Manipulating settings.dat File with Settings from Windows Store Apps

Windows Store apps store their settings in a registry hive file named settings.dat. Even after loading it into registry the values inside it are non-standard which makes them difficult to read and edit. The post dives into their serialization format and guides the reader through developing a PowerShell function for editing the values.

Book Review: Mastering JavaScript Design Patterns

This book is a recommended reading not only for JavaScript developers, but also for others who want to refresh or expand their knowledge of design patterns. Learning some JavaScript in the process is just an additional benefit.

How to Configure AWStats for Windows and IIS

January 5th 2015 AWStats IIS Web Analytics

AWStats is one of the most popular tools for generating web site statistics from server logs. I've recently set it up on my Windows web server to generate statistics for my blog. This post contains the required steps to make it work.

Posts in December 2014

Book Review: Learning Continuous Integration with TeamCity

I can recommend the book to anyone having TeamCity as their continuous integration server, as well as to those who are considering it as their first or new solution for continuous integration.

Using Non-static AutoMapper Configuration

December 22nd 2014 AutoMapper Entity Framework

AutoMapper is a popular object mapping library for .NET framework. By default its configuration is defined statically, but there is a way to do it non-statically and use per-instance dependencies inside the mapping code.

Installing CanoScan LiDE 50 Scanner on 64-bit Windows 8.1

December 15th 2014 Drivers Canon Windows

Canon's LiDE series of scanners has no official support for years and there are no official drivers for recent versions of Windows. Nevertheless, it's still possible to make them work perfectly and avoid buying a replacement for a still functioning device.

Use AccessFIX to Restore Deleted Data in Access Files and More

Microsoft Access is an often overlooked part of Microsoft Office, but this doesn't stop it from still playing a mission critical role in some companies. In such cases AccessFIX can be a life saver when important data gets deleted or the database gets corrupted and there's no backup available.

Override Ninject Binding Only For a Single Test

The general advice is to avoid using IoC containers in your test code altogether. Unfortunately achieving that when IoC usage is being retrofitted into an existing application, can be challenging. Failing to do that will quickly result in having to reconfigure your IoC container for some of the tests.

Posts in November 2014

Implementing a Grouping Function in CoffeeScript

November 24th 2014 DocPad CoffeeScript Node.js

Encouraged by Scott Hanselman's Get Involved video, I started experimenting with DocPad. Recently I wanted to perform a simple task of grouping a list of pages by the month, they were published in. In .NET I would use LINQ and be done with it in a matter of minutes. Doing this in my new technology stack took a bit more time.

Creating a Custom IAssertionRule for FluentAssertions

November 17th 2014 FluentAssertions Unit Testing

The more I use FluentAssertions, the more I like its flexibility and extensibility. In this post I'm going to focus on assertion rules which can be used to define custom equality comparisons for specific types.

Scope Ninject Bindings to Individual Tests

One of the main reasons for using an IoC container like Ninject is to be able to inject different dependencies into your classes in production code and in test code. Usually you don't even need to use an IoC container in your tests, but when you longer lived dependencies will usually be scoped differently in test code than they are in production code.

Customizing Comparisons in FluentAssertions with Options

November 3rd 2014 FluentAssertions Unit Testing

Unit tests best serve their purpose when they are brief and easy to understand. There are cases when it can be difficult to achieve this; nevertheless it's still worth putting in the effort, as it may pay off.

Posts in October 2014

LightMessageBus: A Standalone Lightweight Event Aggregator

October 27th 2014 LightMessageBus Event Aggregator

In the field of software architecture the terms publish-subscribe pattern, event aggregator, and message bus are closely related to each other. My coworker and friend Goran Šiška recently published the first version of LightMessageBus, his own minimalistic event aggregator. I decided to spread some word about it by giving it a proper introduction.

Book Review: Unity 4 Game Development HOTSHOT

October 17th 2014 Unity Game Development Review Book

If you know your way around Unity, the book will probably teach you a couple of very specific advanced techniques; just don't expect to gain much general knowledge about 2D and 3D graphics, AI and shaders, or you'll be disappointed.

Use Git with Pleasure from All Your PowerShell Consoles

October 13th 2014 Git PowerShell ConEmu

Git's default installation only makes it available from com command line in its embedded terminal. As a regular user of ConEmu and PowerShell, I wanted to make it work in my system command prompt with tab completion and credential caching.

Transactional Behavior of Workflow Persistence When Using PersistenceIOParticipant Extensions

October 6th 2014 Workflow Foundation

Windows Workflow Foundation built-in persistence support can be extended by its host to save additional data. There are a couple gotchas to be aware fo when trying to ensure transactional consistency between the built-in and host-specific data.

Posts in September 2014

FluentAssertions: Make Your Unit Tests Easier to Write and Understand

September 29th 2014 FluentAssertions Unit Testing

When working with complex data structures in your unit tests, you often end up with a lot of plumbing code. FluentAssertions is a library for .NET framework which can simplify your assertion code and at the same time make the error messages much clearer when tests fail.

Slides from My NuGet Session for a Local User Group

September 22nd 2014 NuGet Speaking

I focused on the advantages NuGet brings to the process of managing project references, but also gave a short tutorial on how to create and publish a new NuGet package. I concluded the session by taking a broader look at the NuGet ecosystem and the tools improving it and taking advantage of it.

Minimizing Reflection Usage with Generics and Dynamic

September 15th 2014 Reflection .NET Framework

It's always best to completely avoid using reflection, but unfortunately that's not always possible. Sometimes you need to use APIs, which are not strongly typed. In such cases you should transition from reflection to strongly typed code as soon as possible: because of performance, and because of code readability as well. In this blog post I'll describe a couple of techniques which are useful in situations like this.

Using Web.config Transformations When Debugging Web Applications in Visual Studio

SlowCheetah is a very useful Visual Studio extension which builds upon Visual Studio's built-in support for Web.config transformations. It adds similar XDT transformation file support to non-web projects which can be used even during debugging, while built-in solution for web projects only works for web deployment. There is already a feature request for SlowCheetah for it, but until it's implemented, you'll need to find a different solution.

Debugger Doesn't Trigger Static Type Initialization

September 1st 2014 Debugging Visual Studio C#

According to the C# language specification, the static field initializer should execute before it is accessed for the first time. As it seems, looking up the field value in debugger doesn't trigger the initializer.

Posts in August 2014

ASP.NET MVC Project Build Failure When Switching Between Configurations

After I set up multiple different configurations for my ASP.NET project with different .config file transformations for different environments, a build error started showing up every time I changed to a different configuration. The issue could be resolved by manually deleting a file from obj folder, but I soon got tired of this and decided to investigate further.

Improve ReSharper Static Analysis Using Annotation Attributes

August 18th 2014 ReSharper Static Analysis C#

Static code analysis is a very useful feature of ReSharper. The generated warnings can help you fix bugs which might otherwise remain unnoticed. Unfortunately static analysis is not perfect and it might detect false positives. There are a couple of ways to tell it not to warn us about specific ones any more.

Book Review: C# Tips

August 14th 2014 C# Review Book

No matter how well versed you with C#, the book will teach you something new about it or at least remind you about the stuff you already know without being consciously aware of it. Since the author lets you choose the price for the book, you'll certainly get your money's worth from it.

Traversing Activities in Hosted Workflow Designer

August 11th 2014 Workflow Foundation

One of the more attractive parts of Windows Workflow Foundation is its workflow designer and the possibility of rehosting it in your own application with a minimum amount of code. Often simple rehosting of the designer is enough, but sometimes you will want to do some additional background processing of the workflow as the user is designing it. In this article I'm going to present a way for achieving that.

Using Portable Class Libraries with .NET 4 and Visual Studio 2010

Portable class libraries have recently become so ubiquitous, that it's easy to forget they don't exist all that long. As long as you're using Visual Studio 2012 or later and targeting .NET 4.5, this is not really important. But once you start targeting .NET 4, you should better keep that in mind.

Install .NET Windows Service with a Different Name

Creating a Windows service in .NET could hardly be any easier. Installing multiple instances of such a service on a single computer is not that easy. Since there's not much documentation about it, many articles are describing over-complicated custom solutions instead of taking advantage of the APIs that are already available.

Posts in July 2014

Book Review: OUYA Game Development by Example

I can sincerely recommend the book to anyone, trying to get a glimpse into the world of game development. It can really only serve as the first step on the path to becoming a game developer, but it's definitely enough to see if that's something for you and worth exploring further.

Removing a View from BackStack in MvvmCross for Windows Store Apps

July 21st 2014 MvvmCross Windows Store

Navigation in Windows Store apps is strongly based on the browser model, i.e. the application is keeping a back stack of previously shown pages which will be traversed again when navigating back. but there are some cases in which you don't want the user to navigate back to a specific page in the history. There's no such built-in functionality available in MvvmCross, but it's really simple to add it with the right approach.

DateTime Values in SQLite When Using MvvmCross

July 14th 2014 SQLite MvvmCross

I'm developing an application in MvvmCross, using SQLite for local data storage. I'm taking advantage of MvvmCross SQLite-Net plugin. Recently I stumbled across a very strange behavior, involving a fairly simple table with a DATETIME column. It turns out, SQLite's handling of DateTime values is quite strange.

Exposing FluentValidation Results over IDataErrorInfo

IDataErrorInfo interface is really handy when implementing data validation in WPF. There are many different ways to implement IDataErrorInfo for a DataContext. But since I've recently become quite fond of FluentValidation library for implementing validators, I'm going to focus on using it in this post.

Get NuGet 2 Essentials for just $10

July 2nd 2014 NuGet Book Promotion

Packt Publishing is currently celebrating 10 years of its existence. For this very special occasion they have decided to offer a significant discount on their complete catalog of eBooks and videos - until July 5th all their titles can be purchased for just $10. Since I'm also the author of NuGet 2 Essentials, one of the books in their line-up, I encourage you to take a closer look at this book.

Posts in June 2014

Binding to Individual Dictionary Items in WinRT

June 30th 2014 Binding Windows Store MVVM

XAML has first class syntax support for binding to indexed properties, such as Dictionary. Real properties still have their advantages over indexed ones, such as full support for implementing INotifyPropertyChanged. For Dictionary properties this can only be done for all items in the collection at once. Unfortunately, in Windows Store applications this causes problems when there are bindings to keys that are not present in the new Dictionary.

Unit Testing Navigation in MvvmCross

June 16th 2014 MvvmCross Unit Testing

The best resource on the subject of testing navigation in MvvmCross view models that I managed to find, was Slodge's blog post from almost two years ago. While it still contains useful guidance for today, there have been changes in the framework. After I got it to work in my own project I decided to publish a more up-to-date set of instructions here.

Posts in May 2014

Deferred Evaluation of Collections Passed as Parameters

May 26th 2014 Validation LINQ

Having a parameter of type List is not recommended; IList or even IEnumerable should be used instead when a parameter is only going to be used for iterating through the list of items. This way different types of collections, such as arrays, lists, etc. can be passed to it. But IEnumerable can prove even more useful in certain scenarios.

Ensuring Unique Property Value Using FluentValidation

FluentValidation is a small portable validation library with fluent interface. The fluent API makes validators easy to write and understand. You can find a lot of information about basic usage and even more advanced scenarios in very detailed documentation. I'll rather focus on extending the library with your own custom validation.

Testing View Model IoC Resolution in MvvmCross

Most of the time there's no need to use an IoC container in unit tests. Still, testing the IoC container configuration makes sense in an application to avoid runtime errors which will occur when not all required dependencies for the created object are registered in the application beforehand. This doesn't necessarily mean, the right implementations are being used for all dependencies, but that's not what we want to test.

Book Review: Telerik WPF Controls Tutorial

May 5th 2014 Telerik WPF Review Book

What could have been a show case of designing great UI featuring Telerik's controls with recommended best practices and usage patterns, turned out to only be a shallow overview of a small subset of available controls, interspersed with random opinionated half accurate information.

Strong Name Validation Failed Security Exception

May 2nd 2014 .NET Framework

A couple of days ago I encountered a surprising FileLoadException. The key to the solution was in carefully reading the complete exception message. The last sentence made it clear that strong name validation had failed.

Posts in April 2014

Book Review: Xamarin Mobile Application Development for Android

April 27th 2014 Xamarin Android Review Book

The book is a great first step into the world of Xamarin.Android for a seasoned .NET C# developer with no previous development experience on Android. It's definitely enough to get you started and makes it much easier to decide whether this is the right way to build Android applications or not.

Sqlite Only Executes the First Statement in a Command

April 22nd 2014 SQLite MvvmCross

In sqlite-net only the first statement in a command is actually executed. The remainder is silently ignored. In most cases you won't notice that when using sqlite-net. You will either use its micro ORM layer or execute individual statements. The only common exception that comes to mind, is trying to execute DDL or migration scripts which are typically multi statement batches.

What's New in Windows 8.1 Update Session at Spring NT Conference

April 10th 2014 Windows Store Speaking

On Wednesday I had my only session at the spring NT conference in Bled this year. I was speaking about the new stuff for developers in Windows 8.1 Update. After a short mention of the universal project, I focused on the changes available only to sideloaded enterprise applications.

Posts in March 2014

Ready to Use Dictionary for Objects of Different Types

March 31st 2014 .NET Framework

Recently a colleague of mine mentioned that he has just learned about KeyedByTypeCollection, although it has been included with .NET framework since .NET 3.0. I'm writing this post, because I didn't know about it until that day, either. This leads me to believe that there must be many more developers out there who aren't aware of this niche class being readily available.

Handling PropertyChanged Event in MvvmCross View Model Unit Tests

March 24th 2014 MvvmCross Unit Testing

A great side effect of view models being implemented in portable class libraries when using MvvmCross, is the ability to unit test them on any platform, not necessarily the one you are targeting. So even when developing a mobile application, you can test it in full .NET framework and take advantage of all the tooling available there.

Refreshing Instance Store Handle in Workflow Foundation

March 17th 2014 Workflow Foundation

Certain aspects of Workflow Foundation are still poorly documented; the persistence framework being one of them.

Dynamic Binding of Static and Instance Methods

March 10th 2014 C#

The compiler does not remove static methods when calling through an instance because it does not necessarily know that you are calling through an instance. Because there are situations where it is ambiguous whether you're calling through an instance or a type, it defers deciding which you meant until the best method has been selected.

Slides and Demos from a Local Windows 8.1 Development Event

March 3rd 2014 MVVM Windows Store Speaking

Last Tuesday the local Microsoft DPE team organized a free event for developers thinking about taking part in the regional Windows 8.1 Developers Contest. It was planned as an effective course for developers not having previous experience with development of Windows Store apps. I presented two sessions at the event.

Posts in February 2014

Implementing Converters Returning Native Types in MvvmCross

February 24th 2014 MvvmCross

Although MvvmCross allows creating portable converters which can be used on multiple different platforms, they can still only return types which are also portable. Of course there are cases when it is desirable for a converter to return non-portable classes such as Visibility, Brush or BitmapImage on Windows platforms. The basics are probably already covered by MvvmCross itself; it includes visibility and color converters which can be used on all platforms. Still, there will always be other native classes you will need.

Creating Converters in MvvmCross

MvvmCross is a MVVM framework for XAML platforms, similar to Caliburn Micro and MvvmLight. Unlike its competition it very much focuses on portability and code reuse across all supported XAML platforms (WPF, Windows Phone and Windows Store), and the Xamarin platforms as well (Xamarin.iOS, Xamarin.Android and Xamarin.Mac). Therefore it has its own approach to creating converters, allowing them to be implemented in a portable class library and reused on all supported platforms.

Inconsistent Validation of Extensions in WorkflowApplication

February 10th 2014 Workflow Foundation

While refactoring an application hosting workflow foundation runtime, I stumbled upon an inconsistent behavior in handling and validation of workflow extensions added to the host WorkflowApplication.

Migrating Unit Tests from WP Toolkit Test Framework to WP Unit Test App

February 3rd 2014 Unit Testing Windows Phone

Since Visual Studio 2012 Update 2 there is a project template available for unit testing Windows Phone apps: Windows Phone Unit Test App. Unlike its predecessor Windows Phone Toolkit Test Framework, it doesn't require the tests to be manually started from the device or the emulator. They can be started directly from the unit test runner's window in Visual Studio. This feature should be a good enough reason for migrating any existing test projects from the old framework to the new template.

Posts in January 2014

Unit Testing Windows Phone Applications

January 27th 2014 Unit Testing Windows Phone

If you're used to depend on unit testing during your development or even practice test driven development, working on Windows Phone applications can be a challenge. The fact that the code must always run on the phone (or an emulator), poses some limitations on the execution of the tests.

Unit Testing log4net Logging Code

January 20th 2014 log4net Unit Testing

There's usually no need to unit test the logging code. If you just want to ignore it in your tests, there's nothing you need to do when using log4net. If you want to make sure you're going to log the right information, you can use MemoryAppender in your unit tests.

Connecting to Local IIS Express Server from WP8 Emulator

January 13th 2014 Windows Phone IIS Administration

If you're developing a Windows Phone 8 application which doesn't only connect to public web services to get its data, but also communicates with you own custom web service, you'll want to be able to connect to it from the Windows Phone Emulator with as little hassle as possible. Usually that means that you'll want it to connect to your local IIS Express server.

Mocking EF Context for Unit Testing WCF Services

January 6th 2014 Entity Framework WCF Unit Testing

Units tests are all about testing a specific unit of code without any external dependencies. This makes the tests faster and less fragile, since there are no out-of-process calls and all dependencies are under the test's control. Of course, it's not always easy to remove all external dependencies. One such example is a WCF service using entity framework for database access in its operations.

Posts in December 2013

How to Return Additional Info with HTTP Error Status Codes

December 30th 2013 HTTP ASP.NET Web API WCF

HTTP protocol defines status codes as the means of informing the client about different error conditions on the server, but it can be beneficial to include additional information about the error. The best approach to it depends on the scenario.

Configuring Common NuGet Repository for Multiple Solutions

December 23rd 2013 NuGet Visual Studio

When using NuGet, you typically don't need to worry about its repository location. In simple every day scenarios it just works without even paying attention to it. Once you have more than a single solution file for your product, this default approach starts to break down. To be more precise; the problems occur when a single project file is included in multiple solutions files, which are not placed in the same folder.

Troubleshooting Web Applications Accepting Client Certificates

December 16th 2013 PKI ASP.NET

Configuring web applications which need to accept client certificates is one of those tasks which I am doing just rarely enough to forget about the issues I had to resolve to make everything work the previous time.

Unit Testing Asynchronous UI Code in WinRT

December 9th 2013 Windows Store Unit Testing Async

Writing unit tests for code that needs to be run on the UI thread can be quite a challenge in WinRT. TestMethodAttribute supports asynchronous test methods but doesn't run them on UI thread. UITestMethodAttribute runs test methods on UI thread but doesn't support asynchronous methods. Still, I managed to make the test method asynchronous and run it on the UI thread.

My Book NuGet 2 Essentials is Now Available

December 2nd 2013 Book NuGet

NuGet 2 Essentials is an up-to-date complete guide to NuGet, written in a very concise and practical manner with many hands-on examples to learn from and to see the features in action. As the book author, I'm of course biased, but I think currently it is the best available resource for learning about NuGet.

Posts in November 2013

Using NDepend to Analyze Your Code

Recently I got my hands on the full version of NDepend and I decided to take advantage of that by trying it out on a couple of projects I am working on, both personally and professionally. It turned out that NDepend isn't all that easy to use if you want to make the most out of it. In this post I'll go over the steps I made to set everything up and reconfigure it in a way that made the results more meaningful to me.

Writing Modular NAnt Build Scripts

November 18th 2013 NAnt

I've been quite happy with NAnt as the tool for writing build scripts. Though, once these scripts reach a certain size, they become harder and harder to maintain. The main reason for that is a lack of modularity.

Data-Driven or Parameterized Tests in Windows Store apps

Since I usually write my unit tests in NUnit, I got into the habit of using parameterized tests when testing methods for which I need to check the result for many different input values. Unfortunately using NUnit is not an option with Windows Store apps. Only MSTest is supported, providing data-driven unit tests for such cases.

Book Review: .NET 4.5 Parallel Extensions Cookbook

I have learned quite a few new tricks while reading the book and I would have even more if it wasn't for my previous hands-on experience with many of the topics covered. If you are considering or already developing parallel or asynchronous code, I strongly recommend reading this book.

Posts in October 2013

Using Abstract Override in C#

October 28th 2013 C#

Recently the abstract override language construct has been brought to my attention. Knowing about both keywords, there isn't much doubt what it means to the compiler. The combination of both keywords can only be used in two cases.

Book Review: Developing Windows Store Apps with HTML5 and JavaScript

October 21st 2013 Windows Store JavaScript Review Book

I would recommend this book to anyone with no or minimal knowledge about Windows Store apps, who's interested in developing them using HTML5 and JavaScript, even if he isn't already proficient in them.

Windows 8 Sessions at Autumn Part of NT Conference 2014

October 14th 2013 Windows Store Speaking

On Thursday the first day of NT conference 2014 took place in Ljubljana. I had 2 sessions on the client application development track. I opened up the track talking about what's new for Windows Store application development in Windows 8.1. In my next session I focused on development of occasionally connected applications for Windows Store.

Generating Word Documents in Windows Store Applications

Since Word introduced Office Open XML (docx) file format, it became much easier to programmatically generate documents from applications without requiring Word to be installed on the machine for Word Automation to work. Unfortunately Open XML SDK doesn't work with Windows Store applications. The only alternative available for Windows Store apps at the moment seems to be DocIO from Syncfusion.

Posts in September 2013

Changing Network Location to Private in Windows 8.1

September 30th 2013 Administration Windows

Windows 8.1 doesn't seem to always ask for location (public or private) when connecting to a new network for the first time, instead it often defaults to public. While this certainly is more secure than the opposite option, it can cause difficulties when trying to take advantage of features that are by default disabled on private networks, such as network discovery and remote access. Since enabling them for public networks would be insecure, the only option to use them on such a network is to change the location to private as it should be.

Automatically Backing Up TeamCity

September 23rd 2013 TeamCity Administration

After switching to TeamCity one of the first tasks was setting up proper backup of its configuration. There are multiple ways to backup TeamCity data. The only one that can be performed remotely is exposed over TeamCity's web UI. Fortunately it can also be triggered via REST API for easier automation.

Migrating a Subversion Repository to Git

September 16th 2013 Git SVN

I've been using Git instead of Subversion for new projects for a while now, though I left many older ones still active in Subversion. During a recent hardware upgrade I decided not to install Subversion server again, but rather migrate the old projects to Git as well. This post describes the process I have come up with, just in case I ever need it again.

A Working Sample Application with Infinite Scrolling for Windows Phone 8

September 9th 2013 Windows Phone MVVM

Some time ago I published a blog post describing how to handle incremental loading in scrolling lists with large amount of data on Windows Phone 8. After receiving an email asking me for a working solution, I decided to publish it and make it available to everyone, instead of sending it by email.

Using TeamCity for Website Deployment

After a hardware upgrade I decided to switch from CruiseControl.NET to TeamCity for my personal continuous integration server to see for myself how they compare. Since I don't have all that many active projects, the free Professional Server License is a great option to try out all of the features without paying for it. At the same time it should give me enough insight to see whether it has enough advantages over free alternative(s) for the investment to make sense in a larger environment.

Posts in August 2013

Book Review: Notes to a Software Team Leader

August 26th 2013 Team Management Review Book

The book is a recommended read for any team leader, no matter how much experience he already has in his job. Even if you don't agree with everything, I'm pretty sure the book will act as an eye opener and make you more aware of stuff you already take for granted.

Inconsistent Behavior of String Methods for Special Unicode Characters

August 19th 2013 Unicode .NET Framework

It seems that different String methods handle special 0xFFFD Unicode replacement character in different ways.

NAnt 0.92 Issues Building .NET 2.0 Projects on x64 Windows

August 12th 2013 NAnt .NET Framework

It's more than a year since NAnt 0.92 has been released, but if you take a look at the project issues page, many of them still report problems related to finding different versions of SDKs.

Book Review: StyleCop Code Analysis How-to

the book should be more than enough to get you going even if you've never used StyleCop before. Based on the table of contents I was still hoping for more in-depth information on creating custom rules.

Posts in July 2013

Book Review: Microsoft .NET Framework 4.5 Quickstart Cookbook

July 29th 2013 .NET Framework Review Book

The author really managed to convey a lot of information in a concise and useful way, although not all of the topics are covered equally well: some really do shine, while others could still be improved.

Wrapping Other Asynchronous Patterns in Awaitable Tasks

July 22nd 2013 Async .NET Framework

Writing asynchronous code in .NET framework 4.5 is pure joy thanks to task-based asynchronous pattern (TAP) and the async/await syntactic sugar. Although many APIs have been updated since the introduction of TAP to provide task based asynchronous methods which can be used with async and await, occasionally you will still encounter operations in APM (Asynchronous programming model) or EAP (Event-based asynchronous pattern) without a TAP equivalent. Fortunately .NET framework provides helpers which will make wrapping older style asynchronous operations into tasks much easier.

Creating Themed Tiles for Windows Phone Applications

Design is an inherent part of developing Windows Phone applications. Sooner or later you'll need to add some Metro icons to them to represent different actions and items in lists.

Using Git in Session Demos

July 8th 2013 Git Visual Studio

I often find myself speaking at technical conferences and user group meetings and due to the nature of my sessions, there are usually demos involved. A particular kind of demos I often struggled with to make them work well within a session, are the ones in multiple steps, i.e. they show the same project or solution in different stages of development.

Book Review: Visual Studio 2012 and .NET 4.5 Expert Development Cookbook

The book addresses a lot of advanced topics throughout the chapters, as expected based on the target audience of experienced .NET developers. Still, most of the chapters include some basic topics as well, which slow down the pace.

Posts in June 2013

Binding Events to View Model Methods in Windows Store Apps

June 24th 2013 Binding Windows Store

One of the challenges of using MVVM pattern with different UI frameworks that always comes up is how to bind events that are not exposed as commands to the view model. Windows Store apps are no exception to that. In this blog post I'll try to give an overview of the available possibilities one can choose from based on individual requirements and personal preferences.

BindingList Collection Is Read-Only

June 17th 2013 Binding .NET Framework

When you pass an instance of IList<T> to the constructor, the BindingList<T> doesn't create its copy. It serves as a wrapper for it, supporting only the operations also supported by the underlying collection.

Showing POST Response in a WebView Control

June 10th 2013 HTTP Windows Store

In the world of connected applications programmatic HTTP requests are more and more common. In Windows Store applications HttpClient class serves most purposes as long as communication is targeted at services or at least the results are processed programmatically and don't need to be shown directly to the user.

Package Restore Fails for Projects Importing a .targets File from a Missing NuGet Package

June 3rd 2013 NuGet Visual Studio

When moving a Windows Phone project referencing Microsoft.Bcl.Async package to a new computer I was unpleasantly surprised. Although I had NuGet package restore enabled on the solution, it not only failed to build, it even failed to load. After some investigation I found out that this was a known limitation in NuGet.

Posts in May 2013

NuGet Package Restore for Projects in Multiple Solutions

May 27th 2013 NuGet Visual Studio

If you've only been using NuGet in typical scenarios with a single solution containing a couple of projects, it probably worked great for you. As soon as the project structure is a bit more complex, things start falling apart. There are two main reasons why it doesn't work as expected when individual projects are included in multiple solution files residing in different folders.

Inconsistent Exceptions for WinRT File Operations

Recently I encountered strange and inconsistent behavior in exceptions being thrown by different file operations in WinRT.

Book Review: Windows Phone 7.5 Application Development With F#

May 13th 2013 Windows Phone F# Review Book

The book does a pretty good job in delivering what it promises, but unfortunately doesn't really get into the advantages of developing an application in F# instead of C#. I see that as a missed opportunity of making the book appealing to a broader audience considering giving F# a more serious look.

Calling Task-based Asynchronous Methods from Class Constructors

Task-based asynchronous pattern has many advantages over other asynchronous patterns introduced in the past, most of them boiling down to the fact that it's really easy to get into and start using it. Like any other technology, it does have its pitfalls and there are many details to know about once you get into more advanced scenarios.

Posts in April 2013

Building Connected Apps Session at NT conference 2013

At NT conference 2013 I opened the Windows 8 and Windows Phone 8 Developer Tales from the Tranches PreCon track with a session on Building Connected Apps. I addressed all aspects of network communications, focusing on available APIs but also spending some time on the expectations for mobile applications in respect to network usage.

Windows Store LOB Apps Session at NT Conference 2013

April 27th 2013 Windows Store Speaking

On the final day of NT Conference 2013 I had my last session. This time I was speaking about my experiences with building LOB (line of business) applications for Windows Store.

Architecture Sessions at NT Conference 2013

At NT conference 2013 I had 3 sessions in 2 different PreCon tracks. Apart from the one on connected apps for Windows 8 and Windows Phone 8 I had 2 consecutive ones, both covering the topic of design patterns, focusing on client application development.

Posts in March 2013

Book Review: .NET Framework 4.5 Expert Programming Cookbook

March 23rd 2013 .NET Framework Review Book

The book seems more like a collection of blog posts, which have passed a much stricter review process. If enough of them are of interest to the reader they should provide enough value to be worth the purchase. Check the table of contents online, before buying it.

Infinite Scrolling with Incremental Loading in Windows Phone 8

March 17th 2013 Windows Phone MVVM

In mobile applications there's often a need for scrolling lists with large or even (for all practical purposes) infinite amounts of data which of course needs to be loaded incrementally. This can be achieved in pure MVVM fashion with LongListSelector control.

Posts in February 2013

Book Review: Kinect for Windows SDK Programming Guide

February 24th 2013 Kinect Review Book

This book is a really nice introduction to Kinect programming. I can recommend it to anyone who is interested in writing his first Kinect application. It might bore you in certain parts but it will certainly save you time in the end.

Posts in December 2012

Book Review: Windows Presentation Foundation 4.5 Cookbook

December 16th 2012 WPF Review Book

In spite of all my previous experience with WPF, I've learned a couple of new tricks while reading it. I'm sure I'll be returning to it from time to time to read up on certain details.

Developing Windows Store Apps Session at ReBuild 2012

December 11th 2012 Windows Store Speaking

Today our local Microsoft DPE team organized ReBuild, a one day recap of the recent Build conference which was taking place in Redmond a little over a month ago. I had the last session of the day and focused on Windows Store apps: what they were and how to develop them.

Posts in November 2012

Resources from Windows Store App Development Workshop

November 9th 2012 Windows Store Speaking

This weekend a worldwide hackathon for Windows is taking place in over 100 locations. Among them is Ljubljana where the event started with my 3 hour Windows Store app development workshop.

Posts in October 2012

Developing Windows Store Apps with C#, XAML and MVVM Session from Bleeding Edge 2012

October 25th 2012 MVVM Windows Store Speaking

The 5th Bleeding Edge conference was taking place in Laško. For my session I decided to take a different approach to the development of Windows Store apps: instead of talking about the design or the available APIs in WinRT, I focused on architectural best practices when using C#, XAML and the MVVM pattern.

What's New in .NET Framework 4.5 Session from Visual Studio 2012 Bootcamp

On Monday our local Microsoft subsidiary organized Visual Studio 2012 bootcamp as a preconference to Bleeding Edge 2012. For my talk I selected 3 new features in .NET Framework 4.5 that excite me most.

WCF Data Services Tools for Windows Store Apps and NuGet Package Restore

October 21st 2012 NuGet WCF Windows Store

If you've tried accessing an OData feed from a Windows Store apps you've already come across WCF Data Services Tools for Windows Store Apps. It's a downloadable package which extends the Add Service Reference functionality in Visual Studio 2012 to support OData feeds. Without it OData feeds can't be added as services references to a Windows Store app project.

Programmatically Positioning the Page When Virtual Keyboard Opens

October 3rd 2012 Windows Store

Tapping a textbox in a Windows Store app automatically show the virtual keyboard. If this keyboard would cover the tapped control, it scrolls the page just enough to make it completely visible. Most of the time this behavior works like a charm but there are times when the app would work even better if it could be modified.

Posts in September 2012

Course Review: Data Access with Entity Framework 5: Up & Running

September 30th 2012 Entity Framework Review Course

The course is as close to the experience of studying the topic at a university as possible, hence the name of the company. I can sincerely recommend it to anyone who needs to learn the basics of Entity Framework from scratch.

Get a Free EBook From Packt Publishing

September 28th 2012 Book Promotion

To celebrate the publishing of their 1000th book Packt Publishing is awarding a free access to their online library PacktLib for 7 days and a free download of one book to everyone who logs in with their existing account or creates a new account between 28th and 30th September.

My Portable Class Libraries Presentation at the Visual Studio 2012 Community Launch Event

Yesterday two local development user groups organized a common Visual Studio 2012 Community Launch event. I was one of the four MVPs speaking there. Each one of use prepared a talk on his favorite feature. My topic where Portable Class Libraries.

Using SuspensionManager for Saving Application State

September 23rd 2012 Windows Store

One of the important aspects of Windows Store application development is the application lifecycle. While at first it might seem a minor detail that can be taken care of late in the application development process, it can affect the application architecture quite profoundly. Therefore it's a good idea to address it soon enough to avoid unplanned refactoring when the application is almost complete.

WiX Toolset v3.6 Failed to Install

September 4th 2012 WiX Windows Installer

Today I was setting up my new Windows 8 based development workstation and noticed that the final version of WiX v3.6 has been released yesterday. Without any second thoughts I decided to install it only to find out that setup procedure failed for me with a short non-descriptive message and no additional information immediately available.

Posts in July 2012

WCF: IIS Hosting, Windows Authentication and File Permissions

July 25th 2012 WCF IIS Administration

Troubleshooting WCF services is often challenging, mostly because of cryptic and uninformative error messages. When you combine that with complex usage and configuration scenarios, it takes time to get to the bottom of the problem. The issue I'm about to describe manifested itself on a production server running a WCF service with HttpModule based Windows authentication. Other authentication methods worked fine, while with Windows authentication WCF returned a rather cryptic error message.

Using PowerShell Scripts in VisualSVN Hooks

July 15th 2012 PowerShell SVN

Hooks in Subversion can be used to execute custom logic before or after certain actions in repository: commit, lock, unlock and revision property change. They are defined by specifying a batch script that gets executed at that point. In my particular case I wanted to use a PowerShell script before commit to prevent certain files being committed to the repository.

How to Submit a Patch to an Open Source Project on GitHub

July 9th 2012 Git

Lately I am working a lot with SQLite and its .NET client sqlite-net. After discovering a bug and also fixing it in the local files included in the project I am working on I decided to also submit a patch for it. What better reason to finally try out the recently released GitHub for Windows do I need?

Saving State in a Suspending Metro Style App

July 4th 2012 Windows Store

The lifecycle of Metro style apps requires them to save their state when they are being suspended by the OS to prevent the potential loss of their state if they are restarted instead of resumed because they were inactive for two long.

Posts in June 2012

Book Review: Entity Framework 4.1: Expert's Cookbook

June 2nd 2012 Entity Framework Review Book

The book is a useful resource for anyone working with the latest versions of Entity Framework. Just don't start learning Entity Framework with it; some previous knowledge and experience is definitely recommended to make the most out of it.

Posts in May 2012

My Windows Workflow Foundation in .NET 4.5 Session at NT Conference 2012

On Wednesday I had a talk at NT konferenca 2012 about the changes in Windows Workflow Foundation that we can look forward to in .NET Framework 4.5. The slides from the talk are available on SlideShare.

My Session on Developing Metro Applications for Windows 8 at NT Conference 2012

May 25th 2012 Windows Store Speaking

My second talk at NT konferenca 2012 was all about helping you get started with developing Metro style application for Windows 8 in C#. I've already put the slides on SlideShare.

Posts in April 2012

Closing Streams in WinRT

April 19th 2012 Windows Store

File IO in .NET for Metro style apps (aka .NET Core) can be a challenge for seasoned .NET developers. The classes in Windows.Storage namespace are different from both System.IO.IsolatedStorage and System.IO and require some getting used to. On top of that even the remaining classes in System.IO are missing some of properties and methods. One such method is Stream.Close().

Opening Files in the Default Viewer from a Windows 8 Metro Application

April 7th 2012 Windows Store

Since Metro applications are running in a sandboxed environment they only have limited file handling capabilities. The private storage area for each application is conceptually very similar to isolated storage, only with its own API. This still doesn't solve the problem of opening a file in a standard format (PDF for instance) with the associated application.

Posts in March 2012

Unable to Activate Windows Metro Style Application

March 26th 2012 XAML Windows Store

Probably the most interesting error I had to troubleshoot since I started developing my first Windows Metro application happened to me after doing some restructuring and cleaning up of the existing code base.

Visual Studio 11 Beta Regional Settings Issues in Windows 8

March 21st 2012 Visual Studio Windows

It seems that Visual Studio 11 Beta works better and more reliable in Windows 7 than it does in Windows 8 Consumer Preview. In Windows 7 I've been running it without problems, using Slovenian regional settings. In Windows 8 Consumer Preview on the other hand it doesn't even start properly when regional settings are set to Slovenian.

Using WorkflowInvoker to Evaluate Custom Expressions

March 19th 2012 Workflow Foundation

Windows Workflow Foundation (WF) is an often overlooked part of .NET framework but its declarative approach to defining workflow logic can prove useful in spite of the steep learning curve and some unfortunate limitations. Once you get to know it, you might even come up with new creative ways of using it.

Posts in February 2012

Peculiarities of Subversion Path Based Authorization

February 18th 2012 SVN Administration

If you're using Subversion in a corporate environment you might need to rely on path based authentication to revoke users' read or write access to parts of a repository. Unfortunately the feature is not documented very well and there are a couple of specifics you should be aware of in advance to prevent unpleasant surprises later. I decided to describe two of them that I recently stumbled upon.

Compiling Visual C++ 2010 Projects on a Build Server

Last week I was configuring the build server to compile its first Visual C++ 2010 project. I took the approach of using MsBuild on the project file (.vcxproj) as I am already doing it with the .NET projects. This worked just fine on my development machine with Visual Studio 2010 installed. It soon turned out not to be as easy as I expected it to be.

Posts in January 2012

Using CruiseControl.NET as a Source Control Monitor

January 21st 2012 CruiseControl.NET SVN

The more there are developers committing changes to the project source code and the more distributed they are, the more challenging it becomes to keep track of all the changes. Introducing a source control monitor notifying code owners of changes can be a good way to reduce this risk. Although there are dedicated tools available for this task, this post introduces a simple way to use your existing CruiseControl.NET setup for this task.

Creating NuGet Packages and Setting Up an Internal Feed

January 14th 2012 NAnt NuGet Visual Studio

NuGet is a valuable tool for managing references to external libraries in your projects. If you're not using it yet, you owe it to yourself to try it out and see what you're missing. Though, that's not what this post is about. Not only are NuGet packages a great way to distribute publicly available libraries, they can be used just as well for custom internal libraries with their own release management which are used in multiple projects.

Transformation of Configuration Files in Build Process

January 8th 2012 ASP.NET Visual Studio SlowCheetah

Web.config transformations are a great but often overlooked feature introduced with ASP.NET 4.0. They provide a simple way to define a different configuration for Debug and Release builds of your project by only specifying the differences (typically only connection strings and similar settings) in a separate transformation file while keeping the core of the configuration file common and consequentially making it easier to manage.

Posts in December 2011

DateTime Value Might Change When Saved to Database

DateTime can be a tricky data type to deal with. Not only is there daylight saving time and different time zones to keep in mind but also the range and precision can vary in different systems. You are probably already aware of some differences between .NET framework's DateTime structure in Transact-SQL's datetime data type. You might not be aware of the difference in precision between these two data types, though.

Using HTTP Module to Authenticate Users in WCF - Part 2: Windows Authentication

December 19th 2011 ASP.NET WCF

In a previous post I addressed the issue of using HTTP module based authentication in WCF. The presented solution worked in most cases but failed completely with Windows authentication. In this post I'll describe the necessary changes to make this work as well.

Using HTTP Module to Authenticate Users in WCF

December 12th 2011 ASP.NET WCF

WCF has great built-in support for most types of authentication so there aren't many good reasons to use HTTP module based authentication with it. Having an existing ASP.NET application already using such authentication certainly is one of them. Finding resources on how to do it might be a challenge though. I managed to stumble upon an article by Microsoft patterns & practices team which helped a lot. In a way this post is its abridged and more practical version.

Be Aware of DefaultModelBinder Conventions

December 1st 2011 ASP.NET MVC

DefaultModelBinder is an essential piece of ASP.NET MVC framework which makes writing strongly typed actions really simple. In spite of its strengths it can still introduce hard to solve problems in your code.

Posts in October 2011

Presentation on Reusing Existing Code in Metro Applications at Bleeding Edge 2011

This year's Bleeding Edge conference was taking place this week in the beautiful surroundings of Gozd Martuljek. The second day was dedicated to community driven redelivery of Build. As the last session of the day I had a talk on the aspects of reusing existing .NET framework code in Metro applications for Windows 8.

Posts in July 2011

Call a Generic Extension Method Using Reflection

July 24th 2011 Reflection .NET Framework

Reflection is a great tool for calling methods on objects when their types are not known at compile time. Unfortunately the Type.GetMethod method doesn't work with generic methods, therefore we need to find the right method by iterating through all the methods returned by Type.GetMethods. Searching for alternatives I stumbled upon a solution using expression trees. It got me wondering though, which of the two solutions actually performs better.

Posts in June 2011

XmlSerializer Constructor Performance Issues

June 12th 2011 Serialization .NET Framework

XmlSerializer is often a great choice for persisting objects or transmitting them over the wire, either by using default object serialization tailored only with attributes or by implementing the IXmlSerializable yourself. If you're not careful though, this might come at a significant performance cost.

Adding Foreign Key Properties to an Existing Entity Framework Model

June 8th 2011 Entity Framework

One of the features introduced in Entity Framework 4 was support for foreign key properties in entity types. If you decided not to include them in your model when you originally created it, but want to add them at a later time, you'll have to do it by hand. I'll describe the steps on a simple example.

Posts in May 2011

Windows API Code Pack Presentation at NT Conference 2011

May 28th 2011 Native Interop WPF Speaking

This week the annual Microsoft conference NT konferenca 2011 was taking place in Portorož. On Tuesday I had a talk there about the Windows API Code Pack. As promised, you can find the slides from this talk on SlideShare.

Posts in March 2011

Value-Type Parameters in Reflection

March 23rd 2011 Reflection .NET Framework

It seems that no matter how much experience one has with .NET framework, there are still surprises awaiting him somewhere down the road. This time I'd like to point out an interesting behavior of MethodInfo.Invoke many of you might not be aware of. I certainly wasn't, until today.

Providing Context to Custom Workflow Activities

March 9th 2011 Workflow Foundation

When architecting solutions using Workflow Foundation it is typically necessary to provide information to individual activities. But apart from standard input arguments being passed to the workflow or originating from previously executed activities, which can best be modeled using InArgument<> properties, there is often also a need to access some kind of contextual information in the activity. In this post I'm going to discuss three different approaches to providing such context to a custom workflow activity.

Code Access Security Strikes Back in .NET 4

March 4th 2011 .NET Framework

One of the changes in .NET Framework 4 was the retirement of Code Access Security (CAS). Until recently this was something, I have only read about at the time of release, but it didn't have any effect on my day to day work. Therefore I was even more surprised that an application which has recently been migrated from .NET 2.0 to .NET 4 suddenly failed to start from the network drive while working flawlessly from the local machine.

Posts in December 2010

Unit Testing with NUnit in Visual C# 2010 Express

My favorite environment for running NUnitunit tests during the development process is definitely Unit Test Runner in CodeRush. When I just recently had to get a usable development environment up and running with Visual C# 2010 Express, I had to find a different solution since extensions are not supported in the Express SKUs of Visual Studio.

Posts in November 2010

Why Might Using Public Const Not Be a Good Idea?

November 28th 2010 C# MSIL

While reading an article on the difference between const and readonly it surprised me that changes to public consts in the referenced assembly don't affect the referencing assembly unless it is recompiled using the changed referenced assembly. The C# Reference doesn't hint at such behavior at all, which means it's time for further exploration.

XML Serialization Issues or Having Fun with TimeSpan and XmlIgnore

November 10th 2010 Serialization .NET Framework

Recently I tackled a seemingly simple task: XML serialization of a generic class used with a TimeSpan data type. It turned out that XmlSerializer doesn't serialize the TimeSpan structure at all.

Posts in September 2010

T-SQL Function to Get Column Details from Database

September 10th 2010 Microsoft SQL Server

Using information schema views and the fn_listextendedproperty function I wrote a table valued function which returns information about all the columns in the given table. I'm posting it here in case someone else finds it useful.

EventLogTraceListener Can Cause an Application to Crash

September 1st 2010 Event Log .NET Framework

Trace listeners are a great mechanism for troubleshooting and monitoring applications in production environment. What I didn't know until recently, is that by adding a trace listener to your application you can cause it to crash.

Posts in August 2010

Using FTP Task in CruiseControl.NET for Publishing Websites

Since version 1.5 CruiseControl.NET includes an FTP Task which can be used for uploading build results to a remote FTP server. Configuring it correctly requires some thought and at the moment there are very few helpful resources available.

Posts in July 2010

Avoiding Queue Starvation in CruiseControl.NET

July 28th 2010 CruiseControl.NET

Recently I've been solving some issues with queue starvation in CruiseControl.NET. Since I haven't found much information about this problem I've decided to round up my findings in this blog post.

Posts in June 2010

Programmatic Manipulation of Binary Excel (.xls) Files

A few months ago I worked on a small spare time project which included some manipulation of binary Excel (.xls) files. This seemingly simple task soon turned out to be quite a challenge if you want to handle it right. The post you are reading is a short summary of my experiences. They should make your choices easier if you are about to tackle a similar problem.

Posts in May 2010

Setting Up SVN and CC.NET for .NET Development

Subversion and CruiseControl.NET can be invaluable tools in your .NET development process. There are many resources available to help you get started which I'll try to gather in this post along with some of my personal experiences.

Posts in April 2010

Excel 2007 Query Parameters

April 28th 2010 Microsoft Office

Query parameters are a very useful Excel feature allowing parametrization of database queries used to import data in Excel. Unfortunately there is a limitation for using this functionality which turns out pretty unintuitive in Excel 2007.

Posts in August 2009

Send E-Mail As and On Behalf Of

Microsoft Exchange supports Send As and Send On Behalf Of permissions to be granted to users for individual e-mail addresses. Sending e-mail from Outlook for these users is very simple. If you want to achieve this from code there is a little more work involved.

Identifying Unrecognized Devices in Device Manager

August 1st 2009 Drivers Windows

There is a away to identify an unrecognized device from the information available in Device Manager.

Posts in July 2008

Gama System eArchive Accredited

July 5th 2008 Promotion

Gama System eArchive, one of the two products in our document product line, received accreditation from the Archives of the Republic of Slovenia last week. This acknowledgment by our national body means that any document stored in Gama System eArchive is automatically legally valid.

Posts in June 2008

Microsoft Pro Photo Tools Decimal Separator Problem

June 15th 2008 GPS Windows

After taking my new hand-held GPS device for a test run, I decided to use Microsoft Pro Photo Tools which have just been released with geotagging as its main feature. Unfortunately it had problems loading my GPS data from GPX XML format.

Posts in April 2008

Old ActiveX Controls Under .NET 2.0 SP1

April 29th 2008 .NET Framework Native Interop

.NET Framework 2.0 Service Pack 1 caused the C# compiler in Visual Studio 2005 and later to set the NXCOMPAT bit for all build targets without an option to turn this new behavior off. This means that DEP (data execution prevention) will kick in unless it is turned off completely in the operating system.

MonthCalendar BoldedDates in Windows Vista

April 14th 2008 Windows Forms

The MonthCalendar control's BoldedDates functionality doesn't appear to work properly on Windows Vista. The same code works just fine on Windows XP.

Posts in December 2007

Playing DivX and XviD Videos Natively on Xbox 360

December 31st 2007 Xbox 360 Administration Windows

The Xbox 360 Dashboard update released on 4th December 2007 added support for playing DivX and XviD videos natively. Unfortunately this only works for media played directly from the dashboard and not within Media Center Extender. The only thing left to do was to setup Windows Media Player media sharing.

Posts in November 2007

Always Close DeflateStream Before Reading Results

November 24th 2007 .NET Framework

Close() must be called on a CompressionStream before you start reading from the underlying stream. Calling only Flush() is not enough in this case.

Location of PowerPoint AutoRecover Files

November 24th 2007 Microsoft Office Data Recovery

Unlike Word or Excel where the location of AutoRecover files is set in the options, PowerPoint does not have such an option.

Notes about RSACryptoServiceProvider

November 24th 2007 PKI .NET Framework

In my opinion RSACryptoServiceProvider class is seriously under-documented in MSDN. For future reference I'm listing the solution to two problems I had.

Posts in July 2007

Creating Custom Tasks for CruiseControl.NET

Once you start putting CruiseControl.NET to production use you'll sooner or later encounter the need for custom build tasks. Unfortunately there is not much information available on development of custom tasks.

Loop over Files in Directory from a Batch File

July 24th 2007 Batch

The following line in a batch file will execute a command for each file in a directory.

MSBuild.xsl Problem in CruiseControl.NET 1.3

The 1.3.0.2918 build of CruiseControl.NET has an error in `msbuild.xsl` file which causes an XslLoadException to be thrown when trying to view the MSBuild output in the web dashboard.

Installing MSI Packages from Command Line

July 22nd 2007 Windows Installer

Although a MSI file can be installed by double clicking on it in Explorer or by selecting install from the context menu, you might want to start from command line to include it in a script. I had to do some searching to find a way for setting a different installation directory than the default one.

Posts in June 2007

OCR with Microsoft Office Document Imaging

If you need cheap and simple OCR functionality Microsoft Office Document Imaging Type Library (MODI) is a nice option if its requirements (Microsoft Office 2003 or later) and limitations (limited language support) don't bother you.

Posts in May 2007

How to Enable Hibernation in Windows Vista

May 21st 2007 Administration Windows

Windows Vista unlike the previous versions doesn't have an option to enable or disable hibernation in the Power Option of Control Panel. If you end up with disabled hibernation, the only way to turn it back on is from a command prompt.

Worker Process Group in IIS 6

May 19th 2007 IIS Administration

Any custom identity being used for an application pool in Internet Information Services 6.0 must be a member of the IIS_WPG group which grants it all the necessary privileges, otherwise IIS reports only Service Unavailable when the site gets accessed.

Posts in March 2007

Persist Security Info Default Value Changed in Windows Vista

March 25th 2007 Visual Basic 6 ADO.NET

In Windows Vista the default value for the Persist Security Info parameter of an ADO connection string has changed from True to False. You should be aware of this because it can prevent your legacy code from working properly under Windows Vista.

Windows Defender Problem with Microsoft Update

March 10th 2007 Antivirus Windows

There seems to be a problem with updating Windows Defender when using Microsoft Update instead of Windows Update in Windows Vista. The problem becomes apparent when Windows Defender puts up a warning in the system tray that its signatures are not up to date.

Antivirus Applications and Media Center MPEG Streaming

March 10th 2007 Xbox 360 Antivirus Windows

One of the first tasks on my to-do list after buying a new computer with Vista Home Premium edition was setting up Media Center Extender for Xbox 360 along with Transcode 360 to make my Xbox 360 a true multimedia device. Unfortunately the problems started immediately after setting up the Media Center Extender on my PC: MPEG streaming resulted in errors.

Posts in January 2007

Run Applications with Preselected User Credentials

January 3rd 2007 Administration Windows

The functionality of the Run as context menu item is often an invaluable tool. The downside of this command is that unless you want to use the administrator's account, you have to enter the desired username every single time which quickly becomes tedious.

Posts in December 2006

Windows Desktop Search on Network Shares

Microsoft Office 2007 applications (at least Outlook and OneNote in particular) require Windows Desktop Search 3.0 to be installed for their built-in search capabilities to work fully.

MCP Exam 70-536 Experiences

December 25th 2006 .NET Framework Certification

I've recently passed the MCP exam 70-536: TS: Microsoft .NET Framework 2.0 – Application Development Foundation. I found the exam quite easy with only a few really nitpicking questions.

More Sidebar Gadgets Available

December 11th 2006 Sidebar Gadgets Windows Promotion

Since my last posting two new gadgets have been released: Slovenian Portfolio provides information from Ljubljana Stock Exchange, Slovenian Rates provides information on exchange rates from 4 Slovenian banks.

Our First Sidebar Gadget Released

December 1st 2006 Sidebar Gadgets Windows Promotion

We have just released our first Sidebar Gadget – Slovenian Radio. The gadget features a centralized list of radio stations (retrieved from our server) and basic controls for selecting the station and adjusting the volume.

Posts in October 2006

Running Windows Sidebar Gadgets Directly in IE7

October 29th 2006 Sidebar Gadgets JavaScript Windows

Since gadgets are HTML applications and the Windows Sidebar uses Internet Explorer 7 to render them, I prefer running their code directly in IE7 during development.

Writing Your First Windows Sidebar Gadget

October 22nd 2006 Sidebar Gadgets JavaScript Windows

I've gathered few issues that could be covered better in the documentation since I've been struggling with them for some time before I got everything to work as expected.

A Sample Windows Sidebar Gadget

October 22nd 2006 Sidebar Gadgets JavaScript Windows

I wrote my own sample with clearly separated HTML structure, CSS styles and JavaScript code to showcase development of Windows Sidebar Gadgets.

Resources for Windows Sidebar Gadget Development

October 22nd 2006 Sidebar Gadgets JavaScript Windows

I though I'd gather in one place all the useful links I found with information on development of Windows Sidebar gadgets.

Application Roles and Connection Pooling

October 20th 2006 Microsoft SQL Server ADO.NET

As soon as a pooled connection with enabled application role gets reused an exception gets thrown and its description is not really helpful if you're not aware of the problem: General Network Error. This happens because the security context of the connection doesn't get properly reset when it is closed.

Posts in September 2006

Configuration.Save Requires Full Control Access to a File

September 19th 2006 .NET Framework

Don't use Configuration.Save in scenarios where users might only have read and write permissions for the configuration file.

Mapping URLs in ASP.NET

September 17th 2006 ASP.NET

ASP.NET offers several ways of mapping nice public URLs to cryptic internal URLs matching the actual implementation.

Last Modification Time of a Web Page

September 7th 2006 HTTP .NET Framework

The following code returns the time when a web resource was last modified. Maybe it will be useful to someone.

Posts in August 2006

Display and Input of Unicode Characters in Legacy VB6 Applications

August 5th 2006 Unicode Visual Basic 6

Although in Visual Basic 6 all string variables are inherently Unicode, the same is not true for the components that come with it. The best solution is to use the components from the Microsoft Forms 2.0 Object Library.

Too Many Projects in a Solution Slows Down Visual Studio 2005

August 5th 2006 Visual Studio

Once the number of projects in a solution comes up to thirty or more, most of the project related operations become really slow. It is something to have in mind when deciding how to group projects in solutions.

Posts in June 2006

Downloading Template Files from Web Server

June 10th 2006 DasBlog IIS

While IIS 6 in Windows 2003 prevents the download of files with unknown extensions by default, IIS 5.1 in Windows XP allows downloading such files. This might be something you want to prevent.

DasBlog Macro Development

June 10th 2006 DasBlog ASP.NET

DasBlog allows extensibility through macros. Documentation doesn't mention their development at all. Blog posts are probably the best source of information available on it.

Writing to EventLog

June 9th 2006 Event Log .NET Framework

Before using EventLog.WriteEntry for adding events to event log you should consider calling EventLog.CreateEventSource to make your application a valid source of events. Keep in mind though that you need administrative privileges for it to succeed, therefore it is best to call it at installation time.

Viewing EPS Files with IrfanView

June 8th 2006 PostScript IrfanView Windows

If you want to view EPS images with IrfanView you need to have Ghostscript installed.

Implementing Plugins with Late Binding

June 4th 2006 Reflection .NET Framework

Essentially everything you need to implement plugins in your application is some way to dynamically instantiate classes at runtime. In COM world this was achieved by calling the CreateObject function. In the managed world you should use AppDomain.CreateInstanceAndUnwrap.

Show or Hide Users from Windows XP Welcome Screen

June 3rd 2006 Administration Windows

By default the Windows XP Welcome screen shows the users created through the control panel applet. You can change all that by setting up the correct values in the registry.

Changing the Port Number for Remote Desktop Access

June 3rd 2006 Administration Windows

The default port number 3389 for RDP (Remote Desktop and Terminal Services) can be changed through a registry value.

Problems with SetForegroundWindow Calls

June 3rd 2006 Win32 Windows

Either as a user or as a developer you have certainly noticed that sometimes the application just flashes in the taskbar instead of actually coming to the foreground when the SetForegroundWindow function is called. What you might not know is why and when this happens.

Posts in May 2006

Marshalling System.String to char* and Vice-Versa

By switching from C# with P/Invoke calls to Managed C++ when implementing a managed wrapper for the ANSI C style library I stumbled upon, I wanted to avoid the tedious and error-prone task of writing the P/Invoke signatures for function calls and user-defined types for the structures they used. As a side result I also managed to avoid most of the advanced marshaling issues with complex data structures.

Windows 2003 Anonymous Access to Shared Folders

May 28th 2006 Windows

Due to tightened default security in Windows 2003 the file shares cannot be accessed without logon in a domainless environment even if both shares and folders are set up to allow access to Everyone. Many different suggestions for solving the problem can be found, I'm just adding my two cents to this confusion.

C++ Project Build from Network Share Fails in VS2005

May 14th 2006 C/C++ Visual Studio

Trying to build a C++ project opened from a network share in Visual Studio 2005 might fail with a strange error. The problem only appears when the share host can't authenticate the user reading from and writing to the share.

Implementing a Managed Interface in C++

Managed C++ is actually quite nice in the 2005 version. You probably still wouldn't want to use it if you could get away with C# or VB. But if platform invoke is giving you too many headaches, you might want to take a look at it.

Useful PInvoke Resources

May 3rd 2006 Native Interop C#

For anybody else like me out there who hasn't done more than an occasional DllImport call or two, the following resources should help getting to grips with the PInvoke basics.

Posts in April 2006

Splitting and Joining Date and Time Values

April 18th 2006 Microsoft SQL Server

SQL Server's common data type datetim` for both date and time values can be a source of quite some confusion. The decision on whether to store them separate or joined can depend on many factors, but sooner or later the need for separating or joining the date and time parts will arise.

Posts in March 2006

Unit Testing for Beginners

March 22nd 2006 Book Unit Testing

Using unit testing in real development environment isn't completely trivial. Pragmatic Unit Testing in C# with NUnit is a great book for everyone who wants to start with unit testing but just doesn't know how to do it.

Export SQL Server Agent Job History

March 22nd 2006 Microsoft SQL Server

The following query is a good starting point if you want to export the SQL Server Agent job history to a file and you're still using Enterprise Manager from SQL Server 2000.

Missing Security Tab in Certificate Private Key File Properties

March 18th 2006 PKI Administration Windows

Simple file sharing hides Security tabs on all Properties dialogs. You need to disable this feature to explicitly set permissions on any object in Windows Explorer.

NOD32 & CVSNT Compatibility Problem

March 4th 2006 CVS Antivirus Windows

Yesterday my TortoiseCVS client just kept performing the command for several minutes without failing until I canceled it. The program responsible turned out to be NOD32 IMON service. In the end I had to exclude the CVSNT executable from the monitoring.

Posts in February 2006

Use Stopwatch to Measure Code Execution Time

February 28th 2006 .NET Framework

To measure the time it takes to execute a piece of code before .NET 2.0, you had to develop your own high resolution timer by wrapping the unmanaged calls. Stopwatch class implements the same high resolution timer functionality out of the box.

Static Class Constructors Should Never Throw an Exception

February 23rd 2006 C# .NET Framework

No matter what you're doing in the static constructor, never allow it to throw an exception unless the problem is indeed fatal and you intend to quit the program immediately. In all other cases provide reasonable defaults and handle changed circumstances elsewhere in the code.

Opening HTML Help Files from Network Drives

February 12th 2006 HTML Help Windows

Security update 896358 prevents viewing HTML help (CHM) files from network drives. To avoid the repetitive tedious task of copying files to your local disk, you can set the maximum trusted zone in the registry to avoid the problem.

Posts in January 2006

Looking for a Cheap Computer Book Collection?

January 23rd 2006 Book Promotion

When I started to work on my Master's thesis I first had to find a good source of articles from science magazines and journals and proceedings from conferences related to my research field. I decided to join ACM as a professional member and go for the additional ACM Digital Library subscription.

Redirecting Web Pages to Specific Addresses

January 19th 2006 IIS ASP.NET

A web site redesign caused the structure to change, thus the old addresses become invalid. Since you don't want the users to get the dreaded error 404: Object not found, there are a couple of options available to you.

Web Page Redesigned

January 15th 2006 DasBlog Damir's Corner

It's been almost three years since I last updated my web page and it's really about time to change that. I decided to use an existing solution for content management. I chose dasBlog since this site is about to become a sort of technology oriented blog. The most important thing is that I'll try to keep the updates more regular.

Posts in March 2003

Recepti

March 3rd 2003 Application Windows

I wrote my own application for managing the personal recipe collection. It features nice printouts, extensive search capabilities and simple entering of new recipes. It's only available with a Slovenian user interface.

Posts in February 2002

Machine Learning for Real Time Navigation

February 9th 2002 Machine Learning Delphi

This project demonstrates the use of machine learning methods in real time navigation in unknown environment with given constraints. The archive also contains some sample data which directly demonstrates the really impressive results that where achieved with these methods and a quite extensive technical report in Slovenian.

Posts in January 2002

Artificial Intelligence for Tactical Games

January 1st 2002 Artificial Intelligence C/C++

As a part of the Artificial Intelligence and Symbolic Programming course at university me and a group of fellow students got involved in a project which tried to achieve sensible tactical behavior of a group of soldiers controlled by a human player at a higher abstraction level.

Time Recognition from Analog Clock

January 1st 2002 Computer Vision Delphi

During the Computer Vision course at university I designed a small program that recognizes time from images of a particular analog clock. The program along with sample images and complete source code is available for download.

Posts in August 2001

Tree Fractal

August 3rd 2001 Java

Tree Fractal applet interactively demonstrates how easy it is to construct interesting images by adjusting the fractal parameters. The archive contains complete source code, a jar archive with compiled classes and a HTML page for viewing in a browser.

Posts in July 2001

TV-Logo

July 9th 2001 Application Amiga

TV-Logo is a program for displaying logotypes of TV stations. To use it you only need a plain Amiga and a genlock to compose the Amiga output with the TV signal. The program offers easy switching among ten different source pictures for logotypes, ten preset logos available at a touch of a button and several other useful features.

Posts in February 2001

Java Classes

February 3rd 2001 Java 3D Java

There probably isn't a computer user out there who hasn't heard of Java before. The language is already shipped with many ready to use classes and every release has more of them. I have written classes for some common tasks myself and you can download them from here for free.

Posts in December 2000

BallMaster

December 29th 2000 Amiga Blitz Basic Game Development

BallMaster is a puzzle game with a simple basic idea and (hopefully) addictive gameplay. It is based on an old game named Logical. This game tries to bring its idea to newer Amiga hardware and also tries to extend the original game with some new ideas.

Posts in September 2000

Blitz Basic Routines

September 17th 2000 Blitz Basic Amiga

Blitz Basic is a simple but powerful programming language for Amiga. I've published some routines and techniques which might be of use to anyone who is still doing Amiga development in Blitz Basic.

Posts in July 2000

Forgotten Mine

July 2nd 2000 Amiga Game Development

I have designed over 100 levels for Emerald Mines - a quality Amiga port of 8-bit gaming hit Boulderdash. You can download them for free. If you don't have an Amiga, you can use an Amiga emulator instead.