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

Why We Write Tickets – Hacker Noon

Posted by jpluimers on 2019/06/04

Should be on the wall for every development team around:

Why We Write Tickets

Shared with my team the other day in Slack …

Why we write tickets

  • So if we get sick, a teammate can help us out
  • To help us decompose our work into small pieces
  • As a placeholder for a real-life conversation
  • To keep track of how we resolved the issue
  • To make our standups effective
  • To point out dependencies
  • To reflect on the mix/makeup of our work during retros
  • Self-discipline.
  • Don’t take on too much.
  • Try to do one thing at a time

Why we DON’T write tickets

  • To track our time
  • To compete with other team members
  • To show managers we’re busy
  • To make managing people possible
  • To report status, or % complete
  • Because Jira is fun to use
  • External discipline

John CutlerFollow – Multiple hat-wearer. Product development nut. I love wrangling complex problems and answering the why with qual/quant data. May 4

Source: [WayBackWhy We Write Tickets – Hacker Noon

Via: [WayBack] Why We Write Tickets – Hacker Noon – Marjan Venema – Google+

–jeroen

Read the rest of this entry »

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

rvelthuis/BigNumbers: BigInteger, BigDecimal and BigRational for Delphi

Posted by jpluimers on 2019/06/04

Cool library: rvelthuis/BigNumbers: BigInteger, BigDecimal and BigRational for Delphi.

It has many Unit Tests written with DUnit.

Via: [WayBack] This is truly very cool project, if need to do math with pretty large numbers, check this out… – Tommi Prami – Google+

–jeroen

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

batch file – SHIFT doesn’t affect %* – Stack Overflow

Posted by jpluimers on 2019/05/30

Quoting the answer in full because it so tremendously useful [WayBack] batch file – SHIFT doesn’t affect %* – Stack Overflow.

Especially the quoting/dequoting bits and the clever trick reconstructing %* into a batch file variable (minus double spaces).

Thanks so much James-K!

As you know, shift has no effect on %*, but you can construct a %* equivalent.

We’ll call the following line.bat :

@echo off
set line=%1
:loop
shift
if not "%1"=="" (
  set line=%line% %1
  goto :loop
)

echo   %%* = %*
echo line = %line%

If you type in the following command (Notice the double space between 3 and 4) :

line 1 2 3  4 bla dee dah

You will get the following output :

  %* = 1 2 3  4 bla dee dah
line = 1 2 3 4 bla dee dah

Note that %* retains multiple spaces, while using the %n notation does not.


Using something like this, you can allow your users to put their parameters in any order.

:loop
  :: Single variable parameters
  if "%1"=="something" set something=true
  :: Multi variable parameters 
  if "%~1"=="/source" shift & set source=%1
  shift
if not "%~1"=="" goto :loop

Notice that in the Multi-variable parameter statement I include one shift statement and one setstatement separated by an ampersand (&). The & tells the command processor that a separate command to be executed follows.


EDIT:

FYI: I recommend double quotes when checking the contents of variables. Usually you can use anycharacter, and you don’t even need to use two because they are just there to insure that an empty variable does not cause an error. For instance, when %1 is empty and you do if not hello==%1 call :sub the command processor will see this if not hello== call :sub and compare hello to call then try to execute :sub, and throw an error. In that specific case if not xhello==x%1 call :sub is just as good as if not "hello"=="%1" call :sub, because an empty %1 will cause the command processor to see if not xhello==x call :sub.

BUT using characters other than double-quotes will cause problems if the variable contains any special characters.

Using brackets as variable delimiters like (%1) can cause problems. For instance, the (special) piping characters don’t play nice inside brackets, and the escape character just seems to disappear, neither acting as a normal character, nor as the escape-character.

Also brackets are special characters in and of themselves designed to group and/or separate different lines of code and may not always act as anticipated.

Lastly, double quotes themselves are special characters specifically designed to surround other special characters, allowing them to act as normal characters. This is why you may see variables unquoted, then quoted again, like so.

set var="%~1"  & REM This sort of thing is used to insure that a variable is quoted.
                 REM %~1 unquotes %1 if it is already quoted, and leaves it alone if
                 REM %1 is not quoted.

set "var=%~1"  & REM This code assumes that `%1` contains special characters and
                 REM like before unquotes a quoted %1, but leaves the variable itself
                 REM unquoted. The double-quotes surrounding the variable and data
                 REM protects the command processor from any special characters that
                 REM exist in the data. Remember that anytime you reference `%var%`,
                 REM you will need to also surround the variable and data with
                 REM double-quotes.

A quick check for quotes is if exist %1 if %1==%~1 echo Unquoted.

–jeroen

Posted in Batch-Files, Development, Scripting, Software Development | Leave a Comment »

delphi – Sorting TDictionary by a key of Integer in ascending order – Stack Overflow

Posted by jpluimers on 2019/05/30

Great answer on [WayBackdelphi – Sorting TDictionary by a key of Integer in ascending order – Stack Overflow by J… comes down to this:

var
  LDictionary : TDictionary<Integer, string>;
  LArray : TArray<Integer>;
...
  LArray := LDictionary.Keys.ToArray();
  TArray.Sort<Integer>(LArray);

I was trying the wrong direction (functional approach like LArray := LDictionary.Keys.ToArray.Sort(); ), but the above procedural solution works.

Members used:

–jeroen

Posted in Delphi, Development, Software Development | 1 Comment »

GExperts Help: Copy component names

Posted by jpluimers on 2019/05/29

I totally forgot this expert existed [WayBackGExperts Help: Copy component names

–jeroen

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

Conference Call Bingo – E Gilliam

Posted by jpluimers on 2019/05/29

Cool: [WayBack] Conference Call Bingo

Via: [WayBack] Conference Call Bingo Origin: https://www.facebook.com/photo.php?fbid=10213521201006095 – Lars Fosdal – Google+

–jeroen

Posted in Development, Software Development | Leave a Comment »

TInterlocked.Exchange for interfaces?

Posted by jpluimers on 2019/05/29

Via [WayBack] TInterlocked.Exchange for interfaces? Since there is no System.SyncObjs.TInterlocked.Exchange overload for interfaces (and the Exchange versio… – Stefan Glienke – Google+

It has made it to this piece in [Archive.issglienke / Spring4D / source / Source / Reactive / Spring.Reactive.pas — Bitbucket:

class function TInterlockedHelper.Exchange<T>(var Target: T;
  const Value: T): T;
begin
  Result := Default(T);
  PPointer(@Result)^ := Exchange(PPointer(@Target)^, PPointer(@Value)^);
  if Assigned(Value) then
    Value._AddRef;
end;

It is similar to the TInterlocked.Exchange methods.

–jeroen

 

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

IDE Fix Pack 5.92 keyboard binding for finding references

Posted by jpluimers on 2019/05/28

Since I keep forgetting this piece of IDE Fix Pack 5.92 released – DelphiFeeds.com

The new version 5.92 now binds

  • Ctrl+Alt+Enter to “Find References” and introduces
  • Shift+Ctrl+Alt+Enter for “Find Local References”.

No shortcut toggling anymore.

–jeroen

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

Clean Code is a team sport! – writeabout.net

Posted by jpluimers on 2019/05/28

Recommended read: [WayBackClean Code is a team sport! – writeabout.net.

The picture is of a developer journey taking years to go from fresh to seasoned ending up at exactly the same code: over time learning the sweet spot of coding.

The story continues correlating that journey to handling technical debt and finding the sweet spot between that and business value.

via:

–jeroen

Twitter

 

 

Posted in Agile, Code Quality, Code Review, Development, Software Development | Leave a Comment »

Starting points for JSON unmarshaller, that applies a JSON string to an existing object…

Posted by jpluimers on 2019/05/28

Interesting subject: [WayBack] I am looking for a JSON unmarshaller, that takes the JSON string and apply it to the object (and not take an object and try to apply the JSON to it). E… – Nicholas Ring – Google+

A start by Stefan Glienke: [WayBackJsonDataObjectUnmarshall — Bitbucket

–jeroen

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