Comment on: Forcing women into programming is a fucking mistake
0 15 Jun 2018 08:18 u/anonagent in v/programmingComment on: Forcing women into programming is a fucking mistake
It's a complete fucking waste of 3 bytes per instance, and you have absolutely no idea how many instances there will be.
Spend the memory you have when you actually need it, save it when you don't.
I would use an unsigned byte (uint8_t) since, as you said, it can't be negative, and the oldest living person known to man's age wouldn't even take up 7 bits (121 < 127).
Here's the thing, EVERY device is a "low memory device" the average device still has just 4GBs of memory, of which the OS uses at least 1 gig of that for itself, then there are browsers open practically 24/7 with dozens of tabs taking up the rest.
Taking literally 2 seconds while writing your code to figure out what the data actually does, and therefore what it needs is very worth the tiny effort.
Comment on: Forcing women into programming is a fucking mistake
Using an int to store the age, because there are 2 billion year old people, yup.
Comment on: Come up with the most inefficient, poorly written, and complex way to print out "Hello World!".
You did not do this, this has been on the internet for years
No, I'm in the middle of trying to get one being self taught and coming from an area that doesn't really do it, it's slow going.
that said, literally all of the stuff I've written, is written that way.