I decided yesterday that I' like to try to learn programming. The only thing I understand about it is that there are many different programming languages... where do I go from here? Any sort of information would be appreciated.
What kind of computer experience do you have?
I'd complain that there already is a thread with almost this exact topic, but on second thought it is very, very shitty, so let's pretend it doesn't exist. In the future, though, take some care to check if there are already threads about the subject you want to discuss.
Anyway, http://4-ch.net/code/kareha.pl/1109963434/ discusses the problem from the opposite point of view. It may give you some clues, or it may not. Worth checking out, though.
do you go to school? go take a class at school.
I think learning to program at school is one of the worst ways to start off, unless it's being taught by an exceptional teacher.
>>2
My experience with computers= prowling around the internet for about 2 years. I learnt to copy and paste a few months ago. lol.
>>3
Usualy, i do check, this time i got lazy. sorry, lol. I'll go look at it. thankyou.
>>4
I go to university. I have no time for any more official classes. This would have to be something i learn when i have spare time.
>>5
Good.
Programming will change your life, and if you don't make it until the end it will change your life for the worse.
Are you prepared for that?
At first you will be in confusion, that is normal.
The more general knowledge you have the better.
Try a programming language like PHP.
While PHP is horrible it'll teach you some basic stuff.
Then you can choose to be hardcore and attempt to learn C (you will fail, first time won't work)
Learn some more stuff about networking, how computers work, etc then attempt C again.
Once you learn C, read about more abstract stuff such as algorithms and more specific stuff such as IPC, networking, implementations of [..] etc.
Also, learn scheme and if possible haskell. they are very handy, even though you will rarely use them.
Stay away from PHP, ruby, perl, java and all those horrible languages, which are, at most, useless.
You don't want to learn programming languages, you want to learn about concepts and paradigms, and learn a language or two at most. (C, Haskell, scheme, perhaps C++ at a later point)
Stay away from tutorials. Try to get some books on subjects that interest you, and try to get good books.
Stay away from people in suits with flashy certificates using big words pretending to be programmers.
Try not to become a fanboy of C/UNIX/Haskell/etc.
Do not waste your time trying to argue about these, or trying to prove while one is better than the other.
Once you become a programmer, time is the most valuable thing you have.
> Try a programming language like PHP.
> Stay away from PHP [...] and all those horrible languages, which are, at most, useless.
> Then you can choose to be hardcore and attempt to learn C.
> Try not to become a fanboy of C...
Good sir, your logic is flawless and I would like to present you with an award!
>>8
Hardcore because ISO C has a lot of semantics, not because C is 'fast' or has 'pointers' or 'memory management' or whatever the hell a newbie programmer would spit out when asked about the benifits of C.
If you can understand ISO C you can properly isolate concepts and then understand how and why they are related.
>> 9
> If you can understand ISO C you can properly isolate concepts and then understand how and why they are related.
Could you elaborate? I've been using C for many years, but I can't really break it down into "concepts" and whatnot.
I am part of an elitist superstructure that advocates assembly as a starting point for beginners. Hell, we advocate that ALL programmers use assembly for ALL tasks.
> Could you elaborate? I've been using C for many years, but I can't really break it down into "concepts" and whatnot.
ISO C has very loosely defined terms and no system-specific functions or operations.
ISO has defined a number of rules that any standard C implementation must conform to.
Once the reader understands that, he understands what a standard is, what an implementation must conform to and what he really writes.
Then, he can also understand what POSIX is, what IEEE does, why, for example, fgetpos()/fsetpos() exists, why my libc is not your libc however both standard, et cetera.
After that he can also understand why there are file formats and protocols, what to do when two standards overlap, what is a library, why you would want to use one, how to write portable programs with a standard in mind and other stuff.
Isolation and abstraction, two very importand concepts, will be learned properly if one reads and understands ISO C 9899 1999.
>>1
Get a Scheme interpreter for your computer. Then go read the wizard book. http://mitpress.mit.edu/sicp/full-text/book/book.html
>>13
While SICP is a very good text, I personally think it's not a very good introduction. It's a great second text once you get the general idea of how to think in terms of algorithms and program structure, but it really can be confusing to start off reading it with no prior programming knowledge.
The problem is there's no really good beginner's text, so far as I know, that tries to teach the general fundamentals of programming. That is, I really wish there was a book that went something like "ok when you're writing a program you have loops and stuff, and here's how they work diagram now suppose you want to handle input of some sort flowchart" rather than focusing on a particular language.
Unfortunately, it turns out that the mathematical purity of functional programming does not translate into intuitive simplicity or easy of learning. Imperative languages remain much easier to beginners to learn.
SICP is pretty stiff for a first text, unless you're a physicist or mathematician by vocation. Most people in CS are afraid of math.
I've heard good things about HtDP as an alternative. It too uses Scheme and is free on the web, but has less of that scary math and seems more focused on real-world issues.
Or you could just fire up something like Python and start playing around with some tiny examples. It's the best way to do things.
``Write a procedure that takes 3 arguments and returns the sum of the squares of the two larger values''
>>18
One example of many, and my point stands. Anybody who doubts is free to look at any random section of SICP.
I rather suspect most people starting to play with languages do not give a hoot about random things like the Fermat test. They're having fun, and the math is a boring chore that's quite besides the point; things like bouncing sprites is more like it. If you like math, good for you, but most people appear to need something a bit more concrete than shoveling numbers around for no apparent purpose.
I believe math pedagogy is one of the worst out there, which is why so many people falsely believe it's dull. Ask yourself why so many people manage to (re)teach themselves linear algebra when they discover they need them for pretty pictures.
We really don't need that kind of inept teaching creeping into other disciplines. SICP is not a good beginner book.
>>19
Fine, you are correct.
I would not suggest SICP to someone who doesn't know programming at all.
SICP, however, is a great book.
Also, off-topic but I have this feeling that everyone is misusing sage here.
Unlike imageboards, sage is not an insult. Within imageboards, many users can "sage" a thread filling it with enough posts to have it filled, and thus no longer able to reach the front of the board. Since it takes 1000 posts to close a thread in Channel4, this method is futile and you will just clog up a perfectly good thread, which could get your posts deleted, or even get you banned.
>Most people in CS are afraid of math.
lol that explains why I know so many CS graduates who can't program.
OP, if you can copy and paste bits out of The Java Cookbook you can get a job as a programmer.
... And if you can more-or-less understand what it does, you can get promoted to project manager.
i went to college for 2 years studying CS. i took classes in data structures, c++, java and assembly (as course requirements). i liked java because it made sense to me. of course i can see the use for c++ in certain areas (not my kind of areas).
i got a part-time job programming web sites for a startup company who was looking for students with work-study financial aid (they paid me half and the school paid the other half). after 2 months they offered me a full time job and i took it.
4 years later i'm working at a bigger company doing web development in c# and php (depending on the application) and making more than my parents (who are in PR and construction).
the bottom line is: learn something you like to do and start doing it for money as soon as possible. i still owe the state about a quarter of my salary for the 2 years and no degree.
>>24
Strongly attesting to your last statement, I'm in the same situation. Sometimes the trouble is getting your foot in the door, but if you live in a decent sized city and are doing more to look around than just sitting the couch, it really isn't nearly as difficult as some people make it seem.
>>18
Another way would be to compute x^2 + y^2 + z^2 - min(x, y, z)^2 where min(x, y, z) is defined as follows:
x if(x <= y and x <= z)
y if(y <= x and y <= z)
z if(z <= x and z <= y)
Dunno if there's a slicker way to test for the minimum of more than simply two numbers, but it's not bad for a naive function.
>>26x<y ? (z<x ? z : x) : (z<y ? z : y)
Amicoolyet?
>>28
((x)<(y)?((z)<(x)?(z):(x)):((z)<(y)?(z):(y)))
you should try using Qbasic its easy as pie and its what L33t hackers use to progRAM!
"I wanna learn programming" is bit vague.. you want to learn how to make things with computer I suppose, but a question like this will only get you canned replies:
* programming is hard, first you'll need to develop an analytical mindset using mathematics
* you need theory first, read SICP
* you can't program before you know how a computer works, learn assembly.
* and the classic: X is a disgusting language, stay away from it, use Y
None of these replies are completely wrong -in fact they're laregely correct- but they're not very useful either. Are you really going to start reading books? I didn't... Do you want to know assembly? What's up with these replies than?
It seems like a fucking chore now, huh, "learn programming"? Well, the truth is: yes, but you don't need to worry about it. Because you probably don't even want to learn how to program, if you're like me [b]you just want to build shit[/b]. a website, an IRC bot, some small tools ... shit such as that.
Well, [i]that[/i] is not so hard... and as with most things in life you don't need to be very talented to do such things, just interested. start copy pasting in a working codebase of some language that you think will be able to use for your tool (both the codebase and the language). Don't go read to many tutorials or whatnot, just try things. Welcome to the hacker mindset. After a while, all by itself, you will start reading tutorials untill your eyes drop.
It should be mentioned though, that having a very solid mathematical background allows you to progress a lot faster: Haskell for example was a breeze to me because I already knew most of the concepts. But I would have never chosen to get the background if I didn't spend 4 years in highschool hacking PHP and mIRCscriptings :D
in short: don't waste time learning to program before building stuff. simply take a working program and start extending it. mIRCscripts and PHP websites are what i used for this.. and it worked.. but that was 10 years ago. Right now i'd go with python (but ask some younger anons first)
>>31
Hello /prog/ regular, we don't use bbcode here ;)
>>1
You can learn the Ruby programming language in 15 minutes at this website:
It'll give you a feel for what computer programming is like, without having to hit the bookstore or install weird things on your computer. And it'll make learning other languages easier if you just get started on one.
LISP
Ruby / Python / Pascal (old as crap)
any of these are good to know or start with
>Stay away from tutorials. Try to get some books on subjects that interest you, and try to get good books.
Strongly agreed. In particular, the "tutorials" which are just "copy this code into the editor, do this, do that, and it'll work"; if the author doesn't know exactly what he/she is writing about, then it becomes a case of the blind leading the blind.
I'll start off by saying that computer programming has a VERY large body of theoretical knowledge that goes with it; unless you want to just "learn programming" and become an ad-hoc code monkey, you WILL have to learn the theory, and this entails a not so trivial amount of mathematics (especially working with integers). If math is not a strong point for you, programming will likely not be one either.
As for the actual material, I recommend a mix of both theory and practice for the beginner; the two textbooks for my introductory programming courses are K&R and SICP. The former for learning the C language itself, and the latter for the theoretical principles.
Another area that should definitely be studied but perhaps with less intensity is the low-level stuff -- CPU, memory, boolean logic, Asm, etc. For this, it's sufficient to understand only the basics how a computer works, so grab e.g. a Z80 or the Intel CPU manuals and give them a quick read.
In addition, don't be tempted to go with whatever fad language seems to be popular these days; once you grasp the theory (via SICP) and the general semantics of procedural languages, any other procedural language should be easily learned -- providing that you have been educated in the right manner; tying concepts to syntax will almost certainly be a pitfall of this, as instead of understanding e.g. the way a loop works, one memorises the syntax of a loop, unable to adapt to a slightly different syntax of another language.
>>34
Err... I can only think of one phrase to describe that: WTF?
OP, go read SICP and K&R (both can be found on the Internet, the latter a little more difficult to locate but it's a PDF). If you are interested in what you see, then you'll enjoy learning programming. Otherwise, you'll probably get to hate it.
>If math is not a strong point for you, programming will likely not be one either.
It's funny, I used to think maths wasn't a strong point for me but then I got interested in theory of computing and discovered that it is.
Otherwise I agree with and endorse this post.
Go back, /prog/, &c &c