← Back to context

Comment by game_the0ry

3 years ago

As a front end developer, I am really happy to see resources like this.

Developing for the browser is a real challenge. I think working with html / css /js has been a neglected skill for a long time - most software engineers look down on that type of work and its rarely covered in comp sci course work.

Still, its good to see a lot of progress has been made, this book included.

My only critique - why use python instead of node.js?

Author here. I wrote up my answer here: http://browser.engineering/blog/why-python.html

Basically: server-side JavaScript is just not as widely known as Python, and it'd be additionally confusing when our browser starts running JavaScript. And in-browser JavaScript is a bit too restricted (by things like the same-origin policy) to do the whole thing inside a browser.

  • I see. I tried searching the table of contents as to "why python" and could not find it, but that link does more than enough to explain the "why."

    I am resisting the urge to disagree, but since you did (literally) write a book about building a browser, I will defer to your expertise and try to learn from you :)

    • >I am resisting the urge to disagree, but since you did (literally) write a book about building a browser, I will defer to your expertise and try to learn from you

      Respect

  • I can see that you'd want to pick a language that is good for teaching with, hence why you went with Python. It's probably too late, but I imagine Elixir would also be a great choice for this project.

  • This looks fantastic! Really excited to see this. I'm looking forward to reading the updates as well. Cheers.

I agree, JS _the language_ would be a more "obvious" choice for this, since it is both generally much faster and more popular in web development. I assume they are using Python _the ecosystem_ here. It probably comes with packages better suited for rendering specifically?

I don't think either is a super compelling choice anyways for this type of work. I think you want to use a systems language here. However Python is completely fine as a teaching language. Pretty much anyone who knows a similarly structured language can read it. And there is very little noise. So it can serve as a good reference if you want to follow along with a different language.

  • I think writing this in javascript would add some confusion, as people learning about this might have a hard time understanding exactly where the javascript is running.

> Developing for the browser is a real challenge. I think working with html / css /js has been a neglected skill for a long time - most software engineers look down on that type of work and its rarely covered in comp sci course work.

IMHO, those are job skills and not comp sci topics. They shouldn't be part of a degree program (except the most superficial treatment required to get some ugly UI up that may be required for something else). You have your whole career to pick them up.

Python seems like a good match since the tutorial seems to use what comes with a base python install. Python ships with Tk, for example, so the drawing section is cross-platform and not bogged down with a lot of instructions on adding new stuff with a package manager. That would detract from the lesson, IMO.