32 ms·
Why can't I write code inside my browser?
- modeless 6y agoYou can though. Chrome dev tools can edit local files. It's basically an IDE. You can easily build a single page application. You can even do some server-like stuff purely in the browser now with service workers. There are also plenty of online IDEs available spanning the gamut from toys to serious work environments.
- forgotpwd16 6y ago>Chrome dev tools can edit local files. For anyone that doesn't know that, open dev tools > Sources > Filesystem > + (Add folder to workspace) > right-click on folder > New file. Then double-click on file to open it for editing and save modifications with Ctrl-S. Of course it isn't an IDE, with even the editor being nothing more than a Notepad clone, and you're limited to client-side work which is in contrast to what OP seems to want.
- achinese 6y agooh no, no more things coming with browsers
- deleted 6y ago[deleted]
- meekrohprocess 6y agoI'm curious if the author has heard of sites like: * https://repl.it/ https://repl.it/ * https://jsfiddle.net/ 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 competitive browser. Do we really need to add another standard to turn them into offline IDEs on top of everything else?
- atum47 6y agoBack in college I would sketch something every day in jsfiddle
- topcat31 6y agoMentioned 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 developing locally. But maybe the future really is in the browser in this way.
- thrashh 6y agoBut 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?
- loopz 6y agoThey already put entire desktop environments in some two decades ago. It never took off.
- gjvc 6y agoWith good reasons at the time -- browsers were slow and heavy. Now we have (among others) the V8 Javascript engine and insanely fast client computers (all of any recent desktop, laptop, and mobile device)
- wizzwizz4 6y agoBrowsers are slower and heavier than they ever were. V8… you could argue it's faster, if you neglect warm-up time, but even it is heavier.
- johnnymonster 6y agoAm I the only one that doesn’t know how to code in a spreadsheet?
- refactor_master 6y agoI was thinking the same. I have no problems dealing with the terminal, but man if I ever have to do more than adding numbers in a spreadsheet...
- NewLogic 6y agoI feel this deeply. Building binaries in a docker container to deploy as a Lambda Layer? Aces. Anything more complex than basic math functions across a few cells? Burn it with fire.
- throwaway888abc 6y ago>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://glitch.com/ https://runkit.com/home https://runkit.com/home https://codepen.io/ https://codepen.io/ https://github.com/features/codespaces https://github.com/features/codespaces Maybe you don't need new browser ? Maybe ?
- saminzadeh 6y agoAlso worth mentioning https://codesandbox.io/ https://codesandbox.io/ especially for those familiar with VSCode.
- topcat31 6y agoYeah 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 https://twitter.com/tomcritchlow/status/1349839954558427136
- conductr 6y agoI believe node itself s just an environment/blank canvas as well. What is this "standards" you're looking for? There are a million frameworks, templates, etc as well.
- ccmcarey 6y ago> 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.
- shatteredspace 6y agoI 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 might sound elitist but I would expect the kind of person that takes an interest in coding to be able to google what $PATH is or hell take the complete instruction "add <dir> to $PATH"
- topcat31 6y agoThis 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-local-bin-is-in-my-path-on-mac 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 opaque. I think defaults and documentation and onboarding matter. Not to mention a GUI :)
- renewiltord 6y agoIt'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 closer to the former.
- kitsunesoba 6y agoAlso 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 language/library/framework/etc.
- zander312 6y agoU can use html / js with browser in like 5 seconds. No need for Node.js. Just write an html file and link a js file and you can code whatever you want.
- atum47 6y agoAre 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')
- trog 6y agoAs 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 https://www.decisionproblem.com/paperclips/index2.html 2. https://github.com/trogau/paperclips/ https://github.com/trogau/paperclips/
- null_object 6y ago> Are you aware of the console? I have used it for all kinds of stuff. Sorry that (having posted the link) I don't have anything that concretely adds to the discussion, but I just thought I should point out that I'm not the author of the blog-article, as a few posters here seem to think. I definitely don't endorse the author's views either, but I thought it was an interesting post for discussion, and I certainly don't think that making some aspects of coding more accessible is a bad thing. edit: I just noticed the actual author is posting to the thread.
- fwip 6y agoBeaker Browser (beakerbrowser.com) already has got you covered.
- dbsmith83 6y agoThe whole sentiment of this article just comes off a little whiny to me. Nowadays there is so much more information available for learning how to code and set up your dev environment. There are literally coding books for kids at book stores. And StackOverflow! When I was younger, one had to search high and low on the net trying to find help using shitty dial-up service. Then, you'd end up in some IRC channel asking for help and someone simply says 'RTFM!'
- makapuf 6y agoI'm happy to be that old guy who learned programming with magazine articles(and a pirated copy of turbo Pascal. You really appreciated that hypertext help.)
- EdwardDiego 6y agoI'm impressed you did, I tried to learn the same way when I was younger, (albeit with pirated Borland C++) but never made any headway. Admittedly the library books I had access to were obsolete, and no-one in my rural area of a small country carried decent magazines on the subject. That said, they did carry BBS magazines which led me eventually into the nascent WWW over the 14.4K modem I saved all my pocket money to buy. Then I finally managed to access the resources to learn. God bless mailing lists.
- unishark 6y agoI also got stuck on C++. It was (and remains) such a disproportionate pain to compile, which was just too high a hurdle in the days before you could search for your cryptic build errors on the internet. I was able to fool around with BASIC easily enough, with entire programs provided in magazines like Byte.
- kodoque2 6y agoIf this is the case, it is because people were conscious that there was in issue in how computer turned into more and more as an appliance mean to consume information [1] (The C64 had a full programming manual delivered with it, booted directly to an interpreter and even had schematic of the machine reportedly!) and tried to counter it. Even then despite all the amazing ressource available, there is a risk of digital divide between people having access to tutor that can show the good ressource (because there is a lot of bad ressource!) and isolated people that are stuck with glorified engagement platform. [1] https://www.salon.com/2006/09/14/basic_2/ https://www.salon.com/2006/09/14/basic_2/
- password4321 6y agoRun VS Code on any machine anywhere and access it in the browser. https://github.com/cdr/code-server https://github.com/cdr/code-server
- cozzyd 6y agoyou can use greasemonkey (or equivalent) to write whatever code you want on whatever page you want in the browser.
- eyelidlessness 6y agoI think if you’re using GitHub already you should look at Codespaces. It’s VSCode + containers in the GH UI. It sounds like exactly what you want.
- unreal6 6y agoI 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.
- enriquto 6y ago> some modern scripting language should be able to replace some aspects of the spreadsheet and work much better To begin with, it should be a single package without dependencies, just like excel is. Not some "ecosystem" where you need to install certain versions of packages for your script to work.
- EdwardDiego 6y agoI'm not so much fascinated as scared by how many investment banks are heavily reliant on Excel. A former co-worker used to work in London for a bank, his job was to maintain the linked Excel spreadsheets that were business critical - and only took six hours to produce a result. He found moving to the Java ecosystem rather relaxing and uncomplicated in comparison.
- jannes 6y agoExcel 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.
- ChrisSD 6y agoFirefox used to have a "scratchpad" for doing code in the browser, albeit somewhat barebones. Unfortunately it was more or less abandoned and eventually removed. It would have been nice to see it expanded instead. A full on node environment would be a bridge too far IMHO but it would have been great to have added a good way to reuse modules and some more GUI niceties. It did have full access to the current web page so there would have been security issues with new coders copy/pasting code from the internet. But a revised version could give it its own isolated environment by default.
- Dma54rhs 6y agoHmm, what about so called bookmarklets? You fire up js console obviously too, or use tanpermonkey, or make a local extension. There are really vast options out there and people do use them one way or another.
- tidenly 6y agoNot 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 roadblocks you find. I'm very anti gatekeeping, but if one expects to have every little detail drawn out for them then they're going to struggle in any even slightly complex field. Overall I dont see how any of their points supported the random "install node by default" conclusion - and the point saying "most" people hate command lines made me physically reel.
- catlifeonmars 6y agoIt’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?
- taneq 6y agoI 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.
- kodoque2 6y agoI learned programming on my calculator precisely for this reason, no cruft just pure code. And for an inquisitive mind, having to type arcane command just to get the desired result is incredibly frustrating, and I don't count mindlessly browsing stack overflow or the internet just to get the stuff I need as learning. That is why course such as nand2tetris are incredibly good. There is still an incredibly lot of stuff that can be done in matter of computer education. My dream would be a time travel libvmi based educational tool that allow to drill all the various function augmented with built in interactive explanation a la explorable and various code vizualization.
- csense 6y agoA 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.
- robjan 6y agoThat pretty much exists though. That's why Raspberry PI was invented and at the cost of $25 + a keyboard and mouse for the base model. If you want to pick up programming as a hobby, a hobby computer exists. If you want to get more serious eventually you have to learn your tools.
- kodoque2 6y agoRaspberry is a far cry from ben upton desired goal, this is not a matter of price, it is a matter of a full environment geared toward learning.
- miohtama 6y ago> 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.
- zerof1l 6y agoTechnically VS Code is a browser. If you open about, you'll see its Chrome. That means you can write code inside browser. Also there are things like Jupyter and AWS Cloud9.
- antisol 6y ago>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.
- mmmeff 6y agoThat or greasemonkey scripts. Though sometimes I read their source and it makes me feel better about my job security.
- DangitBobby 6y agoWhat's with the vitriol? The person who wrote this is active in the current thread.
- oefrha 6y agoThe 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.
- ccmcarey 6y agoExactly this. It's frustrating reading this article and the author's comments in this thread as it's apparent that they don't want to put the smallest amount of effort into learning something that is by its nature complicated. They don't want to have to google what $PATH does, they want the browser to come with an IDE (and massively ramping up its complexity because why?) instead of actually downloading an IDE. The author has weirdly treated the problem of not knowing something as that it is wrong that they need to know it.
- 6y ago
- captn3m0 6y agoI 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/_posts/2012-05-20-sympathy-editor.mkd https://github.com/captn3m0/captn3m0.github.com/blob/master/...
- pjmlp 6y agoThis is what I originally thought of ChromeOS should have been, a new take on a Smalltalk like system, just with JavaScript, but alas Google had other plans for it.
- solnyshok 6y agowhy I can't write code while on a walk through the wildest national parks or strolling along the sea shore...
- numlock86 6y agoI can write code in my browser, even without external sites: F12 Also, how can you fail to install something like NodeJS?
- darig 6y agoWhy don't you think you can? Ignoring all the coding sites and the console, VS Code is nothing more than a "Browser" that runs javascript.
- dariosalvi78 6y agoJust open devtools, everything is there. Maybe it could be made more visible?
- beefman 6y agoWe keep creating these, but one of two things always happens: 1. They fail (e.g. Smalltalk). 2. They succeed (e.g. the web). When they succeed, professional programmers overwhelm them and make damn sure only very very professional programmers can ever use them again.
- MayeulC 6y ago> When they succeed, professional programmers overwhelm them and make damn sure only very very professional programmers can ever use them again. I was reading that in the same vein yesterday: http://harmful.cat-v.org/software/c++/I_did_it_for_you_all http://harmful.cat-v.org/software/c++/I_did_it_for_you_all (it's a well-known false interview with Stroustrup)
- z3t4 6y agohttps://nwjs.io/ https://nwjs.io/ - A browser with built in Node.js. Or editors/IDE inside the browser: https://webide.se/ https://webide.se/ https://codeanywhere.com/ https://codeanywhere.com/ https://aws.amazon.com/cloud9/ https://aws.amazon.com/cloud9/
- oneweekwonder 6y agoadding to the editors/IDE inside the browser: https://github.com/cdr/code-server https://github.com/cdr/code-server (headless vscode) https://github.com/pylonide/pylon https://github.com/pylonide/pylon (fork of c9v2 when it was still open source)
- aspyct 6y agoI feel like the author is confused between server-side and client-side development, and proceeds to say that programming is hard. He even goes on to quote himself (sigh) as a proof of what he proposes. Look, maybe someone just explained it badly to you, and you should look it up for yourself. However, if the command line looks scary to you... wait until you read bad documentation :) My point is: yes, programming is awesome. But just like it's hard to become a good musician if you shy away from sheet music, programming is hard if you shy away from command line and a little web searching to know what $PATH is. If that is your mindset, then maybe it's just not for you. There's still plenty of awesome things you can do in IT without ever touching code, though. Machine learning is accessible from nice UIs now. I used that, it's great. As pointed out by others, there's also plenty of websites where you can either try things, or build complete projects. AWS, for one, has a fully browser-based editor for Lambda. Look it up, it might be the solution for you.
- colordrops 6y agoCould you elaborate on which UIs for machine learning you are referring to?
- aspyct 6y agoI'm thinking in particular about Kibana (part of elasticsearch stack). I used it, it's absolutely awesome. It's a paid feature though.
- cryptica 6y agoThis 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 is essentially never the tool, it's almost always the person. I don't think I've ever met anyone who was naturally good at thinking logically. Working close to the hardware and then working your way up the stack is one of the best ways to develop the required level of nuanced logical thinking. The problem with no-code, low-code or tools which try to move away from the underlying reality is that they don't train your logical thinking skills. In my view, tools should help people develop into better programmers, not give an illusion of ease and mastery when it is not deserved.
- larsrc 6y agohttps://brandondong.github.io/css-turing-machine/ https://brandondong.github.io/css-turing-machine/ Literally 7 entries further down.
- b1tshift 6y agoNot quite sure if I'm happy about stuffing an IDE and a full development environment into a browser. I would rather stick with the linux philosophy to doing one thing and doing it well, which would be browsing the web.
- DanielKehoe 6y agoThe 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/ https://tutorials.yax.com/
- aspyct 6y agoAgreed. Notepad for the win!
- DanielKehoe 6y agoIt doesn't have to be Notepad. But it's important to communicate to beginners that they can actually get far without build tools or frameworks. Go stackless. Use the platform.
- aspyct 6y agoCouldn't agree more. Actually, even non beginners should be reminded of that, sometimes.
- ccmcarey 6y ago> Contemporary professional web development (as practiced by members of "the code club") is madness In what way is it madness?
- DanielKehoe 6y agoFor 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).
- godmode2019 6y agoProgramming is hard to keep us employed.. Imagine how programming is going to be I'm the future when all the kids learning to code at primary school (k5). We will have to add some more jargon new ways to do things so that the people who are not constantly keeping up to date are left behind. Its always been the way. As a side note I do wish my browser has better programming tools for design, when I'm doing design I do all the editing in the browser and copy the js/css over when it works or looks nice.
- aspyct 6y agoNo matter how easy something gets, some people will spend enough time on it that it becomes "hard" to reach their level. As for your note about css editing, have you tried Brackets? http://brackets.io/ http://brackets.io/
- malux85 6y agoIf the author has “been playing with the web and code for years” and is still “wtf” on /usr/local/bin in $PATH it shows a lack of discipline and structure in their learning. I see this in many in many of my apprentices - the desire for instant gratification and the lack of experience means they refuse to do anything that doesn’t immediately proceed them closer to their goal. Here’s the thing with programming - you can’t run before you can walk. Go read “Learn python the hard way”, do 1 lesson a day Go do Linuxjourney - do 1 lesson a day By lesson 8 you’ll know about /usr/local/bin and path, and packages, that’ll fix all of your gripes about not being able to install ruby, pip and node too. And all of that is solved only after 8 days of disciplined learning. Sure it’s not immediately towards your goal but you need the lower level skills and knowledge first. And it’s only 8 days! Stop trying to assemble a fully functional car with no understanding of the fundamentals and then getting frustrated that car assembly is difficult. Go and learn some electrical engineering, go and learn some metalworking, go and learn some mechanical engineering, then you may come back and attempt to assemble a car. You might fail the second time too, but each time you’ll get further. Stop seeking that immediate gratification, the path to success is NEVER a straight line
- msh 6y agoImmediate gratification does have its purposes. It helped me a lot as a teenager in the late nineties that I could install borland delphi and very easily have a self contained windows app running without understanding too much, it gave me the confidence to go on and learn the lower level stuff.
- user-the-name 6y ago/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 should need to know this.
- kichimi 6y ago
- chaos_a 6y ago>Ok, once again. I can write code inside my spreadsheet but not inside my browser? WTF. Technically you can write code in the dev console, or using javascript bookmarklets which is similar to code in a spreadsheet.
- kichimi 6y agoI 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 lines - not only do they LOOK scary, they give weird unhelpful error messages and… you have to type everything. Ugh. " You have to type to write programs. I truly believe that this person has had a conversation with friends about how programs should write themselves by you just telling them vaguely what problem you'd like to solve. And unhelpful error messages? You know what would be an unhelpful error message? 'ls' outputting a commandline tutorial every time I mistype a directory name so that people like this can have his hand held and continue to be intellectually lazy. I have no patience any more for lazy know it alls in regards to programming.
- user-the-name 6y agoThe 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 think it makes us clever. Programming can and should be much, much more user friendly than it is now.
- DanielKehoe 6y agoIt's time to refactor the last ten years of professional web development.
- user-the-name 6y agoIt's time top refactor the last THIRTY years of absolute garbage development in general.
- secondcoming 6y agoThis blog post is proof of why what the author wants should never happen. Coding is about solving problems. Coding is not for everyone. If he cannot even be bothered to find out what $PATH is, then coding is not for him. He wants to doodle, not code. Why should he expect any browser to cater to his needs?
- martini333 6y agoWhat a useless read
- kellengreen 6y agoOpen VSCode. click Help. select Toggle Developer Tools. Realize you're writing code in a browser.
- madeofpalk 6y ago> Ok, once again. I can write code inside my spreadsheet but not inside my browser? WTF. The premise of his article is faulty because... you can code inside your browser. _They mention Glitch_, which lets you code inside your browser! There's things like CodeSandbox.io (and Github Codespaces coming whenever) that give you a full NodeJS environment and 'proper' IDE (VS Code) all in your browser and lets your deploy to a variety of production environments. Downloading and running a node.pkg that installs all the command line tools seems pretty easy - there's nothing wrong with the command line, you've just got to learn it. It's never been easier to code.
- omegote 6y agoThe case here is that, if it were up to nowadays frontend developers, it would not be possible to write simple JavaScript code in notepad to quickly run in the browser. The frontend scene has evolved to become an unmanageable monster of cargo-cult programming, unnecessary complexity, infinite scaffoldings and huge node_module folders, and frontend developers are proud of that complexity. They enjoy running npm init and tens of initialization commands before even writing a single line of code of their own. And all of that goes against the ease of access the OP post seems to request.
- aspyct 6y agoYes you can: <script>. It still works, you know.
- swiftcoder 6y agoA 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 Java environment out of the box. The same for Visual Studio. Why the "hacker mentality" languages think this sort of user-obsession is beneath them, well, that escapes me...
- jorams 6y ago> Requiring a novice to learn arcana of a 30 year old Unix system before they can learn to program is purely extraneous. The thing is, that's the system they are using. Node.js is a programming runtime for that system. Node.js has a GUI installer that sets everything up correctly, it's just not an IDE. Jetbrains has an IDE, WebStorm, that probably works just as well as the Java one. It can automatically download Node.js for you, so the same experience as for Java is available there as well.
- swiftcoder 6y agoSure, but when I visit nodejs.org there is a very prominent "Download" button, and no mention at all that I might have an easier time with WebStorm (or another such fully-integrated development package). No links to introductory materials either, I might add. Those would be fairly trivial changes to the website landing page, but they could drastically reduce the steepness of the on-ramp. By contrast, if I visit python.org, there is a clear funnel leading me to alternative development environments, beginner tutorials, etc.
- kaoD 6y agoApples to oranges. Python is a language and Node is a runtime. Compare with https://www.javascript.com/ https://www.javascript.com/
- TeMPOraL 6y ago
- Ciantic 6y ago> Can you imagine if the beginner version of Node.js came pre-installed with a GUI for managing and running your code? It doesn't even need to come pre installed, as long as the GUI could install node almost silently. E.g. if VSCode had some intelligence built like when it sees package.json and would prompt "Would you like to install Node" and it would do it's magic if user wanted. Lots of small problems would need to be solved, like where to install it etc.
- sparsely 6y agovscode does this when you open a C# file already, makes it very easy to get started.
- Ciantic 6y agoGreat! I didn't know that. I did notice that if you write "python" on Command Prompt of fresh Windows 10, it throws you to the Microsoft Store to install python. Which is kind of cool too.
- imvetri 6y agoYou can try using console or open debugger or you can build an extension. It will help you to write code inside the browser.
- reissbaker 6y agoWhile 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 https://github.com/features/codespaces
- wilsonrocks 6y agoI agree with the other comments about the attitude of the post. But as they mention, it can be hard to install ruby/python. Node is normally much easier. I've given up on getting react native going on my personal laptop, and I do react for a loving.
- DanielKehoe 6y agoTo install Ruby, it helps to have a good guide (but, yes, sometimes they are difficult to find): https://mac.install.guide/ruby/index.html https://mac.install.guide/ruby/index.html
- wilsonrocks 6y agoThanks! I use a Mac for work but Linux at home. Got it working in Linux with rvm in the end. Very much enjoying doing some rails after years of JS
- DanielKehoe 6y agoYes, Rails still has its charms :-) I'm glad the installation guide was helpful. Here's the full guide for Rails: https://learn-rails.com/install-rails-mac/index.html https://learn-rails.com/install-rails-mac/index.html Take look at the `$ rails new myapp --minimal` option that's new in Rails 6.1 It gives you Rails without all the extras. Kind of like a 2010 Rails.
- svrtknst 6y agoThe hostility coming off of these comments is pretty off-putting. I share some of the sentiments and believe that the authro has some misconceptions. But I also believe that he makes a lot of great points. Installing and maintaining programming languages is too hard. Going from "I would like to try some $lang" to being up and running is usually difficult and requires you to install binaries, then deal with PATHs, and with CLIs, and REPLs and a bunch of cruft before you can start experimenting and getting to the interesting parts. The programming language experience comes with a shitoad of stuff that really has very little to do with the language itself. There is also a lot of potential in more flexible tools that allow me to create small apps with, well, maybe not with minimal coding, but with minimal installations, minimal integrations in my particular OS, minimal maintenance of the installed binaries and tools etc.
- Koenvh 6y agoExactly. My favourite programming experience so far has been Visual Studio. Setting it up is done in one installer that guides you through the process, and after that it just works. I think a lot of people here forget that people who program no longer need to be "programmers", and understand every aspect of the system. For these people who just want to simulate a model, or do some calculations, or automate a mundane task. For them programming is a means to an end, it's about the result.
- robenkleene 6y agoThe reason you can't do this is that Node of course has a bunch of file system APIs that for security reasons necessitate an application designed for automatically downloading and executing arbitrary source code can never, ever, have access to. But you could rephrase the authors point this way: Browsers make a ton of concessions to regular users at the expense of developers. Consider for example that the act of developing a web application in fact often does not involve executing arbitrary source code online, it involves executing specific source code you have control over, which has different security requirements. The author is expressing something I'm surprised more developers don't pick up on: The browser is a consumer tool first, and yet it's a favorite tool of developers despite the fact that it barely caters to developers at all. Take for example the "Developer" menu item, which is two levels deep in Chrome. A rational developer, who spends all day with a browser open for development, would be frustrated that one of their primary use cases has such a low priority in the application. But that's not how developers perceive the browser, developers have a fondness for the browser that's not reciprocated. Another example of the low priority of developer use cases in browsers is that the commonality of the other main developer tools, text editors and terminals, is that they achieve incredibly powerful functionality through process management. E.g., code completion, linters, integrated debugging, `grep`, `git`, are all based on text editor's and terminal's ability to manage external processes. But browsers can't do this, which firmly limits their usefulness, and creates bizarre situations like having to manually hit the refresh button because your server process can't talk to the browser application itself.
- twobitshifter 6y agoAre you aware of Firefox Developer Edition? https://www.mozilla.org/en-US/firefox/developer/ https://www.mozilla.org/en-US/firefox/developer/
- robenkleene 6y agoNo, I wasn’t, thanks for pointing it out! I’d love to hear which of the issues I listed that it addresses. The tag line “welcome to your new favorite browser. Get the latest features, fast performance, and the development tools you need to build for the open web”, as well as the features listed on the homepage, don’t address any of the points I listed directly. (This doesn’t mean the app itself doesn't, but I'm not encouraged by the features as they’re listed on the homepage, which feels more like some new features for developers, rather than a re-imagining of how we think about how developer tools are integrated into the browser like I’m describing.)
- imtringued 6y agoMy only explanation for the existence of this article is laziness. You can write code inside your browser easily. Cloud9 exists and although it was acquired by AWS you can still use it. https://aws.amazon.com/cloud9/ https://aws.amazon.com/cloud9/ The real solution to this problem is more awareness and good entry level resources that you can point indecisive people toward. None of his points are actually going to improve the situation even a tiny bit, mostly because they already exist and some of them completely failed while the others are there if you just look for them.
- mrvenkman 6y agoI also get frustrated sometimes when programming, especially in a new language or environment and every time I find the solution to an issue that has taken days to resolve, I wish I had studied computer science. I wish I had learned from the ground up instead of jumping straight into trying to write code because I would of learned WHY. I'm off to buy a computer science book - any recommendations?
- Gehinnn 6y agoI don't know whether the path is the problem that makes modern web dev so hard to learn. I'm currently trying to setup the js testing library "jest" to use babel to transpile typescript and I get the most obscure error messages. This is painfully hard and I have years of experience with javascript/typescript [1]. I doubt there ever has been a more complex programming ecosystem than JavaScript's. No other system has more bundlers (webpack, rollup, metro, ..), transpilers (babel, typescript, flow, ...), testing libraries (jest, mocha, jasmine, ...), package managers (yarn, npm, pnpm, ...). It is just insane what we created. [1] if you are curious, that is the error message. Good luck making sense of it. It probably is caused by non-compatible dependencies but yarn does not tell me. Validation Error: Preset @babel/preset-typescript is invalid: The "id" argument must be of type string. Received type object TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received type object
- toomanybeersies 6y agoI had to do a take home programming task over a weekend for a job interview last year, the only technical requirement was that it had to be done in JS (both Node and browser). It had been a few years since I had started a JS project from scratch (I spend 90% of my time doing Rails dev). I ended up spending more time figuring out what package/build/testing tools to use than I did actually writing code. Looking up best practices for Express.js project structures, I found that every blog post/article had a different "best" structure. I'm happy that my new job is still primarily Rails. I'll take convention over configuration any day.
- tomquirk 6y agohttps://gitpod.io https://gitpod.io
- richardARPANET 6y agoThe author sounds like he wants to just be a web Designer. In which case he can work inside his browser, using tools such as WebFlow.
- PotatoBoi 6y agoWow, I thought I saw dumb stuff but this is next level dumbness (no offense intended). I can't even express how dumb this is with words. Where is the world going ffs
- edu 6y agoThe 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-User Development". [2] [1] https://scratch.mit.edu/ https://scratch.mit.edu/ [2] (PDF) http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.68.6315&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.68....
- lawl 6y ago> The author is not talking about "professional programming" but about a field called "end-user programming" or more generally "end-user development" I do think VisualBasic(6) had a thing there. It was so easy to visually design a GUI and slap some code into it. That said, as a "professional programmer" I once had to maintain such a VB6 application that was developed by someone that wasn't a professional programmer and that application was absolutely business critical for that company. It wasn't fun to put it mildly. So my take on this is that it probably died for a reason.
- tonyedgecombe 6y agoThat's not a problem unique to VB6, there is a lot of crap code out there. Also I've seen some strong programmers being very productive with tools like VB6 and Delphi. I suspect the main reason for its demise is corporates don't like installing software on client machines. It's much easier for them to deliver everything through the browser.
- marcosdumay 6y ago> So my take on this is that it probably died for a reason. Yes, Microsoft killed it. Up to the point when Microsoft killed it, it did nothing but grow. And for years after Microsoft killed it, it did nothing but grow. Microsoft killed it because it was a mess on every level, and they didn't like the part they were the ones maintaining. But lack of demand certainly wasn't a factor there in any way.
- xavor 6y agoIf we want monkeys typing out the entire works of Shakespeare we might as well make that the default when you open a browser and smash the keyboard/screen (device will magically know). I mean the alternative - friggin' learnin' stuff - is too hard.
- aspaceman 6y agoSorry. what? F12->Console->Boom, Code. It's legit right there? Open up a blank index.html page and you can even start adding canvas elements and stuff probably. EDIT: After reading more carefully, I realize the author is of the "I just don't understand why this is so hard?" variety. Answer: There's a direct tradeoff between the expressiveness of your language and its difficulty. This is even a concept in linguistics. Take a look at several graphical programming languages, they are incredibly limited so they can be done graphically. This article ticked me off honestly. Really feels like they just don't understand how and why people use text-based tools and command lines. It's not because we think we're better than you lol, we just like them more and find it more effective. It allows us to get the work done. Another comment said intellectually lazy and I think that nails it. What a pile of crock.
- johannboehme 6y agoDoes the author not get browsers at all? Chrome should include a nodejs installation by default because the commandline is scary? Does he know, that node is based on the V8 engine that's part of Chrome? Packing it in would be redundant and it's a pure backend integration. You dont need nodejs to learn javascript. If Pathes and Commands are scary, just right-click on your desktop. Click New->Text Document and name it "index.html". Open the document in a text editor of your choice. insert <html><head><script>### </script></head><body></body></html> into the file. Replace ### with your js code. Open file in browser.. Its that easy. FFS, some people just want to complain.
- MarkusWandel 6y agoA while back, I met a fashion designer who is also an expert seamstress. And I do believe most music composers can play the piano. You have to learn to walk before you can fly.
- phendrenad2 6y agoHow many music composers have to build their own piano from a kit?
- marxplank0 6y agoHow many programmers have to create their own computer
- jfk13 6y agoSkimming the comments here makes me nostalgic for the days when every Mac came with HyperCard.
- grumple 6y agoYou can literally code in most browsers by accessing their developer tools. It's a hotkey away. You can go write javascript right now. Second, there are many tools like https://repl.it/ https://repl.it/ and https://aws.amazon.com/cloud9/ https://aws.amazon.com/cloud9/ that let you code in browser. I have used a half dozen similar tools on educational websites that allow coding in browser. Not everyone needs to know how to code, how to be good at it, or have the temperament for it. And the fault rarely lies with the environment around programming.
- narcissismo 6y agoBecause you haven't found lively kernel. https://lively-kernel.org/ https://lively-kernel.org/
- xkriva11 6y agoA significant weakness of Lively is missing proper debugger. Amber (https://amber-lang.net/ https://amber-lang.net/) has one (but it is not plain JavaScript). The next complaint is that you need to host it. Ideally, the system should have a good debugger and have an option to be self-hosted like TiddlyWiki (with an option to be served by a normal server). I did some experiment in this regard (https://pavel-krivanek.github.io/amber/amber.html https://pavel-krivanek.github.io/amber/amber.html - only "legacy IDE" work) but then you can save it and it will save the new version with all the changes you did as a self-hosted HTML file.
- 112 6y agoYes, in order to do X you need to learn how to do X. Complaining about not being able to program when you didn't spend a minimal amount of energy to understand the basics of how your computer works is worthless, just like this article.
- tartaglia 6y ago> So I can write code inside my spreadsheet, but not inside my browser? WTF. You can, press F12. > Here’s my pitch: build a browser that comes pre-installed with node.js, an IDE and a simple runtime environment. Why? If you’re new to coding then you don’t need an IDE: it adds complexity. You just need a “Run” button like in Excel (right?). Additionally, you probably don’t need Node.js because it is just adding some API to interact with the operating system. If you use said APIs then you need to learn a couple of things about the O.S. - nothing major - like what is a shell, or what mkdir and PATH stands for. But, hey, we’re talking about non-coders here right? They don’t need these APIs, they are just getting started. So why should they need Node.js? > People hate command lines - not only do they LOOK scary, they give weird unhelpful error messages and… you have to type everything. Ugh. This is why people would rather code inside a spreadsheet application - because it’s an application. I’m all in for the no-code movement, although I’m not the target audience. I agree that you don’t need to know how to code to setup a simple website. You can just use Webflow. I think this article doesn’t make much sense. Every paragraph of the article (especially the outro) suggests that Node.js is not an example, it’s the target of the article. The fact that the OP is proposing to run Node.js on the browser suggests that they doesn’t know what Node is, and why you should use it. Your code will run fine on the browser and on Node as long as you don’t use Node APIs. Once you use such APIs, you’re agreeing to the fact that you know what you’re a doing - you agreed to use Node’s API; if you didn’t want to deal with the OS directly, then should have opted for something like Visual Basic. And if you agree to use such APIs then you know that Node exists so that you can forget about the browser.
- gorpomon 6y agoTo anyone confused by $PATH, read "Unix for the beginning mage": https://lab46.g7n.org/_media/haas/ufbm.pdf https://lab46.g7n.org/_media/haas/ufbm.pdf I've taught at several bootcamps, and this is the first book I tell everyone to read. I tell my students to just get it read ASAP. After that setting up your environments or $PATH becomes much more comprehensible. Git becomes much more comprehensible. Life as a developer is much more pleasant. The article author should take time to understand the command line environment they work in, simple as that. I've had the exact same struggles the author has had. I've had Ruby, JS and npm implosions, multiple times. It would be nice if the languages and tools documented their errors better. All tools should strive for better, more beginner friendly documentation. But if you're a dev right now knowing Unix has to be table stakes.
- RocketSyntax 6y agoTry running a jupyter notebook in google colab
- 0x4a42 6y agoActually you can code in the browser. You can write JS snippets in the URL, in the URL field, in the console... No need for an IDe, an interpreter or a compiler or to install anything else. A browser is all you need to start coding and everyone has one installed on their system. Also on coding is too hard for newbies: JS, Python, PHP are NOT hard. I couln't have became a developper 25 years ago when programming was really hard but nowadays building usefull applications with JS and/or Python the myriad of libaries available and the ridiculous hardware ressources at the disposal of anyone, it's not hard anymore.
- ptrwis 6y agoStackblitz is great
- hfkldjsjfkdj 6y agoIf 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.
- Chazprime 6y agoA software engineer asking “wtf is user/local/bin in $path”? Sounds fishy to me.
- kwhitefoot 6y agoWhy doesn't Windows come with something as easy to get started with as Basic? In the 80s almost every home computer could be immediately used to write code as soon as it was switched on.
- DanWritesCode 6y agoThis is one of the most whiny and misguided articles I've seen near the top of HN in some time. I really fail to understand how people can see something like the $PATH variable and not understand it 'for years' - does everyone else not just Google/DDG things they don't understand? It's not really worth critiquing more of the article, as the entire premise of not being able to 'write code inside the browser' is just another fallacy that's based on the authors complete lack of knowledge, or willingness to acquire any more knowledge.
- em500 6y agoThe literal answer to the headline question is "You can, just open Developer Tools -> Console and code away." But it seems the question in the article is actually "Why can't I write node.js code inside my browser?", followed by what seems to me lots of confusion between coding and program execution environments (web-browser or MacOS). You can code in JavaScript on most browsers without installing anything. Sure, the UI of browser Developer Tools can be somewhat intimidating for newcomers, but that could be fixed with some good tutorials. But it seems the author doesn't want to just write and run JavaScript, he wants to use node.js specifically. But the whole point of node.js is to take Chrome's JavaScript compiler/interpreter out of its native webbrowser environment and have it run in a Unix-like command line environment, such as Linux/MacOS. So complaining that you need to know some of the workings of a Unix-like command line environment to use node.js seems very misinformed. As for accessibility of programming in general, the core developers are usually not that interested in that, but for most popular languages there are plenty of third party tutorials aimed at laymen. Most programming languages are specialized tools; they shouldn't try to be everything to everyone. We don't complain that university Calculus profs don't also write arithmetic books for elementary schools either.
- dininski 6y agoAlso don't forget projects like Cloud9. It is literally a cloud-based IDE similar to what the author was talking about. I do agree with someone else's comment that this is lazy writing - even a little bit of research/google-fu would immediately point you to similar projects.
- moistbar 6y agoI don't know how he manages to write Node.js programs when one of the first things he says is that he couldn't get node to install.
- jug 6y agoExtensive GitHub use with Node? Sounds like GitHub Codespaces ought to be up his alley. https://github.com/features/codespaces https://github.com/features/codespaces
- gwbas1c 6y agoChrome includes (almost) a fully functional IDE. If you dig around, you can bind Chrome's Javascript debugger to files on disk. You can also interactively tweak the CSS that's rendered and then copy and paste it back to your sources. But, I don't see why this guy thinks installing NodeJS is hard. I have a low tolerance for painful installs, but NodeJS and Visual Studio Code were quite easy for me to install and pick up. Furthermore, you can code in a browser: Azure supports this, although it was somewhat buggy when I tried it.
- eivarv 6y agoHere’s my pitch: build a browser that comes pre-installed with node.js, an IDE and a simple runtime environment. Welcome to all editors written in Electron.
- linux-user 6y agoThe only reasonable use of GUIs is if you need one hand free for jerking off.
- magicseth 6y agoI 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 necessary. Great tools hands a "low floor AND a high ceiling" meaning it's easy to get started and possible to go really really far. Clearly tools like replies show there's a desire for easier to set up environments. Have you never wished you could save your css tweaks directly from chrome dev tools? Why should the browser show you the page source when you could just curl it? Well... Let's try to make the unimportant things EASY so we can focus on the useful parts. Firefox could absolutely come with a standard node server and editor. And it could integrate with providers like GitHub or netlify. Gatekeeping getting started benefits nobody.
- Jakob 6y ago> 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-react-in-one-minute 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/workspaces 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?
- Ajedi32 6y ago> Have you never wished you could save your css tweaks directly from chrome dev tools? FWIW, you already can. Sources -> Overrides -> Select folder for overrides.
- lqet 6y ago> Ok, once again. I can write code inside my spreadsheet but not inside my browser? WTF. > Here’s my pitch: build a browser that comes pre-installed with node.js, an IDE and a simple runtime environment. I don't understand the problem. Ignoring the node.js requirement, just open the developer console in Chrome or Firefox. There you have a powerful JavaScript REPL. There is also a ton of online REPLs, e.g. https://repl.it/languages/nodejs https://repl.it/languages/nodejs. > Increasingly there’s a disconnect between the kinds of activities code enables and the “expected” workflow for “being a coder”. What does that even mean? There is also a huge disconnect between the kinds of activities buildings enable and the expected workflow for "being an architect". Yet I don't hear an architect complaining that he cannot design a building simply by wandering through the Taj Mahal and thinking "wow, this really looks beautiful, I enjoy this!".
- sirsuki 6y ago"People hate command lines - not only do they LOOK scary, they give weird unhelpful error messages and… you have to type everything. Ugh." Well, people hate graphical interfaces - not only do they LOOK scary, they give weird unhelpful error messages and… you have to click everything with a tiny pointer like you are fishing in muddy waters. Ugh.
- cestith 6y agoI can recommend Electron or Flutter, but I can't do a web search and read docs for the author every time he doesn't know what $PATH means or similar.
- exoji2e 6y agoBundling is dead. You just need to compile your favorite editor into asm.js and run it in your browser. Or why not your terminal :) https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript https://www.destroyallsoftware.com/talks/the-birth-and-death...
- EamonnMR 6y agoYou absolutely can code with just a text editor and a browser. I built an entire browser RPG like that. You just don't get npm packages or Typescript, which is kinda rough.
- 40four 6y agoAs 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 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.
- subjectsigma 6y agoOne time when I was much younger I wrote an auto-download script for a forum I liked. I used it just for myself and never had a problem, so one day I posted it with instructions on how to use it. A few minutes later I got a really angry reply; some guy had hit a weird edge case and it was downloading the same links over and over, rapidly filling up his small SSD and causing all kinds of problems. I apologized and posted a fix, but I was already getting absolutely reamed in the replies by other people who either had the same bug, or some other. That's how I learned newbies should not throw random code on the Internet - it pisses people off when you tell them "Use this!" and then it breaks their computer. When I people say "I want everyone to be able to code on the web in JavaScript", what I really hear is "I want an Internet full of broken, unusable, and possibly dangerous garbage, written in one of the least safe and elegant languages ever created, where most things are completely hostile to the majority who come across it." Additionally, if this person can't read a ten-minute tutorial on how to install Ruby with homebrew, imagine what else they probably won't do: - Read/write a CoC or contributor's guidelines - Spend time translating their web pages, or making them accessible - Understand basic security and privacy issues/best practices - Take the extra time to make useful bug reports, or make reports at all - Read (or write) references, documentation, or tutorials - Learn general netiquette for commits, mailing lists, pull requests - Understand the basics of open-source licenses And maybe this is totally fine for your completely personal hobby project, but the next logical step is having other people use it. This isn't the kind of behavior we want to carry into that next step.
- lgeorget 6y agoI kind of get that person's point (although I don't quite understand the tone...). I introduced my wife to LaTeX when she started her PhD because she had very specific typesetting needs like phonetic alphabet and arrows on top of words to indicate intonation. She discovered a wonderful world! But none of that could have been possible if she had had to install a LaTeX distribution and an editor on Windows . Overleaf (and previously Sharelatex) on the other end makes everything easy. You have the choice between XeLateX, PDFLaTeX, etc., all the useful packages you could dream of, and more, without installing anything. Plus collaborative editing for free, when she needs help with a macro or a new environment definition. So, yeah, being able to program without having to install a development environment is great. There are tools to do that already, like Repl.it, maybe the OP could try that.
- Gravyness 6y agothis title made me think this was about a entirely different thing as I have been writing code inside my browser since 2016.
- linux-user 6y agoIt would be much more beginner friendly learning to play the piano if there weren't all those keys.
- asidiali 6y ago1) your terminal is a browser, a system browser, basically a local, more powerful web browser - and it supports a lot more than just JS unlike other browsers only for the web 2) you operate web browsers via text commands just like a CLI - it all starts with the address/search bar. When you use your search bar to google, you are effectively typing commands into a CLI. IMO if you can’t install some basic software like node or pip then yeah, maybe the software isn’t the issue and you just need a better fundamental understanding of what it is you’re trying to do. Plenty of people install node, every day, without issues. It’s not rocket science. If you avoid CLIs, I don’t trust you as a software engineer, because it feels like you’re not looking for the right answer to the problem. It feels like you’re looking for the easy answer to the problem. Part of the beauty, to me, of the CLI is like starting a painting from a blank canvas, vs a GUI being like a coloring book where you just fill in between the lines.
- gdubs 6y agoThis is the magic that HyperCard provided, and I’ve yet to see anything approach it. Regular people made stuff in HyperCard. Side point: if you’re here because you’re interested in building solutions for people at scale, then maybe don’t tell users they’re stupid or lazy. Building something for a mass audience means really understanding their problem, not just throwing solutions at them. Sure, there’s a developer console. You can enable it, open it up, and then have a blank canvas. Then what? That’s not accessible to 99% of people out there.
- Peritract 6y agoThe author isn't wrong about the entry barrier into programming. However, they are wrong about almost everything else; 'Node in a browser', as the author uses it, is just a string of half-understood terms thrown together. Ironically, the inaccessibility of programming is probably at least partly to blame for their confusion. There is undoubtedly work to be done into making programming more accessible to newcomers - almost all tutorials on code start in the wrong place, assuming a lot of knowledge of the difficult bits but then labouring through the easy ones. I don't think the problem is tooling, but how we introduce and talk about those tools - you can quickly explain the command line in a way that takes the fear away and gives learners a framework for understanding it, but you have to give that explantion; too often it's skipped over.
- dcchambers 6y agoI think what the author is really pointing out is the rather large gap between the many introductory "learn to code" tools and then actual, real development tools used to make software. A lot of those introductory tools abstract away the way that software actually works which allows you to focus on learning the basics of logic and programming. This is great for learning but extremely limiting. There is a reason why professional tools and programming languages don't abstract away the technical details. Because you need to know how things work under the hood in order to be a truly effective programmer. This is part of why a formal programming education is so valuable IMO. It can be very hard to cross that gap on your own. I think this article also defines a kind of smoke test for programmers. If you don't like learning how to read error messsage on a command line or googling stuff, you probably won't like programming. To Tom I would say - programming is hard, but I think that's OK. It's not good to hide all of the technical "ugliness" of how these tools work because to be an effective programmer you need to know how they work. That's just the reality. The messages you see when working with tools like Ruby or Node are designed to be useful for a professional who knows how to read them. What may seem like command line garbage to an untrained eye is actually extremely useful to someone that knows what they are looking for...and that is what takes someone from a hobbyist programmer to a professional. Is there room for improvement? Can we close the gap between the myriad of "hello world" programming tools and the seemingly bottomless trench of "real" programming tools? Absolutely.
- jmull 6y agoYes, the author is confused and has no idea what he's talking about. But I agree with the general idea: The barrier to entry for coding is quite high, which puts it out of reach for so many. Flash is dead now, but it was an environment that really lowered the barrier. People with barely any coding skills could program with it. But a lot of them had other skills. The results were often awful or horrible, but some really amazing things were also created.
- matlin 6y agoI agree! I think the key is to use browsers for all parts of the coding experience. Write your code in the browser and run your code in the browser. Because it turns out a Chrome tab is as good if not better at isolating and running code than a VM or container. And my company is actually working on this exact thing right now and we'll be sharing more info on how we think it works very soon!
- sergeykish 6y agoHe is using server side programming environment. Linux won the servers. How hard task is there? $ pacman -S nodejs python-pip ruby also $ pacman -S ghc lua erlang elixir rust gcc clang postgresql docker podman --- But seriously. There is no market. Browser is a javascript runtime, it is easy to make self-contained HTML like self-contained SWF before. Nodejs is v8 running on the server. In theory it should be possible to emulate in the browser. In practice someone has to implement that first.
- potta_coffee 6y agoThe author can download VSCode, which is an Electron / Chromium app, and write code in it. It has really easy integrations with the command line and lots of other tools as well. It even has features to let you use containerized backends for things like NodeJS. This is almost exactly the solution the author is complaining doesn't exist.
- Triv888 6y agoFailed to install node Failed to install pip Failed to install ruby I stopped reading after those lines
- gpsx 6y agoWow. People are being pretty hard on this guy. A common complaint is that he wants to code but not put the least amount of work in. What is wrong with that? Or why get angry at him? I've been working on a side project related to being an easier coding environment. I hope that is not a terrible idea. https://www.apogeejs.com/web/apogee.html?url=/web/examples/quickStartWorkspace.json https://www.apogeejs.com/web/apogee.html?url=/web/examples/q...
- AcerbicZero 6y agoI've been ranting on and off for years about the need for a good REPL when learning a new language or exploring a new concept. If I can't dig into the objects and poke around at how the individual pieces actually run I find it extremely hard to get a handle on these things at scale. I've always assumed it was more a "me" issue, and so I've attempted to work in the more "normal" manner, but with pretty poor results. I've all but given up on Python due to its lack of a decent REPL and gone back to Ruby, where at least I have pry to dig in with as needed.
- m1117 6y agoYou can!
- jonny_eh 6y agoTry runkit.com?
- compuDERP 6y agoSome tasks are inherently complex. Ask a pilot.
- lucideer 6y ago> Why can't I write [NodeJS] code inside my browser? Short answer: you can write NodeJS code inside your browser[0]. Being able to do so will not solve ANY of the problems listed in your blogpost. The author's problem is that they don't have an attention span for learning a domain which contains necessary complexity; they crave quickfixes but don't have enough basic knowledge to understand why those quickfixes won't help them. > An incomplete list of things I’ve tried and failed to do: > [lists 3 things that most/many web programmers fail to do regularly as part of their day-to-day] I've failed to install node or pip at least 100 times. This is a normal part of learning anything in life. How many times did you fall off your bicycle as a child? [0] Whether it's repl.it, Codespaces or some other method there a million ways to do this depending on your needs. All do require a basic understanding of code which the author seems to lack (their bullet list of coding projects are all based on pre-existing templates & copypaste, especially their "fairly complex Jekyll blog")
- tomp 6y agoMeh... The author might be pushing it a bit, but s/he has a point. Recently, after a few days of trying to set up Scala to work with the latest JVM in Visual Studio Code I just gave up and installed IntelliJ IDEA instead. Works out of the box. I'm a seasoned programmer with 15 years of experience in Python, Java, Scala, OCaml, C++, JavaScript, Linux, bash, ... (a.k.a. I can do or learn pretty much everything). Could I set up VS Code to work with Scala? Yeah, probably. But why would I bother? UI matters. Programmers mostly suck at UI. Which is reasonable, really, because after you set it up once, you can easily forget about it...
- thomgo 6y agoThe author brings up a good point. Starting to develop for the web still requires too much setup and configuration. No one likes/wants to be doing this. It would be nice if these were abstracted away so we could focus on actually building products.
- deleted 6y ago[deleted]
- dragonwriter 6y agoYou can’t write code inside your browser because there are better environments for writing code for most people who want to write code, and enabling in-browser coding without it being a giant and regularly exploited security hole through which non-technical users would be exploited is nontrivial. Yes, it would be very convenient for beginner programmers, but beginner programmers are a very small subset of browser users. (And a robust and even less-secure-against-”paste this command into your browser programming environment” attacks version would be good for more advanced programmers, but even worse for everyone else.) And having specific browsers targeting each of those environments would be possible, but negate (especially for beginner programmers) a significant part of the advantage of having the programming environment integrated in the browser in the first place.
- brundolf 6y agoLots of commenters here are failing to see past the snarky (in my opinion, tongue-in-cheek) tone and missing the greater point, which isn't a fundamentally new idea, but is always worth revisiting for discussion: How can we remove as much yak-shaving as possible, so that a person who can understand logic can use it to make computers do things without first learning a bunch of esoteric knowledge required to get the ball rolling? How can we make more Excels? I think the idea of including a real, accessible, coding environment in a popular web browser is a pretty neat one, if for no other reason than the fact that everyone has a web browser and generally knows how to use it. It would open things up for a very large number of people. Like the author, I doubt Google would ever do this, but it's fun to think about.
- kllrnohj 6y agoCounter-argument here is that what the author wants already widely exists. There's a ton of one-stop "install this app & start coding!" apps out there. Someone wants one of those for node.js, sure, knock yourself out, go for it. It'd be just one of a dozen such apps, not a new concept, and not unexplored territory. But the authors request that this is built into the browser seems insane to me. Why would we bloat browsers with unnecessary stuff just to avoid hitting an app store, which is also extremely user-friendly? It's literally a request for bundled bloatware. No, hell no.
- brundolf 6y agoA big part of why BASIC took off with "non-programmers" (for a while) is that it was bundled on every DOS/Windows install. The same is true of Excel: people already have it and are using it, so they just organically start learning the more advanced things you can do with it, and before long they're basically programming. We aren't talking about people who make a concerted decision to "go find and install a tool for programming", and who just don't want to put in the effort to learn the "real tools". We're talking about people who would never think of themselves as programmers in the first place. I think you underestimate the significance of the small barriers, even ones as small as a search-and-install step. I do think it would be silly to drop Node into Chrome wholesale, since the bulk of Node is V8, which is the JS engine Chrome already includes. But what about a version of the JS console that's designed to be exposed to everyday users, for interaction with the sites they use every day? What about a button on the New Tab screen for opening an interactive web dev space similar to CodePen, which can trivially save the resulting files to the local file system (and load projects from there)? They could re-use most of the GUI components from the existing Sources tab in the dev tools. What if it included a preconfigured (simplified) reactive front-end framework so people could get started making custom GUIs? Something like this: https://mavo.io/ https://mavo.io/
- bitwize 6y agoI dunno, mate. Why can't I open Jira tickets, access corporate apps and resources, monitor builds and deploys and app health, all from my code editor (Emacs)? Because I'd rather do that. Although, his idea almost came to pass: Back in the day, the W3C's reference browser, Amaya, had a built-in HTML and CSS editor allowing for in-place editing of any content the browser could view. You could only save back if you had upload credentials, but still. With continued development, Amaya would have probably grown a JavaScript editor as well.
- moistbar 6y agoI think the most infuriating thing to me about this article is that the author doesn't understand the existing tools well enough to have any idea why we need new ones, and instead decided to complain on his blog about how programming is too hard. ANYTHING is hard when you first start out. Try making a table out of wood, or doing origami, or playing an instrument for the first time, and unless you're some bizarre savant you're going to effing SUCK at it. Learn why things are the way they are, or in this case learn the way things are in the first place, and your results will improve.
- lhorie 6y agoIt sounds like the author comes from a Windows background. FWIW, way back when I was a beginner, there were already tools geared towards this exact "no command lines ever" audience: xampp[0]. You'd be surprised how far xampp plus php.net docs can take you! Nowadays, there's also tools like codepen, cloud9, etc, not to mention an endless amount of resources for learning in all sorts of formats (many of which are free). The thing that bothers me is this idea of "look, I'm a beginner, but your not-geared-at-beginners tool should be geared at beginners!" Imagine you are a beginner at art, and you go around demanding that oil on canvas shouldn't involve brushes and mixing paints because that's too hard, or that metal sculpting shouldn't involve sparks flying out because that's too scary, and instead everything should be as easy as using crayons. That'd just be silly. At some point in the mastery ladder, you will run into established tools and you just have to learn how to use them. There's certainly an argument to be made about how rough the ground is when you've veered off the beaten path, but if we were to make a road analogy, while something like setting up a M1 assembler under linux might be way out in the weeds, installing node.js is at worst akin to driving in from out of town. [0] https://www.apachefriends.org/index.html https://www.apachefriends.org/index.html
- ozim 6y agoWell have you tried to get a job as a software developer? It is 1000x harder and if you don't know what the PATH is, you are not passing. To be hired as a developer you have to know 1000x more, small and not related in any way details. Now we can start talking about gate keeping, because doing some side project might be hard but there is still a lot of "low code" stuff that you can do. Setup a blog? Go configure wordpress. If someone wants to be a salaried software developer issues like in this blog post are going to finish his career before it has even started. I understand that author might be annoyed - but understand how people who are making living out of it are feeling when they are denied job opportunity because they did not know that one trick that interviewer knew...
- arh68 6y agoYou know, I largely agree with the author, I do feel sympathetic. I kinda feel a, idk, lack of sympathy in this thread. Of course you have to learn the machine in front of you, but would you ever have to set $PATH on an iPad? If perhaps I could program Fortran on an iPad, would I really benefit from having the history, the context/history/knowledge of knowing what a $PATH is? Maybe. I doubt it. Knowing /bin from /usr/bin from /sbin from putting . first or last, do you know for fact which $PATH cron/crontab will use? &c &c. Knowing if .bash_profile runs, or .bashrc, or .profile, knowing exactly when they run.. I have not found it fun. I think you have to admit, most people anyways, that you're ignorant of a lot of systems that came before you. If I gave you an IBM 704, would it be "easy" to program? I would not enjoy that, I think we'd all rather write Fortran on a MacBook. (ask yourself why?) I have replaced an alternator, but I just learned older cars had "generators" and they're quite distinct (though very similar). I don't know much about "points" or distributors, but I've replaced ignition coils & spark plugs, I feel like I basically understand the gist of that. But I don't know what came before it. I wouldn't fault a mechanic for not knowing points, but an automotive engineer should. To me, this is where perfectly good wrenching (programming, coding, per se) on its own might be unlikely to advance the state of the art (in software/automotive design). Maybe: To be a really good technician, you should focus narrowly on the hardware/software you service, and not necessarily what came before. But to be a really good engineer/developer/designer, you should focus broadly on everything, to as much depth as you can. Ideally, why not both? I learned HTML in notepad, then looked for game makers, played with Winamp visualization language, anything that was easily programmable. Did y'all just go straight to writing Rust in Vim?
- luord 6y agoConversely, I wish that the nodejs command line debugger were nicer to use. I can get it working—usually after a lot of crying and wishing I weren't too lazy to try to improve it myself and contribute such improvements—and after I do, it's actually pretty fulfilling to use the clunky, limited capabilities it offers. It could be a lot further ahead, or at least as good as pdb (which isn't precisely the bee's knees, but usually gets the job done), but alas, seems like most developers prefer to use the browser for debugging, so that gets a lot more attention. Well, I'll keep using it, dragging it along kicking and screaming... until it's deprecated or improved, I guess.
- ba1uev 6y agoI am currently working on something similar to what the OP wants! NodeSnippets – a cross-platform snippet manager with a Node.js playground. It is in the final stage of development, so if you are curious about it, please leave your email on website below and I'll notify you when the app is available. https://nodesnippets.com https://nodesnippets.com