Live data from Hacker News

Why can't I write code inside my browser?

tomcritchlow.com

31–40 of 624 posts

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

#31

Earlier quoted context omitted.

It's one of those basic things. Like, when someone says "Make sure you have salt in the kitchen" they say just that, not "Open the first cupboard in your kitchen. See if there is a blue tin with a little girl in a frock carrying an umbrella" and so on and so forth. The "make sure X is in your $PATH" is its own thing. I sympathize but there is a balance between docs for the expert and docs for the novice. This is clos…

Also I'm fairly certain that an explanation of what $PATH is on unixlike OSes and how to manage that is one of the first things one will see when reading any number of dev basics/getting started tutorials. I understand wanting to jump right into writing "real" projects but things like this are why I think spending a little time finding well-written tutorials and doing them makes a big difference when picking up a new…

There are install shields and tutorials for this. He's right, most tooling sucks and require arcane incantations. They do allow later flexibility though.

Steve Jobs if he was a programmer would slam today's tooling.

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

#32
post #11

Are you aware of the console? I have used it for all kinds of stuff. Here's what you do: go to about:blank, open the console and start typing JavaScript code. Try: document.write('hello world')

As a JavaScript learning exercise (OK mostly because it was fun), I started writing a simple bot to play the Paperclips game[1] for me.

I was really surprised with how easy it was to do stuff like add in a third party graphing library and then write a bit of code to graph interesting metrics on this page, directly from the console of my own browser.

I've also used greasemonkey for years to inject interesting scripts to improve usability on a couple of key sites. I think there are tons of options to do this kinda stuff, but I'm sure the tooling could be improved a little bit in some areas (e.g., to easily take advantage of npm packages).

1. https://www.decisionproblem.com/paperclips/index2.html 2. https://github.com/trogau/paperclips/

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

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

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

#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 installation, you start a program and start coding. And just about any PC has what you need. [1]

Nowadays you can technically develop on any PC with a browser by locally editing HTML / JS / CSS using Notepad, but it's rather painful. How hard would be to have a default Firefox environment for budding coders? 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.

Heck, it probably wouldn't be that hard to cobble together the existing pieces to make a Firefox addon to do that.

[1] Granted BBC Micro and TRS-80 weren't PC architectures, but for computers of that generation, a built-in BASIC interpreter was pretty much expected.

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

#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.

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

#37
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.

That or greasemonkey scripts. Though sometimes I read their source and it makes me feel better about my job security.

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

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

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?

#39

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…

90% of your programming life is going to be spent iterating up and down a stack of "how do I...?", "what is...?" and "why does...?" type questions. If searching for a keyword and then reading the first hit is 'too damn hard and too opaque', that could be a sign that software development may not be your thing.

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

#40
I tried this as a Chrome extension a long time ago - github.com/captn3m0/sympathy

The idea was to make file-editing possible and simple in your browser. The extension let you edit file:/// URLs in your browser using the (now unavailable) NPAPI. The results were fun - especially for web development, where I could edit the CSS in one tab, and have it reflect in the second. Chrome added a "workspace" editor a while later, which was similar.

A blog post on why I really wanted to make it: https://github.com/captn3m0/captn3m0.github.com/blob/master/...

Post reply on HN