News for hackers. Stuff that matters.
Re:Ask HN: Should I invest time on mastering the command lin... by FreezerburnV on Sunday December 25, 2016 @09:25AM (#13254168)
My recommendation is to start with an IDE like what Jetbrains offers, (assuming you're working in a language they support) with a promise to yourself to learn command line tools as well/a bit later. I say this because the productivity benefits from a good IDE are incredibly high, especially when working with something like Java. But like at least one other commenter has said, it's highly useful to know how things are actually working on the command line, or how to run a few quick commands to help you find something your IDE might not be able to find easily, etc. Both are useful tools, but potentially different use cases. (I have a co-worked who programs Java in VIM, so it's not like you can't theoretically mold them to be useful for any case, but it's going to take a lot more work and time to get to a place that likely is not going to offer as many niceties as an IDE will out of the box, like powerful refactoring or debugging)

But make sure that promise to yourself to learn the command line does not go forgotten! It IS important, and knowing how to use something like VIM, even at only a basic level, WILL help you.

Re:Ask HN: Should I invest time on mastering the command lin... by skdotdan on Sunday December 25, 2016 @09:36AM (#13254200)
I really appreciate your recommendation.

So, I should definitely learn both, but start with the IDE way, because it's easier.

Re:Ask HN: Should I invest time on mastering the command lin... by wilwade on Sunday December 25, 2016 @12:52PM (#13254822)
Not just easier, but less cognitive load. You are still learning a ton about programming (we all are, but). You also hopefully have a life outside of programming. JetBrains (and others) allow you to easily learn the IDE along the way, but also can help with good practices. That is worth a lot of valuable time.
Re:Ask HN: Should I invest time on mastering the command lin... by skdotdan on Sunday December 25, 2016 @12:59PM (#13254846)
Okay. Thank you.
Re:Ask HN: Should I invest time on mastering the command lin... by jcrben on Sunday December 25, 2016 @02:38PM (#13255147)
Half of the IDE is tips called inspections. It's like having a machine pair program with you. This will get you unstuck faster and teach you good habits.
Re:Ask HN: Should I invest time on mastering the command lin... by skdotdan on Tuesday December 27, 2016 @08:15AM (#13262926)
Very true. I assume this would not be possible in, say, Emacs.
Re:Ask HN: Should I invest time on mastering the command lin... by dozzie on Sunday December 25, 2016 @09:32AM (#13254192)
> like powerful refactoring

Powerful contextual-search-and-replace. Refactoring is a deeper change than just moving things around.

Re:Ask HN: Should I invest time on mastering the command lin... by skdotdan on Sunday December 25, 2016 @09:38AM (#13254212)
Could you expand on that?

I understand that with Vim I will be able to quickly find and replace words, but I will never be able to truly refactor, because it requires powerful code analysis that only an IDE can do and a Vim plugin can't.

Re:Ask HN: Should I invest time on mastering the command lin... by dozzie on Sunday December 25, 2016 @09:46AM (#13254239)
Refactorization is a change that modifies how the internals of the code work. It often requires introducing a new pattern, change of the interface of classes or modules, or change in the program logic. Sometimes refactorization means a complete rewrite of a program segment, with preserving external interface.

What IDEs offer is just moving some bits around, the ones that can be tied mechanically together. It's nowhere near real refactorization. Handy, but not that much, if you think about your code in advance.

Re:Ask HN: Should I invest time on mastering the command lin... by nugator on Sunday December 25, 2016 @01:40PM (#13254974)
The Jetbrains IntelliJ Idea (Java) IDE has support for a lot of REAL refactoring, not sure what you mean. I'm very impressed by how much the IDE can help me with.

https://www.jetbrains.com/help/idea/2016.3/refactoring-sourc...

Re:Ask HN: Should I invest time on mastering the command lin... by dozzie on Sunday December 25, 2016 @03:00PM (#13255228)
No. Real refactoring involves changing logic of the program and making it more modular, neither of which can be done by the machine in a general case. What is behind the link you provided is just mechanically moving things around.
Re:Ask HN: Should I invest time on mastering the command lin... by nugator on Monday December 26, 2016 @12:36PM (#13259003)
Ok, perhaps we have different views of what refactoring is.

From Wikipedia [1]: "Code refactoring is the process of restructuring existing computer code—changing the factoring—without changing its external behaviour. Refactoring improves nonfunctional attributes of the software. Advantages include improved code readability and reduced complexity; these can improve source-code maintainability and create a more expressive internal architecture or object model to improve extensibility. Typically, refactoring applies a series of standardised basic micro-refactorings, each of which is (usually) a tiny change in a computer program's source code that either preserves the behaviour of the software, or at least does not modify its conformance to functional requirements."

"Many software editors and IDEs have automated refactoring support." Listed is Jetbrains IntelliJ IDEA.

The IDE can do the micro-refactorings but I agree that (at least today) there needs to be a programmer to decide which micro-refactorings should be done to improve the code.

[1] https://en.wikipedia.org/wiki/Code_refactoring

Re:Ask HN: Should I invest time on mastering the command lin... by Piskvorrr on Sunday December 25, 2016 @11:13AM (#13254517)
Indeed - but especially Jetbrains' IDEs provide fairly powerful tools to help you with this, way beyond search and replace.

In the end, you'll need to involve your brain anyway, but the IDE makes the menial work easier.

Re:Ask HN: Should I invest time on mastering the command lin... by skdotdan on Sunday December 25, 2016 @11:48AM (#13254631)
Thank you for your explanation. So, even a full IDE can't achieve true refactoring.
Re:Ask HN: Should I invest time on mastering the command lin... by nugator on Sunday December 25, 2016 @01:41PM (#13254978)
Re:Ask HN: Should I invest time on mastering the command lin... by dozzie on Sunday December 25, 2016 @02:58PM (#13255219)
It can't. Just because somebody called moving things around in a mechanical manner "refactoring", it doesn't mean it's all (or even most) there is to refactoring.
Re:Ask HN: Should I invest time on mastering the command lin... by schemathings on Monday December 26, 2016 @04:30AM (#13257615)
Look up 'ctags' and vim and the language of your choice.
Re:Ask HN: Should I invest time on mastering the command lin... by skdotdan on Tuesday December 27, 2016 @08:14AM (#13262923)
Thanks