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

by Jiří {x2} Činčura

Configuring 3rd party Entity Framework provider (Firebird) from code

Published 19 Aug 2016 in Entity Framework, Firebird, and NuoDB

When you’re using Entity Framework 6 with some 3rd party provider - i.e. EntityFramework.Firebird or EntityFramework.NuoDb (disclaimer: I’m author of both) - you need to give Entity Framework few hints where to find some methods and classes. Maybe you’ve seen classes like DbProviderFactory or DbProviderServices. Often when you install the provider, your app.config is updated accordingly. But you might want to do it in code. Either because you want to to have it strongly typed or because you don’t want to think about what project, that’s using the DAL project, is going to be executed and so on.

Konference CoreStart

Published 26 Jul 2016 in Presentations & Speaking

.NET Core a všechno “Core” okolo je už v ostré verzi (ať se vám/mi to líbí nebo ne) a přináší plno změn a novinek. 17.-19.8. se uskuteční konference CoreStart, kde pro nás jako vývojáře bude asi nejzajímavější “.NET Core Day”, kde se na všechny ty “Core” věci podíváme.

Já jsem připravil přednaášku na téma “Entity Framework Core 1”, kde se podíváme co první verze umí (a také co zatím neumí) a jak je celý EF Core postavený vůči dnešnímu EF6 (a co vůbec s EF6 bude).

External procedures in Firebird in .NET done(-ish)

Published 17 Jul 2016 in .NET, C#, Databases in general, Firebird, and SQL

Over the rainy afternoons I slowly went through all the notes in the code I made when cutting corners to make it work as fast as possible and started cleaning. Just cleaning, no serious performance measurements nor improvements were done. But now it’s without any nasty hacks and shortcuts.

Early (very) preview of stored procedures (functions, triggers) in .NET in Firebird

Published 6 Jul 2016 in .NET, C#, Databases in general, Firebird, and SQL

Follow-up post.

Firebird 3 - with it’s new plugin architecture - has a feature that allows execute stored procedures, functions and triggers in environment different from inside engine. Basically one can write (or rather use) plugin that allow to write i.e. triggers in different language like C++ (or any native code). Nice. But I like to write in .NET and C#.

So I set out to try to write such plugin and funnel the data to and from .NET where it will be executed…

Executing program using Process class being slow - the reason

Published 16 Jun 2016 in .NET and Windows

We have a program that sends emails to clients based on what happens at business side. Pretty simple - you register, you got welcome email; and so on. And there’s a lot of these “actions”. When I wrote the program few years back I tested it and I was able to peak at about 3500 email per second. Should be plenty enough. But recently the queue started to get longer. Emails were processed later. And everything started to behave oddly.

Testing NDepend on FirebirdClient

Published 6 Jun 2016 in .NET, Firebird, and Visual Studio

Couple of weeks ago Patrick Smacchia reached to me and offered me a license for NDepend. At that time I was actually in some code cleanup in Fast 5 software and though it might be handy to try it. As usual a lot of other things took priority and only now I’m able to start playing with it. Because I needed some codebase that’s not huge and also not small, I took FirebirdClient (both ADO.NET provider as well as EF6 provider). It’s open source so you can try it yourself and it contains some ~10 years old code so there will be something to look at, for sure.

ADO.NET provider 5.0.5.0 for Firebird is ready

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

New 5.0.5.0 version of ADO.NET provider for Firebird is ready for download. As with every major release the changes of something going wrong are high. No exception here. Big thanks to people testing the provider and reporting bugs.

Also as I was there, my brain being in high power state, I fixed some bugs (though it was only few, these span well in the codebase).

ADO.NET provider 5.0.0.0 for Firebird is ready

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

New 5.0.0.0 version of ADO.NET provider for Firebird is ready for download. As you can see the major version number changed.

This release contains two new big features, both focused on Firebird 3. The BOOLEAN datatype is now supported (except Entity Framework mapping, currently). And SRP authentication is supported on Firebird 3. I think these are the most fundamental new features so I’m releasing it now. There’s more to come.

Also internals of the protocol handling were refactored and slightly cleaned up (and more to do). Hopefully that will enable easier improvements and fixes in the future.

Gopas TechEd 2016

Published 11 May 2016 in Presentations & Speaking

A jako každý rok výborný lokální Gopas TechEd se přiblížil. Pohled na program dává tušit nabitý program. Já svou troškou přispěji v podobě:

  • Azure Blob Storage netradičně
  • Debuggujte ve VS jako profík
  • EF Core 1.0: postaru Entity Framework 7

Přijďte. Je na co se těšit.

UDP packets not sent from ESP-8266 - solved

Published 20 Apr 2016 in .NET, Arduino, C#, ESP-8266, IoT, and Network

I’m now playing with ESP-8266, Wemos D1 mini to be precise. One think I’m now using for fun/debugging/communication is broadcasting UDP packets. For some reason the packets were not coming lately.

You might say: “Jiri, it’s UDP. Packets will get lost.”. True. But my packets were lost in 99% cases, on my home network. Something is going on.

Directed broadcast address

Published 13 Apr 2016 in .NET, Arduino, C#, ESP-8266, IoT, and Network

Although I can make it out of the TCP/IP woods almost always, sometimes I find edge cases that are interesting. More often than not these are result of security hacks in last 20 or so years and my knowledge is based on “regular/happy” case.

Checking for "TODO" comment with Roslyn

Published 19 Feb 2016 in C# and Roslyn

This week I was speaking at a local user group and got a fairly interesting question for Roslyn analyzers - search for // TODO: something comments and do something with it. I think it’s a great idea, because the comment is not a code exactly, but still Roslyn processes it. And to make it bit more interesting I decided not to sketch some analyzer for Visual Studio, but create just a raw console application that reports these comments, so anybody can tweak it for own needs (or eventually create a full blown analyzer from it, it’s just a few lines of code).

WUG: Asynchronní a paralelní programování v .NETu (Ostrava)

Published 18 Feb 2016 in Multithreading/Parallelism/Asynchronous/Concurrency and Presentations & Speaking

Paralelizmus, souběžnost, zamykání atp. Baví mě to. A rád o tom povídám. Rád o těchto problémech přemýšlím. Tentokrát se budu snažit natlačit něco z mé hlavy do hlavy všem zájemcům v Ostravě.

Asynchronní proramování nabralo za posledních pár let na obrátkách a dostalo se do povědomí mnoha vývojářů. Ačkoli ve své podstatě se nejedná o nic nového, alespoň v systému Windows. Nicméně příchod C# 5 a, jistě nyní známých, klíčových slov async a await umožnil použití asynchronní programování bez dřiny.

Pokud vás zajímají detaily od křemíku až po kód, přijďte 25.2.2016 od 17:00 na WUG do Ostravy.

Timer working with absolute - wall clock - time

Published 17 Feb 2016 in .NET, C#, and Windows

From time to time I need to create some kind of scheduler for recurring stuff in application. As long as it’s based on interval I can use the Timer. But when you need to trigger the action on specific time - wall clock time - it’s not smooths sailing. There’s a bunch of ways to tackle the problem and each presents different obstacles (like time changes due to NTP synchronization). But this is already solved in Windows kernel. Windows allow you to use timers with either absolute time or intervals.