Live data from Hacker News

Why can't I write code inside my browser?

tomcritchlow.com

161–170 of 624 posts

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

#161
post #124
post #25

Earlier quoted context omitted.

But why stop there? Let’s bundle something like Excel or Powerpoint, or Photoshop or Final Cut. If we’re deciding to bundle additional software with a browser, why would a programming environment (chosen based on someone’s favorite language) be top priority?

Because installing Excel is simple already

Install excel and nodejs. Then evaluate which was easier. I suspect node will win by a wide margin.

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

#162
post #22

I am fascinated by the continued prevalence of excel in many industries. It feels as if some modern scripting language should be able to replace some aspects of the spreadsheet and work much better.

Excel is great for prototyping. It produces immediate results without any configuration. And it saves your database along with your code in a single file.

This is huge. Can you name any other programming language that automatically saves database + code in a single file?

Think about how many files you have to share if you use a script + database. At least 2 files. And then you have to zip it and the recipient has to unzip it. (cluttering your downloads folder)

However, at a certain point you have to make the jump and install/configure a database, even if it's just SQLite.

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

#163
While I'm not sure I agree that IDEs need to be bundled directly into browsers (as other commenters have said: at that point, why not Photoshop? Or Excel?), I think that Github Codespaces [1] is an interesting foray into a much-simplified dev setup experience that will help beginners start writing code without learning the more arcane utilities of professional programming like terminal emulators, shells, and the *nix userspace tools. And it's (optionally) browser-based, so you can get started without installing any dependencies, even though it doesn't ship as part of the Chrome binary.

I agree with a lot of the commenters here that eventually you'll need to learn the arcane things! But I think there's something to be said for being able to just get started writing code and having it run. I did a lot of my early programming on a TI-83 in math class in high school while pretending to pay attention to my teacher. I didn't have to configure it, or do much other than learn the programming language I was writing code in. Later, in college, my intro-level classes were in purpose-built educational IDEs like DrScheme, where I once again just typed my code into the textbox and then ran it from the same UI. I probably would've grit my teeth and pushed through learning all the extra stuff anyway if confronted with an emulator, a shell, and figuring out what `$PATH` refers to, because I was pretty into computers and had high mental pain tolerance. But I can't say it would've been a better onboarding experience, and eventually, I learned all of that stuff anyway -- so why put people off with it at the beginning? Let them do the fun stuff first, then teach them how to do it "for real." In a lot of cases, the not-"for real" version might even be enough to suit their needs.

1: https://github.com/features/codespaces

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

#164
post #156
post #96

I try to keep my comments nice on HN but in this case I can't, I've met this kind of person many times now and I just can't hold back. The author is lazy, and is channeling his energy into complaining rather than learning. He believes he is by default an expert on the 'user friendliness' of programming. His comments don't really make much sense, and come across as whining that should be ignored. "People hate command…

How is your comment different from his post? Why I am questioning you is that You cannot call the author lazy. Just because one post gives you that opinion, doesn't mean he is a lazy person. The author gave a fresh opinion about web browsers and shared it with everyone. appreciate that. Problem - Browsers dont allow us to write code/ Solution - create browser extension / use console. Thinkers talk, doers do.

You have not read the article.

>The author gave a fresh opinion about web browsers and shared it with everyone. appreciate that.

The author gave a stale opinion that can be answered by typing his post title into google and hitting enter.

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

#165
post #124

Earlier quoted context omitted.

Because installing Excel is simple already

Install excel and nodejs. Then evaluate which was easier. I suspect node will win by a wide margin.

Already did. The author found that installing Node.js needs knowledge about the command line while Excel just needs a few clicks of "Next" (I just did it yesterday)

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

#166
post #28

Earlier quoted context omitted.

Mentioned Glitch and Replit in the article - they're great and I love them but there's still something missing about relying on these platforms imho. I think cementing a default coding environment right into the browser would make it a lot more accessible - and actually be much closer to real coding where you're manipulating files and running code. Plus: glitch/replit are quite slow to do any real coding inside of vs…

If you open the dev tools in your browser there's a full sandbox environment right there, not to mention the load of other sites available. I don't see why specifically Node should be installed.

Not only that, but if you set up Workspaces in Chrome (https://developers.google.com/web/tools/chrome-devtools/work...) you can edit files stored on your computer using devtools, making it even more like an IDE.

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

#167
post #147

Earlier quoted context omitted.

/usr/local/bin has absolutely nothing whatsoever to do with programming. Nothing. Zero. Zilch. It is completely superfluous knowledge. It is only required because, as the author correctly points out, the tools we use are BAD. They are absolutely fucking AWFUL. /usr/local/bin is an implementation detail from an OS nobody has used for decades. It's still here because we refuse to fix these ridiculous things. Nobody sho…

> /usr/local/bin is an implementation detail from an OS nobody has used for decades. Are you taking the piss? Should we also remove SOCKET's because they were introduced in that same OS? It should be noted that _EVERY_ modern operating system implements a "path" system, even the ones that are very divergent.

Also, Namespacing and search paths are a concept in every environment where people name things. Be it the filesystem or a programming language itself.

Even in normal Life, when identifying people or things, we have concepts of this everywhere. How can people see that as pointless?

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

#168

Earlier quoted context omitted.

For beginners who've started with HTML, React or Rails is a huge cliff to climb. Yet that is the expectation we've set as professional web developers, when in fact we're often over-engineering our projects. There's no need for build tools in development when we can use module CDNs. There's no need for frameworks in many use cases (unless you need state management but that's not for beginners anyway).

> For beginners who've started with HTML, React or Rails is a huge cliff to climb These are highly orthogonal concerns. html is markup, React and Rails are client/server side ways of generating that markup. > Yet that is the expectation we've set as professional web developers This is so weird to read. Like yes, obviously it's an expectation that you need to know a way of generating html if you want to have any more…

We're talking about beginners. Presumably they start with HTML and then ask what they should learn next. Let's save the madness of Typescript and tree shaking until after they've achieved some initial wins. Let's start with algebra before calculus. Right now it's too much like times tables and then Fourier transforms.

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

#169
post #155
post #144

Earlier quoted context omitted.

The command line is a layer of abstraction that could be made unnecessary for programming. You could program in Turbo Pascal without a command line in the 90s

What would be the layer below it? It's certainly not GUIs, which are a significantly more complex layer of abstraction.

It's definitely GUIs, which is much easier to use for beginners (we're talking about beginners here, not people who have been using command lines exclusively for the last 20 years)
Post reply on HN