Hacker News new | ask | show | jobs
by bpesquet 3250 days ago
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!

8 comments

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.

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

> 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

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.
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.
Odds are that it is a native module. That's unfortunate, but there is a plan in place to make a consistent native module API: https://github.com/nodejs/abi-stable-node
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.
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.
> 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.

Side note: That teacher's method is great! That's a hell of a way to have kids remember what you taught them.
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

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!

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.
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
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
Was that John Resig's 'Pro Javascript Techniques'?
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

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

I'd be willing to help with a Spanish translation as well.
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.

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.

includes is the same as indexof, what's the big deal in your opinion?
Index of element is greater than minus one is an odd way of thinking about whether an array contains an element.
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.
I skimmed it and think it looks good for a beginner and really like that it focuses on pure JS. One thing I didn't see (and, again, I admit I skimmed) was how to structure a JS project/application. I know this is targeted at beginners, but even beginners need to see structure.

If I missed all this in my skim, please forgive.