Posted by jpluimers on 2015/10/07
A long time ago, there was an interesting discussion here: I was wondering, that what is the closest value to the Zero floating point can have.
Recently I needed to do some calculations on series where getting close to zero could become a problem.
- Math seems to have an Epsilon of 1E-12.
- Sytem.Types has Epsilon of 1E-30 and Epsilon2 of 1E-40.
- XE4+ FMX has IsEssentiallyZero and IsNotEssentiallyZero for Single values.
In practice it depends a lot on what you are doing. Sometimes absolute Epsilons are best, but at other times relative difference is much more applicable.
Then there is also a Machine Epsilon: a way to derive an Epsilon from a data type that works in all languages and platforms.
Posted in .NET, C, C#, C++, Delphi, Development, Software Development | 1 Comment »
Posted by jpluimers on 2015/10/06
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), Delphi, Delphi 10 Seattle, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2015/09/30
ReSharper has a whole set of nice keyboard shortcuts, which includes Ctrl + Shift + , for View Recent Edits.
This overwrites the Zoom Out half of the default Visual Studio zoom keyboard shortcuts (thanks Carlos Muñoz):
Ctrl + Shift + . to zoom in and Ctrl + Shift + , to zoom out.
They don’t keep an alternative for Zoom Out, and unlike most tools I know that allow for zooming, there is no keyboard accessible menu entry for Zoom Out in Visual Studio.
So you have to use your mouse to go in the lower left of your editor window in order to Zoom Out (thanks ashteele for putting that in an SO question):
Or you can reconfigure the old shortcut (thanks Aaron Ransley):
Keyboard and map “
View.ZoomIn” and “
Posted in .NET, Development, Software Development, Visual Studio 11, Visual Studio 2010, Visual Studio 2013, Visual Studio 2014, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2015/09/29
Below are the captions, read the full article as it is very well written.
Why your code is hard to understand
- Problem #1, Overly Complex Mental Models
- Problem #2, Poor Translation of Semantic Models into Code
- Class Structure and Names
- Variable, Parameter and Method Names
- Single Responsibility Principle (SRP)
- Appropriate Comments
- Problem #3, Not Enough Chunking
- Problem #4, Obscured Usage
- Problem #5, No Clear Path Between the Different Models
- Problem #6, Inventing Algorithms
via: Why Your Code Is So Hard to Understand – CodeProject.
Posted in Delphi, .NET, Software Development, Development, Web Development | 5 Comments »
Posted by jpluimers on 2015/09/28
I’ve seen this question coming up a few times, and bumped into this at a client recently: the UAC dialog coming up when debugging a 32-bit executable.
This is caused (more details below) by Installer Detection Technology introduced in Windows Vista (with UAC) and tightened in more modern Windows versions.
The solution is to either:
- not include Installer, Patch, Update, Upgrade, Setup, … in your EXE name
- provide a correct manifest to your EXE (getting this right can be hard)
- don’t use x86 as platform target
For software you don’t have source code for, you can alter the manifest with a requestedExecutionLevel element: Fixing the way Vista Auto-detects Installers – Ben’s Writing.
A few links on Installer Detection Technology in Windows:
Read the rest of this entry »
Posted in Delphi, .NET, Software Development, Development, C#, C# 2.0, C# 3.0, C# 4.0, .NET CF, Delphi XE2, .NET 4.5, C# 5.0, C# 1.0, .NET 3.5, Delphi 2007, Delphi 2010, Delphi XE, .NET 1.x, .NET 2.0, .NET 3.0, Delphi 2009, .NET 4.0, Delphi XE3, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 2005, Delphi 2006, Delphi XE4, Delphi 2, Delphi XE5, Delphi XE6, RemObjects C#, C# 6 (Roslyn), Delphi XE7, Delphi XE8, Delphi 10 Seattle | 1 Comment »