DEV Community

Cover image for What do you wish to know about JavaScript when you were in university?

What do you wish to know about JavaScript when you were in university?

Natalia on September 05, 2019

Hey guys! I was asked if I would like to make a couple of lectures at the university about plain JavaScript (basics). And I would love to but I'm ...
Collapse
 
chrisachard profile image
Chris Achard

That's a big topic! Here are some thoughts:

  • Java and JavaScript are not the same thing. They aren't even related; the fact that they have the same base name is just a historical trivia fact

  • You'll see a lot of people criticizing javascript on the internet... most of those criticisms are fixed by ES6; but some are still valid. This is one of the more amazing talks which covers some of the potential hiccups: destroyallsoftware.com/talks/wat

  • JavaScript can run almost anywhere (browser, server, mobile with react native, IoT with some libraries...) and there are different styles and APIs for each. That can be really confusing to beginners, so I guess the advice is to just know that and watch out for it. It's also one of its super powers! Learn javascript, and you can really do full-stack anything.

  • JavaScript can be written with classes (more OO) or functions (more functional). That's confusing to beginners, but it's also one of its greatest strengths. Both types are important to learn

  • Arrays and objects (hashes) are the real meat and potatoes primitive types of data in javascript - learn to love them!

  • If you get stuck, just google "javascript [problem]" and hopefully you'll get unstuck.

  • Programming should be fun :) Don't let the warts of a language sour it for you. JavaScript (after ES6) actually is a really good language.

Those are all pretty "high level" thoughts, but hopefully it helps. I've been planning a post about how I love javascript, even though people seem to hate it - and those are most of my points :)

Good luck!

Collapse
 
nerdy_girl profile image
Natalia

I didn't know that someone may be interested in the history of JavaScript. That's smashing! Thank you! :D

Collapse
 
mzahraei profile image
Ardalan

Have you ever seen the DEV policy you can take a problem by reason of the Link

Collapse
 
ben profile image
Ben Halpern

That it existed...

Anything I learned in school was restricted mostly to Java, and I've always had a much better time hacking on webdev stuff.

Especially these days, any program should teach JavaScript because of its ubiquity.

Collapse
 
saurabhdaware profile image
Saurabh Daware 🌻

we have 'jquery' in our university and that chapter is almost as long as javascript itself.

Collapse
 
abodmicheal profile image
Abod Micheal (he/him)

If u understand JS and s6 you'll understand jquery in like an hour

Collapse
 
dana94 profile image
Dana Ottaviani • Edited

I only learned Java at college too. I had only one web dev intro course and that was it.

Collapse
 
nateosterfeld profile image
Nate Osterfeld

Ahh I'm highly considering going back to college and this scares me. Just the fact the person above you mentioned Jquery gives me shivers. I know a good bit of C#/.NET but once I discovered Javascript I've used it for almost everything.

Anyway, I quit my job as a web developer to go back to college and start a new degree, that degree of course being Computer Science. I'm doing this because I figured it would lead to me becoming a better developer, but sometimes with all the things I read about college, I'm not so sure...

Input anyone??

Thread Thread
 
abodmicheal profile image
Abod Micheal (he/him)

Colleges or university won't make u a better developer, you need to learn it your self and really practice hard, universities gives unnecessary work lost but I guess the certificate is important

Collapse
 
saurabhdaware profile image
Saurabh Daware 🌻

Hi, I am a university student and here are some of the things that a lot of people in my college don't know about :

  • a lot of people don't know what ES6 is or in general what javascript versions are and how javascript has changed over the past.

  • Some of my classmates are too confused about React vs Angular vs Vue and they just try to rank them (XYZ is the best framework etc) so maybe you can tell the advantages and disadvantages of every framework and their use cases.

  • You can tell them about the local javascript communities, conferences, and meetups and maybe encourage them to join these communities if they are interested in javascript

  • Also, you can encourage them to join dev.to, GitHub and other websites like this.

Good luck with your talk!

Collapse
 
nerdy_girl profile image
Natalia

Hmmm, do you think I should talk about the latest changes in JS version or talk about the most interesting changes that happened?

You can tell them about the local javascript communities, conferences, and meetups
This is really great point! Thank you! :D

Collapse
 
saurabhdaware profile image
Saurabh Daware 🌻

I guess the interesting one's! It's fine if they don't know flatmap or even async await etc but maybe just go for things that they'll understand easily.

Like you can show them how difficult it was to do xmlHttpRequest but fetch just made things easier.
Same with prototyping vs es6 classes.
Also, people from my class have no idea what "asynchronous" is so you probably would have to start from explaining how javascript works different from python or other general languages and then if you have time left, you can talk about promises and then maybe give a short intro to async await.

Thread Thread
 
nerdy_girl profile image
Natalia

Like you can show them how difficult it was to do xmlHttpRequest but fetch just made things easier.

That's really great thing to do :D Thank you :D

Thread Thread
 
saurabhdaware profile image
Saurabh Daware 🌻

Glad it helped! good luck with your talk :D !

Collapse
 
astarael2 profile image
Simon Mills
  • Closures. How they work and how to get away with never defining a single class.

  • Throwing functions around like variables because that's all they are.

  • Typescript. It exists and it can make the Dev experience so much less frustrating.

  • What happens to variable scope with var as opposed to const and let.

Collapse
 
nerdy_girl profile image
Natalia

TypeScript is worth to mention! And var vs const and let. True! Thanks! :)

Collapse
 
amyth91 profile image
Amit Kamble

Hmmm, I'd say stuff like.

  1. String + number = concatenated number or string

    • '5' + 5 = 55
    • '5a' + 5 = '5a5'
  2. String - number = number or NaN

    • '5' - 5 = 0
    • '5a' - 5 = NaN

I've spent some time debugging an issue related to this and only found it a few years ago. Wish they had a class like 'JS - Fun facts'.

Collapse
 
recss profile image
Kevin K. Johnson

Type coercion, if anyone is curious about the topic.

Collapse
 
leob profile image
leob

The famous example:

'10' + 1 === '101'
'10' - 1 === 9

:-)

(and the difference between == and === that's also a nice one)

Collapse
 
nerdy_girl profile image
Natalia

yup! Great idea for some tricky examples and exercises! :D

Collapse
 
harrim91 profile image
Michael Harrison

Hey!

Although I didn't know anything about JavaScript at university - I studied philosophy - I'm now a tutor at a coding bootcamp teaching JavaScript from scratch. Our first module is called JavaScript Basics!

In lectures we cover primitive types (strings, numbers and booleans) advancing to more complex data structures (arrays and objects) and functions, defining what they are, what they're useful for, and a look at some built-in methods with some examples, and the MDN documentation. We cover control flow (loops and if statements) and I like to focus on the array iteration methods (map, filter, reduce etc) particularly as an alternative to loops.

We give a set of exercises where the students clone a repo with a load of jest test cases grouped by data type (strings, numbers etc) and they have to run the tests to write the functions that pass the tests. For example, they have to write a function that makes the first character of a string upper-case. I think this is a nice intro to TDD too, and it's nice to get the validation of the green ticks when they get it right!

Hope that gives you some ideas!

Collapse
 
nerdy_girl profile image
Natalia

Oh that gives me a lot of awesome ideas! Thank you for such great insight! :D

Collapse
 
jamesthomson profile image
James Thomson

I think besides the obvious fundamentals (primitives vs objects, conditions, operators, etc.), one thing that wasn't really discussed in my courses was the actual language. Where did it come from? Why was it created? Why is it referred to as an interpreted language? What really goes on behind the scenes? What's a JavaScript engine? All of these I see as fundamentals, but (at least in my course) they were never really touched on.

Once I learned more about these, I found I grasped the language a better. In fact, there's a great article written not too long ago by a fellow DEVer that touches on some of these questions: dev.to/areknawo/javascript-from-th...

Collapse
 
nerdy_girl profile image
Natalia

Hmmm, that's really good idea for the intro to Js course!
Going to check those questions you recommend! Thanks :3

Collapse
 
allasel profile image
Allasel

The main thing I would like to know is how to use my time more effectively when learning a language. In fact, studying at the university only bothers me, so I just order accounting help and other tasks on the site au.edubirdie.com/accounting - it always helps me out and I have more time to study coding.

Collapse
 
gregatgit profile image
Greg Duncan

I would recommend opening up the console and show them js in action. How you play with the dom. Add and remove elements and classes. Try and show that js has a fun side.

Collapse
 
weptim profile image
WEPUKHULU TIMOTHY

That's on point history of javascript ain't a big deal

Collapse
 
nerdy_girl profile image
Natalia

Uu, that's a nice idea! Thank you :)

Collapse
 
wuya666 profile image
wuya666

When I learned JavaScript in university more than 15 years ago (and the course was not really about JavaScript, but emerging web technologies at that time), it was just taught as a basic scripting lanugage for the web. I really wish I could have learned more about the prototype-based object system, the functional programming style, and its extreme flexibility other than just a basic scripting tool, I'd love to get introduced more to this "free-style" programming style different from the Fortran/Pascal/Basic/C++/Java ways (well, I did learn Lambda Calculus in university, which is different, but not really a practical programming language)

Also personally I like JavaScript as a programming language, well I know it might be one of the most hated (if not THE most hated) programming languages in history, and I like Rust/Python/Scheme/Haskell/Elixir/etc. too, and I have plenty of frustration with JavaScript's run-time "un-errors" and "landmines" myself, but IMHO JavaScript stands out as the most "free-style", non-opinionated and still very practical programming language out there. After many hours of coding works following the "pythonic way" and "Java design patterns", coding in JavaScript can feel like a breeze of fresh air.

That's why I think everyone should at least learn a bit of JavaScript, not just because of its ubiquity nowadays, but also it's one easy-to-learn language where you actually can delve deep into multiple vastly different programming paradigms and learn many different ways of thinking. Where most other popular programming languages nowadays tend to be biased towards a certain philosophy on how to solve certain problems best, JavaScript's philosophy seems to be do whatever you want in whatever way you choose.

Collapse
 
mattmoranjava profile image
Matt Moran

I wish I'd known that JS is so ubiquitous that I'd need to know it no matter what. I mean, I didn't do a CS or IT related course at Uni - I did a Humanities course, but I ended up working as a developer anyway since I did a website as a final year project (my degree was media-related, so there's the overlap), and ended up designing databases as an admin assistant in my first job out of uni. I've had numerous times when I've had to fix this or that within a JavaScript file, but never had much in the way of formal training.

So, what I'd say is, if you're at uni & there's a module in JavaScript that you can pick up & have it count at all towards your degree, go for it. You are probably going to need it, if you do anything IT related in your job.

Collapse
 
richardpaulhall profile image
richardpaulhall

"What do you wish to know about JavaScript when you were in university?"

Who was writing the language so I could contact them to make a better language.

"Especially these days, any program should teach JavaScript because of its ubiquity."

Only to get a job.
Programming should be taught in a good language to teach proper methods.
Only then you show them JavaScript.

Collapse
 
lbeul profile image
Louis • Edited

The biggest benefit of JavaScript (imo) is that it's crazily versatile. You can write your programmes either OOP-style or functional. Because of nodeJS and other frameworks it runs on every possible machine. And it's one of the most demanded languages out there.

Furthermore, it's super intuitive to write and boosts your creativity. In Java for example, there are lots of strict rules to be followed. In JS, you can hack stuff together how you like it.

Collapse
 
johnkazer profile image
John Kazer • Edited

It is true that you can 'use' JS quickly and for a lot of things. But in terms of learning the concepts of developing programs it causes a challenge by being un-opinionated - you have to create a 'way of doing things' yourself rather than being forced into an approach by the language.

So I would teach it as a route to jobs rather than a great way to learn CS concepts.

Also, a 'framework' like React/Angular/Vue isn't an app architecture, CS pattern or solid method of creating code - using them won't automatically make your code 'good', robust or maintainable.

Collapse
 
marcoslooten profile image
Marco Slooten

Learning JavaScript, there where some things that took a while to understand:

  • re-assigning versus copying over an array or object
  • scope
  • what is 'this'
  • not doing everything with a for-loop (in other words, use array methods like .map())

Back in uni, I would've been impressed with just a little DOM manipulation though!

Collapse
 
codingsam profile image
Coding Sam

I wish I knew how scope works in Javascript, I would avoid a lot of bugs! :)

Collapse
 
nerdy_girl profile image
Natalia

Oh, true that! It's tricky thing :D

Collapse
 
codingsam profile image
Coding Sam

Just use let and const to stay away from that weirdness :D

Collapse
 
abodmicheal profile image
Abod Micheal (he/him)

Lol they didn't teach me JS in my university, just push and pop, shift and unshift in programming generally, what they would really need is understanding loops , I wrote an article on that and understanding functions and how to use it , then arrow functions then one very important one called call back function which I'm writing an article on, callback function is really useful n you'll find it in libraries and other JS frameworks

Collapse
 
kihuha profile image
Darius Njihia

For absolute beginners,

  1. I strongly believe that the only way to make them grasp the basic concepts is by showing them. I did not like the way we spend hours of lectures learning the theory only to be introduced to practicals mid-semester. For every theoretical concept you have, follow it up with a practical case scenario or even code. Seeing is believing
  2. ALWAYS keep in mind that you are talking to beginners. Patience is key. Explain everything without assuming that they know something even if they do.

For students with some programming experience

  1. Relate your lecture to the languages or concepts they already know. This makes them feel like they are adding to their body of knowledge rather than learning a new concept from scratch. Also remember to outline the differences between the 'language style' they know with the 'javascript style'
Collapse
 
haidv profile image
HaiDV

I wish I would know the power of Javascript to learn ASAP. In my university, there 's no official lecture for Javascript

Collapse
 
kizzy_mein profile image
kelvin amoah

what js really does

Collapse
 
nerdy_girl profile image
Natalia

so the question is what it really does in your opinion? :P

Collapse
 
mkilmer profile image
MKilmer

I think the study on Data Structure and Algorithms is very important, because it is possible to improve the logic, as well as know more about the language (in this case, Javascript).

Collapse
 
dowenb profile image
Ben Dowen

I did Bunch of JavaScript at University. Although all things JavaScript have moved on significantly since then.

Collapse
 
zemuldo profile image
Danstan Otieno Onyango • Edited

I didn't study coding at the University so I wish I knew some JavaScript then 😂
Man I would be far! 😂

Collapse
 
maurocon3ras profile image
Mauricio Contreras

That it was more than just form validation

Collapse
 
mike_hasarms profile image
Mike Healy

I would steal the outline of this Syntax FM episode to use as a guide:
syntax.fm/show/162/the-fundamental...

Collapse
 
awakeel profile image
Abdul wakeel

Javascript is not only used for validation 😁

Collapse
 
metalmikester profile image
Michel Renaud

It didn't exist. The web was barely starting. We were all excited about static pages filled with badly-formatted information. :)

Collapse
 
spiritupbro profile image
spiritupbro

i want to know how to create a directory structure like framework that in someway our project could be maintenable and reusable in the future

Collapse
 
maverickmarmot profile image
Amal