The Problem With Bar Charts; tbsp; shfmt
There were some “AI” things I had planned for today (which was going to be a ThursdAI Drop), but I’m kind of AI’d out. So, here are three wholly unrelated resources that should mean there’s something for everyone.
In other news, Bridgy — the service that provides a messaging “bridge” between ActivityPub and ATProto (e.g., Mastodon and Bluesky) — just made it possible to put your webstite on Bluesky, provided it has a valid RSS feed. It even supports custom handles.
If you are a Bluesky user, you can now follow the Daily Drop there!
TL;DR
(This is an AI-generated summary of today’s Drop using Sonnet via Perplexity.)
Here’s a concise three-bullet summary of the blog post:
- “The Problem With Bar Charts”: Discusses limitations of bar charts, including oversimplification and inability to represent uncertainty. Suggests alternatives like error bars and violin plots, while offering guidance for proper bar chart use. [https://mcorrell.medium.com/the-problem-with-bar-charts-a5871b3b0f19]
tbsp: Introduces a domain-specific language for traversing and manipulating syntax trees generated by tree-sitter parsers. It offers an awk-inspired syntax for pattern matching and actions on structured code. [https://git.peppe.rs/languages/tbsp/about/]shfmt/sh: Presents a shell parser, formatter, and interpreter with bash support. The tool is particularly useful for formatting shell scripts, with plugins available for various editors and IDEs. [https://github.com/mvdan/sh]
The Problem With Bar Charts

Honestly — despite it being a Medium post — you should just tap away and read “The Problem With Bar Charts” by Michael Correll, but let me sum up some key points in the hopes you feel compelled to check out the whole thing (especially since it includes visual examples).
First up: whether it’s a sad thing or not, bar charts may be my fav/go-to vis, partly due to me primarily working with count and categorical data in my line of work. But, as we’ll see, they are far from the be-all-end-all of chart types.
Despite the popularity of bar charts, these vertical monoliths come with inherent limitations and potential pitfalls that data folks and datavis consumers should be aware of. The linked post explores the challenges associated with bar charts and suggests alternative approaches for more effective data representation.
Bar charts, while visually appealing and easy to understand, can often oversimplify complex datasets. They typically represent a single value for each category, which may not capture the full complexity or distribution of the underlying data. This simplification can lead to a loss of important nuances and potentially misleading interpretations.
What’s more, one of the significant drawbacks of bar charts is their inability to effectively represent uncertainty or variability in data. In many real-world scenarios, data points come with margins of error or confidence intervals. Standard bar charts struggle to convey this crucial information, potentially leading to overconfident interpretations of the data.
These charts are also inherently limited in the number of dimensions they can represent. While they excel at showing comparisons between categories, they struggle to display relationships between multiple variables simultaneously. This limitation can be particularly problematic when dealing with complex, multidimensional datasets common in fields like data science and cybersecurity.
To address the issue of representing uncertainty, alternatives like error bars or violin plots can be more informative. Error bars can show the range of possible values, while violin plots can display the full distribution of data points within each category. (I’d argue beeswarms are much better than violins, and even go so far as to suggest rainclouds are likely the best choice in many circumstances.)
Do not get me wrong, Correll does not suggest never using bar charts! In fact, he offers some guidance when using them:
- use zero baselines to avoid misrepresentation of differences
- clearly label axes and provide context for the data
- consider using color coding or patterns to convey additional information
- when possible, supplement bar charts with additional visualizations or statistical information
Def give the whole post a 👀.
tbsp

tbsp – tree-based source-processing language is a super cool domain-specific language that lets us write programs that traverse and manipulate syntax trees generated by tree-sitter parsers. It provides a familiar, awk-inspired syntax for defining patterns and actions, but applies these concepts to structured code rather than flat text.
Programs in tbsp consist of a series of “stanzas”, each containing a pattern and an associated block of code. These stanzas are executed as the parser traverses the syntax tree, with patterns matching specific node types or tree structures.
The core idioms are pretty straightforward:
- traverse trees: programs can respond to entering or leaving specific node types in the syntax tree
- match patterns: we can define patterns to match specific tree structures or node attributes
- manage sate: variables can be used to track state across the tree traversal
- munge text: the tool gives us full access to the underlying text of matched nodes
Unlike text-based tools, tbsp works directly with the structure of the code, reducing errors and improving accuracy; and, by leveraging tree-sitter parsers, tbsp can work with multiple programming languages.
From my personal vantage point, the spiffy awk-inspired syntax makes for very expressive and readable code. Plus, with tbsp, it’s possible to perform complex code analysis and transformation tasks with relatively little code.
Rather than steal the very accessible example markdown-to-html converter, I will heartily encourage y’all to visit the site.
I’m toying with it at work for use in analyzing/processing Suricata rules, and will see if we can open-source some of the tooling when done.
shfmt

shfmt/sh is a shell parser, formatter, and interpreter with bash support.
While I could go on, that’s literally what it is and what it does!
I suspect most readers would find the shfmt tool most useful, and many editors/IDEs have a shfmt plugin which everyone who deals with Bash/POSIX shells should consider using.
FIN
Remember, you can follow and interact with the full text of The Daily Drop’s free posts on Mastodon via @dailydrop.hrbrmstr.dev@dailydrop.hrbrmstr.dev
And, you can also follow the Drop on Bluesky via @dailydrop.hrbrmstr.dev@web.brid.gy ☮️
Leave a comment