|
Many years ago I had one of the original Audi Quattro Turbos - but this one had been fitted with the souped-up sport engine developed for the shortened rally version so was pretty speedy. I was on the M40 heading for good ol' Londinium in the fast lane overtaking a line of cars in the middle lane. They were doing about 90, I was doing about 105 - this was back before speed cameras and before the police were so picky about your speed.
Behind me, an AMG Mercedes zoomed up, flashing his lights wanting me to somehow get out of his way even though I still had quite a line of slower cars to pass. When he got to only a couple of feet behind me and honked his horn I'd had enough. I put my foot down and pulled away up to 125 and faster. He stuck with me, still flashing his lights. I took it all the way up to 145 before I started to leave him behind and then up to 155 just to prove the point. At this point the road went up a long rise and I thought to myself, "If I were a policeman where would I position myself to pick off speeders?" Hmmm... just over the crest of the hill ahead? I moved into the now clear middle lane and slowed down. The Mercedes flew past with a honk of triumph cresting the hill probably still doing 140+. When I crested the hill, doing a very reasonable 95 I saw the V12 Supercharged Jaguar Police chase car roaring after the Mercedes with blue lights a'flashin' and a touch of siren!
A mile or so further along I passed them pulled over at the side of the road with the policeman clearly taking away his licence (for the foreseeable future). I smiled all the way to the big city!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
a few years ago. Teaching my daughter to drive in moms little hatchback. Idiot in jacked up stupid truck comes up behind us at a stop light. Roaring engine. Inching closer and closer to her rear bumper. Daughter is terrified. I just calmly tell her that when the light turns green you just go at a very very normal pace. Do not speed.
Light turns green. Idiot cuts out into oncoming traffic and then back into our lane. Cop about 3 cars back turns on his lights and idiot gets to have a long chat with officer about his bad life choices.
the smile on her face was awesome!
To err is human to really elephant it up you need a computer
|
|
|
|
|
Colorado has laws against aggressive driving and it doesn't matter the traffic levels, non-existent, light, moderate, high, stop and go congested.
Years ago I was driving on C-470 on the south side of Denver and was in the left lane. A State Trooper was behind me. Not wanting to have an officer behind me the whole way across the south side of Denver I got to a nice wide gap in the right lane (about two car lengths) and signaled to change lanes. The guy in the right lane was directly next to the trooper and apparently either didn't care or notice - he accelerated to close the gap preventing me from changing lanes. As soon as there was a gap behind him the trooper put his lights on and changed lanes to be right behind him. The last I saw as I was changing to the right lane was the trooper sitting on the side of the road behind the guy.
|
|
|
|
|
My first visit to Colorado was in 1991, and as far as I could tell over the month I was there was that everyone drove within the speed limit whatever the conditions. I followed this with a week in Los Angeles where everyone seemed to drive at 100 mph, a bit like the UK.
Over the years I revisited Colorado on average twice a year, and noticed that average speeds were getting faster. One day I mentioned this to one of my co-workers and he said it was probably due to all the Californians moving in.
|
|
|
|
|
One old coworker had a story where an unmarked police car pulled over a whole pack of cars in one swoop.
Colorado highway patrol,
“Out of state form a line here.
In state form a line here.”
Writes 20 tickets in 20 minutes.
|
|
|
|
|
I can see the CSP doing just this.
|
|
|
|
|
That sort of thing is common where I live (Xenia, Ohio U.S.). There's a truism here:
"The bigger the truck, the less he has to offer women."
The follow-on is: "Some guys must be an innie."
Software Zen: delete this;
|
|
|
|
|
Gary R. Wheeler wrote: "The bigger the truck, the less he has to offer women."
I've always been suspect of sentiments like this. It may make you feel better to think that the guy with the huge truck is lacking in some other department that's more important, but I have found that some of them are bad dudes, so I wouldn't want to mess with them.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Years ago, I was on the freeway headed home from work. Two yahoos on motorcycles were having a grand old time. Swapping lanes at random. Wheelies. Going slow.
A brown SUV passes me on the left side and gets close to the yahoos before the blue lights came on. I smiled the whole way home.
|
|
|
|
|
There was a piece of code we wanted to look at, to possibly remove it, or hunt a suspected bug.
It turns out it seems hard to remove and and it seems to work. It's just that it fires multiple data event instead of just 1. Which is not really a big deal at all. So there is no really need to change anything.
While studying the issue I did a few things to improve readability (although I suspect that people disagree with me about readability, even though I consistently reduce the number of line of code I refactor... I gave up on convincing anyone), and also, from a cursory glance (without measuring mind you) I intuited that performance would probably be better at best, or same.
Anyway I made a review, and it's not so much that people asked me to measure the performance of my changes, is that I got the feeling they instantly dislike my changes (I used LINQ! damnation)(for be fair I could use a foreach loop instead).. anyway that just demotivated me totally about this whole change request. And maybe I misread it and they don't care just think this is a piece that need measurement before changes - also the guy commenting.. is not communicating very well, at least with me, either he dislike me or has autism or something. Anyway I am demotivated now, it's not really important, I don't really want to spend time justifying it, I rather just delete the change request and move on.
But I look at my reaction.. And.. mm... well.. the question is in the title.
I know. I think I will simply forget about the CL.
If the commentor ask me again, I will replied I thought he didn't like the changes nor they seemed important but I could go ahead and measure the difference now, then!
|
|
|
|
|
That happened to m e more than once over the years ... it really depends on whether you are in a position to fight the guy, or need to protect your job.
|
|
|
|
|
There is nothing intrinsically wrong with LINQ. My only concern would be that LINQ does a lot behind the scenes, and could be less performant than more explicit code
I would measure the performance (resource usage + speed) of the old and the new code. If your code is more performant, you have new ammunition on your side, otherwise it's back to the drawing board...
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
In the end I did the performance measurement.
The gist of it is that the code has no impact on overall operation (a very involved case took 30 seconds, while the bit I edited took 600ms, at worst, or less most time), and the compare the new and old code together, I was surprised that one bit I changed for speed was occasionally slower by 20ms, while an other bit, which I only changed for readability, was consistently 400ms faster....
Anyway, I posted my measurement, and stopped working on it, including not going to commit anything unless directed too....
|
|
|
|
|
If the new code fires a single event, that might be reason enough to keep it.
If not, you will be the owner of future problems around that code.
|
|
|
|
|
You could also just improve documentation/comments on the original code based on what you figured out.
The comments could include the linq code as a pseudo code if that is easier to understand than the original.
|
|
|
|
|
100% agree with englebart here. You took the time to figure out the code, refactor and comment what you discovered so the future you can save time.
LINQ is slower but, not that much slower. Compared to how much time future devs might spend trying to grok the code (again) the readability of LINQ is well worth it. Plus, the optimizers are getting better all the time, so the perf diff appears to be shrinking.
Check it in.
Now, did you mention adding unit tests?
|
|
|
|
|
I think developers lacks soft skills usually. Who is rude to comment the code should not be in the position of doing code reviews, or working in a team, but that should be addressed by your team leader/tech leader.
Btw I don't think a code change without solving any issue (but only readability) should be approved, and readability is very subjective, so if not in agreement with tech lead you should not do that.
Any code change could introduce bugs, so why taking the risk? I don't think I will accept your PR. I use tons of linters and static analysers to make sure devs follows coding guidelines, I'm pretty autistic there. For example in Typescript I disallow the use of "any", but many complain about that (not sure why).
I like LINQ, it makes complex code super easy to read, so I would like to accept your PR, but to what risk?
"Bad performance" in a 30sec task (so it'a not ASM or low-level stuff) that is called sporadically is *for sure* not because of linq, usually you can get a boost with a complete refactoring or different approach.
|
|
|
|
|
To be fair the ticket was mostly "investigate that code" and my finding was "the code is fine", my refactor was to help me understand what was going on. And I submitted it because I found it "better", but do nothing was an applicable outcome.
Anyway, after a good night sleep, I got over it and did some measurement of the various code measurement on an expensive dataset. Where Cut took about 4 seconds, and Paste took about 31 seconds.
Turns out that one little bit I thought was a performance improvement went from 1 milliseconds to, sometimes, 20 milliseconds. Peanuts, but definitely slower (I was puzzled).
Also turns out, another bit I only refactored for clarity, went down from 600 milliseconds to 175 milliseconds (and that was for the "fast operation" that only took 4 seconds, hence 10% improvement).
So those changes were a go in the end!
Oh, and I also demonstrated that LINQ as it was had no performance cost (this much was obvious, but helped reduce LINQ bad performance reputation a bit, I hope)
|
|
|
|
|
If you ever meet someone who loves and embraces changes I think they're either worth getting cozier with or very much not.
It's not always one or the other in all cases. But I'm pretty sure it's one or the other in any distinct case.
The bigger point maybe being that people do generally dislike change.
Everyone in the boat will have a degree of apprehension if you go messing with the bottom of it. Maybe even more so if they don't have the time to fully reassure themselves you're patching vs drilling.
|
|
|
|
|
Open, close - Grace held hired gun? (9)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Mercenary ?
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Open (anag)
close near
ENAR
Grace MERC Y
held (containing)
hired gun?
MERCENARY
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Not seen open used as an anagram indicator but hey ho - I just thought of a hired gun synonym and saw the mercy bit - that was good enough for me and Bobby McGee
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Good song - but there are no wheat fields in Saint Paul.
Edit .......Never mind - mixed up the song with Me and You and a dog named Boo.......
Just ignore me today.
|
|
|
|
|
WHO SAID THAT?
What? Where?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|