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 ‘Development’ Category

Spring4D and factory – for my link archive

Posted by jpluimers on 2019/10/23

So I remember as resolving container things can be tricky:

–jeroen

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

Reminder to self: check progress on Delphi helper requests

Posted by jpluimers on 2019/10/23

One of the things the Delphi language really could use some updates in is helpers.

A semi-random example is in [WayBack… It nags me that I can’t create a record helper for a generic type… – Lars Fosdal – Google+.

So I wonder if there has been any progress, and this is a post to remind me checking it out.

Example feature requests (no more QC, so these have to do) by Horácio Filho:

–jeroen

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

When LinkedIn throws HTTP result code 999 at you it means it does not like you

Posted by jpluimers on 2019/10/23

LinkedIn is very private about itself which means you have a hard time linking to their content.

Too bad, as they make themselves an island.

I sorted this out a while ago to see why the Press-This and other bookmarking functionalities in web-browsers would fail for LinkedIn:

[WayBackWordPress/press-this: Linked-In URLs do not parse correctly

@kraftbj I found the below ones on StackOverflow and a general sentiment from https://www.google.com/search?q=linkedin%20999%20response is “Using the invalid HTTP response 999, LinkedIn blocks vary over time depending on both UserAgent and IP address blocks including many hosting and cloud service providers”.

–jeroen

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

Dokumentation Wie aus Hass Liebe wird. Carola Köhntopp – PDF

Posted by jpluimers on 2019/10/22

If I ever bump into a team that needs someone to get started with proper documentation, I need to re-read WayBack Dokumentation Wie aus Hass Liebe wird. Carola Köhntopp – PDF.

The PDF download there might need a captcha, but this one is – apart from file size – identical, but I could not find links to it: [WayBackwww.guug.de/lokal/berlin/downloads/20100204_guug_doku.pdf

–jeroen

Posted in Development, Software Development | Leave a Comment »

DelphiSpringTrees – Trees in Spring4D

Posted by jpluimers on 2019/10/22

From a while back: [WayBack] I just commited a version of (my suggestion for) DelphiSpringTrees; this is the first version that I’m happy with. Features: – Fast – Does not use or … – Johan Bontes – Google+

The repository for “DelphiSpringTrees – Trees in Spring4D” is at https://github.com/jpluimers/DelphiSpringTrees

–jeroen

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

Some links on Agile Games

Posted by jpluimers on 2019/10/22

On my todo list: check out the below links.

via: [WayBackGroup exercise around writing stories and planning them Made fun and “penny dropping” for all involved by Ingrid Sutherland +AgileScrumster Let’s Make a Meal… – Marjan Venema – Google+

–jeroen

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

“Error: Xcode alone is not sufficient on Sierra.”

Posted by jpluimers on 2019/10/21

Once in a while, despite having Xcode, the Xcode command-line tools, homebrew and ruby installed on your Mac OS X / Mac OS / whatever it is called now, you get this on the console:

Error: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
xcode-select --install

Running the commandxcode-select --install makes it even more confusing:

It’s probably Apple trying to tell you “Xcode is out of date”, but they should certainly show that in a more obvious way and redirect to the App Store that does show it:

–jeroen

Posted in Development, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | Leave a Comment »

The Delphi System.Exit “Function”

Posted by jpluimers on 2019/10/17

Still wrongly documented as System.Exit Function [WayBack], most people think it is a statement.

However, it is a compiler intrinsic procedure in the System unit that – when called inside a real function – optionally accepts a parameter with the same type as the encompassing function because it is a compiler intrinsic. It kind of acts as an overloaded procedure, but in fact translate to machine code via an intermediate parse tree.

The parameterless version has been there since at least Turbo Pascal 3.0, but the parameterised version is more recent: I think it was introduced around Delphi 7.

It then stops executing that function after first executing any explicit or implicit finally blocks.

I’ve seen various projects that used their own Exit procedure. This is a very bad habit: Since the System unit is always further away in scope, the introduced one is called which can severely confuse programmers not being aware of this.

The code generation for the parameterless and parameterised  “overloads” of System.Exit is slightly different:

  • The parameterless one can often be optimised away, for instance folding multiple calls to them into one, or rearranging code execution so a jump isn’t needed any more. This means you cannot always put a breakpoint on them.
  • The parameterised one always needs code to load the function result, so you can always put a breakpoint on them.

Stefan Glienke explained the above in [WayBack] The advantage of using Exit() instead of a plain Exit? You can place a breakpoint! – Uwe Raabe – Google+

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 1 Comment »

How to debug small programs

Posted by jpluimers on 2019/10/17

As a follow up of SSCCE, MWE and MCVE are basically the same: provide code people can use to reproduce a problem, I found [WayBackHow to debug small programs which is starts as

One of the most frequent categories of bad questions I see on StackOverflow is: I wrote this program for my assignment and it doesn’t work. [20 lines of code]. And… that’s it.

Then it goes on how to debug those pieces of code, trim them into an SSCCE/MWE/MCVW to form the base of a question which you can ask on StackOverflow/SuperUser/ServerFault/StackExchange, forum, group/community or even your co-worker.

The really cool thing about the techniques used there are that they also apply to bigger pieces of code, heck even large code bases.

They force you to trim down your problem in to manageable pieces that are easy to explain and write concise documentation and tests around them to assist you in the process.

Below are the steps in a short list. Be sure to read the original article How to debug small programs | Fabulous adventures in coding after going through the list.

  1. Turn on compiler warnings, inspect all of them, resolve or explain them
  2. Rubber duck to an imaginary person or even a live one explaining each part in simple terms
  3. If the bug is still there, break up the code into pieces
  4. Write technical specifications for all the pieces
  5. Verify the pieces against the specifications, for instance by adding pre- and postconditions to them
  6. Add assertions in the pieces for all the specifications
  7. Write test cases for the pieces
  8. Write down on paper the expected behaviour for all the lines of code
  9. Use a debugger to step through all the lines of code and verify the expected behaviour you wrote down
  10. While debugging, listen to all your doubts (gut feeling is a good thing!)

This sounds like a lot of work. It is. All good programming is.

If you apply these before writing any logic code, then your life becomes easier because you will spot bugs sooner:

  • specification
  • test cases
  • preconditions
  • postconditions
  • assertions

Does this again sound like a lot of work?

Then remember: taking a shortcut will make the actual work longer. The reason is that hunting for bugs is a tedious and time consuming process scaling very badly with complexity.

–jeroen

Posted in Conference Topics, Conferences, Debugging, Development, Event, Software Development | Leave a Comment »

delphi – How to set form height larger than 1096 pixels? (or width > 1620 pixels)- Stack Overflow

Posted by jpluimers on 2019/10/16

Delphi will limit [WayBackHeight or [WayBack] Width of a form in the designer based on the current Windows limitations, not on what your target users might.

See [WayBack] delphi – How to set form height larger than 1096 pixels? – Stack Overflow:

The reason for this behavior is that when you do not set constraints for the form size, Delphi will automatically get constraints at system level via the [WayBackWM_GETMINMAXINFO message, which is fired when…

Solution is to configure the [WayBack] Constraints property by setting either [WayBackConstraints.MaxHeight or [WayBackConstraints.MaxWidth.

Via: [WayBack] Since I put up 10.2, I cannot get a form width >1620. Whenever I enter a greater value, the system changes it back! As I have some programmes with comp… – erik wilson – Google+

–jeroen

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