Ranter
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
Comments
-
Haha, if they were iterating the values that wouldn’t be too bad but I think you should hit them with a chair.
-
Could you elaborate a bit on what improved? Going through a Dictionary using a foreach doesn't seem like something bad from my perspective. Are you talking about using linq or something?
-
henne2037yThey are probably using the foreach to get a single value out of the dictionary, instead of using the key to get it.
-
leethel1007y"very outdated coding approaches" => honestly it sounds more like trying to cut a tree with a hammer.
-
@BorderKeeper like @henne mentioned, they're iterating through each kvp in order to get a single value out and then doing an exit for :\
-
Thanks for the warm welcome everyone! That is a good name @TheItalianGuy but I'm glad mine was available :)
-
Root797547yHey, welcome!
Good first rant 😊
But seriously, using an O(1) data structure in O(n) time? I'd facepalm so hard...
Related Rants
-
linuxxx32*client calls in* Me: good morning, how can I help you? Client: my ip is blocked, could you unblock it for m...
-
DRSDavidSoft28Found this in our codebase, apparently one of my co-workers had written this
-
linuxxx23*client calls* "hello, we forgot the password to our WiFi router. Could you reset that for us?" 😐😶😮...
I work at a small company that uses very outdated coding approaches for their solutions.
About a year ago I went through our main application to improve performance and found quite a few areas that I could tackle such as using a dictionary data structure in place of (many) foreach loops that required to pull out a single object.
That specific change yielded a lot of improvement (you can only imagine) and the other developers wanted to learn the ways of dictionaries (because it was so revolutionary and new to them). I showed them many examples so that they could better understand this data structure.
Fast forward to a few months later, saw one of my coworker's code and noticed that they were using a dictionary... And iterating through each kvp similar to a foreach..... Wtf?!
P.S. that person's salary is much higher than mine :(
First time rant. Thanks for listening!
rant
wtf
youcanleadahorsetowater...
first rant
dictionary