Paradox of the perfect code editor
web.eecs.utk.edu
web.eecs.utk.edu
One person explains in the future, there'll be no need for programmers since AI will be able to generate the code which fulfills the program spec; the programmer replies "and what would you call someone who instructs the computer what program to write?".
Squarespace is actually a good example; someone still has to write all the nifty widgets and figure out how they'll work together for a pleasing experience. If putting an attractive visual layer on top of code was all it took, then Smalltalk would have won decades ago and everyone would program.
The main barrier to "no code" and "everyone can program" is still the mode of thought, not the mode of representation.
This has parallels in artificial intelligence, where as soon as a problem is solvable by a computer, solving the problem no longer counts as "AI" (chess, natural language processing, even sentiment analysis!). Similarly, as soon as a problem is made easy and accessible to non-algorithmic thinks, programmer move on to the next thing that requires that mode of thought. Maybe we'll exhaust the problem space of potential programs someday, but I don't see any evidence for it.
> It's thinking algorithmically in enough detail, with edge cases, fallbacks, error handling, etc, that most people struggle with.
And this is why we need better languages, not better editors.Python was the last real language to bring prepackaged solutions that are easy to use and cover (some) edge cases to reduce development overhead. Adding a use-specific framework, such as Django, often takes care of the remaining 80%.
I'd love to see a new language or framework that makes adding new features - not features that the framework devs created but rather real new features - easy to code would be a boon to development.
In fact, by providing an entry point into an online presence, squarespace and other click-to-get-online products may actually increase the pool of businesses interested in migrating to a specialized, purpose-written website as they expand past the capabilities that squarespace offer them.
So yes, easy stuff will be automated, as in many other industries, but this will create new possibilities that only specialized developers will be able to pursue.
Nowadays I can say for(obj in array) and the AI generates the necessary code for me!
Common lisp's REPL come closest to mind. Erlang's hot swapping is the dopplerganger in deployment world. Bret Victor's inventing by principle is a good analogue to UI programming imo. Imagine editing CSS in browser's inspector, and have the change reflected back to source code. No more switching between editor(IDE) and runtime(browser). I heard smalltalk provide similar development experience, but I had no experience on it yet
https://github.com/ziglang/zig/issues/68
That issue has some links to people doing it in C/C++.
And then there's this crate https://docs.rs/live-reload/0.2.0/live_reload/ which works on the same principles as the article above, and is based on C code (i.e. the same approach works for C). On the documentation there's links to "Interactive Programming in C" http://nullprogram.com/blog/2014/12/23/ and "Loading Game Code Dynamically" https://www.youtube.com/watch?v=WMSBRk5WG58 (this video by Casey Muratori is btw where I first heard about this technique)
There's a bunch of other libraries that work the same way, and some example code that can do this. I can find https://github.com/irh/rust-hot-reloading and https://github.com/porglezomp-misc/live-reloading-rs and https://github.com/xixixao/hot-reload-rs and https://github.com/emoon/dynamic_reload
And there's https://github.com/draivin/rust-hotswap which has a nice API but uses a deprecated rustc internal API and doesn't build anymore.
Anyway there was a library that did this in a more elegant way and I just can't find it (perhaps it was rust-hotswap?).
e.g.
- Smalltalk, https://squeak.org/
- Haskell, https://ihp.digitallyinduced.com/ for database schema
- In python, I use a vim plugin, where you can run highlighter code by pressing Ctrl+R. I forgot the plugin name
- If you use erlang, there is no need for the kubernetes
- Tiddlywiki, where the result of your editing changes the source code directly
In general I think a good development environment is close to either quine or isomorphism (code is data, data is code)For generated CSS I had Emacs configured to generate the CSS on change and automatically update the "cache buster" token (just to be safe). Clojure(Script) with figwheel takes care of updating the webapp (in dev) on every change in the CSS dir. Really no issue there: everything is instant.
There are browser addons that auto-reload a page making your changes visible every few seconds. You can tweak them to reload every 5 seconds or even every minute, depending on how fast you're building the site.
Perhaps you’re functionally fixed on the idea an editor has to be interacted with like a word processor?
It’s all electron state. The boundaries are just UI design.
There are drag and drop web app building tools that let you fine tune the code in an inspector window, and transpile to whatever.
Perhaps what you need is to simply change how you work.
Most contemporary business app building could be visual; I mean look at what experiences Unreal enables with their blueprints. If that coding model can result in AAA games, I don’t see why it can’t replace a whole lot of website building effort.
This stuff is possible. It’s just you have to work for the aristocrats or else.
i cant believe i never thought to just save the source after editing the page the way i wanted in the window
This happens to me all the time. Every day really, whenever I type `npm install` I'm just delighted by the results. Those node libraries just make my programming experience so smooth and carefree, just like Apple products.
best definition of luck yet encountered.
Emacs can be found all over the proposed spectrum here, because there's so many people have made it their perfect editor for their current circumstances, and shared the tweaks that made it so for them.
I'm sure the other "favorite editors" have similar, i'm just not speaking of them because I'm ignorant of how often they nail "perfect", myself.
As usual the "paradox" is in how we look at it, not the cold realities.
That actually isn’t relevant here. This is a thought experiment about which heuristic should be used to determine the perfect editor. How to think about what the perfect editor even is.
Maybe you grip your knife one way and I another, but we may both agree that the perfect knife is the one that gets our cutting done the most quickly, or with the most precision, etc
Someone else's perfect code editor will be the flip side of that: an easy to use (perhaps via mouse) file tree, autocomplete with snippets, virtual text, etc.
Someone else will be in between.
You get the point, each option is not more or less effective as it comes down to the individual.
But them if you have such AI, every job would be obsolete.
Kate is absolutely terrific, it sits perfectly between VIM in a terminal and JetBrains for an entire project, whether I'm editing code, personal notes, or prose.
It also expects interoperability from other tools - so there's no file load dialog or project files view because all you do is load up your operating system's file manager and drag and drop.
It, with other components, build up into what one might call an IDE and it's up to me to construct my custom tool from all the bits including the editor.
If you want to interrogate the issue, you need strong upfront definitions: what is a code editor? I'd assume the thing that edits the code, but the problem is created by shifting the scope to "everything related to software development".
That's either out-of-scope for the problem, or you need to define the problem better.
There are also a few dubious distinctions e.g. what are the boundaries of the "editor" - you could create a singe app that spawned two windows, one for docs the other for code; or use two different apps with exactly the same UI - from UX perspective the technical distinctions aren't relevant.
The perfect code editor is speech-to-text plus AI, with a thick Vaporwarium™ layer that listens to the executive's stream of consciousness and spits out performant, sticky, yet bug-free apps in near real-time.
- You want to spend 100% of your coding time in the editor
- You want your coding time to make up as little as possible (ideally 0%) of your total work time
Given that, the perfect code editor is obviously one that makes coding so easy and quick that it hardly takes any time and one that you do not have to leave for external information whenever you do use it.
i don't think i even want to elaborate