Ask HN: What was an interesting project you started and finished over a weekend?

172 points by nishithfolly ↗ HN
What have been those small, satisfying projects you started on a Friday evening, and by Sunday, you had something cool or useful (or both!) to show for your efforts?

Was it a simple app that solved a daily annoyance, some fun IoT experiment, or some non-tech hack that made your life easier?

241 comments

[ 2.3 ms ] story [ 264 ms ] thread
A media list. It is just a list of movies and mp3s with their metadata (id3 tags) and hash values. The output is just a html table that allows sorting and filtering with a hyperlink to play the media in the browser. Convenient for playing home media on the phone.
I did something similar, with a Play button that calls a PHP script that tells a Kodi instance to play the media, using JSON-RPC: https://kodi.wiki/view/JSON-RPC_API
This weekend I mostly upgraded it to play the mp3 files using the HTML audio tag, which provides both a player and playlist in HTML form. This is the only rational way I have found to play MP3 files on my IPhone. Before coming to this conclusion I tried the following:

* MP3 player apps from the app store suck. Most of them want up charge on everything or expect to stream music from some external source. I only found one that allowed accessing files by directory, as opposed to manually picking files one by one. WTF, I have over 4000 files.

* I tried writing a dynamic play list in HTML format using the input type files with the webkitdirectory attribute. Despite webkit in the name its not allowed in iOS.

* I couldn't just create a play list file and access it from SMB share. IPhone does support SMB file shares with a file preview feature, but that file preview feature does not execute JavaScript.

So instead I am running an SMB server which contains my media files, a web server which contains a symlink to the media files, and a pihole DNS server to create vanity local domains. The least level of restriction occurs when running in a web browser, under a domain accessed via DNS, with a prior formulated list of music. That domain can be a vanity domain name as the browser cannot tell the difference. That way the file list and html file are relative to each other under the same domain (which passes the audioContext security check in the browser), not downloaded to the phone, and still playable without Apple phone restrictions.

I installed a vpn on my AppleTV and couldn’t tell if it was actually working/secure. So I created my first ever swift app, for TVOS (AppleTV).

The app checks if your vpn is active, and tells you your public ip and geo location on a map (also deployed a small service on fly.io to ping/detect this).

Using copilot/chatgtp it was a doddle.

Of course Apple refused to put it in the App Store because it doesn’t have enough features. Even though adding unnecessary bloat to the app would be against their own design philosophy.

Threw together a toothbrush timer for my kids. Just used the svelte repl:

https://svelte.dev/repl/5a7f676868044bbba2ff3c7a64062066?ver...

On mobile you’ll need to kit the “output” button

You should probably set the language of the SpeechSynthesis to english, currently the browser seems to use the system language which leads to bad output with the english text.
I had no idea that was even an option. Thanks for the heads up!
Made a simple arithmetic drill generator for my youngest, who was struggling at the time. It had a bit of record keeping about it which encouraged a bit of competition and made it interesting to her and her friends.
A game that was a spin on the air hockey game that exist in arcade halls. I called it wind hockey [1]. The idea was also inspired by Avatar the Last Airbender.

I am not sure if I have the code anymore. I do vaguely remember that I have the executable somewhere. It was made with Unity3D and took around 40 hours

[1] https://m.youtube.com/watch?v=qTIZ-_UFXqQ&t=1s

At work, most of our deployment pipelines are something along the lines of "get some credentials, call a remote API and wait for it to say it's done". Occasionally, they also have "download this large binary from S3 and upload it somewhere else". Because these are in our CI, they are blocking steps that consume our builder resources.

We use Buildkite, so I changed their agent to run as lambda function, and used their eventbridge integration to trigger the lambdas. We saved about 15% of our CI costs by not using our 32 core build machines to call ecs wait-services, and freed up said machines to be able to run more often.

I created a website about dynamic energy pricing in about 8 hours. It ranked no. 1 quickly in my country and the only thing I’ve done since is update my comparison table and I’ve added affiliate links.
I needed to test the impact of a product we were developing on the air temperature distribution of a room (it really is warmer at the ceiling) so over the course of a weekend I strung up 27 OneWire temperature sensors in 9 strings of 3 from the ceiling of my living room and wrote a script running on an mBed microcontroller (like an Arduino) that would poll the OneWire bus every 30 seconds and send the responses back to my laptop which would then record the data in a CSV for me to graph once the test was done. This also required me to make a OneWire library from the OneWire spec as back then there was no public implementation for running on an mBed.

This test data formed the backbone of that company for the better part of a decade as it clearly showed when our product was running the temperature at the ceiling (across the whole room) reduced by 2degC and at the mid point of the room (head when sat in a sofa height) it rose by 2degC.

Our product acted as a destratifier and the test rig to prove it took me from Friday evening to Sunday night to make as I was working elsewhere at the time.

That's a cool idea, I guess it was maybe ds18b20 you used?

I'm curious if a very low resolution thermal imager such as Grideye could act in a similar fashion if you scanned the room using servos (https://www.adafruit.com/product/3538 is an example of a breakout board). Not sure of the accuracy though of such sensors for measuring temperature.

Edit: Just noticed they have "an accuracy of +- 2.5°C" so not good enough I guess, whereas ds18b20 claims 0.5C.

> ds18b20

Yes that's the one. I couldn't remember/be bothered to check

Thermal camera would only work if there was a surface to get the temperature of, we needed to know the temperature of the air in the middle of the room rather than the walls etc.

We did think about hanging ping pong balls on string like the sensors I hung but then yes, accuracy becomes an issue compared to the ds18b20.

Also this was in 2011 so I don't think we had the same variety of embedded device compatible stuff available and a proper thermal camera was out of our budget.

Fun side note, I brought the test rig back to life a few months ago for fun, found the OneWire lib code I wrote, copied into the Arduino project (mBed was long gone) and it worked with about 2 minutes of tweaking. That's 13 year old code up and running like no time had passed ... I can't even imagine the pain of bringing back a 13 year old web project!

https://github.com/turol/valoserveri

It's for controlling DMX colored lights over network. It takes UDP packets (and later Websocket messages) and turns them into DMX protocol packets which get sent over USB serial adapter to the DMX wire. It's a rewrite of a previous node.js version which had bitrotted.

I think I made the MVP in about 7 hours during one saturday afternoon. Finishing it up took a few weeks more of evenings.

  // put some magic into packet
Ha, great.
This looks really interesting and I use DMX lighting.
I wrote an asteroids clone on the Pico8 fantasy console. I was surprised how fast it was to get a playable game up and running with it.
I built a command line bookmark manager in Fish and FZF that stores data in Xata, which I then pull into my website as well. Source and demo available on Github from the article below.

https://www.davesnider.com/posts/bookmarks

I slapped together a little shareable sprint calendar tool, since I was constantly finding myself having to click too many times in other tools to get what should be a simple at-a-glance overview. I now use it almost every day, during team or stakeholder chats at work.

My team runs with: https://sprintcalendar.com/3-week-sprints/start-2020-12-03/r...

I've only tweaked it a bit since then, after sharing it and getting some feedback from others who found it useful.

I wonder what it is with calendars.

This weekend I went looking for calendar widgets and after trying approximately 5 I couldn't find any where the UI felt intuitive.

I made my own instead. Maybe I'll strip out the internal stuff and share it and it can be yet another unintuitive calendar widget for the next person.

It was called "Take Me Warmer." Basically, you entered in your ZIP code and a desired temperature, and it told you the closest ZIP whose forecasted high for the day was at least that temperature.

So, if you were in NYC in January and wanted to find out the closest location that was at least 72 degrees, it would spit out locations that met that criteria.

(There was also a companion app, "Take Me Cooler," that did the reverse.)

Required a one-time download of ZIP/coordinate data and daily downloads from a weather API. Figured out how to calculate the distances, and most of the rest was just stitching it all together.

I'm a meteorologist. Feel like sharing?
The sands of time have not been good to my poor Facebook app.
When I was looking for a new tech job, I got sick of trying to figure out which Leetcode Pattern I was gonna practice so I just threw all of them on a list and gave me one a day.

The reason it only gives you one random thing a day is cause I didn’t wanna try “re-roll” the pattern I was gonna practice to give me something easier.

https://www.pickoneatrandom.com/

One that springs to mind is one I "started" on Friday, but other people finished on Saturday[1].

Started in quotes because my contribution was combining an existing project that was about to fail due to capacity issues with the infinite botnet of AWS spot instances and the power of Hacker News.

It's more than a decade ago now, but I think it's a good example of a project with a simple goal that enabled people to get involved and feel like they were doing something useful.

1: http://rossduggan.ie/blog/code/archiveteam-yahoo-messages-fo...

Game jams, when I was younger and had the energy to do a long weekend of coding after a week of work.

Ludum Dare was particularly good fun in its early years (early-mid 2000s), when it was a fairly small community, when people were coding from-scratch, before Unity became an option and the event grew into something a lot bigger.

Game jam coding is different to 'real' game dev, as the time pressure encurages you to just hack away freely and creatively, not spend too much time thinking about building reusable systems or tools, and you can discard the codebase at the end of the weekend.

These days, small functional 3D printing projects can be quite satisfying. Going from a sketch to a simple CAD model to a first draft print, iterating the design a couple of times, and ending up with a simple-but-useful physical object, learning a bit more Fusion 360 in the process.

I had a good run doing LD in the 2010s. Half of all entries were unity last time I was in. The others were mostly unreal or something else. I don't think godot was big yet

I remember the big SPA rework of the website that seemed like overkill. Then a couple people bitched me out for preparing base code, so I stopped. How dare I try to get myself halfway to where the unity devs started, I guess.

I've not cleaned it up enough to push yet, but I packaged up an open source image recognition model (https://github.com/mnahkies/recognize-anything-api) and then wrote a script to crawl my photo library, run inference over each image and then write the results into the tag tables of digikams sqlite database (https://www.digikam.org/)

One thing I was fairly proud of was how scrappy the script was - I wrote it in typescript for the familiarity with the sqlite driver, but I used find and curl to actually do the crawling and API submission.

Is it hard to do that in pure typescript/node? No, but I was in a "how can I validate if this is even an interesting thing to be doing mode" and execing out to these tools was a way to get there slightly faster.

I've found that this attitude has been a great way to make weekend projects more fun and feel less like work.

Getting to some kind of tangible value sooner has also made easier to not lose interest halfway through and has been yielding me more semi-complete weekend projects (the word semi is doing a lot of work here tbf, but it's all relative)

Making a fake AirPrint printer.

I have a Brother printer that has two printer trays, one manual tray (that takes variable sized paper) and a A4 tray. However, when printing from iOS, it doesn't have the full print preset dialog and it is impossible to print from the manual tray, nor is there a way to tell it I want print A6. Of course I insist being able to print A6 whenever, wherever I want with AirPrint and accept no substitute.

So I started with the Bonjour printing spec (https://developer.apple.com/bonjour/printing-specification/b...), and dns-sd on macbook to figure out how AirPrint actually discovers printer and what makes it tick. The entire thing is built on mDNS which is basically DNS instead of using a DNS resolver, it sends the query via multicast DNS. If someone on the network wants to find an AirPrint printer, then it queries via mDNS _ipp._tcp.

e.g. $ dns-sd -Z _ipp._tcp With shows the PTR, SRV and TXT records. The TXT records are based on the Bonjour Printing Spec which list out which fields so it knows the type of the printer and driver to use and it uses the SRV port to find the ipp port so it can contact the printer.

Further investigation using rvictl (iOS packet sniffing) showed the IPP traffic, which is really http API. It is via this API that iOS determines what paper is supported from what tray.

The path is then clear: create my own mDNS service that returns a printer on my own port, this IPP port acts as a reverse proxy to the real printer's IPP port, but it modifies the "media-col-ready" attribute to make iOS think A6 is loaded into the manual try.

It was extremely painful, but it was done.

There were many pitfalls along the way:

* iOS expecting the mDNS to resolve in a certain way, which Hashicorp's library didn't support, this necessitated forking the library and fixing the resolver.

* iOS expecting not only _ipp._tcp but also requiring _universal._sub. (https://support.apple.com/en-us/guide/deployment/dep3b4cf515...) in mDNS, which further complicated the implementation and took time to figure out how it worked. Needed to test with `dns-sd -Z _ipp._tcp,universal`

* iOS detecting the printer via mDNS but when clicking on it, it says it's not available. It is because it insists that ipp has to be on port 631, and refuses to accept (unlike MacOS) ipp on any other port

How did you solve that last (expected port) problem?

(I've run up against that elsewhere, and couldn't get over the hump for iOS.)

You can run in a container with bridged networking so it gets its own IP from your lan.
http://github.com/piku/piku was by far my best example of such a thing. I was fed up with how hard it was to deploy and iterate applications quickly, and the first version was done in a weekend.

In short, it's a minimal Heroku clone that started out as ~500 lines of Python run by a custom SSH config.

It has paid for itself several times over, and is still something I use daily (it runs all my little API endpoints, Node-RED instances, Python services, you name it.

This looks great!
Small browser and Linux desktop extension to open links on the current virtual desktop. https://github.com/Janhouse/tab-in-workspace

It's a small quality of life improvement but I wonder why this does not exist out of the box.

I could probably make it a bit easier to set up, but it would then require another weekend. :))

I wrote the British Placename Mapper (https://placenames.rtwilson.com/) last weekend, and it got a bit of traction on Twitter here in Britain over the last week.

It lets you search for parts of British place names, and will plot the places that match on an interactive map, so you can search for places that start with 'great' or end with 'burgh' or contain 'sea' (or you can use regexes for more complex stuff). People have found some cool patterns with it.

Wow, this is a great idea and really fun to look at.
Awesome project. One of my favourites is places ending "-wich" which are very few and scattered throughout non-Danelaw England
I extended Gnome Search so my project selection/opening is nice an integrated into my DM. It was way harder than I thought as someone with 0 DBUS experience. Fun though!
I wanted to know the most used Go dependencies (not most starred or most downloaded, but most depended upon), so I made a scraper to get the go.mod from a few hundreds open source project on GitHub, and got the go.mod of each of their dependencies recursively. I stored this in a neo4j (first time I had the opportunity to use a graph database!) and got my answer (stretchr/testify is the most used dependency in the open source ecosystem by a large margin).

It’s not "finished" because I still have tons of ideas for improvements, and still want to make a blog post explaining how and why I did it, and show the results in an interactive page (and also share the database with everyone).

Interesting, but I do wonder what the result would be if you excluded _test.go ?
The second most used was google/go-cmp but I also think it’s used mostly in tests. It’s a bit annoying that test dependencies are not listed separately in go.mod files. After that there was a bunch of dependencies related to AWS SDK, GCP SDK and Kubernetes.
I was reading "50 years of text games", and one game (Hunt The Wumpus) piqued my interest so I decided to reimplement it in go, based only on the description of the book, initial (working) commit took a few hours over the weekend, then I fell down a rabbit hole when I found out the original source code, and description of its sequels, so I took a few more weekend to implement that then even more features. Probably nobody except a friend played it but for once it felt good developing something outside of work or the advent of code. https://github.com/Koumbaya/wumpus