Details
-
Abouthaving spent a couple of years in finance I jumped ship into the Dev world about 11 years ago and never looked back.
-
Skillsfull-stack Web Dev (html/css/sass/js/php), python3, etc. Looking at getting into erlang/elixir.
-
LocationUK
Joined devRant on 6/9/2017
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
-
Most satisfying bug I've fixed?
Fixed a n+1 issue with a web service retrieving price information. I initially wrote the service, but it was taken over by a couple of 'world class' monday-morning-quarterbacks.
The "Worst code I've ever seen" ... "I can't believe this crap compiles" types that never met anyone else's code that was any good.
After a few months (yes months) and heavy refactoring, the service still returned price information for a product. Pass the service a list of product numbers, service returns the price, availability, etc, that was it.
After a very proud and boisterous deployment, over the next couple of days the service seemed to get slower and slower. DBAs started to complain that the service was causing unusually high wait times, locks, and CPU spikes causing problems for other applications. The usual finger pointing began which ended up with "If PaperTrail had written the service 'correctly' the first time, we wouldn't be in this mess."
Only mattered that I initially wrote the service and no one seemed to care about the two geniuses that took months changing the code.
The dev manager was able to justify a complete re-write of the service using 'proper development methodologies' including budgeting devs, DBAs, server resources, etc..etc. with a projected year+ completion date.
My 'BS Meter' goes off, so I open up the code, maybe 5 minutes...tada...found it. The corresponding stored procedure accepts a list of product numbers and a price type (1=Retail, 2=Dealer, and so on). If you pass 0, the stored procedure returns all the prices.
Code basically looked like this..
public List<Prices> GetPrices(List<Product> products, int priceTypeId)
{
foreach (var item in products)
{
List<int> productIdsParameter = new List<int>();
productIdsParameter.Add(item.ProductID);
List<Price> prices = dataProvider.GetPrices(productIdsParameter, 0);
foreach (var price in prices)
{
if (price.PriceTypeID == priceTypeId)
{
prices = dataProvider.GetPrices(productIdsParameter, price.PriceTypeID);
return prices;
}
* Omitting the other 'WTF?' code to handle the zero price type
}
}
}
I removed the double stored procedure call, updated the method signature to only accept the list of product numbers (which it was before the 'major refactor'), deployed the service to dev (the issue was reproducible in our dev environment) and had the DBA monitor.
The two devs and the manager are grumbling and mocking the changes (they never looked, they assumed I wrote some threading monstrosity) then the DBA walks up..
DBA: "We're good. You hit the database pretty hard and the CPU never moved. Execution plans, locks, all good to go."
<dba starts to walk away>
DevMgr: "No fucking way! Putting that code in a thread wouldn't have fix it"
Me: "Um, I didn't use threads"
Dev1: "You had to. There was no way you made that code run faster without threads"
Dev2: "It runs fine in dev, but there is no way that level of threading will work in production with thousands of requests. I've got unit tests that prove our design is perfect."
Me: "I looked at what the code was doing and removed what it shouldn't be doing. That's it."
DBA: "If the database is happy with the changes, I'm happy. Good job. Get that service deployed tomorrow and lets move on"
Me: "You'll remove the recommendation for a complete re-write of the service?"
DevMgr: "Hell no! The re-write moves forward. This, whatever you did, changes nothing."
DBA: "Hell yes it does!! I've got too much on my plate already to play babysitter with you assholes. I'm done and no one on my team will waste any more time on this. Am I clear?"
Seeing the dev manager face turn red and the other two devs look completely dumbfounded was the most satisfying bug I've fixed.5 -
We need more positivity:
Reason why you like coding? / Reason why you chose it as your career? / Why wouldn't you want to do something different?
Best feeling when coding
Nicest colleague/Best teamwork experience/Best boss/easiest client
What do you like about your position/job/company
Besides coding, what makes you happy
Your favorite stack/language/working environment3 -
TFW you inadvertently blow up a production site..
"This shouldn't break anything.."
*3 minutes and 10 emails later*
"Oh shit, that broke EVERYTHING!"2 -
!rant
The Sound of Typing (an original dev parody of "The Sound of Silence")
Hello caffeine, my old friend
I've come to sip on you again
Because my mind continues sleeping
While overpiled work is creeping
And the deadline that is flashing upon my screen
Can't be unseen
Within the sound of typing
Down the lines of buggy code
I quickly switch to debug mode
What kind of moron wrote this function?
For this unnecessary junction?
Wrapped in a condition that will always return true
I need a brew
To forget the sound of typing
Boss said I you do not know
WordPress like a cancer grows
A one page website doesn't need that
Still I wear my debug hard hat
And when I sleep I still see the same terror
Fatal error
Echoed in the sounds of typing
And every time I leave my home
I must launch chrome on my phone
The constant messages and phone calls
The chiming echoes through the halls
While I frantically fix some FooBar'd CSS
BUT I don't have LESS
Deep in the sounds of typing
And when I think I have it done
Some scope creep ruins all my fun
So now I force through an all-nighter
While I forge on like a fighter
But the project I thought was due on next Friday
Changed to Monday
Within the sound of typing9 -
When I get myself a coffee in the morning, opening up my IDE, looking at the legacy code.. my brain starts yelling: "out of the way coffee, this is a job for whiskey"2
-
This weekly is getting really popular with so many rants coming in.
Shows the extent to which real coders/programmers/developers are tormented by the incompetent education system.
Here is my two cents:
Students should be taught to build their logic on paper before jumping on to their keyboards.2 -
My first script in Python.
It's amazing how it is simple manipulate spreadsheet data.
I'm a PHP developer and the same task would require ton of line codes.4 -
Most succesful project was around this time last year.
A scary club of privacy haters made a 'webapp' to advise people what to vote for in the national elections.
The tool was really bad in multiple ways. For instance, if two parties would score the same amount of points, one would, at random take second place without conveying this to the user.
Oh and it also collected all the data people entered "for scientific purposes". A very sketchy practice, a non profit, funded by the government and George Soros (I kid you not, illuminatie confirmed ;) ).
The tool had this disclaimer on the bottom, saying this webapp needs cookies to function. So that triggered me to make a copy of the tool that works better and ... offline, and without cookies. You could download a html file and turn of your wifi (for the paranoid ppl among us), use the tool, delete the file. No trace.
It was a little bit of tung and cheek project, a gimick, the original was called stemwijzer, mine was called offline stemwijzer.
It was a one day build and a day after launching I got a call of the original stemwijzer project leader. Demanding to take the thing offline for infringing copyright (yeah sort of was). I tried to explain him why I made this and why privacy for such things should be held in high regard. He basicly told me I was talking shit and did not want to discuss, I told him I don't take stuff offline because of phone calls. I told him to email me a seist and desist.
So that guy prolly had a stressful day (because of the launch of his tool), had a few glasses of wine, and wrote an email. He wrote me I was a pathtic kid and I should do more useful stuff. He wrote that anyone could program a tool like that. And he wrote me I should do him a favour not share this email with my measly amount of twitter followers. Super professional email.
So I did him that favour, I did not share it with my twitter followers, I shared it with one of the largest political blogs in the country.
My tool sort of took of after that. To stop infringing copy right I changed the name and I removed their content from the script and wrote instructions on how to copy and paste in the json content yourself and "make your own tool".
The response was great, people actually emailed me job offers and I think that the current job I have is due to the succes of said project. So be balsy, challenge giants, start riots, it will get you places.2 -
Elon Musk: Space junk is a serious issue
Also Elon Musk: I put a Tesla into orbit lol
Love this guy15 -
The best way to learn something imo is starting a project
I used to start small projects for that but now im doing my biggest project with laravel now its 90% done2 -
2 loads of laundry... check
Bit of time of Battlefield to get rid of some stress... check
Glass of whiskey to keep me coding...check
Wow - I've actually got a few minutes to spare on my home project! -
4+ years of programming.
Still have no clue how to make my own regex pattern.
Every single time I need to, I always open 4 cheat sheets and/or stackoverflow.24 -
Walking on water and developing software from a specification are easy if both are frozen. (Edward V Berard)
-
Guy called in because he wanted to get an IP white listed on a server. He wasn't authorized so i told him to send an email from an authorized email address.
He didn't like that very much and asked if another engineer was available (he talked to him more often so he thought that engineer would just do it. We need those kind of requests by email.)
Walked over to my colleague and explained what that client asked for.
'let him send an email!'
Told him i ready told the client that but that the client wanted to talk to him instead.
'sure, connect him through and then come back so you can hear him after i ask him to mail us!'
Connected him through. Client explained the situation.
Then he says with the sweetest voice and a 'get rekt' face: 'could you send me an email about that? 😊'
Let's just say that the client sounded everything but happy xD3 -
Them: Maintaing code quality is a vital part of our team culture!
Me: Really, how important? Can a feature slip to facilitate necessary refactoring?
Them: Well no. We've made a commitment to the client.
Me: So, code quality is not very important then is it... -
A little ago, a devRant user drew something awesome (fantasy stylish) of another devRanter.
I said in the comments that I'd kill for a drawing of my own character!
A day later I got a mention. He'd drawn my character!
Thanks a lot @ichijou! I find it awesome, it's in a frame on my wall now :D30 -
Me: Coffee has more coffee than energy drinks.
Coworker: You're right, coffee does have more coffee than energy drinks.
Me: I meant caffeine!19