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

Archive for August, 2019

The 14 JavaScript debugging tips you probably didn’t know | Raygun

Posted by jpluimers on 2019/08/08

For my link archive: [WayBackThe 14 JavaScript debugging tips you probably didn’t know | Raygun

–jeroen

Posted in Development, JavaScript/ECMAScript, Scripting, Software Development | Leave a Comment »

Inactive GUI applications: click once or twice to perform an action within the application

Posted by jpluimers on 2019/08/07

When an application is inactive, you have to click it at least once to activate it, but sometimes click twice to actually perform an action.

In the past, there were more applications requiring it, even User Interface or Human Interface guidelines explaining the difference.

Nowadays, most of these guidelines have become hard to find, but luckily some of them have been archived in the WayBack machine.

They all come down to this:

An action in an application can be disruptive, especially when there is no confirmation step for it.

Clicking an application over the area that invokes such a disruptive action, without the user realising it can have adverse consequences.

Some links for further reading:

 

Enabling Click-Through

An item that provides click-through is one that a user can activate with one click, even though the item is in an inactive window. (To activate an item that does not support click-through, the user must first make the containing window active and then click the item.) Although click-through can make some user tasks easier, it can also confuse users if they click items unintentionally.

Click-through is not a property of a class of controls; any control, including toolbar items, can support click-through. This also means that you can support click-through for any subset of items; you don’t have to choose between supporting click-through for all items in a window or none. Follow the guidelines in this section so that you can support click-through when it’s appropriate.

Avoid providing click-through for an item or action whose result might be dangerous or undesirable. Specifically, avoid enabling click-through for an item that:

  • Performs a potentially harmful action that users can’t cancel (for example, the Delete button in Mail)
  • Performs an action that is difficult or impossible to cancel (such as the Send button in Mail)
  • Dismisses a dialog without telling the user what action was taken (for example, the Save button in a Save dialog that overwrites an existing file and automatically dismisses the dialog)
  • Removes the user from the current context (for example, selecting a new item in a Finder column that changes the target of the Finder window)

Clicking in any one of these situations should cause the window that contains the item to be brought forward, but no other action to be taken.

In general, it’s safe to provide click-through for an item that asks the user for confirmation before executing, even if the command ultimately results in destruction of data. For example, you can provide click-through for a delete button if you also make sure to give users the opportunity to cancel or confirm the action before it proceeds.

Think twice before supporting click-through for items that don’t provide confirmation feedback. Specifically, consider how dangerous the action might be, and determine how difficult it will be for the user to undo the action after it’s performed. For example, the Mail Delete button does not provide click-through because it deletes a message without asking for confirmation, which is a potentially harmful action that can be difficult to undo. On the other hand, click-through for the New button in Mail is fine because its resulting action is not harmful and is easy to undo.

Ensure that items that don’t support click-through appear disabled when their window is inactive. The disabled appearance helps users understand that these controls are unavailable. For example, the Delete and Mark as Junk buttons in the inactive Mail window shown below don’t support click-through.

An inactive window with controls that support click-through

–jeroen

Posted in Apple, Classic Macintosh, Development, Mac, Mac OS X / OS X / MacOS, Power User, Software Development, Usability, User Experience (ux), Windows | Leave a Comment »

This is why I try to avoid C, as it means handling code from others that shoot in foots

Posted by jpluimers on 2019/08/07

Via [WayBack] Hello, I’m translating some C code to Delphi and found something that surprise me…is it logical that this code compiles ? – Paul TOTH – Google+

Maintaining C means you need to be aware that other people like shooting at foots (yes, that is a grammar error by intent):

#include 
#include 

void test();

void test2() {
  test();
}

void test(char *msg) {
  printf("test called '%s' (%d)\n", msg, strlen(msg));
}

void main() {
  test2();
}

Of course!? with gcc under Ubuntu the result is

test called 'test' (4)

Code is derived from [Archive.isgit hub user fogleman project Craft search db_worker_start

The thread has some nice comments.

–jeroen

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

More on new .NET path handling – Jeremy Kuhne’s Blog

Posted by jpluimers on 2019/08/07

When it was at the age natural people are allowed to drive in the USA, the .NET framework behaved far less brain dead handling various (especially long or strange) paths: [WayBackMore on new .NET path handling – Jeremy Kuhne’s Blog.

Path handling has frustrated me in many development environments, so I wonder if ones that are beyond the (USA) legal age of drinking follow.

–jeroen

via: [WayBack] Some time ago, the .net developers finally saw sense and removed path normalization and long path limit code in System.IO… Does anybody know if Embarcadero have come to their senses… – David Heffernan – Google+

Posted in .NET, Delphi, Development, Java, Java Platform, Software Development | Leave a Comment »

GitHub – Purik/AIO: Coroutine-based multithreading library for Delphi

Posted by jpluimers on 2019/08/06

On my list of things to try: [WayBack] GitHub – Purik/AIO: Coroutine-based multithreading library for Delphi which are similar to what golang does.

Coroutine-based multithreading library for Delphi. Contribute to Purik/AIO development by creating an account on GitHub.

Via [WayBack] What you think about coroutine-based multithreading concurrency in Delphi like GoLang https://github.com/Purik/AIO Probably evolution paths, actuality… – Павел Миненков – Google+

–jeroen

Posted in Delphi, Development, Go (golang), Software Development | Leave a Comment »

28800 Embarcadero DBX ADO.NET 2.0 driver for InterBase (version 17.0)

Posted by jpluimers on 2019/08/06

For my link archive in case of link rot: [WayBack/Archive.is28800 Embarcadero DBX ADO.NET 2.0 driver for InterBase (version 17.0)

Note these are the same as the ones shipping with the Interbase XE7 developer edition.

The less old alternative from Embarcadero alternative is the ODBC driver: [WayBack/Archive.is28975 Embarcadero InterBase ODBC Driver for Windows, 32-bit and 64-bit

Maybe it is a good idea to look into [WayBack] All IBProvider news Firebird and InterBase driver for OLE DB and ADO.NET

–jeroen 

Posted in .NET, Database Development, Development, InterBase, Software Development | Leave a Comment »

Delphi XE2: IDE out of memory problem? Check the library path length

Posted by jpluimers on 2019/08/06

Curious, but somehow shortening the library path solved the problem Alberto had: [WayBack] Hello Everybody, I have an application developed in XE2 (Hot Fix 2 + IDE Fix Pack installed) that has started giving me the “out of memory” error message… – Alberto Paganini – Google+:

Alberto Paganini

It turned out the length of the library path was the culprit of the IDE out of memory error messages.
I have reduced the length of the library path and the error messages have reduced dramatically.
There are still a few out of memory messages tho.

–jeroen

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

Please web-site owners (including memori.nl, sandsmedia.com, and many others): allow plus signs in email addresses when registering/contacting

Posted by jpluimers on 2019/08/05

I am quite amazed that many web-sites fail to allow email addresses of the form x+y@z.domain.

This is called subaddressing and has been in the email addressing specs since ages.

Do not validate, but send

Basically the only way to verify the validity of an email address is to send an email to it, and wait for it to be accepted or rejected.

Even the best regex will “have almost no false negatives”, which means they will reject valid email addresses.

Further reading

Please read and implement these specs before rejecting email addresses you think might be invalid:

  • [WayBack] RFC 5233 – Sieve Email Filtering: Subaddress Extension
  • [WayBack] RFC 3696 – Application Techniques for Checking and Transformation of Names
  • [WayBack] Mail::RFC822::Address

    The RFC allows comments to be arbitrarily nested. A single regular expression cannot cope with this.

  • [WayBack] Gmail address with “+” within the recipient name – Web Applications Stack Exchange

    any ASCII graphic (printing) character other than the at-sign (“@”), backslash, double quote, comma, or square brackets may appear without quoting.

  • [WayBack] [3527] Email addresses with plus sign (+)

    Sub-addressing

    Some mail services allow a user to append a +tag qualifier to their e-mail address (e.g., joeuser+tag@example.com). The text of tag can be used to apply filtering. The text of the tag can also be used to help a user figure out which organization “leaked” the user’s email address to a spammer. However, some mail servers violate RFC 5322, and the recommendations in RFC 3696, by refusing to send mail addressed to a user on another system merely because the local-part of the address contains the plus sign (+). Users of these systems cannot use plus addressing. On the other hand, most installations of the qmail and Courier Mail Server products support the use of a dash ‘-‘ as a separator within the local-part, such as joeuser-tag@example.com or joeuser-tag-sub-anything-else@example.com. This allows qmail through .qmail-default or .qmail-tag-sub-anything-else files to sort, filter, forward, or run an application based on the tagging system established. Disposable e-mail addresses of this form, using various separators between the base name and the tag are supported by several email services, including Runbox (plus and minus), Google Mail (plus), Yahoo! Mail Plus (minus), and FastMail (plus). The name sub-addressing is the generic term (used for plus-addressing and minus-addressing) found in some IETF standards-track documents, such as RFC 5233.

  • [WayBack] How to Find or Validate an Email Address

    Regexes Don’t Send Email

    Don’t go overboard in trying to eliminate invalid email addresses with your regular expression. The reason is that you don’t really know whether an address is valid until you try to send an email to it. And even that might not be enough. Even if the email arrives in a mailbox, that doesn’t mean somebody still reads that mailbox. If you really need to be sure an email address is valid, you’ll need to send an email to it that contains a code or link for the recipient to perform a second authentication step. And if you’re doing that, then there is little point in using a regex that may reject valid email addresses.

A nice overview of people trying to answer with a regular expression, and comments indicating all those attempts fail in one way or the other is at [WayBack] regex – How to validate an email address in JavaScript? – Stack Overflow

–jeroen

Posted in Conference Topics, Conferences, Event, Internet, Power User | Leave a Comment »

Fabric, Cuisine and Watchdog for server administration in Python

Posted by jpluimers on 2019/08/05

For my reading list: [WayBackFabric, Cuisine and Watchdog for server administration in Python.

It’s about these environments and tools:

–jeroen

Read the rest of this entry »

Posted in Cloud, Development, DevOps, Infrastructure, Power User | Leave a Comment »

IKEA TRÅDFRI lamps [1] when equipped with Firmware >= 1.2.217 integrate with Philips Hue and vice versa…

Posted by jpluimers on 2019/08/05

Reminder to self [WayBack] Just a small FTR. Yes, the IKEA TRÅDFRI lamps [1] when equipped with Firmware >= 1.2.217 intergrate seamlessly into the Philips Hue system, thanks to t… – Jan Wildeboer – Google+:

  • IKEA lamps integrate with Philips Hue
  • Philips Hue lamps integrate with the
  • IKEA lamps pair to the remote that you paired with the gateway before: no need to bring the lamp close to the gateway first
  • Philips tries the same
  • Remotes have a 10-decide limit

Links:

--jeroen

Posted in IKEA hacks, IoT Internet of Things, LifeHacker, Network-and-equipment, Power User | Leave a Comment »