• 0 Posts
  • 9 Comments
Joined 2 years ago
cake
Cake day: June 3rd, 2023

help-circle
  • GitHub is kind of a cloud service, but it isn’t a server host. Cloud development is just more…abstracted than traditional web development. Instead of controlling a computer and choosing how to store files and managing ports and firewalls and making backups and serving requests and redirecting to closer servers and making sure you have enough computing power but not too much computing power and all that stuff, you instead just give Amazon/Microsoft/Google your code and data and pay them to do all that for you.









  • Those are just types. You shouldn’t write types in the names. It’s called Hungarian Notation, but it’s just redundant. If you need to check the type of a variable, hover over it and your IDE should tell you that temperatureThreshold is type DegreesCelsius. No need to add extra cruft. There’s also a question of how specific everything needs to be.

    It’s also especially problematic if you later refactor things. If you change units, then you have to rename every variable.

    Plus, variables shouldn’t really be tied to a specific unit. If you need to display in Fahrenheit, you ideally just pass temperatureThreshold and it converts types as needed. A Temperature type that that has degreesF() and degreesC() functions is even cleaner. Units should just be private to the type’s struct.