News for hackers. Stuff that matters.
Re:Why can't I write code inside my browser? by catlifeonmars on Friday January 15, 2021 @01:30AM (#25787693)
It’s all about reducing the barrier to entry. Many people find the command line daunting. Why not reduce these barriers to entry? Why require someone to understand $path to start coding in JavaScript?
Re:Why can't I write code inside my browser? by taneq on Friday January 15, 2021 @01:57AM (#25787822)
I guess it's possible that new aspiring programmers will gain the fortitude to read documentation after a little while programming, but I can't help feeling that if someone isn't able to type "computer path" into a search engine from the start, they probably won't be able to figure out a whole lot of programming.
Re:Why can't I write code inside my browser? by kodoque2 on Friday January 15, 2021 @03:46AM (#25788486)
I learned programming on my calculator precisely for this reason, no cruft just pure code.

And for an inquisitive mind, having to type arcane command just to get the desired result is incredibly frustrating, and I don't count mindlessly browsing stack overflow or the internet just to get the stuff I need as learning. That is why course such as nand2tetris are incredibly good.

There is still an incredibly lot of stuff that can be done in matter of computer education. My dream would be a time travel libvmi based educational tool that allow to drill all the various function augmented with built in interactive explanation a la explorable and various code vizualization.

Re:Why can't I write code inside my browser? by swiftcoder on Friday January 15, 2021 @05:26AM (#25789145)
I'd like to point out here that I just spent a good 5 minutes punching variants on "computer path", "node path", "node install path", etc. into Google. And exactly zero results on the first page for any of those queries have anything to do with how to configure the PATH variable in your shell.

If someone didn't know what they were trying to solve for here, I'm not sure google would help them succeed.

Re:Why can't I write code inside my browser? by taneq on Friday January 15, 2021 @08:50AM (#25790902)
I just searched "computer path" (no quotes) on DDG and got: - The wiki page for 'path' as a computing concept - 3rd result is "how to set the path in MS Windows" - 6th result is the wiki page for the path variable as a computing concept

I haven't used Google web search for years, has it really gotten that bad?

Re:Why can't I write code inside my browser? by rgoulter on Friday January 15, 2021 @03:46AM (#25788487)
My experience with programming, especially when I'm trying something new, is that about a dozen different things will go wrong.

At some point, there's some level of problem-solving required which involves taking what you know, and figuring out why it doesn't work. - One extremely common way of finding out what doesn't work is searching the web for the error you get, and finding a StackOverflow page which might be enough to explain it.

My experience was that I can "get by" without a deep understanding of some thing, until it doesn't work, then I need to poke around to get a better understanding so that I can fix whatever problem I have.

IIRC, I bet you can get decently far on the command-line without having to know what PATH is (or all the places it's set), thanks to package managers making things accessible. And then you'll run into some problem so that you need to know what PATH is, and then you'll learn.

Re:Why can't I write code inside my browser? by ccmcarey on Friday January 15, 2021 @04:11AM (#25788642)
> Many people find the command line daunting

Then they need to get over that if they want to learn to code or use scratch.

Re:Why can't I write code inside my browser? by dagw on Friday January 15, 2021 @04:47AM (#25788876)
Then they need to get over that if they want to learn to code

On the one hand I've been using the CLI for my entire career and and would be lost without it. On the other hand also I have colleagues who learnt to code after Visual Basic/Studio became a thing and work entirely in Visual Studio and manage to deliver top quality work year after year without basically ever having to touch the command line, so it certainly doesn't seem to be necessary.

If you really want to learn to program without learning to use the CLI you probably shouldn't pick and OS who's entire development environment is built around using the CLI.

Re:Why can't I write code inside my browser? by catlifeonmars on Friday January 15, 2021 @06:04AM (#25789431)
> Then they need to get over that if they want to learn to code or use scratch.

This is the right attitude to have as an aspiring programmer, but exactly the wrong attitude for someone who creates the tooling or documentation for helping aspiring programmers learn.

Re:Why can't I write code inside my browser? by TeMPOraL on Friday January 15, 2021 @06:53AM (#25789804)
But it is the right attitude for someone creating tools for other proficient programmers to do even more advanced things. We won't advance the state of the art by handicapping yourself through catering to extreme beginners at every point.

In other words, the target audience of a Promise library for JS are people who know JavaScript and understand async. Trying to explain the basics of JavaScript, or programming in general, in that library's documentation would be a waste of time for everyone involved. A beginner has plenty of resources to learn from to reach the appropriate level, at which point they'll be able to wield the Promise library in a useful and responsible manner.

Re:Why can't I write code inside my browser? by ZephyrBlu on Friday January 15, 2021 @05:54AM (#25789338)
If it's not $PATH, it will be something else.

People should deal with it and learn. No matter how low the barriers to entry are, you're still going to have to figure shit out at some point.

PS: You don't need to understand $PATH to start coding in JS. You can create an HTML or JS file, hack away and run it locally.

Re:Why can't I write code inside my browser? by johannboehme on Friday January 15, 2021 @07:25AM (#25790121)
you dont need to understand $path to start coding in javascript. Just open a textfile with .html ending in an editor and in your browser.. You don't have to set up anything to get going.
Re:Why can't I write code inside my browser? by sbergot on Friday January 15, 2021 @04:50AM (#25788902)
I agree with the sentiment. But in order to build something that lower the barrier to entry you need an incentive. Building tools is hard and costly. Maintaining them even more.

In video games you have blueprint systems because the economy supports this idea. For kids you have scratch.

For web dev you have some solutions but my guess is that when someone wants to use node there isn't yet any useful solution (outside of playgrounds) that is cheap enough to make and remove the need for some basic computer knowledge.

Re:Why can't I write code inside my browser? by pelliphant on Friday January 15, 2021 @07:48AM (#25790318)
That is a good point, but, instead of explaining path in the installer, maybe the starting point for learning should be somewhere else, such as a tutorial?