6 ms·
I don't care much about code review, but it's a close enough attractor to the space of code reading that it seems to be draining attention. So let me hijack thi
by TeMPOraL 10y ago
I don't care much about code review, but it's a close enough attractor to the space of code reading that it seems to be draining attention. So let me hijack this topic and post a request for product (I'd write it myself, but priorities... adult life sucks hard).
--
I dream of a tool that facilitates code reading and exploration. It has some similar features with code review tools, namely:
- integration with version control systems
- basic semantic search/navigation
- looks clean
- not meant to be for writing code
But my dream tool also has following features I haven't seen implemented in any code review tool (or anywhere):
- annotations - not just "comments", but the ability to tag lines, to strike them out, highlight, color, scribble on them, etc. - basically anything you'd do with a printout of a code
- easy way to review history of a single file (with annotations)
- ability to easily bookmark areas / pieces of code and use those bookmarks in comments / annotations
- ability for viewing structural diagrams of the codebase
- full blown semantic search - who calls, calls who, etc.
- project-structure-oriented, not repository-history/commit-oriented
Basically, I'd love a tool not for collaboration, but for individual work - a tool that would facilitate exploring and familiarizing yourself with big codebases, as well as empower one when the time comes to do bigger refactorings.
Would be doubly useful if I could use it on a tablet, so that I could get up from in front of my computer to go and think about the changes I'm about to make (right now, I end up actually printing code if I have to refactor something very messy).
- sarnowski 10y agoSounds like you described https://www.jetbrains.com/upsource/ https://www.jetbrains.com/upsource/ (I am not affiliated with Jetbrains in any way)
- theptip 10y agoI've seen a couple brief comments about Upsource in this thread. Can anyone give a deeper dive on their experiences? I tried it very briefly but didn't have time to configure integration with my IDE, just played in the web browser. I suspect that means I didn't try the best feature. Pros/cons of this tool?
- leonya2 10y agoUpsource team member here. Since Upsource indexes your code just like any JetBrains IDE does, it gives you code navigation, inspections, etc. in the browser, which means its "best features" don't require using it as an IDE plugin. Pros: I'm obviously biased so I won't go into those. Cons: it's not a lightweight tool that's happy with 1 gig of memory. Configuring and waiting for code indexes takes a bit of time, especially if you're trying it out on large legacy codebases. It also won't manage a Git repository for you.
- robinshen 10y agoI think GitPlex meets most of the requirement here if you are writing Java code (and more languages are being added). Unlike other tooks, it does not place any requirements on project build system (Maven, Gradle, etc) and can work on any project containing supported languages. Checkout android code base for instance: http://gitplex.pmease.com/demo/android-framework-base/files?revision=master&path=core/java/android/inputmethodservice/Keyboard.java&mark=61.13-61.21 http://gitplex.pmease.com/demo/android-framework-base/files?... I actually created this tool to suffice my own needs when browsing history of QuickBuild source code.
- taspeotis 10y agoI get the feeling that Microsoft has a lot of these things, but they're disparate. e.g. code navigation [1], search [2] and CodeLens [3]. [1] https://referencesource.microsoft.com/#mscorlib/system/string.cs,206408f6325aea24 https://referencesource.microsoft.com/#mscorlib/system/strin... [2] https://www.visualstudio.com/en-us/docs/search/code/advanced-search#codefunctions https://www.visualstudio.com/en-us/docs/search/code/advanced... [3] https://msdn.microsoft.com/en-us/library/dn269218.aspx https://msdn.microsoft.com/en-us/library/dn269218.aspx
- qznc 10y ago> annotations - not just "comments" What kind of annotations would not make sense as comments?
- wingerlang 10y agoDiscussions about the code perhaps.
- Juliate 10y agoAnnotations as what you scribble in the margin of an article or on a page in a book. Comments are inline with the code. Annotations are aside, and serve both as visual anchors and as "aside" notes.
- robinshen 10y agoIs it something like this? http://gitplex.pmease.com/demo/android-framework-base/files?revision=master&path=core/java/android/inputmethodservice/Keyboard.java&mark=138.4-146.48&comment=2 http://gitplex.pmease.com/demo/android-framework-base/files?... You may also put annotations on any diffs: http://gitplex.pmease.com/demo/android-framework-base/commit?revision=72d6dca09e85627b47c94f9a6ebf37ea56291450&comment=3&mark=72d6dca09e85627b47c94f9a6ebf37ea56291450:wifi/java/android/net/wifi/p2p/WifiP2pManager.java:286.4-289.7 http://gitplex.pmease.com/demo/android-framework-base/commit...
- TeMPOraL 10y agoI'm thinking in terms of what I'd do if the code was printed out on paper. http://imgur.com/KMCBMjA http://imgur.com/KMCBMjA
- oneeyedpigeon 10y agoThe trouble with that is, how on earth do you get the annotations to apply across revisions? Or would you be OK with them only applying to a given revision and then ... what, disappearing? Or going into a 'floating bucket' of annotations for the entire file?
- _pmf_ 10y ago> Would be doubly useful if I could use it on a tablet That's something that baffles me: the complete lack of a comfortable (or at least not painful) way to read and annotate source code on Android.
- TeMPOraL 10y agoIndeed. The closest I came to what I need was a proof-of-concept I did - printing source code to PDF and using Adobe Reader's annotation tools. Wasn't exactly convenient without a good ability to switch between multiple source files, but could be made to work. I'd love to have such browsing/annotation tool I could take with me to a park, to browse code and think about it while on a walk, without continuous distractions of the office / Internet connection.
- oneeyedpigeon 10y agoRight now, I would take a button to go to the previous revision of a file, showing the full file with the diff underneath. That way I could very easily 'browse' through the history of a file to find out things like when a particular change got introduced or just get a feel for its history. Why on earth don't github/bitbucket provide this? Surely it's a reasonable and common requirement? Or is there something inherent to git that makes it too awkward?
- pricechild 10y agoAre you looking for something akin to `git blame`? Github & Bitbucket both provide a gui for this. Something even closer to what you're asking for... in github hit the 'history' button on a file (next to blame) and you'll get the commits which affected it. Hit the 7 character commit-id and you'll be taken to the diff of that change, jumped specifically to the file in question.
- oneeyedpigeon 10y agoI never really use `git blame` - my primary git use case is as a single user. The history button in github is close to what I'd like, but it's not quite as friendly as single next/previous buttons that just paginate the changes to a file. That makes cycling through the history very easy, whilst 'click commit id, back, remember which commit we just viewed, click following commit id, repeate' all sounds a bit painful.
- robinshen 10y agoGitPlex can show history of any path (a file or directory) quickly via history button, and from there you can even refine the history (search for certain tags, commits made by certain people, etc) of the file, and once you get to the point, you can either view content of the file, or hit the compare button to compare with your previous browsed copy. An example here: http://gitplex.pmease.com/demo/android-framework-base/commits?compareWith=836e74052e16f4c24c3e7e9eab0dbcaee462986f&query=path%28core/java/android/view/View.java%29 http://gitplex.pmease.com/demo/android-framework-base/commit...
- sdesol 10y ago
- pjmlp 10y agoYou mean an IDE?
- TeMPOraL 10y agoAfter a fashion. A reading/exploration-oriented lightweight IDE. No IDE that I know of support scribbling over code, for example. Also, for the mode of work I'm thinking about, having no ability to actually write code would be a feature.
- 91bananas 10y agoTruly you've described this: https://www.jetbrains.com/upsource/ https://www.jetbrains.com/upsource/
- sqs 10y agoSourcegraph CEO here. We 100% agree, and that's why we built Sourcegraph. Check out our roadmap at https://sourcegraph.com/plan https://sourcegraph.com/plan. And try browsing code on Sourcegraph: https://sourcegraph.com/github.com/gorilla/websocket/-/blob/client.go#L94 https://sourcegraph.com/github.com/gorilla/websocket/-/blob/... (we support other languages as well). Right-click on "parseURL" and choose "Find All References". If you click on "HasPrefix" a few lines below, you'll see a cross-repo jump (and the right-click menu lets you see global/cross-repo references). Sign up at https://sourcegraph.com https://sourcegraph.com to get it on your own GitHub repos.
- TeMPOraL 10y agoVery interesting demo. So it has at least one feature I'm looking for :). Basically, I'd like something like that, but with annotations like in Acrobat Reader (but more), on a tablet, and off-line at least for my own codebase. I found a small issue with "peek definition" window: http://imgur.com/TT2KmpR http://imgur.com/TT2KmpR.
- sqs 10y agoShoot me an email at sqs@sourcegraph.com if you want to get early access to some of the upcoming things (or sign up at https://sourcegraph.com/beta https://sourcegraph.com/beta). I think you'll like what's coming. Thanks for the bug report. :)
- emirozer 10y agoThis is very impressive, well done!
- miguelrochefort 10y agoI recommend you watch this: https://youtu.be/dSqLt8BgbRQ https://youtu.be/dSqLt8BgbRQ
- robinshen 10y agoThanks for the link, bookmarked it for studying, :)
- dugmartin 10y agoI'm building something like that now but instead of annotations in the code it captures your browse through the codebase as a tree that you can then annotate, save and share. It is going to run both in the browser to explore code hosted on GitHub, BitBucket, GitLab, etc and locally as an Electron app. Very vague landing page with signup here: http://www.browsethesource.com/ http://www.browsethesource.com/
- Dangeranger 10y agoFor quick browsing of a files commits I use Emacs with Magit and utilize the time travel feature of Git-Timemachine https://github.com/pidu/git-timemachine https://github.com/pidu/git-timemachine You don't get the annotations you want, but you could make a comment with a common starting word like NOTE: then remove them before you merge the refactorings.
- hkailahi 10y agoYes! This is this tool I've been dreaming of too! I would pay a lot of money for something like this.
- seanpackham 10y agoThat is a great list of features! I will create feature requests for them in GitLab (I work at GitLab). I'm curious what you think of the single file history in current systems, are they OK but just missing annotations?