The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘Algorithms’ Category

BitSavers added some more Borland documentation in 2022 (most relevant for me: Assembler, Debugger, Profiler)

Posted by jpluimers on 2024/02/28

Below is a list of the Borland documentation that BitSavers added in 2022, ordered by relevance to me (and how I finally asked Peter Sawatzki if he still had the monochrome TDVIDEO.DLL he wrote for Turbo Debugger 3.0 for Windows):

Read the rest of this entry »

Posted in 8087, Algorithms, Assembly Language, Borland C++, C, C++, Debugging, Development, Floating point handling, Profiling, Software Development, Turbo Assembler, Turbo C, Turbo Debugger, Turbo Profiler, x86 | Leave a Comment »

UTC and ISO 8601, or GTFO

Posted by jpluimers on 2022/11/08

Always schedule your meetings in UTC, and use ISO-8601 date and time notation. Because time zone conversions are hard, especially with so many daylight saving time conventions.

I want not just a “UTC or GTFO” shirt, but a “UTC and ISO-8601, or GTFO” shirt.

It means I do not agree with [Archive.is] Colin Nederkoorn on Twitter: “Pro tip: Don’t schedule recurring meetings in UTC if you live in a place with daylight savings.… “ with multi-time zone teams: having it in UTC will balance out the DST changes over the teams.

Some more relevant Tweets that triggered me writing this post:

Read the rest of this entry »

Posted in Algorithms, Development, ISO 8601, Power User, Software Development, UTC | Leave a Comment »

Days since last time zone issue

Posted by jpluimers on 2022/02/24

If you do business with for instance Jordan for he first time, then is likely -1 because tomorrow their clock moves forward one hour.

The 2022 daylight saving time changes (summer time / winter time) are at time.is/DST_2022 [Wayback/Archive.is]

[Archive.is] Dr. Jessie Christianstein 👩🏻‍🔬🧟‍♀️ on Twitter: “… “

–jeroen

Read the rest of this entry »

Posted in Algorithms, Development, Software Development | Leave a Comment »

When floating point code suddenly becomes orders magnitudes slower (via C++ – Why does changing 0.1f to 0 slow down performance by 10x? – Stack Overflow)

Posted by jpluimers on 2022/01/26

When working with converging algorithms, sometimes floating code can become very slow. That is: orders of magnitude slower than you would expect.

A very interesting answer to [Wayback] c++ – Why does changing 0.1f to 0 slow down performance by 10x? – Stack Overflow.

I’ve only quoted a few bits, read the full question and answer for more background information.

Welcome to the world of denormalized floating-point! They can wreak havoc on performance!!!

Denormal (or subnormal) numbers are kind of a hack to get some extra values very close to zero out of the floating point representation. Operations on denormalized floating-point can be tens to hundreds of times slower than on normalized floating-point. This is because many processors can’t handle them directly and must trap and resolve them using microcode.

If you print out the numbers after 10,000 iterations, you will see that they have converged to different values depending on whether 0 or 0.1 is used.

Basically, the convergence uses some values closer to zero than a normal floating point representation dan store, so a trick is used called “denormal numbers or denormalized numbers (now often called subnormal numbers)” as described in Denormal number – Wikipedia:

In a normal floating-point value, there are no leading zeros in the significand; rather, leading zeros are removed by adjusting the exponent (for example, the number 0.0123 would be written as 1.23 × 10−2). Denormal numbers are numbers where this representation would result in an exponent that is below the smallest representable exponent (the exponent usually having a limited range). Such numbers are represented using leading zeros in the significand.

Since a denormal number is a boundary case, many processors do not optimise for this.

–jeroen

Posted in .NET, Algorithms, ARM, Assembly Language, C, C#, C++, Delphi, Development, Software Development, x64, x86 | Leave a Comment »

The IDEA project – an ongoing series of nonverbal algorithm assembly instructions

Posted by jpluimers on 2021/12/10

I wonder how many new algorithms were added, as the first 6 were really impressive: [WayBackIDEA on Twitter: “Excited to announce the IDEA project – an ongoing series of nonverbal algorithm assembly instructions: https://t.co/zOAyfOAv3l… https://t.co/epQfBBdzdF”

While originally scheduling this, these were added:

Read the rest of this entry »

Posted in Algorithms, Conference Topics, Conferences, Development, Event, IKEA hacks, LifeHacker, Power User, Software Development | Leave a Comment »

Constructing Suffix Trees: Ukkonen’s algorithm – Wikipedia

Posted by jpluimers on 2021/10/12

For my link archive:

I also need to check out [WayBack] Martin Farach-Colton – Wikipedia, as his algorithm is likely more optimised and more versatile.

–jeroen

Read the rest of this entry »

Posted in .NET, Algorithms, C#, Development, JavaScript/ECMAScript, Ruby, Scripting, Software Development | Leave a Comment »

Moore’s law has almost ended: back to the future

Posted by jpluimers on 2021/09/29

[WayBack] We’re approaching the limits of computer power – we need new programmers now | John Naughton | Opinion | The Guardian

Ever-faster processors led to bloated software, but physical limits may force a return to the concise code of the past

So back to optimisation and maybe even assembly language.

Which brings back the days gone by.

–jeroen

Read the rest of this entry »

Posted in Algorithms, Assembly Language, Development, Software Development | Leave a Comment »

Coming Back to Old Problems: How I Finally Wrote a Sudoku Solving Algorithm – DEV Community 👩‍💻👨‍💻

Posted by jpluimers on 2021/09/02

It is always fun to see how Sudoku solving algorithms are created and implemented. This is no exception: [WayBack] Coming Back to Old Problems: How I Finally Wrote a Sudoku Solving Algorithm – DEV Community 👩‍💻👨‍💻

(backtracking image from Wikimedia commons)

For a visual Sudoku solver, I usually take [WayBack] Sudoku Solver by Andrew Stuart. Shows the logic behind solving Sudoku square by square which is part of [WayBack] SudokuWiki.org – Getting Started having many visual explanations on how to solve these puzzles, for instance:

It’s a kind of sudo ku, but visually and never failed me solve one.

–jeroen

Posted in Algorithms, Development, Python, Scripting, Software Development | Leave a Comment »

Two might lead to a pattern

Posted by jpluimers on 2021/08/05

There is a known saying phrased using cardinal, adverbial or ordinal numbers, and several naming for the first:

  • One is change, two is coincidence, three is a pattern
  • Once Is Chance, Twice is Coincidence, Third Time Is A Pattern
  • One is an anomaly, two is a coincidence, three is a pattern
  • First time is an incident, second a coincidence, third a pattern

Sometimes the second can lead to a pattern.

Read the rest of this entry »

Posted in Algorithms, Development, LifeHacker, Power User, Software Development | Leave a Comment »

CloudFlare knows how to do public postmortems on outages

Posted by jpluimers on 2021/07/16

Everyone can learn from an outage. CloudFlare shows how to do it right, for instance on the RegEx-going-wild downtime 2 years ago.

So it’s time to link to that one again: [WayBack] Details of the Cloudflare outage on July 2, 2019

More like these at [WayBack] Post Mortem – The Cloudflare Blog.

More on evaluating regular expressions in linear time:

Via [WayBack] Details of the Cloudflare outage on July 2, 2019 | Hacker News

–jeroen

Posted in Algorithms, Development, Power User, RegEx, Software Development | Leave a Comment »