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 @@
{{ 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 %}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}" ---  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; }