r/AskProgramming • u/hamburglin • Sep 28 '20
Why are programming concepts explained with such difficult language?
I just read a page explaining concurrency programming because it seems to be a hot topic in west coast tech area interviews this month.
I did not understand half of the concepts it was trying to convey because the language was to foreign and generic. I finally understood that I already used concurrency in a script that leverages threads for api calls because the network communication was the bottleneck. (Processing won't hault just because one thread is waiting for a reply).
I had to reread the article after I understood that I already did this once to even get near to fully grasping what the author was trying to convey.
Is this intentional? MSDN docs are the fucking worst as well. I can't help but feel like these authors are trying to jack themselves off or gate their knowledge by forcing readers to speak their weird language.
What am I missing here?
44
Sep 28 '20
What am I missing here?
Experience reading such stuff.
I've been teaching programming, and found that explanations from documentations which are concise and exact and crystal clear to me, make absolutely no sense to someone who is still learning the ropes. Not because it's too advanced, but because people need to learn to read such explanations.
They make heavy use of technical jargon that you must be fluent in, and every word is extremely important, so it's not like you can understand what it says if you ignore a single word.
The alternative is to write explanations that are far far longer, more obscure, and harder to read for experienced technical specialists. In order to write like that, a lot of the details have to be missed, and often this means painting an incomplete picture, which people avoid if they can.
Just yesterday I had to teach some basic concepts to a kid (the point isn't that it's a kid, but the lack of experience, because the explanation would be the same for any age), and it was hard to not give into the urge to be exhaustive in explanation, because if I were, the kid would have been lost in that sea of information. But if I were teaching this to an experienced person, I would get bad feedback if I missed a single detail.
10
u/LetterBoxSnatch Sep 28 '20
By far the hardest thing in teaching is scaling your explanations appropriately for the listener. And sometimes trying so hard to get into the head of the learner can get you confused about concepts that you otherwise understand well.
Anyway, to add to what you said:
It’s not just that the words are too precise for new learners. It’s also that the words are precise within a technical context. You run into this a lot when moving between different language communities, or even just dialects of a single programming language and the assumptions that are attached to concepts. It’s not so bad for high level things, but can get confusing if, say, one context assumes a “stream” as a handle for a buffer instance and in another context is talking about a pointer to values when discussing a “stream”; or if there are important domain considerations like the exact nature of the filesystem APIs that may not be obviously relevant for some library.
For things like “concurrency,” it can also be the case that someone is using such a word as a shorthand to refer to a number of related issues. Like in JavaScript, it’s single-theaded, so concurrency is really talking about handling jobs in such a way that their execution can yield periodically to other jobs in some optimal way that maximizes usage of the single thread.
1
u/hamburglin Sep 28 '20 edited Sep 28 '20
At that point teaching is a skill that matters imo. What block of knowledge must they know to continue?
Technical docs assume you have a wide foundation. This is i knew but is more clear to me now. I was so far behind and I felt like each document or company used a different lexicon that I was frustrated.
None of this was ever taught to me in the programming classes I took in college. Hell, if more of the classes focused on the concepts over programming I may have more inclined to take it as my major.
For example, asking me how I'd design a system to balance the needs of customers at a meat counter in a grocery store is much more engaging than starting with how to code the already-given solution using concurrency. "Oh this is so easy and I feel smart! This is just a queue. Hmm ok with that our of the way and a visual representation on the whiteboard, I'm actually interested in learning how to program it."
2
Sep 28 '20
What block of knowledge must they know to continue?
The words and how to read them, and the hidden implications.
Let me give an example maybe.
I was teaching this method to someone who is quite new at this. To me this explanation is just amazing, at how concise, unambiguous and clear it is. Similar to documentation on Postgresql, but actually better.
Return a list of the words in the string - ok, so now i Know what it returns. I know that it's a method that returns a
list, of words. Clear as the sky from the ISS.using sep as the delimiter string - ok, awesome, so I can pick how it splits
If maxsplit is given - aha, so it's optional, but if I specify it then something special happens
at most
maxsplitsplits are done - ok, awesome, so I can choose how many items max I can have in the list mentioned abovethe rightmost ones - bingo! so it does it from the right, and once the
maxsplitstrings is reached, it stops. Crystal clear.If sep is not specified or None, any whitespace string is a separator - default behavior is nice.
So, here we are, a clear explanation. I know what a method is, I know what
returnmeans, I have vast experience in using this terminology, so it's clear as day to me. I can focus on the details - on the specifics like what the hell amaxsplitis, what I'll have as the result, etc.However give this to someone who doesn't have that much experience, and they'll get stuck at "returns words", understand this as the main takeaway, and not focus on the rest because there's no mental energy, all focus is on the words, and maybe the separator.
The skill here is to be able to dissect the definition, and have the mental resources free from understanding the words, to be able to use it to understand sentences.
If you want actionable take-aways from this, I suggest you practice a lot more on the more basic stuff, or even try out this advanced stuff. Just spend a lot of time doing it, doing it wrong, learning why it's wrong, and how to do it right.
There's no easy way around this or special tricks or anything. Your mind has to be strong for this, and it only becomes strong with a lot of repetition. You need the problem to be the actual thing you're trying to solve, and not the explanation of the definition. As Daniel Kahneman illustrated, we have System1 and System2. When something is new to you, you use the very limited resources of System2, that gets you tired fast. When you do it often enough, System1 can take over, and free up System2 for the tasks that you actually want to solve.
Repeat, repeat, repeat. Practice.
17
u/KingofGamesYami Sep 28 '20
When a particular concept doesn't have a word defined, one must make one up. Especially if you'll be referencing it frequently. In this case, the author must provide a glossary.
For example, if I were reading the MSDN azure docs, I'd need to refer to this glossary:
https://docs.microsoft.com/en-us/azure/azure-glossary-cloud-terminology
This isn't unique to software development, most highly technical fields end up with this problem. If I was a mechanical engineer reading Autodesk Inventor's docs, I'd need to use their glossary:
9
u/grimAuxiliatrixx Sep 28 '20
But come on, don’t you at least admit that some programmers’ use of jargon could do with some frobnication? 🙃
8
u/KingofGamesYami Sep 28 '20
Oh sure, some people just really suck at communicating.
I was required to take a technical writing course for my degree and saw some very good examples of what not to do.
2
u/StackWeaver Sep 28 '20
It's a difficult problem. Who is the audience? I would speak differently to a beginner vs an expert. The beginner gets lost, the expert gets bored. How do you address different readers?
I am building an edu platform so dealing with these issues directly. I did have an idea that the reader should be able to indicate their level of experience which would then impact how the article/tutorial/content is presented.
-11
u/hamburglin Sep 28 '20 edited Sep 28 '20
But do you?
Edit: the answer is no.
4
u/KingofGamesYami Sep 28 '20
Yes.
When you must use technical terms for precise communication, define them in context.
1
u/hamburglin Sep 29 '20
What does define them in context even mean?
2
u/KingofGamesYami Sep 29 '20
define. verb | state or describe exactly the nature, scope, or meaning of.
context. noun | the circumstances that form the setting for an event, statement, or idea, and in terms of which it can be fully understood and assessed
So to 'define a term in context of a technical document' would be to state or describe exactly the meaning of the term within the circumstances that form the setting for the technical document in terms of which it can be fully understand.
As an example, within the context of Azure documentation, 'cloud' does not refer to a mass of condensed water vapor floating in the sky. Instead, it refers to a vast network of remote servers around the globe which are hooked together and mean to operate as a single ecosystem.
https://azure.microsoft.com/en-us/overview/what-is-the-cloud/
1
u/hamburglin Sep 29 '20
Ok thanks, I get it but that didn't help me understand the first paragraph of this any faster https://en.m.wikipedia.org/wiki/Concurrency_(computer_science)
... when describing a meat counter and customet tickets would have done me much more of a favor in catching on quicker.
I totally get I can Google as well.
1
u/KingofGamesYami Sep 29 '20 edited Sep 29 '20
The article includes a reference to the classic 'dining philosophers' analogy which is analogous to your meat counter analogy.
Also, it is possible you are conflating the (much more complex) topic of concurrency with parallel computing; while similar, they are distinct topics within computer science.
1
u/hamburglin Sep 29 '20
Well then I partially blame leetcode for the flashy new "concurrency" set of problems on its front page.
2
u/KingofGamesYami Sep 29 '20
If you're talking about these:
https://leetcode.com/problemset/concurrency/
They are proper concurrency problems.
2
u/SamL214 Sep 28 '20
Jargon is always upgraded too. Just like tech and cars. People will rebrand phrasing to make some long known technology or technique sound snappy as a sales pitch.
This also happens in interviews.
2
u/hamburglin Sep 28 '20
I fully agree. When I learned cloud acronyms and concepts for each company I was like "this is just a network, firewall, etc".
Mentally, it's like completely relearning to me which is a waste of my brains memory and processing power. I see it as gating info for profit.
1
Sep 29 '20
Not "gating". They're not doing this on purpose.
It's really just marketing dickery.
Each "new" thing needs to have cool new names, otherwise it's not new and differentiated enough from the competitors ;-)
In this particular article though, the author(s) have simply had their dictionaries and thesauri open on their desks while writing it.
17
Sep 28 '20
One of the few benefits of university is that it teaches how to research a subject. Any new area of knowledge will have concepts that are new to the reader. As the student come across them, they should be stopping, reading up on the concept, and then going back to the main text once the concept makes sense. This is 101 of learning
8
u/phallidendron Sep 28 '20
As someone with no formal education this makes me feel great because this is how I learn best. Even a simple thing like reading a book and coming across a word I don’t know, looking it up, then moving along.
2
u/StackWeaver Sep 28 '20
One of the overwhelming aspects of software is that this "reading up on the concept" is a never-ending rabbit hole. I can start on literally any software subject and, no matter how seemingly insignificant, there will be related links to concepts that could take me years to fully grasp.
Absolutely, it is a great way to learn! It also pays to draw the line somewhere and balance it out with practice.
1
2
u/MarkusBerkel Sep 28 '20
Umm...Where to begin...
This is the software equivalent of: “The Space Shuttle engine manual sure is complicated. Why do they use all these engineering terms that are not obvious to a home learner??”
Computers are amazing and fascinating things, and took billions of dollars to achieve the state they’re in, where you can have a multiprocessing OS potentially with multiple threads and even multiple cores.
When you’re programming, you’re basically doing in software what the shuttle engine guy is doing in hardware. Imagine a “Space Shuttle Engines for Dummies.”
Books (or web pages) on concurrent programming are filled with complex words and with hard concepts b/c it’s a complex subject with difficult ideas.
Concurrency and parallelism is very hard to get right. So you have to understand locks and IPC and context switching at the engineering level, and then to understand deadlock and critical sections at the theoretical levels (there’s overlap).
Even simple multithreaded applications are complex. And it’s hard to be correct without being precise when speaking about such a complex subject.
You can challenge the pedagogy, but it’s there for a reason. Hopefully good science and math writers Can find simpler ways of explaining the basic ideas. But it’s not a beginner-friendly subject. It’s hard to imagine teaching it without saying things like “semaphores” and “mutual exclusion”.
And when you come across stuff that you feel is really hard, sometimes the take-away should be: “Shit, there’s a lot going on here, and maybe I’m ignorant of a lot of the prerequisite material. I should look up these words to see what they mean, and then read a book for each idea I don’t understand.”
There is no “Heart Surgery for Dummies” b/c we don’t want novices performing heart surgery. Building concurrent programs that are correct (or better yet, probably correct) is insanely hard, except in the most trivial of edge cases. Even simple things, done concurrently, are difficult to get right.
1
u/hamburglin Sep 29 '20
Well see, I kind of disagree with the first sentence. In my case, the concurrency manual should have clear directions on how to implement said topic in a practical way using the rocket ship.
That's not what it does at all, and by the end I'm left thinking "Jesus, they said all of this just to explain a queue with locks?".
1
u/MarkusBerkel Sep 29 '20
And herein lies the entire problem.
The “concurrency manual” isn’t like a flight manual with predefined steps and a checklist for launch and reentry.
Because no one knows what you’re making or what you’re trying to do. So, most schools (and books) teach you how to understand the subject, so when you encounter material, you can understand it. It’s also why we—as employers—care that you understand concepts.
It’s the difference between master chefs who know how food tastes in combinations and creating new menus vs someone reading that same chef’s cookbook and copying. The second person is copying. The first person understands food, and can be expected to solve real-world problems.
There is an expectation today, especially by new programmers, that if you can’t find it on stackoverflow, that it’s someone else’s responsibility for their ignorance, and that articles, blogs, and books should be written to address your exact needs.
IDK what your original issue was, which book you read, and how you feel it’s “overly complex”. But complicated issues need precision, which is often why books have all these “extra words”. I can’t say about your book, specifically, since you don’t reference it or paste an excerpt.
But if you’re reading about calculus and come across delta and epsilon conversations, the response prob shouldn’t be: “Dang, yo, why is this needlessly complex? I just need to know: ‘move exponent to coefficient, and drop exponent value by one’...What’s up with these ‘neighborhoods’ and ‘epsilon’ and ‘limits at infinity’?
Could there be easier intros to complex subjects? Yes. Would they help a large number of students? Yes. Should that preclude the existence of books that aim to explain complex subjects more comprehensively, perhaps in more precision than you’re able to understand? No.
Again, can’t say without looking at your book. But this still feels like whining about why a complex subject gets a precise treatment. Does the book say, in the intro/foreword who the audience is? Are you the target audience?
4
u/balefrost Sep 28 '20
Can you point to some of the docs that you had trouble with?
As an aside, concurrency can be a complicated topic. It's easy to get wrong without realizing that you got it wrong. You'll run your program and everything seems to work fine. But when you run it on a different day, or under different load, or on a different machine, everything goes wrong.
For example, here are a pair of articles about the memory model of C# with respect to threaded programming: [1] [2]. For me, those articles were eye opening. I though I understood how to do multithreaded programming, but I didn't realize all the things I didn't know.
4
u/c3534l Sep 28 '20
I just checked the Microsoft docs on concurrency and they're written in pretty plain language and in very simple sentences. It is not, however, a tutorial or introductory lesson. Its written for a professional audience partially as reference; I doubt the language is the problem, but that you're struggling with the concepts and context. If the material is too hard for you, take a deep breath and look for a more basic introduction. Find one thats your speed. I was often frustrated when I started programming because I didn't understand the difference between reference material and tutorials and I didn't always have the base of knowledge assumed for the audience. It is also almost always true that you won't learn programming without actually coding. You will pretty much always have to write code to really internalize any new and difficult concept.
1
u/KernowRoger Sep 28 '20
You're missing googling anything you don't understand really. People don't just know this stuff by instinct. You have to read up on anything you don't understand and then come back.
1
u/hamburglin Sep 29 '20
I think my problem is that my desire is lost once that happens 90% of the time. Or it's after work and I don't have enough energy left to do so.
1
u/KernowRoger Sep 29 '20
Yeah I feel that. It is a very technical subject and does take a lot of focus. You might to be better with a full video series that starts at an earlier level. This should hopefully mean nothing or less to lookup. Pluralsight was really good when I was learning. You can get a free month if you sign up to visual studio Dev essentials. See if they have a beginner learning series in your language. Articles have to cut a lot of background out or they'd be huge basically.
1
u/Isvara Sep 28 '20
Can you give examples? I'm curious about what level of jargon this was, and whether it was necessary or not.
1
u/hamburglin Sep 28 '20
It was really just the wiki https://en.m.wikipedia.org/wiki/Concurrent_computing
Don't get me wrong, some of the paragraphs were fine, but it took me way too long to understand what they were trying to get at which was essentially time sharing or queueing when multiple things want to use the same resource.
Why didn't they just open up with an example of the meat counter at a grocery store where you pull a ticket and wait your turn so readers could get grounded, amplifying their ability to learn? Start with the concrete, real life problem we can all anchor into. When you start like this, it's almost laughably simple.
I'm not arguing I can't or shouldn't google each word I didn't understand, but there must be a middle ground with education and comprehension. We are all humans after all.
1
Sep 29 '20
That page could probably do with one or two diagrams, but there's not much in there that's that bad. This page seems more like a gateway to find out more specific info about this particular subject.
You could always create a Wikipedia account, and try the page's discussion tab?
2
u/hamburglin Sep 29 '20
For sure. The point i half realized what it all meant in a practical sense qas when it talked about input/output because i ready knew network apis were input bottlenecks.
1
Sep 29 '20
Yup. Or anything that might be I/O bound, I suppose.
It depends on the kind of problem you're trying to solve. Not everything's suitable for concurrency. Sometimes it's simpler to do it the long way, if there's not much in the way of time savings to be had.
This particular article also covers the possible differences between parallelization and concurrency. On a fast machine, there probably isn't that much effective difference between the two, if you're not doing anything too insane.
A compute-bound example for parallelization (multiple CPU cores and threads) might be an image renderer, where multiple chunks can be rendered in parallel. That may not be any quicker than a single thread in a "concurrent" implementation.
1
u/east_lisp_junk Sep 30 '20
Wikipedia (like any encyclopedia) is generally better used as a quick reference than a deep study resource. It's generally not written with pedagogy in mind.
5
u/honk-thesou Sep 28 '20
Probably because you don’t know what they are talking about, basically.
5
u/ZecroniWybaut Sep 28 '20
I think that's why they're trying to learn what they're speaking about.
3
u/ThalesX Sep 28 '20
Then a good starting point is to learn the domain language. Is OP really suggesting that an entire field is devoted to making things hard to understand?
1
u/hamburglin Sep 29 '20
It's definitely not devoted to making them easy to. Even a picture could say a thousand words before you get into your fucking 100 line coding example.
Lucidchart is free.
1
u/ThalesX Sep 29 '20
There are plenty of diagrams, charts, examples and in-depth exploration. It can be found in the various books related to the field.
3
u/placek3000 Sep 28 '20
It's mostly because some of the concepts require the definition to be very specific so that it doesn't create even more confusion. Some general terms can after all refer to many different things potentially. But still, some documentations are needlessly difficult. The MSDN isn't so bad though
9
Sep 28 '20 edited Sep 28 '20
What am I missing here?
You are the missing professionalism and dedication required to learn complex topics. MSDN docs are excellent. You are blaming the teachers for the consequences of your own mindset.
8
Sep 28 '20
Totally agree, MSDN docs are some of the best out there
2
u/KernowRoger Sep 28 '20
It has to be said they suck for total beginners but that's not really the target audience. It assumes a base understanding of the language or terms. If you're not there yet you need to look for specific beginner materials.
1
u/potato_green Sep 29 '20
This 100%, even with ELI5 tutorials I often see junior programmers just copy paste the code from the tutorial without reading the text and then say it's a shitty tutorial because it doesn't work.
I completely agree with the MSDN docs being excellent, I remember many many years ago when I started programming I thought, hey let's try to use IOCP in my server sided C++ program. I remember the frustration and lack of examples and the docs being vague.
I think they're still the same just in a different format but when I read them now, and actually READ it everything makes perfect sense. It's very factual and technical of what it does and that's what it's meant for. You don't want 5000 MSDN pages explaining what a thread is or a file handle.
2
u/evincarofautumn Oct 24 '20
Writing and teaching are skills unto themselves. Just because you understand a subject doesn’t mean you’re any good at explaining it.
In fact, understanding it well might make you overconfident about your ability to explain it, not least because you might’ve forgotten what it’s like to not understand it. So you end up using technical jargon instead of plain language, and so on.
1
u/embar5 Sep 28 '20
This used to affect me too. But consider this:
"I set variable X to Y"
Was X initialized? Reassigned? Or mutated?
The vocab is just part of it. Even now I'm reminding myself of that as I explore deeper reaches.
1
u/wrosecrans Sep 28 '20
Jargon is useful. Once you get past the entry level oof a topic, some of the super nit picky details matter a lot. Especially with something like concurrency when things can happen in completely unexpected and counterintuitive order, it helps in the long run to have some precise definitions for things like 'concurrent' vs 'parallel' and 'task' vs 'process' vs 'thread,' etc. When getting into a new topic area, it's normal to have to do a bunch of "yak shaving" working on peripheral problems picking apart some of the details on the periphery of what you are trying to actually get to.
That said, a bunch of modern CS research papers are absolutely written in intentionally high class sounding language in an effort to sound more academic. Comparing some old papers from the 70's and 80's to modern papers is frequently like night and day in clarity. People will spend two pages bringing in awkward math notation to explain something that could be made perfectly clear in ten lines of pseudocode purely because hardcore math notation is "more academic," regardless of whether anybody actually finds it more useful, etc. Modern CS education desperately needs an English composition component that is far more serious and brutal about clarity.
1
Sep 28 '20
because the words they use have a lot of meaning, and is a common language among programmers, the specific language, the specific framework, etc
i honestly find pure docs sometimes a bit too heavy, each word, if not understood completely, means a lot. so i often need to read a digested version i.e. baeldung for java
1
Sep 28 '20
Basically... developers generally suck at explaining what they’ve made. Have you tried writing documentation? It’s really hard to write because if you follow a standard, it could make it even harder because the person who made that standard may be even more pretentious, but if you do it your own way it could be completely foreign to the readers.
I have struggled with this at work. There’s a reason that most people Google before they read documentation.
However, I do agree there are a lot of “educational” articles and resources that use language that really doesn’t make sense to the average reader.
I have found that sometimes when I’m having trouble understanding concepts it’s because either:
I don’t know enough about the fundamentals surrounding this concept.
The concept doesn’t spark my interest.
That doesn’t mean the concept isn’t interesting, but the way it’s explained can affect this a lot.
A suggestion to those writing docs, articles and creating educational content:
Offer real world examples and dumb things down as much as possible because you need to assume nobody understands what you understand which is why you’re making the content.
-1
-3
u/deelyy Sep 28 '20
Btw, regarding MSDN I completely agree with you. I remember reading rumors that MSDN specifically made like this to force users to buy premium consultancy.
My solution to your question is to search for some another articles/pages about same topic. Usually I can found article with explanation that good for me after checkin 3-5 different articles.
2
u/Dynam2012 Sep 28 '20
Source on the MSDN claim? No company I've ever worked for has paid a dime in "premium consultancy" and none of my colleagues have struggled grokking the MSDN docs.
0
u/deelyy Sep 28 '20
I read about it like half year ago on some forum or on HN. So no luck.
Btw, good for you, and for your colleagues, yay.
0
Sep 28 '20
[deleted]
1
u/infinity_minus_1 Sep 28 '20
Especially frontend stuff. It sucks that a new JavaScript framework comes out monthly and existing frameworks deprecate so quick with all new lexicon. I don't know which would cause less gray hair: frontend in the flavor of the month or assembly.
2
u/hamburglin Sep 28 '20
If we weren't learning 5 new systems a year that refer to methods or a firewall in a new way, what else would we be doing? ;)
5
0
Sep 28 '20
[deleted]
5
u/hamburglin Sep 29 '20 edited Sep 29 '20
I think the point is that by re-working essentially the same thing in a "new" way which really only serves to help the developer code in ways that they prefer, but is marketed as a new breakthrough-technology keeps people constantly behind.
Don't get me wrong, some things need upgrading. For instance, look at new concepts added to programming languages like interfaces or events in the past. Those help and were brand new. Renaming VPC for the third time or making a new interface to the same general concepts but using new words is not.
My theory is that to keep up with west coast tech companies paying engineers 300-600k a year, the engineers have to pretend they are learning something new. In reality, most of the times it's just a new way to do the same old thing.
Have you ever used cloud over bare bones? It's like 4x as expensive and adds 2-4x the latency. What does that save you? I'm sure there's savings but is it worth it one way over another?...
22
u/FloydATC Sep 28 '20
This is not a programming thing, the same problem manifests itself in many (if not most) other fields of expertise. As a math illiterate, for example, seeing relatively simple concepts "explained" using a wall of equations and symbols only add to the confusion.
Other areas I can think of are politics and legal documents. You would be forgiven, ofcourse, for thinking they're written that way to confuse you, but they are in fact written in an attempt to make it impossible for an opponent to twist the words.