diff --git a/_includes/footer.html b/_includes/footer.html index eb5fef44..5039b996 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1 +1 @@ -Feedback by mail to {% include email.html %} • Content & page design ©1996-{{ site.time | date: '%Y' }} Peter Hilton • This web site (excluding presentations) is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License - required attribution is the credit ‘Peter Hilton - https://hilton.org.uk/’. +Feedback by mail to {% include email.html %} • Content & page design ©1996-{{ site.time | date: '%Y' }} Peter Hilton • This web site (excluding images and presentations) is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License - required attribution is the credit ‘Peter Hilton - https://hilton.org.uk/’. diff --git a/_layouts/hh.html b/_layouts/hh.html index 0f55089b..01075bd2 100644 --- a/_layouts/hh.html +++ b/_layouts/hh.html @@ -47,8 +47,7 @@

Writing by Peter Hilton

{{ page.title }}

{{ page.description }} - {% if page.date %}- {{ page.date | date: "%-d %B %Y" }}{% endif %} - {% for tag in page.tags %}#{{ tag }} {% endfor %}

+ {% if page.date %}{{ page.date | date: "%Y-%m-%d" }}{% endif %}{% for tag in page.tags %} #{{ tag }}{% endfor %}

{% endif %} diff --git a/blog/_posts/2020-02-19-maintenance-story-1997.md b/blog/_posts/2020-02-19-maintenance-story-1997.md index 002102b0..2dc33344 100644 --- a/blog/_posts/2020-02-19-maintenance-story-1997.md +++ b/blog/_posts/2020-02-19-maintenance-story-1997.md @@ -17,7 +17,7 @@ image: manhole.jpg 8. This success cost a spectacular amount of money: €20 million + €1.5 million/year. --> -![A manhole cover](manhole.jpg)] +![A manhole cover](manhole.jpg) In 1997, while working for a large IT consultancy in England, I moved to [Cambridge](https://en.wikipedia.org/wiki/Cambridge) for a new client-site assignment. diff --git a/blog/_posts/2020-04-21-product-roadmap-dimensions-levels.md b/blog/_posts/2020-04-21-product-roadmap-dimensions-levels.md index 74335158..04f6924d 100644 --- a/blog/_posts/2020-04-21-product-roadmap-dimensions-levels.md +++ b/blog/_posts/2020-04-21-product-roadmap-dimensions-levels.md @@ -56,12 +56,12 @@ Swim lanes work because you pursue more than one objective in parallel, in pract NowNextLater -get users hooked (objective) +Get users hooked (objective) Show cat cutenessShow cat cutenessPuppies Enable social sharingFamous catsRabbits -world domination (objective) +World domination (objective) Legal protectionCat politiciansDemote humans to staff CitizenshipRewrite lawsWorld domination! diff --git a/blog/_posts/2020-06-09-article-word-limit.md b/blog/_posts/2020-06-09-article-word-limit.md index 267359d2..ec7d531d 100644 --- a/blog/_posts/2020-06-09-article-word-limit.md +++ b/blog/_posts/2020-06-09-article-word-limit.md @@ -3,12 +3,11 @@ title: Writing with a word count limit description: The enabling constraint of a strict 450-550 word limit layout: hh tags: writing -image: 97-things-java.jpg -css: ".blog .content a img { width:150px; float:right; margin:0 0 1em 1em; }" +image: 97-things-java.webp --- - -book cover + +book cover The submission guidelines for [97 Things Every Java Programmer Should Know](http://shop.oreilly.com/product/0636920048824.do) diff --git a/blog/_posts/2020-07-14-scrum-learning-to-ski.md b/blog/_posts/2020-07-14-scrum-learning-to-ski.md index 0d65d5ac..bd1d451f 100644 --- a/blog/_posts/2020-07-14-scrum-learning-to-ski.md +++ b/blog/_posts/2020-07-14-scrum-learning-to-ski.md @@ -8,7 +8,7 @@ image: skiing-walking-uphill.jpg [![Skiing](skiing-walking-uphill.jpg)](https://unsplash.com/photos/3k6yPhaU5e8) -unsplash-logoMohammad Saifullah +[Mohammad Saifullah](https://unsplash.com/photos/3k6yPhaU5e8){:.photocredit} A surprising number of software development organisations only pay lip service to agile software development, and may even actively resist the introduction of Scrum. Working on software projects in these organisations feels like walking in deep snow: @@ -40,7 +40,8 @@ Like I said, that gets old fast. ![Snowplough](skiing-snowplough.jpg) -unsplash-logoTom Reynolds • CC BY 2.0 +[Tom Reynolds](https://www.flickr.com/photos/thomasrdororg/1217019265){:.photocredit} +[CC BY 2.0](https://creativecommons.org/licenses/by/2.0/){:.license} After lunch, Cristian, a Scandinavian student in the group, took pity on those of us who didn’t have a clue about how to ski and taught us the snowplough. This took perhaps half an hour, after which we were on our own again, still unable to ski but now equipped with the ability to slow down and stop. diff --git a/blog/_posts/2020-07-21-no-code-name.md b/blog/_posts/2020-07-21-no-code-name.md index 4e49f796..6faaa058 100644 --- a/blog/_posts/2020-07-21-no-code-name.md +++ b/blog/_posts/2020-07-21-no-code-name.md @@ -30,7 +30,7 @@ Maybe the naming helped: while _cloud-hosting_ compares to the previous kind of _No-code_ has the same problem as _#NoEstimates_ - naming based on the space it _doesn’t_ occupy. However, as [Willem-Jan Ageling](https://twitter.com/WJAgeling) points out -[#NoEstimates: the name doesn’t make sense, but why is this an issue?] - +‘[#NoEstimates: the name doesn’t make sense, but why is this an issue?](https://twitter.com/WJAgeling/status/995982896082104320)’ - noting that #NoEstimates discussion promotes forecasting instead of estimation. Something about _forecasting_ would make a better name. diff --git a/blog/_posts/2020-08-11-documentation-comments.md b/blog/_posts/2020-08-11-documentation-comments.md index aedb28df..a3ad792d 100644 --- a/blog/_posts/2020-08-11-documentation-comments.md +++ b/blog/_posts/2020-08-11-documentation-comments.md @@ -4,11 +4,10 @@ description: "From ‘97 Things Every Java Programmer Should Know’" layout: hh tags: programming image: 97-things-java.jpg -css: ".blog .content a img { width:150px; float:right; margin:0 0 1em 1em; }" --- - -book cover + +book cover > ‘A common fallacy is to assume authors of incomprehensible code will somehow be able to express themselves lucidly and clearly in comments’ - Kevlin Henney diff --git a/blog/_posts/2020-08-19-what-has-no-code-done-for-us.md b/blog/_posts/2020-08-19-what-has-no-code-done-for-us.md index 6a9025d1..1b6b36e5 100644 --- a/blog/_posts/2020-08-19-what-has-no-code-done-for-us.md +++ b/blog/_posts/2020-08-19-what-has-no-code-done-for-us.md @@ -52,7 +52,7 @@ Hudson’s arguments ignore what no-code tools have already done for non-program In [The Life of Brian](https://en.wikipedia.org/wiki/Monty_Python%27s_Life_of_Brian), members of the [People‘s Front of Judea](https://en.wikipedia.org/wiki/Monty_Python%27s_Life_of_Brian#Political_satire) address the question of ‘What have the Romans ever done for us?’ - + If you haven’t already seen this, you should. Either way, watch it again, because you can probably use 80 seconds of joy in your life right now. diff --git a/blog/_posts/2020-09-08-get-better-at-naming.md b/blog/_posts/2020-09-08-get-better-at-naming.md index 861d11ac..ed1f0ee7 100644 --- a/blog/_posts/2020-09-08-get-better-at-naming.md +++ b/blog/_posts/2020-09-08-get-better-at-naming.md @@ -3,12 +3,11 @@ title: Get better at naming things description: "From ‘97 Things Every Java Programmer Should Know’" layout: hh tags: programming -image: 97-things-java.jpg -css: ".blog .content a img { width:150px; float:right; margin:0 0 1em 1em; }" +image: 97-things-java.webp --- - -book cover + +book cover > ‘What is above all needed is to let the meaning choose the word, and not the other way around… the worst thing one can do with words is surrender to them.’
- George Orwell diff --git a/blog/_posts/2020-10-07-refactor-boolean-enumeration.md b/blog/_posts/2020-10-07-refactor-boolean-enumeration.md index ba9aebc7..b9647d7b 100644 --- a/blog/_posts/2020-10-07-refactor-boolean-enumeration.md +++ b/blog/_posts/2020-10-07-refactor-boolean-enumeration.md @@ -3,8 +3,7 @@ title: Refactor Boolean values to enumerations description: "From ‘97 Things Every Java Programmer Should Know’" layout: hh tags: programming -image: 97-things-java.jpg -css: ".blog .content a img { width:150px; float:right; margin:0 0 1em 1em; }" +image: 97-things-java.webp image: gender-type-error.jpg --- @@ -13,8 +12,8 @@ image: gender-type-error.jpg unsplash-logoQuietMisdreavus of an [original design by telegraham](https://www.redbubble.com/shop/ap/47685989) - -book cover + +book cover You wouldn’t use ‘magic numbers’ in your code, so don’t use magic Booleans either! Boolean literals are worse than hard-coded numbers: a `42` in the code might look familiar, but `false` could be anything, and anything could be `false`. @@ -32,9 +31,11 @@ The most obvious model for products you no longer sell is a `boolean` `discontin Refactor related Boolean fields like these to a Java _enum type_: -
enum ProductAvailability {
+```java
+enum ProductAvailability {
    AVAILABLE, OUT_OF_STOCK, DISCONTINUED, BANNED
-}
+} +``` Enum types are great because then you get more things to name. Also, the values are more readable than a `true` that means that the value is really some other value, such as `AVAILABLE`. Enum types also turn out to be more convenient than you might expect, which makes laziness a weak excuse for not refactoring. diff --git a/blog/_posts/2020-11-03-language-selection.md b/blog/_posts/2020-11-03-language-selection.md index f7ab9f7f..8f74c07c 100644 --- a/blog/_posts/2020-11-03-language-selection.md +++ b/blog/_posts/2020-11-03-language-selection.md @@ -26,7 +26,8 @@ In case you need more than one good reason not to repeat other people’s mistak I discovered the last issue in a London cafe, after speaking in Dutch to member of staff who had a Hungarian flag on their name badge. The flags of Hungary, Luxembourg and the Netherlands differ by one similar colour: -

🇱🇺 🇳🇱 🇭🇺

+{: style="width:20em;text-align:center;font-size:2em"} +🇱🇺 🇳🇱 🇭🇺 Putting the flags next to each other makes the difference visible, but you might misidentify one of them in isolation. diff --git a/blog/_posts/2021-03-09-http-client-error-checklist.md b/blog/_posts/2021-03-09-http-client-error-checklist.md index 8c8612cb..0bcb5fe8 100644 --- a/blog/_posts/2021-03-09-http-client-error-checklist.md +++ b/blog/_posts/2021-03-09-http-client-error-checklist.md @@ -4,7 +4,6 @@ description: Because HTTP API clients don’t just send bad requests layout: hh tags: API design image: seven-sisters.jpg -css: "table{font-size:120%;width:43em}" --- ![Seven Sisters cliffs, Eastbourne, United Kingdom](seven-sisters.jpg) diff --git a/style/hh.css b/style/hh.css index 29b594c9..7ad1d6d9 100644 --- a/style/hh.css +++ b/style/hh.css @@ -15,6 +15,7 @@ article > .banner { width: 960px; } h1, h2, h3 { margin: 0.6em 0 0.3em;} p, li, details { margin: 0 0 0.6em; } header p { margin-bottom: 1.25em; } +article blockquote ul { padding-inline-start:1em; margin-top:0; } article table { width: auto; border-collapse: collapse; margin: 1.5em 0; } article th, article td { border-top: 1px solid; border-bottom: 1px solid; padding: 0.3em 0.5em; vertical-align: top; } details { line-height: 1.2; margin-left:1em; } @@ -56,14 +57,16 @@ body.writing article img { max-width: 100%; height: auto; vertical-align: middle body.writing article img.framed { float:right; margin:0 0 2em 1em} body.writing blockquote.big { max-width: 26em; margin:1.5em 0; border-left:0; } body.writing .related { margin-top:3em; } +body.writing pre { border: 1px solid; border-radius: 4px; padding:0.5em 0.8em; } +body.writing .cover { width:320px; float:right; margin:0 0 1em 1em; } body.writing a.unsplash { padding:4px 6px; display:inline-block; border-radius:3px; } body.writing a.unsplash span:first-child { display: inherit; padding: inherit; } body.writing a.unsplash span { display:inline-block; padding:2px 3px; } body.writing a.unsplash svg { height:12px; width:auto; position:relative; vertical-align:middle; top:-1px; } -body.writing a.photocredit { padding:4px 6px; display:inline-block; border-radius:3px; } -body.writing pre { border: 1px solid; border-radius: 4px; padding:0.5em 0.8em; } -body.writing .cover { width:320px; float:right; margin:0 0 1em 1em; } +body.writing a.photocredit, body.writing a.license { padding:4px 6px; display:inline-block; border-radius:3px; } +body.writing code { padding: 0.1em 0.2em 0 0.2em; } + /* TEXT */ @@ -84,14 +87,13 @@ h1, h2 { font-weight: 300; } h1 { font-size: 2.25em; } h2 { font-size: 1.9em; } h3 { font-size: 1.35em; font-weight:500; } -article table { font-size: 90%; } +article table { font-size: 95%; } article th { text-align:left; } footer { font-size: 75%; } footer a { text-decoration: underline; } header p { font-size: 1.3em; } article blockquote ul { font-size: 100%; } - code, tt { font-size:86%; } a.unsplash { font-family: -apple-system, sans-serif; text-decoration: none; font-size: 12px; font-weight: bold; line-height: 1.2; } body.music strong, body.speaking strong { font-weight: normal; } @@ -100,9 +102,13 @@ body.music strong, body.speaking strong { font-weight: normal; } body.writing .tags { line-height: 1.8em; } body.writing .tags a { font-size:90%; } body.writing blockquote.big p { font-size:1.9em; } + +body.writing header em {font-style:normal; font-size:smaller; } +body.writing header em::before {content:'• '} body.writing a.unsplash { text-decoration:none; font-family:-apple-system, sans-serif; font-size:12px; font-weight:bold; line-height:1.2;} -body.writing a.photocredit { text-decoration:none; font-family:-apple-system, sans-serif; font-size:12px; font-weight:bold; line-height:1.2; } +body.writing a.photocredit, body.writing a.license { text-decoration:none; font-family:-apple-system, sans-serif; font-size:12px; font-weight:bold; line-height:1.2; } body.writing a.photocredit:before { content:'📷 '; } +body.writing a.license:before { content:'📄 '; } body.writing .related { font-style: italic; } @@ -151,12 +157,14 @@ strong { font-weight:normal; color: #DF5A49; } body.writing .tags a { color:#fff; background-color:#777; } body.writing .text-muted { color: #595959; } body.writing blockquote { border-color:#eee; } +body.writing pre { background-color: #f5f5f5; border-color:#ccc; } +body.writing header em {color:#595959} +body.writing header em::before {color:#999} body.writing a.unsplash { color:white; background-color:#ccc; } body.writing a.unsplash:hover { background-color: #7FC4FF; } body.writing a.unsplash svg { fill:white; } -body.writing a.photocredit { color:white; filter:grayscale(1) opacity(0.5); background-color: #7FC4FF; } -body.writing a.photocredit:hover { filter:grayscale(0) opacity(1); } -body.writing pre { background-color: #f5f5f5; border-color:#ccc; } -body.writing code { color: #c7254e; background-color: #f9f2f4; } -body.writing pre code { color:inherit; } +body.writing a.photocredit, body.writing a.license { color:white; filter:grayscale(1) opacity(0.5); background-color: #7FC4FF; } +body.writing a.photocredit:hover, body.writing a.license:hover { filter:grayscale(0) opacity(1); } +body.writing code { color: #A81200; background-color: #f5f5f5; } +body.writing pre code { color:inherit; background-color:inherit; }