Details
-
AboutI'm just a random programming nerd. I write code at work and as a hobby. I don't shy away with any project or task. Actually, I could be a masochist in that regard... Since the harder it is, the better.
-
SkillsC#, js, vb, vb .Net, c, c++, Java, node, python
Joined devRant on 7/12/2019
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
-
Praised be the developer/customer! 6 hours listening to him how HIS WAY is the ONLY way to write clean and reusable code! And teaching us how to write HIS way!
No matter how it ignores normal conventions, his way will ALWAYS be the better one! And to everybody who codes otherwise... we call them WRONG!!!!!
Anything you would like to change? NO! We will write it the way "WE thought it before" (I think he meant "HE thought" and impose into us... but... well, I guess I'll have to endure...)
It is the first meeting for this project, and I already want to jump off of a bridge :)2 -
A couple of days ago I needed a RS232 to USB adaptor.
Went to a store:
Me: Do yo have any RS232 to USB adaptor?
Him: Only to USB-C
Me: Ok... Now I just need a USB -> USB-C adaptor
Him: But what kind of TV do you want to connect?
Me: Wait. WHAT?
Him: Yea, you want a VGA to USB? Why do you need that?
Me: No, RS232, I don't need VGA...
Him: Ah... ok, no... we don't have any...
(Funny story... almost the same happened in 3 stores in a row....)
fml8 -
The whole app was a shitshow...
- Cancel order as a post request (the same post request used to save the order).
I demoed the client how with a couple of lines of code I could change his "Cancel order" button to "Mark my order as payed" button....
- List orders method took an user id as input...
- Update profile did not care about wich properties you should be able to change as a non admin...
And so on...1 -
When we had to implement urgently a small project estimated in two weeks. Took me an afternoon. 3 years later, still works, not even 1 bug.1
-
We did retrieve the whole list 20 lines ago, didn't we?
Well, who cares... Let's retrieve it again IN A LOOP, im EACH ITERATION.
and then for good measure lets make another query for each item, each time we retrieve the list. Why not?
I have to make an effort not to swear right now. I have been asked to optimize a particular oiece of code...
Ffs3 -
Ffs
var filteredList = HugeList. Where(Condition);
if(filteredList.Count() > 0)
DoSomething(filteredList.First());
Just no. Please.10 -
Yesterday: Deloyment will be delayed untill further notice.
Today: we have 20 minutes to ready everything for deployment.
Wonderful2 -
I've just seen the documentation of an api I have to communicate with, and facepalmed when I have seen that some actions return 404 on success. And more bizarre things... Just wanted to make it worse for me, didn't you?
Once at it. Why don't you glue spikes onto my keys?
Ffs8 -
The codebase I'm working with hss rarely comments on it. But when there are comments written they are shit like:
//Kill Matt
//don't ask me where that hard-coded value came from, it just works
//we have to add the elements to the fucking list
Reeeeally helpful. Yep.2 -
After hours of debugging a legacy binary which throwed an unknown error. Realizing that it was expecting an array starting at 1.1
-
Every time I see this kind of flow:
1) Insert a new record
2) Get MAX(Id) as the inserted records Id
3) Operate with the result (possibly adding related entities and such)
I sigh so hard, it hurts.1 -
You have to integrate company A system with company B.
You look up B`s api documentation, write the necessary code, test it thoroughly. Done
__________________________________
A wild dev from B has appeared!!!
------------------------------------------------------
him > you cannot use this SDK to implement this solution. You must use a different one...
You > (coming back to him after scouring through the docs) . Ok which sdk is it then? I can't find it anywhere. Could you send it to me pls?
him > I don't kbow, my knowledge doesn't go that far. Send an email to the dev department.
After sending the email, and spending a couple of days trying to figure out which sdk was he referring to. His department answers that the sdk you should use, is the one you already used. The only one they have.
A couple of days lost, because certain smart-ass could not refrain himself from meddling in the project.
What would you do?
Note: Killing him is out of the question :)8 -
Me from the future
Only because if I say enough nice things about him, he might not come and kill me when he reads and maintain some of the code I wrote the other day....
me > You heard it me from the future, right? your cool! right?... I didn't want to! There was more code like it! I just followed what was written!!!
me from the future > Run!
me > (⊙_⊙') ohh shi.. -
This customer's dev is going to be the end of me. I had to explain to him why it doesn't make any sense to return a value after throwing an exception.
In a function that was supposed to insert a record amd return its id, in the error handling code:
catch(Exception ex) {
//logs the exception
throw ex;
return - 999; //this code will NEVER be reached, and why the f.... - 999?
}
The customer wants us to develop the project together, but he won't listen and always write whatever he wants. Some might be differences in taste. Like me preferring
if(condition) {
return a;
}
return b;
And him preferring :
Foo result = null;
if(condition) {
result = a;
} else {
result = b;
}
return result;
Ok, that I can accept. But things like the one I'm ranting about... I wont.
I'm starting to wonder what was he doing during his "9 years of coding experience"10 -
1. I can be both lazy, and productive
2. I will always have something new to learn, always.
3. It is fun.3 -
A piece of code someone just pushed:
In pseudocode
------------------------
Function foo()
Result = GetFoo()
If result != null
DoStuff()
Return result
Else
Result = null
--------------------------
Ffs.
It's written in a strongly typed language, and the whole function is in a try with an empty catch and inside yet another try with an empty catch. Guess he wanted to be sure no error got away....
Oh, and he has 9 years of experience, and since all paths don't return something it does not compile12 -
> me: trying to explain to a dev from one of our customers why should they worry about sql injection in their application -which by the way is public- since they always concatenate params (even giving concrete examples in their app on how could I gain acces to their database with just a couple of queries)
> me: (thinking) Did I change my bed with a time machine by accident and got myself into the past?
Do these things happen often to you? (U_U||) -
The other day, I customer of ours asked me to try to improve the performance of an application of his in a particular method. The method in question taking more than 5 minutes.
I took a look at what it did in the profiler, and it shocked me. More than 100k selects to the database, to retrieve 116 records...
I took a look at the code... Scores of selects in nested loops inside other nested loops inside of... That seemed normal to them...
At the end after we improved it's performance it took 3 seconds...
What shocks me the most is that the customer is a developer himself, really knowledgeable and has an order of magnitude more experience than I do. Am I too anti "worthless database round-trips"? Is that normal? :S1 -
Recently I have started working with a company with a codebase older than I am. Hundreds of different projects with GoTos everywhere, and all error handling rendered useless by the continuous use of On Error Resume Next.
I feel like a mixture of Indiana Jones amd Gordon Ramsay...2