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
Search - "i need a shrink"
-
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 -
long rant = this;
Jesus. Fucking. Christ.
The task: get Windows 7 on my mom's new Lenovo running win 10.
First idea: dual boot. Go into disk utility and shrink win 10 partition leaving empty partition. Easy!
Unfortunately it all went downhill from there.
Restart, can't get into boot menu. Google says you have to do that from Windows. Ok.
Laptop says BOOTING FROM CD IS NOT SUPPORTED. WTF??
Go into BIOS, enable legacy boot, prioritize legacy. Restart. Ok, it boots from disk.
Go to install 7 on the empty partition and it can't because its an unsupported partition format or some shit. Whatever, wipe everything. Ok, installing windows.
Windows installed, need drivers. Go download them with another computer and go to copy them over with USB disk. Windows doesn't detect it. THIS POS DOESN'T HAVE STANDARD USB DRIVERS?!?!?
Of course, the laptop didn't come with any driver software. I end up burning a fucking CD like its fucking 2001 so that I can get the goddamn wifi driver on it.
Ok, I have wifi. Go to Lenovo site, find driver page. Select all the drivers I want for the model/OS and click download. Lenovo site says "hey, use this driver update software." I'm like, hey asshole, why don't you just give me the drivers i asked for. But fine.
Driver update software downloads, I install it, nothing happens. I run it, it says it's already running. Still nothing. What the goddamn flipping fuck?
I go download the drivers individually. I try to install USB driver. It says my system is not supported. .............Try to install chipset driver, not supported. ............ I can install maybe half of the drivers and I still can't even use a fucking USB mouse. Gonna have to wait for windows update to find it sometime two days from now.
I hope everyone in charge of Lenovos fucking ass backwards pointless piece of useless fucking shit drivers gets raped to death with a serrated knife.22 -
Windows 10 had one groundbreaking UI innovation, but no one adopted it and even Windows 11 discareded this revolutionary idea:
BUTTONS NEXT TO EACH OTHER AND AT THE EDGE OF A BOX DON"T NEED AN ADDITIONAL MARGIN
Windows 10 was the first and last OS where I never accidentally clicked right next to the X on a window, in a passive area that had no other purpose so it might as well have belonged to that motherfucking button.
I passionately hate this trend, adopted nowadays by every OS, that everything needs to be rounded, separated from the things around it, and "allowed to breathe". They don't breathe. They're not alive. They're fucking UI elements and the space between them is unused, lost space.
The only interaction a button has with its surroundings is that it pushes other content away to make room for itself and responds to the cursor. It doesn't wiggle, it doesn't grow and shrink, and it ESPECIALLY doesn't fucking breathe. Please, just let me click the motherfucking button.
Relatedly, do you know of a good, preferably bluish dark GTK theme that provides window decorations that stretch the full height of the titlebar and are laid out next to each other at the very end of the bar without gaps?8 -
I accidentally created something adorable. See, what happened was I wanted to figure out how to programmatically create blobcats for different countries, since I’d done it by hand for every country represented at my company and wanted a quick way to catch up once we add people from different countries.
Enter Cloudinary!
Wrote a transform that would take the image, shrink it to 150 px wide, then add the blobcat emoji as the underlayer behind and above it, then add the little arms I drew die holding the flag on top.
And that worked! I had a folder of flags and the frontend could query them using the transformations and the country blobcats were born! I even added a preset so I could view the little blobcats with their flags when I looked at the uploaded flags
But then I’m like “Eh, each transform adds a thing against my limit and I really don’t want to go over if this gets popular (why do I ever think _that’s_ a possibility?). I know! I’ll just add the transform on upload and reupload all the flags to a different folder! Then I’ll just need to request the image instead of having to do the transform per request.
And that worked!
But I forgot I still had my preset transform on.
So in addition to the successful country blobcat, I had a preview of what I like to call papa blobcat with kitten blobcat.4 -
- I need heat shrink tubes
- go to aliexpress, find the one set I need, order
- receive them to my PO, use a few of them
- I needed parking sensors
- to to aliexpress, find the set I need, order
- the parcel arrives in my country, on its way to my PO
- Today I visit a random site
Conclusion: AI is great at knowing what I have already bought and suggesting the exact same items I've ordered. Because if you've ordered them once you're likely to order them again, right?2 -
Biggest interview of my entire life is coming up on Thursday. I really need this to go well - it's more than double my current salary, at a time where I'm really starting to struggle to make ends meet. There's an actual "team", and from my interactions with them over the last four interviews, I think they're cool people. It's still a little unusual, because although there's a team or cohort of seniors that I'd be joining, every senior developer is still somewhat siloed, leading their own juniors. I'd also get to be remote 75% of the time, which I think I've realized is a "must have" benefit.
I don't know if it's coincidental or just bad timing then that I've been having episodes of pretty intense vertigo and panic attacks far more frequently than normal lately - even before I had this interview lined up. I realized recently that I must have some kind of anxiety disorder. I don't know if that's from the military, or just from being fucked up via my own missteps. But I can't keep having these attacks.
Anyone who's willing to share - I don't really have anyone to ask. How do you deal with this type of thing? I went to see a shrink last year, but he just gave me pills that replaced these issues with others.10 -
TLDR; windows sucks donkey balls
Sometime ago I started to get battery issues on my laptop using windows. Even with 100% charge it would soon display 0% when unplugged.
A few months back I switched to linux on my laptop and on my desk station. And to my surprise, battery issues dissapeared while using linux (manjaro i3). Anybody had that same problem?
Anyway I dual boot win 10 and linux just in case I'd need windows, and this week I noticed my root parition didn't have any space left.
For the next few hours I'm in a car so I thought hey great time to reinstall linux with a bigger root partition. I already had reinstalled windows, and with all the bloat removed, I could shrink my windows partition to make more space for linux.
Now all I need to do is prepare a usb stick with the manjaro iso. I could do that in linux, but since reinstalling windows killed my grub bootloader I couldn't boot up manjaro.
Right, so in windows I go and want to create this bootable EFI usb stick from the manjaro iso. Now the battery issue kicks in again, stating 0%. But with luck, the usb creation finished without my machine dying. Now I just need to restart my laptop and boot from the usb and .... Crap. my Laptop doesn't boot up anymore
-_-
Now i need to wait for a plug to be able to power it up again. Once I boot from the usb I'm sure I could use the laptop some more hours until the battery is actually dead. Fuck windows5 -
I'm almost at the point where I give up on this project, I'm banging my head too hard against the wall here.
I'm making an android app that should make it easier for local fishermen (hobby stuff, not enterprise things) to submit their catches to the local unions. For that to happen, I need to be able to fill a form in the app, more specifically, this form: http://karupaa.com/dk/...
After some research, I managed to figure out its probably a POST request, but I may be very wrong here.
Also figured out the URL to post to is probably either the first url given, or this one: http://karupaa.com/dk/...
I'm extremely confused at on this area, and any help would be greatly appreciated.
I dont really know anything about POST or GET requests, except for the quick comparison I read on W3Schools. Its an area Im lost in.
help :i11