[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]

Want to learn a language

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: 105
Thread images: 10

File: dank.jpg (41KB, 572x443px) Image search: [Google]
dank.jpg
41KB, 572x443px
I want to learn to code, but I can't decide between Java, or C#/C++ (whatever is best).

Can anybody help me out here?

Also, what sites/books are good for learning this stuff?

Strawpoll (for fags): 11921655
>>
>>58096181
Learn C. That way you'll already know the rest.

Skip C++, go to Java. It's more elegant.

Python is only for the gay. So is Go.
>>
Learn c. The book written from the creator of c is free to download.
>>
>>58096181
Java, since its the most likely one to get you employed then you can fork into another language.
>>
Lean C, then you can learn the basics of just about every language

like what is a variable, what is a type, what is a control structure look like, what does a loop do?

In C, that's basically all you have, so it's easy to mess around with those concepts. Where as something like Java you have objects and classes and a bunch of horseshit you're not going to understand, but are forced to use.
>>
>>58096309
Aspects of Java will be a mystery without learning C first.
>>
>>58096181
>using printf over puts to print an unformatted string with a newline at the end
>>
>>58096181
some fairly important concepts will fly over your head if you don't learn C first, especially how memory is laid out and managed by programs
>>
>>58096181

Learn Python, then C if you want fundamentals, then Java or C# for employment opportunities.

Actually LEARNING TO PROGRAM is going to be millions of times harder than dicking around asking what language you should pic, so just fucking pick one and get on with it.
>>
File: python.png (26KB, 1893x161px) Image search: [Google]
python.png
26KB, 1893x161px
>>58096181
>>
>>58096342

>pointing that out instead of the fact that the printf format argument should never be the only argument

printf("%s", "Hello, World!\n");
>>
>>58096354

> Python

Lua is more friendly for beginners
>>
>>58096357

Zuckerberg is making a suggestion for a small child.

From the languages OP asked about, C# is the most modern full developed and noob friendly and will teach him the object oriented stuff he needs to know.
>>
>>58096332
Not really, for a first timer java is easier to grasp alot of courses teach java first too.
>>
File: Indeed-JobTrends-PythonVsLua.png (48KB, 1004x797px) Image search: [Google]
Indeed-JobTrends-PythonVsLua.png
48KB, 1004x797px
>>58096395

Python is an extremely popular language that is also very easy to learn. Like Perl, there are a ridiculous number of packages available for it. You can use it as a starter language, and you can also get a fair number of jobs in the real world using it as a back-end language.

LOGO is more user friendly than either, but nobody is going to suggest learning it in 2016.
>>
>>58096342
>not knowing that the compiler optimizes it to puts anyway
>>
>>58096427

> Learning concepts through commercial languages.

He should learn OOP through a pure language like Smalltalk or Eiffel.
>>
>>58096181
Javascript is probably the best for beginners.
>>
>>58096445

It isn't about jobs or popularity senpai, but just learn the basic concepts. Lua is far more simple than python.
>>
if gay = 58096354:
print("ssssssssss")
>>
>>58096428
I learned C# (basically Java + portability issues) as my first language in university, and my experience was as described by:
>>58096332


C is a nice first language because it's like 'how computers work' the language.
>>
>>58096427
C# is a patent trap on linux and android
>>
>>58096471

To kill themselves

Sure.
>>
>>58096342
>using printf instead of fprintf(stdout, ...)
>not just using fprintf for everything because it's most consistent
>wanting an implicit newline
>>
File: standards.png (24KB, 500x283px) Image search: [Google]
standards.png
24KB, 500x283px
>>58096427
>C#
it's Java with a few random features that aren't particularly important. Just use Java.
>>
>>58096504
1. There is more production grade open-source code written in C than any other language.

2. C is the basis for hundreds of syntaxes

3. C is both fundamentally simple, yet ultimately powerful.

4. C can be used medium-level OR low-level

5. C teaches hardware level concepts that produce better algorithms & explain other languages' choices.

6. C does not include OOP, but does have structs, so is simpler to learn yet segues into higher level languages on solid principles.
>>
>>58096518

This isn't a "what's the greatest programming langauge" thread.

It's just modern, easy to learn, "Java done right".

The standard library is excellent, LINQ is great, plenty of modern features.
>>
>>58096474

Why are you advocating that people waste their time?

Python is:

* Extremely popular.
* Simple. If you find Python too hard then you shouldn't be programming, period.
* Very well supported as a starter language.
* Likely to be a reasonably popular language for various tools and back-ends for the rest of the developer's career.

There is no reason NOT to start with Python, other than your subjective, idealistic fetish for Lua.
>>
Why should I learn C over C++?
>>
>>58096579

1. Sit down and show someone Hello World in C and let me know how that goes.

C is better than C++ for beginners, but it's still a TON of magic until they get reasonably far in. printf is like a wizard's incantation for beginners.
>>
>>58096181
Learn C first, go from there. I made the mistake of learning python first and now it's taking far too much time to understand things like pointers.
>>
>>58096598
>Why should I learn C over C++?
1. It's more complicated than C
2. Some people think C++ is bad.
3. Few projects use it anymore, Java is a better OOP.
4. Operator overloading isn't transferable

In general, C++ will just lead you astray as a beginner. Learn C, then Java, and C++ will be easy when you hafta.
>>
Judging by the replies, Python first, then C, then Java?

Or does it even matter?
>>
>>58096597

if youre serious about programming for the rest of your career/life then honestly just start with C.

Starting with Python is like learning how to drive an automatic, C is like learning to drive a stick,
>>
>>58096579
>C is the basis for hundreds of syntaxes
you'll just learn the C syntax from the other languages, if you don't learn C.

>C is both fundamentally simple, yet ultimately powerful.
You can say this about most languages. Turing completeness aside, I find vtables and some other features that C++ added to be more annoying to work with in C.

>C can be used medium-level OR low-level
this is meaningless

>C does not include OOP
C includes OOP. You can easily implement inheritance, you can easily implement vtables, as well as most of the other features C++ added. It's just a little uglier in C, in most cases; especially templates.

All of this being said, I hate working with C++, so it's an enternal struggle to choose C++, despite how much it makes me angry and to choose C, despite how much extra work I need to do in a few cases.
>>
>>58096181
I think you best take java. All that crap about really understanding "computers" is nonsense. Then you beter learn physics or assembly or turing machines etc.

Java has extremely nice IDE'S and enormous amounts of beginner stuff online. You can learn prgrammig it without the oop stuff and gradually progress.
>>
>>58096598

#include <iostream>

int main(void)
{
std::cout << "Hello, World!" << std::endl;

return 0;
}


THAT is why you shouldn't begin with C++. There is so much fucking 'magic' in C++ that I can't believe it was ever used as a starter language in colleges. I watched peers struggle and fail because there was so much "oh, just ignore that for now, we'll learn why later" bullshit that it's like their minds locked up and they lost the ability to discern what the actual lesson was.

As for non-beginners, I see no reason to learn C++. It's improved tremendously since C++11, but holy shit is it ever too late.

There's just no reason to write C++. It was a stop-gap measure to deal with growing codebase sizes. Now that there's Java and C# to take over large application development, and C is still THE language for low level work, C++ doesn't really have any place. Aside from the wannabe alpha-geeks on /g/, that is.
>>
>>58096666
What should I learn if I'm more focused in making something functional? I was planning on learning C++, since I kinda blundered my way around C#. I need to properly sit down and learn a full language instead of dissecting and stringing together code examples.

Not necessarily hung up on oop, too
>>
>>58096181
why are people still pretending Python 3 doesnt exist
>>
>>58096453
>Eiffel
would be the worst language to learn OOP because it allows covariant input parameters/arguments
>>
>>58096181
That image is shit and shows that its creator has never actually written in C. First what the fuck is "char ** argv" the proper statement is "char *argv[]". Second where the fuck is their return statement, you should end that shit with a "return 0;" for fucks sake. This image was clearly made by a retarded 12 year old who thinks python is the BEST EVAr because it's the only language he's ever written in.
>>
>>58096687

>Starting with Python is like learning how to drive an automatic, C is like learning to drive a stick,

And it's better to learn on an automatic, where you can focus on learning how to *drive a car* and *not hit things* instead of worrying about clutch modulation and gear selection.

You can learn to drive stick after you've learned the more important parts of *driving a car*.
>>
>>58096697

So what should I learn if I want to make something functional? Am >>58096702
>>
>>58096632
#include <stdio.h>
main()
{
printf("Hello, World!");
}


That is a solid fundamental starting point for functions, statements, and dependencies right there. Next is variables, then arguments, then control flow, then return values.
>>
>>58096598
>C++ is missing a lot of nice C features
>C++ has some of the most confusing traps of any programming language
>C++ has the most horrific linker errors in existence

For example, if you have struct foo : bar. struct bar does not have a virtual destructor specified, but does have virtual functions. If you delete foo as an instance of bar, you'll get a sigsegv with some compilers. A beginner is not going to have a good time with that.
>>
File: 1426872035810.jpg (93KB, 694x642px) Image search: [Google]
1426872035810.jpg
93KB, 694x642px
>>58096666
>those quads
>>
stop being autistic and learn JavaScript
>>
File: 1452574918576.png (55KB, 212x218px) Image search: [Google]
1452574918576.png
55KB, 212x218px
>>58096757
>implicitly declaring main as an int (illegal as of C99)
>declaring main with unspecified parameters (specified as deprecated as of at least C99)
>not putting a newline at the end of printf
>>
>>58096702
> I'm more focused in making something functional?

I strongly recommend against C++

I'd go C first, then Java.

For "something functional" that's a really fun way to learn, write a game!


1. Keep your 'map' in a 2D array of bytes
2. Draw your map on the screen
3. Write a loop to animate the screen w/ a delay
4. Catch keyboard events to control your player
(use the smiley character ASCII 02)
5. Save & load maps to/from files
6. Sound effects
7. Moving AI mobs
8. Shooting a gun

After that you either pick a web language or learn Assembly to achieve godhood.
>>
>>58096597

> He went full retard mode.

lulz.
Ok anon, use python instead.
>>
>>58096697

C++ doesn't really have any place.

In your dreams.
>>
>>58096847
you're right, that was hurried copypasta, and terrible code. the points you made are all very good things to learn early, which supports the argument. here's your complaints fixed:

#include <stdio.h>

int main(void)
{
printf("Hello, World!\n");
return 0;
}
>>
File: 231288.jpg (23KB, 318x415px) Image search: [Google]
231288.jpg
23KB, 318x415px
>>58096181
>C
K&R, the one and only

>Java
Objects First With Java - A Practical Introduction Using BlueJ

>C++
Whatever, once you learn C and Java it will be a breeze, stick to a subset of C++ and treat it as C with classes and easier string handling

>C#
It's shit and dead, don't bother with corporate Microsoft trash
>>
>>58097035
fun fact: C implicitly returns EXIT_SUCCESS at the closing brace of main. I think it also implicitly translates 0 to EXIT_SUCCESS on some extremely obscure systems where 0 != EXIT_SUCCESS. OpenVMS is an example of this.

IMO, one of the best reasons to learn C is because you get to know so much random trivia about ancient computer systems.
>>
HOLD EVERYTHING.

You need to learn Brainfuck before you do anything else.

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
>>
>>58096393
Literally why?

How with your way you would write
printf("variable x has value of %d\n", x);


Why write more and stick to an imaginary correctness when the compiler will spit out the exact same assembly?
>>
>>58097198
printf("%s", "Hello, World!\n");

Will not produce the same assembly as
printf("Hello, World!\n");


Without some really special-case optimization.
>>
>>58097131
imo, the best reason to learn C is pointers.
really.
>>
What's the best OOP language? I'm hearing Java and C#
>>
>>58096583
>C#
>modern
>"Java done right"
>standard library is excellent
>LINQ is great
>plenty of modern features

Nice shilling you got there

What's C# success?

15 years after the introduction of C# and .NET Windows Explorer is still on Win32 and has not been rewritten in .NET because it's so shit

Windows is still mostly Win32 and C++ as most good applications on Windows

ATI/AMD Catalyst Driver frontend was written in .NET and it was shit and slow, now with Radeon Crimson AMD is dropping .NET because is bloated and slower than Java and even many interpreted languages

Silverlight is dead, XPS (Microsoft's replacement for PDF) was misguided and dead, the Metro/Modern/UWA are not using .NET and C#, Windows phones is not using .NET and C# and is dead too

The only moderate success with C# is Paint.NET and even this is worse than Gimp and much less powerfull

C# and .NET is a failure of epic proportions
>>
>>58097331
This guy is right.

C
Java
Assembly
Reprogram the robot overlords thus saving humanity
>>
>>58096181
>image implies that less code to produce a "Hello, World" program is a sign of a superior programming language

Well then, that means my hypothetical "Hello, World"-lang is the best programming language because in "Hello, World"-lang everything compiles to "Hello, World", even an empty code file.
>>
>>58097503
I can guarantee you that there exists some esoteric language where you can do hello world with a single letter. There is one where you can do fizzbuzz with the letter f.
>>
>>58097267
Nope, you are full of shit
$ cat foo.c 
#include <stdio.h>
int main()
{
printf("hello world\n");
return 0;
}

$ cat bar.c
#include <stdio.h>
int main()
{
printf("%s", "hello world\n");
return 0;
}

$ gcc -S foo.c

$ gcc -S bar.c

$ diff foo.s bar.s
1c1
< .file "foo.c"
---
> .file "bar.c"
>>
Start with Python as an introduction to basic computer programming concepts. Then go to C for a deeper understanding of what is actually happening beneath the surface.
>>
>>58097545
>>58097267
rekt
>>
>>58096181
>Strawpoll (for fags): 11921655
just post the strawpoll you ugly faggeth
>>
>>58097545
>Without some really special-case optimization.
>>
>>58097545
>unspecified parameters
"C++ is totally a superset of C" programmer detected.
>>
>>58097331

Okay, nice post, but I just refer you back to here:

>This isn't a "what's the greatest programming langauge" thread.

He's trying to learn to program, not write an operating system kernel or Microsoft Office killing app.
>>
>>58097571
Whatever, hear is the output of clang
$ clang -S foo.c

$ clang -S bar.c

$ diff foo.s bar.s
2c2
< .file "foo.c"
---
> .file "bar.c"
18a19
> movabsq $.L.str1, %rsi
34a36,40
> .asciz "%s"
> .size .L.str, 3
>
> .type .L.str1,@object # @.str1
> .L.str1:
36c42
< .size .L.str, 13
---
> .size .L.str1, 13


Your form has more instructions so it's shit and you write more stuff
>>
File: kerry_iraq_soldiers.jpg (43KB, 500x238px) Image search: [Google]
kerry_iraq_soldiers.jpg
43KB, 500x238px
>>58097651
try turning on optimization
>>
File: 1472794702796.jpg (63KB, 502x557px) Image search: [Google]
1472794702796.jpg
63KB, 502x557px
>>58096181
It's all same shit, you can start your learning from fucking pascal and you'll still end up in same place.

C# will be easier to understand, c++ will teach you real memory management and bring many problems with that. But in the end, for your beginner level, literally anything that allows you to build bunch of loops and ifs will do. The choice you're trying to make has no significance at all, at least right now.
>>
>>58097622
We must protect newbies from MS shills

C for low level stuff and understanding how a computer works and dealing with pointers and implementing many interesting structures and algorithms

Java for the most elegant and complete expression of OOP concepts and with an extremely rich, mature and cross platform since inception standard library plus many commercial applications and successes (eg android)

Python for quick solutions and solving problems in a few lines (though I don't believe it's particularly good for a beginner because it's very different than the rest and a beginner may be trapped in python's way)

Haskell for an elegant introduction to functional programming and extending your programming horizons

Other languages are good too

Except C#, C# and .NET belongs in the trash and it's an evolutionary dead end and a patent trap
>>
>>58097651
>Your form has more instructions

my form was foo.c

>so it's

you're not seriously about to make a fool of yourself are --

>shit and you write more stuff

-- how many wait states does indirect relative addressing take?

(despite the fact that foo.c was my form)

"number of instructions" is not how you judge an algo. fyi.

what you do, is
1. optimize I/O
2. pay attention
3. quit gnashing at everything that moves
4. get a girl since you're so nice
>>
>>58097893
>this much damage control

>my form was foo.c
your form was bar.c >>58096393

I will continue to use the foo.c form as K&R says and as K&R explains in the variadic arguments chapter. I'm sure he knows better than you.
>>
>>58097937
That wasn't my post.
>>
>>58097951
Then I wasn't answering to you, so why are we arguing?
>>
>>58097975

Because you claimed that parsing %s and interpolating a string would compile to the same code as not parsing %s and not interpolating a string if you didn't use optimizations, which was false.

You then proceeded to use optimizations to support your fallacy and subsequently turned into a dick on the basis of an assumption toward someone who actually can write Assembly.

So, we argued a bit and I chuckled.
>>
>>58096181
Learn Haskell. It's a meme but it's also the only road to salvation.
>>
>>58098055
My original objection was about the bar.c form because it's less obvious, more verbose, unlike anything taught in any book and (as you say and I trust your assembly knowledge and gcc proves) it doesn't make a difference once you enable optimizations

So I don't think there is a disagreement between us

I'm glad you chuckled though :^)
>>
>>58098136

OP has no idea what he's getting into. :^)

Side note: What happened here today was a fucking miracle. it just optimized that shit right away. *poof* GCC just clown'in all over us and shit.
>>
>>58096181

There are serveral ways. In the end it doesn't really matter. But some routes you might take:

>start with C

+
C is a "small" language, it doesn't have many features. You can learn the basics in 1-2 month. It is also very good to know C, even if you don't use it afterwards.

-
It is pretty anal about something. Even some basic tasks (read in two numbers, add them, return result) does already touch some intermediate concepts. So the first few weeks might feel pretty difficult: You have to manage your own memory, you have to get the difference between compiler and linker, you have header files, you have to write makefiles.. It's only a few things, but each of them is a little bit tricky. Once you mastered some fundamentals, you're halfway there, but for a beginner it can be frustrating.

tl;dr:
Start with C if you have enough motivation to not get frustrated the first two weeks. It's good to know C and it's not really hard, but especially for beginners it has some pitfalls.


>start with Java

+
Java protects you from a lot of trouble you have in C. It is easier to "get results". The learning curve starts somehow softer.

-
Java is a big language. There are many features and concepts than can be irritating, since they are made for large scale software development. They are not difficult, but a lot of things will feel unnecessary for a long long time. Most features only make sense if you are a pro-programmer.

tl;dr:
Not frustrating in the beginning, but it will take much longer until you really understood the language. Java is very "explicit" you write a lot of code that seems verbose in the beginning.


>C#

Basically the same as Java. If you know Java, you know 90% of C# (and vice versa). So learn Java and change to C# when you are an experienced Java programmer.


>C++

If you want C++, learn C for at least 1-2 month. If you really like C, then take a look at C++. But be aware that C++ is a really big and complex language. It takes some time to learn.
>>
>>58096342
Any compiler would optimize that to puts anyway.
>>
>>58096181
>Comparing a structured, a generic and a script language
gj m80
>>
>>58098261
>You have to manage your own memory
This won't be much of an issue learning the basics since you'll statically allocate test cases, and understanding this one thing becomes a big asset when you go pro.

It can't be stated strongly enough that C is the foundation of most other productive languages.

"Not using C" at all is unlikely. Even if it helps you debug a broken make build on your linux box, it's worth knowing.

Agree with what you said about Java, except OOP shouldn't be thrown in on a first language; for many purposes its detrimental, and superfluous to learning.

I wouldn't change to C# ever. Strong case for it being DoA.

C++, if you really like C, yeah, okay. That's fair. But a lot of people rightfully consider C++ harmful. (I don't, I'd say it's the closest to 'complete' of all the production languages; you're right, it's big.)
>>
>>58098318
Apparently GCC parses printf formats and pre-interpolates string literals too!
>>
While it is retarded to think you can only learn one language and you should learn the same language independently of what field you will be using it in, I would say C++.

You can learn high level and low level stuff depending on what you want.
It is much better than C as it has more built in features and you can get very far with just the STL.
It is easier to read than Java because you can use mathematical operations instead f writing the names of the functions.

The only disadvantage is you have to compile it.
>>
>>58096181
that just proves that pythons main purpose is print "Hello World" like a newbie language it is
>>
File: pooinlooplusplus.jpg (145KB, 600x894px) Image search: [Google]
pooinlooplusplus.jpg
145KB, 600x894px
>>58096251
>Skip C++, go to Java. It's more elegant.
found the pajeet
>>
>>58096181
SCHEME

or at the very least, c. Get acquainted with the gdb
>>
>>58098883
if you are white and know java you will be employed over a disorganized clueless panjeet
>>
>>58096697
#include <iostream>

using namespace std;

int main(void)
{
cout << "Hello, World!" << endl;

return 0;
}

ftfy
>>
>>58098387
>a lot of people rightfully consider C++ harmful
In what way?
>>
>>58097323
Smalltalk
>>
>>58098387
A lot of people are mentally retarded.
>>
>>58096181
I personally learned Java before C, and I think it's better that way. There are a lot of concepts in C that might be hard for newbies to grasp(ex: Java has a garbage collector, array limits, strong types, no pointers, overall easier to start with). C though is really good in that it's "close to the metal". It actually translates directly into assembly, while Java is translated into an intermediate language that gets interpreted by a special program.
>>
>>58099313
>>58096770
While C has a lot of horrible traps, C++ makes C look like babbies first programming language. There is so much random shit that can go wrong, as well as so many stupid useless language features that shouldn't exist.

If you program C++ is a specific way, it can be fine, but there's a lot you have to be careful of.
>>
My question is how do we actually start to learn. How can I practice?
>>
x86 Assembly
>>
>>58096681
That sounds good. Honestly I started with python and then went to java and I wish I had done c first. Objects and classes took a while to get used to and its better to learn other stuff first.
>>
>>58096181
Learn Node.JS. Thats what real coderers at nowadays. Other languages are only good for useless shit like programming.
>>
>>58096703
No such thing lad. It was all a bad dream.
>>
>>58101468
watch coding tutorials online, buy a book, google is your friend.
>>
>>58101847
>using a fad language
Thread posts: 105
Thread images: 10


[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.