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

10 comments

  1. helloworld
    Link
    Latest hit of depression isn't helping the cause, but I have my Raspberry Pi setup with NixOS, fully declarative config for prometheus+grafana, syncthing, an upcoming (crappy) custom static blog,...

    Latest hit of depression isn't helping the cause, but I have my Raspberry Pi setup with NixOS, fully declarative config for prometheus+grafana, syncthing, an upcoming (crappy) custom static blog, semi-auto remote updates and (WIP) home-manager. It is nice to set up once and practically forget it, but next step is to get dynamic DNS with let's encrypt certificate. I have near zero knowledge in DNS and SSL certs so this should be nice learning experience.

    7 votes
  2. mihaitodor
    Link
    I'm contributing to a data streaming processor called Benthos, which is written in Go. This week, the maintainer went on vacation, so I spent a bit more time answering questions from the community...

    I'm contributing to a data streaming processor called Benthos, which is written in Go. This week, the maintainer went on vacation, so I spent a bit more time answering questions from the community on Discord and Slack. It's a fun space to be in and, sometimes, it's difficult to limit the amount of time I donate to help maintain this project.

    4 votes
  3. tomf
    (edited )
    Link
    This is super hacky, but it works for my needs. Basically, I've got a friend I'm always sending tracks to. I decided to do up a podcast feed and found a simple script to generate the XML. Here's a...

    This is super hacky, but it works for my needs. Basically, I've got a friend I'm always sending tracks to. I decided to do up a podcast feed and found a simple script to generate the XML.

    Here's a gist

    The prep needs work, but so long as the tracks have v1 ID3 tags, it seems to work well. Dump some MP3s into a folder with the index.php file and the rest is taken care of. I'd love to sort out a way to automatically convert the FLACs to 320kbps mp3s, rename the files to Artist - Title, then replace the spaces with underscores in one go, but I haven't had any luck. I got this part done. Not pretty, but it works.

    If you do something similar to this, make sure the people you share it with know to set a custom playback speed for the podcast so they don't play the tracks at 1.5x by default.

    3 votes
  4. DMBuce
    Link
    I've been working on a simple, line-oriented, cli templating utility: https://github.com/dmbuce/sempl

    I've been working on a simple, line-oriented, cli templating utility: https://github.com/dmbuce/sempl

    3 votes
  5. [6]
    archevel
    Link
    I slapped together a POC android app in kotlin last night. I haven't done much android dev so was pleasantly surprised at how simple it was to get something going. Now I've made a receipt scanner...

    I slapped together a POC android app in kotlin last night. I haven't done much android dev so was pleasantly surprised at how simple it was to get something going. Now I've made a receipt scanner that extracts dates, sum and "organisation number" from the camera preview. It's about 200 LOC and all of it runs on the device with firebase ml kit doing the heavy lifting. Feels super snappy as well!

    3 votes
    1. [5]
      helloworld
      Link Parent
      Agree on the development speed. I knew bit of Java and zero of Kotlin, and based on that was able to write a basic app in Kotlin in couple of hours. Kotlin syntax is fairly easy to read as long as...

      Agree on the development speed. I knew bit of Java and zero of Kotlin, and based on that was able to write a basic app in Kotlin in couple of hours. Kotlin syntax is fairly easy to read as long as basics are clear.

      Android development is a terrible pain though. The whole experience (Android studio, in particular) feels like google giving a middle finger saying 'where else are ya gonna go? Apple? Now do another 10 steps of boilerplate process and code, worm!'

      4 votes
      1. admicos
        Link Parent
        I can't express how much I agree with this. Yeah, Jetpack Compose kinda "fixed" the UI boilerplate, but everything else is still a gigantic pain. I still can't remember how many classes I need...

        Android development is a terrible pain though. The whole experience (Android studio, in particular) feels like google giving a middle finger saying 'where else are ya gonna go? Apple? Now do another 10 steps of boilerplate process and code, worm!'

        I can't express how much I agree with this.

        Yeah, Jetpack Compose kinda "fixed" the UI boilerplate, but everything else is still a gigantic pain. I still can't remember how many classes I need just to make a DB. (I don't have any other examples because I tend to give up around here)

        Not to mention the internet requirements you need just to even have the chance of trying it:

        Downloading 2GBs of Android Studio, another 2GBs for the emulator images and SDK, another half a gig or so for the Gradle dependencies, plus a few hundred megabytes to update the Kotlin plugin (I've never had a fresh install of Android Studio that didn't have a Kotlin update already pending), really kills the "flow", so to say.

        5 votes
      2. [3]
        archevel
        Link Parent
        Super interesting and Feel diametrically opposed! Is the issue that "basic apps" are easy, but anything more complex is difficult? Is it that you need a bunch of boilerplate (that might be quick...

        Super interesting

        Agree on the development speed.

        and

        Android development is a terrible pain though.

        Feel diametrically opposed! Is the issue that "basic apps" are easy, but anything more complex is difficult? Is it that you need a bunch of boilerplate (that might be quick to copy-pasta) to get some basic functionality in place? @admicos mentioned bloated dev env, but a lot of that is a one time cost (unless you need to setup multiple envs continuously).

        Is there anything in particular that make it painful?

        2 votes
        1. helloworld
          (edited )
          Link Parent
          Ah, I can see why it comes off as opposite. The first part is about Kotlin in particular. Java is boilerplate-heavy in general and Android's Java dials it to 11. Just couldn't stand it. My friend...

          Ah, I can see why it comes off as opposite.

          The first part is about Kotlin in particular. Java is boilerplate-heavy in general and Android's Java dials it to 11. Just couldn't stand it. My friend who I was building this for, only knows Python. So he used some library for Python-land to build a PoC apk and sent me the code. Me being on NixOS and Python being the eldritch horror of dependency management, couldn't get it to compile after 2 hours.

          So, I said duck it, wasn't gonna use Java so opened kotlin syntax guide, loaded basic Kotlin app template in Android Studio and got to fiddlin. About 2 hours later I had basic form-based app, working and better looking than Python thingamajig we had before. I am a slow learner so going 0-60 in 2 hours on new language was a first for me, and I loved a lot of Kotlin fundamentals like immutable defaults, nice sugary syntax improvements over Java et al.

          Now the bad part. UI has never been my strong suit, so it is biased. My only other UI experience was with Swing way back and HTML+Jquery recently. With HTML, you just start typing and things appear. Whatever XML contraption Google has cooked up is too complex. To me, it appears to be made with Googles of the world in mind, not joe Helloworld in his 1 BHK (Basements or garages are too primo for my country). Then there is the abomination of gradle and its even weirder syntax.

          Overall, it doesn't feel like an experience designed with actual users (individual developers) in mind. Everything is complicated for no reason. My simple project was 4 files and less than 100 lines total on web, but on Android it turned into 400+ lines and general lack of empathy. It doesn't feel like it grew organically. Google seems to still fighting with ghosts of their terrible choices past and it felt like I was the collateral damage.

          Granted, my opinion is particularly spiked because my other recent beginner projects were in Rust and Emacs-lisp, both are particularly nice to new developers, but I would still hold android development as worse than Java web development and its bad OOP influence.

          4 votes
        2. helloworld
          Link Parent
          Oh and the bloated Dev environment is no joke. I would have tried Android development years ago had it not been for that horrible thing called Android Studio and its emulator. As a student without...

          Oh and the bloated Dev environment is no joke. I would have tried Android development years ago had it not been for that horrible thing called Android Studio and its emulator.

          As a student without WiFi and 2GB daily internet allowance from my phone, that thing was (and for many still is) a non-starter.

          The studio ran dog shit and emulator simply refused to launch on my (then slightly above standard) i7+4GB laptop.

          Compare that to Emacs with couple hundred MB max and I get a complete Dev env with manuals, or Rust with similar story. Not to mention damn browser is ubiquitous and has pretty killer (albeit with terrible language) runtime.

          Compared to these alternatives, it appears Android development is only as complex as it is because lock-in. As said before, where else are people going to go, right?

          2 votes