22 ms·
For this to take place we need better IDE's, ones that gives you more context on the code: * when it was written, by whom and to answer which need * when was
by jacabado 15y ago
For this to take place we need better IDE's, ones that gives you more context on the code:
* when it was written, by whom and to answer which need
* when was it changed and to solve which issue
* if it has been ever debugged and if any bugs where ever found inside it
When I'm chasing some nasty bug in my code and I refuse to accept it was some recent change it's incredible that 90% of the times I bang my head against the wall with some bug in a recently changed bit of code. If just my IDE could highlight the code from the last 3 commits of me and my coworkers it would ease my life so much.
- eru 15y agoEmacs [1] can do the "whom, when" part. The "why, what issue, what bugs" part might be addressable by literate programming. But not a lot of people try that. [1] Or most decent editors in cooperation with your version control.
- raganwald 15y agoIf your SCCS check-ins reference issues, an IDE ought to be able to address "what bugs" through "which issues."
- wladimir 15y agoAgreed, IDEs could do a lot better still on the 'social' aspect.
- techdmn 15y agoMy first thought on reading this was that you don't use version control, but then I see you mentioned commits. Seems there are several IDEs and VCS that play nice together, SVN support seems relatively common. Maybe not automatically showing the last three revisions, but it isn't much effort to do a diff across revisions, or see who touched each line last on the current revision.
- jacabado 15y agoI just want it there every time as a small unobtrusive clue. How many times is that feature used vs how many times could it be useful? (or the others suggested here who need user intervention and never allow you to code while seeing this info)
- DougBTX 15y agoYou can use svn blame in Eclipse to do some of this. Instructions: http://stackoverflow.com/questions/223657/svn-blame-in-eclipse http://stackoverflow.com/questions/223657/svn-blame-in-eclip... Screenshot: http://wiki.c2b2.columbia.edu/informatics/index.php/Eclipse#Show_Annotations_.28Who_Modified_the_Line.29 http://wiki.c2b2.columbia.edu/informatics/index.php/Eclipse#... This will allow you to see commit messages in the code editor on a line-by-line basis. To know if a line of code had a bug in it, you would need to make sure that that sort of information is written into commit messages. Here we use a "Fixes issue #12312" trigger in post commit hook, so that the commit, the code change and the Trac ticket are all linked.
- jacabado 15y agoI also use it (from Visual Studio), but I can't edit while in the "blame" view, it's something outside VS, I guess the Ankh plugin is responsible for that. What I need is something in the code when I'm editing it, it could be some kind of hint how "old" is the line and if I mouseover it would give me the blame information. I will check if I can build some plugin for VS or if somebody has done it.
- olavk 15y agoVisual Studio also have an "annotate" option, which shown in the margin for each set of lines who wrote the code, when, and the commit message.
- atlei 15y agoBack in my Cobol/CICS days, every line that was edited was marked with a 3-character identifier for the person responsible. In a limited "ide" this made it possible to find the person responsible and at least ask him/her for more information/documentation. I use a similar idea which is very low-tech, but use the date for each line/function that is changed, like this: v110117 Statusbar.Text (string, in::statusbar_type_info); v110117 is simply a macro where I explain the high-level rationale/bug/functionality (which is visible on mouseover-tooltip). If you need to edit different functions to fix a bug, it is a simple search for v110117 to find all changes (the comment at the end of the line may be marked v110117a, v110117b etc to separate different issues, and the detailed explanation for the changes done in that line/function is explained there). You will quickly see if there has been any changes in a function lately due to the date-format (vYYMMDD). A bonus is that if a function has many different changes it is immediately visible, and should be a warning that the function is complex/high maintenance.