what's the coolest thing you have ever programmed?
from hereforawhile@lemmy.ml to programming@programming.dev on 13 Dec 02:07
https://lemmy.ml/post/40251640

Share your cool programs!

#programming

threaded - newest

CameronDev@programming.dev on 13 Dec 02:20 next collapse

Archery app. Basically zero users, and got purged from the play store earlier this year because I refused to jump through their hoops.

It was was meant for use with scopes, you would put in some distance and scope settings pairs into it, and it would fit a line allowing you to estimate intermediate scope settings.

It also had an AR mode, where you could save a targets GPS position, and get the distance and angle to the target, and the pin setting.

Sadly, never got any users. So its just for me now. And I deleted the AR stuff.

<img alt="" src="https://programming.dev/pictrs/image/b2a377c7-56a4-4032-9bb1-b72846774613.jpeg">

hereforawhile@lemmy.ml on 13 Dec 02:31 collapse

Woah! So you give it a distance and it estimates where to place the reticle? What sort of math formula do you use to estimate?

CameronDev@programming.dev on 13 Dec 02:45 collapse

It fits up to a 4th order polynomial (going beyond 4th gets a bit silly), depending on the number of known pins.

github.com/cameroncros/…/BowConfig.kt

Uses an apache math library to solve the best fit line.

its_kim_love@lemmy.blahaj.zone on 13 Dec 02:36 next collapse

Stop me if you’ve heard this one before, Hello World.

CameronDev@programming.dev on 13 Dec 02:46 collapse

What language?

eager_eagle@lemmy.world on 13 Dec 02:51 next collapse

English, duh

thingsiplay@beehaw.org on 13 Dec 09:13 collapse

English.

mindbleach@sh.itjust.works on 13 Dec 02:43 next collapse

I made an FPS on NES.

It doesn’t use any mappers or added chips. There’s quicksaves, a level editor. jump-in two-player co-op, and SNES mouse support.

I have not been arsed to add music.

sik0fewl@lemmy.ca on 13 Dec 04:04 next collapse

I only played it for 15 seconds, but I could hear the music anyway!

hereforawhile@lemmy.ml on 13 Dec 04:12 collapse

This is insane holy moly!

hanrahan@piefed.social on 13 Dec 03:21 next collapse

Back in late 1982 (i think it was), i was 16, I’d just convinced my folks to buy me a Commodore 64. It had a tape drive for storage, long before broard Internet access etc. I had magazines about programming in Assembler and programmed a couple games to play becase i didnt have access to, well, anything.

I still remember my bottom porky pig balloon shooter :)

SYS 64738 my dudes.

My next computer was an Amiga 1000, floppy and pirating in my local user group were a thing by then :)

NOPper@lemmy.dbzer0.com on 13 Dec 06:09 collapse

I bought into the new company launch and my"modern" c64 is on the way. I have two original final ones here but no HDMI adapter, so it’ll be a fun winter break getting back into hacking on it!

mesamunefire@piefed.social on 13 Dec 03:34 next collapse

Phone powered web server on solar more recently. Worked a lot easier than I thought it would.

hereforawhile@lemmy.ml on 13 Dec 04:20 collapse

I have been tinkering with this as well. There is a really broad application to this if you know how to develop websites.

slippyferret@lemmy.blahaj.zone on 13 Dec 03:41 next collapse

A long time ago I wrote a little web app that takes a search string and finds all the words in the dictionary that have overlap with its spelling. Sort of a portmanteau generator. It was just a fun project at the time, but I have used it on countless occasions to brainstorm unique names for projects, websites, etc.

You can try it from the link below. Just type any word or name and it will populate the results.

dev.djdupriest.org/name-combinator/index.html

hereforawhile@lemmy.ml on 13 Dec 04:16 next collapse

Bookmarked! I love that this exists

hperrin@lemmy.ca on 13 Dec 04:46 next collapse

That’s really cool.

who@feddit.org on 14 Dec 02:09 collapse

This looks handy for naming projects. Thanks for sharing.

otacon239@lemmy.world on 13 Dec 03:46 next collapse

Probably the Hello World I wrote for the Pocket Sprite along with the programming tutorial for it. To my awareness, I was the only person who made a tutorial for it and it got decent amounts of use on the Discord. It’s too bad you can’t get them anymore.

github.com/otacon239/PS_HelloWorld

arthur@lemmy.zip on 13 Dec 04:34 next collapse

A voting counter for 3 voting systems. It was a rewrite of a code I wrote some years prior, and the cool factor was to feel that the new version was trustworthy even before writing the tests.

I also made some specialized chatbots, good results.

hperrin@lemmy.ca on 13 Dec 04:44 next collapse

I wrote my own email service: port87.com

I’ve made a lot of things for it, and most of them are open source:

Also, I made one of those neat sorting algorithm visualizers:

sciactive.github.io/libsortjs/demo/

dgdft@lemmy.world on 13 Dec 05:01 next collapse

In high school, we used to play a game colloquially called Spoons/Assassins/Spoon Assassin/Marker tag. Long story short, everyone playing gets assigned another player as a target. You tag your target on the back of the neck with a spoon or marker to “kill” them + take over their assignment. Rinse and repeat until only the winner is standing.

Major catch here is that for the game to work properly, the targets have to be chained in a loop, so there usually has to be a trusted individual running the game who can validate the assignment list.

So I scraped the online school directory to pull names, emails, and school photos of everyone. Then I built a Java Swing app to track a list of who was playing, and the app would shuffle a random list and email everyone their assignments blindly, photos included. Flash forward a few months, and eventually we had a full roster of ~80 people playing across grades, which was ~10% of the student body.

Unfortunately, a group of freshmen started their own take on the game, which devolved into mauling one another with Crayola markers and Sharpies. The principal catches word that I’ve been running a ring, and brings me into his office to tell me to shut it down.

Uncharacteristically for my teenage years, I went all-in on diplomacy. I plead my case, tell him I’m not involved with the freshmen, hear out his concerns, volunteer to modify the game rules, and point out that our group been playing for months without issues. No dice; the dude was a jackass with a chip on his shoulder. So we come to an impasse, staring at one another in silence.

Eventually, to break the silence, he asks about a stray bandage I have sticking out the top of my shirt. I’d had a small melanoma removed from my collarbone that week, which was caught as early as possible and removed without issue. Seizing the opportunity, I tell the principal “I have cancer”, and immediately walk out before he could formulate a response. Poor dude went white as a sheet. Good times.

Bit of a lame ending for the app, but building it taught me the skills I used to jump-start my career, and drove home the point that software isn’t an end unto itself — it’s the way people use it to come together that makes things great.

AnarchoEngineer@lemmy.dbzer0.com on 13 Dec 05:30 next collapse

My first project in Rust was replicating this paper because i wanted to learn rust but needed a project to work on because i hate learning from tutorials.

Of course, I had intended to go the OOP route because that’s what I was used to and this was my first time using rust… that was a bit of a headache. But I did eventually get it working and could watch the weights change in real time. (It was super slow of course but still cool)

Anyway I’ve started making a much much faster version by using a queue to hold neurons and synapses that need updating instead of running through all of them every loop.

It’s like lightning fast compared to the old version; I’m very proud of that. However, my code is an absolute mess and is now filled with

Vec<Arc<Mutex<>>>

And I can’t implement the inhibition in a lazy way like I did the first time, so that’s not fun…

litchralee@sh.itjust.works on 13 Dec 06:53 next collapse

Using an MSP430 microcontroller, I once wrote an assembly routine that (ab)used its SPI peripheral in order to stream a bit pattern from memory out to a GPIO pin, at full CPU clock rate, which would light up a “pixel” – or blacken it – in an analog video signal. This was for a project that superimposed an OSD onto the video feed of a dashcam, so that pertinent vehicle data would be indelibly recorded along with the video. It was for one heck of a university project car.

To do this, I had to study the MSP430 instruction timings, which revealed that a byte could be loaded from SRAM into the SPI output register, then a counter incremented, then a comparison against a limit value in a tight loop, all within exactly 8 CPU cycles. And the SPI completes an 8-bit transfer every 8 SPI clock cycles, but the CPU and SPI blocks can use the same clock source. In this way, I can prepare a “frame buffer” of bits to write to the screen – plenty of time during the vertical blanking interval of analog video – and then blast it atop the video signal.

I think I ended up running it at 8 MHz, which gave me sufficient pixel resolution on a 480i analog video signal. Also related was the task of creating a set of typefaces which would be legible on-screen but also be efficient to store in the MSP430’s limited SRAM and EEPROM memories. My job was basically done when someone else was able to use printf() and it actually displayed text over the video.

This MSP430 did not have a DMA engine, and even if it did, few engines permit an N-to-1 transaction to write directly to the SPI output register. Toggling the GPIO register directly was out of the question, due to taking multiple clock cycles to toggle a single bit and load the next value. Whereas my solution was a sustained 1 bit per clock cycle at 8 MHz. All interrupts disabled too, except for the vertical and horizontal blanking intervals, which basically dictated the “thinking time” available for the CPU.

sbeak@sopuli.xyz on 13 Dec 07:34 next collapse

I have a program called “country guess” that I made a year ago where it’s like the Sporcle quiz but with a) the proper UN recognized countries (with options for some of the partially recognized ones), b) completely offline since it’s made with half-baked Python and c) it’s text-based (ASCII art maps and all). It times how long you took to complete it, but there is no time limit. It also accepts alternative names, just like the Sporcle quiz (e.g. “uk” or “usa”)

The way I did it was incredibly time consuming though, as it relied on a whole load of string formatting to show the ASCII map with countries highlighted (each country is a list of either whitespace or hashes #), meaning I had to manually copy and past the white space of the ASCII maps I found for each and every country. No wonder why I never finished it. It also had the flaw of not showing the country names in the big countries, with all of them shoved to the bottom of the map, meaning when you are close to finishing, you can’t see both the map and the countries you got right.

As of right now, I think it has the continents of Africa, Europe, and the Americas, as well as Oceania. Not Asia though (there are simply too many countries there!) and the world, since I never bothered to finish it. If I recall correctly, the partially recognized territories I included that actually worked were Western Sahara, Somaliland, and Kosovo. I also had the optional UN observer states of the Vatican and Palestine.

Do note that the python program requires the modules “colorama” for colourful text and “art” for ASCII text headings I think.

phpinjected@lemmy.sdf.org on 13 Dec 07:48 next collapse

a bot that shorts any coin mentioned by elon musk.

maxy@piefed.social on 13 Dec 07:50 next collapse

I’m still proud of my rendering of the logistic map. It was mostly just to learn more Rust, but it rendered this beatuiful picture with relatively little code. And mostly by accident, I didn’t know I would get those cool shadows!

<img alt="image" src="https://media.piefed.social/posts/dw/jI/dwjIF8fZ7JbbnR1.png">

m532@lemmygrad.ml on 13 Dec 08:09 next collapse

A raymarching renderer. With shadows and reflections. And reflections of reflections.

jagedn@programming.dev on 13 Dec 08:36 next collapse

Every piece of software is as a kid, you need to love all of them by equal 😅

SinTan1729@programming.dev on 13 Dec 09:01 next collapse

Chhoto URL - It’s a simple URL shortener written in Rust.

I’ve written more programs, some of which are more useful in my daily life than this (e.g. movie-rename) but this is one that many seem to find interesting, and that’s kinda cool I guess. Also, I’m proud of some of my Lean code, but that stuff’s not published.

Undertaker@feddit.org on 13 Dec 09:31 next collapse

I implemented a self made or at least adapted ant based algorithm to solve a mathematical problem. Each ant walks a route which represents a possible solution. The shortest path is the best solution. It takes advantage of swarm intelligence.

j4cobgarby@feddit.uk on 13 Dec 09:38 collapse

Similar to BFS?

Quicky@piefed.social on 13 Dec 10:24 next collapse

In the 2010s I had a Windows Phone which I thought was amazing. I bought the original Surface Pro too, because at the time I thought it was incredible. A full operating system in a tablet form factor that was incredibly fast and touch screen.

In the IT office I worked in, we had a dartboard. It was great for just stepping away from your desk if a problem had stumped you, throwing a few darts to take a break, and inevitably the answer would come to you. It was our rubber duck.

Trouble was, all of us were terrible at the basic maths involved with darts matches. So I thought, what if we mounted the Surface to the wall, and could just tap where the dart had hit, and get scores instantly.

So I wrote this darts score-keeping app that worked on everything from Windows Phones to tablets, and even an Xbox at one point, thanks to the way Microsoft had implemented their cross-device app deployment.

We used it every day in the office. I think in 10 years it’s sold about 3 copies.

Lovely Darts

captain_aggravated@sh.itjust.works on 13 Dec 10:45 next collapse

Okay, so you know the trope in spy movies where the launch codes or the diamonds or whatever are at the end of a hallway full of lasers, and the protagonist has to do some cool flip moves (if male) or some slinky contortions (if female) to get around the lasers?

I made that as an arcade game with an Arduino. Some red laser pointer diodes, some photosensors, a few lights, bells and whistles, a fog machine, a few big ol buttons, and you’ve got spy laser hallway. It had a separate “break as many lasers as you can” mode as well, played like a combination of DDR and whack-a-mole.

The second coolest thing I ever programmed was probably the GPS MP3 player. A farmer wanted to add an automatic soundtrack to his Halloween hayride, like when the drove through the spooky graveyard it played ghost noises, it would play music for longer stretches on the road. I used a Raspberry Pi with a GPS HAT and wrote up a script in Python that would compare the actual position with a set of coordinates stored in a text file, and if one matched, it would play an associated mp3 file. The effect was kind of lost because the audio was coming from the vehicle itself, but it’s a hay ride, it’s supposed to be kind of lame. The bedsheet ghosts said woo as you drove past, I’m in the special effects industry, dad.

Sir_Kevin@lemmy.dbzer0.com on 13 Dec 10:51 next collapse

Based on popularity: Back in the day I wrote Stick Fighters Brawl 2: Vector Warriors.

I’ve been wanting to re-compile it for modern machines for ages but guestures broadly life has been in the way. Should that happen, it will be hosted at Nuclear Playground.

xthexder@l.sw0.com on 13 Dec 11:27 next collapse

I’ve been working on my own game engine for years, and there’s all sorts of cool stuff it can do, but recently I’ve been expanding the scripting to be capable of streaming images to the GPU.

Today I got Doom running inside my engine as a hot-reloadable plugin script:
Video: wednesdayos.sw0.com/…/2025-12-13_00-25-14.mp4

The engine has real-time bounce lighting using a highly modified voxel cone tracing algorithm I developed (doesn’t require ray tracing hardware), which I’ve been able to get running even on my Steam Deck! <img alt="" src="https://l.sw0.com/pictrs/image/403a2f07-67fd-46f4-840c-1233c9adf0dd.jpeg"> Video: wednesdayos.sw0.com/…/2025-03-21 23-50-29.mp4

The whole thing is open source here: github.com/frustra/strayphotons

lascapi@jlai.lu on 13 Dec 16:55 next collapse

Total cool 🤩

mindbleach@sh.itjust.works on 13 Dec 18:36 collapse

Software path-tracing has been on my bucket list, mostly to test a concept: physically based instant radiosity. If an eye-ray goes camera, A, B, C, then the light C->B forms an anisotropic point source. The material at B scatters light from C directly into onscreen geometry. This allows cheating akin to photon mapping, where you assume nearby pixels are also visible to B. Low-frequency lighting should look decent at much less than one sample per pixel.

RonSijm@programming.dev on 13 Dec 11:50 next collapse

Probably not “coolest” as in ‘best code ever’ or most complex code ever - but that got most coverage. So I think it’s pretty cool

www.youtube.com/watch?v=ifJnWVSoyAY

anton@lemmy.blahaj.zone on 13 Dec 14:38 next collapse

It’s either printf and stack unwinding in assembly or something to test all possible execution path for very simple multi threaded programms.

1hitsong@lemmy.ml on 13 Dec 19:18 next collapse

The code I wrote that I use most often is music playback in the Jellyfin Roku client.

I use it almost every day and think it’s pretty cool 🤘

Poik@pawb.social on 13 Dec 20:57 next collapse

Coolest thing is hard… I’m a bit of a nerd, but let’s go from a few angles.

As a kid I had made and recreated a number of games on my TI-83+ and did don’t fun optimization challenges to get as much in the pure BASIC code as possible. I was working in an ARG into it. But all that code is lost because I didn’t know how to back up that stuff back then. (And I was a bit lazy even when I knew I should.)

I’m proud of how fun my Football mod for Binding of Isaac is. It’s just an item that give Isaac randomly bouncing projectiles, like how a football kind of sporadically bounces in real life. I meant to release a challenge where you get ipecac and football to start, and all explosion immunities are removed from the pool. With a short goal since I think that’s enough chaos.

But probably from a different angle PySpeedup and DriveLink are libraries I designed to improve code as invisibly to the end user as possible because I got tired of taking PhD coders’ code and making it actually work because they don’t understand swap space or scheduling. (I’ve worked with brilliant algorithms at times, but had to correct critical misunderstandings of the computer at times.) I haven’t touched the libraries in years, but a lot of time and research went into it, and there was a full test suite and documentation. I don’t think the idea is fully without merit yet as the multiprocessing in Python is better but still has oddities, and I don’t think there’s an RAM aware abstraction in the base language yet? I forget what state I left things in. I know the CI I was using doesn’t exist (for free users) anymore though.

JakenVeina@midwest.social on 13 Dec 23:00 next collapse

Not QUITE a program, but I’d have to say my own little GBA ROM hacks for the original Fire Emblem. On account of the following story…

IIRC, it was 2007, and I was a senior in high school, reorganizing some of the stuff for the robotics team, in the cabinets in the big science classroom where we met. There were some freshmen interested in the team (season wouldn’t start for a while yet) who’d taken to hanging out there, after school.

They all had laptops and I recognized the menu theme when one of them pulled up Fire Emblem in an emulator, from across the room, and immediately called out “Who’s playing Fire Emblem?”. When I went over and saw he was using Virtual Boy Advance, it occurred to me what I had in my pocket. Or rather what happened to be ON the flash drive in my pocket.

At the time, I didn’t have my own laptop, so my flash drive had years worth of random crap on it. And over the years, I spent a LOT of time tinkering with ROMs and VBA over the years. In addition to a few copies of different hacked ROMs and save files, I had a portable hex editor, and a LOT of text files with hex tables and memory maps and other research I’d collected over the years.

So, yeah, I pulled out the flash drive, said “Wanna see something cool?” and proceeded to apply many crazy hacks as I could think of, in the most obtuse manner possible, just editing hex values directly in memory as the game was running. Free XP, free items, end game equipment, sprite swaps, etc. At one point, one of them says something like “What kind of wizard ARE you?!”

It’s what comes to mind for me when you say “cool” because I like to think I inspired those kids to get into software and programming themselves, or at least consider it as an option. They certainly stuck around with the team for the rest of the year. Also, it inspired ME to really realize how much I’d grown just by tinkering and being curious, and how much you can accomplish through incremental effort.

KiranWells@pawb.social on 13 Dec 23:14 next collapse

github.com/KiranWells/corgi

Like a lot of graphics programmers, I fell into the rabbit hole of rendering fractals. However, I never stopped - over the past couple of years I have slowly been building one of the most sophisticated Mandelbrot/Julia rendering programs that I am aware of. It has a mostly intuitive user interface, and does all of the calculations on the GPU. It has to use a bunch of mathematical tricks to get around the limits of single-point precision available in shaders. Because of the GPU rendering algorithm, I’ve managed to view fractal locations at around 10^250 times magnification with near real-time performance.

I also built a really in-depth compositing/coloring system, allowing you to make some really crazy images and get a lot of variation even for the same location:

<img alt="A grid of 9 rendered fractals, each one with the same rendered location but drastically different coloring styles." src="https://github.com/KiranWells/corgi/raw/main/assets/style_collage.avif">

Although it has only been me working on it, I think it is in a pretty mature state so far, and I would gladly take PRs/issues if anyone happens to be interested. It should support any OS if you compile it from source, but I don’t have binary releases set up yet.

arty@feddit.org on 14 Dec 00:04 collapse

When Google Reader was alive, I wanted to improve its UI, so I wrote a userscript which completely replaced everything in the browser but still spoke to the Reader’s backend for data. When Reader was turned off, I only had to provide my own backend.