Archive for the ‘Jon Skeet’ Category
Posted by jpluimers on 2025/10/16
From a long time ago, but forgot to queue it because I bumped into it in the midst of my cancer treatments when my memory and executive functions were hardly existent:
https://codeblog.jonskeet.uk/2020/10/23/a-tour-of-the-net-functions-framework/
Via [Wayback/Archive] Tweet:
Blogged: a tour of the .NET Functions Framework – https://t.co/5xpjNyux5q So excited to write this post – I’ve really enjoyed working on this framework, and I’m really looking forward to getting feedback. #BuiltOnAspNetCore #GoogleCloudFunctions
--jeroen
Posted in .NET, Development, Jon Skeet, Software Development | Tagged: BuiltOnAspNetCore, GoogleCloudFunctions | Leave a Comment »
Posted by jpluimers on 2025/10/14
I forgot how I bumped into this, but a while ago I found this interesting 2023 post: [Wayback/Archive] It’s Time For A Change: datetime.utcnow() Is Now Deprecated – miguelgrinberg.com explaining naive (without time zone) and aware (with time zone) date time objects.
It reminded me of Delphi, where NowUTC – as Delphi does have neither naive or aware date time objects – returns a floating point value (yes, it has a separate TDateTime type, but it represents the number of days that have passed since December 30, 1899 which in face stems from the Windows OLE Automation era* (OLE Automation is a subset of COM), see [Wayback/Archive] DateTime.ToOADate Method (System) | Microsoft Learn.
That method is mentioned in [Wayback/Archive] Why You Should Use NowUTC Instead of Now in Delphi: A Quick Guide – YouTube and Delphi deserves a way better infrastructure of date and time handling.
So this post is also a reminder to myself: figure out if there is an object oriented DateTime library for Delphi yet, and if not see if there is interest to create one similar to [Wayback/Archive] Noda Time | Date and time API for .NET by Jon Skeet.
Delphi references
Read the rest of this entry »
Posted in .NET, .NET Framework, .NET Standard, C#, Conference Topics, Conferences, Delphi, Development, Event, Jon Skeet, Python, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2025/05/01
Oops, I thought this had been published a long time ago, but oh well: it is never too late to publish reflections on a C# programming language improvement.
After recovering from my rectum cancer treatments and finally upgrading most of my projects to recent enough C# versions, it was time to catch up on useful little C# language features released during my treatments.
This one is really nice: [Wayback/Archive] File scoped namespaces – C# 10.0 draft specifications | Microsoft Learn.
I wish it had been released much earlier, as it so much reminds me of the unit keyword in Delphi which influenced C# a lot. Well, actually the unit actually started in UCSD Pascal and Turbo Pascal; UCSD Pascal ran on the UCSD p-Machine (more on that in a future blog post), which influenced the Java Virtual Machine, which was based on Java bytecode and a Just-in-time compiler in turn influenced the .NET Common Language Runtime.
There are many examples from other languages, paradigms and frameworks: I love how C# and .NET bring so much programming history together.
In Delphi it is easy: a source file can contain at maximum one unit (and apart from files included in that source file, no other source files can contribute to that unit) and the filename needs to match the unitname, so the unit is a self contained namespace.
Read the rest of this entry »
Posted in .NET, About, C#, C# 10, Cancer, Delphi, Development, Java, Java Platform, Jon Skeet, Pascal, Personal, Rectum cancer, Rider from JetBrains, Software Development, Turbo Pascal, UCSD Pascal, Visual Studio and tools, vscode Visual Studio Code | Tagged: 1509, 35690, 36566, 44201, msbuild, region | Leave a Comment »
Posted by jpluimers on 2021/05/18
A while ago, I needed to get RowVersion binary data out of SQL Server. People around me told me it is stored as BigInt.
I luckily bumped into [WayBack] sql server – Cast rowversion to bigint – Stack Overflow.
That post explains RowVersion is not stored as BigInt. Both RowVersion and BigInt take up 8 bytes of storage, but RowVersion is big-endian and unsigned, whereas BigInt is little-endian and signed.
A few quotes from it:
In my C# program I don’t want to work with byte array, therefore I cast rowversion data type to bigint:
SELECT CAST([version] AS BIGINT) FROM [dbo].[mytable]
So I receive a number instead of byte array. Is this conversion always successful and are there any possible problems with it? If so, in which data type should I cast rowversion instead?
and
You can convert in C# also, but if you want to compare them you should be aware that rowversion is apparently stored big-endian, so you need to do something like:
byte[] timestampByteArray = ... // from datareader/linq2sql etc...
var timestampInt = BitConverter.ToInt64(timestampByteArray, 0);
timestampInt = IPAddress.NetworkToHostOrder(timestampInt);
It’d probably be more correct to convert it as ToUInt64, but then you’d have to write your own endian conversion as there’s no overload on NetworkToHostOrder that takes uint64. Or just borrow one from Jon Skeet (search page for ‘endian’).
Code: [WayBack] Jon Skeet: Miscellaneous Utility Library
Related:
--jeroen
Posted in .NET, Database Development, Delphi, Development, Jon Skeet, Software Development, SQL Server | Leave a Comment »
Posted by jpluimers on 2021/04/07
For past timestamps (or date-times), as long as you know the associated location, you always know the time zone rule that applies, no matter if you store them in UTC or local time zone.
For future dates, UTC might not be the best option, as you have no knowledge on future time zone rules. There you need to have at least three fields:
Read the rest of this entry »
Posted in .NET, Algorithms, Development, Jon Skeet, Software Development | Leave a Comment »
Posted by jpluimers on 2019/09/12
For my link archive.
Full text at: [WayBack] … why the Delphi language does not allow parameterless constructors… – David Heffernan – Google+
Abstract:
+Stefan Glienke deleted his post about parameterless record constructors, presumably due to all the off topic comments.
…
.net at CLR level does allow parameterless constructors on structs. But the C# language bans them: https://msdn.microsoft.com/en-us/library/saxz13w4.aspx
Jon Skeet posted an answer on SO way back in 2008 on this topic: http://stackoverflow.com/a/333840/ From that answer:
—-
The CLR allows value types to have parameterless constructors, but C# doesn’t. I believe this is because it would introduce an expectation that the constructor would be called when it wouldn’t. For instance, consider this:
MyStruct[] foo = new MyStruct[1000];
…
—-
My guess is that Embarcadero decided to ban parameterless constructors on Delphi records for the same reason. Or perhaps they just copied the rules from C# without realising that the CLR supported parameterless struct constructors.
References:
--jeroen
Posted in .NET, C#, Delphi, Development, Jon Skeet, Software Development | Tagged: 1029 | Leave a Comment »
Posted by jpluimers on 2019/03/27
The list below is based on a G+ discussion in a single language, but has way broader aspects.
It’s on value types, mutability, parameterless constructors and expectations of compiled code.
I’ve bitten myself in the foot with mutable types in too many languages too often, so I started advocating this years ago at clients, and now in this blog-post.
TL;DR:
Read the rest of this entry »
Posted in .NET, C#, C++, Delphi, Development, Jon Skeet, Software Development | 2 Comments »
Posted by jpluimers on 2016/01/18
Still a great book. I love the chapter Threading in C# – Free E-book which you also can get as a PDF download.
It’s a chapter from C# 56/5/… in a Nutshell by Joseph Albahari. Great book!
Don’t forget to read these as well: Jon Skeet: Multi-threading in .NET: Introduction and suggestions (printable) Multi-threading in .NET: Introduction and suggestions (browseable)
--jeroen
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Jon Skeet, Software Development, Visual Studio 2008, Visual Studio 2010, Visual Studio 2012, Visual Studio 2013, Visual Studio 2014, Visual Studio 2015, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2015/07/15
Thanks [Wayback] Jørn Einar Angeltveit for sharing this a while ago:
A session by Jon Skeet and Tony the Pony (which has strong teeth) presented during the Polish DevDay 2013 in Kraków, Poland.
[Wayback] +Jon Skeet’s speech [Wayback] “Back to basics” is really a good watch.
In a funny way, he explains why the simplest fundamentals of computer software text, dates and numbers can cause some real headache for the programmer…
In case you didn’t know: Jon Skeet is “Chuck Norris” on [Wayback] stackoverflow.com:
The subtitle is “the mess we’ve made of our fundamental data types”.
Some of the topics covered:
Read the rest of this entry »
Posted in .NET, C#, Conference Topics, Conferences, Delphi, Development, Encoding, Event, internatiolanization (i18n) and localization (l10), Java, Java Platform, Jon Skeet, Pascal, Scripting, Software Development, Unicode | 2 Comments »