I'm a self-employed software tester.
I test and write software, listen to music and go hiking — sometimes simultaneously. Prior to this was a physicist and oceanographer, among other things.
For a workshop I will present at the Agile Testing Days 2022, I’ve set up a backup computer, in case folks don’t have Ruby installed on their machine already, or don’t get it installed within the available time slot.
The Raspberry itself had already worked … with some keyboard back in 2017 (when I used it in a ½ days tutorial at the same conference). But now, I connected a Mac keyboard to it, one with a German layout – including the umlauts. Getting the configuration to work well enough was surprisingly hard.
The existing keyboard configuration didn’t work very well, since it expected an international layout, meaning that the key cap labels weren’t always correct. Or the printed key wasn’t, depending on your perspective.
Setting it up using the GUI application that comes with RaspbianOS didn’t work so well either: for some configuration settings the keyboard stopped reacting completely. Yay! I learned another way how not do do it. 🤣
In the end I used the terminal raspi-config:
sudo raspi-config
to try all variations of (non-japanese) Apple keyboards with the corresponding German layouts and variants.
In the end I settled with this configuration, as it is stored in /etc/default/keyboard on the Raspi:
This is another entry in the ‘Note to Self’ category. 🙂 I’m sure I will need this information at some later point in time again.
The other day I wanted to have some code syntax-highlighted and be able to select the colour theme and well as use the highlighted listing in a number of ways.
Since Pygments is a library made for this task and it also provides a command line tool: pygmentize. It took me some time to use the tool the right way and produce the result I was looking for.
To show how I ended up using it, I’ll use fd as an example, a Ruby utility I wrote that dumps file contents as hex codes and utf-8 characters.
The command below is run inside a directory that contains a sub-folder ‘bin’, and inside that a (Ruby) file fd. To achieve this you can do the following (preferably when in a folder where you keep your cloned Git repositories):
full generates output that includes everything to display the colourised code. style=monokai sets the theme to ‘Monokai’. linenos=1 displays the line numbers in the output.
-o fd.html
Set the output file name.
-f html
Set the output format to HTML.
When generating HTML, the full seems to be particularly important, as otherwise the HTML won’t contain the CSS used to colour the code. The resulting highlighted code looks like this:
The pygmentized source code
In case you’d like to experiment with pygmentize, here’s some zsh code that prints a sorted list of the styles it knows about:
After a 10 year break I made it to an in-person Ruby conference again: Euruko 2022 in Helsinki. For travelling, I chose the Finnlines ferry from Travemünde to Helsinki. That’s travelling without a hurry, since each trip takes 30 hours. At the time of this writing, I’m sitting in the ship’s café looking out over the Baltic Sea into the sunshine, just south of Oland and slowly approaching and then passing Bornholm. There are worse places to write a post. 😁
Sunrise over the Baltic Sea Photo taken onboard the Finnmaid, while approaching the port of Vuosaari, Finland
Thankfully there’s a gym, a sauna (if a Finish line after all) and lots of nice places to take a seat watch the waves pass by. I even met the fist few other attendees on the ferry already!
Even before reaching Helsinki, Leo Kiisi one of the organisers, sent an invitation to join the sauna – including access to the open water. We met in the evening and had a great time as several attendees and a speaker joined. It was a fantastic way the end the first travel day, relaxing, refreshing and overall remarkable.
The opening Keynote was recorded and presented by Matz, and he busted several myths and claims that were made about Ruby. What surprised me most, is his take on type systems: He explained that (at least some) type systems are Turing compete. which means that the type system alone is already complex enough to encode any algorithm or program. 🤯 — Whether that’s desirable or not is another question. 😉
Wiktoria Dalach told us about how security aspects can be handled, by categorising the infinite space of possible issues into only thee categories:
Confidentiality: How to keep secrets secret
Integrity: How to be sure that we get what we expect
Availability: Ability to access our information always
What we’d need do do ourselves: Select the aspects from these categories that are most important to us — and them work on them.
Adarsh Pandit told us about ‘The Technical and Organizational Infrastructure of the Ruby Community’ – and drew parallels to the transportation infrastructure differences he found between California (where he lives) and Finland. I understood that the difference is mainly that in the US transportation seems to optimise the number of cars the system can handle, while in Finland it’s more the number of people and how they can get from A to B. We also learned how individuals (and companies) can support the Ruby community:
Contributing to the language implementation(s) and its libraries: The code is still being optimised, bugs a fixed etc. All think work needs to be done by someone. Thank someone could be you.
Support Ruby Central/Ruby Together with money: In the end services such as Rubygems (and its website & repositories), Bundler etc. require hardware to run on and that costs money. These projects are also improved and that involves investing time and/or money as well. BTW, you can support RubyTogether at https://rubytogether.org.
An amusing point Adarsh made: He said that Finland seems to have the happiest people and at the same time the angriest music. (Note: Finland has the highest number of mates rock bands per capita worldwide).
Vesa Vänskä explained how to move ‘From massive pull requests to trunk-based development with Ruby’ – and reminded us of Dr. Eliyahu Goldratt’s observation:
I say an hour lost at a bottleneck is an hour out of the entire system. I say an hour saved at a non-bottleneck is worthless. Bottlenecks govern both throughput and inventory.
Dr. Eliyahu Goldratt
Be sure to check out the talks on the conference site; I believe, at least some talks were recorded and will be available in the next few days. As always, I thoroughly enjoyed the conference days, meeting many new people, the great food at the lovely location.
I’m already looking forward to the next Ruby conference I’ll attend. It may be the next EURUKO and the community voted for Vilnius, Lithuania.
This is, again, is mostly a note to my future self. 🙂
Occasionally, I need to process a bunch of image files in a batch. Most often it’s about resizing them, so they fit into a given format of at most x ⨉ y pixels, or precisely into, say a square format. Here’s how I do it using ImageMagick and a bit of Ruby code:
Processing a single file
ImageMagick comes with convert (it’s linked to …/bin/magick on my machine), as command line tool for processing image files in a whole lot of ways. In order to resize a single file so that it ends up as a square image in a given number of pixels one can use the following on the command line (I use zsh on macOS):
convert input_file.jpg -resize 1200x1200 -background White -gravity center -extent 1200x1200 output_file.jpg
This command
reads ‘input_file.jpg’,
creates a new image with 1200⨉1200 pixels,
a white background,
resizes the input image as needed,
puts it in the center of the new image
and saves it as ‘output_file.jpg’.
Batch processing files
For this step, I use a Ruby script (of course this can also be done in zsh, bash, Python etc.):
images = Dir['file_pattern*.jpg']
images.each do |fn|
`convert #{fn} -resize 1200x1200 -background White -gravity center -extent 1200x1200 #{fn.gsub(/\./, '_res.')}`
end
Tip: Be sure to use different names for the input and output file names.
The other day a discussion about the review process of the Agile Testing Days developed:
Reading feedback on my conference proposal has been a rollercoaster. Up: They noticed that I had written "his" once instead of a gender neutral form – valid point, something I can improve. Down: It was a bloody typo and should have been "this" 😭 #SpeakerLife#AbstractsAreHard
— Tobias Geyer (he/him) (@the_qa_guy) May 19, 2022
Since I contributed to this thread and was a reviewer for this years programme, here’s my take. It’s my personal view and other reviewers may well have other aspects they focus on.
The conference offers a list of ‘hot topics’ which changes each year. If a proposal fits to this list it’s a plus, since this is a step towards a consistent conference programme.
I prefer proposals that catch my interest, without telling too much about the topic. – If a proposal already expels everything well, time may be better spent in another session.
A well written abstract text, that is easy to understand (for me) is a plus, too. This includes avoiding typos and grammatical mistakes. We all make them, and even the best spell checkers can’t catch all issues. But still, some proposals are really hard to understand due to language problems. Don’t let that get in your way of getting accepted. My tip: Get feedback by a native English speaker before (!) submitting. Many well known testers and speakers offer help and it is worthwhile accepting this help.
Understand what the fields in the proposal form are meant for. Fill them to provided the information that is asked for, Avoid repeating the same text in different parts for the form. Change the wording at least a bit. In some cases the title, sub headline, main statement and key learning(s) contained exactly the same or very similar text. To me as the reviewer this is a little bit boring, and doesn’t help me understand what the session is about.
Sometimes, repeating is worthwhile: It helps to understand what is important. Use this tool carefully.
Some questions may guide to writing a good proposal:
Will this help the reviewer to give me a high rating?
Am I giving enough information to inform a potential attendees decision to come to my session?
Am I giving too much information?
Is this a good fit for the conference this year?
A leaving personal note: It took me years to get accepted at the Agile Testing Days, even for what was then called a ‘consensus talk’. In the very early years the proposals weren’t very well written, in some years I failed to match the overall conference theme. And then it clicked, I asked for help, gave workshops, a tutorial and, in 2019 even a keynote. For me it was worth the effort.