Live data from Hacker News

Why can't I write code inside my browser?

tomcritchlow.com

411–420 of 624 posts

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

#411

I'm curious if the author has heard of sites like: * https://repl.it/ * https://jsfiddle.net/ I didn't see anything like that mentioned in the article, but I think that you can easily write code inside your browser today. Also, web browsers are already extremely heavy and complicated. That complexity is convenient for end users, but it also has costs, like making it very difficult and expensive to create a new compet…

Those are basically standalone apps, not integrated into many of the other systems we use, which is the authors point.

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

#413

Earlier quoted context omitted.

The problem is that without understanding the "arcana" of the OS platform you're using, you'll quickly hit a brick wall with your IDE. You won't understand what the configuration options mean, you won't understand what the documentation or people on StackOverflow want you to do and why . IDEs are mostly an abstraction over a set of CLI tools; if you try to do anything nontrivial, you'll see where the abstraction leak…

This is true of quite a few of the kludgy build-an-IDE-out-of-plugins environments popular in the open-source world (Atom, VS Code, Vim-as-IDE, etc), but that's precisely the problem I'm getting at. It doesn't tend to be true of mature IDE-first environments (see the aforementioned Visual Studio or IntelliJ).

I'm talking strictly about mature IDE-first environments. Visual Studio (which I use daily for C++ development), IntelliJ (which I used for Java some time ago) and AndroidStudio (i.e. IntelliJ with plugins, and it's probably the most leaky abstraction of an IDE I've ever seen).

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

#414

Earlier quoted context omitted.

When I was travelling through Italy, I learnt a phrase from programmers there, "If my mother had wheels, she would have been a bike" - and it's a criticism of hypothetical situations like your answer above. Saying "This is arbitrary if we made a different choice things would be different" is a total meaningless statement because you just move the bar and then say if the bar is moved things are different. My argument…

What I am saying is, as soon as someone new to programming points out, entirely correctly, that the tools we use are weird, obscure and difficult to use for no apparent reason, programmers will scream in rage that no, they are not, and by the way, you are stupid for saying it, you clearly have no idea what you are doing and you will never be a programmer. As is happening everywhere in this very thread. I am saying th…

I'd like to put one of your comments in a different but maybe enlightening context:

What I am saying is, as soon as someone new to gardening points out, entirely correctly, that the tools we use are weird, obscure and difficult to use for no apparent reason, gardeners will scream in rage that no, they are not, and by the way, you are stupid for saying it, you clearly have no idea what you are doing and you will never be a gardener.

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

#415
post #221

The author is not talking about "professional programming" but about a field called "end-user programming" or more generally "end-user development", which is a whole academic field with the goal os allowing end-users to develop their own solutions. From this field came things like Scratch [1]. If you're interested a very important paper in that area (from the philosophical aspect) is "Meta-Design: A manifesto for End…

HyperCard, Excel, and (at the upper end) Flash are basically end-user programming that allowed for some really great creativity. I get the feeling most corporate programmers want to ban Excel and force the users to had over their code to have it properly programmed. The other two were gotten rid of. Instead of making easier and easier tools, we've gotten harder and harder. I still contend that NeXTSTEP was an easier…

> Javascript is not a beginner language anymore.

Why not? You can still write vanilla JS the same way you could decades ago without much (any?) change.

> It has a lot of edge cases and traps that defeat the average person.

It's always had that. In fact, I think the reason it feels less like a beginner language is that the solutions we've created to handle the edge-cases and traps have been solved for professionals. It's more that the way we teach it has changed. It's now a "professional" tool, so most content out there is aimed at people endeavoring to become professionals, needing to deal with all the complex realities of professional-grade problems. But you can still teach it in the same beginner-friendly way you could in the early 2000's.

I've seen this teaching my son (using JavaScript). My instinct is to direct him to use all of the techniques I use because it's the "right" way. But a beginner doesn't really care about the problems that the "right" way solves. They don't even know about them yet. So it's overkill. Forget Typescript, webpack, eslint, Angular, node, etc., let's just write everything in one HTML file (not even using to include a separate .js file yet) and focus on the thing he's interested in making. We'll get to all that other stuff eventually, and then he'll actually have enough foundation and context to understand and appreciate (not to say all the complexity we've built is perfect).

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

#416

Earlier quoted context omitted.

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

Lol the demonization of Typescript continues...

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

#417
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…

[deleted]

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

#418

I feel many of the comments here are akin to saying "laying out in documents latex is hard, if you can't figure it out you're not ready to write" while the author of the article is saying "I think writing documents could be easier." Google docs is proof it's possible. Sure everyone could learn about $path with a little research but there is SO MUCH to learn to get started with a "simple" react app... It's not necessa…

> there is SO MUCH to learn to get started with a "simple" react app... It's not necessary.

One line of HTML: https://reactjs.org/docs/add-react-to-a-website.html#add-rea...

> Have you never wished you could save your css tweaks directly from chrome dev tools?

You can: https://developers.google.com/web/tools/chrome-devtools/work...

> Firefox could absolutely come with a standard node server and editor

A node server runs JavaScript files as do browser engines and the majority of node’s API exists in the browser in a similar form, as well as an editor. GitHub as well comes with an editor built-in, Netlify can be connected to GitHub by clicking one button.

I agree that it’s good to simplify, but are these good examples for that?

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

#419
post #334

Earlier quoted context omitted.

> But isn't using the code that people smarter/more proficient than you have developed a rather good way to go about things? One big task about programming is handling dependencies and thinking about assumptions. Before even beginning to write any code, you have to think about these things: - What environment do I expect the end user uses? Are there already some libraries I can use as well installed? - Do I need a GU…

That's a fair argument to make, however i'm not sure that i'm able to entirely agree to this. > While good developers think about each one and try to find a minimal set of them. (tl;dr at the bottom, things up to "In short, " are merely my experience, which is entirely subjective) For example, suppose that i'm working on a Java project and i want to do some non-trivial operations with the filesystem. In this instance…

Wow, I felt that talk in my bones. It reminds me of the languages I cut my teeth on: visual basic and hypercard. You just get to make stuff and it is liberating.

TFA is a classic x-y problem. Author says they want node in the browser. What they really want is something they can quickly be productive in, a one stop shop. Author is describing an IDE.

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

#420
As easy as it would be to pile on the author here, to me this serves as a stark reminder of the how overwhelming a difficult coding, and setting up environments can seem to beginners.

I think this author is a the perfect target audience for Gitpod https://gitpod.io/#https://github.com/eclipse-theia/theia. With it, you can login with Github, paste the URL of your project into the address bar, and boom! You've got a VSCode clone with NodeJS installed already.

Post reply on HN