Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Beginners programming

Name: Mr. Oak 2009-12-17 16:22

I'm sure you have seen this thread a million times, so once I get a satisfactory answer I will let it die/sage

What should the first language I learn be?
What program should I write it in?
What's the best compiler for the language you are advising me to try?
Should I do my work on Linux or Windows?
Best book, or site that will teach me the language?
Any other thoughts?

Name: Anonymous 2009-12-17 16:25

Python, vim, CPython, Linux, Google.

Name: sage 2009-12-17 16:29

Scheme, emacs, anything but PLT, Linux, google, sage

Name: Anonymous 2009-12-17 16:35

>>3
If he's going to be using Scheme, there's only one book he'll need, and Google is superfluous.

Name: Anonymous 2009-12-17 16:48

Guys we're supposed to be the most unhelpful board ever :(

OP: are you CKCS1DOi?

Name: Anonymous 2009-12-17 16:53

What should the first language I learn be?
I hate this question, and I hate people who think it has a real answer.

Now back to 7chan or whichever board I saw you post this on before.

Name: Anonymous 2009-12-17 16:58

>>5
YOU UNHELPED HIM!

Name: Anonymous 2009-12-17 17:13

Haven't I seen it on 7chan /pr/? And replied?

Name: Mr. Oak 2009-12-17 17:44

>>8 yes, and >>5, yes again.

Just getting a good spectrum of ideas. This is where my search ends.
also, >>5, look at these gents be helpful. Isn't that awesome?

Name: Anonymous 2009-12-17 17:45

What should the first language I learn be?
MicroSoft Visual GaySick

What program should I write it in?
Fib

What's the best compiler for the language you are advising me to try?
MicroSoft Visual GaySick 6.1

Should I do my work on Linux or Windows?
Yes.

Best book, or site that will teach me the language?
http://msdn.microsoft.com/en-us/vbasic/default.aspx

Any other thoughts?
You are an anus.

Name: Anonymous 2009-12-17 17:53

>>10! I LOVE YOU SEXUALLY! I LOVE YOUR POST SEXUALLY! I MASTURBATED 5 TIMES! KEEP POSTING!

Name: Anonymous 2009-12-17 18:03

I wanted to say thank you to Microsoft. Visual Basic has made IP tracking simple and painless. In less than a week we were able to “run” IP-fingerprints against a Microsoft SQL Server 2008: Enterprise with speedy results. That is why we have chosen Visual Basic for our IP tracking.

Name: Anonymous 2009-12-17 18:29

>>12
what?

Name: Anonymous 2009-12-17 18:57

>>12
I thought we all agreed that we aren't like those reddit heathens.

Name: Anonymous 2009-12-17 19:36

>>1 Python

Name: Anonymous 2009-12-17 19:40

What should the first language I learn be?
One language isn't enough to be a good programmer. Learn some assembler, C, Lisp, ML, Haskell, Prolog, C# or Java to get a taste of everything. Assembler to learn how your CPU works, and how things work in practice. C to have a low-level language that you'll actually write in (ASM you might write some, but I doubt many sane people write large-scale programs in it). Lisp to achieve satori, learn a couple of other programming paradigms, and actually gain a very solid tool/high-level language. ML and Haskell to get a taste of static typing, type inferrence, pattern matching, and purely functional languages and how they work in practice, see this as a continuation to that satori-achievement quest. Prolog for logic programming, theorem proving, and other fun stuff. C# or Java to see how they do things in the ENTERPRISE, seeing the huge compromises they've made, the broken single-dispatch OO system, and knowing it may be useful for getting a job.
What program should I write it in?
Write whatever you want. I suggest starting with implementing things which you can do portably first. Real-world programming tends to involve a lot of messing with external libraries, FFIs, import bindings and other things that you need for fancy GUIs and real-world applications, but you can learn those things easily by reading your implementation's documentation and your OS'es technical documentation - it's not something you want to do first.
What's the best compiler for the language you are advising me to try?
Most of those languages have multiple implementations, and many of them are good or acceptable, which you choose depends on your needs and preferences, here's a few examples:
x86 ASM win32 - MASM
x86 ASM *nix - nasm
C *nix - gcc, icc
C Win32 - MS C Optimizing compiler, icc
Common Lisp - SBCL, CCL, Allegro, Lispworks, CLisp, ABCL
Scheme - PLT, Guile, Gambit
SML - SML/NJ, MLton
O'Caml - O'Caml/metaocaml
Haskell - GHC, Hugs
Prolog - GNU Prolog, Visual Prolog, or just one of those embedded ones
C# - .NET or Mono
Java - JVM
Should I do my work on Linux or Windows?
Use what you want/need. The platform is not as relevant, but you may have to write platform specific code, and it pays to write platform specific code depending on your need.
Best book, or site that will teach me the language?
x86 asm - Intel manuals
C - K&R
Common Lisp -  A Gentle Introduction to Symbolic Computation (read if you're a complete newbies), ANSI CL, PAIP, Practical Common Lisp, On Lisp, maybe AMOP and of course the Hyperspec1
Scheme - SICP(not a Scheme book, but you learn it as you go)
ML - There's a bunch of freely available versions of some O'Caml/Caml manuals, they're decent.
Haskell - YAHT, RWH, LYAHFGG
Prolog - Logic, Programming and Prolog, and PAIP  has a chapter on it
C#/Java - I have no idea what a good book would be, I just picked some random "Learning XXX" book and skimmed through it to understand most of the language.

As with all languages, you'll only learn if you write a lot of code in them, otherwise you'll forget them if you don't use them.
Site - Some of those books are freely available, google is your friend.

This thread reminds me that I should also learn Smalltalk someday, I hear it teaches some very interesting ways to do OOP, not as flexible as CLOS, but I'm sure I'll learn something new from it.
Any other thoughts?
There's no one language that fits all, you need to know at least some 3-4 to be able to handle everything that is thrown at you. You could skimp by with only one, but it's a bad idea unless you just want to be a code monkey.

Name: Anonymous 2009-12-17 20:34

Perl. Every family should have a toolbox.

Name: Anonymous 2009-12-17 21:25

>>16
IHBT

Name: Anonymous 2009-12-17 23:57

>>3
anything but PLT
dicktower

Name: Anonymous 2009-12-18 1:12

RAII is the heartiest, chunkiest, and most delicious of programming metaphors. Every day I write two bowls full of RAII. Broccoli and cheese is my favorite kind but usually I get tomato, because if I eat too much broccoli, I hax myself. The tomato is very good as well, though. It has actual chunks of tomato, which is not something you'll find in a typical programming metaphor. The thought of those tomato chunks on my keyboard is enough to make my mouth water. Another good kind that I like is beef and barley. The beef has to be manually managed but the broth and the barley make up for it. Basically RAII is something everyone should try once, even if it kills them. My brother worked on a prototype of the THERAC-25 and he died of RAII, but his last words were "It was delicious."

Name: Anonymous 2010-01-31 13:49

>>12
LOL CSI

Name: Anonymous 2010-01-31 14:27

stupid thread, there is one of these every goddamn day.

1. Python
2. anything you want, notepad++/gedit/kate
3. CPython (the official interpreter www.python.org)
4. anything you want
5. Hello World (http://www.manning.com/sande/).

Name: Anonymous 2010-01-31 16:13

1. C
2. vim
3. Microsoft's C++ Compiler, although I would suggest starting with the gcc.
4. Linux
5. Google
6. I think it's easier to start with C and work up, then start with Python and work down.

Name: Anonymous 2010-01-31 16:14

>>23
Also, for 4., I'd recommend starting on Linux, and then moving towards Windows.  Linux is easier to pick up, but Windows is where there are users.

Name: Anonymous 2010-01-31 16:44

>>24
>Linux is easier to pick up
>implying learning to type pages of cryptic commands all day is easier than clicking Next-Next-Finish

Name: Anonymous 2010-01-31 17:08

>>25
Looks like someone hasn't used JEWBUNTU.

Name: Anonymous 2010-01-31 17:17

>>24
>>25
Two fags in a row. Windows is ancient, and the user no longer needs it.
Learn to program under Linux, and you'll get the ability to work on both Linux and MacOS.

Name: Anonymous 2010-01-31 17:18

>>22
2009 you retard

Name: Anonymous 2010-01-31 17:19

>>25
He wasn't asking about using the operating system, he was talking about programming.  I personally found Linux to be more intuitive to start programming in than Windows, but I started programming on Linux.  I also think that Visual Studio requires an understanding of programming before you can use it, unlike the gcc which is pretty simple to do simple tasks.

Name: Anonymous 2010-01-31 18:18

>>29
I also think that Visual Studio requires an understanding of programming before you can use it, unlike the gcc which is pretty simple to do simple tasks.
I think you're confused.

Name: Anonymous 2010-01-31 18:30

Go learn whatever the heck you feel like. As for the platform don't listen to >>24 or >>25 they are retarded. Programming is ( or should be as much as possible) platform independent.
It usually is easier to compile stuff under linux because there are much more tools to use, but if you want to learn programming and know nothing about linux donÄt bother with starting with linux just to be able to compile, link etc stuff easier. (Link not as in >>72 but as in link different object files to a program together you'll know what I mean once you start learning how to program)

Name: Anonymous 2010-01-31 18:56

>>28
Oh god damnit, I got had by another fucking necro.

Name: Anonymous 2010-01-31 20:07

>>30
Don't get me wrong; I think Visual Studio is far superior to the gcc.  On the other hand, it is much more cumbersome for a new programmer to try to figure out how to setup a new project, especially if it is a Windows project which comes with tons of already written code that you have to understand, then a simple gcc -o myprog myprog.c

Name: Anonymous 2010-01-31 20:24

>>33
I write all my programs using gcc -x c -o program -, then I disassemble the output and hand-optimize it using a hex editor.

Name: Anonymous 2010-02-01 7:32

>>33
PROTIP:Comparing apples and oranges are fun. Let's start with how orange an apple looks.

Name: Anonymous 2010-02-01 10:02

>>35
It's not apples and oranges when those are probably what you will use to compile on the two platforms.

Name: Anonymous 2010-02-01 11:17

Name: Anonymous 2010-02-01 12:04

>>33
My point is: with gcc, you have to understand more - what is compilation, what are translation units, perhaps how to compile them separately into object files and then combine together. VS just gives you a project and hides all of that away, therefore requiring less understanding.
This is in direct opposition to your >>29; however, you could argue that since you specified
an understanding of programming [emphasis mine]
and compilation and managing a project isn't programming, my point is invalid.

Name: Anonymous 2010-02-01 13:50

>>38
Nothing stops you from calling MS' C compiler directly or tweaking how VS builds the executable yourself. For small applications(>6 source code files), I just call cl directly.

Name: Anonymous 2010-02-01 14:59

>>36
Visual Studio is not a compiler. Visual Studio is a software development environment. GCC is a software compiler. If you want to compare something, then compare MS Visual C++ compiler or KDevelop.

Name: Anonymous 2010-02-01 18:50

>>40
I was comparing Microsoft's C++ compiler (which is usually invoked in VS) to GCC.  Reread.

>>39
That's true, and I never thought about it.

>>38
Yeah, that's about when I think it makes sense to use an IDE.  Usually I find people have trouble getting into VS when they don't know anything about programming, while you can tell them a simple shell command like gcc -o outname srcfile.c and they can manage well.  But like >>39 said, you can invoke the MS compiler directly.

Name: Anonymous 2010-02-01 19:30

>>39

">" means greater than
"<" means less than

Name: Anonymous 2010-02-01 20:17

>>39
Interesting. Can you call the debugger directly? Is there a command-line interface?

Name: Anonymous 2010-02-01 23:49

>>43
Yes, there's actually multiple debuggers depending on what you want to debug, and there's quite a few third party debuggers for Win32 as well. Look at Microsoft's "Debugging Tools for Windows" if you want the the gdb equivalent for windows(both user and kernel mode, remote and local debuggers).

Name: Anonymous 2010-02-02 3:00

>>41
I think Visual Studio is far superior to the gcc.
Cool story bro.

Name: Anonymous 2010-02-02 3:08

>>45
Even as a NECKBEARD, the gcc is one of the worst compilers out there.

Name: Anonymous 2010-02-02 3:50

>>46
Worst at what? Or at everything? If at code generation, then by all means please supply us with a code snippet that will be compiled better by MS compiler than gcc. Everyone uses gcc. Even god damn sony.

Name: Anonymous 2010-02-02 4:25

>>46
The point is about how Visual Studio is not a compiler at all.

Name: Anonymous 2010-02-02 4:26

>>46
realy? name me one compiler that can support more CPU and µ-controller architectures.

Name: Anonymous 2010-02-02 4:35

>>47
Sony should start using LISP again.

Name: not >>46 2010-02-02 4:51

>>47
MS C is a pretty good compiler for Win32. GCC performs okay, but overall worse than it for general purpose code. GCC tends to generate a lot of bloat (and no, I'm not talking about those damn debug symbols that tend to take 5 times the actual code size, as those can be stripped), I'm talking about how GCC manages the stack, register allocation, pipelining, and so on. Intel's compiler is likely better than MS' when it comes to CPU-specific optimizations, while MS' is mostly average, but solid, predictable and of mostly decent quality with its code generation. GCC, on the other hand, can generate unintiligible messes which are not that efficient, even if that was their supposed goal. It's not really GCC's fault, as when one makes a generic compiler as GCC which is supposed to support many CPUs and platforms, it's hard to make the best code generation on all platforms, and one usually compromises for something 'good enough'.
tl;dr: GCC's strength is in the amount of CPUs/OSes supported, open source nature, okay standard compliance.
MS C's strengths are in Win32-only code generation for x86 and x86 64, which is quite a limited set, but for this limited set it does quite well
ICC's strength lies on the x86, x86 64 platform, as it was designed by the same company that made the CPU. It's hard to beat someone at their own game (maybe even unfair as ICC tries to generate worse code for AMD CPUs unless the user hacks the libc to not do such idiocy).

Name: Anonymous 2010-02-02 17:12

>>51
GCC, a compiler that was origanaly proted from Pascal to C, suffers from some braindad design decisions that have nothing to do with the code generator. It is theoretically possible to improve the backside backend of GCC before the heat death of the universe, but nobody wants to do it because it's easier to bring other compilers (pcc and llvm) up to parr with GCC's level of compatibility.

Name: Anonymous 2010-02-02 19:02

PORT MY ANUS

Name: Anonymous 2010-02-02 21:37

>>51
Intel's compiler is intentionally crippled on amd systems -- it will take the slowest, least optimized code path whenever possible.

Name: Anonymous 2010-02-02 23:51

>>54
Are you sure it's not just that AMD are SLOW AS FUCK!!?

Name: Anonymous 2010-02-03 0:06

This thread needs more SICP.

Don't change these.
Name: Email:
Entire Thread Thread List