Lurker News

Comments (110) 18 threads

bpesquet8 replies#
Hi all, author here.

Backstory: I'm a CS engineer/teacher and this book is a side project started in December 2016. You can read a bit more about it here: https://medium.com/@bpesquet/walk-this-javascript-way-e9c45a....
The writing process is now completed and I'm actively looking for feedback to make the book better. Any opinion or advice about content, pricing, or that hastily created Leanpub cover would be greatly appreciated. However, please keep in mind that this is a self-published effort still far from being polished and open to improvement.
I'd also like this thread to stay focused on the book itself, not on the merits/weaknesses of JavaScript or the usefulness of choosing it as a first programming language.
Thanks in advance!

scarcitykillz3 replies#
It's a great idea and I think the world does need a new book for pure JS.

There was a book released about 10 years ago by the guy who wrote jQuery. It started with basic JS and went all the way through to advanced features. It really helped me master JS.
Where I think that book is better then yours is that it focuses entirely on JS where as you spend a lot of time talking about http and the web works. Anyone reading your book to learn js will already know that.
An updated version for the modern day of the book I mentioned earlier would do very well.
I don't mean to sound negative and I applaud your effort and the time you put in to do it and wish you the best of luck!

mynd#
I assume a book titled "X from scratch" requires no previous knowledge for the intended audience. It's hard to talk about writing apis without knowing the difference between POST and GET
matthewvincent2 replies#
I definitely wouldn't assume that a JS newbie knows the http fundamentals. That definitely wasn't the case for me when I started learning. You can get a lot done on the web without really understanding what you're doing.
scarcitykillz#
Maybe but it makes this book only good for true newbies. There's plenty of tutorials for complete newbs but no good book for people who want to master modern pure JS
photojosh#
Was that John Resig's 'Pro Javascript Techniques'?
feiss1 reply#
I love it, very nice. Clean, modern, concise.

Are there plans for translating it in other languages? I'd love to have time to translate it to spanish, but almost no free time..

axtscz1 reply#
I'd be willing to help with a Spanish translation as well.
bpesquet#
This is a great idea, thanks!

I need to figure out how this could be organized and will get back to you in a few days.

specialist7 replies#
Nice. Thanks for sharing.

Bravo for burrito recipe. I'm convinced I became a programmer in 4th grade. Our creative writing assignment was instructions for making a peanut butter & jelly sandwich. Then our teacher followed our instructions literally. Hilarity ensued.
---
I think the Intro's link to the local env setup in the appendix is broken.
Anymore, I always check the colophon first, then decide to proceed.
I applaud the online option.
I'm dubious of the local option. "Install the latest XYZ" will bite you (your students). Especially with JavaScript and nodejs. Mayflies live longer.
For future, should tutorials start with Docker images, or scripts, or virtualbox images, or something, to mitigate digital drift? Hoping other commenters will share their ideas, experiences.

52-6F-62#
Side note: That teacher's method is great! That's a hell of a way to have kids remember what you taught them.
andrewstuart2#
For digital drift: anything content-addressable (e.g. using git and referencing SHAs) is your answer. Continued availability and support, though? If you can answer that question, you should probably quit your current job and use your divination talents in more profitable fields.
at-fates-hands#
> Our creative writing assignment was instructions for making a peanut butter & jelly sandwich

The Harvard CS50 class uses this as an example as well - with mixed results that are hilarious, but relatively obvious once you start thinking about coding and recipes.
Here is the video: https://www.youtube.com/watch?v=euFj8D1A1Kw

Cthulhu_1 reply#
Re: nodeJS versions, I'd go with something like "Install NodeJS, this book was written with version x.y.z"; I don't think JS will become backwards incompatible in the near future, so as long as the book doesn't contain experimental or unofficial JS features, it should be fine for the next 5-10 years.
rapind1 reply#
Anecdotal I suppose, but I have an app that was written for node 5 and it doesn't work on 6+. I'm sure I could figure out and upgrade it, but it's not too high on the priorities yet thanks to nvm. Oh, and it's not the code, it's one or more of the npm modules.

Continue this thread — 1 reply

samuelthomas#
> I think the Intro's link to the local env setup in the appendix is broken.

The book is written using Leanpub's markdown syntactic sugar it seems.

epicide#
> Our creative writing assignment was instructions for making a peanut butter & jelly sandwich. Then our teacher followed our instructions literally.

Did something very similar at an IBM day camp where we did the same thing :) I was 12 when I attended. I distinctly remember the epiphany I had after the sandwich lesson.
On one of the other days we did Lego MindStorm stuff. I was randomly assigned to the "software" team. They gave us a little workbook/journal with questions for us to reflect on the daily activities. One of the questions for that day was what we liked best. I wrote something very similar to "programming because that's what I want to do when I grow up" (I had decided that then and there). I am a software developer now and that workbook is one of my prized possessions.

bphogan#
I used the Peanut Butter and Jelly one in my classes when I taught programming. I also used "tying shoes". Both of those examples came from a class I took on how to teach general subjects. Before you can teach someone, you need to be able to explain it well. Thus, before you can tell a computer to do it, the same applies.
tmaly1 reply#
It might be too much to ask, but I really liked how the KnockoutJS tutorial was presented http://learn.knockoutjs.com/

You basically live code to learn the basics right in a browser. It would be cool to have something like this for the book

noir_lord#
That demo is the reason I picked knockout years ago, never regretted it either, knockout was/is amazing and they understand backwards compatibility and API stability.
schemathings#
I've seen a few comments here suggesting you spend time explaining how to install toolchain etc or version issues.

I agree that having a default VirtualBox VM might be the best way to go so it's a 2 step install and everyone is on the same page regardless of what OS they have. David Swafford at Facebook has been teaching Python to network engineers at NaNog conferences for awhile and does the same .. he hands out a USB stick with everything needed, but I wasn't there so I emailed him and he gave me a dropbox link for everything needed .. e.g. this talk https://www.youtube.com/watch?v=dv328WQlUQg

z3t4#
I think you have to introduce all the CS stuff more slowly. Did you learn everything you know about programming in less then five minutes ? Then how do you expect a beginner to understand any of it ? Don't get me wrong though. The content is good, but it's too dense. Reading it as a beginner will be painfully slow and boring, like reading the TCP/IP spec. just to make a HTTP request.
nailer1 reply#
This is a great idea but ES2017 instead of ES2015 would make it even easier for newcomers. This would allow `await` which is a lot easier for newcomers to follow than callbacks or .then(). Also you really want string.includes() !

Node and all current browsers support ES2017 so you don't really lose anything either.

bmn__1 reply#
includes is the same as indexof, what's the big deal in your opinion?

Continue this thread — 1 reply

Continue this thread — 1 more reply

ryanmarsh11 replies#
I just got home from teaching JavaScript to a room full of people who've never written a line of code in their life.

This book is missing something critical that most intros to JavaScript overlook:
How does the student set up the plumbing and run their code?
It's amazing how much of a hump this is for many trying to get started. It also amazes me how oblivious most of us programmers are to it.
"Just open Chrome Dev Tools" or "put this in a file and run Node" are really strange computer tasks to someone who has never typed and executed code.

hugs1 reply#
Which method (Chrome Dev Tools, Node, etc.) did you teach to your students? Any other online resources you recommend?
ryanmarsh#
Both. Node and chrome dev tools. Mostly VS Code plus some plugins plus node. Easiest way to give them a working, comprehendable and debuggae stack.
0xCMP1 reply#
Very true. Or things like "download and install git".

Oh wait you're on a mac you need Brew. But you're on windows? You're gonna need X. You're using linux and still don't know? (e.g. Parent installs linux on a computer for their child to learn programming on (e.g. buys them a rpi) )
Lots of "setup" stuff needs to be explained or at least guided through for a from scratch approach, but also needs to be easy to skim and skip if the person learning already knows how to do it.

yorwba1 reply#
Sometimes I fantasize about a platform for tutorials on "how to do X using Y if you know Z" where prerequisites would be linked wiki-style, but disambiguated for the learner. If they are on Windows and use cmd.exe as their shell, command-line examples would be adapted to that, while someone using bash on Linux would get fitting examples as well. If they already know how to do a part, they get just a short summary instead of lengthy explanations.

Unfortunately, you'd need a lot of content before something like that would take off, and just specifying a few options while otherwise relying on the reader to figure out any differences is simply easier for a writer and still good enough for most learners.

voltagex_2 replies#
A few times I've visualised this as a tech tree like you see in some RPGs and RTS games. I'm not an artist but I'd love to try sketching this out for a few "trees" at some point.

Continue this thread — 2 replies

soneca#
I agree. Recently started learning to code and I could see how tutorials aimed at beginners assumed I would not only know, but be familiar with stuff like terminal/console, repository, IDE, etc
mgkimsal#
> though personally I might be tempted to just link to other tutorials instead

short term, perhaps, but longer term, keeping it in one voice, and making sure those links don't change/disappear is valuable.

mstade1 reply#
I came here to write this exactly. This looks like a nice resource, the tone is friendly and inviting and the topics are introduced at a nice pace. Then I thought about my cousin who I've been trying to teach to program a bit. She's interested and she's smart, she understands how things work at a conceptual level and she can design an algorithm. But if I just give her some JS and ask her to run it she'll stare blankly right back at me.

The introduction needs to talk about prerequisites, setting up for following along way before getting into the topics. Right now it's just a (broken) link to the appendix, which I don't think is good enough.
I like this overall though, it's good stuff. I'm going to try and find some time for a PR to change the introduction into something I think would be better for a newbie, and if translations are welcome I might just work on a Swedish version.

spyhi#
> But if I just give her some JS and ask her to run it she'll stare blankly right back at me.

Exactly. I know how to program, if programming means designing an algorithm to achieve a task and returning the result...but even though I'm most of the way through my CS program, I don't know how to do a lot of the stuff necessary to make that program useful in the real world. I know I'm missing that and I'm learning on my own, but I'm really bothered there hasn't been much emphasis so far on how to deploy the program in a real-world environment and integrate it with an ecosystem of programs, such that laypeople can use it. Algorithms and programming are only a small piece of the puzzle, and a lot of people won't have senior developers to guide them.

cr0sh2 replies#
> "Just open Chrome Dev Tools" or "put this in a file and run Node" are really strange computer tasks to someone who has never typed and executed code.

While not a perfect answer to the issue, I often tend to wonder whether or not we lost something in the transition from traditional microcomputers (Apple IIe, Commodore, TRS-80, etc) to the PC era...?
Actually, even in the early PC era, the PC booted to ROM BASIC; this was how personal microcomputers worked.
That said, in the very early history of personal computing, with machines like the Altair, IMSAI, and Sol - these machines "out of the box" (so to speak) didn't drop immediately into a ROM BASIC or "monitor"; they usually had to be "booted" off of some paper tape or other storage media hosting the boot process (I wasn't around during that period, but I wonder if that was only a part - if you then had to "bootstrap" your way up the stack to get to something useful? I know on the Altair, unless you had it set up in ROM to boot from, you had to hand-toggle some initial boot code in just to read the larger boot process from paper tape). All of this process was virtually identical to how commercial and larger systems were booted.
But the Apple changed this, and made the "personal microcomputer" accessible to the general public. Now, they could power it on, and get to a prompt of some sort. It still didn't do much, but it wasn't as arcane. All you had to do was type some stuff...and...you got something in return: A recipe filing system, a calendar, a poem, a maze, a game of some sort (Hunt the Wumpus!), etc.
This continued to be the case for (about) a couple of decades - the first real crack in this was the introduction of the Macintosh, but most people stuck with the other systems, with the Mac relegated to the desktop publishing realm mostly (at which it really excelled). Things started to really change in the late 1980s and early 90s - mainly because of the introduction of more usable versions of DOS and (later) Windows. Thus, the PC era was born.
People began to stop being creators (of software) and started to become consumers instead. Not that this was necessarily a bad thing - there were still creators of course, but this marked a split; there were now two distinct camps being formed.
With this, though, began the difficulty in teaching programming - if you didn't know how to get to the interpreter or compiler, you would have a difficult time learning.
So here we are today. Fortunately, the answer seems to be coming from the web: There are more than a few sites out there that let you examine, edit, and run code all from your browser, for more languages than you might have thought existed (and new ones are added constantly). It isn't the same as it was (from when I was a kid), but maybe in a way it is better: Help - whether from others or from some other resource, is just a few clicks away (no longer do you have to thumb thru magazines or books trying to formulate an answer)...

xsmasher1 reply#
I disagree with the "People began to stop being [creators/hacker]" part - the existing people didn't change, the market OPENED UP to allow people who were not hackers and computer experts to be computer users. This is a good thing; otherwise computers would have remained a niche hobby like ham radio or woodcarving.

You're right that the average computer owner is not as savvy about the internals as before, but that's just because the pool of computer owners has expanded so much, on account of the simpler and consistent and more learnable interfaces.

Continue this thread — 1 reply

Continue this thread — 1 more reply

Continue this thread — 5 more replies

Continue this thread — 4 replies

le-mark1 reply#
Very, very nice. I briefly went over some chapters and I especially admire the 'no framework' approach you've taken. I believe there's a real need for a book like this, kudos to you for making it happen! What inspired you to create this?

Continue this thread — 1 reply

Load more comments