views:

658

answers:

20

What is that single action you do over and over again during your development time?

What task eats your development time like nothing else?

What is the task you want to perform, but you never convince yourself to do, because it would take forever to accomplish?

Please, provide environment information relevant to the task you mention:

  • IDE and its version
  • Tools, add-ins, plug-ins and other extensions
  • Programming language
A: 

I would like to automate the responses when my boss asks for the fifth time today if that bug is fixed.

Paul Tomblin
It is not "development activity", I think
Ilya Ryzhenkov
Hey, at least I don't tell her to "see Figure One".
Paul Tomblin
A: 

Posting to SO :)

Jon Skeet
Harvesting bots, which collect rep for you are forbidden on this site ;)
Ilya Ryzhenkov
A: 

Automatically re-synchronizing and recompiling every project/solution I'm working with every morning.

Right now it's a by-hand process with MKS and VS2005.

Joe Morgan
This is what CI is for :) (http://en.wikipedia.org/wiki/Continuous_Integration)
Ilya Kochetov
+2  A: 

Finding duplicates in the bug tracker.

On large projects, when a lot of testers are involved, a lot of bugs are submitted. During triage you often encounter bugs that you've encountered before. Finding those bugs in the huge repository is difficult as testers sometimes use different terminology for the same concepts.

+1  A: 

It doesn't eat up THAT much of my time, but one task I'd like to see automated is converting /* ... / comments to // comments inside of methods. People often send me large codebases to debug, and they're invariable strewn with / ... */ comments everywhere which makes it annoying to comment out blocks of code during my troubleshooting.

C++/Visual Studio 2008

Gerald
#if 0 ... #endif is your friend.
Steve Jessop
That doesn't work in all compilers, so I'm used to working with what does.
Gerald
I don't recall offhand, but does VS2008 not have a "block comment" shortcut which prepends (or removes) "//" to/from the start of each selected line?
Jon Skeet
Now that you mention it, it does, which I didn't know until I just looked. That could be useful, thanks.
Gerald
CTRL-K, CTRL-C comments a block. CTRL-K, CTRL-U uncomments a block.
Mitch Wheat
You can somewhat automate the removal of /* */ comments in VS.NET with resharper. Use CTRL + SHIFT + / with that block hilighted to uncomment it, and then you can hit CTRL + ALT + / to recomment it with //
mattlant
It is possible to convert comment style using a macro in MS Visual Studio. You'd have to write it yourself but it's not difficult at all.
Thomas Bratt
@Gerald: in what compiler does "#if 0" not work? Or I should say, in what pre-processor, since of course the compilation phase never sees it.
Steve Jessop
Sorry, actually I misspoke on that. #if 0 works fine as far as I know, what it doesn't do universally is result in any visible indicator in the IDE, i.e. gray the code out to indicate what is being excluded.
Gerald
I work on a lot of multi-platform code with #ifdef and/or #ifndefs, and removing the wrong #endif can often lead to very hard to diagnose bugs in it's own right.
Gerald
Ah, I see what you mean. I sometimes indent the code I'm #if-ing out an extra level or two: intended for the second issue, but might help a bit with the first. It's against some style guides, but for debugging that doesn't matter.
Steve Jessop
A: 

We use MS Communicator in our intranet.

It does not support logging of conversations.

I want my conversations saved and searchable.

So I have a big spreadsheet where I paste all of my conversations before closing the communicator window.

That is a big pain. I'd like to automate it by capturing the onclose event of the communicator window, and doing some MS Office automation to write the contents into my excel file automatically. Going to get around to it one day...

JosephStyons
MS Communicator 2007 does support the automatic saving of conversation in the "Outlook Conversation History". Goto: Tools|Options|Personal Information Manager and check the box before "Save my instant message conversations in the Outlook Conversation History folder"
+2  A: 

Build after every checkin. I would love to never again worry about which checkin broke the build - wouldn't even need to keep the results of the build, just verify that it doesn't fail.

tloach
TeamCity [delayed commit](http://www.jetbrains.com/teamcity/delayed_commit.html)?
Ilya Ryzhenkov
I know it can be done, I just want my work to actually do it ;)
tloach
@tloach, TeamCity Professional is free. 3 Build Agents, 20 User Accounts, 20 Build Configurations.
Ilya Ryzhenkov
CruiseControl.NET can do this. What we've found though is that it's actually pretty annoying since people are constantly checking things in and causing build conflicts (i.e., the thing is already building). Making it happen once an hour or twice a day works better.
Schnapple
TFS can also do this
Pablo Marambio
@Schnapple: TeamCity will suppress builds for a fixed period of time after a build triggered by a checkin. Might do what you want.
Thomas Bratt
I've implemented this with Hudson too (using a post-commit-hook).
Pascal Thivent
+2  A: 

I dream about this feature:

IDE (or at least ReSharper :) ) will analyze units of code (methods, or just small code blocks) and automatically save frequently used pieces of code as snippets (along with their context). Later these snippets can be used for auto-completion. This feature requires some kind of code analysis, but I will be satisfied even with some simple version. For example you can take a look at MS Office apps - they just remember recently entered text blocks and provide them in auto-completion drop-down boxes.

Ideally tool should perform some kind of pattern matching for code. It's not trivial but I believe it's implementable to some degree.

aku
+3  A: 

Enforce assembly-level guidelines over the codebase, so that violating them by any developer (I'm thinking about Junior devs mainly) will break the build (at unit-test level). The guidelines are to be expressed in some simple and yet non intrusive way (NDepend does not fit here). Samples:

  • Do not mark any complex classes or methods with NoCodeCoverageAttribute (complex classes have large cyclomatic complexity index)
  • If a unit test method does not have any assertion and it does not throw exceptions, something must be going wrong in there.
  • Classes in library A can have dependencies only on B and C
  • If some class from D namespace is referenced in method B, then it should have execution time less, than 500ms
  • Attribute B is a marker only for classes inheriting from C. Any other use is an error

These rules could be expressed in the assembly (rules for the usage of this assembly) and be applied to any other assembly (basically, checking, whether the second lib is sticking to some high-level guidelines)

C#, VS2008, CC.NET, NUnit

PS: I simply do not have time to write this one with Mono.Cecil+Boo

Rinat Abdullin
> Attribute B is a marker only for classes inheriting from C. Any other use is an errorCan be automated a bit with ReSharper, see BaseTypeRequiredAttribute.
Ilya Ryzhenkov
HAve you looked at FxCop? http://en.wikipedia.org/wiki/FxCop
David Schmitt
Ilya, didn't know. Thanks.
Rinat Abdullin
David, yes, of course. And at Gendarme, too.
Rinat Abdullin
If some class from D namespace is referenced in method B, then it should have execution time less, than 500msCan anything enforce this at assembly-level?
Knobloch
+4  A: 

Another feature I find useful is coding rules checking tool. Something like StyleCop. I want to have an easy tool to create code patterns/rules that can be applied to code base. Such functionality could save me a lot of time during code reviews. For example, I can define pattern (in pseudo code):

catch (.+) { <empty> } // Matches empty catch blocks

NDepend includes CQL (code query language). It would be really cool to have something like this in ReSharper (it will analyze actual code instead of MSIL)

aku
@aku, this is something we consider doing in the future, however we don't feel it will "rock". You will have too much false positives with simple patterns, and then you need context, and then you have to write code hence plug-in.
Ilya Ryzhenkov
Ilya, what about the Boo approach?They have simplistic macros that plug-in to the AST. You can use both.
Rinat Abdullin
Of course if will have false positives just like static code analysis tools. Still I find this feature to be very useful. It really can save a lot of time and enforce good coding practices.
aku
@aku, at your deleted answer. I mean probably rephrase answer to match the question? Like "I spend a lot of time finding methods which are too complex, browsing them one by one", or "I notice my Junior Dev's coding problems too late, I wish automatic code smell detection".
Ilya Ryzhenkov
Ilya, fortunately I don't spend *too much* time to analyze code metrics, but I find this feature to be very useful during code review/refactoring sessions. I will reformulate my request and undelete it.
aku
ReSharper 5 now has Structured Search, Replace and Analysis. Is it what you are after?
Ilya Ryzhenkov
A: 

I like drawing a lot of schemes, graphs and formulas on paper before getting into coding itself. It would be great to somehow have all that paper stuff scanned automaticaly and commited to svn server together with other documents.

akalenuk
You need a tablet PC at your desk. Have MS Onenote as the note app for writing/drawing, and have that onenote workbook part of svn. I do similar but ith TFS
mattlant
+3  A: 

A tool that would recognize & mark stale or unused variables/methods/files.

kenny
if .NET, then you can use NDepend for methods and classes, R# for the local variables
Rinat Abdullin
Rinat, in future ReSharper 4.5 version we are going to mark publically unused methods and types with Solution Wide Analysis.
Ilya Ryzhenkov
NetBeans and Eclipse do this as well (at least for Java).
Bill the Lizard
+9  A: 

Database schema versioning and synchronisation.

Alexander Kojevnikov
You can use RedGate SQL compare for the sync
Rinat Abdullin
I'm aware of RedGate and tools from other vendors. Still, in most projects database schema management is way more cumbersome than it could be.
Alexander Kojevnikov
I've got a nifty approach for dealing with this. Check out http://code.google.com/p/migrationscriptgenerator/ Its a works-on-my-machine tool that uses OpenDbDiff to automatically generate and save change scripts, throwing errors if you do something destructive.
mcintyre321
+6  A: 

Setting up the development environment

This may seem as a one time thing to do, but actually it isn't. Somebody adds a new dependency, e.g. to a JMS queue: it need to be set up and configured. Somebody makes changes in the db: you probably have to update your db manually. There is a change in the Maven pom-files: the IDE project files need to be recreated which probably erases some of your settings.

If you have more than one computer you develop on, all of this needs to be done for each computer.

If I could press a button that made sure everything was up-to-date it would be wonderful.

Arne Evertsson
Virtual Machines!
alexp206
Atomic solutions. You just check-out and ready to go. All my .NET projects are like this.
Rinat Abdullin
+1  A: 

Propagation of changes in database schema to stored procedures and functions.

I would love to know what fields my stored procedures reference and then be able to have then updated automatically or at least have a list of what to change.

Even Mien
A: 

Extracting the requirements from the user/client

Jason Z
thermo-rectal analysis with soldering iron never fails
aku
@Paul, please give me a link to an automated tazer. I need to invest in one :)
Jason Z
@Jason - don't automate the fun parts.
Paul Tomblin
+3  A: 

Real-time metrics with color coding

During code reviews/refactoring sessions I often need to quickly find problematic pieces of code. I find following feature to be very useful:

  1. Compute different code metrics for methods
  2. Show colored file map (like File Structure window in ReSharper)

    For example I can open map window, choose "cyclomatic complexity" and see color coded code map where color ranges from light green (methods with low CC) to dark red (methods with high CC)

  3. If I set mouse pointer inside some method show various code metrics for this method in tool window

If metrics would be re-computed in background I can monitor in real-time how refactoring affects the code.

aku
This is starting to look like wish-list... I was asking about the activity you do repeatedly and it takes a lot of time.
Ilya Ryzhenkov
Got it. I'll try to refrain from asking for all features I want 8-)
aku
I reformulated my request to make it less off-topic.
aku
@aku: btw you can try Cyclomatic Complexity power toy for ReSharper, it shows warnings when value exceeds some threshold.
Ilya Ryzhenkov
Hm... then there comes a wish to run Linq-expressions against the R# AST. And show warnings or errors if some custom metrics/expressions fails.
Rinat Abdullin
A: 

Spell-checking code and comments, according to some basic vocabulary (project-specific or company-specific).

We have this in FxCop, but this is not interactive.

Rinat Abdullin
A: 

I'd like to see more support for automated deployments. It'd be nice if the resulting build of any given project (web application, win application) produced an MSI package that was ready to take input parameters mapping to the project-level properties.

There are tools to do this, but nothing quite as automagic as my dream :)

Gabriel Isenberg
Just set up the thing once))
Rinat Abdullin
A: 

Something to help generate simple struct/data classes. Such classes have read only properties and a single constructor to set the property values. Anonymous types are great but sometimes you need a named type.

Thomas Bratt
R# with a couple of live-templates helps out here
Rinat Abdullin