Live data from Hacker News

Reasons To Give The Vim Text Editor A Chance

makeuseof.com

51–60 of 68 posts

Re: Reasons To Give The Vim Text Editor A Chance

#51
post #7

Earlier quoted context omitted.

Most people that use vim also don't use graphical debuggers. I use the "print" statement.

Someday, you'll get to work in a language that has a good REPL, and you'll never want to go back to printing. :)

I'm sorry, but this is condescending and simply false, even with the smiley face. I use output for inspection in Perl, Scheme, Javascript, and for (what are in my world) good reasons. The print statement usually doesn't influence the running program in any way. That means no matter who wrote the interpreter/compiler, the debugger, or whatnot, the printing won't have much influence on the program. But I've heard "Why is this bug only showing up in the debugger?" more than once in my time.

Re: Reasons To Give The Vim Text Editor A Chance

#52

Just last week I was about to start learning Vim, but after perusing the shortcut list I decided I could do better, so I rolled my own. Basically it's just a multi-modal keystroke catcher/dispatcher running transparently in the background. The upshot is that most of the commands work transparently in my IDE, in notepad, and even this little textbox I'm typing in right now! Unfortunately, the original point was to inc…

"Basically it's just a multi-modal keystroke catcher/dispatcher running transparently in the background. The upshot is that most of the commands work transparently in my IDE, in notepad, and even this little textbox I'm typing in right now!"

This sounds very interesting.

I've long wanted vim integration with Opera, so I'm not stuck with its relatively primitive editing features when I'm filling out a text input box. Unfortunately, vim does not integrate with other apps very easily.[1] So something along the lines you're working on would be very welcome, even if it is primitive compared to vim.

One thing I hope it can do is have an easy way to activate and deactivate it, so it doesn't interfere with editing in vim itself.

[1] http://www.freehackers.org/VimIntegration

Re: Reasons To Give The Vim Text Editor A Chance

#53

I've been tooling around with emacs, having plopped down vimpulse and viper on it. I get slime for clojure, the power of elisp for modifications and so on, as well as my preferred editing style, which is modal. It's not for everyone, but it works for me. It helps that my life isn't terribly busy, and I enjoy taking the time to make everything work together. Of course, caps rebinding is a must for either. It's been fu…

When I started learning Lisp, I tried using Emacs with viper and vimpulse.

Although it did make using Emacs less painful, it still required way too much knowledge of Emacs to use effectively and configure than I had time to dedicate to learning it.

Emacs+SLIME+vimpulse+viper might be good enough for someone who already knows Emacs or who hasn't invested a lot of time in learning vim. But for someone fluent in vim, I just don't think huge time investment in learning Emacs well is worth it.

Re: Reasons To Give The Vim Text Editor A Chance

#54
post #50
post #14

Earlier quoted context omitted.

Spewing print statements all over a piece of code is as bad as any other shotgun debugging technique. The reason breakpoints and watches were invented were to reduce reliance on bad ways of doing things.

Nobody is putting print statements all over the place. At least I don't do. I set it where I want to inspect values. If you want a separate piece of software for that, more power to you, but please don't tell me my nails must be crooked because I use a different hammer than you.

This assumes you know ahead of time exactly what values must be inspected to solve the problem. This is frequently very much not the case, especially if you're ever working on somebody else's code.

So, yes, your nails may be straight, but your chosen (regressive) technique leaves you with no way to know if they're straight and with only the option of pounding harder and harder if the nail doesn't go in the first time. Enjoy!

Re: Reasons To Give The Vim Text Editor A Chance

#55
post #54
post #50

Earlier quoted context omitted.

Nobody is putting print statements all over the place. At least I don't do. I set it where I want to inspect values. If you want a separate piece of software for that, more power to you, but please don't tell me my nails must be crooked because I use a different hammer than you.

This assumes you know ahead of time exactly what values must be inspected to solve the problem. This is frequently very much not the case, especially if you're ever working on somebody else's code. So, yes, your nails may be straight, but your chosen (regressive) technique leaves you with no way to know if they're straight and with only the option of pounding harder and harder if the nail doesn't go in the first time…

Of course I know, that's why I read the code for. Understanding the code base is my job. Using print statements to exclude factors which could contribute to the problem is not different from using a debugger to do the same.

If you debug without knowing what you're debugging and just looking for getting it running, it sounds like you're the one doing the shotgun-programming/debugging, separate debugger or not.

Re: Reasons To Give The Vim Text Editor A Chance

#56
post #55
post #54

Earlier quoted context omitted.

This assumes you know ahead of time exactly what values must be inspected to solve the problem. This is frequently very much not the case, especially if you're ever working on somebody else's code. So, yes, your nails may be straight, but your chosen (regressive) technique leaves you with no way to know if they're straight and with only the option of pounding harder and harder if the nail doesn't go in the first time…

Of course I know, that's why I read the code for. Understanding the code base is my job. Using print statements to exclude factors which could contribute to the problem is not different from using a debugger to do the same. If you debug without knowing what you're debugging and just looking for getting it running, it sounds like you're the one doing the shotgun-programming/debugging, separate debugger or not.

I'm not sure what code you write or what it's for, but in the real world, sometimes we deal with buggy, archaic and downright bizarre code that we didn't write, and sometimes we have deadlines.

So, yes. I use a debugger, so that I can spend some time at home too. Because as nice as the office is, it's summertime, and there's beer in my fridge.

Back when I was seventeen and staying up all night writing a video game engine though, I definitely would have been onboard with the whole print debugging idea.

Re: Reasons To Give The Vim Text Editor A Chance

#57
post #55

Earlier quoted context omitted.

Of course I know, that's why I read the code for. Understanding the code base is my job. Using print statements to exclude factors which could contribute to the problem is not different from using a debugger to do the same. If you debug without knowing what you're debugging and just looking for getting it running, it sounds like you're the one doing the shotgun-programming/debugging, separate debugger or not.

I'm not sure what code you write or what it's for, but in the real world, sometimes we deal with buggy, archaic and downright bizarre code that we didn't write, and sometimes we have deadlines. So, yes. I use a debugger, so that I can spend some time at home too. Because as nice as the office is, it's summertime, and there's beer in my fridge. Back when I was seventeen and staying up all night writing a video game en…

Nice ad hominem, doesn't work though. I'm 30 and have been developing for 14 years now. And yes, it's real world. And it's mostly Perl, so I do know about "buggy, archaic and downright bizarre code." I'm still more productive with print statements than having a separate system poke around in the applications.

But again, I must be wrong because I'm doing it different, right? So the only option can be that I'm too young, don't know what I'm talking about, or just lack experience in general, right? There couldn't be a possible way that someone else uses a different solution that works just as fine for them, right?

Considering that I never said "Don't use a debugger." only that "I don't need a debugger", you guys seem pretty worked up considering that you're claiming you're the more relaxed one.

It's a tool, don't take it personally that I have a different method that works. It doesn't invalidate yours. At least not in my view.

Re: Reasons To Give The Vim Text Editor A Chance

#58
post #55

Earlier quoted context omitted.

Of course I know, that's why I read the code for. Understanding the code base is my job. Using print statements to exclude factors which could contribute to the problem is not different from using a debugger to do the same. If you debug without knowing what you're debugging and just looking for getting it running, it sounds like you're the one doing the shotgun-programming/debugging, separate debugger or not.

I'm not sure what code you write or what it's for, but in the real world, sometimes we deal with buggy, archaic and downright bizarre code that we didn't write, and sometimes we have deadlines. So, yes. I use a debugger, so that I can spend some time at home too. Because as nice as the office is, it's summertime, and there's beer in my fridge. Back when I was seventeen and staying up all night writing a video game en…

Honest question (as I avoid Perl like the plague) - is there an introspective debugger on par with Visual Studio's in Perl-land?

Because if you're leaning on print statements in absence of appropriate tooling, I can understand that. When the tooling is available, however, I am skeptical of claims as to enhanced productivity or any other positivity coming from it.

Re: Reasons To Give The Vim Text Editor A Chance

#59
post #58

Earlier quoted context omitted.

I'm not sure what code you write or what it's for, but in the real world, sometimes we deal with buggy, archaic and downright bizarre code that we didn't write, and sometimes we have deadlines. So, yes. I use a debugger, so that I can spend some time at home too. Because as nice as the office is, it's summertime, and there's beer in my fridge. Back when I was seventeen and staying up all night writing a video game en…

Honest question (as I avoid Perl like the plague) - is there an introspective debugger on par with Visual Studio's in Perl-land? Because if you're leaning on print statements in absence of appropriate tooling, I can understand that. When the tooling is available, however, I am skeptical of claims as to enhanced productivity or any other positivity coming from it.

I never said I have enhanced productivity over using a debugger. I said I have no worse productivity.

There's a debugger, there's a REPL, and in general lots of tools which I use if I see the need (the NYTProf profiler would be one). Using a debugger in this scenario (with an interpreted language) just doesn't give me any enhanced productivity over what I'm doing now.

Re: Reasons To Give The Vim Text Editor A Chance

#60

Earlier quoted context omitted.

Someday, you'll get to work in a language that has a good REPL, and you'll never want to go back to printing. :)

Someday, you'll want to run your code more than once, and you'll write tests instead of typing them into the REPL.

wait.. what? are you scanning stdout with your tests?
Post reply on HN