The Wiert Corner – irregular stream of stuff

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

  • My badges

  • Twitter Updates

  • Pages

  • All categories

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

    Join 1,839 other subscribers

Archive for the ‘Software Development’ Category

To help understanding combinations of boolean operators: Truth table – Wikipedia

Posted by jpluimers on 2018/10/04

Most software developers know they exist, but some (including me) find them hard to visualise, especially for combinations of operators, or for less common operators: the Truth table – Wikipedia.

The common operators that everyone seems to understand are these:

  • logical true
  • logical false
  • logical negation
  • logical and
  • logical or
  • logical xor

It becomes harder with a series of combinations, for instance series of and (not ...) and (not ...) and (not ...) – not to be confused with nand, similarly or (not ...) or (not ...) or (not ...) – not to be confused with nor, which both can be transformed according to the De Morgan’s laws – Wikipedia:

In set theory and Boolean algebra, these are written formally as

{\displaystyle {\begin{aligned}{\overline {A\cup B}}&={\overline {A}}\cap {\overline {B}},\\{\overline {A\cap B}}&={\overline {A}}\cup {\overline {B}},\end{aligned}}}

Using truth tables

Read the rest of this entry »

Posted in Algorithms, Conference Topics, Conferences, Development, Event, Software Development | 2 Comments »

What’s the point of having abstract classes in Delphi? 

Posted by jpluimers on 2018/10/04

There was an interesting thread a while ago: [WayBack] What’s the point of having abstract classes in Delphi? – Agustin Ortu – Google+

The answer is none (the documentation warns you against it – see Constructing instance of abstract class –  the compiler doesn’t), so Stefan Glienke submitted this bug: RSP-10235: No warning for .Create on class declared as TClass = class abstract

This post is a reminder to myself to see if any progress has been made by the compiler engineers.

–jeroen

Posted in Delphi, Development, Software Development | 9 Comments »

Fred Hebert on Twitter : “honest programming books… “

Posted by jpluimers on 2018/10/03

[WayBack] Fred Hebert on Twitter : “honest programming books… “:

  • The CVE Programming Language; ANSI C; Second Edition
  • The Rust Programming Language; The C++ that Feels Like Haskell (this book cannot be borrowed)
  • Librertarian Programming; The Ideology Behind Heartbleed, by a Racist Misogynist Taken Seriously; Revised and Expanded; I don’t think the cops in that video hated anybody. They were just doing their job. And their job included strangling a man to death for having sold untaxed cigarettes.
  • The Go Fuck Yourself Language
  • Continuous Integration; Pushing Retry Until Flaky Test Pass and the Build Succeeds

More images at [WayBack] Thread by @mononcqc: “honest programming books more honest books (including my own) […]”.

  • Please Use my Language; A Beginner’s Guide

  • Again: Please Use my Language

–jeroen

Read the rest of this entry »

Posted in Development, Fun, Quotes, Software Development | Leave a Comment »

On my list to try (about half a year since it appeared): A new mutlti-threading library for Delphi. (darkThreading) – Chapman World

Posted by jpluimers on 2018/10/03

With fresh libraries – like new Delphi and Windows versions – I usually take a pause to see if any major updates have been published to stabalise things.

So about half a year after the release of A new mutlti-threading library for Delphi. (darkThreading) – Chapman World [WayBack], this is a reminder for me to try it.

With the Task Parallel Library still not being up to par, I wonder how DarkThreading compares to the very stable [WayBack] GitHub – gabr42/OmniThreadLibrary: A simple and powerful multithreading library for Delphi.

The source is at [WayBack] GitHub – chapmanworld/darkThreading: Platform agnostic light-locking threading library for Delphi (part of the DarkGlass project).

Note that by now it has moved to [WayBack] DarkGlass/darkLibs/darkThreading at master · chapmanworld/DarkGlass · GitHub (thanks Stefan Glienke for figuring that out)

One comment already: the [WayBack] darkThreading/Building.md at master · chapmanworld/darkThreading · GitHub describes dependencies on the below libraries, but does not use git modules (see [WayBack] Git – git-submodule Documentation) to reference to known stable commits of them:

In the man time, Edwin Yip has reviewed it: [WayBack] Simple Comparison of OmniThreadLibrary and darkThreading (http://chapmanworld.com/2018/05/24/a-new-mutlti-threading-library-for-delphi-darkthreading/) … – Edwin Yip – Google+ after in may he indicated he would look into it at a later stage [WayBack] http://chapmanworld.com/2018/05/24/a-new-mutlti-threading-library-for-delphi-…

–jeroen

Via [WayBackCraig Chapman on Twitter: “My threading library for Delphi (darkThreading) https://t.co/Jo7nVGzsNY”

 

Posted in Delphi, Development, Software Development | 2 Comments »

Just curious, Is there ever a benefit to not providing a GUID in an interface…

Posted by jpluimers on 2018/10/03

An interesting question [WayBack] Just curious,Is there ever a benefit to not providing a GUID in an interface? – Johan Bontes – Google+

The answer is simple: The benefits are almost none and you loose compiler assisted casting ease.

The interesting bits are the discussion where even Embarcadero isn’t sure what kind of magic the compiler does on generic interfaces.

–jeroen

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

Not just C++: Thoughts on Dealing with Signed/Unsigned Mismatch – IT Hare on Soft.ware

Posted by jpluimers on 2018/10/02

[WayBack] C++: Thoughts on Dealing with Signed/Unsigned Mismatch – IT Hare on Soft.ware.

I have seen things like this happen in way to many places, not just C/C++:

static_assert( -1 < 1U );//fails!

Take away:

Never ever use explicit casts merely to get rid of warnings (whether signed/unsigned or otherwise)

A way to set various C/C++ compilers apart: [WayBack] GitHub – shafik/determine_c_or_cpp: Determine programatically C from C++ as well as various versions

Via: [WayBack] C++: Thoughts on Dealing with Signed/Unsigned Mismatch – IT Hare on Soft.ware: Kevlin Henney – Google+

–jeroen

Posted in C, C++, Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »

aha (Ansi HTML Adapter) with clickable URIs

Posted by jpluimers on 2018/10/02

aha is great to generate HTML from ANSI text (i.e. the coloured output on a Linux console).

But it doesn’t generate clickable URIs (it can’t yet by itself as it only looks one character in the future).

The thread at https://github.com/theZiz/aha/issues/20 suggested a case-insensitive regex through sed but the exact suggestion failed for a few reasons I will explain below.

First the bash alias (requires both aha and perl):


#!/usr/bin/env bash
# based on https://github.com/theZiz/aha/issues/20#event-797466520
aha-with-expanded-http-https-urls()
{
aha | perl -C -Mutf8 -pe 's,([^"])((https?|s?ftp|ftps?|file)://.*?)([\s]|\&quot;\s),$1<a href="$2">$2</a>$4,gi'
}

Read the rest of this entry »

Posted in *nix, *nix-tools, bash, bash, Development, Perl, Power User, RegEx, Scripting, Software Development | Leave a Comment »

Reminder to self that this cleared itself: Delphi fails to start after Windows did some “Program Compatibility Assistant” magic…

Posted by jpluimers on 2018/10/02

This repaired itself; weird: [WayBack] Delphi fails to start after Windows did some “Program Compatibility Assistant” magic to it when BDS.exe crashed because the compiler ran out of memory:… – Jeroen Wiert Pluimers – Google+

–jeroen

Posted in Delphi, Delphi XE8, Development, Software Development | Leave a Comment »

A Case Study in Not Being A Jerk in Open Source – Kevlin Henney – Google+

Posted by jpluimers on 2018/09/28

Comments on [WayBack] A Case Study in Not Being A Jerk in Open Source – Kevlin Henney – Google+:

  • Ever notice that a lot of the people that can make big things happen can also be jerks sometimes? Torvalds, Gates, Ellison, Jobs, McNealy, Musk.
  • Jeroen Wiert Pluimers

    +Kevin Powick yup. Maybe we need to learn to live with it.

    At the current client I explained the teams that sometimes I do stupid things, both in code and in communications, and I expect them to tell me about them, just like I am telling them they do stupid things. Of course making compliments both ways work in a similar fashion.

    We Dutch are accustomed to make compliments, so I am trying to break them out of the “Doe maar gewoon, dat is al gek genoeg”, as they already create very good stuff, but both they and I are convinced together we can take that to a next level.

    Last week I did my first “Jeroen’s demo hour” showing stuff that happened in their development cycle over the last two weeks.

    Somewhere in the first third was “look here: you see artifacts of some re-use by copy actions; it can be dangerous, just look at this obscure unnoticed bug. I need to watch myself, because sometimes I do this too”, and in the final 10 minutes while demoing some C# code – which is new to them – “look at this variable: it has the wrong name because I copy-pasted it, so if you review my code, just let me know how had this is”.

Maybe time to include some code review examples in a conference session topic…

Some ideas at The 10 commandments of navigating code reviews | TechBeacon

–jeroen

Read the rest of this entry »

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

Conference idea: re-do my git based version control session with a good set of examples and screenshots backing it

Posted by jpluimers on 2018/09/27

An interesting thread that starts as a gitlab / Delphi IDE integration question, resulting into a nice discussion of tooling to use: [Archive.is] Are there any videos (not written stuff, but actual videos) that show how you’d set up and use the built-in versioning in Tokyo IDE with a gitlab repo? … – David Schwartz – Google+

If I find time, I will try to re-work my git conference session to be much more practical.

–jeroen

Posted in Conference Topics, Conferences, Development, DVCS - Distributed Version Control, Event, git, GitHub, GitLab, Software Development, Source Code Management | Leave a Comment »