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
![](/static/devrant/img/pipeless-devrant-banner-white.png)
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "resizing"
-
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)23 -
Friend asked me to help with his HTML5 form validation. His back-end work was decent, but whoever did the front-end... Oh boy.
They used media queries for mobile etc, which was fine. Until I saw what the queries did. Instead of resizing the form accordingly, they hide the visible one and make another one visible.
WHY WOULD YOU DO THIS7 -
!rant
devCraft MineCraft server update:
Thanks to my friends YoungWolves, Mehrsun, and @AlgoRythm, the server spawn is looking nice! we're working on the Survival world
Special thanks to algo for the icon resizing!
All you need is ComputerCraft 1.75 (for 1.7.10) to join!
the Port is 25565 / default.
ip: 66.243.225.5169 -
Recently I've played around with the Seam Carving algorithm for the content-aware image resizing.
It turned out that the algorithm is pretty powerful, elegant but yet simple. One of the interesting parts was that it might be optimized with the Dynamic Progrming approach. Also, it may perform a simple object removal from the image without even modern ML algorithms.
I've tried to describe my experience here in the interactive article:
https://trekhleb.dev/blog/2021/...5 -
After years or Windows, I bought a Mac.
It is a shitty OS.
Resizing windows? Nope
Uninstallign apps easy (some) ? Nope
Show/Hide files easy? Nope
Jump between chrome windows? Nope
Wtf is wrong with you Apple?34 -
git commit -m "fixed bug where div wasn't resizing with window size change. Next I'll work on new bug which makes it so the pages won't load at all"3
-
My boss still thinks that resizing his browser is equivalent to mobile testing, and his designs are desktop only and says "just have everything stack on top of each other"
below is how I feel.
* {
position: absolute;
Z-index: 1;
Top: 0;
Left:0;
}3 -
Yeaaahhh that moment when the program flawlessly crunches through ten thousands of files, only limited by the slowish HDD! :-)
In full multi-threading, tons of dynamic buffer resizing, pointer shit left and right, also two star programming, and everything written in raw C!14 -
Building on my last rant, a friend told me that resizing the partition caused the blocks to be no longer aligned, whatever tf that meant. So i adjusted the partition table and reboo—-
Grub: OHAI THERE, DO YOU KNOW HOW TO USE A GRUB RECOVERY SHELL? NO? WELL FUCK YOU BECAUSE HELP ISNT A VALID COMMAND HERE. FIGURE. IT. OUT.10 -
Don't hire monkeys that write shitty code that cause production issues.
Just spent the entire morning with our global team (10+ ppl) looking into the cause of a production issue.
Root cause: shitty code that anyone that has read an algorithm book (array resizing costs) and understanding how DB functions should be used and why (bulk inserts vs one at a time) would never write.
Even the code itself is a mess...8 -
A added bonus of writing in UIKit and in Swift is the automatic macOS support. Yes, this is the devRant rewrite working on macOS, fully featured. And while this still requires some work and some fixes involving window resizing and how to handle image resizing, this is surprisingly usable for almost no dedicated macOS code!
(This post was sent using the AltRant client on macOS)11 -
I didn't posted something in a long time so...
TL;DR: FUCK YOU ANDROID STUDIO YOU FUCKING SHIT PIECE OF SOFTWARE
Thank you for your time.
I am running my own meme social network. For quite some time I wished I knew a Android developer, which could help me.
Because I know java I tried it myself, and Android studio is one of the worst programms I've ever seen.
My app crashed the whole time, just because my studio version was 1 behind. Updated studio, everything worked.
My layout wasn't showing correctly, reopened Studio, all layouts deleted.
For no good reason video views aren't resizing, so I need to use exoplayer.
One video on my platform nearly crashes the app when creating a thumbnail.
And so one....
I fucking hate Android studio...
(PS: if your a German, Swiss, Austrian you could check out my network and may become a beta tester of the app)15 -
I have a meeting today with our UX designer to explain why we can't provide a Photoshop resizing functionality to a block level element inside a content editable div. That will be hard.2
-
I just pulled an all-nighter to write an usability testing protocol in Microsoft Word for a medical mobile app.
- statement of consent and privacy declaration; easy: 1 hour
- structuring the protocol and writing the different use cases; easy: 1-2 hours
- layouting the document so the tables don't look like utter shit and adding dotted lines into the columns so the user can write in it without fucking up the whole document when resizing a simple column width; a fucking nightmare: 5 hours
Why is the creation of a nice layout so inefficient to the point where I'd rather design a form in CSS and send it to my printer, get your shit together!3 -
My hands started shaking today when I was about to resize a partition on a live, production hypervisor.
Who came up with the idea that the only way to *inflate* a partition was to fricking delete it and recreate it again?!
I know that as long as I keep its start at the same disk sector and only increase the partition size, not decrease it, its gonna be fine. Still. Deleting stuff on a live system makes me nervous.5 -
I wonder if they thought about responsive design back in the 90s while resizing terminals in desktop computers..2
-
This guy in a youtube tutorial is continuously moving AND RESIZING his windows to switch between chrome and the text editor after each little change, and this is physically hurting my head😖 WHY DOESN'T HE USE ALT+TAB7
-
Our IT team keeping our PET Production server alive by resizing partitions on the fly.
#living-on-the-edge
#caveman-practices -
Oh come on, checkboxes are for booleans, buttons for actions... *hrmpfgrmlwtfisthisshit*
(note: the resizing is not a ui failure but from cropping two screenshots handsfree)3 -
I encountered a really weird bug today in my javascript. I'm working on a CMS and one of the things it handles is adding, uploading and resizing images. So, one function adds an empty image to the dom, unselects the currently selected image and selects the new empty image. Pretty straighforward right? So the problem is the unselect function didn't want to work. The image is added and gets selected but the previous image is also still selected.
I set a few breakpoints checked every variable but everything was the way it should. So after an hour trying things I discovered that if I removed the code where the image get added to the body the deselect function works (innerHTML += element) I thought maybe a little timout between these two actions would work but it didn't work. It looks like all dom actions lock up after the empty image gets added. I didn't understood so I moved the unselect function to the above the image add code and it worked wut ??.
code before fix:
func:
body.innerHTML += html;
unselect();
select();
after:
func:
unselect();
body.innerHTML += html;
select();
Atleast its fixed now -
Ugh.
I got a common cold and was operating on half a brain the last days - today, it took me about half an hour to find the option/flag to set when resizing a shape in the CAD-Tool. Dm
Programming is impossible atm. I hate this feeling.2 -
that feel when the mothfacka uses around twenty different fonts, and not be able to even name them, and don't get me started on the arbitrary resizing of links, and the seemingly random positioning of round shaped elements2
-
Those tiny find and replace dialogs drive me nuts. I had to use a plugin for Notepad++ to get one that supports regex and RESIZING THE FING WINDOW...sorry gvim, you're regex is strong but your gui is weak.
-
I really hate doing all the tweaks for tablet and mobile on websites. No matter how hard one tries to design for mobile first and make the transitions as seamless as possible, there are always some “fiddly bits” that won’t behave. And so many devices with all their viewport width variations. Also, there’s the matter of people resizing a desktop browser to any width that might not be covered by the breakpoint ranges that specifically. One could write a hundred breakpoints and still not account for it all on some designs. It’s exhausting.2
-
Resizing my partitions without backup and moving them between disks.
Never had a failure but i guess it could be risky3 -
Not dev but, enough for the story. Had an assignment to create a hashtable for my DS course. Asked a friend how he managed resizing and the load factor
Friend= tablesize*50
Me= what...
Friend= space complexity what... -
Damn, we seriously need a more professional system to test (the appearance of) our web apps in all browsers.
Also especially the resizing behaviour with flex items & Co.
What do you use for that? It can be a paid solution, if it is not too expensive.5 -
Devrant bug: If the screen size is changed (by resizing app in multi-view) content disappear.
Apps should be able to cope with screen size changes during runtime - check android documentation, especially for Nougat.
@dfox10 -
I currently work on a project where every teammate is trying to write as complicated code as they can. I suppose the idea is that way the client could never understand the codebase and we'll be developing and maintaining forever. Now I have to develop a functionality for resizing and rotating SVGs and they probably expect me to write obfuscated code to.2
-
I sometimes cant scroll on devrant in the web version. I can scroll through rants but not the comments of one rant. It just jumps back to tje beginning of the rant all the time.
Anyone else?
It seems to be connected to resizing the firefox window. If it's smaller, gg. Thats it. No comment reading for me.
Anyone else?2 -
Trying to write a program a la `man` in ncurses and just, is this hell?
I just want a floating header, a scrollable main body that reads from a file, and a command line footer, why is that so difficult? I finally got it to handle resizing terminals but now I need to try to compile it for windows, which does have unofficial ports of ncurses, but I have no idea how to use them.
Should I just restrict the windows version to a non-interactive command instead of a TUI like I want?2 -
I'm currently working on a polyfill for backdrop filters. It's going great so far, stuff like backdrop blur is just so awesome fur UIs! The polyfill will be compatible with WebComponents, :hover, :active..., transitions and scrolling/resizing. Would you have use cases for this?4
-
Just wanted to do some scripted image resizing for school in school because the teacher asked me to help her with that.
So I thought: Let's just write a tiny script. Written the script in almost no time (just iterates over all jpg's and resizes them)
30sec.
Now I tried to run it. Didn't have my laptop so I had to somehow run it on their windows PCs. At least it's windows 10, unlike other schools that still run XP and stuff so I thought it might be doable. Well guess what, nope it wasn't.
First tried to install imagemagick, that didn't work as only teacher accounts have admin and the teacher was already pretty scarred once he saw me doing stuff in powershell so I thought I'd better not ask to do this via a teacher account and mess with stuff as admin.
Next method: Installing msys2. That worked at least (after taking forever to install and having to mess with the av software to get it to run).
And there comes the next problem: pacman doesn't connect via the proxy so I can't download any packages. There is free wifi but only for teachers, and students aren't going to get access until the school finally has a faster connection because they'd (understandably) cause this connection to be constantly overloaded. I just happen to have access to this wifi network, too, because at least the guys from the IT dept know how bad using proxies under linux is. So I connect via wifi and it works. At least I thought: After running the script it yields weird errors about unsupported arguments even though the command is exactly the same I have been using for years (already checked typos twice)
Then got the idea of simply installing imagemagick on termux on android and transferring the files onto my phone.
Too bad we aren't allowed to attach our own USBs to the pcs. Luckily I got a rooted phone so I simply activate adb over network and connect to it.
After downloading the platform-tools I can't run them because of AV software. Luckily there is an option to add an exception per executable so I do that. After doing that it works.... nope it doesn't. The wifi only allows 443/tcp and 80/tcp, even for internal network devices.
So that's it. I'm simply going to upload that stuff to my nextcloud and convert it at home.
Windows, I hate you!!!2 -
Since we are sharing some of our more interesting commits, what do people think of these commits?
General: pro.user update
297af8f
Refactor: Hide and show Spin Boxes on Normalization
6a4e1f3
Refactor: Dynamic resizing refactoring
964f0ae
Refactor: Dynamic resizing across any screen
5890a35
GUI: Measure screen size and assume the proper size.
13f2cb4
Fix: guitest.cpp has been reafactored
5cbc1b4
Dir: Clean unused directory
32c8384
GUI: Hide and show Spin Boxes on Normalization
84db444
Commits on Jun 28, 2016
GUI: Make boxes more bolded
3d23952
General Commit: 11:03 PM 6/28/2016
678c249
Del: build from previous commit
e428041
Fix: Guitest's compiled code was broken
25f546f
GUI: Make window scrollable.
07091fd
Adjust; Changing directory tree -
I am building a synth program for producing waveforms such as binaural. The programs I have used in the past have been mediocre.
In that project I am working on a realtime scope to visualize the waveforms. It is fun to learn how to streamline moving data between parts of the application. Right now it has a lot of unnecessary data copying going on, and resizing of vectors. So I am reading some books on high performance C++ to learn how to do this better. As part of this I am thinking about building a circular buffer so the vector is never resized and is always in contiguous memory.
Just plain fun!4 -
So i have decided to rewrite my old project from the ground. This time propely with all the bells and whisles and the proper planning.
Before i ever could start hammering at my keyboard in VS like a monkey i have encountered a few problems:
1.I want for it to be Reeeeesponsive or whatever yeet the kids think is cool now. So winforms arent going to be cut it, i would have to manualy handle resizing of the buttons and text. So UWP or WPF are the only choice.
2.I want it to be multiplatform. Some users might want to use it on windowsnt so i have to be prepared. Options: Winforms or .netcore without gui......
3.Licence - I want to allow people to use it but i always want them to know who the author is. That app wont get that much attention so allowing people only to use it is the safest option.
I wish there was a easier way...
Still i love C#5 -
I was making a local mockup-site using the images for Office365.
And then I notice some REALLY peculiar.
All of the images where in fine dandy 68px png.. but Microsoft Access was in 65px jpg.
https://products.office.com/sv-se/...
CSS resizing is a no-go.. guess I'll just have to yank and mess around with vectors in PS for a fucking miniature picture.. Access brings us nothing but pain
I still can't believe how lazy of Microsoft this is.1 -
https://github.com/ilechuks73/...
its been a while I ranted on here. A lot has been happening and I'm going to take a day off to let it out on here. oh yes 😂😂😂.
the link up there is a little feature I want to implement in a bigger project. I cant seem to get the resizing feature to work in firefox. you hover over the handles in between the divs and drag to resize them but don't work in firefox. I have hosted this on github pages and the link to the page is available in the readme file. works only with a mouse.
thanks ahead.2