Skip to content
Permalink
Browse files

Add newsletter

  • Loading branch information...
arp242 committed May 17, 2019
1 parent cc1f10a commit eb0daef00e1ff3defe15c3a79a8a4d35bb6d3b02
@@ -8,7 +8,7 @@ markdown: "kramdown"
exclude: ["Gemfile", "Gemfile.lock"]

# Copy for Netlify.
include: ["_redirects"]
include: ["_redirects", ".well-known"]

# Always publish all posts, some posts may be considered in the "future" by the
# deploy pipline as that's in the US, but I'm in New Zealand, so that's almost a
@@ -10,14 +10,17 @@ <h1>{{ page.title }}</h1>
{% if page.updated %} − last updated on {{ page.updated | date_to_string }}
<sup><a href="https://github.com/arp242/arp242.net/commits/master/{{ page.path }}">history</a></sup>{% endif %}</p>
</header>
{% if page.hatnote %}<div class="hatnote">{{ page.hatnote }}</div>{% endif %}
<div class="newsbox floatbox">{% include _newsletter.html %}</div>
{{ content }}

<footer class="postscript">
<strong>Feedback</strong>
<p>You can mail me at <a href="mailto:martin@arp242.net">martin@arp242.net</a> or
<p>Mail me at <a href="mailto:martin@arp242.net">martin@arp242.net</a> or
<a href="https://github.com/arp242/arp242.net/issues/new">
create a GitHub issue</a> for feedback, questions, etc.</p>
</footer>
<div class="newsbox">{% include _newsletter.html %}</div>
</article>

<script>
@@ -0,0 +1,4 @@
<form class="newsletter" method="POST" action="https://arp242.goatletter.com/request">
<label for="nl-email">Get notified of new posts:</label><br>
<input type="email" name="email" id="nl-email" placeholder="Email address"><button type="submit">Go</button>
</form>
@@ -3,7 +3,7 @@ class GoPageGenerator < Generator
safe true

def generate(site)
pkgs = %w{log sconfig autofox goimport goimport/goimport hubhub info mhttp
pkgs = %w{sconfig autofox goimport goimport/goimport hubhub info
orgstat singlepage trackwall transip-dynamic uni}
pkgs.each do |p|
site.pages << GoPage.new(site, site.source, p)
@@ -3,10 +3,6 @@ layout: post
title: "A primer on the str and bytes types in Python 3"
---

<em class="hatnote">This is modified from my answer at Stack Overflow:
<a href="http://stackoverflow.com/a/21689447/660921">Python 3 TypeError: must be
str, not bytes with sys.stdout.write()</a>.</em>

Python 3 handles strings a bit different. Originally there was only one type for
strings: `str`. When unicode gained traction in the '90s the new `unicode` type
was added to handle Unicode without breaking pre-existing code.[^1] This is
@@ -3,10 +3,6 @@ layout: post
title: "Security of Python’s pickle and marshal modules"
---

<em class="hatnote">This is modified from my answer at Stack Overflow:
<a href="http://stackoverflow.com/q/26931919/660921">Marshal unserialization -
not secure</a>.</em>

Both the [`pickle`][pickle] and [`marshal`][marshal] modules come with a similar
big red warning:

@@ -3,18 +3,16 @@ layout: post
title: "The downsides of JSON for config files"
updated: 2019-04-16
desc: "JSON was designed as a data interchange format, and not a configuration format; it works but there are downsides."
hatnote: |
Follow-up:
<a href="/flags-config.html">Configuration with flags</a>.
Also see:
<a href="/yaml-config.html">
YAML: probably not so great after all</a>.
Discussions:
<a href="https://news.ycombinator.com/item?id=19653834">Hacker News</a>;
---

<div class="hatnote">
Follow-up:
<a href="/flags-config.html">Configuration with flags</a>.
Also see
<a href="/yaml-config.html">
YAML: probably not so great after all</a>.
Discussions:
<a href="https://news.ycombinator.com/item?id=19653834">Hacker News</a>;
</div>

I've recently witnessed the trend of using JSON for configuration files. I think
this is not a good idea.

@@ -3,19 +3,17 @@ layout: post
title: "YAML: probably not so great after all"
updated: 2019-04-15
desc: "I was very excited when I first used YAML, but some real-world usage showed it's not so great after all"
hatnote: |
Follow-up:
<a href="/flags-config.html">Configuration with flags</a>.
Discussions:
<a href="https://news.ycombinator.com/item?id=17358103">Hacker News</a>,
<a href="https://lobste.rs/s/dwjgn1/yaml_probably_not_so_great_after_all">Lobsters</a>,
<a href="https://www.reddit.com/r/programming/comments/8shzcu/yaml_probably_not_so_great_after_all/">/r/programming</a>.
Translations:
<a href="https://linux.cn/article-10423-1.html">Chinese (中文)</a>.
---

<div class="hatnote">
Follow-up:
<a href="/flags-config.html">Configuration with flags</a>.
Discussions:
<a href="https://news.ycombinator.com/item?id=17358103">Hacker News</a>,
<a href="https://lobste.rs/s/dwjgn1/yaml_probably_not_so_great_after_all">Lobsters</a>,
<a href="https://www.reddit.com/r/programming/comments/8shzcu/yaml_probably_not_so_great_after_all/">/r/programming</a>.
Translations:
<a href="https://linux.cn/article-10423-1.html">Chinese (中文)</a>.
</div>

I previously wrote [why using JSON for human-editable configuration files is a
bad idea][json-no]. Today we’re going to look at some general problems with the
YAML format.
@@ -3,13 +3,11 @@ layout: post
title: "PHP’s fopen() is broken"
updated: 2019-01-20
desc: "Even essential standard library functions such as fopen() suffer from some serious shortcomings in PHP"
hatnote: |
Discussions:
<a href="https://www.reddit.com/r/lolphp/comments/agam6a/phps_fopen_is_broken_2017/">/r/lolphp</a>.
---

<div class="hatnote">
Discussions:
<a href="https://www.reddit.com/r/lolphp/comments/agam6a/phps_fopen_is_broken_2017/">/r/lolphp</a>.
</div>

I know that “bashing PHP” is *so 2010*. But even now many people don’t seem to
fully realize the limitations and problems of this language.

@@ -2,12 +2,12 @@
layout: post
title: Why teach kids to program?
updated: 2018-12-23
Discussions:
hatnote: |
Discussions:
<a href="https://lobste.rs/s/eoy7p4/why_teach_kids_program_2017">Lobsters</a>.
---

<div class="hatnote">Discussions:
<a href="https://lobste.rs/s/eoy7p4/why_teach_kids_program_2017">Lobsters</a>.
</div>

Teaching kids the basics of computer programming is a good idea for the same
reason that teaching things such as maths and physics are a good idea: it
teaches deeper truths.
@@ -2,14 +2,13 @@
title: "Browsers and conflicts of interests"
layout: post
updated: 2018-12-22
hatnote: |
Discussions:
<a href="https://www.reddit.com/r/firefox/comments/8avev2/browsers_and_conflicts_of_interests/">/r/firefox</a>.
Feedback:
<a href="https://github.com/arp242/arp242.net/issues/2">#2</a>.
---

<div class="hatnote">Discussions:
<a href="https://www.reddit.com/r/firefox/comments/8avev2/browsers_and_conflicts_of_interests/">/r/firefox</a>.
Feedback:
<a href="https://github.com/arp242/arp242.net/issues/2">#2</a>.
</div>

What do you get when you search for ‘Firefox’ in a new Windows 10 installation?

A big fat ad for Microsoft Edge:
@@ -1,16 +1,15 @@
---
title: "The shell scripting trap"
layout: post
hatnote: |
Discussions:
<a href="https://lobste.rs/s/vghl4j/shell_scripting_trap">Lobsters</a>,
<a href="https://www.reddit.com/r/programming/comments/968sbv/the_shell_scripting_trap/">/r/programming</a>,
<a href="https://www.reddit.com/r/commandline/comments/96i08f/the_shell_scripting_trap/">/r/commandline</a>.
Translations:
<a href="https://linux.cn/article-10772-1.html">Chinese (中文)</a>.
---

<div class="hatnote">Discussions:
<a href="https://lobste.rs/s/vghl4j/shell_scripting_trap">Lobsters</a>,
<a href="https://www.reddit.com/r/programming/comments/968sbv/the_shell_scripting_trap/">/r/programming</a>,
<a href="https://www.reddit.com/r/commandline/comments/96i08f/the_shell_scripting_trap/">/r/commandline</a>.
Translations:
<a href="https://linux.cn/article-10772-1.html">Chinese (中文)</a>.
</div>

Shell scripting is great. It is amazingly simple to create something very
useful. Even a simple no-brainer command such as:

@@ -2,12 +2,11 @@
layout: post
title: "Go testing style guide"
updated: 2018-07-31
hatnote: |
Discussions:
<a href="https://www.reddit.com/r/golang/comments/93jjrs/go_testing_style_guide/">/r/golang</a>.
---

<div class="hatnote">Discussions:
<a href="https://www.reddit.com/r/golang/comments/93jjrs/go_testing_style_guide/">/r/golang</a>.
</div>

A small (opinionated) style guide for writing Go tests. There is much more to be
said about writing good tests than what I’ve written here. Most of this focuses
on *style*, rather than *technique*.
@@ -2,12 +2,11 @@
layout: post
title: Open source DIY ethics
updated: 2018-12-27
hatnote: |
Discussions:
<a href="http://lists.suckless.org/dev/1812/33045.html">suckless</a>.
---

<div class="hatnote">Discussions:
<a href="http://lists.suckless.org/dev/1812/33045.html">suckless</a>.
</div>

I moved to New Zealand last week, and as a proper Dutch person one of the first
things I did after arriving was getting a bicycle.

@@ -1,23 +1,21 @@
---
layout: post
title: "Testing isn’t everything"
hatnote: |
Discussions:
<a href="https://news.ycombinator.com/item?id=18907912">Hacker News</a>,
<a href="https://www.reddit.com/r/programming/comments/ag2h51/testing_isnt_everything/">/r/programming</a>.
Feedback:
<a href="https://github.com/arp242/arp242.net/issues/11">#11</a>.

<p>
This is adopted from a discussion about
<a href="https://medium.com/@jens.neuse/want-to-write-good-unit-tests-in-go-dont-panic-or-should-you-ba3eb5bf4f51">
Want to write good unit tests in go? Don’t panic… or should you?</a>
While this mainly talks about Go a lot of the points also apply to other languages.
</p>
---

<div class="hatnote">
Discussions:
<a href="https://news.ycombinator.com/item?id=18907912">Hacker News</a>,
<a href="https://www.reddit.com/r/programming/comments/ag2h51/testing_isnt_everything/">/r/programming</a>.
Feedback:
<a href="https://github.com/arp242/arp242.net/issues/11">#11</a>.
</div>

<div class="hatnote">
This is adopted from a discussion about
<a href="https://medium.com/@jens.neuse/want-to-write-good-unit-tests-in-go-dont-panic-or-should-you-ba3eb5bf4f51">
Want to write good unit tests in go? Don’t panic… or should you?</a>
While this mainly talks about Go a lot of the points also apply to other languages.
</div>

Some of the most difficult code I've worked with is code that is "easily
testable". Code that abstracts everything to the point where you have no idea
what's going on, just so that it can add a "unit test" to what would otherwise
@@ -1,13 +1,11 @@
---
layout: post
title: "Source code shame"
hatnote: |
Discussions:
<a href="https://www.reddit.com/r/programming/comments/ag2h51/testing_isnt_everything/ee3f3aw/">/r/programming</a>.
---

<div class="hatnote">
Discussions:
<a href="https://www.reddit.com/r/programming/comments/ag2h51/testing_isnt_everything/ee3f3aw/">/r/programming</a>.
</div>

I suspect that that many companies don't publish their source code not because
they're against the idea of it, but because they're ashamed of the quality.
Publishing the source – either as open source of ‘source available’ – will mean
@@ -3,12 +3,11 @@ layout: post
title: You (probably) don’t need Kubernetes
updated: 2019-03-05
desc: "K8s is overkill for many cases and comes with the serious downside of adding a lot of complexity"
hatnote: |
Translations:
<a href="https://linux.cn/article-10469-1.html">Chinese (中文)</a>.
---

<div class="hatnote">Translations:
<a href="https://linux.cn/article-10469-1.html">Chinese (中文)</a>.
</div>

You know those old “Hello world according to programmer skill” jokes that start
with `printf("hello, world\n")` for a junior programmer and end with some
convoluted Java OOP design pattern solution for senior software architect
@@ -2,14 +2,12 @@
layout: post
title: "Why isn't Amazon.com signing their emails?"
updated: 2019-03-19
hatnote: |
Discussions:
<a href="https://lobste.rs/s/1cxqho/why_is_no_one_signing_their_emails">Lobsters</a>,
<a href="https://news.ycombinator.com/item?id=19376323">Hacker News</a>.
---

<div class="hatnote">
Discussions:
<a href="https://lobste.rs/s/1cxqho/why_is_no_one_signing_their_emails">Lobsters</a>,
<a href="https://news.ycombinator.com/item?id=19376323">Hacker News</a>.
</div>

I received this email a while ago:

> Queensland University of Technology sent you an Amazon.com Gift Card!
@@ -1,13 +1,11 @@
---
layout: post
title: "Easy means easy to debug"
hatnote: |
Translations:
<a href="https://velog.io/@leejh3224/Easy-means-easy-to-debug">Korean (한국어)</a>.
---

<div class="hatnote">
Translations:
<a href="https://velog.io/@leejh3224/Easy-means-easy-to-debug">Korean (한국어)</a>.
</div>

<!--
<div class="hatnote">
Follow-up: <a href="/understandable.html">How to make code easier to understand</a>
@@ -1,13 +1,11 @@
---
layout: post
title: "Flags are great for configuration"
hatnote: |
Discussions:
<a href="https://lobste.rs/s/tm1vwk/flags_are_great_for_configuration">Lobsters</a>.
---

<div class="hatnote">
Discussions:
<a href="https://lobste.rs/s/tm1vwk/flags_are_great_for_configuration">Lobsters</a>.
</div>

I like to configure programs with commandline flags. Why include thousands of
lines of code to parse [confusing file formats][yaml] when you can just run
`prog -foo`? Want to support loading from environment variables? `prog -foo
@@ -20,21 +20,18 @@ <h1 id="writings">Writings</h1>

<h1 id="code">Code projects</h1>
<ul>
<li><a href="https://github.com/arp242/transip-dynamic/">transip-dynamic</a> – Dynamic DNS for TransIP.</li>
<li><a href="https://github.com/arp242/battray/">battray</a> – Battery status tray icon with scripting support.</li>
<li><a href="https://github.com/arp242/complete_email.vim/">complete_email.vim</a> – Completion of email addresses.</li>
<li><a href="https://github.com/arp242/download-npo/">download-npo</a> – Download episodes from npo.nl</li>
<li><a href="https://github.com/arp242/markdown-wiki/">markdown-wiki</a> – Simple wiki.</li>
<li><a href="https://github.com/arp242/nordavind/">nordavind</a> – Web based audio player.</li>
<li><a href="https://github.com/arp242/operapass/">operapass</a> – Read opera password files (a.k.a. &#34;the wand&#34;).</li>
<li><a href="https://github.com/arp242/password-bunny/">password-bunny</a> – Manage passwords with Vim.</li>
<li><a href="https://github.com/arp242/pkg_sanity/">pkg_sanity</a> – Some basic sanity checks for FreeBSD packages.</li>
<li><a href="https://github.com/arp242/powersearch.vim/">powersearch.vim</a> – Several search-related enhancements.</li>
<li><a href="https://github.com/arp242/robots/">robots</a> – Reproduction of the 1980 “classic” robots game.</li>
<li><a href="https://github.com/arp242/spamdb-curses/">spamdb-curses</a> – Curses interface for OpenBSD&#39;s <code>spamdb(8)</code>.</li>
</ul>

<h2 id="vim">Vim stuff</h2>
<ul>
<li><a href="https://github.com/arp242/complete_email.vim/">complete_email.vim</a> – Completion of email addresses.</li>
<li><a href="https://github.com/arp242/password-bunny/">password-bunny</a> – Manage passwords with Vim.</li>
<li><a href="https://github.com/arp242/powersearch.vim/">powersearch.vim</a> – Several search-related enhancements.</li>
<li><a href="https://github.com/arp242/transip-dynamic/">transip-dynamic</a> – Dynamic DNS for TransIP.</li>
</ul>
</div>

0 comments on commit eb0daef

Please sign in to comment.
You can’t perform that action at this time.