Live data from Hacker News

Why can't I write code inside my browser?

tomcritchlow.com

331–340 of 624 posts

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

#331

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…

I've been programming for 25 years now, about 20 of which as a developer at billion dollar companies, google, facebook and various high scale hedge funds, including systems that serve billions of users a day. I have had a hobby in embedded programming and FPGA programming, compiler design and distributed deep learning. All of which used /usr/local/bin and $PATH. Every system, regardless of programming language across…

So I think what's happening is that there are people here who have maybe been programming longer than you have. And we remember when professional programs might be written in BASIC and sold on 5.25 inch floppies. On machines with no /usr/local or PATH. And then we programmed PCs using Borland or Symantec or whatever IDE and there was no /usr/local or (usually) PATH to be concerned about. And we programmed MacOS before it was Unix based using Think C or CodeWarrior and there was no /usr/local or PATH or even a CLI.

And so when CLIs became popular with (broadly speaking) the early growth of the internet, we became more familiar with /usr/local and PATH (we probably had some exposure to these already). So while yes, these are found in most modern systems, we see these things as details. PATH simply doesn't feel "fundamental" to me because I've written exactly the same kind of code in environments where PATH is used and where it doesn't even exist as a concept.

Of course, what is "fundamental" is rather a judgment call, and your perspective makes it so that these are fundamental for you.

I won't defend the original post, particularly wrt nonsense like adding node to a browser. But I do think different perspectives are at play here, and disagreement on either side does not reflect intellectual laziness or people who should be laughed out of the room.

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

#332
If you can't be bothered to get out of your comfort zone you will hit a brick wall fast as a programmer. I use to be like this guy but the more I decided to take the time to learn the more I began to enjoy learning to the point it has become a hobby to learn and try new things. It is quite empowering.

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

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

The author is 100% correct on everything. Programming is massively over-complicated for no useful reason. Programmers tend to get very proud of the completely pointless knowledge they have to acquire to use the pointlessly complicated tools they do, and they confuse that with being clever. It's not. It's really not. Nothing has to be this esoteric and annoying. We've just chosen to keep things like this because we th…

>Programmers tend to get very proud of the completely pointless knowledge they have to acquire to use the pointlessly complicated tools they do, and they confuse that with being clever.

Like what?

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

#334

Earlier quoted context omitted.

> Programming COULD use a lot of simplification I so completely disagree. Writing JavaScript is already so simple that almost nobody knows how to do it any more. You can download a colossal framework and a billion NPM packages to write some completely unoriginal CRUD application and bitch about how hard life is. Fearing writing original code is the name of the game.

But isn't using the code that people smarter/more proficient than you have developed a rather good way to go about things? If not, where do you draw the line? Should you write your own business logic? Should you write your own logic to allow implementing that business logic (e.g. request parsing, validators, data transformations and processing etc.)? Or maybe you should write your own web framework that routes and ha…

> 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 GUI, or should it also run on headless devices? TUI or just CLI?
  - Does it make sense to use a big comprehensive framework or rather a bundle of minimal components?
  - Does a specific feature really need an additional dependency or can I rather implement something on top of the already existing dependencies?
  - How good is the maintenance of a library, code quality and is the license compatible?
  - and many more...
All of those are very difficult questions and require often some crystal balls to get right.

Lazy people might just add any dependency some stackoverflow or other random search result says, without thinking about these. While good developers think about each one and try to find a minimal set of them.

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

#335

Earlier quoted context omitted.

The author is 100% correct on everything. Programming is massively over-complicated for no useful reason. Programmers tend to get very proud of the completely pointless knowledge they have to acquire to use the pointlessly complicated tools they do, and they confuse that with being clever. It's not. It's really not. Nothing has to be this esoteric and annoying. We've just chosen to keep things like this because we th…

The problem isn't the user-friendliness of the tools (many very friendly tools exist), it's the amount of energy the author is willing to invest (approximately none). When exposed to truly trivial tooling, the problem becomes a lack of practice in the type of thinking that leads to good programs. There we see that the core of the issue why programming isn't "easy" is that it's just not. It takes practice to get compu…

>We don't think this of math

We do and we try every which way to make it 'natural' and 'easy', sometimes with vaunted social goals like stemming drop-out rates. The reality is, at some point, you just have to sit down, put your head down, and power through. Sometimes, like you alluded, there are no shortcuts.

There are programming environments (sometimes even gamified) for learning, but if you want to use something to solve general purpose problems, you just have to learn it.

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

#336

Earlier quoted context omitted.

The author is 100% correct on everything. Programming is massively over-complicated for no useful reason. Programmers tend to get very proud of the completely pointless knowledge they have to acquire to use the pointlessly complicated tools they do, and they confuse that with being clever. It's not. It's really not. Nothing has to be this esoteric and annoying. We've just chosen to keep things like this because we th…

While it's a massive simplification of programming as a whole, I think you're at least partly right. Programming is in some cases over-complicated, for no reason. If you dig deeper however, you'll sometimes learn that the thing you considered overly complicated, was actually designed that way, not to annoy you, but because the same tool has to support use cases you didn't consider or don't understand. That's not to s…

>Programming is in some cases over-complicated, for no reason.

Which part is over-complicated for no reason?

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

#337
post #238

A lot of dunking of the "git gud" variety going on here, but the author has a solid point. Requiring a novice to learn arcana of a 30 year old Unix system before they can learn to program is purely extraneous. We could package programming languages up with GUI installers that set everything up correctly and let you get right to the code - and in fact, we used to. If you install IntelliJ, you'll have a fully-working J…

What arcana? Windows is not Unix and it uses PATH variable too. On most Linux distros you can simply run the equivalent to `sudo apt-get install nodejs` (or use a graphical front-end, if that's too hard for you) and everything will just work. Just as an aside, GUI installers are an absolute cancer. I don't mind if there is an option to do that, but I just wish I could make a simple script for installing all the neces…

You can for the most part (I've done exactly that for the dependencies of a windows-developed system). Almost all installers support an unattended or 'silent' installation mode through a command line switch, though it can be a bit of a pain to get them to work the way you want.

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

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

I don't know. I've been that guy, except I didn't whine about it in a blog post. I didn't know anyone who knew these things and didn't know how to find answers. Naive web searches were surprisingly hard to parse. I didn't even know Youtube had coding instruction. I ended up doing all my coding inside Google Sheets custom function editor. It let me log my output or be invoked in a cell on the sheet. Looking back that seems so strange, but what I realized is that all the setup instruction for it is directed at non-coders so they don't make any assumptions like the install modal on NodeJS that TFA complained about. All the tutorials and quora (eventually found SO) questions on Google sheets are asked and answered by laypeople.

I can only imagine how much faster I'd have gotten my start if I could have used the browser itself. And the inspector console is useless until you can type your code perfectly on the first try (or second if you happen upon the up-arrow/edit functionality).

So after I began my dev career I began volunteering at a free local library coding session. It was part-babysitting, but there were a handful of kids who usually had part-time access to a parent's budget Windows laptop.

A basic coding environment inside Chrome or Edge (vscode lite?) would have made those sessions so much more productive. And I'd have been confident that no matter what computer they ended up on later, they'd wouldn't have to do any magic incantations to get back to coding.

Even giving them a bookmark to one of the all-in-one dev env websites isn't enough. It needs to be able to run locally without internet. And those coding websites over the past few years have been changing so rapidly in interface and setup that it would easily throw someone for a loop who was just beginning.

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

#339

Earlier quoted context omitted.

> Programming COULD use a lot of simplification I disagree, actually. There are plenty of languages, and even visual programming (via flow-diagrams, like Unreal Engine's "Blueprint" and Blender's shader flow diagrams), for those who just want to play around. For people who want to write a quick and dirty script, languages like python make it very easy already (relative to what they actually do). > Programming COULD u…

Yeah like there's 20 years of programming language research that studies exactly what this person is talking about. Graphical programming languages, removing barriers to learning, etc. They've been chugging away for decades and visual programming, Blender, Blueprints, Scratch, etc are all we got out of it. Does the article writer just think research doesn't exist? That CS sprouted from existence fully formed as a web…

> Yeah like there's 20 years of programming language research that studies exactly what this person is talking about.

More like 50 years. :)

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

#340
post #139

Earlier quoted context omitted.

Programming COULD use a lot of simplification and removal of barriers. But still, just like you, I really hate the base attitude here. And for a different reason: I find that programmers who think like this, are also lazy when it comes to respecting the user. They're lazy when it comes to supporting accessibility. They're lazy when it somes to properly supporting i18n and making experience great for non-Americans. Th…

> Programming COULD use a lot of simplification I so completely disagree. Writing JavaScript is already so simple that almost nobody knows how to do it any more. You can download a colossal framework and a billion NPM packages to write some completely unoriginal CRUD application and bitch about how hard life is. Fearing writing original code is the name of the game.

> I so completely disagree. Writing JavaScript is already so simple that almost nobody knows how to do it any more. You can download a colossal framework and a billion NPM packages to write some completely unoriginal CRUD application and bitch about how hard life is. Fearing writing original code is the name of the game.

The reason for this seems more that there a many coders that forget about the task of vetting their dependencies, which is a big part of programming.

Just learning a language does not give you the discipline required to be a good software engineer.

Post reply on HN