Why is he starting with c/c++? Yes they have uses but not as a starter just playing around.
I struggled with this initially too cause I didn't understand why. Most people would say "give me the first object". In reality your requesting an offset * size of each item + list start.
Why is he starting with c/c++? Yes they have uses but not as a starter just playing around.
sometimes it's not interesting enough to keep someone's attention if it's just "playing around": some people need to feel like what they're working on while learning has a real purpose, and some purposes have to use C++ (e.g. Arduino)
sure it might not be the most effective or efficient way to learn, but it can be more motivating.
I would say python is good for basics like for what's a variable, how if/else work, how to iterate over a list, the thought process of breaking down a problem into sub problems. Now it's not a good language for going much beyond that. Do not try to make a real time video renderer in python.
Once past that I would say go either front end or backend. If backend c++ is a good option. Now that you know what a variable is we can discuss the difference between a uint32 and a bool. Why we don't use an int variable set to 1 or 0 to determine the results of an if statement. This is also where you learn about memory and how computers actually work.
If front end is the choice, maybe not Javascript but typescript would probably be a good option. I don't know much about front end(I hate doing visual design) so I can't go into much detail. Is there a better front-end language you recommend? Only other one I know at all is c# with blazor or winforms.
The issue I see with jumping straight into c++ is it's so much to learn to do simple stuff. For example a lot of early programmers get confused with working with functions and what return values. I attended a boot camp through work for python(I knew programming hobby level but it gave me a pay raise). There were 12 students, 4 choose to do a selenium script to test a website as a final project, 1 did a script I think for tracking expenses and income but he did it all in main because he couldn't figure out arguments and return values from other functions. This was after 9 weeks, 5 days a week 8 hours a day, plus 4 days to develop the final project. Now throw in what a header file is and the difference between declaring a function and defining a function. It's a lot to start off with.
Oh but Lua is so much worse than that. Table keys (array is not a thing in Lua) can be whatever you want. Especially even negative, and not like how python does it. 1 is just the convention.
41 Comments
Lysergid@lemmy.ml · 93 pts · 103d
TF is this formatting
Jumuta@sh.itjust.works · 58 pts · 103d
c for smartphones
30p87@feddit.org · 5 pts · 103d
just zoom out and go closer to the screen
Jankatarch@lemmy.world · 5 pts · 103d
I read it as if they are calling java "C for smartphones" instead lmao.
egrets@lemmy.world · 14 pts · 103d
This is C#, isn't it?
Jankatarch@lemmy.world · 6 pts · 103d
Oh shit, it is. Didn't notice the ".Length"
Quibblekrust@thelemmy.club · 3 pts · 100d
Semicolons belong at the end of lines. No exceptions.
lime@feddit.nu · 2 pts · 103d
that's linux kernel code style
ranzispa@mander.xyz · 37 pts · 103d
Clearly Kendrick Lamar started programming in the 70s in Fortran, had a small flirt with MATLAB and ended up using Julia in the end.
I didn't know he was so strong in scientific computing.
Fizz@lemmy.nz · 24 pts · 103d
Drake asks github copilot to make a for loop for him
dditty@lemmy.dbzer0.com · 34 pts · 103d
Drake is too busy trying to clean up his work with child processes
atomic@programming.dev · 10 pts · 103d
Bakkoda@lemmy.world · 4 pts · 102d
Sat through a presentation at GodotCon yesterday and one of of the speakers said " and then you just execute all the children"
lime@feddit.nu · 20 pts · 103d
arrays start at (offset) zero. lists start at (position) one. fight me.
Retail4068@lemmy.world · 11 pts · 103d
testaccount789@sh.itjust.works · 3 pts · 103d
i.e.:
*(array + i)Cargon@lemmy.ml · 2 pts · 103d
Only edge lords still mentally stuck in CS101 conflate indices and offsets.
lime@feddit.nu · 6 pts · 102d
good morning to you too. remember to have your coffee before going on the internet.
Cargon@lemmy.ml · 2 pts · 102d
I am agreeing with your distinction between indices and offsets.
lime@feddit.nu · 6 pts · 102d
in a very agressive way. hence coffee.
PantaloonMonsoon@sh.itjust.works · 10 pts · 102d
This is why he told Drake he better never go to cell block 1 instead of cell block 0.
JohnAnthony@lemmy.dbzer0.com · 8 pts · 103d
Beginner mistake, which is perfectly fine! Just use
i-1inside the loop andi <= values.Lengthas the condition.ChickenLadyLovesLife@lemmy.world · 3 pts · 102d
My favorite:
Perfectly valid in C-style, even if it does look a bit puzzling at first.
Gumus@lemmy.dbzer0.com · 4 pts · 102d
That should be a war crime.
ChickenLadyLovesLife@lemmy.world · 3 pts · 102d
From the river to the C
fleem@piefed.zeromedia.vip · 7 pts · 102d
I am so much more down for the memes about fictionalised genius of famous people, where we end up learning a little something
as opposed to the fictional CEO of sex, especially when its in the vein of some stupid FPS from 2012
yay
FEIN@lemmy.world · 13 pts · 102d
vrek@programming.dev · 7 pts · 103d
I never mock those who are trying to learn.
Why is he starting with c/c++? Yes they have uses but not as a starter just playing around.
I struggled with this initially too cause I didn't understand why. Most people would say "give me the first object". In reality your requesting an offset * size of each item + list start.
airbreather@lemmy.world · 21 pts · 103d
This sure looks like C# to me, not C/C++
Sickday@kbin.earth · 8 pts · 103d
It's K.Dotnet
Venator@lemmy.nz · 5 pts · 103d
sometimes it's not interesting enough to keep someone's attention if it's just "playing around": some people need to feel like what they're working on while learning has a real purpose, and some purposes have to use C++ (e.g. Arduino)
sure it might not be the most effective or efficient way to learn, but it can be more motivating.
baatliwala@lemmy.world · 3 pts · 103d
You're taking a shitpost too seriously mate
atopi@piefed.blahaj.zone · 1 pts · 102d
is c++ not a common language to be taught as the first? Its not that hard to learn the basics of
vrek@programming.dev · 1 pts · 101d
Kinda but especially with extremely new, either python or Javascript is recommended. If they are absolutely new, scratch.
atopi@piefed.blahaj.zone · 1 pts · 99d
i have seen arguments against learning python as a first language (when my countries government suggested replacing c++ with python in school)
i may have just had a bad first experience with JavaScript; i wouldnt let a child new to coding anywhere near that language
vrek@programming.dev · 1 pts · 99d
I would say python is good for basics like for what's a variable, how if/else work, how to iterate over a list, the thought process of breaking down a problem into sub problems. Now it's not a good language for going much beyond that. Do not try to make a real time video renderer in python.
Once past that I would say go either front end or backend. If backend c++ is a good option. Now that you know what a variable is we can discuss the difference between a uint32 and a bool. Why we don't use an int variable set to 1 or 0 to determine the results of an if statement. This is also where you learn about memory and how computers actually work.
If front end is the choice, maybe not Javascript but typescript would probably be a good option. I don't know much about front end(I hate doing visual design) so I can't go into much detail. Is there a better front-end language you recommend? Only other one I know at all is c# with blazor or winforms.
The issue I see with jumping straight into c++ is it's so much to learn to do simple stuff. For example a lot of early programmers get confused with working with functions and what return values. I attended a boot camp through work for python(I knew programming hobby level but it gave me a pay raise). There were 12 students, 4 choose to do a selenium script to test a website as a final project, 1 did a script I think for tracking expenses and income but he did it all in main because he couldn't figure out arguments and return values from other functions. This was after 9 weeks, 5 days a week 8 hours a day, plus 4 days to develop the final project. Now throw in what a header file is and the difference between declaring a function and defining a function. It's a lot to start off with.
vala@lemmy.dbzer0.com · 5 pts · 102d
He uses lua
vocornflakes@lemmy.world · 2 pts · 102d
Oh but Lua is so much worse than that. Table keys (array is not a thing in Lua) can be whatever you want. Especially even negative, and not like how python does it. 1 is just the convention.
mexicancartel@lemmy.dbzer0.com · 4 pts · 103d
Haha i use fortran
Codpiece@feddit.uk · 2 pts · 103d
What’s worse, starting at 1 or using AI to write it for you?
pewpew@feddit.it · 2 pts · 103d
rain_worl@lemmy.world · 0 pts · 57d
kendrick lamar reportedly lua