Friday, January 17, 2020

The Drive of a Lazy Developer

When I think of the term "Lazy Developer", I think of cliches such as:
  • If it ain't broke, don't fix it
  • You ain't gonna need it (YAGNI)
  • Code monkeys
And the last one, "Code monkeys", contains an important point for me, but in reverse:

A Lazy Developer is not a code monkey.

A Lazy Developer is not happy to just code.

A Lazy Developer wants to achieve something, and write as little code as possible in the process.

To a Lazy Developer, a backlog of tasks is a horrible sight. Tasks here meaning "things to do".

A backlog of ideas, however, makes more sense. Ideas here meaning "ideas of how to achieve some goal".

A Lazy Developer is driven towards achieving a goal, not towards implementing some feature.

Do business owners and product owners want to hand over a backlog of tasks, things to do, to developers?

Maybe, but they risk shooting themselves in the foot.

Especially if the developers, just do it, and don't understand the value from doing it.

If developers don't understand the value, don't understand the goal, don't share the goal, then they might not be able to make the right solution, that actually gives the desired value. Or they might not take responsibility for making the right solution, because they don't feel ownership for the goal.

Wednesday, January 8, 2020

Git vs Subversion

A version control system makes it possible to keep track of changes and go back and look at the history of changes.

It can be used for keeping track of your source code if you are a software developer.

Ten years ago Subversion was probably the most popular.

Today Git is probably the most popular, in part due to github where you can share your stuff with other people.

Here are the main differences:

Subversion:

  • Is a centralized version control system, where the repository is located on a server, and you pull down a working copy to your machine
  • All operations, like commit, branch, merge, happens on the server and require network operations
  • You have to pull the latest changes from the server before you can commit
  • The history on a given branch is linear
Git:
  • Is a distributed version control system, where the entire repository is both on the server as well as on the computers of all the users that are working on that repository
  • Many operations run locally on the computer of the user, for example commit, branch, and merge
  • You can commit locally a lot, even though other users on other computers have made commits on the same branch and pushed those commits to the server
  • The history on a given branch can become, well, branched, when multiple users are working on the same branch, or when merging changes from other branches
These differences mean that there are some benefits in using Git over Subversion:
  • Branching and merging and working on the same branch as other people is usually painless in Git, whereas simple branch and merge scenarios on Subversion could give a lot of trouble (well, even git is not idiot-proof: if you have been working on a branch for a long time without integrating your changes with other people, and if other people have made significant changes to the same files, then you might be in for a big surprise, and potentially a lot of rework, when you merge)
  • Git is just faster than Subversion (since many operations are local in Git)
  • You have the entire history locally, which can give you faster access
  • With Git you have several copies of the entire repository, making you less vulnerable to the server crashing
Here's a little example of how the history can look on a branch in git, after merging in changes from the master branch:

Monday, January 6, 2020

A personal journal and goal tracker - almost out of the iPhone box

I have created a micro journal/goal setup on my iPhone, built with stuff already on my iPhone, on my Google account, and connecting them through a site called IFTTT (If This Then That).

Here's the work flow for keeping track of different activities in my journal:
  • On my iPhone I click on a "Journal" icon on my homescreen
  • I select a topic from a list, for example "Run", add a count (for example of how many kilometers) and can also enter some notes if I like
  • Every early morning I get an email, either of celebration if I have achieved a goal, or of encouragement if I'm still not quite there


How this journal/goal setup works:
  • Go to IFTTT, sign up and create a webhook that triggers a google sheet
  • It is very well described in this article how to do that: iOS Shortcuts for Data Capture (go down to the section called "Via IFTTT")
  • So, by following that guide you'll now have a shortcut icon on your iPhone that adds a row to a Google sheet
  • To create an email notification with some stats, open that spreadsheet
  • I have named the first tab where the rows are added "Hændelser" (Danish for "events")
  • I have created a second tab called "Mål" which contains my weekly or monthly goals

  • In your spreadsheet, go to the menu bar and select Tools and then Script Editor
  • Enter the following script, which will aggregate your data and send you an email:
  • Google app script that creates status mail from journal
  • Remember to change the names of your sheets, if you have named them differently than I have
  • In the script, go to Edit and then Triggers For The Current Project
  • Add a new trigger that calls the top level function "sendGoalStatus"
  • I have set it to run every morning
Every morning when I wake up, I have a fresh status of what I've done, and how far I am towards reaching my goals.

Saturday, January 4, 2020

Rewriting git history

Git makes it possible to edit documents (typically code files) in a number of ways.

(I will use the following terminology: A git repository contains commits, where each commit contains changes to one or more documents. A commit is a container for changes, and has a unique ID and an associated commit message with a description of what/why changes were made.)

Scenarios where I modify commits, and particularly where I modify the history of commits:
  • Undo a particular commit, but leave the history of that the commit has been there and that the commit was undone later.
  • Undo a commit, and remove the history that the commit was ever there.
  • Reorder commits, in order to push selected commits to other people, but leave some commits for me to continue working on and refining.
  • Reorder commits, in order to make the sequence of commits more logical.
  • Split a commit into two or more commits.
  • Collect two or more commits into one commit.
  • Move a commit from one branch to another, if I would like to use it for coming release or on some other feature work.
  • Apply my commits on top of new commits from other people, such that I can base my commits on a version that is known to work.
  • If I started committing on top of a version that is later shown to have errors, I would like to change and instead put my commits on top of a version that I know has no errors.

Sunday, December 29, 2019

Practicing with five-minute exercises

When I got a guitar as a gift and decided to practice playing it, I found a course online on Justin Sandercoes website. It is structured in small steps, and the corner-stone of the method is small five-minute exercises, with focus on different aspects, like chords, chord changes, and rhythm. This is beneficial for learning something which is difficult compared to existing habits for the hand and finger muscles (for guitar). In these five-minute exercises you’re using what Daniel Kahneman calls System 2, the slow thought system that is active when handling something new and unknown. And you’re building up a skill, such that it can be used by System 1 which is instinctive, rapid and automatic. There’s also a fine book in Danish on this subject: Bliv bedre med fokuseret træning by Susanne Bargmann and Ulrik Elholm.

I followed the guitar course, and found good progress. Especially satisfying was to measure my speed and capabilities, and see how it quickly improved.

I have used five-minute exercises for improving different skills, for example:
  • Guitar (as detailed above)
  • Voice training (strength and tone)
  • Communication (non-violent communication and negotiation)
  • Coaching (different principles and techniques)


How to do it:
  • Set goals, for guitar for example to change between two specific chords 60 times per minute
  • Break into five-minute exercises
  • Create a schedule of 30-60 minutes of different exercises
  • Do the schedule 4-5 times per week
  • Log how well you do each exercise, for example number of chord changes, or a subjective evaluation on a scale from 1 to 5

When I see the measurable progress in a specific area, I get a great sense of satisfaction, and I believe that the method outlined here has helped me achieve this.
References:

Sunday, November 15, 2015

Sabbatical - English version

I got a present from eBay this year: sabbatical; four weeks off work, in which I would recharge and get new energy, new ideas and new insights.


Calendar

I considered to go on sabbatical either as an extension of the summer holidays or in the autumn.

If sabbatical was in the summer, it would have given me a summer holiday during the entire school holidays.

If sabbatical was later, it could be in the middle of the period extending from summer holidays in early August and until the Christmas holidays in late December. Sabbatical could be combined with school holiday in week 42. We would also have the opportunity to visit more southerly latitudes in a cooler time of year, with temperatures well below 30 degrees.

The final choice was sabbatical from late September to late October.



Blank

What would I do in sabbatical?

It ​​would be different than the summer holidays.

I would like a few weeks in Italy with the family.

I wanted to be alone for a while. I had an idea to go alone somewhere here in Denmark.


Weekend

I drove home by train. I turned off mail, calendar and messages.

We bought a car; the old had been rejected at inspection. We went for a drive and celebrated sabbatical and having a car again.

We went to the swimming pools and swam in the warm water, and Karoline jumped from tilting out in the deep water.

We played Mancala and "guess who you are."



Bathing bridge

I went to Funen and lived in a lonely house. There were trees and birds and sun and water. There was no television, no wifi, no stereo and no computer. I turned off the phone.

I went down to the beach. I sat on a bench on a bathing bridge. I looked out over the bay.

I walked along the coast, inland, through forests, through fields, past pigs and cows and horses and deer, up to a listed hilltop overlooking the forests and the fields and the sea.

I ran to the eternity trees. Water trickled out of the forest. A squirrel crossed the brook.

I closed my eyes and breathed a hundred times.

I saw past and future flowing together in this moment.

The summer continued into October.

Unrest appeared. I drew a map of the turmoil, and looked at the different areas.

I meditated. Meditation dissolves the world's hustle and bustle, and pulls the veil away from the eternal peace and harmony.

Here I am. Thoughts and turmoil I place in boxes all around me. I'm looking at a box and see it sticking out in several directions. I put the box a little to the side. Here I am, and there are thoughts and unrest.

I visualized. Visualizations heals, and gives answers to my questions, like the oracle who directs my gaze inward into myself to find the answer.

One day it was calm, no wind or water or animal or human was heard. The water was blank, and crabs and starfish slipped silently under me.

I do not worry about what happens.



Italy

We flew to Italy. Karoline and William cheered on their first flight. We rode in a taxi with Joe. We sang "We'll never see Joe again, he is driven to Barcelona."

We lived in Firenze. We saw the city and the bridge and the dome. Karoline and William drove the carousel on the square. We saw the city from the small buses in the narrow streets. We found the ice cream shops. We laughed at the street performer in the square and at people he joked with.

We played on all playgrounds. We ate pizza and pasta. Janne baked Italian buns. We said "Ciao Bella" and "Buon journo Bambini". We jumped with surprise when we saw the lizards on the wall.

Later, we lived on a small mountain. We swam in the outdoor swimming pool. We woke up when thunder rolled over the mountain. We caressed the affectionate cat. We gave water to the hungry dog.

We visited Lucca and Pisa and Fosdinovo. We cycled on the city wall. We saw the leaning tower. We saw the sea from the castle on the mountain. We buried sticks in the sea and rescued them again. We lurched up the tower. Karoline and William went up and down the stairs we walked past.

William had 30 Lego bricks in his suitcase. William and Karoline built stairs and houses and people and animals and airplanes and cars.



Odder

We flew home.

We packed sandals and sunglasses away. We took scarves and hats on.

Karoline and William threw themselves into the Lego bricks. Now there were many bricks, not just 30, and the creativity that had been challenged and ransacked with 30 bricks, now had no limits.

We were catching a cold. The cold disappeared again.

Karoline went to school. William went to kindergarten.

One morning before school Karoline woke up and said, "Dad, we shall play chess." We played chess and Nine Men's Morris.

I cut the last grass before winter.

Eternity rests in every moment. The children play in the living room, are born and grow.

I gathered my notes. I went for a walk in the woods. I went for a walk on the beach. Jeg er bølgerne der vugger.

bølger mod kysten
smil og åndedrag
i himlen



Now

I hear music in the car. I see the sun rising above the horse in the fog. I work, I create, I learn. I see the moon above the harbor.

Karoline says "Good morning, Dad. Bye Dad. See you at dinner."


Gallery

Tourists in Firenze

Firenze seen from Piazzale Michelangelo

Ponte Vecchio

Duomo Firenze

The ocean seen from Fosdinovo


The castle in Fosdinovo

View from the castle in Fosdinovo

The leaning tower in Pisa

Duomo Pisa

Emaa

Piazza Anfiteatro

Olive grove

At Lucca

Tourists in Lucca

Tuesday, November 10, 2015

Sabbatical

Jeg fik en gave af eBay i år: sabbatical; fire uger fri, hvori jeg ville lade op og få ny energi, ny inspiration og ny indsigt.


Kalender

Jeg overvejede at holde sabbatical enten i forlængelse af sommerferien eller om efteråret.

Hvis sabbatical blev i forlængelse af sommerferien, ville det have givet mig fri i hele skoleferien.

Hvis sabbatical blev senere, kunne den lægges midt i perioden som strækker sig fra sommerferien i starten af august og indtil juleferien i slutningen af december. Sabbatical kunne lægges i kombination med skolernes efterårsferie. Vi ville desuden have mulighed for at besøge sydligere breddegradder på en køligere årstid med temperaturer et godt stykke under 30 grader.

Det endelige valg blev sabbatical fra slutningen af september til slutningen af oktober.



Blank

Hvad ville jeg lave i sabbatical?

Det ville blive anderledes end sommerferierne.

Jeg ville gerne et par uger sydpå sammen med familien, til Italien.

Jeg ville være alene i en periode. Jeg havde en idé om at tage alene et sted hen i Danmark.


Weekend

Jeg kørte hjem med toget. Jeg slukkede for mails, kalender og meddelelser.

Vi købte en bil; den gamle var blevet afvist ved syn. Vi kørte en tur og fejrede sabbatical og at have en bil igen.

Vi tog i svømmehallen og svømmede i det varme vand, og Karoline sprang fra vippen ud i det dybe vand.

Vi spillede kalaha og "gæt hvem du er".



Badebroen

Jeg tog til Fyn og boede i et ødehus. Der var træ og fugle og sol og vand. Der var intet tv, intet wifi, intet stereoanlæg og ingen computer. Jeg slukkede for telefonen.

Jeg gik ned til stranden. Jeg satte mig på en bænk på en badebro. Jeg så ud over bugten.

Jeg gik langs kysten, ind i landet, gennem skovene, gennem marker, forbi grise og køer og heste og hjorte, op til en fredet bakketop med udsigt over skovene og markerne og havet.

Jeg løb hen til evighedstræerne. Vandet strømmede ud af skoven. Et egern krydsede bækken.

Jeg lukkede øjnene og trak vejret hundrede gange.

Jeg så fortid og fremtid flyde sammen i dette øjeblik.

Sommeren fortsatte ind i oktober.

Uro dukkede op. Jeg tegnede et kort over uroen, og så på de forskellige områder.

Jeg mediterede. Meditation opløser verdens larm og uro, og trækker sløret bort fra evighedens fred og harmoni.

Her er jeg. Tanker og uro placerer jeg i kasser rundt omkring mig. Jeg kigger på en kasse og ser det stikke ud i flere retninger. Jeg sætter kassen lidt til siden. Her er jeg, og dér er tanker og uro.

Jeg visualiserede. Visualiseringer helbreder, og giver svar på mine spørgsmål, som oraklet der retter mit blik indad i mig selv for at finde svaret.

En dag blev det blikstille, hverken vind eller vand eller dyr eller menneske hørtes. Vandet var blankt, og krabber og søstjerner gled lydløst under mig.

Jeg bekymrer mig ikke om hvad der sker.



Italien

Vi fløj til Italien. Karoline og William jublede over deres første flyvetur. Vi kørte i taxi med Joe. Vi sang "Vi ser aldrig Joe igen, han er kørt til Barcelona".

Vi boede i Firenze. Vi så byen og broen og kuplen. Karoline og William kørte i karrusellen på torvet. Vi så byen fra de små busser i de smalle gader. Vi fandt isboderne. Vi lo ad gøgleren på pladsen og ad dem han lavede sjov med.

Vi legede på alle legepladserne. Vi spiste pizza og pasta. Janne bagte italienske boller. Vi sagde "Ciao Bella" og "Buon Journo Bambini". Vi hoppede af overraskelse over firbenene på muren.

Senere boede vi på et lille bjerg. Vi svømmede i "svømmingpoolen". Vi vågnede da tordenen rullede over bjerget. Vi kælede for den kælne kat. Vi gav vand til den sultne hund.

Vi besøgte Lucca og Pisa og Fosdinovo. Vi cyklede på bymuren. Vi så det skæve tårn. Vi så havet fra borgen på bjerget. Vi begravede pinde i havet og reddede dem igen. Vi slingrede op i tårnet. Karoline og William gik op og ned ad de trappetrin vi gik forbi.

William havde 30 legoklodser med i sin kuffert. William og Karoline byggede trapper og huse og mennesker og dyr og flyvemaskiner og biler.



Odder

Vi fløj hjem.

Vi pakkede sandaler og solbriller væk. Vi tog halstørklæde og hue på.

Karoline og William kastede sig over legoklodserne. Nu var der mange klodser, ikke bare 30, og den kreativitet, der var blevet udfordret og endevendt med 30 klodser, havde nu ingen grænser.

Vi blev forkølede. Forkølelsen forsvandt igen.

Karoline tog i skole. William tog i børnehave.

En morgen før skole stod Karoline op og sagde "Far, skal vi spille skak". Vi spillede skak og mølle.

Jeg slog det sidste græs inden vinter.

Evigheden hviler i hvert øjeblik. Børnene leger i stuen, bliver født og vokser.

Jeg samlede mine noter. Jeg gik en tur i skoven. Jeg gik en tur ved stranden. Jeg er bølgerne der vugger.

bølger mod kysten
smil og åndedrag
i himlen



Nu

Jeg hører musik i bilen. Jeg ser solen stige op over hesten i tågen. Jeg arbejder, jeg skaber, jeg lærer. Jeg ser månen over havnen.

Karoline siger "Godmorgen Far. Farvel Far. Vi ses til aftensmaden."


Galleri

Turister i Firenze

Firenze set fra Piazzale Michelangelo


Ponte Vecchio


Duomo Firenze


Havet set fra Fosdinovo


Borgen i Fosdinovo

Udsigt fra borgen i Fosdinovo

Det skæve tårn i Pisa

Duomo Pisa

Emaa

Piazza Anfiteatro

Olivenlund

Ved Lucca

Turister i Lucca