[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 19 KB, 640x400, Turbo_Pascal_7.0.png [View same] [iqdb] [saucenao] [google]
2193490 No.2193490 [Reply] [Original]

Hi /sci/, I wanna learn how to code? What lang do you recommend to start with? (I was thinking about Pascal)

*not trollin'

>> No.2193499

Pick something remotely useful?

C?

>> No.2193530

C#, C++, and Java are a few popular ones. Don't get held up over which one is the best, you'll have plenty of time to debate languages once you've had experiences. As for a beginner, I'd recommend downloading Game Maker to learn the basic fundamentals of programming. Once you pick a language, the next step is to get a book on it. (books are so much easier to use than pdf's, at least in my personal experience.) From there you can learn a lot about your language, and you'll get lots of experience. If you want to move on to a different language that you think is better from that point, you'll have enough knowledge and experience to know which one will be the best for you.

>> No.2193545

>>2193530
Thanks! I used to edit freeshard scripts back in the days and was rather good in Turbo Pascal programming while in school ...

Will try this Game Maker thing.

>> No.2193544

That's what many teachers still use for lessons. Nobody writes professional code with it anymore, but its very similar to C and forces you to learn structure properly. Plenty of fun things to do with Pascal; but it won't do any good on your resume. Java/C++ are the most popular for professional code.

>> No.2193555

I think you should learn assembler, JCL and APL

*not trollin'

>> No.2193559

Most of the coders I know are secretly furries. OP could you post a pic of your fursona?

*not trollin'

>> No.2193561

>>2193555

How is he ever gonna get anywhere without FORTRAN?

*not trollin'

>> No.2193573
File: 19 KB, 281x211, 4566345788.jpg [View same] [iqdb] [saucenao] [google]
2193573

>>2193490

>What lang do you recommend to start with?

*not trollin'

>> No.2193594

>>2193544
> Krakengineer !!5XY+x7grkpt

Are you a top or a bottom? Who's your favorite spice girl?

*not trollin'

>> No.2193595

>Once you pick a language, the next step is to get a book on it.
I disagree. I suggest you find a good book and use whatever language that book uses instead. The quality of the book is much more relevant to the ease of learning programming than the quality of the language. I can recommend http://www.greenteapress.com/ as a great book if you're still looking.

Also, stay clear of Game Maker. It does NOT teach you real programming.

>> No.2193615

starting with any C language is just retarded if you're teaching yourself. start with the web languages - HTML, CSS and then do PHP. it will give you the basic concepts you need to continue.

if you just straight into C++/C# it's going to be a nightmare. there are a few good books for first timers trying to learn Java, but I'd still recommend you start lower

>> No.2193620

preferable a language thats remotely debugable e.g. x86 asm or brainfuck

>> No.2193621

Python.

>> No.2193630

Python

*not trollin'

>> No.2193645

>>2193620
Brainfuck is also a good choice indeed, you'll eventually have a good grasp of the imperative paradigm. It takes very little time to learn it, the programs are very fast and it's a lot of fun.

>> No.2193656

>>2193615
Myth. Probably created by people who learn an easier language first and imagine C must be hard for beginners.
I taught myself C at the age of 14, and C++ shortly after. No problem at all. And I know other people who did the same too.
People who learned Pascal or Java as their first language though... they suffer when the time to learn C/C++ comes...

>> No.2193657

Python.

*not trollin' either*

Free, and easy to get started. There are a ton of free tutorials and beginners guides floating around. Pascal isn't used very much any more.

When you learn one language, it is a whole lot easier to learn another one. In fact, once you get started, the hardest part is learning the libraries.

>> No.2193666

If you're already familiar with Pascal, you should learn C/C++. It's virtually the same in principle with just some different syntax, and people actually use it. (I'm actually still using Pascal (Delphi specifically) professionally, but I'm an extreme rarity.)

>> No.2193675

Brainfuck yesh!

C++ / Java
Python

I'd say go java because no user programmed memory management or pointers are involved

1.download jdk
2. http://home.cogeco.ca/~ve3ll/sitemap.htm#ja
3.??????
4. go learn a better language

>> No.2193686

>>2193656
sure you can learn a C variant first, but it will teach you really bad habits and you wont get as much out of it. in nearly everything you do, it's unequivocally better to start with the fundamentals

>> No.2193691

you guys also need to remember if you start with a C language, or Java, you're going to be doing shit in the command prompt for a long time which isn't half as interesting. when you start with something basic you get gratification faster which leads to more motivation to stick with it.

>> No.2193720

>>2193686
WAT? Starting with C/C++ is what PREVENTS you from picking up bad habits. Otherwise you learn Java without having a clue about the memory allocation that's going on behind the scenes are write bad shit because of it.

>> No.2193727

>>2193691
GUI's are not very hard in Java using Swing.

>> No.2193753

>>2193691

Unfortunately true. However, when you switch from command-line procedural programming to event-driven GUI or embedded programming, then you have to reset your thinking. I have run into any number of professional programmers who could never quite grasp the concept of a state machine.

It is fairly simple to develop hobby GUI applications using wxPython, once you know Python. However, if you're going to do it professionally, you are probably going to have to learn C++, Java, or C#.

>> No.2193766

>>2193691
This is why I love DELPHI, which is object-pascal based. It compiles as fast as c, and has a visually design GUI like visual basic. The only downside is virtually no one uses it anymore.

>> No.2193775

>>2193720
that's not at all the case. if you start with a harder language you're going to learn how to do what you want to do, and the easiest way to do it. 90% of the time this isn't the best way to actually do it.

>> No.2193785
File: 54 KB, 505x416, 1282524279424.png [View same] [iqdb] [saucenao] [google]
2193785

Have you read your SICP today?

Honestly though, start with a popular language like Python/Java/C++.

>> No.2193795

>>2193775
You're assuming the person will do a bad job at learning it. If the person is actually interested in learning, I don't think that's a good assumption.

>> No.2193809

It depends upon what you want your programs to do. For most people this talk about GUIs will be relevant, but not for everyone. My interests are in numerical methods, so I could give a shit about GUIs.

>> No.2193823

Why restrict yourself to one language? Read up how to do things in both C/C++ and Java, then you'll probably get a better idea of why things are done the way they are.

The two language are practically the same from the viewpoint of a beginner, and once you reach the point when major differences arise you'll understand enough about both languages to appreciate them.

>> No.2193844

>>2193809

For numerical methods, Python with the numpy, scipy, and matplotlib packages. These packages are actually industrial-strength products, and the price is right (free). They will probably do everything you want to do and then some.

>> No.2193857

>>2193795
if you seriously learn C++ properly, while teaching yourself (learning memory allocation and OOP before ever opening a compiler) you're looking at ~2 months before you can even write a command-line calculator.
sure it will work, but most people will be bored shitless.

>> No.2193858

>>2193615
You are weak.

*not trollin'

>> No.2193879

>>2193857
>2 months
>mfw

are you retarded?
You could make a calculator the first day. At least a simple one with if statements and an infinite loop.

>> No.2193885

>>2193809

Go python.

>> No.2193886

>>2193857
I can't believe that. It's been a long time since I first learned programming, but I don't see what it would take more than a week or two to learn all the important concepts.

>> No.2193887

>>2193857
>2 months to make a command line calculator in C++
You're fucking retarded, bro.

>> No.2193889

>>2193615
>He thinks HTML is a language

el oh el

>> No.2193910

>>2193889 doesn't know what the L stands for

>> No.2193918

>>2193910
>doesn't know what the M stands for
markup language != programming language

>> No.2193928

>>2193889 seems to have forgotten that >>2193918 did not specify markup

>> No.2193942

>>2193889
it's a scripting language.
>>2193887
you clearly don't understand OOP programing

>> No.2193944

decided to go Python! Thanks everyone!

*OP
** not trollin'

>> No.2193946

>>2193928
HTML is still a poor excuse for a language.

>> No.2193951

>>2193490

I learned BASIC when I was 9, I got stuck when it came to the algebra though

>> No.2193956

>>2193942
You don't need to use any OO to make a calculator. If you want to. 2 months is still more time than anyone would need.

>> No.2193964

>>2193956
did you not read anything in this thread?
if you just jump into C++ and do shit, you're going to do it wrong and learn it incorrectly.
if you spend forever understanding it you'll probably get burned out before you accomplish anything.

thus starting with an easier language is clearly superior.

>> No.2193970

Don't go with python, it has no formal integer type for variables. you have to use floating point number for integer arithmetic which is OK most of the time, but it occasionally causes hard to debug problems

*not trollin'

>> No.2193985

>>2193964
Speaking like you own the truth? You're right and we are wrong?
Then how about you support your claims with evidence?

>> No.2193990

>>2193970 python has no int
I'm not sure you are correct.

>> No.2194008

>>2193964
Well i disagree. If you start with C++, a lot of other languages will just be childs play. And who says you are going to learn things incorrectly? That depends on your teacher/source and how interested you are. If you start with a language like Python you are still going to have a more trouble with C++.
Also:
>did you not read anything in this thread?
If something is mentioned in this thread it doesn't mean it's true.

>> No.2194021
File: 136 KB, 749x1085, Hierarchy.jpg [View same] [iqdb] [saucenao] [google]
2194021

Programming languages, top to bottom.

>> No.2194027

>>2193990
Python does have an integer type. However Python is dynamically typed so you wont have to declare any int variable. But when trying to convert something to an integer (or check if something is an integer) you will have to perform a cast using:
(int)

>> No.2194029

>>2193970
I think you're confusing dynamically-typed, which Python is, with weakly-typed, which it is not.

>> No.2194047

>>2194021
I can't believe javaScript is so high up.
Also, I can't understand how javaScript programmers would consider themselves superior to java programmers

>> No.2194052

>>2194008
>If you start with C++, a lot of other languages will just be childs play

Agreed. I started with C/C++ several years ago, and about a month ago I learned Python in a weekend.

>> No.2194074
File: 31 KB, 204x171, Picture 1.png [View same] [iqdb] [saucenao] [google]
2194074

>>2194027
What am I missing here?

>> No.2194081

>>2193985
>>2194008
isn't that just a fundamental axiom? if you try learning calculus before algebra it will be significantly more difficult.
you can learn HTML in a day, and learn OOP through PHP in a week. why wouldn't you give yourself that kind of head start? besides that, if you do it this way you get the gratification of doing some cool web stuff before moving on to actual languages.

>> No.2194090

The only markup language that deserves to be mentioned along side programming languages is TeX.

>> No.2194116

>>2194081
While learning C++ you also take those kind of steps. You don't can't take it all in at once. However, by taking these steps and learning C++, you will be able to learn, lets say PHP a lot faster.
And I don't see how learning HTML would make learning to program any easier. I you have any example of how HTML would help, please do tell.

>> No.2194126

Learn C first, then C++

Pascal is way too blue

>> No.2194144

>>2194090
naa. not really. Don't get me wrong, I love TeX, but you can't really do anything other with it than nice pdfs. Or maybe I've missed something .. idk

>> No.2194153

>>2193944

Good choice. Simple things are easy,and hard things are possible.

also, import this

>> No.2194159

>>2193970
> Don't go with python, it has no formal integer type for variables. you have to use floating point number for integer arithmetic

Wrong. Python has two primitive integer types: int (32-bit two's complement signed integers) and long (arbitrary-precision integers). It also has float (double-precision floating point), complex, rational, arbitrary-precision decimal, possibly some others.

Maybe you're thinking of JavaScript, which has a single "number" type (which is basically double-precision floating-point, except that it also supports bitwise operations).

Or maybe you're just confused about what dynamic typing means.

>> No.2194161

>>2194144
TeX is also a turing complete programming language. Unlike HTML which is rendered, TeX is literally compiled.

>> No.2194193

>>2194144
> I love TeX, but you can't really do anything other with it than nice pdfs. Or maybe I've missed something .. idk

He wasn't suggesting it was a programming language. Just that it's the only markup language which deserves the attention of programmers.

>> No.2194198

>>2194193
Actually he was, because it is.

>> No.2194223

>>2194198
> Actually he was, because it is.

TeX isn't a programming language. It may be capable of being used as such, but that isn't its purpose, and anyone using it as such has failed miserably at one the most fundamental programming skills: use the right tool for the job.

>> No.2194234

>>2194223 It is but I'm going to pretend it's not.

>> No.2194389

Dear OP:

There's a lot of shit flying around in this thread, mostly fanboys who think their programming language is the best. Honestly, for a first programming language, it really does not matter which language you choose. They're all different, but if you just want to learn the basics, pretty much all programming languages will seem the same.

I don't know much about c, but from what I've heard it's low-level and fast. No OOP here. If you just want to know the basics, c might be fine. If you eventually want to write scientific programs, basically "number crunching" then c is probably the best

If you want something that can make a fancy graphical interface, don't go with c. Instead you'll want c++, java, or python. These languages are all known as "object oriented," you don't know what it has to mean just yet, just that it's higher level and you can do a lot more with it. However, they're not as fast and not as good at "crunching numbers." If you plan on making, for example, a game or an application, use one of these. c++ is probably the hardest to learn, followed by java, then python. However, learning the harder language might be better because it gives you more practice and you'll learn more about what goes on in the computer.

MOST IMPORTANTLY you won't learn "good style" depending on which language you choose. You learn good style depending on the resource you use. I would highly suggest a class or at least a textbook over an online tutorial. Perhaps:

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer
-science-and-programming-fall-2008/

>> No.2194476
File: 15 KB, 348x296, SNUSP Hello world!.png [View same] [iqdb] [saucenao] [google]
2194476

>>2193645
I love you.

Then take it to another dimension with SNUSP. pic related

>> No.2194492

>>2193766
Delphi (Pascal with batteries included) is a fine language for learning. The resulting programs are actually a lot more readable than C or C++.