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

JavaScript as a first programming 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: 45
Thread images: 4

File: cover.png (159KB, 426x552px) Image search: [Google]
cover.png
159KB, 426x552px
If I learn JavaScript as my first programming language, do you have any advice on how to make the best of it? I don't want to adopt poor programming practices or let it make me a bad programmer.
>>
File: numale beta cuck writing.png (64KB, 717x557px) Image search: [Google]
numale beta cuck writing.png
64KB, 717x557px
>eloquent javascript
>>
>>61130183
Just assume you have to set semicolons everywhere and be careful about linebreaks in combination with assignments, use strict modus, and pretend JS was statically typed and didn't have dynamic anything.
>>
>>61130222
Is it really that easy? Everyone makes it out like JavaScript is an infectious disease and you will be gimped for life if you learn it first.
>>
would recommend learning from mdn instead of eloquent javascript

https://developer.mozilla.org/en-US/docs/Web/javascript
>>
>learning PajeetScript
>>
>>61130564
You WILL be gimped for life if you learn Javascript as your first programming language. Even a shitty non-web language like Python or Java is infinitely better.
>>
>>61130564
This is not about being hard, it's about being annoying.
And yes, depending in how much you broaden your horizon you will be gimped for the rest of your life.
>>
>>61130222
Actually.. you can program in js without semicolons. lol
>>
>>61130660
Can you please elaborate? Finding out why is the entire point of this topic.
>>
>>61130757
It's just that it's shit, because the rules are retarded.
>>
>>61130199
> [sic]

I'm triggered.
>>
>>61130564
People exaggerate. Most dynamically typed languages are garbage and Javascript isn't significantly worse than Python or Ruby. With ES6 it's probably better than Python and it has far better implementations.

If you want a decent language start looking at languages that are statically typed at a minimum.
>>
>>61130183
Javascript isn't that bad, people are just too lazy to learn it's weirdly designed syntax : 1+1 =2, var x= 1+"1", x = 11, typeof(x) = ???? Stupid shit like this, I really wished they would go with a Java strict-type syntax, JS is actually a really powerful language
>>
>>61130183
Are you crazy?
Just go with Python or even better C
>>
File: 303house.jpg (23KB, 312x468px) Image search: [Google]
303house.jpg
23KB, 312x468px
>>61130660
>You WILL be gimped for life if you learn Javascript as your first programming language.
Is this true? If so, why?
>>
>>61132177
$$
>>
>>61132376
then write c#. javascript is fucking garbage

t. react developer
>>
>>61130183
Good decision, OP. Javascript is a very versatile and ubiquitous language. It will serve you well. JSLint can check your code for you.
>>
>>61132438
So it's really just about avoiding the "bad parts" and you can mitigate the "damage" of it being your first language?
>>
>>61132921
Not really. Javascript isn't just bad for what it is, it's also bad for what it isn't. It's not like you'll get tainted forever by learning javascript, you'll just be locked into one way of thinking until you learn new langs like c and lisp. It's only a lang to be tolerated for it's popularity and you'll stink of ignorance if it's the only one you know.
>>
>>61130199
wtf is [sic]
>>
>>61133034
>you'll just be locked into one way of thinking
What does that even mean?
>>
>>61130183
OP, if youre stupid enough to believe the shit people say on /g/ programming threads (ie C is the only good language) then you deserve to be a shit 'programmer' just like most the people who post here. The truth is that Javascript has much more powerful high order functions than Python and prototype OO is much better and much more dynamic than class based OO. I could tell you more, but you dont deserve it because you really are stupid enough to take the js-is-shit meme seriously even though no one has EVER given a non-meme reason why its bad, so why should I waste my time informing you about js when you are someone stupid enough to take /g/ programming memes seriously?
>>
>>61132921
Learning is about instant gratification. Just pick whatever works for you and learn. If that's Javascript or whatever, do it. If you try to learn the "proper way" and end up frustrated, well you just made things harder on yourself. It's not like Javascript is going to taint your blood with programming AIDS and make you forever a brainlet. You are a human being who can learn things. You'll learn other languages anyway, nobody worth a shit sticks with one language.

Two things you will learn if you hang around programmer communities is that programmers are shit tier teachers, and every programmer thinks other programmers are retards who write garbage code. So people who started with Java will be meme'd about doing things the shitty Java way, and so on. Lisp weenies will say that their language is a spiritual experience and anybody who doesn't like parenthesis spam is a scrub. Who cares. Programming is about problem solving, just do what solves your problems.

If you want to become a good programmer and not get meme'd for having x retard habits, then once you learn Javascript, branch out into other languages and learn why those memes exist and don't do them. And no matter what people will still say your way < my way. It's the way of the world.
>>
>>61134140
>why don't noobs know everything

Wow you sure are a smart guy. But yeah, don't take /g/ shitposting seriously. Like every board this place is filled with misinfo. If a thing is popular like Javascript then don't think that some random shitposter on /g/ has the insider scoop on why all those people are retards. Just go with conventional wisdom until you know enough to form your own opinions.
>>
>>61134172
>You'll learn other languages anyway, nobody worth a shit sticks with one language.
Absolutely this. It doesn't matter where you start, if you keep at it you'll branch out. It's not hard to learn a second language and after you have some projects under your belt you'll have a better idea of what suits your needs best. Maybe that will end up being JavaScript, maybe something else, but it won't hurt to start with JavaScript.
>>
>>61134140
This sentiment exists outside of /g/. You should get out more.
>>
>>61130611
bump
>>
>>61130183
I hated that book, holy fuck. Good code and even a few useful functions, just written in a very condescending tone that really turned me off.
>>
>>61132202
You'll pick up bad habits.
>>
>>61134462
>really turned him [sic] off.
I can see why.
>>
>>61134462
Do you recommend an alternative?
>>
>>61134502
Like what? The point of this thread is to learn how they can be avoided (other than not learning JavaScript).
>>
File: dhjdyj5.jpg (44KB, 451x392px) Image search: [Google]
dhjdyj5.jpg
44KB, 451x392px
>>61130199

>he not she
>>
>>61133086
"Said in context" he is used "he" as an open ended term for the programmer. Labeling the majority instead of PC bullshit, so to prevent one side from being triggered over a pronoun, you slap a [sic]. They also use it when quoting someone who has misspelled a word in something and they don't want the reader to assume the (reporter) misspelled it.
>>
If it gets you programming sure. It's a fast way to learn how to make modern feeling applications. The only problem I can see with it is that it's really strange compared to other languages like java, c, or ruby.
>>
>>61130183
Write a DOOM clone in html5 like this one http://www.playfuljs.com/a-first-person-engine-in-265-lines/
>>
>>61131639
>Most dynamically typed languages are only to be used for small scripts and Javascript isn't significantly worse than Python or Ruby. With ES6 it's probably better than Python and it has far better implementations.
this, /thread
>>
Could someone please explain what's wrong with dynamically typed languages?
>>
>>61138962
shits done at runtime, yo.
That said, with JS, Python, Ruby etc you can extend that to "dynamic language", because not only variables are dynamically typed but types itself are dynamic and variables aren't checked for initialization and other shit.
>>
>>61138962
Do not confuse dynamic typing and type inference. Type inference is fucking awesome and saves a shit load of time. Dynamic typing is just retarded and should not exist.
>>
>>61139070
>>61139093
How big of a problem is dynamic typing, and to what extent can it be overcome with things like mypy? Also, what's a good statically typed language to start with?
Cheers.
>>
>>61131639
>With ES6 it's probably better than Python and it has far better implementations.
What makes ES6 so much better? I'm just starting to learn JavaScript.
>>
>>61139320
I wonder when learning resources will actually integrate ES6 into them instead of tacking it onto the end.
Thread posts: 45
Thread images: 4


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