My name is Mark, and I am a software developer who has become increasingly skeptical of complexity and
digital culture over the years. With this site, I am trying to share some of my thoughts and let off some steam when
modern technology blows up in my face again.
I have many interests and opinions on lots of things, including animals, cooking, music, movies, sciences etc., so
I will probably also pay attention to these niches from time to time.
Recent posts
-
A lot happened in my personal life in the past few months, just not what I wanted to happen. Not long after my first
post, a neighbor “encouraged” me to move out. This resulted in a lot of paperwork, stress, moving costs, and frayed
nerves; it wasn’t until mid or late December that I was more or less back on track again.
My backlog is packed, but I only have time to work my way through it bit by bit. Since nobody reads this blog, it
shouldn’t be a big deal.
-
Some of you may be familiar with the problem of binding string values, such as those from a POST request or URL query
parameter in the form of url.Values and there are some (good) libraries that have been developed specifically for this
purpose, for example the quite popular go-playground/form package.
My problem with such libraries is that they are usually based on reflection – which
can be slow and is generally unpopular for good reasons – and that you need to have a little secret esoteric knowledge
in your head to avoid mishandling niche cases or, if necessary, write your own handlers to convert data to the correct
data type. It is also not convenient to validate the data, so you first convert the incoming data into a DTO and then
check it using a separate validator.