Full Width [alt+shift+f] Shortcuts [alt+shift+k]
Sign Up [alt+shift+s] Log In [alt+shift+l]
43
I work in downtown Portland and see a lot of people getting parking tickets every day (parking is one of the reasons I ride my bike to work). I was curious to learn more about it. Thanks to the Freedom of Information Act, Portland parking ticket data is available to anyone who wants it. I decided to make a request to the city, and in a few short weeks, I had my hands on a collection of nearly 1 million recorded parking tickets issued over nearly the past 4 years (2015, 2016, 2017, 2018). The records are surprisingly complete. They contain GPS coordinates, street names, vehicle types, violation information and details of each violation. I was surprised to see that even license plates were included. I did some quick analysis of the data with pandas and I’ve reported my results below. Worst specific places for parking tickets Naito Parkway and SW 4th avenue downtown generate the most parking tickets which is not surprising. Streets Number of Tickets NW NAITO PKY and NW 9TH...
over a year ago

Improve your reading experience

Logged in users get linked directly to articles resulting in a better reading experience. Please login for free, it takes less than 1 minute.

More from Alex Meub

The Magic of Solving Problems with 3D Printing

3D Printing has allowed me to be creative in ways I never thought possible. It has allowed me to create products that provide real value, products that didn’t exist before I designed them. On top of that, it’s satisfied my desire to ship products, even if the end-user is just me. Another great thing is how quickly 3D printing provides value. If I see a problem, I can design and print a solution that works in just a few hours. Even if I’m the only one who benefits, that’s enough. But sharing these creations takes the experience even further. When I see others use or improve on something I’ve made, it makes the process feel so much more worthwhile. It gives me the same feeling of fulfillment when I ship software products at work. Before mass-market 3D printing, creators would need to navigate the complexity and high costs of mass-production methods (like injection molding) even to get a limited run of a niche product produced. With 3D printing, they can transfer the cost of production to others. Millions of people have access to good 3D printers now (at home, work, school, libraries, maker spaces), which means almost anyone can replicate a design. Having a universal format for sharing 3D designs dramatically lowers the effort that goes into sharing them. Creators can share their design as an STL file, which describes the surface geometry of their 3D object as thousands of little triangles. This “standard currency” of the 3D printing world is often all that is required to precisely replicate a design. This dramatically lowers the effort that goes into sharing printable designs. The widespread availability of 3D printers and the universal format for sharing 3D designs has allowed 3D-printed products to not only exist but thrive in maker communities. This is the magic of 3D printing: it empowers individuals to solve their own problems by designing solutions while enabling others to reproduce those designs at minimal cost and effort.

6 months ago 87 votes
Building the DataToaster 3000

Last summer, I was inspired by a computer that was built inside of a toaster that I saw at a local computer recycling store. The idea of a computer with the design of a home appliance was really appealing and so was the absurdity of it. It occurred to me that this would be a fun and creative way to integrate technology into my life. After thinking about it, I realized there’s also something visually appealing about how simple and utilitarian toasters are. I have major nostalgia for the famous After Dark screensaver and I think this is why. I knew now that I wanted to make my own attempt at a toaster/computer hybrid. I decided to do just that when I created the DataToaster 3000: a toaster NAS with two 3.5 inch hard disk docking stations built inside it. The hard disks can be easily swapped out (while powered off) without taking anything apart. It uses a Zimaboard x86-64 single board computer and even has a functional knob that controls the color of the power LED. I designed a fairly complex set of 3D-printed parts that attach to the base of the toaster and hold everything neatly in place. This allows it to be easily disassembled if I ever want to make any modifications and also hopefully makes the project easier to build for others. It’s a ridiculous thing but I really do love it. You can find the build guide on Instructables and the 3D models on Printables.

9 months ago 77 votes
Building a Removable Bike Basket for the Yepp Rack

I wanted to add more hauling capacity to my bike and was looking for something compatible with my Yepp rear rack. I also use my rack with a child seat (the Yepp Maxi) which has a mechanism that allows it to attach and detach easily without sacrificing safety. I was thinking it would be great to build a Yepp compatible rear basket that could I just as quickly attach/detach from my rack. I designed a removable Yepp-rack-compatible rear basket that consists of a milk crate, some plywood for stability and a 3D printed bracket threaded for M6 bolts which hold it all together. It can be attached and removed in seconds and is very secure. 3D Printed Mounting Bracket I modeled my mounting bracket after the one on the Yepp Maxi childseat. After a few iterations I was able to make it perfectly fit. I printed it in PETG filament so it was UV resistant and then installed threaded inserts for M6 bolts to attach it to the milk crate and my rear rack. 3D Print and Build Instructions You can find the 3D print on Printables and a full build guide on Instructables.

10 months ago 72 votes
The Yoto Mini is Perfect

The Yoto Mini is one of my favorite products. The team behind it deeply understands its users and put just the right set of features into a brilliantly designed package. I have no affiliation with Yoto, I’m just a happy customer with kids who love it. If you aren’t aware, Yoto is an audio platform for kids with what they call “screen-free” audio players (even though they have little pixel LED screens on them). The players are Wi-Fi enabled and support playing audio from credit card-sized NFC tags called Yoto cards. Yoto sells audio players and also licenses audio content and offers it on its platform as well. The cards themselves do not contain any audio data, just a unique ID of the audio content that is pulled from the cloud. After content is pulled on the first play, it is saved and played locally from the player after that. Yoto also supports playing podcasts and music stations without using cards. Their marketing puts a lot of emphasis on the platform being “ad-free” which is mostly true as there are never ads on Yoto cards or official Yoto podcasts. However, some of the other podcasts do advertise their content. So, what’s so great about the Yoto Mini? This concept isn’t new as there have been many examples of audio players for kids over the years. What sets it apart is how every detail of the hardware, mobile app, and exclusive content is meticulously designed and well executed. Yoto Mini Hardware The main input methods of the Yoto Mini are two orange knobs, turning the left knob controls volume and the right knob navigates chapters or tracks. Pressing the right knob instantly plays the Yoto Daily podcast and pressing it twice plays Yoto Radio (a kid-friendly music station). These actions are both configurable in the mobile app. The NFC reader slot accepts Yoto cards and instantly starts playing where you left off after you insert one. It has a high-quality speaker that can be surprisingly loud, an on/off button, a USB-C charging port, an audio output jack, and a small pixel display that shows images related to the audio content. The Yoto Mini is also surprisingly durable. My kids have dropped it many times on hard surfaces and it still basically looks as good as new. Yoto understands that the physical audio player itself is primarily used by younger kids and the design reflects this. My 3-year-old daughter was able to figure out how to turn it on/off, start listening to books using cards, and play the Yoto Daily podcast each morning which was empowering for her. This was her first technology product that she was fully capable of using without help from an adult. I can’t think of many other products that do this better. Yoto Mobile App The Yoto team understands that parents are users of this product too, mostly for managing the device and its content. Yoto has built a very good mobile experience that is tightly integrated with the hardware and provides all the features you’d want as a parent. From the app, you can start playing any of the content from cards you own on the player or your phone (nice if your kids lose a card), you can set volume limits for both night and day time, you can set alarms, and configure the shortcut buttons. You can record audio onto a blank Yoto card (which comes with the player) if your kid wants to create their own story, link it to their favorite podcast or favorite music. The app even lets you give each track custom pixel art that is displayed on the screen. Audio Content By far the most underrated feature is a daily podcast called Yoto Daily. This ad-free podcast is run by a charming British host and it is funny, entertaining, and educational. My kids (now 4 and 7) look forward to it every morning and the fact that it’s daily free content that is integrated directly into the Yoto hardware is amazing. To me, this is the killer feature, as my kids get to enjoy it every day and it’s always fresh and interesting. Yoto licenses content from child book authors, popular kid’s shows, movies, and music (recently the Beatles) which are made available in their store. I also discovered that Yoto does not seem to lock down its content with DRM. My son traded some Yoto cards with a friend and I assumed there would be some kind of transfer or de-registration process but to my surprise, they just worked without issue. Conclusion The Yoto Mini is a delightful product. The team behind it thought through every detail and made it an absolute joy to use both as a child and parent. I’m impressed at how well the Yoto team understands their users and prioritizes simplicity and ease of use above all else.

a year ago 64 votes
How To Quiet Down Your 3D Printer

When I first got my 3D printer, I built an enclosure to protect it from dust, maintain a consistent temperature, and minimize noise. I was surprised to find that the enclosure didn’t reduce noise that significantly. I then placed a patio paver under my printer, which made it noticeably quieter, but it was still audible from other rooms in my house. Recently, I found the most effective noise reduction solution: squash balls. These balls are designed with varying bounce levels, indicated by colored dots. The “double-yellow dot” balls have a very low bounce, making them ideal for dampening vibration, which is the primary cause of printer noise. I found an existing design for squash ball feet, printed it, and hot glued them evenly under my patio paver. My current setup includes the enclosure, patio paver, and squash balls under the paver. Now, the printer is so quiet that I actually can’t tell if it’s running, even when I’m in the same room. Occasionally, I will hear the stepper motors, but that’s rare. Most of the time I need to open the enclosure to make sure it’s still printing.

a year ago 34 votes

More in programming

Digital hygiene: Emails

Email is your most important online account, so keep it clean.

12 hours ago 4 votes
Building a container orchestrator

Kubernetes is not exactly the most fun piece of technology around. Learning it isn’t easy, and learning the surrounding ecosystem is even harder. Even those who have managed to tame it are still afraid of getting paged by an ETCD cluster corruption, a Kubelet certificate expiration, or the DNS breaking down (and somehow, it’s always the DNS). Samuel Sianipar If you’re like me, the thought of making your own orchestrator has crossed your mind a few times. The result would, of course, be a magical piece of technology that is both simple to learn and wouldn’t break down every weekend. Sadly, the task seems daunting. Kubernetes is a multi-million lines of code project which has been worked on for more than a decade. The good thing is someone wrote a book that can serve as a good starting point to explore the idea of building our own container orchestrator. This book is named “Build an Orchestrator in Go”, written by Tim Boring, published by Manning. The tasks The basic unit of our container orchestrator is called a “task”. A task represents a single container. It contains configuration data, like the container’s name, image and exposed ports. Most importantly, it indicates the container state, and so acts as a state machine. The state of a task can be Pending, Scheduled, Running, Completed or Failed. Each task will need to interact with a container runtime, through a client. In the book, we use Docker (aka Moby). The client will get its configuration from the task and then proceed to pull the image, create the container and start it. When it is time to finish the task, it will stop the container and remove it. The workers Above the task, we have workers. Each machine in the cluster runs a worker. Workers expose an API through which they receive commands. Those commands are added to a queue to be processed asynchronously. When the queue gets processed, the worker will start or stop tasks using the container client. In addition to exposing the ability to start and stop tasks, the worker must be able to list all the tasks running on it. This demands keeping a task database in the worker’s memory and updating it every time a task change’s state. The worker also needs to be able to provide information about its resources, like the available CPU and memory. The book suggests reading the /proc Linux file system using goprocinfo, but since I use a Mac, I used gopsutil. The manager On top of our cluster of workers, we have the manager. The manager also exposes an API, which allows us to start, stop, and list tasks on the cluster. Every time we want to create a new task, the manager will call a scheduler component. The scheduler has to list the workers that can accept more tasks, assign them a score by suitability and return the best one. When this is done, the manager will send the work to be done using the worker’s API. In the book, the author also suggests that the manager component should keep track of every tasks state by performing regular health checks. Health checks typically consist of querying an HTTP endpoint (i.e. /ready) and checking if it returns 200. In case a health check fails, the manager asks the worker to restart the task. I’m not sure if I agree with this idea. This could lead to the manager and worker having differing opinions about a task state. It will also cause scaling issues: the manager workload will have to grow linearly as we add tasks, and not just when we add workers. As far as I know, in Kubernetes, Kubelet (the equivalent of the worker here) is responsible for performing health checks. The CLI The last part of the project is to create a CLI to make sure our new orchestrator can be used without having to resort to firing up curl. The CLI needs to implement the following features: start a worker start a manager run a task in the cluster stop a task get the task status get the worker node status Using cobra makes this part fairly straightforward. It lets you create very modern feeling command-line apps, with properly formatted help commands and easy argument parsing. Once this is done, we almost have a fully functional orchestrator. We just need to add authentication. And maybe some kind of DaemonSet implementation would be nice. And a way to handle mounting volumes…

15 hours ago 2 votes
Bugs I fixed in SumatraPDF

Unexamined life is not worth living said Socrates. I don’t know about that but to become a better, faster, more productive programmer it pays to examine what makes you un-productive. Fixing bugs is one of those un-productive activities. You have to fix them but it would be even better if you didn’t write them in the first place. Therefore it’s good to reflect after fixing a bug. Why did the bug happen? Could I have done something to not write the bug in the first place? If I did write the bug, could I do something to diagnose or fix it faster? This seems like a great idea that I wasn’t doing. Until now. Here’s a random selection of bugs I found and fixed in SumatraPDF, with some reflections. SumatraPDF is a C++ win32 Windows app. It’s a small, fast, open-source, multi-format PDF/eBook/Comic Book reader. To keep the app small and fast I generally avoid using other people’s code. As a result most code is mine and most bugs are mine. Let’s reflect on those bugs. TabWidth doesn’t work A user reported that TabWidth advanced setting doesn’t work in 3.5.2 but worked in 3.4.6. I looked at the code and indeed: the setting was not used anywhere. The fix was to use it. Why did the bug happen? It was a refactoring. I heavily refactored tabs control. Somehow during the rewrite I forgot to use the advanced setting when creating the new tabs control, even though I did write the code to support it in the control. I guess you could call it sloppiness. How could I not write the bug? I could review the changes more carefully. There’s no-one else working on this project so there’s no one else to do additional code reviews. I typically do a code review by myself with webdiff but let’s face it: reviewing changes right after writing them is the worst possible time. I’m biased to think that the code I just wrote is correct and I’m often mentally exhausted. Maybe I should adopt a process when I review changes made yesterday with fresh, un-tired eyes? How could I detect the bug earlier?. 3.5.2 release happened over a year ago. Could I have found it sooner? I knew I was refactoring tabs code. I knew I have a setting for changing the look of tabs. If I connected the dots at the time, I could have tested if the setting still works. I don’t make releases too often. I could do more testing before each release and at the very least verify all advanced settings work as expected. The real problem In retrospect, I shouldn’t have implemented that feature at all. I like Sumatra’s customizability and I think it’s non-trivial contributor to it’s popularity but it took over a year for someone to notice and report that particular bug. It’s clear it’s not a frequently used feature. I implemented it because someone asked and it was easy. I should have said no to that particular request. Fix printing crash by correctly ref-counting engine Bugs can crash your program. Users rarely report crashes even though I did put effort into making it easy. When I a crash happens I have a crash handler that saves the diagnostic info to a file and I show a message box asking users to report the crash and with a press of a button I launch a notepad with diagnostic info and a browser with a page describing how to submit that as a GitHub issue. The other button is to ignore my pleas for help. Most users overwhelmingly choose to ignore. I know that because I also have crash reporting system that sends me a crash report. I get thousands of crash reports for every crash reported by the user. Therefore I’m convinced that the single most impactful thing for making software that doesn’t crash is to have a crash reporting system, look at the crashes and fix them. This is not a perfect system because all I have is a call stack of crashed thread, info about the computer and very limited logs. Nevertheless, sometimes all it takes is a look at the crash call stack and inspection of the code. I saw a crash in printing code which I fixed after some code inspection. The clue was that I was accessing a seemingly destroyed instance of Engine. That was easy to diagnose because I just refactored the code to add ref-counting to Engine so it was easy to connect the dots. I’m not a fan of ref-counting. It’s easy to mess up ref-counting (add too many refs, which leads to memory leaks or too many releases which leads to premature destruction). I’ve seen codebases where developers were crazy in love with ref-counting: every little thing, even objects with obvious lifetimes. In contrast,, that was the first ref-counted object in over 100k loc of SumatraPDF code. It was necessary in this case because I would potentially hand off the object to a printing thread so its lifetime could outlast the lifetime of the window for which it was created. How could I not write the bug? It’s another case of sloppiness but I don’t feel bad. I think the bug existed there before the refactoring and this is the hard part about programming: complex interactions between distant, in space and time, parts of the program. Again, more time spent reviewing the change could have prevented it. As a bonus, I managed to simplify the logic a bit. Writing software is an incremental process. I could feel bad about not writing the perfect code from the beginning but I choose to enjoy the process of finding and implementing improvements. Making the code and the program better over time. Tracking down a chm thumbnail crash Not all crashes can be fixed given information in crash report. I saw a report with crash related to creating a thumbnail crash. I couldn’t figure out why it crashes but I could add more logging to help figure out the issue if it happens again. If it doesn’t happen again, then I win. If it does happen again, I will have more context in the log to help me figure out the issue. Update: I did fix the crash. Fix crash when viewing favorites menu A user reported a crash. I was able to reproduce the crash and fix it. This is the bast case scenario: a bug report with instructions to reproduce a crash. If I can reproduce the crash when running debug build under the debugger, it’s typically very easy to figure out the problem and fix it. In this case I’ve recently implemented an improved version of StrVec (vector of strings) class. It had a compatibility bug compared to previous implementation in that StrVec::InsertAt(0) into an empty vector would crash. Arguably it’s not a correct usage but existing code used it so I’ve added support to InsertAt() at the end of vector. How could I not write the bug? I should have written a unit test (which I did in the fix). I don’t blindly advocate unit tests. Writing tests has a productivity cost but for such low-level, relatively tricky code, unit tests are good. I don’t feel too bad about it. I did write lots of tests for StrVec and arguably this particular usage of InsertAt() was borderline correct so it didn’t occur to me to test that condition. Use after free I saw a crash in crash reports, close to DeleteThumbnailForFile(). I looked at the code: if (!fs->favorites->IsEmpty()) { // only hide documents with favorites gFileHistory.MarkFileInexistent(fs->filePath, true); } else { gFileHistory.Remove(fs); DeleteDisplayState(fs); } DeleteThumbnailForFile(fs->filePath); I immediately spotted suspicious part: we call DeleteDisplayState(fs) and then might use fs->filePath. I looked at DeleteDisplayState and it does, in fact, deletes fs and all its data, including filePath. So we use freed data in a classic use after free bug. The fix was simple: make a copy of fs->filePath before calling DeleteDisplayState and use that. How could I not write the bug? Same story: be more careful when reviewing the changes, test the changes more. If I fail that, crash reporting saves my ass. The bug didn’t last more than a few days and affected only one user. I immediately fixed it and published an update. Summary of being more productive and writing bug free software If many people use your software, a crash reporting system is a must. Crashes happen and few of them are reported by users. Code reviews can catch bugs but they are also costly and reviewing your own code right after you write it is not a good time. You’re tired and biased to think your code is correct. Maybe reviewing the code a day after, with fresh eyes, would be better. I don’t know, I haven’t tried it.

22 hours ago 1 votes
An Analysis of Links From The White House’s “Wire” Website

A little while back I heard about the White House launching their version of a Drudge Report style website called White House Wire. According to Axios, a White House official said the site’s purpose was to serve as “a place for supporters of the president’s agenda to get the real news all in one place”. So a link blog, if you will. As a self-professed connoisseur of websites and link blogs, this got me thinking: “I wonder what kind of links they’re considering as ‘real news’ and what they’re linking to?” So I decided to do quick analysis using Quadratic, a programmable spreadsheet where you can write code and return values to a 2d interface of rows and columns. I wrote some JavaScript to: Fetch the HTML page at whitehouse.gov/wire Parse it with cheerio Select all the external links on the page Return a list of links and their headline text In a few minutes I had a quick analysis of what kind of links were on the page: This immediately sparked my curiosity to know more about the meta information around the links, like: If you grouped all the links together, which sites get linked to the most? What kind of interesting data could you pull from the headlines they’re writing, like the most frequently used words? What if you did this analysis, but with snapshots of the website over time (rather than just the current moment)? So I got to building. Quadratic today doesn’t yet have the ability for your spreadsheet to run in the background on a schedule and append data. So I had to look elsewhere for a little extra functionality. My mind went to val.town which lets you write little scripts that can 1) run on a schedule (cron), 2) store information (blobs), and 3) retrieve stored information via their API. After a quick read of their docs, I figured out how to write a little script that’ll run once a day, scrape the site, and save the resulting HTML page in their key/value storage. From there, I was back to Quadratic writing code to talk to val.town’s API and retrieve my HTML, parse it, and turn it into good, structured data. There were some things I had to do, like: Fine-tune how I select all the editorial links on the page from the source HTML (I didn’t want, for example, to include external links to the White House’s social pages which appear on every page). This required a little finessing, but I eventually got a collection of links that corresponded to what I was seeing on the page. Parse the links and pull out the top-level domains so I could group links by domain occurrence. Create charts and graphs to visualize the structured data I had created. Selfish plug: Quadratic made this all super easy, as I could program in JavaScript and use third-party tools like tldts to do the analysis, all while visualizing my output on a 2d grid in real-time which made for a super fast feedback loop! Once I got all that done, I just had to sit back and wait for the HTML snapshots to begin accumulating! It’s been about a month and a half since I started this and I have about fifty days worth of data. The results? Here’s the top 10 domains that the White House Wire links to (by occurrence), from May 8 to June 24, 2025: youtube.com (133) foxnews.com (72) thepostmillennial.com (67) foxbusiness.com (66) breitbart.com (64) x.com (63) reuters.com (51) truthsocial.com (48) nypost.com (47) dailywire.com (36) From the links, here’s a word cloud of the most commonly recurring words in the link headlines: “trump” (343) “president” (145) “us” (134) “big” (131) “bill” (127) “beautiful” (113) “trumps” (92) “one” (72) “million” (57) “house” (56) The data and these graphs are all in my spreadsheet, so I can open it up whenever I want to see the latest data and re-run my script to pull the latest from val.town. In response to the new data that comes in, the spreadsheet automatically parses it, turn it into links, and updates the graphs. Cool! If you want to check out the spreadsheet — sorry! My API key for val.town is in it (“secrets management” is on the roadmap). But I created a duplicate where I inlined the data from the API (rather than the code which dynamically pulls it) which you can check out here at your convenience. Email · Mastodon · Bluesky

yesterday 2 votes
AmigaGuide Reference Library

As I slowly but surely work towards the next release of my setcmd project for the Amiga (see the 68k branch for the gory details and my total noob-like C flailing around), I’ve made heavy use of documentation in the AmigaGuide format. Despite it’s age, it’s a great Amiga-native format and there’s a wealth of great information out there for things like the C API, as well as language guides and tutorials for tools like the Installer utility - and the AmigaGuide markup syntax itself. The only snag is, I had to have access to an Amiga (real or emulated), or install one of the various viewer programs on my laptops. Because like many, I spend a lot of time in a web browser and occasionally want to check something on my mobile phone, this is less than convenient. Fortunately, there’s a great AmigaGuideJS online viewer which renders AmigaGuide format documents using Javascript. I’ve started building up a collection of useful developer guides and other files in my own reference library so that I can access this documentation whenever I’m not at my Amiga or am coding in my “modern” dev environment. It’s really just for my own personal use, but I’ll be adding to it whenever I come across a useful piece of documentation so I hope it’s of some use to others as well! And on a related note, I now have a “unified” code-base so that SetCmd now builds and runs on 68k-based OS 3.x systems as well as OS 4.x PPC systems like my X5000. I need to: Tidy up my code and fix all the “TODO” stuff Update the Installer to run on OS 3.x systems Update the documentation Build a new package and upload to Aminet/OS4Depot Hopefully I’ll get that done in the next month or so. With the pressures of work and family life (and my other hobbies), progress has been a lot slower these last few years but I’m still really enjoying working on Amiga code and it’s great to have a fun personal project that’s there for me whenever I want to hack away at something for the sheer hell of it. I’ve learned a lot along the way and the AmigaOS is still an absolute joy to develop for. I even brought my X5000 to the most recent Kickstart Amiga User Group BBQ/meetup and had a fun day working on the code with fellow Amigans and enjoying some classic gaming & demos - there was also a MorphOS machine there, which I think will be my next target as the codebase is slowly becoming more portable. Just got to find some room in the “retro cave” now… This stuff is addictive :)

yesterday 4 votes