Struct with “main method” as an entry point
Have you ever thought about the most basic structure of an application? The main method and its placement in Program
class…
Have you ever thought about the most basic structure of an application? The main method and its placement in Program
class…
Have you ever looked how anonymous classes are implemented? If you did, you know it’s a generated generic class. And if you didn’t, you know now. Either way, you can find more details below. But also building on top of previous post about generic parameters limit in generic classes, where’s the limit here? It surely cannot be higher.
After a small pause in every-year Firebird conferences, filled with few “seminars”, the Firebird Conference is back. This year in Berlin, Germany.
Pretty stupid question, right? Because if it’s more than, say, 20 or 100, it’s enough. But still. Where is the limit?
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.
“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.
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.
New version 7.1.1.0 of ADO.NET provider for Firebird is ready for download. This a small bug-fix release related to wire encryption on Linux.
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.
New version 7.1.0.0 of ADO.NET provider for Firebird is ready for download. The main focus of this release is performance.
If you’re not yet registed for this year’s .NET Developer Days, where I’ll be speaking, you’re going to regret it. Here are (my) 3 reasons.
New version 7.0.0.0 of ADO.NET provider for Firebird is ready for download. The main focus of this release is wire encryption.
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.
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.
New version 6.7.0.0 of ADO.NET provider for Firebird is ready for download. This release improves the Entity Framework Core support and Firebird Embedded support.
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.
It has been few exciting weeks and days lately and today I’m happy to introduce you to FbNetExternalEngine version 2.0. This version adds support for functions and also improves performance (on top of previous improvements).
Today I’m releasing first small update to the FbNetExternalEngine. The focus is just on performance. No new features were added.
V .NETu se dějou v posledních měsích velké změny. Trochu toho zmatku si srovnáme na WUGu v Košicích 18.6.2019 of 17:00. Tak neváhejte a doražte. Beztak bude pršet a Tatry jsou daleko. 😉
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.
First thing first, I know there’s an Enum.HasFlag
method, yet I’m not interested in it (or optimizations around it). What I like to know is whether one of these two ways – (EnumValue & mask) != 0
and (EnumValue & mask) == mask
– to check for a (single value) flag in an enum is better.
Few days back I learned geeky little piece about JIT. This is exactly the type of knowledge you don’t have to use, maybe ever, yet it’s crucial the JIT handles it (so you don’t have to), because every smart instruction is performance gained. Literally, every instruction or every CPU cycle counts.
.NET Core 3.0 se blíží a s ním i další várka změn a novinek. A protože jde o další major verzi, není toho málo. Tomáš Herceg a jeho team připravili konferenci Update Days: Corestart 3.0, která se koná 6. – 7. června 2019.
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.
As I was writing previous post I got some idea to “nest” await
s in the using
definition and make it little bit confusing.
C# 8 is bringing asynchronous disposables via new IAsyncDisposable
and although the basic concept is easy to grasp, other rules of await
ing still apply here. And one of these is the usage of ConfigureAwait
call.
In less than a month (21st-23rd of May 2019) the biggest Slovenian conference – NT konferenca 2019 – will happen. And I’m so stoked to be part of it with my session about What to expect from Entity Framework Core 3.0 and Entity Framework 6.3.
Nový rok 2019 nám začal, a tak nebude od věci se podívat co nás čeká (a asi ani nemine) za novinky a změny ve světě vývoje .NET aplikací na WUGu v Olomouci 25.4.2019 od 17:00. Představíme si praktický dopad jednotlivých novinek z různých pohledů, jejich očekávanou časovou dostupnost i jak se na jejich příchod již nyní připravit.
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.
In less than two months (28th-29th of May 2019) the Cloud DeveloperDays 2019 conference will happen. I was lucky to have two sessions selected and I hope to meet you there.
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:
When I wrote the post Using value converter for custom encryption of field on Entity Framework Core 2.1 the encryption there was non-existing. My intention was to show the skeleton. But in comments somebody asked how to wire up Data Protection.
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.
New version 6.5.0.0 of ADO.NET provider for Firebird is ready for download. This is a mostly release with bug fixes, although one new feature was added and that is support for SourceLink.
When I wrote the yield return await and await foreach geekery post I had no idea it would be so interesting for so many people. But it really spiked up. And I feel a need to point out some interesting ideas people posted on Reddit, in comments or on Twitter.
I was playing with structs and classes recently and found something I had no idea .NET does. Although it’s not something groundbreaking, I’ll share it with you anyway.
Nový rok 2019 nám začal, a tak nebude od věci se podívat co nás čeká (a asi ani nemine) za novinky a změny ve světě vývoje .NET aplikací na WUGu ve Zlíně 21.2.2019 od 17:30. Představíme si praktický dopad jednotlivých novinek z různých pohledů, jejich očekávanou časovou dostupnost i jak se na jejich příchod již nyní připravit.
As I was playing few days ago with “yield return await
“ I got an idea to try fit as much “keywords” as possible into one “expression”. I mean as much blue words (in Visual Studio’s default colors) as possible together (not separated by semicolon, comma, colon, bracket, etc.).
This is just a pure geekery, but as I was playing with asynchronous enumerables I realized I can combine the await
and yield return
together. In fact, I can even throw await foreach
into the mix.
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.
From the “Today I found out and it’s even in the documentation” series. Did you know that when you’re using discards in C# (the _
) you don’t have to use var
? Let’s see it in action.
Nullable reference types coming in C# 8 are a great addition to anyone’s toolbox. But if you tried it you probably know “just” warnings are produced. And sometimes you’d like to have errors instead of warnings, so the build fails hard or something like that. It’s surprisingly easy to do so.
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.
As I was talking yesterday about new big features in C# 8, I learned about a small feature coming to this version as well that simplifies usage of interpolated verbatim strings.
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.
I’m so excited to finally reach point where I can call FbNetExternalEngine ready and release version 1.0. It’s finally happening. I remember starting in June 2016 and being excited when Firebird first loaded the stubs I had in place and today all the initial ideas are in place and working.
Nový rok 2019 nám začal, a tak nebude od věci se podívat co nás čeká (a asi ani nemine) za novinky a změny ve světě vývoje .NET aplikací na WUGu v Brně 15.1.2019 od 17:00. Představíme si praktický dopad jednotlivých novinek z různých pohledů, jejich očekávanou časovou dostupnost i jak se na jejich příchod již nyní připravit.
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.
Yesterday I found out that one of my NodOn Soft Remotes was dead as a doornail, maybe even deader than a doornail. That was problem. Because the Z-Wave controller has no way detecting this node is dead, because it’s a sleeping node. How to get out of this situation?
It already happened on Friday, but you might have missed this release. The new version of FirebirdDbComparer was published and this version contains among small bug fixes and performance optimizations also one big new feature and that’s support for packages in Firebird 3.
When I need to put some default value somewhere, I often use Unix epoch. It’s more reasonable, in my eyes, than DateTime.MinValue
. But there’s no field for that value thus I always had to create it “manually”. Well, not anymore.
Dostali jsme s Davidem Gešvindrem takový “zajímavý” nápad. V budově Gopasu v Praze je docela dost pater a po obědě, v rámci lepšího trávení a protažení, chodíme nahoru po schodech. Ve skutečnosti jdeme většinou z -2. až do 11. patra pro extra body. 😃 No a co třeba zkusit chodit nahoru a dolů…
Následující pondělí se koná akce s názvem Microsoft Developer Days & Azure DevOps Bootcamp 2018. Já vám povím něco o Azure CosmosDB jako možnosti jak škálovatelně ukládat a hlavně získávat data. Kromě toho je na konci akce (a samozřejmě i v průběhu) vyhrazen čas na konzultace a “networking”. Máte-li tedy chuť něco prodiskutovat, nezapomeňte dorazit.
I almost forgot to tell you about this. This week, Thursday, I’m speaking at ICTech Day in Belgium. And about the topics I’m very passionate about. First session is “Tasks and Await from the ground up” and other is “Async and Await”. If you’re in the area, maybe you can still try to make time and come (you have to be a guest of somebody from PeopleWare or Elmos).
Za necelý týden se koná akce s názvem MonkeyFest Bootcamp Prague 2018, což je podobně jako Global Azure Bootcamp akce konající se v jeden den na celém světě. MonkeyFest je zaměřen na svět Xamarinu a příbuzných technologií. No a protože Xamarin je také o C#, připravil jsem si přednášku s názvem “Co čekat od C# 7, 7.1, 7.2, 7.3 a 8.0”. Pokud vás novinky C# zajímají, nezapomeňte dorazit.
New version 6.4.0.0 of ADO.NET provider for Firebird is ready for download. Among regular bug fixes and improvements I’d like to talk about one performance improvement done in this version.
Basically by accident I found out that multiplication by zero is optimized in Roslyn compiler. That got me thinking… Can I abuse it and make it fail?
While I was reviewing some code week or two back, I got idea to test what’s the speed difference between ToUpper
, ToUpperInvariant
, ToLower
and ToLowerInvariant
. Of course, these methods are not doing the same thing, but sometimes it doesn’t really matter and if any is sufficient then, maybe, performance wins. Or at least I thought it’s going to be interesting to see whether there’s a difference and how much.
Máte rádi C#? A ztrácíte se v aktuální rychlé kadenci verzí? Mám pro vás řešení – WUG 25.10.2018 od 17:30 ve Zlíně. Všechno dáme do kupy a srovnáme si to v hlavě.
C# v poslední době velmi rychle přidává nové funkce. Malé funkce v minor verzích, ale připravuji se i velké změny do major verze (verzí). Co je tedy dostupné v C# 7, 7.1, 7.2, 7.3 a jak to začít používat. A co nás čeká dál a hlavně ve verzi 8.0?
Bit out of frustration when demoing features newest versions of Entity Framework Core, I’ve found out a new feature of SqlClient
(SqlConnection
to be precise) that’s available since .NET 4.5.1 that might affect speed when working often without existing database.