8 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?

8 comments

  1. [3]
    CptBluebear
    Link
    I don't feel like this is entirely the right place but even so.. it's something. I have no real coding skills to speak of, though I can read a script (whether CSS or others) and vaguely understand...

    I don't feel like this is entirely the right place but even so.. it's something.

    I have no real coding skills to speak of, though I can read a script (whether CSS or others) and vaguely understand what it tries to do. So when I need to automate something for work I rip a script online somewhere and adapt to my needs.

    But I've started The Farmer Was Replaced(). A game about farming various items with a drone from a grid-based farm and the only way to make that drone move is by coding in a python adjacent (though very close to actual python) coding language.

    Which is to say that I've started learning by doing. And it's real good to see the instant feedback of the code working in real time.

    6 votes
    1. [2]
      Grayscail
      Link Parent
      That sounds pretty cool. The core concept of decomposing a task into a set of operations and choices is far more important to getting good at programming than learning the syntax of a given...

      That sounds pretty cool.

      The core concept of decomposing a task into a set of operations and choices is far more important to getting good at programming than learning the syntax of a given language. Which is to say, I think what you are doing in the game sounds like a great way to practice, even if its not "real" python.

      1. CptBluebear
        Link Parent
        As far as I can tell it's just normal Python with a few bits and bobs stripped and predefined calls to mould it into a game. Though the basics are the same, you could call it Python(Simplified)...

        As far as I can tell it's just normal Python with a few bits and bobs stripped and predefined calls to mould it into a game. Though the basics are the same, you could call it Python(Simplified) when you reach the advanced stuff.

        Since it uses an unlock progression system it allows you to slowly absorb relevant information without being or feeling overwhelmed. I wrote something in the first five minutes using a simple operator and it turns out even those are locked at the start. Not annoyingly so, it takes less than five minutes to unlock those once you look at the tech tree, but it goes to show just how simple it starts. It then introduces new concepts such as variables and lists piecemeal so you can integrate them one by one into the existing code.

        Genuinely, this is an interesting and engaging way to teach someone the nuts and bolts of coding and you hit the nail on the head. It presents me with a problem that I have to think about and resolve with a limited set of skills and abilities, which then iterate on themselves by presenting me with another challenge. It doesn't make me do rote memorization or try to bash me over the head with the definition of object-oriented programming.. it just makes me do the object-oriented programming.

  2. Akir
    Link
    I've been working on a bullshit Java weather application for a university class, which is due tomorrow. I normally wouldn't write about these kinds of things because they are practically nothing...

    I've been working on a bullshit Java weather application for a university class, which is due tomorrow.

    I normally wouldn't write about these kinds of things because they are practically nothing but this one is such a pain in the rear that I want to bitch about it.

    It's a simple assignment in theory. Build a GUI application that pulls from an online weather API. The problem is all the background information. The previous class had us going over how to handle raw network connections. Weather APIs are all REST, so I had to go look up the Java classes to deal with HTTP, and then look up an external library to help me parse through the JSON responses. The professor recommended two APIs, but they were from paid services and the free tier would have likely had me run out of requests before I finish.

    This was also the week that we were supposed to be learning Java's GUI frameworks, but the project was so much work I've basically given up on all the reading. If I had only done the readings, I would have probably just about started on the actual codeing project as of today. It had two entire book sections on JavaFX, another book section on Swing, and two articles that covered Swing and AWT, plus two videos.

    In all honesty, I learned most of this years ago. I just forgot everything because when the hell am I going to be making a GUI application in this era? So I did the sensible thing and just started building my application using JavaFX, the most up-to-date "standard" for java GUI applications. This was actually hard, because only one of the videos actually covered how to use Scene Builder to visually build the interface and it showed how it works with NetBeans - which is pretty useless because we were told to do everything in Eclipse. Weirdly enough FXML isn't even brought up in the readings, from my brief skim of it, so rather than learning everything again I did everything the declaritive way entirely in Java.

    I'm actually pretty proud of it, all things considered. It's a mess, but it works! The hardest part was figuring out how to get the data. I ended up using the US Weather Service's public API which is free, but it ended up being rather confusing because the query for retrieving forecasts requires knowing which weather forecasting office to use and their own internal grids, but it turns out there was another endpoint which takes global coordinates and returns the information I needed. It's functionally done, even though I'm not proud of the architecture, so all I need to do is clean it up a bit, add some documentation, and zip it up for submission.

    1 vote
  3. lynxy
    Link
    Now that I've caught up with a bunch of university units (cryptography is.. slow going), I'm looking at finding the energy to re-build the solutions I use for fetching content from certain stores....

    Now that I've caught up with a bunch of university units (cryptography is.. slow going), I'm looking at finding the energy to re-build the solutions I use for fetching content from certain stores. I'd like to wrap access to the given back-ends in APIs which are publicly accessible and authenticated so that I can fetch files wherever I am, without having to worry about making back-end-specific code for interfacing with these stores portable.

    Currently I use apkeep to fetch files from the Play Store, but the developer of apkeep is relatively opinionated and doesn't believe that implementing a function which returns the currently available version of an app is a useful endeavour- though to me it seems like it would be useful to prevent fetching large files which I already have locally. The split/legacy APKs are then stripped of signatures, merged (side-note, the split APK paradigm is yet another push by Google to phrase a change which complicates side-loading as a customer-friendly change), re-signed, and hosted on a private fdroid repository. I've looked briefly into the undocumented protocol which devices use to fetch content from the Play Store, and a minimalist bridging API shouldn't be too complex.

    Another back-end which I want to bridge is Deezer (which I pay for, but the Android app is a broken mess), as I prefer to have my music locally.

  4. xk3
    Link
    I finally found a good use for systemd-nspawn: editing raw bootable images. I put together a few scripts for Internet in a Box and Raspberry Pi OS: https://github.com/chapmanjacobd/iiab-image I'm...

    I finally found a good use for systemd-nspawn: editing raw bootable images. I put together a few scripts for Internet in a Box and Raspberry Pi OS: https://github.com/chapmanjacobd/iiab-image I'm working on getting Debian images also working since those raw images are slightly different (EFI partition instead of simple boot partition)

    bootc is perhaps a better alternative to this... but that mostly only works with Fedora (Bootable containers on the Raspberry Pi 4) but I'm having fun~


    Some other neat things I worked on this week:

    depth.py

    I can copy a bunch of links then:

    $ cb | depth
    
    Depth | Count | Sample Line
    3     | 18    | https://github.com/search?q=topic%3Araspberry-pi+org%3Aoffspot&type=Repositories
    4     | 24    | https://github.com/offspot/base-image
    5     | 92    | https://github.com/offspot/base-image/forks
    

    Then choose a depth to filter the list

    $ cb | depth 4
    https://github.com/offspot/base-image
    https://github.com/offspot/offspot-config
    https://github.com/offspot/imager-service
    https://github.com/offspot/provisioner
    https://github.com/offspot/provision-os
    https://github.com/offspot/testbench
    ...
    

    Linux only: see which files are being written to and how much they increase over time

    fatrace_agg_size.py

    $ fatrace_agg_size.py --min-size=3M --min-delta=2M --sort=size
    
  5. [2]
    sundaybest
    Link
    I can't get too much into the "why" but I've been trying to understand how to self-host an app that I found related to ticketing events. I'd like to self-host it to see how customizable it is, how...

    I can't get too much into the "why" but I've been trying to understand how to self-host an app that I found related to ticketing events. I'd like to self-host it to see how customizable it is, how functional, etc. but I have not found a good guide to self-hosting for someone who doesn't even understand what a "bash command" is and, at least in the one "guide" I read, they recommended I ask chatgpt to explain it to me. Sigh. I am hoping if I can find a good guide that I'll ultimately be able to test out the app AND I'll have picked up the skills to explore Jellyfin. I recently read that there's a plug-in that you can use to simulate a live TV experience with your own media library and that seemed pretty neat.

    Unrelated, I'm still fine-tuning the theoretical UI of the games I want to build in Godot. Figma is a bit frustrating (maybe the paid version would be less so?) but I'm muddling through the best I can and trying to make thoughtful decisions that seem...easier to implement when I get there. Someday! As a person who hasn't ever worked "in tech" and certainly didn't go to school for anything code related, I have big big dreams and very few skills to implement them. But that's okay! One step at a time...oooone at a time...

    1. ssk
      Link Parent
      I know, using ChatGPT costs a lot of the environmental factors, but in this case, that'll be the thing to get you to where you're going. I've now used it twice to start self-hosting a couple of...

      I know, using ChatGPT costs a lot of the environmental factors, but in this case, that'll be the thing to get you to where you're going. I've now used it twice to start self-hosting a couple of different services.