You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.0 KiB

Graphical User Interface

Graphical user interface (GUI) is a visual user interface that uses images; basically this includes icons, colors, shapes, mouse cursor, windows, buttons, pictures etc. This stands in contrast with text user interface (TUI) which is also visual but only uses text for communication.

Expert computer users normally frown upon GUI because it is the "noobish", inefficient, limiting, hard to automate way of interacting with computer. GUI brings complexity and bloat, they are slow, inefficient and distracting. We try no to use them and prefer the command line.

GUIs mostly use callback-based programming, which again is more complicated than standard polling non-interactive I/O.

How and When to Do GUI

GUI is not forbidden, it has its place, but today it's way too overused -- it should be used only if completely necessary (e.g. in a painting program) or as a completely optional thing build upon a more suckless text interface or API. So remember: first create a program working without GUI and only then consider creating an optional GUI frontend.

Still, when making a GUI, you can make it suckless and lighthweight. Do your buttons need to have reflections, soft shadows and rounded anti-aliased borders? No. Do your windows need to be transparent with light-refraction simulation? No. Do you need to introduce many MB of dependencies and pain such as QT? No.

The ergonomics and aesthetic design of GUIs has its own field and can't be covered here, but just keep in mind some basic things:

  • Don't have too many elements (buttons etc.) at the screen at once, it's confusing as hell and drives noobs away.
  • Things must be intuitive, i.e. behave in a way that they normally do (e.g. main menu should be at the top of the window, not the bottom etc.).
  • Just use your brain. If a button is important and often used, it should probably be bigger than a button that's used almost never, etc.