Alexey Golub
Creative use of extension methods
I'm sure everyone with at least some background in C# is aware of extension methods – a nice feature that lets developers extend existing classes with new methods. This is extremely convenient in cases where you want to add functionality to types you don't have control over – I think everyone at some point...
Planning my life with Evernote
I have always been trying to be a well-organized person, but for the most part I was doing it wrong. I was lacking in ability to plan and stay focused, which made it seem like I was productive, despite not having any tangible progress towards the goals that really matter. It can be very difficult to stay on top...
Cognitive biases in software development
Cognitive biases impact our perception of reality, driving us into making incorrect conclusions and irrational decisions. The topic's relevancy to software development has already been covered in many places (one, two, three) but I would like to add on by discussing a few cases that haven't been mentioned...
Reverse-engineering YouTube
Almost a year ago, I started developing YoutubeExplode, a library that scraps information on YouTube videos and lets you download them. Originally, my main motivation for developing it was simply gaining experience since this task involved a lot of research and reverse-engineering. Nowadays, YoutubeExplode is...
WPF frontend using AmmyUI
Quite a long time ago I've stumbled upon a very interesting open source project called AmmyUI. Its main goal is to make designing XAML apps a lot more fluid by… removing XAML and replacing it with a custom JSON-like layout language with additional features. I've never been a big fan of XAML, so it got me...
IIS idle timeout workaround
Web applications hosted in IIS adhere to the Idle Timeout setting, which defines a time period of inactivity after which an application is shut down. Subsequent requests will trigger the application to start up again, but it usually takes a while – this rather small ASP.net Core website takes around 10 seconds...
Additional NuGet files in new csproj
New csproj format, among other things, has an option to generate a NuGet package on every successful build. It resolves dependencies, target frameworks and documentation automatically and doesn't require a predefined nuspec file as all metadata is now also part of the csproj file. Sometimes NuGet packages may...
Hotkey editor control in WPF
GUI applications often offer a way for users to configure hotkeys, typically using a textbox that records combination of key presses inside of it. Such control doesn't come out of the box with WPF so you'll have to implement it yourself. Hotkey class WPF has two useful enumerations for this task –...
WndProc in WPF
WndProc is a callback function implemented by all windows that takes care of system messages sent from the operating system. In WPF, it's not directly exposed as it's hidden by abstraction, however there are times when you may want to process the events yourself – global hotkeys being a common use case. Contrary...
Synced timer
Applications commonly employ recurring tasks that need to execute at specific times, irrelevant of when the application started. For example, you might be developing a Windows service that queries a Web API every day at 18:35, processes the data and then saves it locally. There are some libraries that provide a...
WPF ListBox SelectedItems TwoWay binding
For some unclear reasons, WPF's ListBox control does not allow two-way binding on SelectedItems property the way it does with SelectedItem. This could have been very useful when using multiselect to bind the whole list of selected items to the model. Interestingly, you can still call Add(), Remove(), Clear()...
WPF TreeView SelectedItem TwoWay binding
The longer I work with WPF, the more I notice how many things it's missing. Recently I realized that TreeView.SelectedItem property is read-only and non-bindable. I think there's no point explaining why binding SelectedItem would be useful, so there should be no surprise in my disappointment. I googled the...
Code-behind for ResourceDictionary in WPF
As any WPF developer knows, XAML can get messy due to all the nested elements and tabulation. One common problematic area is data templates – they are naturally decoupled from the surrounding layout but typically nested quite deep in the hierarchy. To deal with it, you can refactor some of the commonly used...
Conditional content presenting via WPF ContentPresenter
Sometimes you may find yourself facing a problem of having to switch between multiple presentations based on some condition – for example, showing a listbox instead of a combobox when multiselect is enabled. The easiest and the most obvious solution is to change the Visibility property of the elements so that...
Parsing Steam Market
At some point I was contracted to make a WordPress plugin that displays some basic Steam Market information on an item – its name, image, price, etc. It turned out a bit less trivial than I thought because the Steam API doesn't offer any endpoints related to the Steam Market, probably to make developing bots...