Live data from Hacker News

Why can't I write code inside my browser?

tomcritchlow.com

71–80 of 624 posts

Re: Why can't I write code inside my browser?

#72
post #69

Earlier quoted context omitted.

This is a variant of the no-code mindset where people expect coding to be easy. What they don't understand is that tools which aim to make coding easy or automatic don't add any value if the person using the tool doesn't understand all the nuances in the underlying logic which is being produced. Fully understanding the distinction between client and server is one such nuance. When it comes to coding, the bottleneck i…

> I don't think I've ever met anyone who was naturally good at thinking logically I've heard, though, that declarative programming (prolog, haskell etc) was a LOT easier for people who aren't trained in imperative programming. Whereas those who are actually have a hard time picking it up... As was my experience. @op have a look for declarative programming. You might like prolog :)

My main problem with declarative/functional programming languages is that they force developers to separate the logic from the state (they are not co-located based on concerns) and this often causes developers to neglect the separation of concerns principle altogether; which is by far the most important principle in my experience.

Most developers never learned proper blackboxing/state encapsulation.

It's impossible to create truly modular code without colocating related logic and state.

Re: Why can't I write code inside my browser?

#73

I take the "wtf is user/local/bin in $path?" to be a question from a non-tech person that is interested in learning to code. I can't be sure though since the author stated he has failed to install Node js. Should Chrome have Node JS loaded into it during install? I don't do web-dev so my answer is no. Should there be browsers made for those learning web-dev that come with these? By all means, sure. Go nuts. This also…

This was a real question FYI. I don't know what that means. Googling "Making sure /usr/local/bin is in my $PATH" leads me here: https://stackoverflow.com/questions/19202007/making-sure-usr... So I fire up the terminal and write echo $PATH and then go back to SO to see that it looks like it's all set up correctly. But why do I need to go to SO? Why do I need to fire up the terminal? It just feels too damn hard and too…

Learning a new language is hard, whether it's a spoken language or, in this case, the incantations on command line.

Your comment to which I'm replying now shows that you do have the ability to learn this new language. You've correctly and successfully used the term "SO" to refer to a popular resource on programming. You have successfully "fired up the terminal." You've even used the terminal to echo $PATH. You're making great progress! :-)

The particular idea of installing node.js by default in web browsers seems to me like installing toasters on sofas. That would make it easier to make toast without going to the kitchen, but is not something that most people would want.

> why do I need to ______?

This is the current state of computers and programming. Computers are just concentrated piles of logic gates and they don't actually know what they are doing.

Re: Why can't I write code inside my browser?

#74
post #36

>Why can't I write code inside my browser? um... because you didn't press ctrl-shift-I? But frankly, if you can't manage to install ruby and think $PATH is somehow complicated or scary, I don't want you writing code. So maybe it's for the best that you haven't discovered the developer tools built into every browser.

What's with the vitriol? The person who wrote this is active in the current thread.

The vitriol, if any, comes from eventually having to use products created by programmers without a shred of curiosity, expect everything handed to them, and do the bare minimum to create a semblance of working products. How many times have you used a website/app and it works so bad that you want to hit the programmer who wrote it? Frankly, “why do I need to figure out what PATH means” is shockingly non-curious even among those.

Re: Why can't I write code inside my browser?

#75
post #34

A lot of you guys are hating on the author for not being able to figure out how to install Nodejs. Yet if you're old enough to have gotten started in the time of JavaScript in the late '90s, or QBasic in the early '90s, or systems like the BBC Micro or TRS-80 in earlier decades, you should know what the author's talking about. Everything you need to program is just there . It just works , there's no extra installatio…

> Everything you need to program is just there. It just works, there's no extra installation, you start a program and start coding. And just about any PC has

You can get there today with some closed loop envirinments. But like wit QBasic and other Basics, there is very little commercially useful programming you can do there, unless it is an in-house application. See e.g. FileMaker Pro. Production grade web application programming is an order of magnitude more complicate than it was in 80s. Networking, client/server, graphical UI, responsive UI, dependencies with third party packages, multi user and multi tenancy come in my mind for example.

Re: Why can't I write code inside my browser?

#76
post #26

Not all documentation should be aimed at an absolute beginner - the authors point about $PATH seems moot to me, especially considering how easy it is to look up. Should a library also explain how an async function works in JS when introducing its feature that uses promises? Of course not. Any field requires technical knowledge, and we're lucky we live in a world where its increasingly easier to overcome any roadblock…

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?

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

#77
The author is right when he says "coding is still too damn hard for beginners." That's because he's been led to believe he needs to install Node to join the "code club." Contemporary professional web development (as practiced by members of "the code club") is madness. We owe it to beginners to show there are easy, practical, sensible ways to get started. He needs to look at tutorials that show how to write code with just a text editor and browser. I've written some about going Stackless [0]; we need more.

[0] https://tutorials.yax.com/

Re: Why can't I write code inside my browser?

#78
post #34

A lot of you guys are hating on the author for not being able to figure out how to install Nodejs. Yet if you're old enough to have gotten started in the time of JavaScript in the late '90s, or QBasic in the early '90s, or systems like the BBC Micro or TRS-80 in earlier decades, you should know what the author's talking about. Everything you need to program is just there . It just works , there's no extra installatio…

> These days you can probably do some Wasm magic to create an entire Linux OS in a browser tab, and install stuff in a virtual disk in the local storage.

That just sounds mindblowingly inefficient and pointless. There's no point making these great speed and efficiency leaps in CPUs if people just do inane stuff like this.

The browser is fine as it is. If you want to use it as an IDE, use something like codespaces or any of the online REPLs, don't try to make the browser an IDE?!

Re: Why can't I write code inside my browser?

#79

I take the "wtf is user/local/bin in $path?" to be a question from a non-tech person that is interested in learning to code. I can't be sure though since the author stated he has failed to install Node js. Should Chrome have Node JS loaded into it during install? I don't do web-dev so my answer is no. Should there be browsers made for those learning web-dev that come with these? By all means, sure. Go nuts. This also…

This was a real question FYI. I don't know what that means. Googling "Making sure /usr/local/bin is in my $PATH" leads me here: https://stackoverflow.com/questions/19202007/making-sure-usr... So I fire up the terminal and write echo $PATH and then go back to SO to see that it looks like it's all set up correctly. But why do I need to go to SO? Why do I need to fire up the terminal? It just feels too damn hard and too…

This is the most insane article and comments I've seen in a while.

It's programming. It's difficult, and there's a lot you need to know to be effective. Trying to just hide things like the command line is just pointless. You need to know it. Go learn it.

Re: Why can't I write code inside my browser?

#80

>Here’s my pitch: build a browser that comes pre-installed with node.js, an IDE and a simple runtime environment. https://glitch.com/ https://runkit.com/home https://codepen.io/ https://github.com/features/codespaces Maybe you don't need new browser ? Maybe ?

Yeah I love Replit and Glitch (not used the others) but I still think there's something missing. They don't feel like standards that are easy and simple to use. Two more points: https://twitter.com/tomcritchlow/status/1349839954558427136

> 1) offer native local speed - Glitch and Replit can still feel a bit slow on continual page refresh. 2) having your development files available locally - so that it's easy to take those files and upload to netlify etc or even edit using another app.

The solution to this is to use an actual native IDE, not try to shoehorn it into the browser, which is completely inappropriate.

Post reply on HN