tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

Real world experience with FbNetExternalEngine performance and code structure

30 Mar 2020 .NET, Firebird

I’m now going through piece of SQL code that contains a lot of stored procedures from over the years and lately also functions (in last year the migration to Firebird 3 really began) and looking into the code to identify functions and procedures to start the rewriting with using FbNetExternalEngine. I’m at the beginning, but I have some interesting piece I’d like to show.

Improving list sum function based on head and tail with C# 8

3 Mar 2020 C#, Functional programming

Some time back I wrote about Head- and Tail-like methods in C# (and F# and Python and Haskell). For some strange reasons I came across the Sum method I wrote there and I thought maybe I can rewrite it with switch expression now available in C# and have a nicer looking code. I mean I’m a big fan of succinct (yet still readable) code. But I had no idea what a journey it will be.

I want quick’n’dirty HTTP GET endpoint that sends SMS via Twilio for testing – couldn’t see the forest for the trees

20 Feb 2020 Azure, Cloud, Twilio

It was a nice workweek evening and for testing I needed simple HTTP GET endpoint that would send SMS via Twilio for testing of really weird integration in my “home automation”. As fast and as easy as possible. Sounds simple, right? Sadly, my brain being fogged by all the cloud goodness couldn’t see the forest for the trees.

MS SQL’s ISDATE function on Firebird

23 Jan 2020 Firebird, MS SQL Server, SQL

MS SQL has an ISDATE function that “returns 1 if the expression is a valid date, time, or datetime value; otherwise, 0”. Although I never used it or had a scenario for it, I was porting some code from MS SQL to Firebird and this function was used, hence I had to create it.

WUG: Entity Framework vs. SQL Server – co jste mohli udělat a neudělali; a co jste dělat neměli a přesto udělali (Brno)

7 Jan 2020 Presentations & Speaking

Společně s Vladimírem Mužným si už zítra střihneme náš duet s názvem “Entity Framework vs. SQL Server – co jste mohli udělat a neudělali; a co jste dělat neměli a přesto udělali” na WUGu v Brně. A protože je to duet, bude to dvojnásobné množství informací, tak neseďte doma a přijďte.

Firebird Conference 2019

12 Oct 2019 Firebird, Presentations & Speaking

After a small pause in every-year Firebird conferences, filled with few “seminars”, the Firebird Conference is back. This year in Berlin, Germany.

FbNetExternalEngine 3.0 released – execution of SQL statements inside context and performance

3 Oct 2019 .NET, Firebird

FbNetExternalEngine version 3.0 is another step towards more useful .NET execution environment inside Firebird. Version 3.0 contains two significant pieces. The first, new, is ability to execute SQL statements inside the same context (aka transaction) as the currently executing code. The other is performance; there’s always room for performance improvements.

Throwing null literal

19 Sep 2019 C#

“Every” week I discover something new (and I’m not afraid to share it). Today isn’t any different. Apparently, C# compiler is fine with code throwing null literal. Yes, it looks weird, but if you think about it, it makes sense. Let me show you.

WUG Days 2019

12 Sep 2019 .NET, .NET Core, C#, Multithreading/Parallelism/Asynchronous/Concurrency, Presentations & Speaking

Už se jen dvakrát vyspíme a bude tu další ročník WUG Days (14.-15.9.).

Hlasováním a odborným výběrem byla vybrána 4 😮 moje témata.

Convenient method for explicit lazy loading in Entity Framework Core (or Entity Framework 6)

2 Sep 2019 Entity Framework, Entity Framework Core

Last week I was explaining explicit lazy loading on Entity Framework Core and quite understandably the question came about shortening/encapsulating the code, because you might need to use it a lot in some cases. It’s possible and luckily the method can also benefit from overload resolution in C# to handle reference and collection navigation properties transparently.

Entity Framework Core’s ultimate escape hatch

14 Aug 2019 Entity Framework, Entity Framework Core

In 2007 then Principal Software Architect on Data Programmability team Mike Pizzo wrote in a “random” forum reply about Entity Framework’s DefiningQuery being the “ultimate escape hatch”. This was later mentioned in Julia Lerman’s famous book Programming Entity Framework. Just to make sure you understand this archeology (and yes, I spent quite some time digging the reply back – kudos to MSDN forum people keeping it still running), Entity Framework (the first version) was released in 2008.

Friday’s This<T>

25 Jul 2019 C#

Last week on Friday I was working on some code, I don’t even remember what it was, and there was excessive usage of this. And my personal pet peeve is writing most readable code in most succinct way possible. For sure this hurts this (no pun intended). The following class is a result of that Friday’s frustration.

Introducing D.ebug

10 Jul 2019 .NET, .NET Core, Debugging

Lately I’ve been doing a lot of debugging often in code that needs to be executed certain way, from certain place and sometimes is also modified post-build a little. And sometimes more stuff, which I’ll not bother you with. And this makes debugging a tiny bit more difficult.

Empty try with finally

10 Jun 2019 .NET, .NET Core, C#

The finally block has a little unknown feature, that frankly isn’t even remotely needed for regular day-to-day development, but you already know content on this blog is usually little geeky.

Comparing speed of Blob Storage, AppService and CDN on Azure for static file serving

30 Apr 2019 AppService, Azure, Azure Storage, CDN, Cloud

For no particular reason and with no particular goal I decided to see how “fast” some selected services, with the ability to serve a static file, on Azure are. I was interested in the time to serve the file and requests per second. The services I selected are AppService in B1 and S1 plan, Blob Storage GPv2 and CDN in Standard plan from Verizon and Microsoft.

Global Azure Bootcamp 2019

20 Apr 2019 Azure, Azure Cosmos DB, Presentations & Speaking

Global Azure Bootcamp 2019. Jeden den, Azure po celém světě. A taky v Praze. I já přispěju svojí troškou do mlýna a povím vám něco o Azure Cosmos DB.

Gopas TechEd 2019

10 Apr 2019 Presentations & Speaking

Web ještě nehlásí vyprodáno, takže je stále možnost urvat vstup. Na letošní TechEd jsem připravil tři přednášky:

  • .NET Core 3.0, .NET Framework 4.8 a proč vše kolem je největší změna od zrodu .NETu
  • Jak měřit výkon .NET kódu správně
  • Entity Framework vs. SQL Server – co jste mohli udělat a neudělali; a co jste dělat neměli a přesto udělali

ADO.NET provider 6.6.0.0 for Firebird is ready

1 Apr 2019 .NET, C#, Databases in general, Entity Framework, Entity SQL, Firebird, LINQ, SQL, Visual Studio

New version 6.6.0.0 of ADO.NET provider for Firebird is ready for download. This release fills all the holes in the Entity Framework Core support. To be precise now Migrations are fully supported and query pipeline has been massively improved. Just to give you an idea, about 4100 tests were added. If you want to use Entity Framework Core with Firebird, now is the time.

ThreadPool.QueueUserWorkItem has a generic overload (and a new parameter)

24 Jan 2019 .NET Core, .NET Standard, Multithreading/Parallelism/Asynchronous/Concurrency

Although nowadays people, including me, are working mostly with tasks and async/await, sometimes going one level lower is helpful, because there’s less to worry about. And as I was today calling trusty ThreadPool.QueueUserWorkItem I found new overload. Overload that is generic.

G2B•TechEd 2019 a ShowIT 2019

20 Jan 2019 Presentations & Speaking

Za několik málo týdnů se konají opět konference G2B•TechEd v Brně a ShowIT v Bratislavě. V Brně budu mít dvě přednášky a sice Developer Keynote aneb .NET Core 3.0 a proč je to největší změna od zrodu .NET Core a Lua pro C# vývojáře a proč by se mi to mohlo hodit a V Bratislavě pak .NET Core 3.0 a proč je to největší změna od zrodu .NET Core a Přehled výkonnostních vylepšení v .NET Core a proč je určitě chcete.

Ať už v tom či onom městě vás zvu a rád zodpovím vaše případné dotazy.

DotNET Talks, vol.2

17 Jan 2019 C#, Presentations & Speaking

Ups. Úplně jsem zapomněl na druhou edici DotNET Talks. Akce se koná dneska, tedy máte ještě půl dne udělat si čas. 😃 Já vám řeknu něco o tom co čekat od C# 8 v “Co čekat v C# 8.0 v kostce”. Podle webu ještě místa jsou, tak přijďte.

Exploring C#’s ref return to better understand it

5 Dec 2018 .NET, .NET Core, C#, Roslyn, RyuJIT

I felt a bit fuzzy on the topic of ref returns in C#. I used it intuitively few times, but it felt I needed to fill some gaps and play with it in a little bit more structured way. This is my exploration of the topic. No particular order. No deep explanations. Just my thinking what should work and what not and trying it.