zlacker

[parent] [thread] 14 comments
1. edwinn+(OP)[view] [source] 2015-12-12 15:15:58
I'm guessing you're probably not writing unit test or use code coverage plugins or running static code analysis to provide feedback incrementally and quickly?
replies(3): >>aarone+72 >>workit+e2 >>JustSo+O8
2. aarone+72[view] [source] 2015-12-12 15:57:42
>>edwinn+(OP)
What has any of those things to do with someone's choice of editor?
replies(1): >>edwinn+t6
3. workit+e2[view] [source] 2015-12-12 15:59:54
>>edwinn+(OP)
Thinking the same thing, I use vi for short scripts all the time but can't imagine doing anything more complex than that without the power of an IDE to assist with or even do the grunt work for me.
replies(2): >>JustSo+Z8 >>Robopr+wd
◧◩
4. edwinn+t6[view] [source] [discussion] 2015-12-12 17:17:28
>>aarone+72
I take it you've never used those IDE with the plugins to support the workflow I mentioned above...
replies(2): >>merak1+N6 >>aarone+k7
◧◩◪
5. merak1+N6[view] [source] [discussion] 2015-12-12 17:24:06
>>edwinn+t6
I take it you have never used vim or sublime with plugins that can do the same thing.

BTW, I've used both. No need for a snarky response to me as well

replies(1): >>edwinn+xE
◧◩◪
6. aarone+k7[view] [source] [discussion] 2015-12-12 17:37:20
>>edwinn+t6
Well, it depends on what you mean, I suppose. I've integrated Emacs with tools like those, so that I can (for example) get linting feedback on code in real time, or jump to locations from a unit test failure report. But I've never written unit tests, or used coverage or static analysis tools, that depended on Emacs, or indeed on any other editor. I've never even seen that kind of tight coupling, much less perpetrated it myself. I'm not sure whether that's what you're talking about, or whether it only sounds like that's what you're talking about, but I hope it's the latter.
replies(1): >>edwinn+rE
7. JustSo+O8[view] [source] 2015-12-12 18:06:35
>>edwinn+(OP)
Why wouldn't I be able to?

And the whole point of me switching to vi is so I slow down a bit and get it correct.

replies(1): >>edwinn+zE
◧◩
8. JustSo+Z8[view] [source] [discussion] 2015-12-12 18:09:43
>>workit+e2
I do let the idea do the grunt work for me. But when I get down to writing the important code, I slow down and reason about it without an IDE.

I generally don't need an ide to keep popping up telling me what to type. I know what I'm doing.

◧◩
9. Robopr+wd[view] [source] [discussion] 2015-12-12 19:24:52
>>workit+e2
I appreciate the cross referencing / browsing / documentation capabilities of a good IDE. (especially if it has a vim plugin so my fingers know what to do)

If I uncharitably assume that grunt work means "redundant boilerplate", that sounds like more of a language issue than a tool issue. This said as a Java programmer who has been doing a lot of JavaScript this last year, and REALLY appreciates the brevity. Even if your IDE can generate it, that doesn't mean I want to read it.

Java: the language that has to wear a paper bag over its face while it's screwin' ya. :-)

(think of all those Eclipse plugins to visualize fugly XML bogo-DSLs and other cruft for The Enterprise -- sure, there are worse languages out there, but not in common use now)

replies(1): >>edwinn+Ul1
◧◩◪◨
10. edwinn+rE[view] [source] [discussion] 2015-12-13 05:07:05
>>aarone+k7
There are 2 workflows here:

1. the ability to run everything (a.k.a the whole project) using the preferred SCM (or build tools)

for example: mvn clean install

where your pom.xml already set to have cobertura (code coverage), checkstyle/pmd (linting/style/formatting), and findbugs (static code analysis)

2. the ability to run a very specific unit-test somewhere deep down in your project via your IDE as you're writing code (the IDE compiles your code on the fly...) and get everything I mentioned above :)

for example: I want to run one new unit-test for a new code => I don't have to drop to my console/command-line/terminal to run mvn clean install. I just go to my unit-test, highlight the method name, run it through eclipse/intellij and I get everything.

replies(1): >>aarone+JW
◧◩◪◨
11. edwinn+xE[view] [source] [discussion] 2015-12-13 05:10:24
>>merak1+N6
I'm using sublime. I'm in the market for great sublime plugins and it would be great if you could let me know what plugins you use :).

My workflow goes like this:

1. Write new code

2. Write unit-test

3. Run _just that_ unit-test w/ code-coverage from within my IDE without compilation (e.g.: no mvn clean install)

4. Get feedbacks (unit-test results, code-coverage results)

I take it linting/checkstyle/style-formatter is a given in sublime (I use jshint so I guess I know the answer to that ;)).

◧◩
12. edwinn+zE[view] [source] [discussion] 2015-12-13 05:11:07
>>JustSo+O8
See https://news.ycombinator.com/item?id=10725486 and https://news.ycombinator.com/item?id=10725480
◧◩◪◨⬒
13. aarone+JW[view] [source] [discussion] 2015-12-13 15:53:20
>>edwinn+rE
Oh, is that all? There's nothing special about that. Any decently capable editor should be able to do likewise. I don't know about Vim because I don't use it, but I would assume it can, and I know very well that Emacs can because I do such things in Emacs every time I write code.

Of course it doesn't work exactly the same way; for example, running a single test doesn't involve highlighting it and telling Emacs to do something magical, but rather flagging it in a way that's specific to the test runner and then doing M-x compile RET RET to point the test runner at that file. The first time I do that, I have to tell Emacs what command I want it to run, but that's no great hardship, since it's buffer-local (each file I'm editing has its own value) and, being a simple test harness invocation, need change only when the filename does. If it matters to me, I can put this information in a configuration file, so I don't have to worry about typing it out even the first time. So far, it hasn't mattered to me. (And, yes, when I run a single test this way, I still get coverage information. Linting happens inline, as linting should, so doesn't really figure into things here.)

The mechanism differs somewhat from what you describe, but the result is the same. Just highlighting the desired test and invoking a keybinding might be a little quicker and more convenient, but so far it hasn't seemed enough so for me to go to the effort of writing Lisp code to do it. It wouldn't be much effort, but since invoking a specific unit test alone takes about a second, it also wouldn't save me much time, which is why I haven't bothered doing it.

A major point of interest here is that none of this workflow is specific to a single language or a single toolset. It works the same way across all the languages I use. Since I work in multiple languages on a daily basis, that's very important to me. It sounds like you work primarily, perhaps exclusively, in Java, so that's not as important to you. The problem is, you seem to have assumed that nobody else's tools can do the same awesome things your tools can do. As I hope you've gleaned from this comment thread, that is rather untrue, and proceeding from the assumption that it is makes you come off as both ignorant and arrogant. What you do with this information is, of course, entirely up to you.

replies(1): >>edwinn+ll1
◧◩◪◨⬒⬓
14. edwinn+ll1[view] [source] [discussion] 2015-12-13 21:55:32
>>aarone+JW
Hm, I don't mean to sound arrogant although I can see why my comments perceived to be that way. My apology.

I know most test-runners have the capability to run specific test which suggest that any editor that is capable of executing command-line and bind it to something can support my workflow with some annoyance here and there (as you mentioned, your setup isn't as magical as my description ;)). I mean... someone could've written shell scripts that help them run a bunch of things too...

This is akin of the discussion of using ctags and the need to detect file changes and re-run ctags. Last time I google it there were plenty plugins for each editors and ways to set it up (except there's no clear winner ;)).

The whole idea here is that the IDE helps you not to worry about any of that. IntelliJ supports multiple (mainstream) languages that fulfill my workflow nicely.

Good point that I'm sure Emacs can handle way more languages but the steps to set it up and the limitation (filename change? method name change?) feels more static than dynamic to me.

◧◩◪
15. edwinn+Ul1[view] [source] [discussion] 2015-12-13 22:06:05
>>Robopr+wd
IDE these days are more than that :)

https://emptysqua.re/blog/unittests-code-coverage-in-pycharm...

http://blog.jetbrains.com/idea/2012/04/code-coverage-for-jav...

[go to top]