Live data from Hacker News

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

news.ycombinator.com

21–30 of 242 posts

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

#21
post #4

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!

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

#22
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)

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

#23
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

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

#24

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…

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…

> 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!

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

#25
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.

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

#26
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. :))

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

#27
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.

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

#29
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).

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

#30
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
Post reply on HN