The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
That would actually annoy me: the code getting tested and debugged isn't the same code as the release version, and is likely to get "out of step".
So it works in dev, and fails in prod. Nasty, to my mind.
I'd rather go with the former version and rely on the optimiser to remove the intermediate variables in prod.
Sent from my Amstrad PC 1640 Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
That was an "in the interest of completeness" thing.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
Thank you for this comment… Recently I took over some relatively big
Java/Eclipse/Tomcat projects and I see such things all over the place …
I even have no time to change this but it should be changed, of course
It's the mindset indeed of such "devs" that is totally wrong …
I hate code like that. I hate it more when I submit code for a code review and I'm told to do things like that. I quite like code like;
Product p = GetProduct(params);
I know that GetProduct returns a Product class and the code lets me debug to see what "p" is. Invariably someone who "knows better" will tell me to use "var" or more likely just "return GetProduct". The reason it annoys me so is that when it comes down to compiled code it makes no difference. Optimisers render the output the same.
I remember in one job the tech lead had a hard-on for defining constants in their own classes (nothing wrong with that) but declaring them as static strings. I said we should use constants instead, I then began to explain "Because the compiler...." and he cut me off there saying "I don't care what the compiler does, we shouldn't change our code due to the compiler." Ok....strings it is then.
Frankly, I've been doing similar stuff myself quite frequently albeit after verifying that all the building blocks work.
A stack trace of the exception being thrown usually helps debugging when something truly unexpected happens, although I wouldn't consider Deserialie(UserProvidedData) an overly valid use case for such one-liners.
the y2k bug come to my mind. on a 8bit computer one byte per date is a huge space optimization, but i don't believe that mainframe COBOL programmers had to be that careful.
also, i remember reading about an "optimization" of the old day ms-dos assembly programmers using the inability of i8086 to address more than 1MB so they wouldn't mind generating segment:offset addresses that past the megabyte barrier, because it will roll over and map into the address space of the zeroth+ segment. this of course caused latter compatibility issues.
there was a similar man made "optimization" problem on the first mc68000 Amiga's, but i don't recall enough info to check what was the trick there.
As a bit of a sock nazi I DO actually miss one feature in my current socks:
- which socks belong together,and could help sort them out
I struggle each morning to find two matching socks.
They're all black, of the same fabric, and the same product line, but some are older than others, some are shorter, some have been worn on my left foot and others on my right...
Sometimes I grab two socks, try them on both my feet, and then put one back and try another.
If only my socks came with a color code so I could keep them together (like a red/green/blue L on one and a same colored R on the other, that's "smart" enough for me)
Stoneyowl here: The latest Chrome browser does not show a login/password text box, so I had to login using my Facebook account (which I almost forgot I had).
Regardless, to comment on OG's IoT item: Working remote from home, and living in south Florida, I have not worn socks in over 2 years (except when my wife requires it) - flip flops are my foot apparel of choice
Last Visit: 26-Jun-19 12:46 Last Update: 26-Jun-19 12:46