DEV Community

Cover image for Learning the Granular Details of a Programming Language?
Robert Cooper
Robert Cooper

Posted on

Learning the Granular Details of a Programming Language?

I'm currently reading "JavaScript: The Definitive Guide" and it's a mighty long book because it basically covers EVERYTHING related to JavaScript. This has got me wondering: Am I wasting my time by learning the granular parts of the JavaScript language?

For example, JavaScript has this concept of a positive zero (0) and a negative zero (-0). Both values are equal in JavaScript, except when used with a divisor:

var positiveZero = 0;
var negativeZero = -0;
positiveZero === negativeZero; // => true
1/postiveZero === 1/negativeZero; // => false

Let's be real, what are the odds of me remember such odd behaviour and what are the odds of that ever being useful while working with JavaScript?

What do people think? It's it worth spending time learning such obscure parts of the language. If not, is it worth reading books that go into the real deep parts of a language?

Latest comments (33)

Collapse
 
mouvedia profile image
G. • Edited

Am I wasting my time by learning the granular parts of the JavaScript language?

If you are passionate about ECMAScript, want to become a senior and be able to maintain legacy codebases, no you are not.

Collapse
 
linlen profile image
((len probert))

A better book may be Javascript The Good Parts, also by O'Reilly as it seems a lot of the "granular" aspects are not worth knowing.

Collapse
 
pollitte profile image
Politte

I don't think it's right...(in my case), When programming C++ everything is fine until you get to the syntax, so reading a book while taking an online course is helpful.
Exmpl: I'm taking the Unreal Developer Course and reading:"Learn C++ Through Game Programming fourth edition"

Collapse
 
jay97 profile image
Jamal Al

I think that u should be at a good understanding of the features of javascript u use everyday.other than that u should be worry. No that's not to say learn this and that and ur done, nop, i would say u should make an effort every day or so to learn about something new in the range of ur tools and interest.

Collapse
 
pogpog profile image
pogpog • Edited

TL;DR: Try a couple of books in parallel, focusing on different levels of detail/practicality. Or, something like Javascript Patterns by Stoyan Stefano might give you a better mix of detail and practical examples to begin with than the definitive guide. It's shorter, too! :)


I don't think there is a right or wrong answer here, but generally a deep understanding of a language is a good goal. What I aim for when learning something technical is to maximise the number of "aha" moments per hour. But how you do this will depend on your personal learning style.

Some people like to delve into detailed documentation to understand a language's specification. If you have a strong background in computer science, or if you have learned many languages previously, this is probably ok, but not necessarily the quickest way (but could be for you).

Others prefer to start with high-level examples and working apps that give you a flavour of what you will be doing to get the job done. After that, going deeper, with more detailed explanations until finally you get to a point where you're learning the reasons why you need to do things a certain way.

Personally, I like to mix it up a little, alternating between levels and having two books on the go at once. I find it useful to have the different point of view on hand and it just keeps my interest up.

Ultimately the best thing you can do is experiment and see what suits you.

Collapse
 
maximumpeaches profile image
Maxwell Pietsch • Edited

I think the question is will the time spent reading this book increase my productivity (or perceived productivity, if that is what you're after) more than the time it took to read the book. There are definitely books that will make you more productive. I believe this because I've read hooks which have helped me a lot. A lot can be learned from Stack overflow but sometimes a book is needed to explain a topic in depth. I think this was the case for me with learning about how to write thread safe code, where Java Concurrency in Practice helped. I do not know many JavaScript books but I'm sure they exist. On the other hand some books you may not learn much from or will take longer to read than you'll get back in productivity.

Collapse
 
brygrove profile image
Bryan Grove

The value of knowledge is extremely subjective, especially in the software field. When spending time on the development of technical competence the question is always whether to go broad or deep. The answer depends on what you have to do and what you plan to do. If you are a JavaScript specialist and you spend 80% or more of your time working with JavaScript, it's probably good to know the obscure parts. If you do work on a framework like react or angular, then knowledge of the languages nuances and quirks is essential. But if you primary work in another language and only use JavaScript for front end work, or you are an entrepreneur and you also must do your marketing, customer support and product development then knowing this sort of information is only a distraction from your goals. Think about where you want to be vs where you are and it will be much easier to decide the value of that knowledge.

Collapse
 
robertcoopercode profile image
Robert Cooper

Lots of mixed feelings on the topic! Interesting to read all of your perspectives 👍🏼

Collapse
 
svankirk profile image
svankirk

I think deep study is generally a good idea, but it's especially important with JavaScript. It's such a wacky language, that I don't think you can actually be effective as a programmer without knowing the guts of the language

Collapse
 
buphmin profile image
buphmin

By golly you're right! Always learning new things on Dev.to :)

Here is a golang example:
play.golang.org/p/8iK3kTB7v0c