Dipping Toes Into Programming
-
For the rest of the chapters, I'll be doing other projects (two of which I started already and got as far as I could with the knowledge of chapters 1 and 2 (some of 3)) and will do those as I go through the book... also, I will make this Protein Bar Nutrition Calculator way more efficient on the back end as I learn more.
-
@tim_g said in Dipping Toes Into Programming:
@scottalanmiller said in Dipping Toes Into Programming:
Cool
I'm pretty close to being done with my first project to drive home chapters 1 and 2 of the book (plus what I learned on SoloLearn).
Here's the results so far:
First Screenshot:
This is the default page, and all of this is automatically generated and filled in with just a few lines of PHP, and allows you to adjust as needed before submitting how much one bar weighs.
Second Screenshot:
This shows the results of everything from the first screenshot.
I know I need to work on formatting and prettyness a bit, but my main goal was first functionality.
I also have error handling, and defaulting to ZERO:
As well as injection prevention, null setting before any handling, and strict checking:
A snippet of just the
$grams
variable (but applies to everything):
(that's an old comment to myself that I haven't removed yet)I find more comments to be better. because I will code something and after testing and deployemnt, I won't touhc it for 4 years and without comments I have no fucking clue what I was thinking when I did something a certain way.
I mean I can read the code and see what I did and what it does, but that says nothing for why i did something.
-
@jaredbusch oh, that comment was a to-do comment, that I've finished doing but never deleted that reminder.
But yeah I have comments everywhere, just not in the screenshots.
-
I'd like to substitute Honey for something else more healthy... yeah it's better than added sugar, but still... it's "sugar".
I could probably make up for that weight with 100g more of other ingredients, and more water. But it wouldn't be as sweet. it's such a tasty recipe as-is though.
-
@tim_g said in Dipping Toes Into Programming:
I'd like to substitute Honey for something else more healthy... yeah it's better than added sugar, but still... it's "sugar".
I could probably make up for that weight with 100g more of other ingredients, and more water. But it wouldn't be as sweet. it's such a tasty recipe as-is though.
Nobody wants to eat healthy food that tastes like .
-
@tim_g said in Dipping Toes Into Programming:
I'd like to substitute Honey for something else more healthy... yeah it's better than added sugar, but still... it's "sugar".
I could probably make up for that weight with 100g more of other ingredients, and more water. But it wouldn't be as sweet. it's such a tasty recipe as-is though.
Honey is a whole different thing than processed sugar. Yes, you can't go crazy with it, but it's so much better than sugar.
-
@tim_g
Some editors handle the TODO's very well when prefixed like this:
//TODO: whatever ...
/TODO: whatever .../
Thay way you can have a look of all of your pending stuff in one place
The editor in the picture is PhpStorm -
@dave_c said in Dipping Toes Into Programming:
@tim_g
Some editors handle the TODO's very well when prefixed like this:
//TODO: whatever ...
/TODO: whatever .../
Thay way you can have a look of all of your pending stuff in one place
The editor in the picture is PhpStormThat's pretty neat.
Any idea if VSCode can do that? Can't look right now.
-
@tim_g said in Dipping Toes Into Programming:
@dave_c said in Dipping Toes Into Programming:
@tim_g
Some editors handle the TODO's very well when prefixed like this:
//TODO: whatever ...
/TODO: whatever .../
Thay way you can have a look of all of your pending stuff in one place
The editor in the picture is PhpStormThat's pretty neat.
Any idea if VSCode can do that? Can't look right now.
There's an extension for it.
-
@tim_g said in Dipping Toes Into Programming:
@dave_c said in Dipping Toes Into Programming:
@tim_g
Some editors handle the TODO's very well when prefixed like this:
//TODO: whatever ...
/TODO: whatever .../
Thay way you can have a look of all of your pending stuff in one place
The editor in the picture is PhpStormThat's pretty neat.
Any idea if VSCode can do that? Can't look right now.
VSCode can do just about anything. It's the best development environment out there right now, IMHO.
-
R and Python are joining forces, in the most ambitious crossover event of the year—for programmers
Relavant now that I'm doing a course in Python
-
Not bad news, but honestly, I can not stand R language
-
@Baldwin_Cannon said in Dipping Toes Into Programming:
Not bad news, but honestly, I can not stand R language
R is really meant for math, using it for programming or running anything else is painful because it's not designed to do anything else.
-
@travisdh1 said in Dipping Toes Into Programming:
@Baldwin_Cannon said in Dipping Toes Into Programming:
Not bad news, but honestly, I can not stand R language
R is really meant for math, using it for programming or running anything else is painful because it's not designed to do anything else.
And still I prefer matlab/octave