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

Archive for 2018

(35) Enabling New Hardware in U-Boot – Jon Mason, Broadcom Ltd. – YouTube

Posted by jpluimers on 2018/07/20

Lots of interesting information, especially these discussions where Alexander Graf chipped in:

The hand off of the boot loader to the actual OS payload. The payload and U-boot are in memory running at the same time. The payload can call back into U-boot through the uEFI API that U-boot implements so that the payload provides extra drivers enabling for instance a subsequent graphical stage (splash screen, menus, etc), more hardware access and so on. You even could pass ACPI tables through U-boot to the payload and help shooting yourself in the foot.

Important aspects for upstreaming:

  • keep commits short so they are easy to review
  • make sure patches are always rebaseable for each and every commit set (so it compiles throughout)
  • this tremendously helps doing a git bisect
  • it makes adding features that other parts depend on hard: you need to think on chicken & egg situations in advance

–jeroen

 

Posted in *nix, Development, Hardware Development, Linux, Power User, Software Development, U-Boot | Leave a Comment »

Hacking the Logitech C920 & C930e Webcams – Graves On SOHO Technology

Posted by jpluimers on 2018/07/20

This could turn out in a way better quality and cheaper CCTV system than Ring offers: [WayBackHacking the Logitech C920 & C930e Webcams – Graves On SOHO Technology.

via: [WayBack] Until recently I did not know that this was possible, but people are hacking the venerable Logitech C920 and C930e webcams. – Lars Fosdal – Google+

–jeroen

Some nice pictures of stereo camera configuration by Joe C Hecht at https://plus.google.com/+JeroenPluimers/posts/9T8u82E8rH2

Read the rest of this entry »

Posted in Development, Hardware Development, LifeHacker, Power User | Leave a Comment »

/dev/lawyer Open Source License Business Perception Report

Posted by jpluimers on 2018/07/20

Looking at [WayBack/dev/lawyer Open Source License Business Perception Report it seems that the [Archive.isApache License 2.0 causes the least pain and confusion for lawyers.

Via: [WayBack] Open Source License Business Perception Report: the pain and confusion of common open licenses, roughly quantified – This is why I Code – Google+

–jeroen

Posted in Development, Open Source, Software Development | Leave a Comment »

Some links for scaling and responsive resizing iframes

Posted by jpluimers on 2018/07/19

As I need both responsive resizing and zooming iframes one day:

–jeroen

Posted in CSS, Development, HTML, JavaScript/ECMAScript, JSFiddle, Scripting, Software Development, Web Development | Leave a Comment »

Delphi Community Edition available: good move for Embarcadero, but be careful how much revenue you make

Posted by jpluimers on 2018/07/19

On [WayBack] Delphi Community Edition available: – Uwe Raabe – Google+, the links to the [WayBackEULA, [WayBack] FAQ and [WayBack] Feature Matrix were shared.

In summary (read the G+ thread for more), the Delphi Community Edition is a web-installer of version 10.2.3 feature equivalent to the Delphi Professional Edition.

I think it is a good move to make Delphi more accessible to many more people.

A few restrictions apply, for instance there is also a C++ Builder Community Edition equivalent to the C++ Builder Professional edition, but you cannot install them on the same system at the time time.

Also, you cannot move around the command-line compiler to a different system (for instance a build-machine for Continuous Integration purposes).

The financial restriction that applies can be summarised as this: When the revenue you make during the year exceeds USD 5000 you have to stop using the Community Edition license.

Note that this is about revenue, not about income (which many define as “net of revenues and expenses”), and does not mention the revenue source, so watch this during the years you use the Community Edition.

Furthermore, Embarcadero indicates they collect information about your use of the Community Edition, but the [WayBack] privacy statement is not clear how.

All in all I hope this move attracts fresh people into the Delphi community.

The heise – the German flagship IT journal – likes it too: [WayBack] Delphi und C ++ Builder als Community Edition | heise Developer (via [WayBack] Some nice PR … Embarcadero-konfektioniert-Delphi-und-C-Builder-als-Community-Edition-4115563… – Roland Kossow – Google+)

Edit 20180927

Yes, Embarcadero is going after your employer if you register Delphi Community with a corporate email address.

See [WayBack] Embarcadero wants me to pay for a download. : legaladvice – Joseph Mitzen – Google+ and [WayBack] Embarcadero wants me to pay for a download. : legaladvice

–jeroen

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

Generating a million sequential numbers on the fly in a Firebird query – some solutions and speed measurements

Posted by jpluimers on 2018/07/19

The testing was done with Firebird 2.5.x x86 on Windows 7 x64.

Where other relational database platforms have plenty of opportunities to generate sequences (see for instance the below links on Oracle and SQL Server), with Firebird you can use a WITH RECURSIVE query construct that normally is being used to manage tree structures ([WayBackPkLab – Firebird: Tree data mangement with recursive CTE).

However, that uses query stack which has a depth limit of 1024 levels. When you reach the limit, Firebird gives you an error like this:

with 
  recursive 
  sequence(n) as (        
    -- When you select more than 1024 values, this error occurs:
    -- Error while fetching data:  Too many concurrent executions of the same request    
    select 0 -- start
    from rdb$database
    union all
    select sequence.n + 1
    from sequence
    where sequence.n < 1023 -- finish
  )
select sequence.n 
from sequence
--where sequence.n in (24, 38) 
order by sequence.n

It however is a pretty quick and CU bound solution: on my system ([WayBackAMD A8-7600 @ 3.1 Ghz), it runs 1000 records within ~0.1 seconds.

In such a short time, it’s hard to see how the speed is bound, so I wanted to go for some orders of magnitude more. In ~0.1 seconds, the processor executes about 0.3 * 10^9 cycles generating 1000 numbers which is ~ 300-thousand cycles per number. That sounds like a lot of cycles for so few numbers. Would this become a better ratio for more numbers?

Read the rest of this entry »

Posted in Database Development, Development, Firebird, IKEA hacks, OracleDB, SQL, SQL Server | Leave a Comment »

Agile &: Core Agile Practices

Posted by jpluimers on 2018/07/19

There is a lot of noise in the agility world. Choosing what practices your team does and why can be a tedious job. Each team is different and evolves over time, so you need to find the ones best fitting to your team and repeat that.

The [WayBackAgile &: Core Agile Practices post has done a pre-selection of practices that could work well for your team. Try them, test them out and find which work well as best practice for your team.

Via: [WayBack] Core Agile Practices – Marjan Venema – Google+

–jeroen

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

Pretty printing HTML is the same as formatting code: How do you format code in Visual Studio Code (VSCode) – Stack Overflow

Posted by jpluimers on 2018/07/18

I was looking for a HTML pretty printer (…) but in Visual Studio code, that is called code formatting, which supports many languages out of the box (including HTML) without requiring extensions like Atom.io (see below).

The shortcuts are at [WayBack] How do you format code in Visual Studio Code (VSCode) – Stack Overflow.

For Mac OS X/OS X/MacOS they are (the second one only appears when you have a code selection):

  • document: ShiftOptionF
  • selection: CommandK CommandF

Read the rest of this entry »

Posted in Development, Software Development, Visual Studio and tools, vscode Visual Studio Code | Leave a Comment »

ColorButton unit with TColorButton saved for posterity as http://delphi.about.com got hi-jacked.

Posted by jpluimers on 2018/07/18

Hopefully my blog will last longer than the original delphi.about.org articles.

Last year, I noticed yet another path into bit rot: [WayBack] The title reads “Source Code for the TColorButton Delphi Component”… I must be going blind because I can’t find it – Thomas Mueller (dummzeuch) – Google+

In this case, http://delphi.about.com/library/weekly/aa061104a.htm got redirected via http://delphi.about.com/od/vclusing/fl/Source-Code-for-the-TColorButton-Delphi-Component.htm to [WayBackhttps://www.thoughtco.com/source-code-for-tcolorbutton-4077901 which is a copy of the original article failing to preserve the download links of the original source code.

It doesn’t help that the original source download at http://delphi.about.com/library/code/ncaa061104a.htm also redirects to https://www.thoughtco.com/delphi-programming-4133475 a generic catch all of [WayBackDelphi Programming where http://delphi.about.com also redirects to.

In other words:

http://delphi.about.com got hi-jacked.

So here are some links to various forms of that source code:

–jeroen

Posted in Color (software development), Delphi, Development, Software Development | 2 Comments »

Firebird: the way you compare dates highly influences fetch times

Posted by jpluimers on 2018/07/18

I was amazed the influence on how you compare dates would be a factor 1000 change in fetch times even though I wrote about date, time and timestamp conversions before in Source: Firebird – adjusting Delphi stored TDateTime (or OLE Automation date) fields that contain Dates, Times or DateTimes.

All queries were ran at 20170410.

Slow

select id, date '1899-12-30' + data.datadate as datestamp
from   data
where  1=1
-- slow: prepared 0.066 sec; fetched 10.549 sec 250 rows
    and date '1899-12-30' + data.datadate >= '2017-04-08' -- last 2 days
    and date '1899-12-30' + data.datadate <= '2017-04-10' -- today

Fast

select id, date '1899-12-30' + data.datadate as datestamp
from   data
where  1=1
-- fast: prepared 0.063 sec; fetched 0.009 sec 250 rows
    and data.DATADATE >= date 'Now' - date '1899-12-30' - 2 -- last 2 days 
    and data.DATADATE <= date 'Now' - date '1899-12-30' -- today 

Fast

select id, date '1899-12-30' + data.datadate as datestamp
from   data
where  1=1
-- fast: prepared 0.070 sec; fetched 0.011 sec 250 rows
    and data.DATADATE >= date '2017-04-10' - date '1899-12-30' - 2 -- last 2 days 
    and data.DATADATE <= date '2017-04-10' - date '1899-12-30' -- today

Fast

select id, date '1899-12-30' + data.datadate as datestamp
from   data
where  1=1
-- fast: prepared 0.073 sec; fetched 0.009 sec 250 rows
    and data.DATADATE >= date '2016-04-08' - date '1899-12-30' -- specific date range start 
    and data.DATADATE <= date '2016-04-10' - date '1899-12-30' -- specific date range end

The table looks like this:

CREATE TABLE "DATA" 
(
  ID                        INTEGER         NOT NULL,
  DATADATE         DOUBLE PRECISION,
  DATATIME         DOUBLE PRECISION
);
CREATE ASC INDEX DATA_DATADATE ON "DATA" (DATADATE);

–jeroen

Posted in Database Development, Development, Firebird | Leave a Comment »