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 2,099 other followers

Archive for September 2nd, 2020

undo – Can I delete a git commit but keep the changes – Stack Overflow

Posted by jpluimers on 2020/09/02

I wanted to undo a commit, but forgot how to do that.

[WayBack] undo – Can I delete a git commit but keep the changes – Stack Overflow mentions to use

git reset HEAD^

However, on Windows, the ^ caret is an escape character, so there you have to use a ~ tilde instead:

git reset HEAD~

The last one is used in [WayBack] Git – Reset Demystified, and shorthand for

git reset --mixed HEAD~

The differences between --soft, --mixed and --hard is even better explained in [WayBack] The difference between git reset –mixed, –soft and –hard. From http://stackoverflow.com/questions/3528245/whats-the-difference-between-git-reset-mixed-soft-and-hard · GitHub.

In short:

  • --soft keeps the changes of the undone commit in the index (or staging area)
  • --mixed (default) keeps the changes of the undone commit in the working directory
  • --hard deletes the changes

–jeroen

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

Cynefin framework – Wikipedia

Posted by jpluimers on 2020/09/02

A long while ago, Kristian Köhntopp explained most of the categories in [WayBackCynefin framework – Wikipedia using very simple terms, which I have translated like below.

  • Specifications work if you are operating in in “Obvious”. Then all constraints are discoverable and known.
  • In “Disorder” (the middle, or “Explorative”) that is not possible and you have to iterate to .
  • In “Complicated” the constraints are, after all, static.
  • In “Complex”, the active constraints depend on past decisions made.
  • In “Chaotic”, there is no plan and you have to try around wild and see what’s going on. This is the world of venture capital to finance start-ups.

I like the bigger picture below a lot better, as it at least names the “Disorder” middle section which is not in the summary diagram on the right. “Disorder” is exactly the place you want to get and stay out of.

All pictures from WikiMedia.

Via: [WayBack] “Kitzel mich!” “Kitzel mich, aber nur bis ich Stop rufe!” “Kitzel mich, aber nur bis ich Stop rufe! Und unter der Bettdecke bin ich sicher!” “Kitzel m… – Kristian Köhntopp – Google+

(“Tickle Me!” “Tickle me, but only until I stop calling!” “Tickle me, but only until I call Stop! And under the blanket, I’m safe!” “Tickle me, but only until I call Stop! And under the blanket, I’m safe! And pulling away the blanket is forbidden!” The son is bound to become a software developer.)

“Obvious” is what a lot of (government) organisations think you and they are in when applying regulations. In reality, “Complex” likely applies best.

–jeroen

Read the rest of this entry »

Posted in Development, Software Development | Leave a Comment »

Delphi consensus: interface implementing classes expose methods at private or protected level.

Posted by jpluimers on 2020/09/02

Interesting consensus at which is very similar to my experience: [WayBack] I’ve inherited a project and the developer uses lots of interfaces (All good here!). Then when they develop the interfaced classes, the methods from th… – John Kouraklis – Google+

Some go even further and even declare the classes in implementation sections, but for me that gives too much RTTI hassle:

Private types (types in the implementation section of units) do not get qualified names.

via: Delphi: TRttiContext.GetType versus TRttiContext.GetTypes is not about singular versus plural…

–jeroen

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

 
%d bloggers like this: