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 4,262 other subscribers

Archive for June 23rd, 2020

Ten Commandments For Naming Your Code

Posted by jpluimers on 2020/06/23

Be clear, be consistent, don’t be clever, and follow these rules for naming your code.

[WayBack] Ten Commandments For Naming Your Code investigates these:

  1. Thou shalt be specific.
  2. Thou shalt not use unnecessary words.
  3. Thou shalt not use abbreviations.
  4. Thou shalt use the code’s primary human language.
  5. Thou shalt not make up words.
  6. Thou shalt not include type.
  7. Thou shalt only use non-obvious words if the meaning is obvious.
  8. Thou shalt prefer active voice.
  9. Thou shalt use consistent syntax.
  10. Thou shalt break these rules if necessary.

–jeroen

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

.NET Rocks: How do you do concurrency?

Posted by jpluimers on 2020/06/23

Since it was quite a while ago I wrote heavily concurrent code in .NET, I wanted to know about the starte of the art.

This pod cast and the book discussed in it helped a lot: [WayBackHow do you do concurrency? Carl and Richard talk to Riccardo Terrell about his book on Concurrency in .NET. https://www.manning.com/books/concurrency-i… – .NET Rocks! – Google+

Links referenced:

–jeroen

Posted in .NET, Development, Multi-Threading / Concurrency, Software Development | Leave a Comment »

Git submodule inside of a submodule (nested submodules) – Stack Overflow

Posted by jpluimers on 2020/06/23

Not sure why yet, but with a nested pacapt git submodule inside another git submodule bash.aliases, when pulling bash.aliases it did pull the actual content of pacapt, only the reference.

I wanted this because this allowed me to abstract installation of common packages no matter if the system was using the apt-get, zypper, homebrew or other package managers. [WayBack] GitHub – icy/pacapt: An Arch’s pacman-like package manager for some Unices supports many in a coherent way (I’m way past the not-invented-here syndrome:[WayBack] linux – A universal bash script for installing with apt-get and yum – Stack Overflow).

A git pull --recurse-submodules failed.

Even executing git submodule update --init --recursive at the top-level did not get it.

Forcing a submodule to update after a shallow clone

I had to to inside the bash.aliases submodule and perform git submodule update --init <submoduleName>:

$ git submodule update --init pacapt
Submodule 'pacapt' (https://github.com/icy/pacapt.git) registered for path 'pacapt'
Cloning into '/home/jeroen_pluimers_com/bash.aliases/pacapt'...
Submodule path 'pacapt': checked out '31f43d901055e3c361dfbcefdf50231442da13de'

I got this workaround at [WayBack] Git submodule inside of a submodule (nested submodules) – Stack Overflow.

It might mean I need to read more deeply into these asgit submodule update --init --recursive might by now need to be git submodule update --init --recurse-submodules, but the docs are not clear on that:

Forcing a recursive clone including submodules

This worked out of the box on a Git > 2.13:

D:\Versioned\github.com\project-jedi>call git clone --recurse-submodules -j8 https://github.com/project-jedi/jcl.git
Cloning into 'jcl'...
remote: Enumerating objects: 79, done.
remote: Counting objects: 100% (79/79), done.
remote: Compressing objects: 100% (46/46), done.
Receiving objects: 100% (82053/82053), 78.7delta 33), pack-reused 81974 eceiving objects: 100% (82053/82053), 72.05 MiB | 7.14 MiB/s
9 MiB | 3.77 MiB/s, done.
Resolving deltas: 100% (65056/65056), done.
Checking out files: 100% (3461/3461), done.
Submodule 'jcl/source/include/jedi' (https://github.com/project-jedi/jedi.git) registered for path 'jcl/source/include/jedi'
Cloning into 'D:/Versioned/github.com/project-jedi/jcl/jcl/source/include/jedi'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 379 (delta 0), reused 3 (delta 0), pack-reused 375
Receiving objects: 100% (379/379), 123.87 KiB | 568.00 KiB/s, done.
Resolving deltas: 100% (120/120), done.
Submodule path 'jcl/source/include/jedi': checked out 'd04f4d341051c1245c06c822468ea927073e26eb'

–jeroen

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