• 0 Posts
  • 46 Comments
Joined 2 years ago
cake
Cake day: December 30th, 2023

help-circle
  • Parents naturally have children. Children that will very much be alive to experience the “find out” part. I am incapable of comprehending how shortsighted and self centered someone has to be to be like: Well, at least I had a nice life, good luck everybody!

    And on a low level, they’re kind of right because most ordinary people aren’t to blame for this, so shaming “parents” makes no sense.

    Shame the international petroleum conglomerates, plastic producers, shipping, etc. You know, the actual emitters in the billions of gigatons.

    I agree that ordinary people are only partly to blame and that we need to focus on the worst offenders. However, the indifference of large parts of previous generations surely enabled much of the current situation. Most of our parents could vote, most had a chance to drive a tiny bit of change in some kind of way. Some even held positions of power or still do. Putting some blame on them surely isn’t wrong, especially if they still don’t care.

















  • Great, now this might work with my neighbor, but how exactly do I smack mega corps and the state? Are we talking eco terrorism here or do you have some other idea that hasn’t been tried in the last decades?

    I mean, climate change isn’t new but humanity still fucks up the planet and that does not seem to change. Why should we have to sweat at home while professionalized greed burns down everything around us? I will gladly take individual responsibility, but not alone.

    Actually, a failing power grid here and there might act as a wake-up call and then we can start talking about solutions, not just symptomatic treatment.



  • Okay, also die folgenden Punkte sind mir aufgefallen:

    1. Du könntest deine Konfigurationsvariablen in einem Struct gruppieren, dann kannst du später sowas wie config.exposureTime machen.
    2. Eine while-Schleife bietet sich immer dann an, wenn du die Anzahl an Schleifendurchläufen nicht kennst - in deinem Code kennst du deine MAX_ROWS aber schon, daher würde ich eher eine for-Schleife nutzen (wobei ich gerade nicht weiß, wie sich das mit fscanf verträgt…)
    3. Die Reihenfolge deiner Variablen muss in der Konfigurationsdatei exakt so sein, wie dein Code es erwartet. Der Key deiner Key-Value Paare wird nicht abgeglichen.
    4. Wenn du den ersten Punkt umsetzt, würde ich empfehlen, dass initalizeVariables ein Config Struct returned, anstatt globale Variablen zu füllen. Macht’s wartbarer.
    5. Jemand anderes hat bereits den möglichen Buffer Overflow bei fscanf angesprochen.
    6. Generell müsste man noch einiges an Errorhandling hinzufügen, um das Programm robuster zu machen
    7. Vielleicht willst du irgendwann mal andere Konfigurationswerte eintragen, bisher gehen nur (Gleitkomma)zahlen

    Ich habe mich mal hingesetzt und das zum Anlass genommen, meinen ersten (und wahrscheinlich auch einzigen) C-Code zu schreiben. Disclaimer: Das Ergebnis macht mich nicht besonders glücklich, aber ich hasse mein Leben nicht genug, um weitere Verbesserungsideen auszuprobieren. C scheint mir doch recht alt/limitiert und was bei anderen Sprachen Standardfeatures sind, sucht man bei C vergebens. Eine Map wäre z.B. sehr praktisch gewesen, oder ein switch Statement, welches mit Strings umgehen kann oder überhaupt ein String Datentyp statt Char-Arrays mit festen Längen… Uff ey.

    Egal, hier mein (nicht besonders guter und brüchiger) Code: https://pastebin.com/hWCFSvQd