[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

How to start coding?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 15
Thread images: 5

File: CPlusPlus.jpg (36KB, 433x455px) Image search: [Google]
CPlusPlus.jpg
36KB, 433x455px
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
>>
File: 1482336698842.jpg (161KB, 792x907px) Image search: [Google]
1482336698842.jpg
161KB, 792x907px
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?
Google
Don't know how if statements look in C++?
google cpp if statement syntax
Want a list of variables in python?
google python lists
>>
File: capekino-vs-capeshit.jpg (423KB, 1860x1400px) Image search: [Google]
capekino-vs-capeshit.jpg
423KB, 1860x1400px
>>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.
>>
File: retarded-only-pretending.jpg (34KB, 349x642px) Image search: [Google]
retarded-only-pretending.jpg
34KB, 349x642px
>>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
>>
File: c++ in all its glory.png (64KB, 1087x858px) Image search: [Google]
c++ in all its glory.png
64KB, 1087x858px
>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
Thread posts: 15
Thread images: 5


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.