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

Video: How does IT work? – Bol.com Techlab

Posted by jpluimers on 2019/12/05

Over 1200 people work at bol.com and our IT department consists of more than 350 engineers, clustered into 60 cross-functional teams. These teams are all grouped in fleets and spaces. Staying organized at this scale is definitely a challenge. To make this happen, we optimize for autonomy, mastery, purpose and ownership

Bol.com has posted three videos on how they organise their IT made by [WayBack] Jurriaan Kamer.

  1. How does IT work @ bol.com? Part 1
  2. How does IT work @ bol.com? Part 2
  3. How does IT work @ bol.com? Part 3

It is a quite interesting series to watch and compare it to the organisation(s) you work for.

Source: [WayBack] Video: How does IT work? – Bol.com Techlab

Via: [WayBack] “Staying organized at this scale is definitely a challenge. To make this happen, we optimize for autonomy, mastery, purpose and ownership.” – Marjan Venema – Google+

–jeroen

Read the rest of this entry »

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

Ingo Philipp on Twitter: “Top ten songs for #testers and #developers at #StarWest. I suggest “I see fire” (Ed Sheeran).… “

Posted by jpluimers on 2019/12/04

[WayBack] Ingo Philipp on Twitter: “Top ten songs for #testers and #developers at #StarWest. I suggest “I see fire” (Ed Sheeran).… “

Top 10 songs for testers Top songs for developers
  1. Tragedy
  2. I don’t want to miss a thing
  3. Here we go again
  4. All by myself
  5. That don’t impress me much
  6. One way or another
  7. I heard it through the grapevine
  8. I’m still waiting
  9. Another one bites the dust
  10. I still haven’t found what I’m looking for
  1. I did it my way
  2. Under pressure
  3. It’s now or never
  4. Rebel rebel
  5. Killing me softly
  6. Unbreakable
  7. In a little world of our own
  8. One more night
  9. I should be so lucky
  10. Oops I did it again

Via [WayBack] Top ten songs for #testers and #developers at #StarWest. I suggest “I see fire” (Ed Sheeran). – Kristian Köhntopp – Google+

–jeroen

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

Since RAD Studio 10.2.2 introduced IDE theming, are there any guides…

Posted by jpluimers on 2019/12/04

Reminder to self to check if documentation became available: [WayBack] Since RAD Studio 10.2.2 introduced IDE theming, are there any guides on supporting IDE theming for third-party plugins? (Light/Dark/Custom VCL Styles) – Baoquan Zuo – Google+

–jeroen

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

Hopefully one day there will be `git submodule remove`

Posted by jpluimers on 2019/12/04

I like that you can add git repositories inside eachother using git submodule add but when it’s time to say goodbye to a submodule you need some convoluted statements. So I really wish one day there will be git submodule remove.

Until then, these links will help you to get rid of a git submodule:

TL;DR you have to manually edit the below files:

  • .gitmodules
  • .git/config

Then you need to:

  • (recursively) remove the subdirectory containing the submodule in the repository
  • sometimes (recursively) the subdirectory containing the submodule in .git/modules

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Source Code Management | Leave a Comment »

Thomas Mueller’s Open Source Projects

Posted by jpluimers on 2019/12/03

Since Thomas has been moving projects to OSDN, he now keeps a list of which one is where at [WayBack] My Open Source Projects – twm’s blog

via:

–jeroen

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

Automated clicking on HTML elements – Chee Wee’s blog

Posted by jpluimers on 2019/12/03

Magic from the JavaScript console: [WayBackAutomated clicking on HTML elements – Chee Wee’s blog: IT solutions for Singapore and companies worldwide.

This is the code he uses because [WayBackgetElementsByClassName returns an array ([WayBack] getElementById returns one reference or null, but many sites still develop without assigning an ID to their elements):

function clickRefresh() {
  ImStillHere = document.getElementsByClassName("Button Success");
  if (ImStillHere.length > 0)
    ImStillHere[0].click();
  document.getElementsByClassName("refresh-widget")[0].click();
}
setInterval(clickRefresh, 1000);

via: [WayBack] function clickRefresh(){ … – CHUA Chee Wee – Google+

I like the approach. Now I need to find a way to automate this in some kind of plug-in.

–jeroen

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

bash: converting numbers to human readable SI or IEC units

Posted by jpluimers on 2019/12/03

Many unix tools that report sizes in bytes can convert them to either IEC or SI readable formats.

For github.com/jpluimers/btrfs-du/blob/master/btrfs-du I wrote about last week, I also wanted that kind of behaviour. So I did some research and came up with the code and test cases below.

Note that depending on the bitness of your system, bash integer numeric values are limited in size; see [WayBack] What is the maximum value of a numeric bash shell variable? – Super User.

So I wrote a small bash script for that too, which needed also gave me the opportunity to show how a  perpetual while loop as explained by [WayBack] bash – “while :” vs. “while true” – Stack Overflow.

Two things that always bite me with these short scripts are expressions (done through [WayBack]Arithmetic Expansion) and comparisons (through[WayBack] Other Comparison Operators).

The IEC suffixes contain one extra i to indicate binary and – next to the ISO notation that were already ISO defined – made it into the ISO 80000 standard since 2008. Here is a comparison list from [WayBackBinary prefix – Wikipedia:

Prefixes for multiples of
bits (bit) or bytes (B)
Decimal
Value SI
1000 k kilo
10002 M mega
10003 G giga
10004 T tera
10005 P peta
10006 E exa
10007 Z zetta
10008 Y yotta
Binary
Value IEC JEDEC
1024 Ki kibi K kilo
10242 Mi mebi M mega
10243 Gi gibi G giga
10244 Ti tebi
10245 Pi pebi
10246 Ei exbi
10247 Zi zebi
10248 Yi yobi

Most tools nowadays default to binary IEC suffixes for byte sizes, though disk manufacturers still use SI suffixes because, well then they appear bigger but aren’t. Just for comparison, look at the numbers from [WayBack] File size – Wikipedia and [WayBack] IEC and SI Size Notations – AN!Wiki where I got the test cases from:

Read the rest of this entry »

Posted in *nix, *nix-tools, bash, bash, Development, Power User, Scripting, Software Development | Leave a Comment »

Wirk-, Blind- und Scheinleistung auch für Nicht-Elektroniker

Posted by jpluimers on 2019/11/29

Endlich eine Sinnvolle Definition der 3 Leistungsarten: Wirk-, Blind- und Scheinleistung auch für Nicht-Elektroniker

[WayBackleistungen.gif (746×746)

Source [WayBackMTM-Mess- & Stromversorgungstechnik e.U.: Bibliothek – Elektro Humor

Via [WayBack] Erich K – Google+

–jeroen

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

sql server – I need a slow query on AdventureWorks (SQL 2005) – Stack Overflow

Posted by jpluimers on 2019/11/28

[WayBack] sql server – I need a slow query on AdventureWorks (SQL 2005) – Stack Overflow:

Medium slow:

SELECT * FROM Sales.SalesOrderDetail s
INNER JOIN Production.Product p ON s.ProductID = p.ProductID

Very slow:

SELECT * FROM Production.TransactionHistory th
INNER JOIN Production.TransactionHistoryArchive tha ON th.Quantity = tha.Quantity

It is based on the output of [WayBack] sql server – Query to list number of records in each table in a database – Stack Overflow, which originally ommited tables starting with dt (as those were be used for the “Database Diagram” in the SQL Server 7/2000 era using tables like dtProperties), but which I adopted using:

The query below does not support SQL Server 2000, where you would have to use things like objectproperty, but since by now even the [WayBack] documentation has been retired on the Microsoft site, you need to read [WayBack] Get list of tables but not include system tables (SQL Server 2K)? – Stack Overflow

In the end, it filters out tables like dbo.sysdiagrams that are generated by SQL Server Management Studio (SSMS), which are SSMS System Tables, but technically not SQL Server System Tables.

select
    s.name as SchemaName,
    t.name as TableName,
    i.name as indexName,
    p.rows,
    sum(a.total_pages) as TotalPages, 
    sum(a.used_pages) as UsedPages, 
    sum(a.data_pages) as DataPages,
    (sum(a.total_pages) * 8) / 1024 as TotalSpaceMB, 
    (sum(a.used_pages) * 8) / 1024 as UsedSpaceMB, 
    (sum(a.data_pages) * 8) / 1024 as DataSpaceMB
from 
    sys.tables t
inner join
    sys.schemas s on t.schema_id = s.schema_id
inner join
    sys.indexes i on t.object_id = i.object_id
inner join
    sys.partitions p on i.object_id = p.object_id and i.index_id = p.index_id
inner join
    sys.allocation_units a on p.partition_id = a.container_id
where
    t.is_ms_shipped = 0 -- not internal to SQL Server
    and
    (not exists (
        select ep.major_id
        from sys.extended_properties ep
        where 
            ep.major_id = t.object_id and
            ep.minor_id = 0 and
            ep.class = 1 and
            ep.name = N'microsoft_database_tools_support'
        )
    ) -- not internal to SQL Server Management Studio
    and
    i.index_id <= 1
group by
    s.name, t.name, i.object_id, i.index_id, i.name, p.rows
order by
    s.name, t.name

The counts for the [WayBack] GitHub version of AdventureWorks is this:

Read the rest of this entry »

Posted in Database Development, Development, Software Development, SQL Server | Leave a Comment »

delphi – Spring4D: Why is list of type TObjectList freed automatically after iteration? – Stack Overflow

Posted by jpluimers on 2019/11/28

A nice question and even nicer answer at [WayBack] delphi – Why is list of type TObjectList freed automatically after iteration? – Stack Overflow.

It comes down to the Spring4D collection classes expecting to be accessed using interface references because they descend from TInterfacedObject which also favours interface references over object references.

If you access them solely using object references, they start out with a reference count of 0 (zero). If an operation then first increases that to 1 (one), then decreases it back to 0 (zero), the collection instance gets freed.

A few nice tips and (sometimes opposing) opinions from the question/answer thread and the referencing G+ thread [WayBack] What do you think, +Stefan Glienke? ##Spring4D – Agustin Ortu – Google+ make them well worth reading.

Some:

  • Instead of TObjectList<TFuu>.Create, you should use TCollections.CreateObjectList<TFuu>.
    This way, you only need Spring.Collections in your uses clause
  • interface-only usage should be enforced by hiding the classes in the implementation, exposing only interfaces
  • The functions of TCollections only return interface references and – more importantly – allow for code folding starting with Spring4D 1.2.
  • Hiding the classes in an implementation part is not possible because then this would break any possibility to inherit from these classes and extend them (as I know people do).
  • Never use object references to classes that inherit from TInterfacedObject because the reference counting can kick in and destroy your instance anywhere (or manually call _AddRef/_Release).
  • if you want to have classes, then use System.Generics.Collections

–jeroen

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