Share your cool programs!

  • namingthingsiseasy@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    4 days ago

    I wrote a program that scanned object files (compiled from a large C++ project) to see how they were interdependent. It was pretty useful for detecting cycles in the shared libraries that we were compiling from them, but the biggest benefit was it enabled me to very easily rewrite the build system from scratch.

    It was surprisingly simple - most ELF parsers can read a file and dump the symbol tables in them. (In this context, a symbol means a defined function, so if a C/C++ source file has int main() in it, the corresponding .o file will have a main symbol in it.) They also include information about which symbols are defined in the .o file, as well as which symbols it depends on which are undefined. This allows you to figure out a dependency graph, which you can easily visualize using graphviz or use to autogenerate build files for CMake or any other build system you may wish to use.

    In my case, I wrote this kind of program twice in two separate jobs. Both of them had a very janky build system using custom Makefiles. I used this program to rewrite the build systems in CMake. The graphviz dependency graphs are also just generally helpful to have as project documentation. CMake can do this natively, by the way - here’s the documentation for it: https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-graphviz

  • arty@feddit.org
    link
    fedilink
    arrow-up
    13
    ·
    5 days ago

    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.

      • arendjr@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        3 days ago

        I’m hoping early 2026, but I’m looking to hire a platform owner for Android, since I don’t use it myself. So it’s 🤞

  • CameronDev@programming.dev
    link
    fedilink
    arrow-up
    35
    ·
    6 days ago

    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.

  • 🍉 Albert 🍉@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    4 days ago

    i read a book about how a cpu+ram work together and decided to simulate it in excel.

    wish I kept the file but I was so proud to make a loop or a Fibonacci sequence in excel by simulating a Von Neumann architecture in excel

  • Krudler@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    3 days ago

    I made the first 3D tennis game you could play in a browser.

    E

    Like, professionally, this was when I was the lead shockwave dev for Gameloft wayyyyy back in the day

  • olenkoVD@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    4 days ago

    It’s half-working but:

    A library for making a Discord bot in C with the only dependencies being OpenSSL and cJSON. That means I also wrote code for handling the HTTP requests and also WebSockets.

  • Aneb@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    4 days ago

    Idk I haven’t written many but recently I made an integration for my sister’s startup that automated enrolling prospects from companies in an email campaign by sourcing different prospects name fields and LinkedIn accounts and finding their emails. It was good fun, and the user would get a prospecting email with all the details on the company and the role the person worked in at the company along with how long they worked at their company. I was calling it LeadFetch until my sister closed shop and told me my program was her IP. That still pisses me off cause I was gonna merge it to one of the sources we used after she called it quits and left me with no opportunities. She designed none of the back end but had the gall to say it was her app.

    • StrikeForceZero@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      4 days ago

      Curious but were you paid for it? I’m no lawyer but I can’t imagine that holding up unless she paid you for it. Even then, without an explicit contract, there’s probably a lot of gray area this falls into because you could have just been offering a service that’s utilizing something you made.

      • Aneb@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        4 days ago

        I was employed by her for a time for various duties for her startup and she asked me to make this application

        • StrikeForceZero@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          4 days ago

          Since she “closed shop” is she running around trying to sell the software you made or is it just rotting away because her ego won’t let you try to make something of it?

          • Aneb@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            4 days ago

            It has been rotting, I frequently used the APIs to remix into different apps, pulling posts and comments off LinkedIn for her to review and compile strategies based off of popular posts and users. She wanted some of that code so I forwarded my scripts to her to make use of. She isn’t selling my scripts but she then used them for herself. I tried to sell this idea of integrating LinkedIn Leads to one of our partners who is also a budding start up and set up a meeting. Then I told her because I was proud of my work and she bashed my idea and the direction I was taking claiming I stole LeadFetch from her.

            • StrikeForceZero@programming.dev
              link
              fedilink
              arrow-up
              1
              ·
              4 days ago

              Quite the family member you got. At the very least hopefully you’ve gotten your family to shun them or something regardless of their “legal rights”. Drives me nuts seeing “idea people” exploiting the actual effort and talent it takes to implement it.

  • maxy@piefed.social
    link
    fedilink
    English
    arrow-up
    20
    ·
    5 days ago

    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!

    image

  • Captain Aggravated@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    17
    ·
    edit-2
    5 days ago

    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.

  • spacemanspiffy@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    4 days ago

    I recently built a small game engine which takes image files and metadata in TOML format and turns it into a point and click adventure.

    Its not perfect, but I had fun making it.

  • kryptonianCodeMonkey@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    4 days ago

    Mines nothing amazing, really, but i find it handy.

    I 🏴‍☠️ movies. The downloads often come with excess files, images, text, sample videos, etc. The only files I want beside the movie file are subtitle files if they came with the download. And the video files often have obnoxiously long file names with coding info in it, the uploader’s name, etc. And sometimes they get nested weirdly.

    Most of the time, the file name and nesting is not really a big deal since I use plex and does good at ignoring nesting and it typically matches the title to imdb entries even if the file name is full of garbage. But sometimes it doesn’t match correctly and has to be manually fixed. And I just want my files to be clean, readable, and get rid of the bloat.

    So I made a script that walks through my movie libraries, deletes all unneeded files, generates a directory structure dependent on whether or not there are subtitles, and renames the files (and directories) by removing all of the junk words and coding and leaving only the title and release year. Like I said, it’s nothing amazing, but it’s the only utility I ever wrote in it’s entirety for myself that I actually use on the regular.

  • dgdft@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    ·
    edit-2
    6 days ago

    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.