This is the tenth part of the .NET Inside Out series. For your convenience you can find other parts in the table of contents in Part 1 – Virtual and non-virtual calls in C# If you are interested in the topic see the talk page Today we are going to see a concept of type … Continue reading .NET Inside Out Part 10 — Using type markers for low level optimizations
Month: August 2019
Decreasing pain of stolen focus
One of the most irritating thing in Windows is no way to prevent an application from stealing focus. There are multiple questions on Stack Overflow regarding the issue, there are rumors that Microsoft wanted to do something but they cannot detect it reliably. There are workarounds like ForegroundLockTimeout but ultimately there is no good solution. … Continue reading Decreasing pain of stolen focus
Comparing numbers is hard
We know that to compare floating point values we should use epsilon and not just compare bits. We may run into similar issues when comparing BigDecimal in Java: What is the output? Of course it is false, otherwise I wouldn’t write this post. This is because BigDecimal includes scale: So we should use this: and … Continue reading Comparing numbers is hard
Custom memory allocation in C# Part 12 — Hiding objects from GC
This is the twelfth part of the Custom memory allocation series. For your convenience you can find other parts in the table of contents in Part 1 — Allocating object on a stack We already know how to allocate memory anywhere on the heap but if you think that it solves all problems with GC … Continue reading Custom memory allocation in C# Part 12 — Hiding objects from GC
Modifying Android application on a binary level
Recently I had to modify an existing Android application for which I didn’t have a source code, only APK file. This may sound like an impossible task but actually it is pretty easy (very tedious, though). I didn’t want to use any compilers or install Android SDK with emulators as I know how heavy those … Continue reading Modifying Android application on a binary level