News for hackers. Stuff that matters.
Re:Ask HN: Programs that saved you 100 hours? by opwieurposiu on Sunday April 12, 2020 @11:20PM (#22852900)
VSCode, and/or Sublime Text have probably saved me a hundred hours I would have spent waiting for Eclipse to start.
Re:Ask HN: Programs that saved you 100 hours? by murukesh_s on Monday April 13, 2020 @12:22AM (#22853158)
Couldn't agree more.. People who say Electron (on which VSCode is running) is bloated and is slow probably haven't worked on full fledged IDEs using Java.. they consume memory in Gigabytes, are slower, at least appear to be slower, despite using native UI and takes a lot longer to open.
Re:Ask HN: Programs that saved you 100 hours? by luckylion on Monday April 13, 2020 @03:29AM (#22853839)
How often do you open your IDE though?

I switched form VSCode to PHPStorm half a year ago, and while it feels a bit slower, the improvements are so unbelievable worth it for me. It does have a taste for memory, but then again, it easily saves me a lot of time each month, so just throwing RAM at it was a no-brainer for me.

Re:Ask HN: Programs that saved you 100 hours? by BrandoElFollito on Monday April 13, 2020 @03:58AM (#22853966)
I use PyCharm and tried several times to such to vscode. I forced myself to only use vscode for 10 days.

I was relieved when I switched back to PyCharm.

Vscode is nice but still quite far away from some good IDEs.

Re:Ask HN: Programs that saved you 100 hours? by tracker1 on Monday April 13, 2020 @10:16AM (#22856021)
Depends... I'll open/close a few times a day as I touch several projects. I can use VS Code for everything from db/sql, react, node and c# (.net core) projects. I also have used it for a little rust and golang.

As to the RAM, it's using around 1.2gb between vs code and the connecting server (WSL2), multiple isntances vary... but with the number of containers and VMs I'm running, I'm generally well over 16gb of use, and I have 64gb on my desktop. So even without VS Code, I have trouble on a 16gb system.

Re:Ask HN: Programs that saved you 100 hours? by luckylion on Monday April 13, 2020 @11:18AM (#22856565)
Yeah, IntelliJ-based IDEs are hungry, but even if mobile, I figure I'd just spend the extra money to get plenty of RAM, it's that good (to me at least).

I usually run 3-5 instances for different projects and it'll hover around 3gb RAM, but it appears that they share a lot of memory, closing one or opening an additional project has no visible impact.

Re:Ask HN: Programs that saved you 100 hours? by nicoburns on Monday April 13, 2020 @07:08AM (#22854760)
In my case, often several times an hour. I work across 6-10 dofferent repositories. Opening them all at once is impractical, so being able to open each of the them quickly is quite important.
Re:Ask HN: Programs that saved you 100 hours? by rhlsthrm on Monday April 13, 2020 @07:36AM (#22854906)
Have you tried multiple repositories in a VSCode workspace? It does a great job of managing multiple repos, git diffs, etc.
Re:Ask HN: Programs that saved you 100 hours? by nicoburns on Monday April 13, 2020 @07:44AM (#22854944)
The problem I have with this is it makes "Go to file" functionality a bit too broad. e.g. If I want to open `package.json` I now have to choose between 10 different files. As I often `Cmd-P`, type pa, `Enter` without even looking, this makes it considerably slower.

I also have to do a lot of context switching (e.g. to review someone else's code), and being able to have a separate set of tabs (even within the same repo) is super-useful for this.

At previous jobs with less separated out code, I have taken this approach (although with Sublime Text rather than VSCode).

Re:Ask HN: Programs that saved you 100 hours? by tracker1 on Monday April 13, 2020 @10:19AM (#22856038)
Agreed... deeply nested directory structures are also pretty painful.

Even in the mono-repos I work with, I'll generally open an editor per inner repo. Mostly ./feature/featurename/filename is as far as I have to open. Some of the C# projects are deeper though.

Re:Ask HN: Programs that saved you 100 hours? by AnIdiotOnTheNet on Monday April 13, 2020 @10:29AM (#22856132)
Or they have worked on full-fledged IDE's like VS 6, which starts up quickly and is super responsive even on period hardware.
Re:Ask HN: Programs that saved you 100 hours? by fendy3002 on Monday April 13, 2020 @06:58PM (#22861089)
Oh how the tables are turned... Coming from VS2008-2010, it's weird to see someone said Visual Studio is fast
Re:Ask HN: Programs that saved you 100 hours? by Xelbair on Tuesday April 14, 2020 @05:55AM (#22864186)
VS2019 is pretty damn good.

I use it daily for .net coding, while i use VS code for everything else.

Re:Ask HN: Programs that saved you 100 hours? by rafaelvasco on Tuesday April 14, 2020 @12:03AM (#22862654)
VS2019 is pretty fast, provided you don't use too much plugins.
Re:Ask HN: Programs that saved you 100 hours? by saagarjha on Monday April 13, 2020 @12:44AM (#22853238)
Eclipse isn't a particularly good user of Cocoa, is it?
Re:Ask HN: Programs that saved you 100 hours? by zamalek on Monday April 13, 2020 @01:44AM (#22853459)
It does something completely its own (and horrible/slow) on Windows (possibly one of the 6534 equally awful Java UI packages), so I can't imagine it does anything better with iOS.
Re:Ask HN: Programs that saved you 100 hours? by p_l on Monday April 13, 2020 @03:01AM (#22853748)
Eclipse uses SWT, which actually piggybacks on native toolkits, though I don't know if it doesn't go through some ancient version of GTK in the process.

AWT/Swing based IntelliJ manages to be much, much faster in comparison.

Re:Ask HN: Programs that saved you 100 hours? by hellofunk on Monday April 13, 2020 @03:57AM (#22853963)
I think you mean macOS.
Re:Ask HN: Programs that saved you 100 hours? by fxtentacle on Monday April 13, 2020 @07:03AM (#22854726)
That seems odd to me. I basically never close my IDE. Sure, I might put the laptop to sleep in between or disconnect from the remote desktop server, but I rarely need the 500 MB that my IDE consumes, so there's little point in every closing it.
Re:Ask HN: Programs that saved you 100 hours? by peelle on Monday April 13, 2020 @09:45PM (#22862019)
To each their own. It always fascinates me to hear about Java/.NET environments that massive. Do you only work on 1 project for months at a time? Do you not ever need to reboot into another OS? Is your laptop power efficient? Do you have a separate machine just for Gaming?

I mostly program in languages like Ruby & Perl using Vim. Even with my decked out version that has 35 plugins, and some other bells and whistles, I'm on average using 20 MB of RAM. Open/Close is near instantaneous.

Re:Ask HN: Programs that saved you 100 hours? by tracker1 on Monday April 13, 2020 @10:19AM (#22856049)
Depends on your projects... I don't like to use the same editor for ui/db/api/service that may be related.
Re:Ask HN: Programs that saved you 100 hours? by PopeDotNinja on Sunday April 12, 2020 @11:55PM (#22853045)
+1 for Sublime Text for being so darn fast.
Re:Ask HN: Programs that saved you 100 hours? by Zecc on Monday April 13, 2020 @02:42AM (#22853670)
And if you need something even lighter, something like a better Notepad is enough. Lightweight text editors are a dime a dozen, but I'm personally a fan of notepad2 / notepad2-mod / notepad3; even if they don't have tabs.

Also shout out to LINQPad, for letting me test quick snippets of C# with better visualization than Visual Studio. It's also a better alternative to Sql Server Management Studio for running SQL.

Re:Ask HN: Programs that saved you 100 hours? by athrowaway3z on Monday April 13, 2020 @02:57AM (#22853728)
I finally switched from VSCode/Sublime to Spacemacs about a year ago ( It was my 3rd try switching ).

I'm sure this saved me an additional hundred hours.

Re:Ask HN: Programs that saved you 100 hours? by save_ferris on Sunday April 12, 2020 @11:49PM (#22853020)
+1 for VSCode for its configuration portability plugin, settings sync. It’s never been so easy to sync editor changes across my machines, and I’ve only had 1 dependency issue using it in 4 years. No longer having to maintain my vim config and dependencies has been great.
Re:Ask HN: Programs that saved you 100 hours? by fbnlsr on Monday April 13, 2020 @12:52AM (#22853272)
I believe Settings Sync is going to be included in the next release of VS Code. Yay!

The amount of work Microsoft is putting in this editor is amazing. Last month we got file history, that was the last thing I needed to ditch the Git GUI I had installed.

Re:Ask HN: Programs that saved you 100 hours? by greggman3 on Monday April 13, 2020 @02:42AM (#22853669)
I use vscode but it's missing some basic code features for me. The biggest for me is probably keyboard macros, something that's been a basic feature of editors since at least the 80s. Keyboard macros in other editors has saved me 100s of hours.

https://github.com/microsoft/vscode/issues/4490

Re:Ask HN: Programs that saved you 100 hours? by jakear on Monday April 13, 2020 @02:59AM (#22853738)
Curious, what do you think of multi-cursor as a replacement for macros?

(I’m on the team)

Re:Ask HN: Programs that saved you 100 hours? by sokoloff on Monday April 13, 2020 @06:22AM (#22854530)
As an emacs user, I view multi-cursor as suitable for only a subset of macro usage. Macros are inspectable, editable, savable, able to be applied across files, easily used a variable N times.

My typical pattern is something like: define it, try it, adjust it, then apply variable times (including “infinite until error”), maybe save 1% of them. That often takes less time to do than it just took me to describe.

I use macros probably 25x for every one time I reach for multi-cursors, though to be fair, if I came the other way, I’d probably use multi-cursor more often than currently. (I used macros for 30 years before getting multi-cursors, so if both can do the job, I’ll use a macro.)

Re:Ask HN: Programs that saved you 100 hours? by jakear on Monday April 13, 2020 @03:19PM (#22859070)
> Macros are inspectable, editable, savable, able to be applied across files, easily used a variable N times.

In my experience with multicursor, I don't need to be able to "inspect" the operation as the act of typing it is inspection in and of itself. Sure they aren't saveable and thus aren't editable (but you admit this is a very rare use case - I can't recall needing that, ofc you often don't know when to want what you don't have).

As for applying across a number of files, I recently added an in-editor rendering of workspace search results to VS Code, and I've created an extension that can apply edits to those search results back to the original files. This allows for performing multicursor edits across many files.

As for using variable numbers of times, this is again quite trivial with multicursor. I simply select all the instances I need (either all in one go or iteratively), and go from there. I admit there is an art to selecting the right text such that iterative selection works with a single keypress, but once you get the hang of it it becomes pretty natural. (Unless you mean "apply this N times", which again I'm not sure I've ever been in want of)

Re:Ask HN: Programs that saved you 100 hours? by sokoloff on Tuesday April 14, 2020 @07:21AM (#22864676)
The question might boil down to use case. If the use case is “in this file, change all spans with class foo to divs with class bar once ever”, probably both tools will work.

If the use case is “every day, download this file from a server and process it using pre-defined text editing commands”, multi-cursor doesn’t help you in any way that I can see.

I admit there’s a huge overlap in use, but when someone asks for macros and a product person says “how about multi-cursor instead?” I think it’s fair to raise the cases where someone asking for macros might actually want macros.

Re:Ask HN: Programs that saved you 100 hours? by 978e4721a on Monday April 13, 2020 @03:11AM (#22853772)
Multicurors aren't replacement for macros in the same sense as loops aren't replacement for recursion.
Re:Ask HN: Programs that saved you 100 hours? by ikurei on Monday April 13, 2020 @05:34AM (#22854335)
That's snappy but not informative at all. What do you miss in multicursor that macros give you?

I also prefer vim's macros to multicursors, but I think it ammounts to nothing more than habit and preference.

Macros in Vim are going to be much more powerful, with movement commands and selection commands giving yo a more flexible system... I think? Hard to be objective after so many years of Vim.

Re:Ask HN: Programs that saved you 100 hours? by ethelward on Monday April 13, 2020 @06:42AM (#22854616)
> What do you miss in multicursor that macros give you?

Not OP, but to take a recent example (although it was in Emacs, I'm pretty sure it would work in any advanced editor), I had a macro select the second half of the open file and pipe it through sort and uniq to replace it with each unique line and their number of occurences. That's not doable with multi-cursors; their use cases intersect but don't overlap with macros ones.

Re:Ask HN: Programs that saved you 100 hours? by pasabagi on Wednesday April 15, 2020 @02:37AM (#22875187)
Honest question: when are loops not replacement for recursion?

My (admittedly naive) mental model of recursion is basically a loop where you bring your entire stack frame with you (or less, in the case of tail recursion).

Re:Ask HN: Programs that saved you 100 hours? by williamdclt on Monday April 13, 2020 @07:05AM (#22854743)
There's a `macros` extension that's pretty good: https://marketplace.visualstudio.com/items?itemName=geddski....
Re:Ask HN: Programs that saved you 100 hours? by tracker1 on Monday April 13, 2020 @10:22AM (#22856077)
Yeah, macros might be cool... I've gotten by with mostly using the regex options in string replace, etc... snippets have helped a little, but don't use them much, sometimes they annoy me when they pop in.
Re:Ask HN: Programs that saved you 100 hours? by tracker1 on Monday April 13, 2020 @10:24AM (#22856087)
Killer features are directory view, integrated terminal, regexp for find/replace...

Lately, I'd add the remote ssh and wsl extensions have been insanely useful, but starting code from inside wsl has gotten sluggish since the last vs code update.

Re:Ask HN: Programs that saved you 100 hours? by g105b on Friday April 17, 2020 @10:55AM (#22899479)
It is not fair to compare VSCode/Sublime Text with an IDE. They are very fast at opening, agreed, but they the features that an IDE provide (intelligent code completion, jump to definition, database-aware autocompletion, ANY sort of refactoring capability) easily save me hundreds and hundreds of hours.