Rein Halbersma wrote:hgm wrote:Beware that writing a GUI is between 10 and 100 times more work than writing an engine.
Could you give some reasoning behind this claim? What makes it so hard? (I have no experience in writing GUIs, so honest question here). Is it the logic, the graphical layout stuff, or something else? Do you use any high-level libraries?
From what I have read, things like Qt should not be that hard to get off the ground, e.g. with their scripting tool QML (and Microsoft has similar stuff with XaML) that is preprocessed into compilable C++ one should be able to get a bunch of windows / menus with little code.
I think he is right with those "10 to 100 times". Among the reasons are:
- Even using the best GUI framework means more work than using - nothing (which is what most engines are doing: elementary programming without much need for any library).
- Writing portable engines is easy. Writing portable GUIs is not. Different OS's, maybe different versions of runtime libs installed, different display resolutions, ...
- A GUI shall be used by someone. Therefore you need to test a lot, and users will still complain that it does not match their expectations. Engines, on the contrary, have a well-defined interface. Of course you also have a lot of work to improve, tune, polish, or maintain your chess engine, maybe lasting for years. But I think the "10 to 100 times" was meant for the initial creation of a correctly working GUI that is also *good*. Top GUIs set a standard, and people tend not to accept something below the standard that the already know from other GUIs, so you must at least reach the current state-of-the-art to make people use your GUI. Otherwise it stays a "simple" GUI, subjectively. That can certainly be created faster.
- Writing a GUI needs more design work: graphical design as well as software design.