|
No I can deal with Hungarian notation as It was something that was considered good practice when I started with coding.
An example of what I meant about silly naming convetions was..
private ClientPropertyForm m_RW_CPForm = null;
it took me a while to see that this was a supposed to be a read write instance of the client property form.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
that's pretty gnarly, I agree. Another pet peeve I have - arbitrary abbreviations in a variable name. So, in your example:
m_RW_ClientPropertyForm becomes m_RW_ClntPrpFrm.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
ctrl e,d in xaml formats the code, I find I am doing that in all sorts of applications, word, excel, bloody annoying.
VS formats the layout for me so it is consistent and neat. Now old comments are another matter.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I would say that poorly formatted code makes it more difficult to maintain (depending on how badly formatted it is exactly), if it's not easy to spot a bug in the slop then it's harder to fix.
Of course, if you have something like ReSharper installed then CTRL+E+C at which point there's no excuse for sloppy code and the offender deserves a thorough booting!
Eagles may soar, but weasels don't get sucked into jet engines
|
|
|
|
|
I don't care overly much as long as it's readable and consistent.
And doesn't contain that abomination systems Hungarian, from the Redundancy Department of Redundancy.
That said, I prefer Allman style, but I'm not anal about it.
And about messy people.
I know a guy that owns a show car, and his cars and garage are in immaculate condition while his home is a complete dirty mess (unmarried).
It's what you care about. I can imagine the same to be true for coders.
|
|
|
|
|
Two things that really annoy me are sloppy formatting and leaving old commented code. One, formatting is just so easy in a number of environments. And two, if you need the old code, that is what the source control is for. Makes me wonder if a person bothers taking out the trash at home.
|
|
|
|
|
It bothers me a great deal and for very specific reasons. When working in a team, it is not good enough to clean up someone else's code by running an auto format tool. Depending on the tabs vs spaces issue this can potentially be a far from trivial task. Additionally, if you do just clean up every file in a project before you commit your changes, you may be horribly polluting the commit history and your diff will give no one on your team any clue as to what you actually implemented. It's a dangerous game that will compound over time. Best is to review code as a group and set up all of your editors to be consistent. Then define a standard art form that you all agree on. Anything less than that and you're asking for a world of hurt.
|
|
|
|
|
I agree that it irks me when you go to look at someones code and the indenting and spacing is all off (or worse, mix CamelCase and snake_case). I'm a stickler for making sure everything in my code is formatted nicely so it's readable. However I do have 3 kids so the "formatting" of my house and car on the other hand......
|
|
|
|
|
I think it is a sign. There is a sayings I like:
How you do anything is how you do everything!
But there is a timing facet to it as well. I am guilty of being a little sloppy,
and commenting out code. While I am working on it. Clearing my thoughts. And my
office gets messy. But as I wrap up, I truly enjoy going back over the code and
cleaning it up. Of course, this is NOT about indentation, I lost the ability to
work with code that is not indented properly. But while I am working, I admit that
my equal signs in block assignments are not always aligned. My EOL comments don't start
on the same column. And that I have commented out code just dying to be removed.
That's what makes code reviews great. I have 2 reasons to clean it all up when my
confidence in the code quality is high. First, for personal reasons. Second, because
getting called out for that stuff in public is not "pleasant", especially when you are
the boss...
|
|
|
|
|
I suppose i'm super anal when it comes to code layout. Only myself see's my own code but everything is properly commented, indented, and I use the correct PascalCase or camelCase variable naming, and try to stick to as many good practices as possible - I just like looking at 'nice' code lol and doesn't really take any longer to do it right rather than wrong.
|
|
|
|
|
Sloppy code; which to me is any code with bad formatting, no documentation ("my code is self-documenting" == garbage is to be left alone, not documented) and one-letter variable names (how are you saving typing time when autocomplete exists), this type of code has parallels with other services: the contractor who builds a house with crooked studs, uneven walls and leaking water lines or a mechanic who installs used parts as "new" and then leaves engine stains all over the interior of the car.
In each case, the work was performed by a hack with no pride in the craft; someone who should be run out of the industry. With development specifically, I assume such code to have been written by "drag-and-drop" experts who complain that "coding is hard" and celebrate any framework that keeps them from being forced to learn how to code at a lower-level (MEANING: loves to drag-and-drop DB connection controls but could not write simple ADO.Net access code).
Short answer: get out of the industry or join a bro-grammer collective to hide in.
|
|
|
|
|
All my company cares about is delivering on-time and on-budget. Although lip service is paid to quality, those that attempt to do a good job (including writing robust and maintainable code) cannot hope to even come close to meeting schedule.
|
|
|
|
|
Readability and maintainability are at least as important as working code. Sloppy formatting costs time and money, and can lead to bugs. I don't even want to think about how much time I've had to spend re-formatting someone else's code to the point where I can read and fix it.
|
|
|
|
|
Jeremy Falcon wrote: what do you guys think about sloppy code that's not formatted well? I don't think much of it. IMHO code should be formatted so that its intent is clear. While I prefer the K&R style, I'm not picky as long as the style is readable.
/ravi
|
|
|
|
|
Have you ever seen pictures of Einstein's office?
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
|
You've just realised that the cool feature you spent the last 4hrs implementing has already been implemented. By you. And in a neater manner than the code you'd just written.
I can just imagine me-from-a-few-months-back standing behind me, hand raised, about to clip me over the ear.
I'd deserve it.
cheers
Chris Maunder
|
|
|
|
|
Done that more times than I can remember.
|
|
|
|
|
See the discussion just below this one...
I'd rather be phishing!
|
|
|
|
|
Got something similar... Had a meeting in which I got a new request to process some specific data. Since I'm training a backup, it was decided that he would do part of it, for practice.
Scheduled some time to sit down together and work on it. I start to point out the source and destination data, then realize the destination data looks... kind of like the source data.
That's when I realized I already did it four months ago.
I had already created a new solution + project for the new translation tool, and apparently I gave it exactly the same name as I gave the one I wrote four months ago... So at least I'm consistent.
|
|
|
|
|
Been there, done that. Once I bought a book on how to improve your memory. I never read it and put it aside. About a year or so later I bought the same book and didn't realize it until I brought it home to put it with the rest of my books. Good times man... good times.
Jeremy Falcon
|
|
|
|
|
Yeah, that's why I got a vasectomy. Badaboom-badabing.
Marc
|
|
|
|
|
Or when you write a piece of code and it doesn't do what you intended and realize that you had wrote the same crap in the past?
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.
|
|
|
|
|
Early onset of Alzheimer's, perhaps?
Seriously, yes I hate it when that happens, and I think most of us have been there once or twice.
|
|
|
|
|
I guess it really is time to reimplement tasks.
|
|
|
|