16 votes

What programming/technical projects have you been working on?

This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

25 comments

  1. [4]
    MonkeyPants
    Link
    frogsauce.com My kid wants to turn reddit.com into frogsauce.com. It will be the same as reddit, but it will be called Frogsauce. So now I need to see if I can simply iFrame into olde Reddit and...

    frogsauce.com

    My kid wants to turn reddit.com into frogsauce.com.

    It will be the same as reddit, but it will be called Frogsauce.

    So now I need to see if I can simply iFrame into olde Reddit and then alter the css using an external bit of javascript or if it will get more involved.

    If it gets too involved, I might just use a bit of locally executed javascript.

    15 votes
    1. [3]
      acdw
      Link Parent
      This is the kind of tech project we all should aspire to .. I love it :) Is your kid helping you out? Sounds like a great learning opportunity!

      This is the kind of tech project we all should aspire to .. I love it :)

      Is your kid helping you out? Sounds like a great learning opportunity!

      6 votes
      1. [2]
        MonkeyPants
        Link Parent
        Once I figure out what I am doing, then I will figure out how interested he is in learning the details. He's still young. I think I can show him how to edit Reddit live inside a browser. The more...

        Once I figure out what I am doing, then I will figure out how interested he is in learning the details. He's still young. I think I can show him how to edit Reddit live inside a browser. The more abstract stuff is probably beyond his interest levels right now.

        7 votes
        1. acdw
          Link Parent
          Awesome! And yeah, that makes sense for a young kid. Still, computers are fun!

          Awesome! And yeah, that makes sense for a young kid. Still, computers are fun!

          4 votes
  2. [6]
    thismachine
    Link
    onhold lets you play sounds and music while shell jobs complete. I'm a big fan of tools like pv that give visual insight into a Bash pipeline, and thought a tool that would give audible insight...

    onhold lets you play sounds and music while shell jobs complete. I'm a big fan of tools like pv that give visual insight into a Bash pipeline, and thought a tool that would give audible insight into a pipeline would be cool, too.

    Installing it gives you two comands, onhold, which will play sounds as work is being done, and ding, which will play sounds after work is finished. You can use them like this

    $ export URL="https://releases.ubuntu.com/20.04.1/ubuntu-20.04.1-desktop-amd64.iso"
    $ http "$URL" | pv | onhold | ding > ubuntu.iso
    
    10 votes
    1. [2]
      acdw
      Link Parent
      okay, this is truly beautiful. I am installing this as SOON as I get home :)

      okay, this is truly beautiful. I am installing this as SOON as I get home :)

      4 votes
    2. [3]
      Gyrfalcon
      Link Parent
      I really love these ideas, especially ding! At work I'm on a project that does a terrible job of partial compilation, so I have a lot of long compiles, and I'd love to have an audio cue when...

      I really love these ideas, especially ding! At work I'm on a project that does a terrible job of partial compilation, so I have a lot of long compiles, and I'd love to have an audio cue when they're done. The real question is if I can get it to make a beep on my host machine from inside a Docker container...

      4 votes
      1. [2]
        thismachine
        Link Parent
        I'm interested if you're able to do this. onhold uses boombox[1] to play sounds on Linux, and boombox outsources audio playback to GStreamer if it's available, otherwise it will use the aplay,...

        The real question is if I can get it to make a beep on my host machine from inside a Docker container...

        I'm interested if you're able to do this. onhold uses boombox[1] to play sounds on Linux, and boombox outsources audio playback to GStreamer if it's available, otherwise it will use the aplay, paplay, etc commands.

        I've received a few responses about wanting to trigger sounds from an SSH sessions, so that's something I want to look into.

        [1] https://github.com/mixmastamyk/boombox

        2 votes
        1. Diff
          Link Parent
          ASCII Bell would be a very simple way to get an audio bloop to trickle down through an SSH connection.

          ASCII Bell would be a very simple way to get an audio bloop to trickle down through an SSH connection.

          3 votes
  3. [2]
    mmarco2121
    Link
    I have 2 projects I am working: 1 for work and 1 for my wife. The one for work, a web scraper to scrape html pages, convert any links and or keywords on each page to Markdown and then save them as...

    I have 2 projects I am working: 1 for work and 1 for my wife.

    The one for work, a web scraper to scrape html pages, convert any links and or keywords on each page to Markdown and then save them as .md files.

    The second for my wife, is a custom inventory application to log items for her commercial kitchen.

    I am a very beginner amateur programmer. Any recommendations welcomed.

    10 votes
  4. everydaycoffee
    Link
    Very slowly (a few hours a weekend) working on a tool to quickly capture, manage, and collaborate on User Stories for the development of software projects. I own a software development agency and...

    Very slowly (a few hours a weekend) working on a tool to quickly capture, manage, and collaborate on User Stories for the development of software projects.

    I own a software development agency and have built a pretty opinionated system of using User stories (and acceptance criteria) so building an opinionated tool to not only meet my needs, but hopefully other peoples too.

    It will just take another 487,998 weekends at this rate ๐Ÿ˜‚

    6 votes
  5. [7]
    joplin
    Link
    So I did some debugging on my genetic algorithm that finds a minimal oriented bounding box for a 3D object. I think I have it working properly. However, it looks like the limited precision I was...

    So I did some debugging on my genetic algorithm that finds a minimal oriented bounding box for a 3D object. I think I have it working properly. However, it looks like the limited precision I was using is slightly affecting the results. In general, floating point numbers don't work very well with the genetic operations that can be applied to them. (They tend to turn into NaNs and Infs pretty easily.) So I was converting them to 16.16 fixed point, then converting that to Gray code. That worked really well, but the 16.16 format is fairly limited, especially when dealing with a 3D model that has thousands of polygons all in the range of 0-1 for all 3 axes. So I tried moving it to a 32.32 fixed format, but that causes the results to become incorrect for some reason. I'm sure it's just another similar bug as the last one, but I'm not seeing it. My unit tests all pass for the various conversions between float, FixedPt, and Gray code. So I'm a bit stumped.

    When I get frustrated with that, I put it on hold and am messing around with L-Systems. For now, just playing with them in 2D. It would be interesting to see them in 3D or even 3D print some eventually. But right now just doing simple stuff for fun.

    5 votes
    1. [2]
      Gyrfalcon
      Link Parent
      This may not be a useful question, but is there any particular reason you have to use a decimal number? If not, would it be possible to convert your data to integers for the genetic algorithm and...

      This may not be a useful question, but is there any particular reason you have to use a decimal number? If not, would it be possible to convert your data to integers for the genetic algorithm and then convert back to fixed/floating point decimal numbers after it is done? I know some applications will do things like that to avoid floating point errors, not sure if it would actually help your problem at all.

      3 votes
      1. joplin
        Link Parent
        That's essentially what I'm doing. With 16.16 fixed point format, you just multiply your float by 2^16 and convert the result to an int. So if you have a value like 1.2345, you multiply it by...

        That's essentially what I'm doing. With 16.16 fixed point format, you just multiply your float by 2^16 and convert the result to an int. So if you have a value like 1.2345, you multiply it by 65536.0 and get 80904.192. Converting to an int gets you 80904. We use that value (well, that value converted to Gray code) for the genetic stuff. Whatever comes out of the genetic operations, gets converted back to a float and divided by 65536.0.

        4 votes
    2. [4]
      DataWraith
      (edited )
      Link Parent
      Genetic algorithms are amazingly resilient -- you can probably just punish any genome that produces a NaN or Infinity with a fitness of zero. Then it won't reproduce, and the invalid genes will...

      In general, floating point numbers don't work very well with the genetic operations that can be applied to them. (They tend to turn into NaNs and Infs pretty easily.)

      Genetic algorithms are amazingly resilient -- you can probably just punish any genome that produces a NaN or Infinity with a fitness of zero. Then it won't reproduce, and the invalid genes will die out.

      There are genetic operators that are specifically tailored for floating point number genomes instead of bitstrings (search term: "real-coded genetic algorithm").
      Instead of flipping random bits, the usual mutation operator for floats is to add a small-ish amount of gaussian noise; crossover can be implemented via arithmetic mean or with something more complicated like Simulated Binary Crossover (SBX).

      3 votes
      1. [3]
        joplin
        Link Parent
        Thanks! I will look into those. They sound quite useful. One of the reasons I didn't want to just punish genomes with NaNs or Infs is because it means fewer viable candidates per generation, so...

        Thanks! I will look into those. They sound quite useful.

        One of the reasons I didn't want to just punish genomes with NaNs or Infs is because it means fewer viable candidates per generation, so everything takes longer to converge to a reasonable answer. I figured if I can keep them from happening in the first place, it will improve the efficiency of the algorithm.

        4 votes
        1. [2]
          DataWraith
          Link Parent
          You're welcome. :) If the number of viable candidates is a concern, you could just entirely ignore/remove the affected genomes, in effect making the mutation operator smart enough to not produce...

          You're welcome. :)

          If the number of viable candidates is a concern, you could just entirely ignore/remove the affected genomes, in effect making the mutation operator smart enough to not produce them (rejection sampling). Using a real-coded GA sidesteps the issue entirely though, so that may be more efficient.

          3 votes
          1. joplin
            Link Parent
            So I gave real-coded genetic algorithms a try and it worked great! It significantly simplified my code. After making the switch, I also figured out a bug that existed in the code for a while. It...

            So I gave real-coded genetic algorithms a try and it worked great! It significantly simplified my code.

            After making the switch, I also figured out a bug that existed in the code for a while. It was much easier to see once I was only using 1 class to represent my data. I'm now getting improved answers within a few generations instead of only after hundreds.

            3 votes
  6. admicos
    Link
    The last few days I was working on "re-building" my server. For months I was looking for something to be able to "organize" everything I installed on there, and just a couple days ago I decided to...

    The last few days I was working on "re-building" my server.

    For months I was looking for something to be able to "organize" everything I installed on there, and just a couple days ago I decided to try out Ansible as a solution.

    It took me 2-3 days to port most of my old configuration over to Ansible's playbooks, and just yesterday I deployed it to a new server (and deleting the old one after migrating all the data).

    I also made my scripts publicยน, mainly so I could send them over to various communities about these things in order to know how terrible they are if there are any better ways of doing stuff.

    5 votes
  7. DrTacoMD
    Link
    After years of delay, I'm finally starting to play around with basic 2D game development again. My last effort was from back in 2008 (!) and was... not very good. I'm a seasoned client engineer by...

    After years of delay, I'm finally starting to play around with basic 2D game development again. My last effort was from back in 2008 (!) and was... not very good.

    I'm a seasoned client engineer by now, so I decided to give MonoGame a shot. I know I'm leaving a lot on the table by forgoing a prebuilt game engine like Unity, but I really enjoy getting my hands dirty and owning as much of the stack as possible. Working in a managed language like C# is the compromise I'm willing to make for the sake of my sanity, and for the likelihood of ever producing anything given the limited free time I intend to contribute to the project.

    So far my quick and dirty Pong clone is coming along nicely. I'll probably port over a couple of old minigames to get a feel for the framework and the tooling (I'm a macOS and iOS engineer by trade, so I'm far more comfortable in Xcode than in Visual Studio) before flexing my creative muscles and building something original.

    5 votes
  8. [2]
    Gyrfalcon
    Link
    At work: Still working on some code that I think I've talked about here before. Earlier, I was merging two versions of the same codebase that no longer had shared history, one which had a lot of...

    At work: Still working on some code that I think I've talked about here before. Earlier, I was merging two versions of the same codebase that no longer had shared history, one which had a lot of engineering/feature development done, and another which had a lot of software/maintainability development done. I think since I've last talked about this, the guy whose job this was before I started has mostly rolled off to work on a widely applicable tool that sprung from this project, and we've gotten another engineer who specialized in testing the part of the codebase that got the feature development. Now it's just a matter of hunting down bugs and making sure that everything works as advertised and we can prove it, plus anything our client asks us for. Oh, and making up a development Docker container instead of a full VM as we had in the past, which has been my pet effort for a while.

    At play: I had been ignoring any projects for gaming for a while, but my air conditioning being broken has been a bit of a blessing as I have gotten back into it! I have been interested in trying out the Julia programming language for a while, so I decided to try it out on some old Advent of Code problems. I liked it there, and I've rekindled a previous interest in quantitative finance, though this time with equity options rather than in the foreign exchange markets. Unfortunately, detailed historical data for options is expensive, so for now I'm thinking I will try implementing something like a binomial pricing model to generate my own historical data to backtest strategies.

    5 votes
    1. [2]
      Comment deleted by author
      Link Parent
      1. Gyrfalcon
        Link Parent
        I do love the simplicity, but the scale difference is probably nonexistent. We will just have one Docker container running our main deliverable, and one that runs the simulation we use for...

        you are likely on a completely different scale

        I do love the simplicity, but the scale difference is probably nonexistent. We will just have one Docker container running our main deliverable, and one that runs the simulation we use for testing. Both are delivered inside a VM because of our client's backwards security restrictions. It's a silly system, but it's still better than one of our engineers spending the whole day cleaning up their dev VM and exporting and uploading it... Docker as a technology is great, but it doesn't quite survive first contact with bureaucracy!

        1 vote
  9. Cooler
    Link
    Finished building a Steam Achievement Tracker for myself, not a fan of the current ones. Its the first proper website I have built, not as simple as it looks!

    Finished building a Steam Achievement Tracker for myself, not a fan of the current ones. Its the first proper website I have built, not as simple as it looks!

    3 votes