|
Intellectually I understand that. In most areas of my life I can even apply it.
Here I'm battling 30 years of NOT doing that (being mindful and letting go) where it comes to coding.
Maybe I'm lacking in the willpower department. I usually find ways to hack around my lack of willpower.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
How much of a hardliner utilitarist are you? I very much am and that helps a huge lot in overcoming nonsensical habits.
I wouldn't even say that I'm big in the willpower department, but my utilitarism is a suitable substitute.
|
|
|
|
|
well i am an instrumentalist "what's real is what's useful"
and by real, i mean what exists in any meaningful sense
i am pretty much a hardliner about it maybe, if you'd consider that hardline.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
If you are reviewing code, use your smart editor to format it the way you want so you can understand it.
If you need to make a change after review, revert the file, make your change, test, move on.
And follow this rule:
Rule #1 for source control sanity retention:
Never combine a reformat with an actual code change in the same commit!
Use a separate commit with a "//reformat" comment as the first line for formatting, then remove the comment and do the real change.
|
|
|
|
|
The only strong conviction I have related to coding styles is when changing someone else's code.
It is expressed by:Quote: When in Rome, do as the Romans do. It annoys the elephant out of me when a source file has 4 different styles
because people can't be bothered to conform to what's there or are
so stubborn they want to impose their style on everyone else, or they
simply don't give an elephant about anyone else.
/endRant
I need to stop reading these threads before coffee.
Cheers,
Mike Fidler
"I intend to live forever - so far, so good." Steven Wright
"I almost had a psychic girlfriend but she left me before we met." Also Steven Wright
"I'm addicted to placebos. I could quit, but it wouldn't matter." Steven Wright yet again.
|
|
|
|
|
codewitch honey crisis wrote: I need to be able to use other people's code without feeling a little sick about it, or wanting to refactor it before I touch it
There's an easy cure for this.. work on a project with a lot of devs that has a too-tight schedule and do as you want (i.e. shamelessly refactor all their code to your liking) until you wake up one day and realize that you're the one that needs to be duct taped to their chair so the product can ship on schedule.
Ok, I'm half serious about that answer. The real answer is that you need to realize you can't do everybody else's job for them, and accept that, while they won't do things the way you would, the things will get done well enough to not matter.
|
|
|
|
|
I have. I used to PM even. Code review is good, but if deadlines get squeezed a lot of stuff goes by the wayside, including reviews, and quality control in general
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Some companies put code through a pretty-printer as part of the check-in process. You could try that. But you have to be the first developer...
Boy...constants on the left...I haven't seen that in awhile.
I've been accused of having an "idiosyncratic" coding style because I like to add spaces to visually line up parts of my C++ class definitions. I don't worry about it. It's my practice, and I do what I want. If someone wants to change it, they can. If the coding standard actually says not to do it, then I don't.
Speaking of which, I once had a colleague edit my C++ code to change all the C++-style // comments into C-style /*...*/ comments. If you're reading this, "Whatever, dude."
|
|
|
|
|
My own experience was 1 year of working with very strict coding style guidelines, out of many years where things are much more laissez faire. Literally hundreds of formal rules, plus as many unstated informal one that everyone was supposed to know. Code reviews ended up being a bitch fest where 90% of the argy bargy was about code style. It literally slowed productivity and momentum to a crawl.
On all my other team projects, productivity was much higher, and not necessarily any worse technical debt-wise. Code reviews were simpler and much more productive/pleasant. There are some things one simply should not do (eg exception unsafe code, unnecessary pass-by-value) - everything else, just let it go man. I got quite tolerant of Hungarian notation, for example, just ignoring it as white noise (as it effectively is). You can tell instantly who wrote a piece of code from its style, so any questions, you know who to ask, if they're still around.
|
|
|
|
|
> You can tell instantly who wrote a piece of code from its style, so any questions, you know who to ask, if they're still around.
You make an excellent point. It's as good as a ID card sometimes.
For awhile I worked reversing worm code for a security outfit that was doing IT forensics, to find common authors of the code.
Even reversed from machine code, devs leave their mark.
I dropped hungarian notion
Right now in C++ I use a hybrid of different styles depending on what framework(s) I'm working with.
I don't like to do it, but the alternative is worse.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
She seemed surprised.
Already coated and running...
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
She doesn't have to run after you, you have to go home sooner or later and she'll be waiting.
Women are like that!
I do all my own stunts, but never intentionally!
JaxCoder.com
|
|
|
|
|
And quick-as-a-wink she's gone!
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
guilty.
I usually do it before I sit down to poker.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Hi All,
Walking to the Station this morning, cut through a car park that was used by Junkies and delinquents.
Smashed Stella bottles, needles etc. council gets a grant, claim it's to clean up. No needles, a smashed wooden case and empty bottles of Merlot & Cabinet Savingon. it's not as bad but...
What's changed in my profile, I'm a head, not a Bob!
|
|
|
|
|
Better than being a behind.
|
|
|
|
|
m_park.Subclass(hDelinquent);
just sayin'
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Take a walk on the wild side!
Quote: Candy came from out on the island,
In the backroom she was everybody's darling,
But she never lost her head
|
|
|
|
|
Mad thing, the Bass player on that track was also the Bass player for the Wombles and had awkward descision when both bands were on Top of the Pops together, bless ol Herbie Flowers....
|
|
|
|
|
If he did not choose for Lou Reed I can understand, it seems Lou Reed was not such a nice person to work with ... on the other who ever heard of the Wombles, oh you did
|
|
|
|
|
The Wombles, Childrens stories worth Googling if you have kids 'Under Ground, Over Ground, Wombling Free!'....
|
|
|
|
|
I see the UX guys use this term frequently.
Why not just call it "visual estate" or "virtual estate"
For example:
We need to consider the available visual-estate for the widget.
instead of saying,
We need to consider the available screen real estate for the widget.
|
|
|
|
|
Because the 'real estate' is the key part here - meaning the available space to use... Screen is the global landscape where you look for the 'real estate' to build something...
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
|
|
|
|
|
I think you should just go with the flow, it's hard to change commonly used jargon.
I always had problems with people saying SEQUEL instead of SQL, but I stopped bothering ...
|
|
|
|
|
RickZeeland wrote: I always had problems with people saying SEQUEL instead of SQL, but I stopped bothering ...
Yes, that drove me bonkers for a year or two, too, but I've got used to it over time.
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|