tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

Handling a dollar sign in a username for deploying Azure Web App via FTP on GitLab CI

Published 26 Feb 2017 in Azure and GitLab

As usual the easiest things take a lot of time - or luck - to debug. Last few days I was trying to deploy this blog to a Azure Web App from GitLab’s CI via good old FTP. The problem is the FTP username on Web App is always in the form of web_app_name\$web_app_name. So the backslash and dollar cannot be avoided i.e. by regenerating publishing credentials. And I don’t have to explain to you these characters are often, in various environments, handled specifically.

My Injinji socks hack

Published 21 Feb 2017 in Running

I like Injinji socks. I race in these as well as use them for every training run or outing I do. I like the fit and no chafing or blisters, so why try something else? But there’s a problem with these. And I finally found a solution.

ShowIT 2017 a G2B•TechEd 2017

Published 18 Jan 2017 in Presentations & Speaking

Hned ze začátku roku se konají dvě zajímavé konference. ShowIT 2017 v Bratislavě a G2B TechEd v Brně. Aby se ani jedno město necítilo ochuzené, budu mít na stejné přednášky na obou. Konkrétně Entity Framework Core 1.0 a 1.1.

Ačkoli první verze “nového” Entity Frameworku již byla uvolněna s .NET Core 1.0, rozhodně nebyla kompletní. Verze 1.1 se snaží největší nedodělky zacelit a posunout se dál. A samozřejmě stále tu máme srovnání s Entity Frameworkem 6, který není “odepsaný”. Zajímá-li vás tedy co nového je ve verzi 1.1 a jak případně naložit s přechodem z Entity Frameworku 6, přijměte mé pozvání.

ConcurrentDictionary<T, T> is slow. Or is it?

Published 23 Dec 2016 in .NET, .NET Core, and Multithreading/Parallelism/Asynchronous/Concurrency

On this year’s MS Fest Jarda Jirava had a presentation about Akka.Net. I was interested in this topic, because the actor model is one way (out if many - sadly no silver bullet yet) to tackle concurrency and parallelism problems.

While showing some actor demos there was a nice comparison with home made solutions. So you don’t have to go to full framework to try thinking in actors. The demo was just storing some key and value into a hashtable. The hand made was first using just plain old Dictionary<int, int> with lock/Monitor and then using ConcurrentDictionary<int, int>. To mine (and Jarda’s surprise too) the ConcurrentDictionary<int, int> was slower. So I started digging into it and looking for a reason. Because I was confident the ConcurrentDictionary<int, int> should be faster compared to only single Monitor.

.NET types that can be read and written atomically without the risk of tearing

Published 12 Dec 2016 in .NET, .NET Core, and Multithreading/Parallelism/Asynchronous/Concurrency

I’m currently digging deep into memory models, processor architectures, kernels and so on. It’s a fun stuff. I’m learning so much and my brain is working so hard. With that I’m also digging into some “concurrent” internals in .NET, in last few days the ConcurrentDictionary<TKey, TValue> class. As I was there I found something helpful.

ADO.NET provider for Firebird is ready

Published 12 Dec 2016 in .NET, C#, Databases in general, Entity Framework, Entity SQL, Firebird, LINQ, SQL, and Visual Studio

New version of ADO.NET provider for Firebird is ready for download. The previous one added .NET Core support and although on the outside not much changed, there was quite a storm inside. As you can guess some bugs slipped into the version. The is thus full of bugfixes inside, without any visible changes outside.

Breakpoint that breaks only on selected thread or task

Published 9 Dec 2016 in .NET, .NET Core, Multithreading/Parallelism/Asynchronous/Concurrency, and Visual Studio

Few weeks ago on my “parallel-async-threading” deep dive course somebody asked a question whether it’s possible to make breakpoint work only on a specific thread. That’s a pretty valid request, especially if we talk about running the same algorithm on a huge amount of data. Let’s have a look at it.

MS Fest 2016

Published 21 Nov 2016 in Presentations & Speaking

Podobně jako loni, 26. a 27. listopadu, se koná MS Fest v Praze. Připravil jsem si dvě přednášky:

Především na tu s Entity Framework Core se těším, protože před pár dny byl vydán EF Core 1.1 a budeme se podívat na novinky tam a i nějaké praktické ukázky.

No a samozřejmě se můžeme potkat na MS Fest Party. Diskuze na cokoli vítána. :)

Updating entity from DTO without fetching it

Published 11 Nov 2016 in Entity Framework

Last week I was talking with colleague and we went deep into using DTOs for showing data effectively and also updating such data back. This topic itself could be discussed for hours. But what got my attention was whether I could make the update back to database from DTO a little bit more like if the change tracking was kickin’ in automatically on tracked object.

How not to handle your HTTPS issues

Published 9 Nov 2016 in Best practice or not?, Cryptography, and Encryption

What could possibly go wrong when you expect HTTPS for signing in… I was handling new version of my client’s application which was hosted on That just mean logging into the admin panel and uploading new deployment. Simple as that. As I was accessing the admin panel I spotted it’s not running on HTTPS, which honestly is a big no-no for me in 2016. So I filled a support ticket an asked whether that would be possible. Maybe different URL or IP. What the brought is unbelievable.

One big EXE file with all the DLLs in .NET

Published 5 Nov 2016 in .NET, C#, and IL

Where do I begin? … If you’re developing classic client side applications, like WinForms, having a one big EXE file to deploy is a huge benefit. One item to copy, you know all the dependencies are there and nobody can accidentally remove some, plus updating is a breeze too.

Sadly there’s nothing in the .NET available right now (my hopes are high for .NET Native). So you have to find some other way. Luckily there’s a way, in fact multiple.

Sad story about cloud CDNs

Published 18 Oct 2016 in AWS, Azure, CDN, and Cloud

Yesterday I started a simple task. Or at least I thought it was simple. Basically I needed to prepend some CDN in front of a domain with static content. In what a hole I ended…

Batch converting Excel files to PDF

Published 13 Oct 2016 in JavaScript, MS Office, PowerShell, Windows, and Windows Scripting Host

I have - or rather I’ve had - bunch of Excel files and I needed these in PDF. If I would be just five or so of these I would do it manually in Excel. But there was bit over 200 files. Doable but not fun.

Poor man's full-text search using PSQL only on Firebird

Published 11 Oct 2016 in Databases in general, Firebird, and SQL

I was presenting this idea on this year’s Firebird Conference. It’s an idea, working with some constraints of Firebird, but one can take it as an inspiration and maybe extend it to another usage on another platform. We had quite a productive discussion about possible improvements (I’ll describe mines at the end), but unless the people will provide the ideas in comments here too, you’ll have to use your own brain (you should’ve been there ;)).

I’ll show you the initial idea with some simple speed improvement of PSQL code itself. And then describe options in how to store it better, mostly because it’s very specific to needs and you’ll need to tune it for your scenario.

ADO.NET provider for Firebird is ready

Published 5 Oct 2016 in .NET, C#, Databases in general, Entity Framework, Entity SQL, Firebird, LINQ, SQL, and Visual Studio

I’m going to be honest with you. I’m a bit disappointed. About a month ago I asked for help with testing the upcoming version of FirebirdClient. The compression support needed quite some work in internals (obviously affecting not only the compression path) and although I tested it left and right the chances for something failing in some corner cases were high. And I could really just use fingers on one hand, and still have a spare, to count people reaching to me and providing feedback. Bit of discrepancy compared to how much emails I get asking for this or that feature being supported. Thanks to those few who did tested it.