Taking something that can't be done, and then doing it.

by Jiří {x2} Činčura

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 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 5.7.0.0 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 5.7.0.0 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 5.7.0.0 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 HostForLIFE.eu. 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 5.5.0.0 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.

WUG Days 2016

Published 2 Oct 2016 in Entity Framework, Multithreading/Parallelism/Asynchronous/Concurrency, and Presentations & Speaking

Na jaře a na podzim se konají konference. To ví každý. No a na obzoru je teď jedna akce s názvem WUG Days 2016. Připravil jsem si dvě přednášky (resp. byly vybrány hlasováním lidmi).

Sneak preview of FirebirdClient on .NET Core

Published 20 Sep 2016 in .NET, .NET Core, C#, Firebird, and SQL

I know a lot of people asked me about .NET Core version of FirebirdClient. Unfortunately the Firebird 3 was released few months ago as well and so it was about priorities (and also my free time). Luckily recently I got some free time and also a reason and time to work on .NET Core port thanks to Integrative.