|
Bugger. Just missed out by a few decades.
A Fine is a Tax for doing something wrong
A Tax is a Fine for doing something good.
|
|
|
|
|
Peering into space is looking backward in time.
Since they can observe light emanating from very early in the formation of the universe, they can shift the focus to the day anyone was born during the entire existence of our species.
So, there's that.
Cheers,
Mike Fidler
"I intend to live forever - so far, so good." Steven Wright
"I almost had a psychic girlfriend but she left me before we met." Also Steven Wright
"I'm addicted to placebos. I could quit, but it wouldn't matter." Steven Wright yet again.
|
|
|
|
|
We had .NET Core 3.1, then .NET 5 (which was the next version of .NET Core 3.1, skipping "4" so as not to confuse people with .NET 4.x, gee, thanks) and now we have .NET 6, aka .NET Core 6.
enum CoreVersion
{
DotNetCore31,
Net5,
Net6,
WhatsCore,
WhoCares
}
var you = Programmer.Factory();
if (you.AreUsing(".NET") && you.AreUsing("Core"))
{
CoreVersion version = you.WhichDoYouUse();
Console.WriteLine(version);
}
? How's that for a survey question?
One thing that is driving me nuts about .NET 6 is the null checks. Absurdly invasive.
Yes, the whole null check madness can be disabled in the .csproj by setting <Nullable>enable</Nullable> to <Nullable>disable</Nullable>
At least we have that option, otherwise it's:
#pragma warning disable CS8714 // The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint.
#pragma warning disable CS8602 // Dereference of a possibly null reference.
#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type.
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
And who knows how many other pragmas.
|
|
|
|
|
Yeah the whole "reference types are nullable" -> "reference types need to be made explicitly nullable" seems like a "oops, we didn't think of that" backtracking in philosophy. Or may the tech is simply at the point where the tooling can now help offset the inconvenience so it's no longer an inconveniece.
I get what they are trying to achieve, but what I generally end up doing is just making my ref types nullable and then, later, checking whether they are null or not. Back to square 1. The static type checking and the errors if you don't do the null ref check are nice, though.
cheers
Chris Maunder
|
|
|
|
|
I dabbled with the nullable types when they were first introduced, but I have no real use for them.
I actively avoid new "features" unless they provide a real benefit. Even Extension Methods are really just a "nice-to-have". Though I find Anonymous Methods to be very useful, particularly for making threads.
|
|
|
|
|
PIEBALDconsult wrote: I dabbled with the nullable types when they were first introduced, but I have no real use for them.
I find nullable types really useful when the class is a model of the DB table schema, but otherwise agreed. I do like the idea of string? to properly reflect a column string type that is nullable.
|
|
|
|
|
System.Data.SqlTypes.SqlString
|
|
|
|
|
Quote: .NET 6, aka .NET Core 6 I think they ended .NET Core line with .NET 5; bringing it all (Core, Standard, Framework, etc. etc.) together in a single platform.
Personally, I'd like a .NET version that doesn't have a lifespan of 2-3 years only. I stopped caring about .NET versions, to be honest.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
They ended the core branding with .NET 5; but .NET 5 is still .net core; not .net framework.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
|
|
|
|
|
I like .NET6
Null checks are a fine way to prevent some silly error.. granted they might seem annoying occasionally, but you can then use the ! operator like so: string s = null!; , go ahead, try it!
|
|
|
|
|
At this point I have no idea which .NET version is which or even which I'm using at any given time.
|
|
|
|
|
|
Well, I'm definitely not doing upgrades - my curiosity is for new personal projects. I've been using .NET Core 3.1 and have been recently poking at .NET 6. So far so good, but again, these are greenfield projects, not upgrades.
|
|
|
|
|
I see no reason to keep using .net Core 3.1. .Net 6 is LTS, can be used with the same good old syntax and has wider compatibility with other OSes. Also, they fixed quite a few bugs in the runtime libraries - but I guess one could use the most recent NuGets with older runtime versions.
We have both .net webforms (4.8) apps and razor (6.0) apps sharing the same logic libraries, so in those we use multitargeting and reference NetStandard where possible. If only MS made EF6 compatible with .net standard 2.1 we could get rid of multitargeting altogether (EF Core is not a valid alternative for our use cases).
We are also exploring how to replace Windows-specific dependencies with portable ones, mostly because from our preliminary tests running unit tests under Linux seems to be much faster.
One thing I really cannot stand: the new main syntax (Should the console project template use top-level statements · Issue #27420 · dotnet/docs · GitHub[^]). Maybe I'm just getting old
Luca
The Price of Freedom is Eternal Vigilance. -- Wing Commander IV
En Það Besta Sem Guð Hefur Skapað, Er Nýr Dagur.
(But the best thing God has created, is a New Day.)
-- Sigur Ròs - Viðrar vel til loftárása
|
|
|
|
|
Luca Leonardo Scorcia wrote: One thing I really cannot stand: the new main syntax
It sure takes a bit getting used to, at least visually. I was quite taken aback when I started with a .NET 6 Web API template. Where's Startup.cs? WTF is going on in Program.cs?
Once I realized what happened, my brain started to slowly adjust -- but it's still adjusting.
|
|
|
|
|
My personal motto is not to stick to previous versions unless there's a REALLY good reason to use them. To name an example, .NET source generators still require a .NET standard project, so I'm running mine on .NET standard instead of upgrading it to .NET 6.
The null checks are great! I've enabled them in .NET 5 (where they were optional) and am very glad they're enabled by default now. Having the null as a conscious & explicit construct, rather than something which just happens & is kept implicit, is a huge boon for safety!
Knowing for sure that a string parameter (as opposed to a string? parameter) will not be null (and it it is, I'll get an exception way before control flow forks into this particular method) helps a lot!
I also came to use null explicitly if I want an erroneous value which doesn't warrant an exception. When, an example I often work with, parsing a protocol with optional fields, I initialize those fields to null in the output structure. Knowing that the only way for a null to get there is for my parser to put it there because null is explicit.
|
|
|
|
|
|
|
This is why I am nervous about crypto. Are there any old school banks with years of protecting electronic accounts that will hold crypto for you? For a fee, of course!
|
|
|
|
|
The banks put the controls in place, the consumer keeps looking for "bridges" so they won't have to think, etc.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Are we surprised?
Safes are hackable - but in most case it involves a lot of noise and that draws attention...
Software is hackable - and it can be done in your comfort zone and without any attention at all...
Cryptocurrency came to life to go under the radar, but on the way it also lost the protection the bank system gives... Some was thinking it worth, other learned it may not be such a good idea...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
Around five years ago, my then-employer wanted to go big on Blockchain.
Don't get me wrong, they were a fine tech company with skilled people in .NET and Azure, and they didn't bet on a single horse, but they had a weak spot for the latest greatest (they always wanted to be in on it before clients started asking about it).
I attended some presentations about blockchain and one thing I heard is that it was unhackable.
Blockchain was so simple and so transparent that it just couldn't theoretically be done, the math was clear on it.
I rolled my eyes and waited, not too long, before the first news articles about hacked blockchains came rolling in
NOTHING is unhackable (Chrome doesn't even recognize "unhackable" as an existing word, while "hackable" is ).
|
|
|
|
|
According to the article, they didn't hack the blockchain, but a "bridge"; sounds more like a victim of agile.
Bridges use wrapped tokens, which lock tokens in one blockchain into a smart contract. After a decentralized cross-chain oracle called a “guardian” certifies that the coins have been properly locked on one chain, the bridge mints or releases tokens of the same value on the other chain. Wormhole bridges the Solana blockchain with other blockchains, including those for Avalanche, Oasis, Binance Smart Chain, Ethereum, Polygon, and Terra.
But what if you can’t trust the guardian? AT lengthy analysis posted on Twitter a few hours after the heist said that Wormhole’s backend platform failed to properly validate its guardian accounts.
..and Compounding the difficulty, the new hack came shortly after a recent change was made in some of the software involved.
“The bridge didn’t expect that users could submit a signatureset, since the change to facilitate that was a recent one in the Solana runtime,” Guido explained. “By submitting their own signature data, an attacker short-circuited a signature check that allowed them to take ownership of a large amount of tokens.”
A change in the software, which "did not expect" a signature.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: Bridges use wrapped tokens, which lock tokens in one blockchain into a smart contract. After a decentralized cross-chain oracle called a “guardian” certifies that the coins have been properly locked on one chain, the bridge mints or releases tokens of the same value on the other chain. Wormhole bridges the Solana blockchain with other blockchains, including those for Avalanche, Oasis, Binance Smart Chain, Ethereum, Polygon, and Terra.
But what if you can’t trust the guardian? AT lengthy analysis posted on Twitter a few hours after the heist said that Wormhole’s backend platform failed to properly validate its guardian accounts. This is mostly mumbo jumbo to me (and I suspect in general), so I have no idea what they're talking about
When I say "hacked" I mean in the broadest term of the word, social, technical, directly, indirectly...
Basically, people are manipulating blockchains where I was told that isn't possible (because hashes would fail and you can't fake hashes blah blah...)
|
|
|
|
|
Sander Rossel wrote: This is mostly mumbo jumbo to me (and I suspect in general), so I have no idea what they're talking about Lack of knowledge doesn't stop you from venting an opinion
Sander Rossel wrote: Basically, people are manipulating blockchains where I was told that isn't possible The blockchain wasn't hacked, but a "bridge".
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|