|
I suggest early on Old-timers disease (Alzheimers)
Conveniently that now leads me to point you to an Insider News post from Kent (thanks kent, you provided some ammo to fire your boss's way - no bonus for you![^])
Prevent Alzheimer's Disease by drinking beer?[^]
Now Maunder, we all know your sorry arsed history of skipping out on beers - as an ex medical professional I'd hazard an assessment that should you not have skipped out on those beers you'd not be in the current be-codgered state you are.
i.e. its your own bloody fault coz you're a wowser
Bryce
MCAD
---
|
|
|
|
|
On the flip side, don't you love it when you get calls from support complaining that the product doesn't do something, and you get to tell them that it's been there right in front of them all along?
|
|
|
|
|
Literally just did exactly that - was so miffed with myself I came to CP to chill for a bit - saw this.
Ah well, at least I'm not alone!
PooperPig - Coming Soon
|
|
|
|
|
I am a big proponent for code reviews, prior to deployment. This is great if you work in a shop that has the people/resources to perform this and the time.
Questions
1. Who here does not believe/practice code review? If so, please explain.
2. Who here works solo and has no immediate resources to code review? If so, would you use a third party review system (community)?
Every great author has an editor, or should at least.
|
|
|
|
|
1) No code reviews. I used to, but the medication keeps the other personalities at bay...
2) I work solo, but I wouldn't want external code reviews - most of the stuff I do is proprietary or covered by NDA / corporate confidentiality agreements and I wouldn't let it into the public domain.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: external code reviews Didn't think of that. I think external reviews are a no-no. If I were to go along with one, it would be internal only. Even without an NDA, people on the outside won't know the project. I mean sometimes, you just gotta do something stupid to pay the bills, etc.
Jeremy Falcon
|
|
|
|
|
OriginalGriff wrote: 1) No code reviews. I used to, but the medication keeps the other personalities at bay... You beat me to it. Only I was going to say that I had multiple personalities;
1) Coder guy
2) QA guy
3) Code review guy
4) Beast
New version: WinHeist Version 2.1.0
My goal in life is to have a psychiatric disorder named after me.
I'm currently unsupervised, I know it freaks me out too but the possibilities are endless.
|
|
|
|
|
I work solo and I tend to prefer it that way. I do think code reviews are great in theory, but I have yet to meet many programmers that are mature enough to think that their way isn't always the best way. A couple of remarkable devs come to mind, but sadly I don't work with them anymore. That being said, they have their place for helping to ensure standards. So, they aren't bad. I just apparently need to get out of the ghetto to meet better quality devs.
Jeremy Falcon
|
|
|
|
|
Jeremy Falcon wrote: I work solo and I tend to prefer it that way.
The internet has that effect...
|
|
|
|
|
You're not kidding. Sadly, that extends way further than programming this day in age.
Jeremy Falcon
|
|
|
|
|
1. Code reviews are good. Finding people who honestly want to do a good job with it makes them regularly useless. The best scenario is really using it to mentor folks who are trying to develop a particular skill set. I had code reviews where people argue about the correct approach to a problem... that should have been hashed out long before the code review.
2. Never... not worthwhile imo. A third party would not have the domain knowledge regarding the specific choices made for the coding effort. The only value you get is style issues... which don't matter so much with just a single coder.
|
|
|
|
|
Slacker007 wrote: Who here does not believe/practice code review? If so, please explain.
I'm not a fan of code reviews. Usually:
1. What Jeremy said. And I'll be blunt - there's very few people that I think are qualified to review my code. Sorry to sound arrogant, because I'm not actually, but it's simply been my experience that code reviews tend to digress into "what's an anonymous method?", or "what is closure?" or "gee, I didn't know that was in the .NET framework." Granted, I HAVE been myself on that side of the fence, but a lot of people never seem to find the gate to the greener pasture.
2. When I write code, I'm in two states: the part that is writing it, and the part that is critiquing it. So, I'm my own reviewer, and you'll find in my open source projects a lot of TODO comments as a result, where I make a note for my future self to clean something up. Again, very few people do this, but I think one should be one's own reviewer.
Slacker007 wrote: Who here works solo and has no immediate resources to code review?
Moi.
Slacker007 wrote: If so, would you use a third party review system (community)?
No. Again, what Jeremy said regarding proprietary stuff. That said, I have several open source projects and of course a ton of articles, and any of those are open for critique. If the community wants to give me some feedback, that would be great, I'm all for an open dialog.
Marc
|
|
|
|
|
Quote: So, I'm my own reviewer
That is by far your most important reviewer, but I must admit that I have learnt from a few constructive criticisms of the few articles I wrote here on CP!
|
|
|
|
|
Cornelius Henning wrote: but I must admit that I have learnt from a few constructive criticisms of the few articles I wrote here on CP!
I'm actually surprised how few critiques I see in general, other than when it's blatantly obvious. My most humbling experience was this[^]
Marc
|
|
|
|
|
Marc Clifton wrote: but a lot of people never seem to find the gate to the greener pasture. Interestingly enough man, I find this concept applies to so many aspects of life that extends way beyond the reach of just programming. It's like the more you know the more you accept the less you know, and are ok with that.
Marc Clifton wrote: When I write code, I'm in two states: the part that is writing it, and the part that is critiquing it. So, I'm my own reviewer, and you'll find in my open source projects a lot of TODO comments as a result, where I make a note for my future self to clean something up. Again, very few people do this, but I think one should be one's own reviewer. I do the same thing! Ha. My problem is though is getting back to those TODOs and making the changes.Marc Clifton wrote: If the community wants to give me some feedback, that would be great, I'm all for an open dialog. That's probably how I got my distaste for reviews. One of things that kept me from writing more articles on CP for instance is having to deal with the "expert kiddos" that try to sound smart critiquing your code. It's annoying arguing with them. Waste of my time actually. But, I'd want the mature peer reviews by other respectable programmers. Tough to have your cake and eat it too.
Jeremy Falcon
|
|
|
|
|
Marc Clifton wrote: What Jeremy said. And I'll be blunt - there's very few people that I think are qualified to review my code. Sorry to sound arrogant, because I'm not actually
What about as a tool to share experience; have other people look at your code as a learning and share expertise in your organization; if you are not able to explain your code to other people, then, maybe your code is not good enough to be maintained; and if, and it is possible, the person who's doing your code review is not at the same technical level as you are, then, tell the person who assigned the code review.
I'm not the best or brightest, and I like looking at other people's code, even if I need to review code that I'm not 100% at ease with.
I'd rather be phishing!
|
|
|
|
|
Maximilien wrote: What about as a tool to share experience; have other people look at your code as a learning and share expertise in your organization;
I'd be interested in that and have even contemplated the idea of putting a website together that would facilitate that exchange, both privately for proprietary code and publicly for open source reviews. Tying in with, say, GitHub, to then track changes to reviewed code, well, that could be a useful, maybe even revenue generating, tool.
Maximilien wrote: f you are not able to explain your code to other people, then, maybe your code is not good enough to be maintained;
Amen to that. One of the reasons I love writing documentation is that, in explaining what I'm doing, I often discover bugs and better ways to do it. Now, granted, some people simply struggle with communicating, but I would have to say, I have yet to see the person who, failing to communicate in English (or whatever their native tongue is) actually produce decent code.
Maximilien wrote: the person who's doing your code review is not at the same technical level as you are, then, tell the person who assigned the code review.
This involves too much of a "management" structure that, being a consultant, I happily avoid.
Maximilien wrote: I'm not the best or brightest, and I like looking at other people's code, even if I need to review code that I'm not 100% at ease with.
Same here. I have learned a lot from other people's code, here on CP and a lot on Stack Overflow and people's blogs.
Marc
|
|
|
|
|
I work in a medium sized software shop, and NONE of our code makes it to the deployment pipeline, unless it has been code reviewed. Whether you have been coding for 5 minutes or 25 years, your code is getting reviewed.
Most of the time, the review is just making sure you are not committing unsafe code, and not so much on coding style. Making sure that the Entity Framework models, services, and other things have not been put in a state that would break the build or cause problems down range.
Edit: I do not agree with the coder being their own reviewer. I have been doing this for over 15 years, and as good as I am at my job, I still make mistakes. Mistakes that were caught by my peers. Just saying.
|
|
|
|
|
Slacker007 wrote: I work in a medium sized software shop, and NONE of our code makes it to the deployment pipeline, unless it has been code reviewed.
I'm impressed. It's nice to see an organization actually invest in the process.
Slacker007 wrote: Mistakes that were caught by my peers.
Out of curiosity, could those mistakes also have been caught by unit / integration testing, or would that have been prohibitively complicated to set up -- in other words, having a human being do the code review is much more cost effective?
Marc
|
|
|
|
|
Marc Clifton wrote: Out of curiosity, could those mistakes also have been caught by unit / integration testing, or would that have been prohibitively complicated to set up -- in other words, having a human being do the code review is much more cost effective?
So our process is this:
1. code/test
2. Prior to committing the code to the trunk: run all automated unit tests. If those are successful, then submit for code review. When that is cleared for take off, the merge changes to trunk.
3. This kicks off an automated build, another set of tests are done, and then deploy to DEV server.
4. Testing is done by the business team/QA in both DEV and STG.
5. When that is signed off on, then we have a release readiness meeting to move the changes to PRD.
6. After it is in PRD, we do a smoke test...and hope for the best.
Funny, forgot to answer your question. Yes, unit tests, regression testing, integration testin catches issues but the code has to be deployed to an environment first in order to do integration testing, usually DEV. If we find problems, then everything has to be rolled back to the last successful build, and that can be a pain in the ass, if 20 other engineers have code in the pipeline as well.
Most of the time, things go well, but they go well because we have a process.
|
|
|
|
|
Marc Clifton wrote: code reviews tend to digress into "what's an anonymous method?", or "what is closure?" or "gee, I didn't know that was in the .NET framework." Granted,
But, but ... but that is what is GOOD about code reviews! It's NOT just all aboutmaking sure your code is wonderful, it's about sharing the love - in both directions!
Your reviewer may see code and say "I didn't know you could do it like that" or "Oh! I wouldn't have done it like that - why not do it like this" - and that then instigates a dialogue wherein you both ensure that this is the preferred way of doing it - either of you may be 'right' - even a junior programmer sometimes has a bright idea that you hadn't thought of or just didn't know about.
Plus, if the other dev is more junior, this is their apprenticeship - your opportunity to help them grow by sharing your experiences.
Sure, if they don't learn, and next time they look at your code they ask the same question, slap 'em, but generally sharing the ways we develop is a good and healthy experience.
Where it does fall down is when two people who "aren't actually arrogant" look at the code and simply disagree on how it should be done.
that's where a development manager comes in to adjudicate according to standards or even personal preference.
PooperPig - Coming Soon
|
|
|
|
|
_Maxxx_ wrote: it's about sharing the love - in both directions!
Meh. That's a different meeting. Code reviews that degenerate into teaching sessions, especially when it then becomes clear that nobody in the room is qualified to review the code, and ESPECIALLY when someone makes some derogatory remark about how LINQ is unreadable and they'll stick to for loops and if statements in their code...but I digress...those are no longer code review meetings, IMO. And I've been to too many of those.
_Maxxx_ wrote: Plus, if the other dev is more junior, this is their apprenticeship - your opportunity to help them grow by sharing your experiences.
More succinctly, code review and mentoring are two different processes. I have no problem if a junior member wants to sit in on a senior code review, but he/she should be quiet, take notes, and come to me for separate (or group, if that's the case, been there, done that) and I'm more than happy to help.
Marc
|
|
|
|
|
Marc Clifton wrote: it then becomes clear that nobody in the room is qualified to review the code,
So what do you think is the definition, in your environment, of 'good' code?
If you get the situation where people are "not qualified" to review your code (why? because you are a god?) then you work in circumstances where teaching them better methods and/or ensuring that all code is able to be maintained by all developers is imperative!
If you write some code that is just bloody brilliant, efficient, so superb nobody could write it better, but at your place of work there are developers who would struggle with it, then you are doing it wrong
You need to either get these people up to speed, or start writing code that is easily maintainable by the people you work with and are likely to work with in the future.
No question about it!
Marc Clifton wrote: but he/she should be quiet, take notes, and come to me for separate
Oh, you arrogant f***!
PooperPig - Coming Soon
|
|
|
|
|
_Maxxx_ wrote: then you work in circumstances where teaching them better methods and/or ensuring that all code is able to be maintained by all developers is imperative!
Absolutely. And I've done that.
_Maxxx_ wrote: You need to either get these people up to speed, or start writing code that is easily maintainable by the people you work with and are likely to work with in the future.
Hmmm...code to the lowest denominator? I understand your point, and I think it has some merit, but I also think it is in everyone's interests to learn rather than stay stagnant in one's ignorance. Sadly, I've encountered a lot of shops where the managers will question why my team is using C# instead of VB: everyone else uses VB, and VB programmers are cheaper is the usual argument. Would you say that I and my team should therefore code in VB?
_Maxxx_ wrote: Oh, you arrogant f***!
Absolutely. I've been around the block enough to have experienced "their way" vs. "my way", and I have enough concrete examples of how "their way" led to disaster. In one case, "their way" lead to the client threatening to sue the company, and the only way the company got out of that pickle was to bring my team in as the tiger team and institute "my way." Ironically, most of their architecture was actually solid enough, it was the database architecture that was a disaster.
Though, I actually wouldn't call it arrogance but rather hard earned experience.
Marc
|
|
|
|
|
Marc Clifton wrote: end to digress into "what's an anonymous method?", or "what is closure?" or "gee, I didn't know that was in the .NET framework."
Except of course that is in fact an avenue to teach other people about new concepts.
On larger teams it also helps people be aware of changes in other parts of the system(s) which might be relevant to them but which they might not have otherwise become aware of.
|
|
|
|
|