21
\$\begingroup\$

As suggested by 200_success in a comment to this answer of mine, I'm asking this question. For me, missing tools are the biggest problem of this site. I'd bet that it repels potential reviewers and makes the remaining ones inefficient.

Obviously, we can't have everything a company using a limited set of languages and strict code conventions can offer, but the SO format is pretty lacking. But there are quite a few programmers here (all of us?) and something should be doable.

Colors

As a fundamental part of CR are code changes, there should be a way to distinguish

  • old code to be removed
  • code to be added
  • code to be preserved
  • additionally: comments belonging to the CR (rather then to the code)

Maybe a diff-style input like

/ Always use braces to avoid bugs.
- for(int i=1;i<5;++i) sum = sum + i;
+ for (int i = 1; i < 5; ++i) {
+     sum += i;
+ }
/ This gives us no information, just drop it.
- // Now we're done.
= return sum;

could be used for this and display an usual code block, but with let's say blue/red/green/black text. This would make the CR code even a bit harder to write but much easier to read.

Preview

As CRs tend to be much longer than typical SO answers, you can't see the formatted output without scrolling a lot. There should be a preview in another window.

Other features

There's a lot what could be done, but at least something should be done so that we can do more review and less wasting time.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Does sound like a good StackApps project to create a SE extension for CR to facilitate code-reviewing... hmms, should I dust off my web skillz? \$\endgroup\$
    – h.j.k.
    Jun 22, 2015 at 10:08
  • 1
    \$\begingroup\$ @h.j.k. Alternatively, a user script can help with things as well \$\endgroup\$ Jun 22, 2015 at 11:44
  • \$\begingroup\$ I’ve been using this user script for three columns by CertainPerformance for a while- it works well. I’ve considered modifying Simons code Q2A script to mimic GH code selection UI \$\endgroup\$ Jul 31, 2021 at 10:31

2 Answers 2

15
\$\begingroup\$

Scrolling up and down between the OP and the answer-in-progress is utterly wasteful and annoying.

A work-around I've come to use whenever possible, is to duplicate the browser tab, drag it to a 2nd monitor and work with the OP on one side and my answer-in-progress on the other.

It would be nice to be able to toggle a display mode that splits the page in the middle and puts the OP on the left and the answer on the right, or vice-versa.

\$\endgroup\$
8
  • 1
    \$\begingroup\$ Can we hide other answers while we are answering? \$\endgroup\$ Jun 22, 2015 at 3:49
  • 2
    \$\begingroup\$ Haha, I usually just overlay my text editor with a half size window over the browser tab. Then copy-paste the markdown when done. \$\endgroup\$
    – glampert
    Jun 22, 2015 at 3:58
  • \$\begingroup\$ @200_success it's not about the other answers, it's about a lengthy OP that we want on-screen as we type up our review :-) \$\endgroup\$ Jun 22, 2015 at 4:16
  • 6
    \$\begingroup\$ Drag the question browser tab to a 2nd monitor, but that's assuming you don't already have The 2nd Monitor chatroom on the 2nd monitor of course. ;) \$\endgroup\$
    – h.j.k.
    Jun 22, 2015 at 9:30
  • \$\begingroup\$ @h.j.k. That's where using multiple desktops comes in. \$\endgroup\$
    – Mast Mod
    Jun 22, 2015 at 11:00
  • 1
    \$\begingroup\$ I did create this tool to help with this a bit: Code-Q2A - copy code blocks from questions to answers. It is not a perfect solution, but I think it is a step in the right direction. \$\endgroup\$ Jun 22, 2015 at 11:41
  • 1
    \$\begingroup\$ @glampert If you're using Firefox, you can get rid of the copy-paste part by using the It's All Text extension. There are probably similar extensions for other browsers. \$\endgroup\$
    – svick
    Jun 22, 2015 at 12:42
  • 2
    \$\begingroup\$ I actually use this method for all of my StackExchange answering (not that I do it that often). It's more of a problem with CodeReview (I can imagine), but StackOverflow suffers from this problem as well. Perhaps a network-wide 'fullscreen toggle'-like functionality, to have the OP's question/comments on the left, and the answer field on the right, might be a good idea. I'm not a UX guy, but that would be incredibly helpful, mostly for SE sites like SO and CR. \$\endgroup\$ Jul 24, 2015 at 19:04
11
\$\begingroup\$

I spend a needless amount of time indenting code by hand because just selecting code and pressing does not work. I know that there is + but it only solves half of the problem since it only indents when the code is not indented enough (where "enough" is subjective since it will never indent the code enough in a bullet list) and desindents the code otherwise.

I seriously never used the button from the main answer field to go to another field, so not having it available to indent and desindent the code it only a bother and a waste of time.

While it's just an issue among others, I feel that it is important considering the amounts of code we have to deal with.

\$\endgroup\$
3
  • 2
    \$\begingroup\$ What I do is add a new line containing a single nonindented character before or after the part I want to indent. Then I select the block along with the extra line and press ctrl+k. That indents everything by one level. Repeat as necessary and then remove all the temporary lines. \$\endgroup\$
    – JS1
    Jun 26, 2015 at 5:31
  • 2
    \$\begingroup\$ @JS1 That's also what I do from time to time, but I wouldn't call it an optimal solution. It's more of a workaround to try to bypass the real problem. \$\endgroup\$
    – Morwenn
    Jun 26, 2015 at 7:18
  • 1
    \$\begingroup\$ Use TamperMonkey to install this extremely handy userscript to enable tab and shift-tab when writing questions and answers. It is essential for your sanity. \$\endgroup\$ Jul 11, 2015 at 21:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .