Details
-
Skillsphp, java, js
-
LocationLondon
Joined devRant on 5/13/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
-
While Apple is putting 12-year-old fingerprint readers into MacBooks, Microsoft is scanning your eyes with Windows Hello. Who's innovative?13
-
"I dont like the way that you splitted your code into multiple small files. Simply put every logic into one controller." - so called "frontend architect" after reviewing a team's Angular code. I dont know what to think.2
-
C#: the only language where you have 0 based arrays and 1 based collections, just to mess with you... Damn you M$!
(spent hours trying to understand why collection[0] was raising an out of range exception...)3 -
this got me into programming, when I saw it during a school function in early 90s. wow there is a whole world inside this...
-
Kinda tired of people telling me that I'm "wrong" for using PHP. There's nothing inherently wrong with PHP. Any language is only as good as the developer using it, and so long as you're comfortable using it and it does what you need it to do, there's no shame in using ANY programming language. Don't let the these cocky "bro"grammers tell you how to do your job.15
-
Pro tip: if you want to day dream at work just open a complicated XML file in your IDE and stare at it intensely any time someone walks past your desk.11
-
Need to work on my focus. I feel like it's one of my greatest weakne ... hey look, a DevRant notification.2
-
I was explaining git and Github to one of my friends during our boring maths class when he asked : "What is the difference between git and Github?". Just then another friend of mine sitting in front turns out and said : "It's like the difference between porn and Pornhub".17
-
I don't care if you're a friend, acquaintance, or we fucking knew each other in high school!
If I fucking agree to do some free work for you, feel fucking happy about it! Don't fucking ask for more work or demand work or give me fucking deadlines just because you know me!
I'm doing you a fucking favor! Do you want me to send you the fucking invoice? I don't care if you're on a budget, I agreed to help you out, but don't you dare fucking cross the line!12 -
One of our web developers reported a bug with my image api that shrunk large images to a thumbnail size. Basically looked like this img = ResizeImage(largeImage, 50); // shrink the image by 50%
The 'bug' was when he was passed in the thumbnail image and requesting a 300% increase, and the image was too pixelated.
I tried to explain that if you need the larger image, use the image from disk (since the images were already sized optimally for display) and the api was just for resizing downward.
Thinking I was done, the next day I was called into a large conference room with the company vice-president, two of the web-dev managers, and several of the web developers.
VP: "I received an alarming email saying you refused to fix that bug in your code. Is that correct?"
Me: "Bug? No, there is no bug. The image api is executing just as it is supposed to."
MGR1: "Uh...no it isn't. Images using *your* code is pixelated and unfit for our site and our customers."
MGR2: "Yes, I looked at your code and don't understand what the big deal is. Looks like a simple fix."
<web developers nodding their heads>
Me: "OK, I'll bite. What is the simple fix?"
<MGR2 looks over at one of the devs>
Dev1: "Well, for example, if we request an image resize of 300, and the image is only 50x50, only increase the size by 10. Maybe 15."
Me: "Wow..OK. So what if the image is, for example, 640x480?"
MGR1: "75. Maybe 80 if it's a picture of boots."
VP: "Oh yes, boots. We need good pictures of boots."
Me: "I'm not exactly sure how to break this to you, but my code doesn't do 'maybe'. I mean, you have the image from disk.
You obviously used the api to create the thumbnail, but are trying to use the thumbnail to go back to the regular size. Why not use the original image?"
<Web-Dev managers look awkwardly towards the web devs>
Dev3: "Yea, well uh...um...that would require us to create a variable or something to store the original image. The place in the code where we need the regular image, it's easier to call your method."
Me: "Um, not really. You still have to resolve the product name from the URL path. Deriving the original file name is what you are doing already. Just do the same thing in your part of the code."
Dev2: "But we'd have to change our code"
Mgr2: "I know..I know. How about if we, for example, send you 12345.jpg and request a resize greater than 100, you go to disk and look for that image?"
<VP, mgrs, and devs nod happily>
Me: "Um, no that won't work. All I see is the image stream. I have no idea what file is and the api shouldn't be guessing, going to disk or anything like that."
Dev1: "What if we pass you the file name?"
<VP, mgrs, and devs nod happily again>
Me: "No, that would break the API contract and ...uh..wait...I'm familiar with your code. How about I make the change? I'm pretty sure I'll only have to change one method"
VP: "What! No...it’s gotta be more than that. Our site is huge."
<Mgrs and devs grumble and shift around in their chairs>
Me: "I'm done talking about this. I can change your code for you or you can do it. There is no bug and I'm not changing the api because you can't use it correctly."
Later I discovered they stopped using the resize api and wrote dynamic html to 'resize' the images on the client (download the 5+ meg images, and use the length and width properties)22