r/programminghelp • • Dec 24 '20

Other Choosing sizes in general.

Everywhere I go with programming, if I have to make a UI, I always need sizes, most often in pixels. If it's with percentages, I'm fine. But with pixels, I get this overwhelming feeling or something like it. It annoys me.

I can't seem to get explainations anywhere, and it really messes with my creativity

Since English isn't my main language, I just can't get to the terms for looking it up.

How do you all do this? How do you calculate how many pixels you need for a new window? Do you follow default sizes? Do I need to make myself a protocol with default sizes?

.

9 Upvotes

1 comment sorted by

3

u/amoliski Dec 24 '20

That's one of the tougher aspects of UI development- you have to either specify a fixed size and hope your user has a screen that can handle it, make things small (800x600 or 1920x1080) to try to allow the biggest number of people to use it at the expense of wasted screen real estate on larger monitors, or go down the reactive road and design it to scale parts based on the window size, which is the best usability-wise, but way more work on your side.

My personal solution is to make all of my applications use a REST API and interact with it using a web browser (or use Electron) and a reactive library like bootstrap. Let someone else do the work for me.