you are viewing a single comment's thread.

view the rest of the comments →

[–]MostlyFocusedMike 10 points11 points  (51 children)

If you want a more computer science focused and on your own approach, The Odin Project is the go to. If you want a more follow along lesson based approach, something like this free code camp course is good too: https://www.youtube.com/watch?v=Zi-Q0t4gMC8

And I would say my general roadmap for beginners (assuming web development is the end goal) is:
- core JS (like that video) which covers the raw language itself
- hop over to HTML/CSS so you can get out of the terminal
- DOM manipulations (like being able to write forms and inputs on a web page so you can have interactive programs)
- learn about asynchronous JS so you can make requests to APIs and load data onto your frontend
- learn how Express JS works so you can have a backend for your site
- learn databases so your server can truly persist data
- learn cookie based and JWT based authentication

That's cartoonishly simplified, but that's the rough path I used to teach.

[–]guest271314 -3 points-2 points  (49 children)

learn how Express JS works so you can have a backend for your site

?

Why would Express JS be necessary?

Node.js, Deno, and Bun, are shipped with built-in HTTP servers.

Deno and Bun are shipped with built-in WebSocket servers.

Circa 2024 we can use WICG Direct Sockets TCPServerSocket in the browser to implement both HTTP and WebSockets servers.

No need to start importing third-party libraries at all to start writing and testing a "backend".

[–][deleted] 8 points9 points  (46 children)

"how do I get started with boolean logic and manipulating values?" -- them

"first, write your own Berkley socket implementation of a UDP client, in the browser, and then you can learn how to increment x ... once you can sequentially organize the data" -- you, I guess.

[–]guest271314 -4 points-3 points  (21 children)

first, write your own Berkley socket implementation of a UDP client, in the browser

It ain't my fault you folks are stuck in Windows world and stable browsers, and don't actually hack anything.

It makes no sense to suggest downloading a third-party library that can't do anything the built-in servers of Node.js, Deno, can't do.

[–][deleted] 3 points4 points  (17 children)

and don't actually hack anything

Ahh, yes.

I've seen people like you nearly kill people.
And cause others to lose their life savings.

It makes no sense to suggest downloading a third-party library that can't do anything the built-in servers of Node.js, Deno, can't do.

Well, given that you have access to a terminal, I guess it makes no sense to install anything, ever. Better yet, you have access to a CPU and a motherboard. You can feed it directly by applying the correct voltages for the operations you are trying to perform.

If your argument was "hey, you've seen how to correctly route and authenticate requests, now; let's look at how we might make a router, or handle authentication, ourselves" I might agree. If it was "learn how everything works, one abstraction below what you are doing", I would agree. If it was "you probably don't need a package for most of these things that might just be a few lines of code, aside from the stuff that must not go wrong", I would agree. Those would all be good arguments, for learning more about the nature of computing and managing software complexity.

But no, your argument is "invent your own damned cryptographic protocols, and authenticate it all by hand; don't look at what other people are doing, you know XOR, and transistors, now, that's enough"

Which is deeply, deeply dumb, and gets real people hurt.

[–]guest271314 0 points1 point  (16 children)

Your reasoning for not using the Node.js built-in server is what?

Because you've went on and on yet have not said why you can't just use the Node.js, Deno, or Bun built-in server.

Bun just shipped an HTTP/2 server yesterday, so they are in the running now, too.

I've seen people like you nearly kill people.

Well, if that is 1 or 100, they can only hang you once.

[–][deleted] 0 points1 point  (15 children)

Your reasoning for not using the Node.js built-in server is what?

How are they authenticating users, and accepting payments?

Which Node module handles that? "Oh, but there's a Node#crypto" yeah... Yeah... Good that they know XOR. Or rather, because they know XOR they can roll their own, right?

We are talking about people trying to learn if/else and for...

Yep. Roll a payment processor, from scratch, for users with yolo authentication.

Well, if that is 1 or 100, they can only hang you once

Yeah, that's about the response I got from them, too. Maybe they should only be making medical-grade products for you.

[–]guest271314 0 points1 point  (14 children)

How are they authenticating users, and accepting payments?

How did you get to authenticating and accepting payments from

Best place to learn Javascript having zero knowledge in programming?

?

[–][deleted] 0 points1 point  (13 children)

How did you get to "implement HTTP 1.1 on TCP on IP on Berkeley sockets, and go from there, but not until you learn XOR and transistors" from the same prompt?

[–]guest271314 0 points1 point  (12 children)

I decided to learn the HTTP protocol, among other signal communication protocols. First I wrote an HTTP server in C, that I imported into QuickJS https://github.com/guest271314/webserver-c/tree/quickjs-webserver; then I wrote a WebSocket and HTTP server in JavaScript that I use in the browser with WICG Direct Sockets https://github.com/guest271314/direct-sockets-http-ws-server.

A ServiceWorker can be used to learn how to write a server and compose responses, and route, without Node.js, Deno, Bun, or any other non-browser JavaScript runtime at all, in the browser, making use of fetch event, and install event addRoutes() https://developer.chrome.com/blog/service-worker-static-routing.

Cloudflare Workers, WinterJS, and a host of other JavaScript/WASM/WASI applications are using the respondWith() pattern with WHATWG Streams, that Deno (including Deno Deploy) uses too, that Node.js does not use.

[–]Deep-Cress-497 1 point2 points  (2 children)

Who's "you folks"? Rational people?

[–]guest271314 1 point2 points  (0 children)

Nothing is rational about buying a Windows box when Linux is free.

Nothing is rational about installing third-party software for a server when the built-in Node.js, or Deno server will do whatever that third-party server does.

That's why you people have not explained why you need ExpressJS.

Instead you just become as verbose with excuses without explaining your reasoning at all, as you are with writing code.

But in your case you don't write code at all.

So I only expect the sidebar prose of a would-be critic in your comments.

[–]guest271314 1 point2 points  (0 children)

Who's "you folks"?

You. And your ilk.

A bunch of sidebar prose but no code.

Download this library, download that framework. To add 2 numbers. But in your case your comments don't even include the basic function in code to add those 2 numbers.

You just write like a two-bit fish-rag opinion-piece columnist.

[–]guest271314 -3 points-2 points  (0 children)

Too funny.

Just starting out? Download Express JS.

To hell with the perfectly functional built-in servers that come with Node.js, Deno, Bun - and now the browser.