Hello /g/. I am in my senior year of high school and I have decided I will be learning computer science in college. The college requires a course of Python. However, I am willing to learn multiple languages. I want to learn C++ first. The thing is, I don't know where to start or what habits to build. How do I learn C++ or Python and consistently learn? What resources?
>>58205199
If you can't program in senior year of high school, studying CS is probably not the best idea
Learn C# first. C++ is too complex to start with
go for mis. you can boss around the cs and ee types without any stress.
>>58207557
fix
Every language has it's own shitty quirks. C++ has the most quirks of any language. I would suggest you start with Python because it has less quirks that get in your way and you have to remember. After your first language just learn any language you like.
babby basics:
Use this website to run python skripts.
https://repl.it/languages/python3
Install python locally if you want to write real applications and please use a fucking text editor like Sublime Text give your files the .python extension.
Imperative programs are a sequence of commands not mathematical formulas.
They will be executed from the top to the bottom.x = True
print(x) # prints True
x = False
print(x) # prints False
is valid because the = operator writes the value False to the memory cell called x
The equality operator is ==. The if statement allows you to define multiple paths depending on a condition (any boolean expression).x = True
y = False
print("Result is:")
print(x == y)
if x == y:
print("x and y are equal"); # executed if x == y results in True
else:
print("NOT equal"); # executed if x == y results in False
will print x and y are not equal.
Next is repetition. What if we want to sum 1 + 2 + 3...?i = 1 # initialise counter
sum = 0
iterations = 5
while i < iterations: // repeat if i is smaller
sum = sum + i
i = i + 1 # set i to the current value of i plus one
print(sum)
Next come functions.
You can define your own functions or use functions someone else has written. Functions can also return values.def greet(name):
print("Good morning")
print(name)
return 123
x = greet("Alex")
print(x)
# above is the same as manually writing
# name = "Alex"
# print("Good morning")
# print(name)
# x = 123
# print(x)
>What resources?
Don't know how if statements look in C++?
google cpp if statement syntax
Want a list of variables in python?
google python lists
>>58205939
what the fuck are you talking about you littlte dweeb? i'm really confused. OP sounds like he has never tried programming, so why are you using "can't"?
not every highschool offers programming at any time in the four years you are there.
>>58205199
I can't give advice, but as someone who just went through the *break in* year of programming, I went.
BASIC (abandoned)
C
Python (current use)
CSS
Javascript (current use)
C#
C++ (current use)
>>58207651
it took you four years to finish highschool?
Don't bother with a higher education.
>>58207672
>>58205199
It depends on what you want to do with programming.
If you just want to learn general stuff, start with something simple and then work from there.
I started with going through the tutorial, it is mostly C stuff, but you learn the basics.
For each chapter they went through something specific I then used to make small applications to use that.
Stuff like read a file, write to a file, make a class, use raw pointers, use smart pointers etc.
If you are a visual person, ppm files are a image format where you write the pixel values as a csv file, very good if you want to make a small image processing application without using external libraries.
When you feel comfortable enough with making small things you should use bigger libraries.
STL is good for general stuff.
Qt is good for GUI's.
Eigen is good for math.
OpenCV is good for computer vision (although they do a lot of things you shouldn't in your own stuff).
PCL is good if you have to work with point clouds.
If you start with these, you can do a lot of things.
Also they all have tutorials, examples and stuff you can learn from.
why are there so many who want to learn c++
most of the people who ask don't really benefit from the lower-levelness of it
>>58207991
It is a good general language where you learn programming instead of learning the language.
You can use it to jump into low level stuff or you can stick with high level programming
>>58208152
but so is python
>learning C++ as your first language
Boy, you're in for a treat. C++ is the most complex and tricky language used in production. It's immensely powerful, but you'll go crazy learning it. On the plus side, after you know C++ and it's 10 billion pitfalls, any other language is going to be a walk in the park.
Pic related, it's C++.
>>58207991
Because video games