
Show HN: I wrote a book about WebAssembly - raboukhalil
Hey HN!<p>I&#x27;ve been working on a book about WebAssembly over the last few months, and it&#x27;s finally available at <a href="http:&#x2F;&#x2F;levelupwasm.com" rel="nofollow">http:&#x2F;&#x2F;levelupwasm.com</a>!<p>Why a book on WebAssembly you ask? Well... WebAssembly is awesome (obviously ) but it&#x27;s certainly not the easiest thing to learn. So I wrote this book as a practical intro to using WebAssembly in your web apps.<p>I would appreciate any feedback!
======
zrail
Congratulations on shipping! You accomplished something that vanishingly few
people do. You should be incredibly proud of yourself.

Always Remember: the people on this site complaining about price are not your
customers, and that’s ok. There are _always_ people on this site that complain
about price. When I launched my book and it got on here half the comments were
about the price instead of the book itself. Ignore them. They’re noise. Focus
on selling to your audience.

~~~
titanix2
Well here it’s more a self published pdf than a book. It didn’t pass a
publisher screening nor got an ISBN so it’s hardly a "real" book.

~~~
thanksDr
Yes, the ISBN is what gives it that booky authenticity.

~~~
Stratoscope
FWIW, my second printing of Donald Knuth's _Fundamental Algorithms_ from 1969
lacks an ISBN.

So either it is also not a book, or else OP is in good company.

------
quickthrower2
Nice work. A small note - you might want to redirect http->https on your site,
especially as you are taking payments. You wouldn't want a MITM to redirect
your customers to another payment processing page.

Also my browser is reporting your https certificate as invalid so sort that
out too.

~~~
raboukhalil
Thanks for the tip! Luckily I don’t process payments myself but use Gumroad to
do that, so payments are safe, but I’ll get an https certificate for the
landing page.

~~~
woodrowbarlow
if someone mitms your landing page, they'd be hijacking the payment links to
redirect to their phishing hook rather than your payment service.

------
blaze33
Hey congratulations ! Funny enough, I had offers to write a book on
WebAssembly, almost 2 years ago, after writing an article[1] on that topic
that somehow ranked #1 on HN for a day :) Had to decline but never doubted
someone more experienced would write one!

[1]:
[https://news.ycombinator.com/item?id=14495893](https://news.ycombinator.com/item?id=14495893)

~~~
raboukhalil
Thank you! Really nice article btw, I like that you go into that much depth.

------
Posibyte
The capstone project and little pacman game look pretty interesting. Think you
can spare a short portion of the book to show what the writing is like? I find
them to be some of the best litmus tests of what I'm about to get myself into
on a technical book purchase.

~~~
raboukhalil
Thanks Posibyte! Here's a sample section about how to compile jq to
WebAssembly: [http://levelupwasm.com/sample-
jq.pdf](http://levelupwasm.com/sample-jq.pdf). But note that it's from Chapter
7, so some of the HTML portions might not make complete sense without reading
the previous chapters, but hope it gives you a sense of the writing style!

Also, here's the table of contents in case it helps:
[http://www.levelupwasm.com/toc.pdf](http://www.levelupwasm.com/toc.pdf)

~~~
Posibyte
Thank you!

~~~
raboukhalil
No problem, thanks for the idea! I added the TOC and sample chapter to the
landing page too since it seems like a common question.

------
olso
That's a really expensive (and I can afford it). How did you figure out these
prices?

~~~
Haydos585x2
Seems like it's in the same price range as a lot of other similar books and
courses. Authority and Marketing for Developers are two that spring to mind.
I'm sure if you subscribe to his mailing list there'll be some sort of sale on
at some point.

~~~
raboukhalil
Yes that's right! I did base my pricing on books like Authority

~~~
jplayer01
Any discount for students?

------
iwanttoeatyo
This seems to be a book about unsing emscripten to get c/c++ to run in the
browser. What if I want a book about writing wasm from scratch?

~~~
hellofunk
From scratch, what do you mean?

------
scandox
As someone who spent 2 days fighting with an Emscripten config I can say that
good information is worth the money.

~~~
raboukhalil
Yes, I felt the exact same way about those configs when I was learning
WebAssembly (╯°□°）╯︵ ┻━┻

------
seanwilson
Congrats! Any comments on how straightforward you found completing the book?
Did you get stuck at any point? What was the most difficult part?

Also, do you have a marketing plan? How are potential buyers going to find
this?

Random SEO tips from a quick look: clean up you heading hierarchy (start with
H1, nest H2 - H5 appropriately; right now they're pretty random), add ALT text
to all images (the ones with source code could get you more search hits for
example), add a meta description and also add HTTPS (very important for
security as well).

~~~
raboukhalil
Thank you for the tips! I'll be writing an article in coming weeks about my
experience writing this book. This is the second book I self-publish, and
unlike the first one, I actually tracked how much time I spent on each
category of tasks (writing, editing, marketing, head scratching, etc), so the
article will also include that. Stay tuned!

------
langitbiru
Congratulations on your book! May I ask why you choose self-publishing road
instead of publishing it on publisher? I am not saying one way is better than
the other. I am just wondering.

Is it because no interest from the publishers? Or is it because you think the
royalty percentage from publishers is too low? Or you don't have any
particular reason? It's just feel natural to do self-publishing.

Also, do you hire editors?

~~~
raboukhalil
Thanks! I like to self-publish mostly because I can craft the book in my own
way and move faster. I also enjoy being able to touch all aspects of the book,
including the design and marketing.

This is actually my second self-published book (first one was about wrangling
data on the command line with bash), so it does feel natural to self-publish
at this point!

------
macp
Table of contents and sample chapter?

Webassembly for genomics sounds cool :)

~~~
raboukhalil
Yes! Here's the table of contents:
[http://www.levelupwasm.com/toc.pdf](http://www.levelupwasm.com/toc.pdf)

And for a sample of the writing, here's the section on compiling the CLI tool
jq to WebAssembly: [http://levelupwasm.com/sample-
jq.pdf](http://levelupwasm.com/sample-jq.pdf) (though note that it builds on
previous material so it doesn't re-explain everything)

Edit: Also, if you're curious about using WebAssembly in genomics, check out
[https://github.com/robertaboukhalil/aioli/](https://github.com/robertaboukhalil/aioli/)
and
[https://github.com/robertaboukhalil/fastq.bio](https://github.com/robertaboukhalil/fastq.bio),
a tool to get a preview of DNA sequencing quality that uses WebAssembly to
speed up the analysis portions.

~~~
macp
Awesome! Thank you.

------
Accacin
Intersting, I've been looking into this recently and this might be the thing I
need to finally get stuck into it. Pricing seems reasonable, I'm not sure
about other comments saying it's a little high.

------
SCdF
Looks cool!

If I don't know any C++ (and never plan to) but am learning Rust, do you think
there is value here? Or is really focusing on the C++ -> WASM experience?

~~~
raboukhalil
Thanks! Yes the book focuses on C/C++, but you don't need very much C/C++
knowledge to follow along in the book.

Most of the time, we treat C/C++ libraries as black boxes that we compile to
WASM, though in some cases like Pacman, we do have to modify the original
code, but you should be able to infer what we're doing from the context and
the text.

------
amreact
This looks really neat! I noticed that it talks about how to call command line
programs from my own webassembly program. Does it talk about techniques that
could be used for package management, where someone publishes webassembly
binaries and people consume them in their own webassembly binary? If so, does
that work even when the webassembly "packages" are written in different
languages?

------
alex_hitchins
I'm getting your book - thank you. Also wanted to say I really like the site
you have put together. Minimal yet everything there. Perfect.

~~~
raboukhalil
Thank you so much for the kind words!

------
amelius
Why not place the compiled demos directly on the website?

This could show the practicality of the approach, e.g. that the demos work in
every browser. It also shows (hopefully) something that can be done only in
WebAssembly, and not in plain JavaScript, which can provide motivation to
actually learn about WebAssembly.

Also, I'd like to see a TOC and sample chapter.

~~~
raboukhalil
Hi amelius, here's an example app that uses WebAssembly:
[http://jqkungfu.com](http://jqkungfu.com) (compiled jq to WebAssembly!)

Here's the sample section from the book that covers exactly how that app was
built: [http://www.levelupwasm.com/sample-
jq.pdf](http://www.levelupwasm.com/sample-jq.pdf) (though keep in mind that
it's from Chapter 7 and it builds on previous chapters)

Also you'll find the table of contents at
[http://www.levelupwasm.com/toc.pdf](http://www.levelupwasm.com/toc.pdf)

------
sidcool
Great job mate! Congratulations for shipping.

~~~
raboukhalil
Thank you!

------
webmaven
Can you share any data on bounce/engagement/conversion rates for the different
packages (eg. X% leave the page without scrolling/reading, Y% read the page
but don't buy, Z% actually make a purchase, purchases break down A/B/C%
between the different packages)?

------
johnmarcus
How can web assembly deal with per-env variables? Need to recompile for every
environment? That means recompile at startup, since I deploy the same artifact
to different envs and allow the env to define its vars. For this reason, as a
sys admin, I hate web assembly (and most other asset pipelines)

------
anchpop
The book looks good (I like the demos of the examles), but what motivated you
to choose that pricing scheme?

------
arendtio
Looks nice. If you are planning to expand this, I would be interested in a
comparison of the different toolchains (e.g. Emscripten vs. Go vs. Rust).
Currently, I would choose the toolkit of my favorite language, but I have no
idea what kind of consequences such a choice has.

------
samdixon
Looks great. I would definitely buy this if there was an option for a printed
book.

------
kkarakk
Region specific pricing would boost adoption a lot. you can buy full courses
on Coursera/other MOOCs for 30bucks in some countries and your pdf+cheat sheet
costs more = guaranteed your book shows up on libgen

------
ardenpm
I see the sample chapter has an autoconf porting example. Is porting a CMake
based project covered anywhere in the book?

~~~
raboukhalil
I don’t have an example that specifically uses cmake, though similar
principles apply but you’d use the emcmake utility. That said, thanks for the
feedback! I’ve added that to my list of things to add to the book.

------
ecmascript
Looks interesting, unfortunately I don't have the time now but I will for sure
maybe buy this book in the future!

------
d2xdy2
Just picked up the “complete edition”. Really looking forward to going through
it all. This looks great!

~~~
raboukhalil
Thanks, looking forward to hearing your thoughts on it!

------
rtacconi
I do not have time to read it now but for sure I will buy it. It looks good,
well done!

------
notaboutdave
Does the book cover anything on rendering with OpenGL or graphics libraries?

~~~
raboukhalil
Yes! Chapter 8 talks about graphics; the Pacman example shows how to port a
C++/SDL2 Pacman clone to WebAssembly and OpenGL (with Emscripten). That said,
the focus of that chapter is porting games like that, but it doesn't go into
writing OpenGL directly.

------
maxgraey
So much PR of this book is everywhere, as if Brendan Eich himself wrote it!

~~~
raboukhalil
Haha, I can confirm Brendan is not the author. Just curious though, where else
have you seen this book mentioned?

------
pjmlp
Congratulations on getting it done.

~~~
raboukhalil
Thanks pjmlp!

------
terrycody
I would appreciate its free for testers on HN.

~~~
johnfn
What’s there to test? It’s a book. You just read it.

~~~
b_tterc_p
Don’t be obtuse. He means a sample chapter so you can evaluate quality.

------
taytus
Honest feedback: Pricing is high.

Also, to me, this doesn't look like a good way to use Show HN. A link to
Amazon wouldn't be different than what you just did.

~~~
jamestimmins
While shameless self-promotion would be an issue, I think this is exactly in
line with what HN (and even Show HN) is for. Although that's really up to Dang
et al.

It's a topic that is highly relevant to this community and for which there is
high demand, given the number of Web Assembly tutorials that make it to the
front page. Obviously, it's commercial, but so are many of the projects in
Show HN. The ones that aren't are still self-promotional in some manner.

I often find that looking at book sites is an interesting way to learn what
technologies are getting popular and I'm always curious to see the projects
used to teach these things. Posting a book's website can start a conversation,
whereas an Amazon link is more likely to start purchases and little more.

Finally, writing a technical book is an impressive accomplishment.
Specifically, it's an impressive technical accomplishment.

Regarding price, $29 seems quite reasonable for a technical book. Many cost
$35-45, and that's without getting into textbooks.

~~~
raboukhalil
Thank you jamestimmins, that’s also my understanding of Show HN

