This is a valid Atom 1.0 feed.
This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.
help]
[<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xml:base="http://reinout.vanrees.org/" xml:lang="en">
<link rel="self"
href="http://reinout.vanrees.org/weblog/atom.xml" />
<link href="http://reinout.vanrees.org/weblog/"
rel="alternate" type="text/html" />
<div xmlns="http://www.w3.org/1999/xhtml">
<a href="http://www.atomenabled.org/feedvalidator/check.cgi?url=http%3A%2F%2Freinout.vanrees.org%2Fweblog%2Fatom.xml">
<img title="Validate my Atom feed" width="88"
height="31"
src="http://www.atomenabled.org/feedvalidator/images/valid-atom.png"
alt="[Valid Atom]" border="0px" />
</a>
<p>
<span>
This is an Atom formatted XML site feed. It is intended to be viewed in
a Newsreader or syndicated to another site. Please visit
</span>
<a href="http://www.atomenabled.org/">Atom Enabled</a>
<span>
for more info.
</span>
</p>
</div>
<title type="html">Reinout van Rees' weblog</title>
<subtitle>Python, grok, books, history, faith, etc.</subtitle>
<updated>2009-04-04T21:44:00+01:00</updated>
<id>urn:syndication:a55644db8591c020bd38852775819a9a</id>
<entry>
<title>My article in the German "ADJ" magazine</title>
<link rel="alternate" type="text/html"
href="http://reinout.vanrees.org/weblog/2025/06/19/anlagen-design-journal.html" />
<id>http://reinout.vanrees.org/weblog/2025/06/19/anlagen-design-journal.html</id>
<author>
<name>Reinout van Rees</name>
</author>
<published>2025-06-19T00:00:00+01:00</published>
<updated>2025-06-19T21:39:00+01:00</updated>
<category term="eifelburgenbahn" />
<category term="trains" />
<content type="html"><![CDATA[
<div class="document">
<p>I've got a realistic German model railway in my attic and I tend to take that realism
seriously. So I spend a lot of time researching things like proper signalling and
operation. For mainline operations, you can find a lot of information on
signalling. Everything is by the book. But for simple single track branch lines, things
get harder to figure out.</p>
<p>How do things work when there are no electrical block systems between the stations and
all you have is a telephone line? And what if the station isn't even manned? No signals?
Anyway, it has been fun trying to figure it out. I've <a class="reference external" href="https://youtu.be/MhYT2wxuXKc">made a 45 minute video explaining it</a> in the context of one of my two stations.</p>
<p>And... I've re-worked the video into a proper article for the German <a class="reference external" href="https://www.jaffas-moba-shop.de/anlagen-design-journal/">Anlagen Design
Journal</a>, the <a class="reference external" href="https://www.jaffas-moba-shop.de/anlagen-design-journal/adj-17-juli-2025/">#17 issue</a>.</p>
<img alt="https://up.picr.de/49746695jo.jpeg" src="https://up.picr.de/49746695jo.jpeg" />
<p>On five pages, I'm allowed to explain the German <strong>theory</strong> and the (mostly cheap)
<strong>practical solutions</strong> I used for my "Eifelburgenbahn" layout.</p>
<p>Note: I also really like the rest of this issue, it is one of the best in the series. If
you can read German and like model railways, you might want to snag a copy for just €8
as an <a class="reference external" href="https://www.jaffas-moba-shop.de/buecher/">"Einzelheftbestellung" directly from the small publisher</a> (Tip, #6 has my other big article: a good
summary of my layout.)</p>
</div>
]]>
</content>
</entry>
<entry>
<title>iSAQB meetup: software architecture decision making in practice</title>
<link rel="alternate" type="text/html"
href="http://reinout.vanrees.org/weblog/2025/06/13/software-architecture.html" />
<id>http://reinout.vanrees.org/weblog/2025/06/13/software-architecture.html</id>
<author>
<name>Reinout van Rees</name>
</author>
<published>2025-06-13T00:00:00+01:00</published>
<updated>2025-06-13T08:23:00+01:00</updated>
<category term="python" />
<content type="html"><![CDATA[
<div class="document">
<p>I attended <a class="reference external" href="https://www.meetup.com/isaqb-nl/events/307920595/">a meetup</a> of the <a class="reference external" href="https://www.meetup.com/isaqb-nl/">Dutch
iSAQB community</a> in Utrecht (NL). The location was
in the old industrial buildings of the former <a class="reference external" href="https://en.wikipedia.org/wiki/Werkspoor">werkspoor</a> train manufacturer, something I personally
like :-)</p>
<p>(At least three people asked me during dinner whether there were any Dutch <strong>python</strong>
meetups, so I'll post the three active ones that I know of here for ease of finding
them: <a class="reference external" href="https://www.meetup.com/pyutrecht/">Utrecht</a>, <a class="reference external" href="https://www.meetup.com/python-leiden-user-group/">Leiden</a> and <a class="reference external" href="https://www.meetup.com/pyamsterdam/">Amsterdam</a>. And don't forget the two one-day conferences,
<a class="reference external" href="https://pygrunn.org/">PyGrunn (Groningen)</a> and <a class="reference external" href="https://pycon-nl.org/">pycon NL (Utrecht)</a>.)</p>
<div class="section" id="making-significant-software-architecture-decisions-bert-jan-schrijver">
<h1>Making significant software architecture decisions - Bert Jan Schrijver</h1>
<p>Software architecture. <em>What is software?</em> Algorithms, code-that-works,
the-part-you-cannot-kick. And <em>what is software architecture?</em> The part that is
expensive to change, the structure of the system, best practices. The <strong>decisions</strong> that
are important and hard and expensive to change. Software architecture is about
<strong>making decisions</strong>. Decisions that hurt when you get them wrong.</p>
<p>There are bad reasons for architecture decisions:</p>
<ul class="simple">
<li>We've always done it like this.</li>
<li>We don't want to depend on XYZ.</li>
<li>We need to be future-proof. (You often get elaborate complex systems with this
reasoning. Isn't a simple solution more changeable and future-proof?)</li>
<li>Because the product owner wants it.</li>
<li>Because the architect wants it. (If the architect wants something without real
feedback from the team that has to build it.)</li>
</ul>
<p>Some input you can use for architecture decisions:</p>
<ul class="simple">
<li>5xW. Why, why, why, why, why. After asking "why" five times, you really get to the
core.</li>
<li>Every architecture decision <strong>should have a business component</strong>. (Don't pick a fancy
framework when there's no business need.)</li>
<li>Requirements.</li>
<li>Constraints.</li>
</ul>
<p>You also have to look at quality. <a class="reference external" href="https://www.iso25000.com/images/figures/iso_25010_en.png">ISO 25010</a> is a great
checklist for software quality: self-descriptiveness, availability, recoverability,
capacity, integrity, modifiability, testability, etc.</p>
<p>The perfect architecture doesn't exist, there are always trade-offs. Trade-off analysis
can help you. Gather requirements, figure out quality attributes and constraints, select
potential solutions, discover/weigh trade-offs, pick the best fitting solution. You can look at the book <a class="reference external" href="https://www.oreilly.com/library/view/fundamentals-of-software/9781492043447/">fundamentals
of software architecture</a>.</p>
<p>An example? Security versus usability: 2FA is great for security, but a pain to
use. Availability versus costs: more redundancy and more servers also mean it costs
more. He recommends <a class="reference external" href="https://www.youtube.com/watch?v=uQ_sSC9gAsU">this video</a>.</p>
<p>Something to keep in mind: <strong>organisational factors</strong>. What is the developer experience
for your idea? The learning curve? IDE support? Does it integrate with the current
landscape? How popular is it in the industry as a whole? What is the long-term
viability? Will it still be actively developed and is there a community?</p>
<p>And there are business factors. Support. Labour pool. License costs. What are the
<em>costs</em> of migration versus the <em>benefits</em> after migration? Productivity. Is there an
exit strategy if you want to move away from a provider or technology?</p>
<p>Some trade-offs shouldn't even need to be considered. For instance when something risks
irreversible damage to your business.</p>
</div>
<div class="section" id="creating-effective-and-objective-architectural-decision-records-adrs-piet-van-dongen">
<h1>Creating effective and objective architectural decision records (ADRs) - Piet van Dongen</h1>
<p>Nothing is static. People change jobs, business goals change, budgets change, etc. Time
goes on and during this time you are making decisions. When a new colleague joins, is it
clear which decisions have been made beforehand? Are decisions <strong>discoverable</strong>? And can
the decisions be explained? Are they <strong>appropriate</strong>?</p>
<p>He asked "did you ever disagree with a decision that involved you?". Almost all hands
went up. Bad decisions might have been made in the past because better solutions weren't
known or available at the time. Or there was time pressure. Unclarity on the
requirements. All reasons for decisions to be bad.</p>
<p>Decisions should be made when you really <strong>understand</strong> the context, which should be
clear. And the decision should be <strong>objective</strong> and logical and clear and
well-explained. And they should be made by the right stakeholders: was it a <strong>shared</strong>
decision?</p>
<p>Note: architecture work isn't only done by official architects.</p>
<p>Some archetypes of wrong decision-making:</p>
<ul class="simple">
<li>Aristocrats. A decision made by a small group of self-appointed experts. Ivory
tower. They only explain why their decision is perfect, but they don't concern
themselves with trade-offs.</li>
<li>Unobtainium. A theoretically perfect decision, but that totally isn't implementable.</li>
<li>Ivory tower dump. Even more ivory tower than the <em>aristocrats</em>. Totally no input from
the team.</li>
<li>Pros and cons. Endless lists of pros and cons.</li>
<li>Polder model. Consensus-based. A decision made by a huge group. Endless meetings.</li>
</ul>
<p>Now... <strong>how to make decisions in the right way?</strong> ADRs, Architecture Decision
Records. A structured/standardised document that documents the decision. Structure? For
instance:</p>
<ul>
<li><p class="first">Title + state + summary. Handy for easy scanning. State is something like "decided" or
"rejected".</p>
</li>
<li><p class="first">Stakeholders. Names plus the roles they had when the decision was made. Find
stakeholders by looking with a 2x2 matrix: high/low power, high/low interest. A boss
might be high power, low interest: keep him appropriately informed. High power, high
interest: really involve them.</p>
</li>
<li><p class="first">Context of the decision. Clear and sharp. What is in scope, what not?</p>
</li>
<li><p class="first">Requirements. It is easy to come up with 1000 requirements. Stick to what is
significant. What is significant? Requirements with high risk. Huge interest to
high-power stakeholders. Hard-to-change items. The fewer requirements, the sharper the
decision.</p>
</li>
<li><p class="first">Options. Nicely listed and scored. On requirements. And just don't give scores, but
weigh them by the importance of the requirements. This also helps in understanding the
decision afterwards.</p>
<p>Options should be distinct. Don't pick very similar solutions. You should have
something to choose. And drop options that you know are never going to satisfy the
requirements, this clears up clutter.</p>
<p>But... watch out for tweaking the weights to get to the desired decision...</p>
</li>
<li><p class="first">Decision. The logical conclusion.</p>
</li>
</ul>
<p>In case the decision turned out to be wrong, you now have a nice document and you can
re-evaluate it. Perhaps you missed a stakeholder? Perhaps a requirement was missed? Or a
weight should be changed? You can then make a 2.0 of the ADR. You learned from your
mistakes.</p>
</div>
</div>
]]>
</content>
</entry>
<entry>
<title>Pygrunn keynote: Homo ludens, python and play - Daniele Procida</title>
<link rel="alternate" type="text/html"
href="http://reinout.vanrees.org/weblog/2025/05/16/6-keynote-homo-ludens.html" />
<id>http://reinout.vanrees.org/weblog/2025/05/16/6-keynote-homo-ludens.html</id>
<author>
<name>Reinout van Rees</name>
</author>
<published>2025-05-16T00:00:00+01:00</published>
<updated>2025-05-16T14:58:00+01:00</updated>
<category term="pygrunn" />
<category term="python" />
<content type="html"><![CDATA[
<div class="document">
<p>(One of <a class="reference external" href="https://reinout.vanrees.org/weblog/tags/pygrunn.html">my summaries</a> of the 2025
<a class="reference external" href="https://pygrunn.org/">pygrunn conference</a> in Groningen, NL).</p>
<p>Organizing a conference is a weird mix between it-is-not-my-job and
it-is-a-lot-of-real-work.</p>
<p>When <a class="reference external" href="https://vurt.org/">Daniele Procida</a> learned python 16 years ago, he was often
told that learning python is fun! And it is easy! Often when people say it is fun and
easy, that you should be suspicious.</p>
<p>It actually wasn't fun. There was lots of satisfaction, though. Solving problems is
nice. He didn't want to have fun and he didn't want to be a great programmer: He just
wanted to solve problems!</p>
<p>Fun, playful... Python early on had a bit of playfulness. Named after Monty Python, an
old BBC comedic television series. Nowadays most people haven't seen Monty Python on
television and actually discover it through the programming language. How does an
Indonesian teenager react to the unknown Monty Python jokes?</p>
<p>Same with python-the-snakes. Lots of book with snakes on the cover. Some playful, some
aggressive. Some with dripping venom (that doesn't fit with a constricting type of
snake...). But try talking about "python" in African countries where Pythons actually
are a menace...</p>
<p>His definition of humor: the surprising violation of an expectation of congruity. A
momentary re-ordering of the world. It gives us a surprising delight.</p>
<p>Python itself is full of expectations that can be violated... He was originally baffled
by the term "pythonic": he was just wondering whether his code worked or not, he didn't
expect his code to be judged on some fit-in-with-the-locals quality like "pythonic".</p>
<p>An exception means you need a rule. A holiday is something different than regular
days. A "holiday from the rule". The special depends on the normal. Fun is a "holiday
from seriousness". Then: how can "fun" be made the expectation? A constant low-level fun
is not funny.</p>
<p>Johan Huizinga wrote "homo ludens" in 1938. Homo ludens, the playing man. <a class="reference external" href="https://en.wikipedia.org/wiki/Homo_Ludens">See wikipedia</a>. He says that play is the primary
pre-condition of culture. But how? According to Daniele's examples, the holiday can't
come before the work. You need to have an exception when there's a normal. God rested on
the seventh day, but that only could be rest because he actually worked for six days.</p>
<p>Culture? Players on a stage. Which has rules. A courtroom can be a sort of playground. A
kids' playground has some boundaries. Could there be something to Huizinga's argument?</p>
<p>At work, you can receive clear outcomes: recognition, rewards. The same system offers
penalties. Work is a relatively clear system. A framework of rewards, value,
etc. Daniele likes his work (he works for canonical/ubuntu). He's allowed to collaborate
a lot.</p>
<p>What can compete with that? In the weekend or the evenings? Often what you do is
unclearer. When is it finished? When did you do a good job? To do something at home, he
has to get tools out of the garage and he has to clean up afterwards: just grabbing a
laptop at work is much easier. Grabbing his guitar takes more work. And nobody thanks
him for playing on it. <em>It can be too much work even to take a holiday from work. To
play.</em></p>
<p>Easy-to-start-with work with good feedback is always easily available...</p>
<p>There's an <strong>asymmetry</strong> of performance, failure and accountability. At work, you can
get negative feedback. At home, what are they going to do? Sack him? No. Why are people
talking about gamifying work? They should be talking about "workifying"! That's more
attractive!</p>
<p>Open source: is it work or a labour of love? What about people pestering an open source
project with unwanted contributions? The dance between maintainer and contributor. What
when a state actor manages to get a malicious patch into a central piece of open source
software (like what happened last year)?</p>
<p>Does this have to do with the difference between work and play? Could open source
software benefit by some explicit rules, some explicit expectations? Social
expectations?</p>
<img alt="https://reinout.vanrees.org/images/2025/pygrunn-6.jpeg" src="https://reinout.vanrees.org/images/2025/pygrunn-6.jpeg" />
<p><em>Photo explanation: picture from our Harz (DE) holiday in 2023</em></p>
</div>
]]>
</content>
</entry>
<entry>
<title>Pygrunn: python on a tractor - Wieneke Keller, Sebastian Lenartowicz</title>
<link rel="alternate" type="text/html"
href="http://reinout.vanrees.org/weblog/2025/05/16/5-python-on-a-tractor.html" />
<id>http://reinout.vanrees.org/weblog/2025/05/16/5-python-on-a-tractor.html</id>
<author>
<name>Reinout van Rees</name>
</author>
<published>2025-05-16T00:00:00+01:00</published>
<updated>2025-05-16T13:30:00+01:00</updated>
<category term="pygrunn" />
<category term="python" />
<content type="html"><![CDATA[
<div class="document">
<p>(One of <a class="reference external" href="https://reinout.vanrees.org/weblog/tags/pygrunn.html">my summaries</a> of the 2025
<a class="reference external" href="https://pygrunn.org/">pygrunn conference</a> in Groningen, NL).</p>
<p>How to become an apple farmer in 5 minutes:</p>
<ul class="simple">
<li>You want mid-size apples, as they fetch the best price.</li>
<li>You want blossom on your tree, but not too much. Otherwise the tree has to divide its
water and nourishment over more apples, which makes them smaller...</li>
</ul>
<p>They work at <a class="reference external" href="https://aureaimaging.com/">aurea imaging</a>, maker of "treescout". The
treescout is a device/camera on top of a tractor that drives along the apple trees in an
orchard. The device detects the tree, blossoms and other attributes of the tree. The
first use case: <strong>blossom thinning</strong> to aim at the right size of apples. Blossom
thinning happens with a sprayer. The blossom blossoms for just two or three weeks.</p>
<p>The first season they tried their project was <em>educational</em>. Lots or problems :-) GPS
tracks that were not straight. Detected trees were not in the right location. Etcetera.</p>
<p>Some of the challenges:</p>
<ul class="simple">
<li>It is on a vehicle, so limited power.</li>
<li>It is on a farm, so very limited or no connectivity.</li>
<li>Agricultural standards are actually from the maritime industry. GPS that is accurate
within a few meters is fine, there. But not detailed enough for locating trees...</li>
<li>They were a software company, so they had to use off-the-shelf components.</li>
</ul>
<p>The first blossom season, their architecture looked like this:</p>
<ul class="simple">
<li>Python monolith with multiprocessing.</li>
<li>Restarting upon failure was hard due to them using unix pipes for inter-process
communication.</li>
<li>Poor separation of responsibilities.</li>
</ul>
<p>The second blossom season they changed several things.</p>
<ul class="simple">
<li>They used k3s (a lightweight kubernetes).</li>
<li>A single-node k3s cluster sitting on top of a tractor.</li>
<li>K3s is responsible for the runtime environment and workload management.</li>
<li>Rabbitmq for inter-process communication.</li>
<li>A Kubernetes cluster really helps with rolling out quick updates.</li>
</ul>
<p>A problem they noticed is python's concurrency problem. There are some central
components that are a bottleneck.</p>
<p>What they're working on:</p>
<ul class="simple">
<li>ArgoCD, open cluster management, kairos ("in-place os updates"), embedded
linux. They're close to fully-automatic remote upgrades.</li>
<li>More flexible hardware setup.</li>
<li>Machine learning and insights on tree level. BIG amount of data for an eight-man dev
team...</li>
<li>Increasing the number of customers.</li>
</ul>
<img alt="https://reinout.vanrees.org/images/2025/pygrunn-5.jpeg" src="https://reinout.vanrees.org/images/2025/pygrunn-5.jpeg" />
<p><em>Photo explanation: picture from our Harz (DE) holiday in 2023</em></p>
</div>
]]>
</content>
</entry>
<entry>
<title>Pygrunn: cloud native geospatial formats for field boundaries - Ivor Bosloper</title>
<link rel="alternate" type="text/html"
href="http://reinout.vanrees.org/weblog/2025/05/16/4-cloud-native-geospatial.html" />
<id>http://reinout.vanrees.org/weblog/2025/05/16/4-cloud-native-geospatial.html</id>
<author>
<name>Reinout van Rees</name>
</author>
<published>2025-05-16T00:00:00+01:00</published>
<updated>2025-05-16T11:57:00+01:00</updated>
<category term="pygrunn" />
<category term="python" />
<content type="html"><![CDATA[
<div class="document">
<p>(One of <a class="reference external" href="https://reinout.vanrees.org/weblog/tags/pygrunn.html">my summaries</a> of the 2025
<a class="reference external" href="https://pygrunn.org/">pygrunn conference</a> in Groningen, NL).</p>
<p>Cloud native geospatial file formats:</p>
<ul class="simple">
<li>Geospatial data: you have <em>raster</em> data (= images) and <em>vector</em> data. And point data.</li>
<li>Raster data: geotiff, png, jpg. Vector: (shapefiles), gpkg, geoparquet. Points: gpkg,
geoparquet.</li>
</ul>
<p>Cloud native? Let's look at geotiff for instance. Just the old .tiff format, so a raster
of pixels with some metadata. A geotiff has metadata like extent, projection, etc. There
is a cloud native variant, <em>cloud optimized geotiff</em>.</p>
<ul class="simple">
<li>You have tiles, so the big image is subdivided into tiles for easier/cheaper/faster
loading.</li>
<li>There are also multiple versions of the image at various "zoom levels".</li>
<li>The metadata is always at a fixed place in the file, right at the front or at the
back.</li>
</ul>
<p>Such a cloud optimized format means that it is optimized for remote geospatial access
patterns. The way it happens is with "http range requests". After reading the metadata
for the file, the algorithm knows which parts of the big file to request from the server
with such a http range request.</p>
<p>He wanted to do the same for vector data. An approach is <strong>GeoParquet</strong>. Parquet is a
bit of a "csv format", simplified. For speed reasons it is subdivided in blocks. In the
geospatial version, the blocks have an extent. (An extent is the min/max boundary around
the data, btw).</p>
<p><strong>Before</strong> cloud native geospatial formats, you really needed to have s special server
program to host them, like geoserver. Geoserver is nice, but it is also a huge java
program with loads of options. (And most people forget to properly secure it...)</p>
<p>What you can do <strong>now</strong> is that you can just store your cloud-native geopspatial file
online in for instance s3. As long as it supports http range requests, you're set. The
big advantage is that there are good specifications and lots of implementations.</p>
<p>He's now working on <a class="reference external" href="https://fiboa.org/">FIBOA</a>: FIeld BOundaries for Agriculture. An
open source and open data project. There <em>are</em> many open data portals with agricultural
field boundaries. But all of them have different formats. FIBOA wants to unify all that.
See <a class="reference external" href="https://github.com/fiboa/specification">https://github.com/fiboa/specification</a></p>
<p>For converting the current local data to their format, they used lots of python and
(geo)pandas. They're trying to generalize the python+geopandas+extract+export process,
as it seems handy for lots of other use cases: <a class="reference external" href="https://github.com/vecorel/">https://github.com/vecorel/</a></p>
<img alt="https://reinout.vanrees.org/images/2025/pygrunn-4.jpeg" src="https://reinout.vanrees.org/images/2025/pygrunn-4.jpeg" />
<p><em>Photo explanation: picture from our Harz (DE) holiday in 2023</em></p>
</div>
]]>
</content>
</entry>
<entry>
<title>Pygrunn: django template LSP, smarter completion for django templates - Kees Hink</title>
<link rel="alternate" type="text/html"
href="http://reinout.vanrees.org/weblog/2025/05/16/3-django-template-lsp.html" />
<id>http://reinout.vanrees.org/weblog/2025/05/16/3-django-template-lsp.html</id>
<author>
<name>Reinout van Rees</name>
</author>
<published>2025-05-16T00:00:00+01:00</published>
<updated>2025-06-13T20:38:00+01:00</updated>
<category term="pygrunn" />
<category term="python" />
<category term="django" />
<content type="html"><![CDATA[
<div class="document">
<p>(One of <a class="reference external" href="https://reinout.vanrees.org/weblog/tags/pygrunn.html">my summaries</a> of the 2025
<a class="reference external" href="https://pygrunn.org/">pygrunn conference</a> in Groningen, NL).</p>
<p>Kees (sorry, I was accidentally typed 'Henk' here, see <a class="reference external" href="https://www.fourdigits.nl/blog/pygrunn-2025/">this page</a>) works at <a class="reference external" href="https://www.fourdigits.nl">four digits</a>, a long-time django shop.</p>
<p>He had a poll at the start about peoples' favourite editor. The top three: pycharm 38%,
vscode 37%, neovim 11%. (Bugger, my favourite, emacs, is not in the top three).</p>
<p>Code completion is nice. Modern editors are real handy for this with good support for
django and python. But... for django templates, it is missing. No auto-completion for
<tt class="docutils literal">{% bl</tt> to <tt class="docutils literal">{% block</tt>. And also no knowledge of the available variables and
attributes.</p>
<p><strong>Pycharm</strong> is an exception, it has django language support and completion for the standard
django template tags and also auto-complete in case you have class-based views.</p>
<p>He showed us <em>django template LSP</em>: <a class="reference external" href="https://github.com/fourdigits/django-template-lsp">https://github.com/fourdigits/django-template-lsp</a>,
wich implements similar functionality for most other editors.</p>
<ul class="simple">
<li>It also picks up custom template tags.</li>
<li>Docker support! It can find your template tags and code inside a docker image.</li>
<li>When something is not picked up, you can add a comment with a type hint.</li>
<li>You can install it from vscode, the name is <tt class="docutils literal">djlsp</tt>.</li>
</ul>
<p>You can build such a LSP, Language Server Protocol, yourself. LSP allows a client (your
IDE) to interface with the language server. "A document is opened", "I'm on line x,
character y, is there a hint here?".</p>
<p>They have a script called <tt class="docutils literal"><span class="pre">django-collector.py</span></tt> that is run with your project's python
(with a fallback). It statically analyses your code and returns json for use by the rest
of the LSP mechanism.</p>
<p>There's an alternative, <a class="reference external" href="https://djls.joshthomas.dev/">django language server</a>,
started a while after they themselves started their LSP. Written in rust. But there's
not a lot of functionality yet.</p>
<p>Django template LSP is open source, it is in their github repo. They're using it a lot
internally. If you have ideas and pull requests: welcome!</p>
<img alt="https://reinout.vanrees.org/images/2025/pygrunn-3.jpeg" src="https://reinout.vanrees.org/images/2025/pygrunn-3.jpeg" />
<p><em>Photo explanation: picture from our Harz (DE) holiday in 2023</em></p>
</div>
]]>
</content>
</entry>
<entry>
<title>Pygrunn: team alignment, enterprise design power - Edzo A. Botjes</title>
<link rel="alternate" type="text/html"
href="http://reinout.vanrees.org/weblog/2025/05/16/2-team-alignment.html" />
<id>http://reinout.vanrees.org/weblog/2025/05/16/2-team-alignment.html</id>
<author>
<name>Reinout van Rees</name>
</author>
<published>2025-05-16T00:00:00+01:00</published>
<updated>2025-05-16T09:37:00+01:00</updated>
<category term="pygrunn" />
<category term="python" />
<content type="html"><![CDATA[
<div class="document">
<p>(One of <a class="reference external" href="https://reinout.vanrees.org/weblog/tags/pygrunn.html">my summaries</a> of the 2025
<a class="reference external" href="https://pygrunn.org/">pygrunn conference</a> in Groningen, NL).</p>
<p>He helps startups to design their business. He's got more info at
<a class="reference external" href="https://www.edzob.com/page/enterprise/">https://www.edzob.com/page/enterprise/</a> , an "enterprise design cheat sheet". He was a
consultant for a long time and started noticing patterns. He's now in education/research
and he's focused on culture.</p>
<p>According to Osterwalder, success = value proposition + uniqueness + business model +
timing + team alignment. In Edzo's experience, the <em>team alignment</em> is often a core problem.</p>
<p>As a person, you have a skill set (behaviour and capabilities). As a team, you have a
collective toolset: (structure, processes, data and tech). Those two are the <em>tangible</em>
stuff. <em>Intangible</em> is your mindset (attitude and motivation) as a person, and the
culture as a team.</p>
<p>UX is a social contract between an app and the user. There's a social contract behind
the interactions within the company. A culture. How do you want to collaborate? How you
collaborate defines what you're going to be building. Conway's law. (He mentioned his
talk of last year about this subject).</p>
<p>His wife did a PhD about the meaning behind fairy tales. For him, as a technical person,
the idea of having multiple meanings of the same physical text was initially hard. What
do words mean? What is their purpose? Having good conversations about the terms and
words used in, for instance, your business model/motivition canvas is a good
idea. Communication is key.</p>
<p>There was a lot more in his presentation, as it was intended as a fast-paced talk. Lots
of way to look at your business or product. But in the end, <strong>team alignment</strong> could
well be key. Optimizing your team members. Organizing them well. Collaboration?
Facilitating? Key: have conversations. "Invest in beer and <em>bitterballen</em>, not in
courses".</p>
<p>And: you should always be looking at <em>what can I destroy</em>. What in your company can be
stopped, removed, destroyed? You need that to change and improve.</p>
<p>His <a class="reference external" href="tps://docs.google.com/presentation/d/1vlpNUSn54sU3JxIlzk-XGXlpt24HeE7hcPRZD0mF0xY/mobilepresent#slide=id.g35997d474e0_0_17">slides are online</a>
with lots of extra links and background information.</p>
<img alt="https://reinout.vanrees.org/images/2025/pygrunn-2.jpeg" src="https://reinout.vanrees.org/images/2025/pygrunn-2.jpeg" />
<p><em>Photo explanation: picture from our Harz (DE) holiday in 2023</em></p>
</div>
]]>
</content>
</entry>
<entry>
<title>Pygrunn: how to solve a python mystery - Aivars Kalvāns</title>
<link rel="alternate" type="text/html"
href="http://reinout.vanrees.org/weblog/2025/05/16/1-solve-python-mystery.html" />
<id>http://reinout.vanrees.org/weblog/2025/05/16/1-solve-python-mystery.html</id>
<author>
<name>Reinout van Rees</name>
</author>
<published>2025-05-16T00:00:00+01:00</published>
<updated>2025-05-16T08:51:00+01:00</updated>
<category term="pygrunn" />
<category term="python" />
<content type="html"><![CDATA[
<div class="document">
<p>(One of <a class="reference external" href="https://reinout.vanrees.org/weblog/tags/pygrunn.html">my summaries</a> of the 2025
<a class="reference external" href="https://pygrunn.org/">pygrunn conference</a> in Groningen, NL).</p>
<p><a class="reference external" href="https://aivarsk.com">Aivars</a> pointed at <a class="reference external" href="https://www.brendangregg.com/linuxperf.html">https://www.brendangregg.com/linuxperf.html</a>
as a good overview of linux tools</p>
<p>A good start is the <a class="reference external" href="https://linux.die.net/man/5/proc">/proc filesystem</a>, you can use
it to gather information on processes, for instance to grab the environment used by a
process:</p>
<pre class="literal-block">
$ cat /proc/1234455/environ || tr '\0' '\n'
</pre>
<p>The files/sockets used by a specific process:</p>
<pre class="literal-block">
$ ls /proc/12345/fd/*
</pre>
<p>You might have an unfindable file that takes up lots of space (like a logfile that has
been deleted from a directory, but that is still open in some program). The command
above will have <tt class="docutils literal">(deleted)</tt> next to deleted files, so you can search for that string
in the output to find the process that still has such a big file open.</p>
<p>Another handy tool: <strong>strace</strong>, it traces linux system kernel calls. You don't even need
root access if you just want to trace your <em>own</em> processes. An example command:</p>
<pre class="literal-block">
$ strace -f -ttt -o output.txt -s 1024 -p <PID>
$ strace -f -ttt -o output.txt -s 1024 -p your-new-process.sh
</pre>
<p>If your code does a system call ("read something from somewhere"), strace prints both
the start and the end of the call. So you can find out exactly where something is
blocking in case of an error. He mentioned <a class="reference external" href="https://filippo.io/linux-syscall-table/">https://filippo.io/linux-syscall-table/</a> as a
good overview of the available system calls you might see in the output.</p>
<p>Disk IO problems? Try <tt class="docutils literal">iostat <span class="pre">-x</span></tt> to see where the IO is happening. When testing disk
throughput, don't just test huge blobs of data, but make sure to use the actual block
size (often 4k or 8k).</p>
<p>When debugging network access, you often use ping or traceroute. But both use protocols
(ICMP and UDP) that are often blocked by network admins. He suggests <tt class="docutils literal">tcptraceroute</tt>
which uses TCP and often gives a better view of reality.</p>
<p>With network problems, <tt class="docutils literal">TCP_NODELAY</tt> is a possible cause. See
<a class="reference external" href="https://brooker.co.za/blog/2024/05/09/nagle.html">https://brooker.co.za/blog/2024/05/09/nagle.html</a> for more information. Read this
especially when you see the magic number <tt class="docutils literal">40ms</tt> in your logs, or only get 25
transactions per second.</p>
<p>Tip: set timeouts for everything. The defaults are often a cause for hanging.</p>
<img alt="https://reinout.vanrees.org/images/2025/pygrunn-1.jpeg" src="https://reinout.vanrees.org/images/2025/pygrunn-1.jpeg" />
<p><em>Photo explanation: picture from our Harz (DE) holiday in 2023</em></p>
</div>
]]>
</content>
</entry>
<entry>
<title>Pycon.de: streamlit app optimization in AWS - Darya Petrashka</title>
<link rel="alternate" type="text/html"
href="http://reinout.vanrees.org/weblog/2025/04/25/5-streamlit-optimization.html" />
<id>http://reinout.vanrees.org/weblog/2025/04/25/5-streamlit-optimization.html</id>
<author>
<name>Reinout van Rees</name>
</author>
<published>2025-04-25T00:00:00+01:00</published>
<updated>2025-04-25T12:22:00+01:00</updated>
<category term="pycon" />
<category term="python" />
<content type="html"><![CDATA[
<div class="document">
<p>(One of <a class="reference external" href="https://reinout.vanrees.org/weblog/tags/pycon.html">my summaries</a> of the 2025
<a class="reference external" href="https://2025.pycon.de/">pycon.de conference</a> in Darmstadt, DE).</p>
<p>Full title: you don’t think about your streamlit app optimization until you try to
deploy it to AWS</p>
<p><a class="reference external" href="https://streamlit.io/">Streamlit</a> is a quick way to show your models/data to
stakeholders.</p>
<p>She once made a streamlit <a class="reference external" href="https://github.com/dashapetr/kana--streamlit-app">app to exercise writing Japanese characters</a>. It used some character recognition
model. But... the way streamlit works, it normally downloads the model every single
time. For some local testing, it is probably OK, but if you put it in production... In
production, network traffic might cost money.</p>
<p>Solution? You can cache it with streamlit, but you can also download it when building
the docker image and store it inside the image and load it from there.</p>
<p>On to authentication. You can handle everything yourself as data scientist: login
widget, auth logic, user privs, etc. You can also use an external provider like Amazon
Cognito. Then you only have to hook up cognito in your code, but the OPS engineer has to
set up cognito for you.</p>
<p>On to security. For all of them you'll need the OPS engineer, probably.</p>
<ul class="simple">
<li>Set up https with Route 53 and TLS certificates.</li>
<li>Configure CloudFront to protect against DDoS attacks and improve performance.</li>
<li>Use AWS web application firewall to block malicious traffic.</li>
</ul>
<p>On to credential storage. You can use AWS secret manager instead of putting <tt class="docutils literal">API_KEY =
"1234abcd"</tt> right in your code. Using the secret manager is much more secure and that
will make your OPS engineer happy.</p>
<img alt="https://reinout.vanrees.org/images/2025/pycon-35.jpeg" src="https://reinout.vanrees.org/images/2025/pycon-35.jpeg" />
<p><em>Photo explanation: random picture from Darmstadt (DE)</em></p>
</div>
]]>
</content>
</entry>
<entry>
<title>Pycon.de: community building and task automation - Cosima Meyer</title>
<link rel="alternate" type="text/html"
href="http://reinout.vanrees.org/weblog/2025/04/25/4-automate-community.html" />
<id>http://reinout.vanrees.org/weblog/2025/04/25/4-automate-community.html</id>
<author>
<name>Reinout van Rees</name>
</author>
<published>2025-04-25T00:00:00+01:00</published>
<updated>2025-04-25T09:58:00+01:00</updated>
<category term="pycon" />
<category term="python" />
<content type="html"><![CDATA[
<div class="document">
<p>(One of <a class="reference external" href="https://reinout.vanrees.org/weblog/tags/pycon.html">my summaries</a> of the 2025
<a class="reference external" href="https://2025.pycon.de/">pycon.de conference</a> in Darmstadt, DE).</p>
<p>Full title: code & community: the synergy of community building and task automation</p>
<p>Cosima organizes PyLadies and R-Ladies events.</p>
<p>Visibility is important. You have to be visible to be noticed. Time is also important:
you have to put in work to create good content. But you also want to have time for other
things. So she thought about creating an "automated megaphone" to help her and other
PyLadies members be more visible.</p>
<p>She created the <a class="reference external" href="https://bsky.app/profile/pyladies-bot.bsky.social">pyladies bot</a> on
bluesky and mastodon. It regularly shares portraits of "amazing women in tech". And it
reposts messages when tagged or mentioned. It also monitors blogs and posts about
them. See <a class="reference external" href="https://github.com/cosimameyer/awesome-pyladies-blogs">https://github.com/cosimameyer/awesome-pyladies-blogs</a></p>
<p>The bot runs as a github action "cron job".</p>
<p>She started using google's "gemini" LLM to create short summaries of the blog posts to
make it more likely for people to click on it. She picked a cheap, small model as that
was good enough. In addition she does an extra automated check on harassment, dangerous
content, etc.</p>
<p>Lessons learned:</p>
<ul class="simple">
<li>You can use powerfull LLMs to enhance your applications.</li>
<li>Integrating modern LLMs is straightforward and easy.</li>
<li>No need to go all the way to the cloud, you can just use the models via an API.</li>
<li>It is cost-effective for smasll projects and/or developers.</li>
</ul>
<img alt="https://reinout.vanrees.org/images/2025/pycon-34.jpeg" src="https://reinout.vanrees.org/images/2025/pycon-34.jpeg" />
<p><em>Photo explanation: random picture from Darmstadt (DE)</em></p>
</div>
]]>
</content>
</entry>
</feed>
If you would like to create a banner that links to this page (i.e. this validation result), do the following:
Download the "valid Atom 1.0" banner.
Upload the image to your own server. (This step is important. Please do not link directly to the image on this server.)
Add this HTML to your page (change the image src
attribute if necessary):
If you would like to create a text link instead, here is the URL you can use:
http://www.feedvalidator.org/check.cgi?url=http%3A//reinout.vanrees.org/weblog/atom.xml