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 2,466 other followers

Archive for the ‘Algorithms’ Category

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 »

c# – Algorithm to check whether a certain hour falls into a given time period – Stack Overflow

Posted by jpluimers on 2021/07/15

For my link archive: [WayBack] c# – Algorithm to check whether a certain hour falls into a given time period – Stack Overflow answered by [WayBack] kennytm:

Assume you only have the time and not the date.

if end_time >= start_time:
    return start_time <= current_time <= end_time
else:
    return start_time <= current_time or current_time <= end_time

I totally agree with this comment:

This is brilliant! Thanks a lot. – Martin Dimitrov [WayBack]

I love it when algorithms are simple and elegant.

It reminded me of another scheduling related algorithm: [WayBack] Activity Selection Problem | Greedy Algo-1 – GeeksforGeeks

–jeroen

 

Posted in .NET, Algorithms, C#, Development, Software Development | Leave a Comment »

“Not having done docker, but having developed enough software to have the impression that as soon as things get hierarchical, things eventually end up in a mess. Somewhere down the road something won’t cope with depth/breadth/size and break badly.”

Posted by jpluimers on 2021/06/22

I originally posted this in a docker on docker thread, but I think it holds universally:

[WayBack] Jeroen Pluimers on Twitter: “Not having done docker, but having developed enough software to have the impression that as soon as things get hierarchical, things eventually end up in a mess. Somewhere down the road something won’t cope with depth/breadth/size and break badly.”

This despite the cool gif in the reply:

[WayBack] Duffie Cooley on Twitter: “… “

I found the below video files by searching for zzzz

Original thread start:

[WayBack] Duffie Cooley on Twitter: “When you hear Docker in Docker what do you think of? docker socket: Mounting in the underlying docker.sock and allowing a container to make new containers. kernel privs: Giving enough privs to a new container that it can make new containers cause it shares a kernel.”

–jeroen

Read the rest of this entry »

Posted in Algorithms, Cloud, Containers, Development, Docker, Infrastructure, Kubernetes (k8n), Software Development | Leave a Comment »

 
%d bloggers like this: