|
If my boss didn't agree with me using good programming practices, such as relying on abstractions, then that's not a company/team I want to work for (unless, of course, there's a very good reason not to do it). The problem in my above example wasn't that I used an interface, but that I used an interface and implemented it in a base class that could be inherited. The interface was there for people who did not need the base class or who had already inherited from other classes. This was actually a little tool that would be used by different programmers and in different solutions, so you need to be SOLID (another set of principles I had to defend) and make use of design patterns (I still hear the guy screaming "IN MY EIGHT YEARS OF EXPERIENCE I'VE NEVER HEARD OF DESIGN PATTERNS BEFORE! SHOW ME THAT MICROSOFT USES THEM AND I'LL RECONSIDER YOUR CODE!"). The next day he came to apologize and he had looked up some design patterns that Microsoft uses in .NET. In the end I got his job (sort of) and he and I weren't put on the same team anymore (he was still my boss, co-owner of the company).
I actually owe the guy quite a bit since he taught me programming (the first few months). I made up by writing pretty awesome software (that was something we all agreed on) that the company has successfully used for years.
In hindsight I could've dealt with him a bit different (I called his code a card house), but I was young and arrogant (and I still am a bit) and let's just say he and I didn't go well together.
We thanked each other last month when I left the company (on good terms) to learn at another company. I guess all's well that ends well
Slacker007 wrote: Good luck to you and your career. Thanks, it's going pretty swell actually!
You too, of course. Have fun with the code reviews
My blog[ ^]
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
}
|
|
|
|
|
Sander Rossel wrote: but I wouldn't want to explain to a code reviewer why I use Generics in my Generics (and how that works), what the difference is between IQueryable and IEnumerable (and what actually happens in the back) and how we can construct Expressions manually.
Who do you expect to you maintain your code - you? For all time?
If not and your code is 'above' the standard of your group then is it your expectation that your company is at fault for not hiring programmers who are not more syntactically advanced?
Sander Rossel wrote: And so far at work I've been the best in what I do..
I have yet to work at a company where anybody said "our programmers are average" much less one that said "our programmers are below average". And very few programmers with any experience at all that were willing to admit that the code they wrote was less than excellent.
Makes me wonder where all of those that must be below the curve are.
|
|
|
|
|
I have yet to see regular working review...
However something that I practice which works just as well, is regular "pair programming" not as in "today we are going to work together" but more like, "hey can you help me or share your thoughts on that problem"
It helps at solving problem, sharing code style and knowledge!
|
|
|
|
|
I think code / peer review is one of the most important aspects for any programmer who isn't working solo. My belief is based on the following reasons;
A) Learning, a novice can be mentored by a developer with years of experience. An experienced developer could benefit from a novice just out of college, who may have been taught a new trick or two.
B) Everyone makes mistakes, you are arrogant if you believe you cannot benefit from someone reviewing your code. Developers get into "patterns" of thought and much like a writer of a novel they could miss the obvious.
C) Auditting & Security, it's important to the client that as a company you can show your practices are designed for quality, peer review is part of that.
I understand that everyone has there own way of doing things but in my opinion thats a different discussion.
Simon Lee Shugar (Software Developer)
www.simonshugar.co.uk
"If something goes by a false name, would it mean that thing is fake? False by nature?" By Gilbert Durandil
|
|
|
|
|
Simon Lee Shugar wrote: you are arrogant if you believe you cannot benefit from someone reviewing your code.
I agree with this statement very much.
It is sad, but there are many arrogant people in our field, and on this site.
|
|
|
|
|
1) As has been mentioned a few times already finding other devs who actually engage during reviews is hard. A better option I've found (after spending multiple months trying to get the team to participate in reviews rather than just say "yup that's fine") is pair programming. Either a full on formal approach where you have all devs working in pairs or a less formal approach where you identify features that will be complicated to implement and have two people pair up to work on it. I've found that the devs are more engaged and it's easier to spot the bad stuff as it's being written.
2) Pretty much only works if you're going the full open-source route. Otherwise, as has been previously stated, you'll probably run afoul of NDAs and IP rights.
|
|
|
|
|
I think the biggest problem with good code reviews are finding reviewers that are familiar enough with the problem or subject matter to give good feedback. Since we are one deep in all positions where I work and everyone is working at 120% capacity that isn't easy. Without that code reviews degenerate into trivial complaints about variable naming, code factoring, and the like. For me having the time to do good unit testing is more valuable than code reviews.
|
|
|
|
|
tom1443 wrote: I think the biggest problem with good code reviews are finding reviewers that are familiar enough with the problem or subject matter to give good feedback
Very good point.
tom1443 wrote: good unit testing
Is always helpful and mandatory for us.
|
|
|
|
|
Both 1 and 2, but because I was the sole developer for a few years.
Now, there's another young person working with me. For the first bit, while he was getting going understanding the app/data/environment/etc, we'd discuss approaches and I'd at least give a quick glance at checkins and discuss alternatives.
He's proven himself to be quite competent though. Now it's when one of us knows we're doing something a bit off, we'll talk with the other..."what do you think about this approach".
It seems to be working well. For such a small company, I don't think we have (or choose not to have) the resources for a more formal review structure. This makes me sad, as I know getting more eyes on the project would only make it stronger.
|
|
|
|
|
I agree, that with small companies, things have to be tweaked in such a way that it works.
|
|
|
|
|
Love 'em, but I do a lot of one man coding myself.
Honestly, I have my editor(s) setup to do a lot of the formatting automatically,
and to reformat my code.
I can't share my code because of NDAs as mentioned elsewhere. But that does NOT mean you
cannot review your own code! As a note, we did all of our code reviews on Fridays. Usually
after lunch, through the end of the day. It was designed to discourage working over the weekend,
and to help us unwind and not be stressed out. I felt it was the perfect way to end the week.
But before coded reviews are started, coding standards must exist. If you have those, then I would
take some time out at the end of the week, and review your own code. Eventually you will find it is second nature. Also, once we determined something to be dangerous (or bug inducing), we updated our coding standards to prevent it. Like declaring a stack based buffer of a fixed size to read in from a stream of unknown length (buffer overflow, anyone?).
I think if you review your own code, and look it over, and would be proud to show it to anyone who asked... You are ahead of 70% of the coders out there. Also, when you find yourself referring to your old code, you will appreciate it and reuse it more...
Kirk Out!
|
|
|
|
|
Code reviews are great for showing new team members "how we do it here".
I usually work alone, but will occasionally ask a colleague, "what do you think of this method/function/whatever?"
On the other hand I'm mostly working with SSIS now, and that isn't code.
|
|
|
|
|
No arguments here. Agree that code reviews are important.
|
|
|
|
|
1) When I make changes that affect a lot of behavior of the application, or I've had to discuss the changes with others at length, I have someone do a code review. The rest of the time I trust that I know what I'm doing.
2) Never, it would be a waste of my time. Nobody who doesn't understand the domain and structure of the rest of the program is going to be able to make any meaningful observations.
We can program with only 1's, but if all you've got are zeros, you've got nothing.
|
|
|
|
|
patbob wrote: I trust that I know what I'm doing.
I hear you but that is a very, very dangerous stance. Just my opinion on that.
|
|
|
|
|
Ice formed with a twist: Look at it[^]
modified 29-Jan-15 10:50am.
|
|
|
|
|
A small description would be dandy... especially when the link is in Finish (or something like that)
I'd rather be phishing!
|
|
|
|
|
Its in Norwegian[^], but I didnt post the translate.google link as the pictures went away.
|
|
|
|
|
If you use Chrome, then you can just open the page and an icon will appear at the right end of the address/search bar. Looks like two grey squares with a couple of dots. Click it, and you get the option to translate the page in situ.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I know, but there are actually people out there that doesn't use chrome
PS: I want that ice in my drinks from now on.
|
|
|
|
|
I'd rather be phishing!
|
|
|
|
|
Chrome offered to translate it for me and seemingly did a great job.
Contrary to popular belief, nobody owes you anything.
|
|
|
|
|
We sometimes get stuff like this happen at Niagara Falls when the conditions are right. The falls give of a constant spray. With temperatures that are not cold enough to freeze the spray as it forms, but surfaces that are below freezing ice forms (much like freezing rain). Add the "right" kind of winds/air turbulence, interesting ice sculptures form naturally.
I've only been there once when conditions were perfect; it was like a scene from Narnia.
Life is like a s**t sandwich; the more bread you have, the less s**t you eat.
|
|
|
|
|
Personally I haven seen an freezing rain on a waterfall, but the pictures i found were truly stunning.
|
|
|
|
|
We get freezing rain here on a regular basis. Because it's normally a transition condition, it doesn't usually last long, but when it does, it's truly nature's savage beauty. Roads become like glass and trees get so heavily coated with ice that they start shedding branches and even limbs. I still have poplars on my property from last years "ice storm" where a 30' tree's top is almost touching the ground. I've cut most of those down for firewood, but there are still a few.
Life is like a s**t sandwich; the more bread you have, the less s**t you eat.
|
|
|
|