|
I'm the only developer in my unit, so even if we had code reviews I doubt anyone would know what it all meant.
|
|
|
|
|
I have the same problem. I'm the only C++ programmer in a department full of Java Devs. They do try, but explaining COM to Java devs results in an almost instant extinguishing of comprehension even consciosness, for that matter, on several occasions. Funily enough, it still keeps me careful though.
T
|
|
|
|
|
I consider myself a solo developer because I am the only one editing my code. I still do review my code, mostly using Windiff.exe. It is amazing what I find when I read my code after one or two months of work. It is like proof-reading an essay.
I worked many years for a large software company (Microsoft) and we had formal code reviews. I learned a lot by reviewing other's code as well as having my code reviewed. Code reviews are also a good way to learn what others in your team are doing. If you need to modify something, you have an idea what the code does.
|
|
|
|
|
danmorin wrote: It is amazing what I find when I read my code after one or two months of work.
I couldn't agree more. Isn’t it strange how after finishing writing an app is when you’re most likely to see the best way to do it.. I've had considerable success prototyping (hacking quickly through as much as I can), before sitting down to a more considered design process. I think some of the benefits in just sitting down and writing code got thrown out with modern methodology fashions. To a rigid rationale there is no room for factoring in the magic of such an activity. Reviews are a huge benefit but they can never be more than a hind sight tool.
I'd like to know Microsoft's opinion on this matter. You’ve had an intriguing insight seeing behind that particular veil.
Tom
|
|
|
|
|
"Isn’t it strange how after finishing writing an app is when you’re most likely to see the best way to do it.." indeed hindsight is a great thing. Code reviews must surely be seen as a luxury. In the real world it's not always possible to schedule it in to a given project, not where i work anyway...
Dan
Never get off the boat!
|
|
|
|
|
I know what you mean. Sometimes it seems strategy just can't keep ahead of the need for fire fighting. Especially, when trying to evolve a large app out of it's "rushed to first profit" version 1.0 status. My forerunner's idea of automation was to fire key clicks at the app he wanted to control. It might have worked but he wasn't even careful about the windows he targetted. If the user was unlucky when in certain app Trillian occasionally sent out random text messages
Tom
|
|
|
|
|
TClarke wrote: To a rigid rationale there is no room for factoring in the magic of such an activity. Reviews are a huge benefit but they can never be more than a hind sight tool.
I'd like to know Microsoft's opinion on this matter. You’ve had an intriguing insight seeing behind that particular veil.
At Microsoft, each team chooses their coding styles and how they do thing. Many teams have chosen the Hungarian coding style (p for pointer, i for integer or index, etc) however some teams, like the Windows NT/XP team, has no coding style at all. As for code reviews, it is usually the developer who calls for a code review and 3 or 4 volunters agree to participate in the review. A "code review" is not a "design review"; it is to find anything wrong in the implementation such as a parameter out of range, memory leak, etc. Many times, a reviewer will ask "what those lines do?". This means the code should have more comments for those particular lines. Sometimes a reviewer may tell that there already exist a routine or object to do such and such, however this is rare because we also have time to discuss design strategies. During the design strategy, the methods and objects are suggested to speedup the implementation. In my experience, all those "meetings" were informal, requested by the developer who wrote the code.
A code review is like proof reading an essay. You do not change your story when you proof read your essay, but may correct a few sentences and perhaps insert a short paragraph.
|
|
|
|
|
That seems perfectly rational.
It seems to me that if a developer who may be writing something large and/or critical can dynamically bring to bear on the situation a larger group of experts the company's processes are succeeding. A modern day calling in the cavalry. I can think of alot of situations where that could of helped.
In my company, if that became necessary you'd hear a huge bang as a million hours of MS Project effort going up in smoke.
Thanks for the insight
|
|
|
|
|
TClarke wrote: In my company, if that became necessary you'd hear a huge bang as a million hours of MS Project effort going up in smoke.
I never used MS Project or Power Point in my entire life. In fact, I never installed them on my machines because I never had to open any of those files.
I learned UML at school however I never used it later in my life.
|
|
|
|
|
Me neither, but management love them here. Every now and again I get a few bars printed out for me. I look at them until I'm absolutely sure there's nothing useful in them, then I write useful notes on them and stick them to the wall. To the untrained eye I don't mind the distraction at all.
UML: I've still not been able percieve a design better in an abastact paradigm I use rarely than I can in the one I use every day and certainly not as quickly.
Couple that with some of the daft rubbish that's come down from our architects I don't think your missing out on much.
I've never met a decent developer who didn't know the structure almost as soon as he heard the problem.
Tom
|
|
|
|
|
It's interesting to hear your comments on UML. I am coming onto a project where UML is being used to model the business domain. It's a form of the so called model driven architecture. Basically using UML to design classes and the database to persist them.
It's *somewhat* neat, but, having spent a lot of time doing db design/class design in the natural way (with code), I find it somewhat opaque. I question the value of creating these models.
|
|
|
|
|
Instead of using some UML software, I use a whiteboard with color markers. With a whiteboard, I can draw the diagram I want, typically a class hierarchy with important data members and methods. If I like the drawing, I use my digital camera to take a snapshot of the image. The image is copied from the camera to the "doc" folder in case I want to recall the drawing later.
Most of the time, just drawing something and brainstorming is sufficient. It is like discussing a [computer] problem with a colleague - it helps to generate news ideas to solve the problem.
|
|
|
|
|
It's worth remembering that UML is just another logical language.
As such, if your familiar enough with it you can use it to design systems. It's just an abstract document that's an aid to thought. Writing UML is writing one totally abstract document to describe another less abstract document(your code).
However, you can't compile it and it's form won't betray any system particular issues. UML is entirely ignorant to peculiarities of any OS or libraries. The structure of a applicationis obviously crucial but most development issues arise from the libraries and technologies we use.
I don't mean to sound like I'm writing UML off. It's our most successful effort yet as a tool to aid system thinking but while it may be capable of describing a full complement of system structures(so can most languages though), in my opinion it's clunky aesthetic is still a long way from any real connection with the way the brain sees theses things.
Worth learning, even worth using but beware, its not finished. There are so many ways of chopping up problems and presenting them to our brains in a way that accelerates subconscious reasoning.
Tom
Tom
|
|
|
|
|
Whiteboard rule! I'd prefer to jot down my ideas on a white board and have other developers engage in a discussion on design etc.
We made the buttons on the screen look so good you'll want to lick them. Steve Jobs
|
|
|
|
|
I've always worked alone and never had the option of a code review. On the other hand, I have viewed, fixed, modified, and redisgned thousands of lines of other peoples code that came in from outside the company. So I guess that would make me an expert reviewer.
Does anyone need a full time C/C++ code reviewer?
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
We have an SPI (Software Process Improvement) team which is part of the Architecture group that monitors code across all the projects. It is informal in that you aren't pulled up in front of a panel and reviewed but it is formal in that there are people tasked to review code and standards to be met.
We also then do occasional presentations between projects on architecture and code in the hope that fresh eyes will spot places for improvement.
|
|
|
|
|
I've been working at my current job for nearly a year now and I'm slowly trying to bring the rest of the team in the 21st century. It has been a long hard road, with many miles to travel yet.
Code-Reviews are next on my list. I have managed to persuade them to use FxCop, so that is a small step towards the overall goal. Even getting them to review my code is hard enough without trying to get them to review each others code.
It is all about changing the mindset of people who have been stuck in their ways for years and are afraid of change.
Hopefully when this poll is run again, I'll have a better answer.
|
|
|
|
|
You are my Hero. Good luck with that.
Maybe I should learn from you, how to convince others to move and do the next step.
|
|
|
|
|
We will be working in such a time bound situation, that we hardly get time to review the code.
Krishnaraj
|
|
|
|
|
I think that is more common that I'd like.
|
|
|
|