Disclaimer: I have no financial or any other interest in this or any other products mentioned in this review. I review this product because I really like it.
Typically at home, I use relatively cheap headphones to listen to music, play computer games, and discuss stuff over Zoom or any other applications. Typically I buy something in the range of $25-$35.
Last several years I have been buying Koss multimedia headphones (SB45 or SB49). They cost around $32 and to the most degree, they were fine. But they have a few issues that eventually start to annoy me.
The most common issue is that, after some time fake leather starts to peel from head cups and stick to the skin
[...Read More]
People don’t need electric vehicles anymore and the EV revolution is over. People don’t want EVs, they want hybrids. This is exactly the statement that mass media are trying to push to consumers.
But this is quite far from the truth. People still want EVs, but unfortunately, while demand is strong, the proposition is quite weak for each market segment except the most expensive one. And even in expensive segment proposition is quite bad.
But before I explain why, I must state that in most cases you want to buy an EV only in case you have a house or any other reliable place to charge it. Otherwise, it will be an unnecessary pain for your money.
If you try
[...Read More]
I was never a fan of Intel for quite a simple reason – buying Intel chips was not optimal from my point of view. Other companies provided a better performance-to-price ratio. But I understand that nobody can tell any company how much money they should ask for their products and it is strictly up to them. If Intel wants to sell their processors for a lot of money it is their business. But in general, they were making good and solid products.
But everything changed from the release of Pentium 4. At that time Intel figured out that everybody was buying megahertz they decided to create a CPU with a lot of megahertz. And then Pentium 4 was born.
It
[...Read More]
JavaScript is one of the languages that wasn’t designed properly. In fact, it wasn’t designed at all. It was an afterthought that just slapped into the browser to have some kind of programming. And because Java was a hot subject at that time, it got Java in its name. It has absolutely no relation to Java, except for some syntax similarity and garbage collection.
There were a lot of attempts to make it better and it has become better but it still has all the fundamental issues that almost all script languages have – lack of type system and that makes it unusable to write anything big or complex.
In a language with the type system compiler knows the type
[...Read More]
The previous part is here.
And finally, we are in the most important part which explains what works differently between the .NET Framework and .NET 6. Just in case I will talk about behavioral changes and about obvious parts like some methods that do not exist in .NET 6 but I will
- The .NET Framework will suppress all exceptions when it releases a reference to a COM object but .NET 6 will crash. One example of such a problem is when some object is freed despite having a reference count of more than zero. It is a bug and needs to be fixed. I just was surprised by how often it happened in our application.
- Accessing .NET from DllMain will lead to deadlocks. We had these in the .NET Framework, but they happened much more often in the .NET 6. And obviously, it needs to be fixed. It will take some time because it works most of the time and deadlock happens quite seldom.
- string.GetHashCode will return different values every time you start the application. Basically during startup runtime will generate a random seed and add it to the hash code. If you want hash code to persist then write a function that hashes string differently.
- When the application converts a floating point number to a string, the result will be slightly different. Here blog post that explains the changes. For example, when the .NET Framework outputs 3.1415, .NET may output as 3.141500001 or 3.141499999.
- Encoding.Default will be always UTF8 in .NET 6. If you want to return old behavior then you need to create Encoding from the current Windows code page.
- System.Diagnostics.ProcessStartInfo.UseShellExecute is true for .NET Framework but false for .NET As a result, previously it was possible to open the http link without changing properties but now UseShellExecute must be set specifically to true.
- Previously it was possible to bind to read-only property in WPF. Now it throws an exception and you need to add “, Mode=OneWay”.
- SHA512.Create("System.Security.Cryptography.SHA512CryptoServiceProvider") will return null. We replaced it with new SHA512CryptoServiceProvider().
- There is no SHA512Cng class. We replaced it with SHA512CryptoServiceProvider class that uses SHA512Cng internally when the application is running for Windows.
- Setting SecurityProtocolType.Ssl3 will throw an exception.
- Some controls were removed from WinForms. For example ContextMenu. They were replaced with a set of different controls quite some time ago but our code used an old version for some reason.
- In the .NET Framework, your application can load assembly A 2.0.0.0 from the application directory. Later it can load assembly K located in a different directory and assembly K can load assembly A version 1.0.0.0 from the same directory that contains assembly K and it will work. This will fail in the .NET 6 because another version with a higher version is already loaded. To fix this you will need to use AssemblyLoadContext.
- If you are using different assembly versions in WPF then it will work properly. You will have to rename assemblies to include the version in the assembly name. I spent quite a bit of time on this and I didn’t find any better way.
- If you are enumerating over HashSet sometimes it will contain elements in a different order in .NET 6. We found that during tests. But HashSet does not guarantee the order so it was an issue on our side.
- string.Compare("C-O", "CA") will return 1 for the .NET Framework and -1 for .NET 6. It is because Microsoft changed how comparing works to have the same result for all platforms. Previously it used Windows API for this.
[...Read More]
The previous part is here.
As I wrote before our project has 824 C# projects. As you can imagine it is a lot of source code and converting so much code will take quite a lot of time. But we typically release a new version of our product every month and we definitely will not be able to finish all converting and testing within one month.
As a result, we have to create a branch and periodically merge changes from the main/master branch. But there are the following problems:
- csproj file is for .NET 6 is very different from csproj file for the .NET Framework
- if we change some code and this code will be changed for the .NET Framework then we will have to do tricky merges
- it is a lot of work to convert many projects and we expect that some projects need manual conversion
- build system needs to be changed as well to be able to build the .NET Core projects
[...Read More]
Our company has a relatively big desktop product that still uses the .NET Framework. We tried to switch to .NET 5 in 2020 but we had one dependency that we could not make to work for the .NET Core family because it used things that were considered legacy even for .NET Framework. But this time it was way more successful and this is a story about how we were switching from .NET Framework to .NET 6 and what issues we had on our way.
But before you do anything you need to know why are you doing it. This is a really important question because such a huge change will create a lot of regression and your clients will be
[...Read More]
I’m sure that many of you heard about a backdoor in xz util that allows specific people to get root access if Linux is configured to allow incoming SSH connections. There are a lot of systems like that because it is a typical configuration for pretty much every Linux machine. Fortunately, it was caught quickly, and as far as we know there were no real hacks made via that backdoor.
But it reveals a lot of problems and most of them are typical for open-source development. I would like to review them and to explore if these problems apply to the closed-source world.
Let’s start with the obvious problem. You rarely get paid for developing open-source projects. Most of
[...Read More]
Recently I found that IPv4 for Lighsail will cost more from the 1st of May. And I decided to switch my test site to IPv6 only. I followed the guide that states that I had to create a snapshot and then restore it to an IPv6-only instance. Then I decided to connect to it via SSH and check that everything works fine.
To my surprise, I cannot connect to it. I tried everything and nothing worked. Then I tried to ping it and it also did not work. To make a story short eventually, I found that the issue was in my main OpenWrt router.
And then I remembered that I did something special in old versions of OpenWrt
[...Read More]