Live data from Hacker News

The Era of Visual Studio Code

blog.robenkleene.com

641–650 of 698 posts

Re: The Era of Visual Studio Code

#641

Earlier quoted context omitted.

I found (on a team with a mix of VSC and WebStorm users) that VSCode had better overall support for jump to definition and refactorings: the refactorings, in particular, were more accurate and were less likely to change irrelevant locations or leave usages unchanged. Also, at the time, prettier integrated into VSC better: that may have changed since. (This is mostly for Javascript: Typescript is more Java-like, so In…

> (This is mostly for Javascript: Typescript is more Java-like, so IntelliJ's tooling may be better there.) What? MS made TS, VS code is written in TS but somehow when it comes to TS, VS code doesn't work as good as JS?

I don’t know, I don’t really use or like Typescript. But, the reason I think IntelliJ may do better with Typescript is just that TS has a Java-like type system, so IntelliJ’s Design as a Java IDE may end up being an advantage.

Re: The Era of Visual Studio Code

#642
post #238

Earlier quoted context omitted.

Fancy IDEs are lubricants for high-friction languages. If a language is already low-friction, there won't be much benefit to be gained from an IDE, as even a plain text editor will already get you near to optimal productivity in said language. Personally, I'd rather use a plain-old "code editor" (with at most syntax highlighting, but no snippets, let alone autocomplete), in part because doing so will actively steer m…

> Imagine if there was a hammer that was so badly-balanced that—despite being not too hard to lift—you needed to be wearing a powered exoskeleton to accurately hold and swing it. Ah, like a jackhammer? One of those huge ones attached to a digger they use to break open the roads? It’s a right-tool-for-the-job kind of thing. Some roads can be mended with a shovel. Some need a jackhammer. If you limit your development t…

A jackhammer is like a codegen tool, or maybe a code formatter: it “writes” or “edits” a lot of code for you, quickly, but it’s not doing programming per se. You can’t use a jackhammer to put together the pieces of a lacquered cigar box, faster. You can’t use a jackhammer to build much of anything, really.

(But I should note that a jackhammer also doesn’t required a powered exoskeleton to wield. The power is instead “built into” the jackhammer itself. Less like an IDE; more like a batch command-line tool. I’ve got nothing against batch command-line tools! But their presence is usually orthogonal to the design quality of a language, so they’re kind of irrelevant here.)

Back to the point: programming is something human minds do. Not by holding the whole codebase in your head at once; but by loading and unloading parts from your mind, where at any given time you need a useful amount of mental-model loaded at once in order to see your way through to changing it. (This is why structured programming using macro-assemblers was a revolution in productivity: modules, functions, and block-statements are intuitive units to be mentally loaded/unloaded as a whole, freeing programmers from needing to keep an unbounded mental buffer of JMP spaghetti.)

The more high-friction the language, the less of it can fit in your mental buffer at a time, and so the more “cold lookups” your mind will suffer, where you need to look something up about the codebase (likely evicting something else in the process.)

Consider a process running on a computer without enough memory to keep the entire process’s hot state loaded into said memory at a time. The result is swapping: a slow, high-overhead process of constantly reloading state from disk and evicting other state in the process.

On computers, we can fix swapping by adding more memory—enough to comfortably hold the hot state. But human minds can’t just be upgraded like that. Rather than making our memories bigger, we have to make the state smaller — to pack it more tightly and efficiently into our memory. A low-friction language is one that packs better.

Using an IDE to paper over the problems of a high-friction language, is like seeing a computer system that’s swapping, and “fixing” it by replacing its slow HDD storage with fast RAIDed NVMe storage. Sure, performance increases. But the program is still doing something stupid — a bunch of needless swaps-to-disk. It’s just doing them quickly. The money that had been spent on that RAIDed NVMe storage, could have been much-better spent on just adding more RAM to the system.

And the effort that a human goes to to learn an IDE, could have been much-better spent on learning a language the mental model of which packs better into the human mind.

Re: The Era of Visual Studio Code

#643
post #550

Earlier quoted context omitted.

THIS ! As a "professional" you owe it to yourself, to spend some time and actually learn you tools ! Not just "how to get by" but actually schedule time in your week to learn about the tool ! Shortcuts etc !

Could you explain how would you go about renaming a method with a few dozen usages using VIM? (curious what's the "right" way to do this in Vim)

I spent a bit more than half of my professional career developing in Perl, on a large web application implemented across 100+ modules. All of my work was done through a terminal connected to a remote server, using vim.

When I had to rename something, it was a manual process: one terminal opened to the command line, using grep to locate all of the instances I might want to rename. From there I could use sed or perl on the command line to do the renaming, or I could open individual files in vim. Once in vim, I could use a global search and replace command, or search for each instance and replace manually or with a macro or . command.

Slower than an IDE? Absolutely. But it never changed something I didn't intend to change, and the process taught me the value of good naming conventions. I never felt it was a hassle, and I became very good at refactoring without breaking things.

Today, I use Visual Studio to develop in C#, Javascript, and sometimes Typescript. The C# refactoring tools are great, and I've learned to trust them, though my naming convention habits are still useful when it comes to refactoring names in comments. Javascript, and to a large extent Typescript, generally require my old manual search and replace process. And whenever I do any refactoring, I always have a separate commit for it, which I carefully review to make sure the tools didn't do anything unexpected.

Re: The Era of Visual Studio Code

#644
post #205

Earlier quoted context omitted.

The difference between VSCode and Emacs is the difference between an extensible text editor, and an editor that was designed to be extended, molded, and shaped as you work. At any time within Emacs, you can evaluate Lisp code to extend or modify its functionality. What's more, the always-on presence of Lisp turns Emacs into a computing environment with strong editing primitives, rather than a text editor with stuff b…

I'd like to hear more about how you use Emacs as a "super-shell". Do you avoid shell scripts entirely in favor of Emacs Lisp? You mentioned network connections - do you actually do scripting with Elisp's networking primitives? I've long felt that this was an obvious and good use of Emacs - as a central coordination point for the entirety of one's computational life, with everything manipulated programmatically from a…

> I'd like to hear more about how you use Emacs as a "super-shell". Do you avoid shell scripts entirely in favor of Emacs Lisp?

No. But I do use Emacs Lisp to automate certain tasks and then wrap them up in an Emacs interface -- like highlighting some JSON to submit to an API endpoint, or using ivy to select a Docker container to start or stop.

> You mentioned network connections - do you actually do scripting with Elisp's networking primitives?

Emacs provides an OOTB way to hit API endpoints in the form of 'request'. So it's not just the networking primitives, but the utilities built on those primitives that Emacs comes with.

> there are many ways Elisp could improve to make this kind of usage easier.

Emacs Lisp has had two major warts: speed, and the lack of lexical scoping and CL-like constructs. The latter is largely addressed. The former is being worked on with efforts like gccemacs.

Re: The Era of Visual Studio Code

#645
post #82

VS Code, the text editor, is a trojan horse. Microsoft is selling you into the IDE, in small portions. This is similar to the IBM approach with JAVA last decade(s?). You install a "text editor" for simple things, like code completion. Before you realize you don't even know which compiler you are using or where it came from. You just press F5 and look at convenient break points. And somehow it only runs right on Azure…

I'm legit confused on what you're trying to say. Are you saying tech stacks are a bad thing? Or that corporate investment or connection to a tech stack is a bad thing? What's your proposed solution or alternative? One thing I _think_ you're saying that I do find important: It's crucial to have experience in more than one ecosystem and tech stack, as you learn a lot from seeing communities reinvent the wheel and not l…

I am saying opaque, closed and proprietary tech stacks are the danger. See the other reply for a better discussion on what is happening. Basically Microsoft* is very well known for taking open source projects, extending them a little in a nice package, and then silently moving all the code to a proprietary closed solution that later on only works on windows or their platforms.

\* microsoft is well known for it, but Google does it a lot too.

Re: The Era of Visual Studio Code

#646

VS Code is really meant for front-end development. I wouldn't want to use it for anything I compile or debug. I'd use IntelliJ for Java/Kotlin, Visual Studio for C#, F#, Windows apps. As with anything else in software development, it depends on the use case. I'm still partial to Visual Studio and for text I use Notepad++. I used to use UltraEdit, which has some features that were extraordinary (column editing). I've…

Have you been able to replace Notepad++ with UltraEdit? The column mode is superb. Also the way to remove trailing spaces ALT T G. etc.

My text only use cases have dwindled so I really don’t use either that much. I do have a lifetime license for ultraedit when I need it.

Re: The Era of Visual Studio Code

#647
Hmmm, this article seems like a very Mac centered view of text editor history.

I was using jEdit long before TextMate was a thing and it had extensions and language customizations as well. If I remember correctly, TextMate mainly became popular because of all the Rails and Django developers promoting it at the same time developers were switching to Macs.

Re: The Era of Visual Studio Code

#648

Earlier quoted context omitted.

My experience of IntelliJ is that it looks nice but it is very complex and offers little compared to Eclipse. For professional reasons I had to learn Eclipse, and now I see that IntelliJ gives a more polished product. But when I need to relearn all that I had with Eclipse, I don't see the point.

IMO Eclipse is dying. Its new release cycle is pain because it fixes bugs only on quarter releases, they don't release patch releases even if very problematic. I encountered a few bugs.

That is the official schedule, but you still can run the "update" option and get changes between official updates.

Re: The Era of Visual Studio Code

#650

Hmmm, this article seems like a very Mac centered view of text editor history. I was using jEdit long before TextMate was a thing and it had extensions and language customizations as well. If I remember correctly, TextMate mainly became popular because of all the Rails and Django developers promoting it at the same time developers were switching to Macs.

This is a valid criticism.

I tried to be careful with my language to not imply things were technically the first, but to describe a lineage. E.g., Sublime Text was clearly at least partly based on TextMate (lifting some technologies, like snippets and language grammars, verbatim), and Atom was so much based on Sublime Text that it's initial design could fairly be called a knockoff.

I think that the major players that lead to VS Code are TextMate, Sublime Text, and Atom, but I'll be the first to admit there's a healthy amount of subjective judgement there. And just me drawing on things I'm familiar with (e.g., the decision to focus on BBEdit, Vim, and Emacs as the earlier examples is simply because I know those editors pretty well). One thing I don't know much about is what TextMate's influences actually are, perhaps jEdit fits into the story there? I'm not sure.

In any event, I appreciate you pointing out these features in jEdit, so far that's the earliest example of a plugin system and an integrated plugin manager that I'm aware of.

Post reply on HN