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,862 other subscribers

Archive for 2019

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 »

Some Delphi settings require you to run with an Administrative UAC token

Posted by jpluimers on 2019/10/16

Though user-defined Code Templates live under %UserProfile%\Documents\Embarcadero\Studio\code_templates\Delphi, the stock ones (standard ones shipping with Delphi) ones do not: they live under %ProgramFiles(x86)%\x\Studio\y.0\ObjRepos\en\Code_Templates.

Above, x usually is Embarcadero, and y is your Galileo version number; see for instance Update to List-Delphi-Installed-Packages.ps1 shows HKCU/HKLM keys and doesn’t truncated fields any more.

Unlike user registry settings, which are copied from HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER, the stock Code Templates are not.

This means that if you want to change the stock Live Templates (for instance disable them) from the IDE, or from the Windows Explorer, you need to run them with an UAC token to elevate them to Administrator level permissions.

Oh, did you notice the consistency between code_templates and Code_Templates? Delphi is full of these consistency surprises**

via: [WayBack] EDIT…..ANSWER: Right-click and run Delphi IDE as “Run as Admin”.. remove the template. Start IDE normally. .. IMHO, you shouldn’t have to do this… – Vin Colgin – Google+ who commented:

Vin Colgin:
+Uwe Raabe yes. Imho. Delphi should use a UAC helper app to change things that need elevated permissions… just like we all have been doing with shipping software since Windows Vista. But nobody asked me. Imho.

as a response to

Uwe Raabe:
Usually you don’t have access rights to Program Files where the standard code templates live. Therefore you cannot remove any of these from inside the IDE. Either adjust the behavior to your needs (that will make a copy) or remove it from $(BDS) with admin rights.

** Some more consistency examples:

Just pick a few functions from these or more recent Delphi versions:

For example (there are many more):

Read the rest of this entry »

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

SSCCE, MWE and MCVE are basically the same: provide code people can use to reproduce a problem

Posted by jpluimers on 2019/10/16

Many times I see people asking questions about problems in their source code, it goes like this:

  1. Question is asked formulating the problem, but without any source code
  2. A comment asks for source code
  3. Either the response is “the source code is too big”, or the response contains a really big blob of (compressed) code that

If you have such questions (I still often have them), then you need to do just two things (which you often can combine in one step):

  1. Condense down the code into a small bit that others can use to reproduce the problem.
  2. Talk to an (imaginary) person explaining the problem you have and the condensed code.

The second is called Rubber Ducking after a story in the book The Pragmatic Programmer in which a programmer would carry around a rubber duck.

The first is known under at least three terms:

They all come down to the following:

Provide a small piece of working code that is readable anyone can use to reproduce a problem without much effort.

via: Can we create a Help Center topic that outlines what a SSCCE / MWE means for Stack Overflow?

–jeroen

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

Sprints, marathons and root canals and Brady Printed Lean Labels – for lean development

Posted by jpluimers on 2019/10/15

Apart from blank and custom labels, Brady also sells [WayBack] Brady Printed Lean Labels | BradyID.com

They work great for agile projects, despite marketed as “will help you improve reliability, up-time, and efficiency”.

I found them via:

 

which led me to [WayBack] Sprints, marathons and root canals, which is a long but recommended read.

That got me to a book that is now on my reading list: [WayBack] James Shore: Agile-Book, especially this chapter:

[WayBack] James Shore: The Art of Agile Development: Iteration Planning

 

Assorted sets of stickers are (all in packs of 10 each):

[WayBack] Brady Part: 110762 | Assorted Lean Stickers

[WayBackBrady Part: 110763 | Assorted Reliability Stickers

 

Though you can also get them individually in 10 packs:

Read the rest of this entry »

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

IBM 1980 Pascal manuals

Posted by jpluimers on 2019/10/15

Just found back an old note with Pascal manuals for the IBM 370 machines: the Reference Manual and Programmers Guide.

–jeroen

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

Design Patterns aren’t the goal, especially if you can cover the pattern with a language feature

Posted by jpluimers on 2019/10/15

Interesting read: [Archive.is] Are Design Patterns Missing Language Features.

On various places, it has been claimed that use of DesignPatterns, especially complex ones like VisitorPattern, are actually indicators that the language being used isn’t powerful enough. Many DesignPatterns are by convention rather than encapsulable in a library or component, and as such contain repetition and thus violate OnceAndOnlyOnce. If it didn’t contain at least some repetition, or something that could be Refactored out, then it wouldn’t be a pattern.

When applying design pattern, always remember that back then the Gang of Four wrote their book, languages were less powerful than now.

So always check if a design pattern cannot be applied by using a feature of the language you are using.

Examples from that page:

A list of DesignPatterns and a language feature that (largely) replaces them:

 VisitorPattern  .............. GenericFunctions (MultipleDispatch)
 FactoryPattern  .............. MetaClasses, closures
 SingletonPattern ............. MetaClasses
 IteratorPattern............... AnonymousFunctions 
              (used with HigherOrderFunctions, 
               MapFunction, FilterFunction, etc.)
 InterpreterPattern............ Macros (extending the language)
               EvalFunction, MetaCircularInterpreter
               Support for parser generation (for differing syntax)
 CommandPattern ............... Closures, LexicalScope, 
               AnonymousFunctions, FirstClassFunctions
 HandleBodyPattern............. Delegation, Macros, MetaClasses
 RunAndReturnSuccessor......... TailCallOptimization
 Abstract-Factory,
 Flyweight,
 Factory-Method,
 State, Proxy,
 Chain-of-Responsibility....... FirstClass types (Norvig)
 Mediator, Observer............ Method combination (Norvig)
 BuilderPattern................ Multi Methods (Norvig)
 FacadePattern................. Modules (Norvig)
 StrategyPattern............... higher order functions (Gene Michael Stover?), ControlTable
 AssociationList................Dictionaries, maps, HashTables
                    (these go by numerous names in different languages)

Food for thought…

–jeroen

Posted in Design Patterns, Development, Software Development | Leave a Comment »

heise online tech Quizes

Posted by jpluimers on 2019/10/14

heise has (German) tech quizes almost every week: [WayBack] News und Hintergründe zum Thema Quiz bei heise online

–jeroen

Posted in Fun, Power User | Leave a Comment »

Bill Scannell on Twitter: Locked-out of a medical record after 60 seconds, becausesecurity?

Posted by jpluimers on 2019/10/14

When security prohibits getting work done, people will work around it.

Source: [WayBackBill Scannell‏ @scannell Locked-out of a medical record after 60 seconds, becausesecurity? This is an actual workaround spotted today in the wild.

via:

–jeroen

Posted in Power User, Security | Leave a Comment »

Run a batch file when a user connects to a session

Posted by jpluimers on 2019/10/11

Some links:

This is different from Windows: running a batch file during logon of a single or all users, as these do not run when RDP re-connecting to a session that is already logged on.

Related:

–jeroen

Posted in Power User, Windows | Leave a Comment »

List of Android Secret Codes – I’m programmer

Posted by jpluimers on 2019/10/11

[WayBackList of Android Secret Codes – I’m programmer

Lots of *# codes for stuff like IMEI, firmware version, etc.

Via:

–jeroen

Posted in Android Devices, Power User | Leave a Comment »