She/her 🏳️‍⚧️

Professional cow, Linux Nerd, Hardcore Techno enthusiast. The Emporer protects us.

  • 15 Posts
  • 250 Comments
Joined 2 years ago
cake
Cake day: June 22nd, 2024

help-circle

  • The problem is, that there is no management. I’m working on a small team of 4 people and I am the only person that knows now to code. The rest just asks Claude and doesnt bother as long as it works.

    Im also an advocate of moving the project to an RTOS, which would mean a complete rewrite, but for now they are still quite eager at fighting that.

    For now I will just do the minimum required work to maintain this mess and rewrite everything from scratch in the meantime, because we will have to do it anyway at some point.

    I will definitely talk to them about some minimum coding standards.





  • I would say that building a container for developments becomes worth it once your project reaches a certain scale and has lots of environment variables/input or when you want to produce reproducible builds. For smaller projects or projects that have a relatively low threat level it may not be feasible to create a virtual environment.





  • The reason I dislike the missing of semicolons and brackets is because it causes bugs (that’s more of a problem of missing braces to declare the scope of your code) and also takes away control from the programmer.

    Missing braces:
    I had more than one instance where I accidentally deleted the intendation in a python script that caused undefined behaviour in my code and it took quite a lot of time to track that down. If the programming language would have forced me to properly defined the scope of my code by introducing brackets, that bug would have never been possible.

    Semicolons:
    The main thing I like about semicolons is that it allows you to properly space out your code over multiple lines for visual clarity. E.g.:

    void my_function(int arg1, int arg2, int arg3){
      //some code
    }
    
    int main(){
      my_function(
        1, //arg1
        3, //arg2
        8 //arg3
      );
    }
    

    Python should allow this too, since the arguments are being defined inside brackets, but other languages have no similar functionality (e.g. shell, but that is a little bit unfair, since you can’t even specify arguments) forcing you to put everything into a single line.

    Rust even allows you to leave out the semicolon on the last statement of a code scope in order to return the result of the statement:

    fn main() {
        let condition = true;
        let number = if condition { 5 } else { 6 }; 
        //number turns into 5, since the value is being returned due to the missing semicolon.
    
        println!("The value of number is: {number}");
    
        let number = if condition { 5; } else { 6; }
        // this should return null (if it even compiles)
    }
    



  • Hear me out, but whatever lunatics at python decided that brackets and semicolons are unnecessary, have made a catastrophic mistake with it. I start using another editor that uses different amount of spaces for tabs and suddenly my code no longer runs. Its also absolutely horrible when you chase down a bug for an hour just to realise, that one additional/missing tab changed the scope of your code and broke your entire script.