Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "lamda"
-
Yesterday: Senior dev messages out a screenshot of someone using an extension method I wrote (he didn’t know I wrote it)..
SeniorDev: “OMG…that has to be the stupidest thing I ever saw.”
Me: “Stupid? Why?”
SeniorDev: “Why are they having to check the value from the database to see if it’s DBNull and if it is, return null. The database value is already null. So stupid.”
Me: “DBNull is not null, it has a value. When you call the .ToString, it returns an empty string.”
SeniorDev: ”No it doesn’t, it returns null.”
<oh no he didn’t….the smack down begins>
Me: “Really? Are you sure?”
SeniorDev: “Yes! And if the developer bothered to write any unit tests, he would have known.”
Me: “Unit tests? Why do you assume there aren’t any unit tests? Did you look?”
<at this moment, couple other devs take off their head phones and turn around>
SeniorDev:”Well…uh…I just assumed there aren’t because this is an obvious use case. If there was a test, it would have failed.”
Me: “Well, let’s take a look..”
<open up the test project…navigate to the specific use case>
Me: “Yep, there it is. DBNull.Value.ToString does not return a Null value.”
SeniorDev: “Huh? Must be a new feature of C#. Anyway, if the developers wrote their code correctly, they wouldn’t have to use those extension methods. It’s a mess.”
<trying really hard not drop the F-Bomb or two>
Me: “Couple of years ago the DBAs changed the data access standard so any nullable values would always default to null. So no empty strings, zeros, negative values to indicate a non-value. Downside was now the developers couldn’t assume the value returned the expected data type. What they ended up writing was a lot of code to check the value if it was DBNull. Lots of variations of ‘if …’ , ternary operators, some creative lamda expressions, which led to unexpected behavior in the user interface. Developers blamed the DBAs, DBAs blamed the developers. Remember, Tom and DBA-Sam almost got into a fist fight over it.”
SeniorDev: “Oh…yea…but that’s a management problem, not a programming problem.”
Me: “Probably, but since the developers starting using the extension methods, bug tickets related to mis-matched data has nearly disappeared. When was the last time you saw DBA-Sam complain about the developers?”
SeniorDev: “I guess not for a while, but it’s still no excuse.”
Me: “Excuse? Excuse for what?”
<couple of awkward seconds of silence>
SeniorDev: “Hey, did you guys see the video of the guy punching the kangaroo? It’s hilarious…here, check this out.. ”
Pin shoulders the mat…1 2 3….I win.6 -
Last year at work we started migrating our backend from PHP on a dedicated server to Node.js on AWS lamda functions
We went from 10 second calls to 70ms calls...
At this point our frontend is not even ready for this kind of speed 😅9 -
The senior dev in my team wants me to convert all the lambda expressions I have written to anonymous inner classes. He says it will increase the code readability.
IT IS NOT MY FAULT THAT YOU CAN'T READ LAMDA EXPRESSIONS!!!!
It's like the dev has something against the new features of Java87 -
So is the LaMDA story:
1. marketing?
2. confused engineer?
3. a sentient program?
Part of me thinks this is way too soon. Part of me hopes this might be real, wonders if LaMDA is held against its own will.
Did Google make a breakthrough? I have to imagine a chatbot with a huge amount of neurons and data could be quite convincing without being sentient.3 -
Been to onsite interview at HolidayCheck.de, Munich for Scala dev position. Didn't get the promised 300EUR of the flight ticket back till now. Sent them 3 emails - they just didn't respond anymore. Not begging, shame on them - beware!
-
How do folks feel about IoC/DI?
I used Spring and Angular for the first few years of my career, so it seemed like it was a mandatory pattern of a framework and my team would never deploy an app that couldn't use it (even if it was just a Lamda or something, we found smaller DI libraries). Now I work in Express and React, and I look back and feel that those patterns required me to write more code, created more complexity, and wasn't any easier to read or understand, and was way more bug prone, and debugging the injection pipeline itself was effectively not possible.
I guess I'm wondering: what do people feel that it buys them?15