Details
-
AboutJust a guy with some skills and at least half a brain.
-
SkillsVBA, JS, PHP, HTML, Electronics, Computers, Tech
-
LocationNew Zealand
Joined devRant on 11/11/2016
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
-
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 -
Guys ! Need some help !
I am a final year CS undergraduate;will graduate in 2017 . I have been working with a team of freelancers developing websites and apps for the past couple of years. The thing is our client base is very small and the income is unstable because of our poor marketing and lack of good developers. Our team lead only doesn't maintain any version control,no code comments,sub standard code, and spends all the savings(we keep some money aside for expenses like meetings,traveling as a team etc) on movies,hangouts etc . I cannot tell it to his face but I have been looking to move out for sometime.
Should I continue freelancing by myself or apply in jobs ? And if I apply in jobs, do I apply as a fresher or a someone with a couple of years of experience ?
And if I continue as a freelancer,where do I start ? I checked upwork and freelancer.com but they have some cut-throat competition out there .5 -
@dfox Can we have the option to include code blocks in rants and comments? So that they're formatted as monospace text? I mean we can get around it with pictures, but it would be a nice option to include code with an appropriate font. =)12
-
That weird moment when you get an error "please contact your administrator" and then you realize that you are the administrator..4
-
So I spent a good 12 hours today trying to figure out why my 4 line vbs program wouldn't run. Turns out Visual Basic and Visual Basic Script are completely different things! Who would have known!1
-
New guy: There's a memory leak in my code.
Me: You need to free the memory you previously allocated.
New guy: Already did that, deleted everything from my "Downloads" folder and some stuff from my Desktop.
Me: *Long Pause* Have you tried "rm -rf /" yet ?4 -
On his first week at job, the junior says:
Hey guys! Check out this new website I found! You'll thank me later.27 -
Finally I found a webpage related to my bug.
The page is from 2004.
*keeps reading*
"Yes, yes! This is exactly the problem I'm having"
*Carefully reading each comments*
*Looking at scroll bar with stress*
*Almost coming to end, no signs of solution*
At the end the thread creator say: "Ah finally I've fixed the problem. Thanks everyone for helping"
*moment of silence*
WHY U NO SHARE THE GOD DAMN SOLUTION? YOU FUCKING IDIOT17 -
I put an Easter egg into a product, that if you enter the string "final countdown" into the stock code search field, it plays a YouTube vid of Europe's "The Final Countdown", in a hidden div. It's an in-joke for a few people in the company.
A well meaning maintainer with no sense of humour or judgement takes over and goes on the warpath against any hardcoded strings. The secret code gets moved into a config file.
A third developer changes the deployment script so that it clears any configs that aren't explicitly set in the deployment settings.
So the secret code is now "".
Literally every PC in the stock buying department is now blaring out "The Final Countdown" at top volume.
...Except none of them have speakers, so it remains this way for over a year and two more changes of maintainer.
I just noticed this afternoon and quietly re-hardcoded the string. The buying dept.'s PCs will silently sing no more.31 -
I now understand the double tap feature. It's really useful when your reading devRant while eating.6