|
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!
|
|
|
|
|
Song by Lobo "Me and You and a Dog Named Boo"
|
|
|
|
|
Quote: Just ignore me today
"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!
|
|
|
|
|
I need to frequently transfer video files, about 30 MB in size between my two machines, a Win10 laptop and a MacBook Air.
I tried Bluetooth and it takes a long time, more than 10 minutes. Whereas, uploading the file to Google Drive and downloading from there onto the other machine, took an overall of under a minute.
Is there a direct wire-based transfer possible between these two machines, which does not need the Internet? Ideal would be USB to USB cable transfer, but does that even exist?
Sorry if this is a dumb question.
|
|
|
|
|
It looks it exists. Search for 'USB bridge cable'.
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|