So guys, I wanna learn programming. What language should I start with...

So guys, I wanna learn programming. What language should I start with? I was thinking Python because of the shit I researched. Can you recommend me some books that are actually good for learning it?

Other urls found in this thread:

en.wikipedia.org/wiki/The_C_Programming_Language
youtube.com/watch?v=KlPC3O1DVcg
projecteuler.net/
youtu.be/k6U-i4gXkLM?list=PL57FCE46F714A03BC
twitter.com/AnonBabble

bump

why don't you try to make a calculator?

Python is a good place to start. Most beginner books will be similar. The best way to get good at coding is to code everyday, think of a simple program that you would need and try to make it.

Python and Javascript are probably the best programming language for beginners.

Just go trough codeacademy.com or Learn Python the Hard Way

""Java""script isn't a good programming language for beginners, in fact it's not even a good language.

What are some examples of simple programs that might be useful?

see

I made a income/tax calculator when i first stated coding, I had a casual job at the time and was quite useful.

you could even make a simple game like hangman

C++ would be a better language to learn for a beginner. It's more transparent of what's going on and close to being the lingua franca of programming.

Learn a real language

>60 times
holy shit

One of the BASIC variants like QuickBASIC or DarkBASIC is actually not a bad starting point. It's not object oriented but it's super simple and teaches you some good basics.

C++ or C are good places to go from there. Go with C++ if you want to learn object oriented programming (OOP) and do real world programming, go with C if you want to get closer to circuitry and write arguably better code.

Java is popular because it's somewhat "easier" than C++ but it is also a bad interpreted language (you compile to bytecode which is then interpreted by the JVM). Another major drawback to Java is that Java forces you to do things in OOP ways.

Python is popular but I've never learned it.

PHP is often a crappy language but it's not a bad introduction to OOP given how much simpler it is than C++ or Java.

You could try your hand at x86 assembly. The basics of the language aren't really that hard. However it also isn't very practical and you're not likely to do much with it.

Haskell is good to learn later on (for understanding the ideas and methods of functional programming). Even though you may not use Haskell ever again, knowing functional programming will make you a better programmer overall.

>Javascript
Are you high? Javascript is one of the more difficult more fucked up languages out there. It's object oriented but doesn't have classes. Functions are first class. It has bugs that can't be fixed because doing so would break existing code. It has to be run on a browser.

Probably the easiest approach to learning Javascript is through the Node.js implementation. It doesn't require a browser, has pretty good package management (better than most languages out there unless you're using the Nix package manager), and has a good set of core modules (libraries). The only major drawback (besides those mentioned above) is that it has a bias towards asynchronous code and that may be a bit hard for a beginner. The new ES6 syntax is pretty good.

I took my first steps learning programming independently by using the book Java Programming by Joyce Farrell. You should be able to find a free pdf copy online. It's not the best book out there, but the programming exercises given at the end of each chapter gave it a lot of learning value for a beginner. If for nothing else, get it for those exercises. I wouldn't say it prepares you to make any marketable projects, but it does prepare you to learn more. It's not a great idea to start with some development project anyway. After all, programming might not be for you.

If you do get your footing with programming logic, you can move on to something more commonly used in industry like C++ or Ruby, but what really makes it is working with programming libraries made by other developers.

When one takes microseconds and the other takes milliseconds you tend not to care.

Use the tool that's appropriate for the job.

>they are micro units, so it doesn't matter
Things brainlets say

t. not even a programmer

Do you just want to learn programming in general or is there a specific thing you want to do?

Former: Learn C, you will learn basic aspects of programming in super detail and become knowledgeable about computers in general. You will appreciate the other languages deeply and it will be super easy for you to learn new ones.

Latter: Learn whichever language has an IDE or huge libraries for what you are planning to do. For example a neural network person may want to choose Python because it has super nice libraries for it. If you are interested in graphics you can choose C++ and use OpenGL. So it depends on what you want to do.

But what you are asking is super general. It's so general that every answer including mine can be proven wrong or ignite a flame war.

To add to this. I don't think modern Javascript (in strict mode) with Node.js is a bad language. It is actually a surprisingly good language that has a lot of features. It is also (to the surprise of many) very fast since all of the Node.js modules are actually written in C/C++.

I do not think it is a language for beginners. The only reason you see retarded web designers using it is because they don't actually write in Javascript. Instead they write in CoffeeScript (nicer language that compiles down to Javascript) or they use ridiculous hand-holdy libraries like JQuery that do most of the work for you. There is a new language called TypeScript that compiles down to Javascript and is worth checking out as well.

Javascript has a limited number of data types that make certain things difficult. For instance it doesn't have an integer datatype, only float. Recently Mozilla has been working on a totally ridiculous and hacky (in my opinion) way of writing [a subset of] Javascript (named Asm.js) so that it can run at near native speed (currently it's running at half native speed, which is actually crazy good). Mozilla has also been working on another ridiculous project (named Emscripten) that allows software written in other languages like C to be compiled down to Asm.js so that you can run them in our browser. This is how they got ridiculous shit like the Unreal Engine 4 to run in the browser at near native speed.

>Go with C++ if you want to learn object oriented programming (OOP) and do real world programming, go with C if you want to get closer to circuitry and write arguably better code

Go back to retard

What programming language has benefits in biomedical or chemical engineering research or industry?

I've already been learning MATLAB extensively, I know Excel is needed as well. Does anyone know any good books for learning Excel for engineers?

Should I start with Python as groundwork or C/C++?

I mean, I could see the argument for a program that doesn't have a lot of code, especially for a beginner. If you're just looking for an easy language to learn on, why not try with Python or VisualBasic or something to that effect? Just learn the principles making shit like calculators and decks of cards then work over to something a little better like C++ or C# once you understand programming logic.

If you're trying to do anything serious, then it becomes a problem real quick. Fortunately, since Python sucks for OOP, you can't really do anything serious with it.

When we are talking about business, Speed and file fize is very important.
There's c++ for things like that.
For now he will be fine with python

This is the entry level coder cynicism.

Python will teach you good habits and good concepts.

>opinion
>t. someone not qualified to have one

Should I start learning C or C++?

> *C or C#
ftfy :^)

If you start with C, C++ will make more sense later.

Oh wow starting on c? Just fucking stab yourself in the eyes bro.

There is a reason why Pythons's compiler is called CPython.

Start with C. When you get comfortable with it switch to a more productive language.

w-w-why? i like challenges...i think

It's not a good first language. You have to do way too much shit to do even the simplest things. As an example, you have to include a library just to get a "Hello world" program up and running. You want to store "Hello world" to a string first? Well, too bad because C doesn't have a string data type. If you want something that behaves like a string, then you need to declare a char array. Then you can use the pointer to that char array variable like a string. You're going to have fun learning about pointers.

This is just the basic stuff. This is just the stuff you need to get very simple programs up and running. If you start with C you will get bogged down with all of the idiosyncrasies that other languages based on C dropped. It's good for programming operating systems (which is what it was designed for) and not much else. Don't get me wrong, Dennis Ritchie was a real fucking genius (as opposed to a fake one like Steve Jobs), but starting with C is like learning math by starting with calculus, skipping algebra and trig. I suppose it could be done, but why would you want to?

learn functional languages.
The classic one to learn is scheme, but I recommend using racket as your first language. It's well documented, and is basically scheme but with as many libraries as python.
I recommend learning from a book called realm of racket.
If you wanna learn lisp instead, read land of lisp.

R

R is a bad idea. You should really learn a decent language first so that you can properly appreciate how bad R is if you ever find yourself in the unenviable position of having to use it.

brainfuck

FORTRAN

You'll learn shit habits. I started on 8-bit BASIC and 6502 asm and still haven't gotten over it. Python is the best language to start out on.

C and C++ if you're an engineer.
Mathematica or R or MatLab or Haskell if you want to do math
Python if you want to automate stuff on your computer and/or make small programs

Someone who isn't a programmer would actually believe that garbage.

You're arguing that a top down approach is better. Learning from Assembly -> C -> OOP languages is going to make you a better programmer overall, and doing it in reverse is how you pick up bad habits.

No it's not. Good programming is algorithms and structure, not low-level tinkering.

A combination of algorithms + structures along with low level thinking is going to help provide efficient, succinct code compared to someone with zero understanding of low level thinking.

I'm not that guy but unless you're programming in a language built around heavy abstractions (like Haskell) then it's good to understand how that shit is working under the hood so that you don't accidentally do retarded shit. No need to do any low-level tinkering.

It's like how a person that understands how their operating system works under the hood will be less likely to fuck it up in a dumb way.

Well, I would suggest that you should learn the basics of different variable types and smäller algorithms with a simple language - Basic, Ruby, Matlab. You don't need to master them, just get an idea of how the computer executes code, interprets data types, what conditioning and loops are. Most languages are similar in that way.

You can then move on to object orientation - Java, Python, etc. Here, the code statements will be similar, but you'll learn to build more complex code.

I don't know where C fits in all of this, haven't had any experience, but i suppose it is the next step?

>C# or F#
ftfy (^:

if you don't know low level you're going to shoot yourself in the foot and make silly mistakes often

Also interested

Give one example.

>It's object oriented but doesn't have classes. Functions are first class.
>implying those are bad

someone implements an algorithm that requires lists with random access (say something like dijkstra or some simple graph algorithm that he learned in class) and uses python dictionaries instead for ease of access (say he wanted to name the nodes instead of using numbers, who knows)

it turns out the keys they use hit the default hash function hard and it runs really slow, not even close to the performance he expected. he didn't know dictionaries didn't have constant time access.

-------------------------------------------------------------------------------------------------------------

someone's using C# and loves the expressiveness of LINQ. so much, that he starts using things like contains often. he doesn't realize that using contains in a list has a linear complexity, because he's used to contains being a fast function in hashmaps. this results to a terrible performance for the application.

haskell
its god tier
srs

why?

Learn both Python and C.

They're very orthogonal in use and therefore complement each other well.

You can build extension modules for Python in C.

what a good book/resource for learning C? Also what makes it different from C#?

its very mathematical

expressions can be exchanged
srs, look at at a simple definition

abs n | n < 0 = (-n)
_____| n >= 0 = n

its type safe
syntax is hot

and also, fp

Not that guy, but in C++ you can create a class constructor with an initialization list like this:

ClassName(T x1, T x2,...) : ClassName::InnerVariable1(x1), ClassName::InnerVariable2(x2),...
{}

Instead of

ClassName(T x1, T x2,...)
{
ClassName::InnerVariable1 = x1;
ClassName::InnerVariable2 = x2;
}

You probably can't tell the difference. They both produce the same thing. The difference is that the first method only uses initialization, but the second method uses initialization and a call to the = operator. For small parameter types, this doesn't matter. However, if you have a large parameter type you want to copy, then the doubled time of construction will be noticeable. I would consider this useful, no?

what a good book would you recc for learning Haskell?

learnyouahaskell

or go to lainchan and ask for books in the lambda board

never heard of this shit before, why the fuck does lainchan look so spooky

its for le leet haxors / cyberpunks
its /g/ incarnate

They're most definitely not bad, especially Javascript's flexibility also allows one to create lambda expressions and anonymous functions. Scope chains and closures are also nice.

No, what I was saying was that they are not the sort of features that you want to throw at a programming beginner. Even experienced programmers may find themselves initially frustrated by Javascript's "weirdness".

K&R from the 80s is actually a pretty good book. A lot of people talk shit about it saying that it's hard but it's actually very similar to any other beginning programming book. Honestly, give it a try before you pass it up (I made the mistake of avoiding it given what I'd read).

en.wikipedia.org/wiki/The_C_Programming_Language
You can find PDFs fairly easily. Make sure to read the second edition (first edition has some old ugly notation for functions that never caught on).

I don't know much about C# except that macfags use it a lot.

thanks for telling me about it, idk shit about shit so ill just lurk

Matlab and C++ are top priority. Python is used for smaller things

C++, C is obsolete.

youtube.com/watch?v=KlPC3O1DVcg

Seconding LearnYouAHaskell.
Yet Another Haskell Tutorial is worth taking a look at as well (it moves very quickly compared to LearnYouAHaskell but it has several gaps in explanations).

I don't recoomne yet another haskell tutorial
it doesn't approach it very well

learn you a haskell mostly uses things you learned previously

yet another haskell tut just drops IO without mentioning what it is (at first)

is lisp the most powerful language?

i can program quite well, but i have no idea how to set up a website with member functionality like signing up or signing in, posting in threads, etc. Although, I would really like to learn to write such a website. I think I have to learn php or the like? Any tipps where to start? Javascript shouldn't be a problem if needed

>Rust, C++ is obsolete
ftfy

>all this dick swinging

Start with Python. The syntax is intuitive and you won't have to bother with OOP yet.

If you're a math guy you might also like Haskell.

just go with python

>C++
>not C or asm

Nice way to move the goalposts. Regardless, no matter how you cut it C++ is never going to be classified as a beginner language.

Start with Python and cherrypy. Look into django when you're feeling horny.

Out of the box Drupal does that for you but it's php. Drupal or Turbogears let you build similar things pretty easily. Nodejs is also a hotness.

Fuck off.

What language should I learn and what "fields" as someone who is going for a Telecommunications and Electric Engineering major? Sorry for the retarded question, I don't know the first thing about programming, I learned some C++ in high school but never bothered to go above things like dynamic programming

Aren't you going to school to learn that? Why be autodidactic in light of beginning a major? FWIW I studied various CPU architectures, Pascal and C when I did my EE but that was like 25 years ago.

I looked up the courses and I have some programming classes so I will wait until then. What advice would you give to someone like me who is just starting this major? Did I choose right, there seems to be this eternal debate between CS and EE.

If you're not interested in the field, prepare your anus.

agree with the JS part, don't agree with any of the rest

go with Python, OP. learnpythonthehardway is good, but it doesn't really matter all that much in the end. have fun.

>consumer technology board
>programming
Wat?

projecteuler.net/
The single best way to test your programming knowledge

>what is /g/dpt

Then why is everyone shilling me to start with C, and then learn C++?

Python, C, ASM, on this order
Maybe some Lisp for fun on the side

Don't learn: Java, C++, C#

Why not C++? Isn't that used very much in industry now? It's mentioned all over Veeky Forums science wikia

There is nothing you can do on C++ and not on C. C++ programs are much slower. If you want to go OOP and fast coding go for Python. C++ is a freak of nature people get into without knowing.

Which part of that is wrong?

You don't learn programming from books, you learn it from trying to build things; checking stack overflow when you're stuck; improving your working code, and then building something else.
You should learn about the fundamentals of programming (data structures, complexity, objects/classes, etc...) from a book, but not any specific language.
That being said, python is a good language to start with.

C, c++, python, asm
In this order
>C++ programs are much slower
Citation needed
Only compiliation is slower, but a rookie won't notice it since you can only feel otbon bigger projects

Go with Python and start here

youtu.be/k6U-i4gXkLM?list=PL57FCE46F714A03BC

Underrated post

>C++ programs are much slower
...and you have no idea what you are talking about.

So many posts, so little substance. Most of the thread just looks like dick waving and opinions to me.

The most concrete answers, right here.

I say evaluate what you want to learn programming for and just learn the language that best suits that job. Might as well get to where you wanna go as direct as possible instead of beating around the bush.

That was my first post in this thread, buddy. I just wanted to give an example about how knowing the lower level nuts and bolts of a language can be useful.