PDA

View Full Version : GUI programming? Naah!



Mario F.
10-12-2006, 07:02 PM
This is not a poll thread, although it could be. I'm just curious as to if anyone else doesn't feel that drive towards moving their C++ learning (or experience) to GUI development. I mean, I feel more excited in learning the workings of C++ and some of the concepts like multi-threading, RAII or design principles like the PIMPL idiom, than I am of learning to program in Windows or any other GUI for that matter.

It is a fact that I have absolutely no intention of ever going professional with C++. I'm not learning it to put it in my resume. My resume in fact is a thing of the past. I'm getting ready to abandon the programming profession. I'm learning it because I love programming and this is finally the time I can devote myself to C++. But is there anyone else out there who doesn't really feel inclined to GUI programming and instead prefer to dwell on other aspects of the language?

Perspective
10-12-2006, 09:16 PM
GUI programming is one of the most dreaded aspects of programming IMHO.... I'd be more than giddy if I never wrote another GUI again, thats what the code monkeys are for :p

Dave_Sinkula
10-12-2006, 10:35 PM
But is there anyone else out there who doesn't really feel inclined to GUI programming and instead prefer to dwell on other aspects of the language?I've tried to go GUI several times in the last decade, but it never took. It just doesn't fit well with what I do.

Wraithan
10-12-2006, 11:31 PM
I have felt inclined several times, I have learned wxWidgets enough to do basic GUI. But, in general, I can't justify the time it takes to make a good GUI for any program I write, since I would rather use it comandline and/or make a P/TK interface that sets a config file... then upon hitting the run button executes the program with those settings.

P/TK GUI takes ~3 hours to make nice one :D

(For those that don't know P/TK is portable TK ( believe that is the name ) and I use it with Perl.

SlyMaelstrom
10-13-2006, 12:26 AM
After taking a semester of Visual Basic Programming... where the teacher was more interested in seeing a pretty font than he was seeing an efficient sorting algorithm... I've felt inclined to never look at a GUI, again. In fact... I read this forum via the command line...

... or do I?

twomers
10-13-2006, 12:38 AM
>> I read this forum via the command line...

Me too. Your milk carton is an array of moving dots. It's rather cool.

I got a book about GUI, but never used it (got it for £5 when I was in Scotland last sumer, and didn't really look at it much). (I'm thinking lots of the windows programming guru's will be here agreeing with the majority soon ...)

maxorator
10-13-2006, 01:46 AM
GUI is nothing more than "user-friendly" design. There are many types of software that cannot be developed without GUI. There are many types of software where GUI is pointless. But if you develop software for dumbusers, you should choose GUI.

I personally think GUI is fun. Nothing more. Just fun.

Mario F.
10-13-2006, 03:23 AM
Good to know I'm not the only one. Truth be told though when I look at WxWidgets, WinAPI or even MFC C++ code, I struggle to make sense of it. So probably there is also an hint of fear and lazyness on my part there.

Since I do enjoy exploring the language, there may come a day that I will simply wake up wanting to try it. But I'm pretty sure the main motivation is the lack of motivation. Even during my Visual Basic days, I was always more interested on algorithms, code correctness and language features than I was really interested on the actual development of applications for windows.

maxorator
10-13-2006, 04:23 AM
No wonder you don't like GUI programming... you started with Visual Basic!!!

Mario F.
10-13-2006, 04:33 AM
Actually I started windows programming with Delphi and Command Center ++.

However... I'm curious... have you ever programmed in Visual Basic? I mean really program, not dabble in it.

I love it this Visual-Basic-Sux steryotype that people developed from hearsay. It's even more fun when you consider that a vast majority of windows business applications running everything inside a company from budgets to paychecks were developed in Visual Basic.

twomers
10-13-2006, 04:42 AM
>> have you ever programmed in Visual Basic?

Me '-' Nope. Not even a dabble, to be honest, which is why I generally don't go into the whole 'VB sux' thing.

Cat
10-13-2006, 04:43 AM
I do GUI work on virtually all the applications I make. Usually I write applications to fill a purpose for which I can't find a prewritten applications, and in general, if it's complicated enough to need a program it's usually complicated enough to need a GUI.

I use MFC for most, WinAPI for the rest. I've considered learning C#/.NET programming as GUI work is supposed to be a whole lot simpler, but I do just fine in MFC.

And no, never did Visual Basic myself; when I learned BASIC there was no such thing (that would have been circa 1989 or so), and by 1991, when VB 1.0 came out, I was using C++ (though admittedly very poorly for a few years).

Mario F.
10-13-2006, 04:44 AM
Me? Nope. Not even a dabble, to be honest, which is why I generally don't go into the whole 'VB sux' thing.

I wasn't talking to you, silly.

twomers
10-13-2006, 04:44 AM
I know. I meant to put a '-' instead of a '?' there ... sorry for stealing the post :(

Darklighter
10-13-2006, 06:24 AM
I find the Win32 API interesting and gratifying. I'm far from having mastered C++, but I feel like learning Win32 at the same time is a good change from the not-pretty-looking console programs.

CornedBee
10-13-2006, 07:13 AM
I still haven't found a GUI library with that special approach that I really like. Neither have I the time and inventiveness to come up with the approach.

I wish a Boost.GUI would be developed.

SMurf
10-13-2006, 07:13 AM
The problem with GUI programming I feel is that there's no real "standard" way of doing it. Yeah you can use a cross-platform lib as being a de facto standard, but otherwise you're held hostage by whoever wrote the lib, their prejudicies and coding quality. If they're an idiot, you have to learn to be one too.

Broadly speaking, Win32 is pretty good as far as pure windowing and graphics goes, but some things MS have done really suck. X is a slightly different paradigm, people coming from Win32 sometimes bang their heads against it but I believe it serves a different purpose.

Compare this to command line usage with the ISO standard library and it's pretty obvious which is the easier option. Just remember that if one day you feel that you're good enough to at least mimic a commercial application, consider what a GUI would do for the non-programming user. ;)

Mario F.
10-13-2006, 07:36 AM
Absolutely. However I would probably choose the "have a good shell and let someone else come up with a GUI". Or provide an API. :)

I do love the shell. I consider it a very productive environment for many different type of applications. Consider gdb; I don't think it's only the lack of a decent GUI that makes most of us want to use its shell. There is a lot of functionality that is lost in a GUI translation, buried behind menus and submenus, key combinations, overlapping windows and lack of screen real estate.

I did fall in love with the shell in one of the worst possible case scenarios; Many years ago while administering a VAX/VMS computer and those lovely 5 line commands just to make a backup.

maxorator
10-13-2006, 07:41 AM
The problem with GUI programming I feel is that there's no real "standard" way of doing it. Yeah you can use a cross-platform lib as being a de facto standard, but otherwise you're held hostage by whoever wrote the lib, their prejudicies and coding quality. If they're an idiot, you have to learn to be one too.
There IS a standard. For Windows, it's Win32 API. For Linux, it is POSIX (I am not too sure about this one).

SMurf
10-13-2006, 07:45 AM
But it's not a standard in the same way that the ISO standard library (which currently doesn't handle any GUI) is, which works on any compliant platform instead of just one.

Mario F.
10-13-2006, 07:50 AM
I believe only a portion of the Windows API has ever been standardized. And that is the interface to the C programming language.

There is no standard.

twomers
10-13-2006, 07:51 AM
Nor is there a spoon.

Boost GUI would be cool!!

maxorator
10-13-2006, 07:54 AM
There is no standard.
What do you mean by standard? A platform non-specific library?
If so, that's NOT possible with GUI. The closest things are the Win32 and POSIX APIs.

It's like asking "What is the standard way to cut things?".
To cut wood, you need a saw. To cut an apple, you need a knife.
To cut paper, you need scissors.

Mario F.
10-13-2006, 07:59 AM
Nope... I mean by standard what a standard means.
The description of the Win32 API internationally recognized and agreed by means of an independant body. ISO, ANSI, ECMA, etc...

EDIT: And you didn't answer my question yet, Max

valis
10-13-2006, 12:38 PM
Max, standards *do* exist, POSIX is one of them; Windows has a POSIX subsystem in fact. And no, POSIX isn't a graphical specification, something like OpenGL is (although not a GUI obviously).

It is not meant a single GUI library that is cross platform, simply a description of what functionality a platform, language, etc. should supply to the developers.

I think Windows should just adopt X.


And to answer the initial post, I really loathe GUI stuff, I've done WinAPI, mfc, wxwidgets, and some qt. I just find it tedious, no real problem solving--simple piecing together of a giant cryptic lump of functions and classes.

SlyMaelstrom
10-13-2006, 08:01 PM
I love it this Visual-Basic-Sux steryotype that people developed from hearsay. It's even more fun when you consider that a vast majority of windows business applications running everything inside a company from budgets to paychecks were developed in Visual Basic.Well, take it from me... I know from experience. Visual Basic sucks... from a programming perspective. It's absolutely hideous. They hide data, they're regularly implicit, they use terrible logic... it's really just disgusting. However, you can make some very nice GUI very simply in it. If you're righting a simple App for Windows that requires very little logic like a small hand calculator, then VB isn't a horrible option. However, I still would rather use Wx-DevC++ to work with drag-and-drop GUI building. :) I just feel more comfortable knowing that anything in the application, I can see and change in the code if I want.

maxorator
10-14-2006, 02:31 AM
Drag-and-drop isn't programming.

VirtualAce
10-14-2006, 02:40 AM
The only GUI programming I've done is MFC and no matter how structured I start, it all ends up being spaghetti code by the end. But GUI is a necessary evil and now I'm beginning my own GUI in DirectX b/c the one provided by MS is not my cup of tea.

All of us are dreading the design phase of this GUI system....I think all of us here dread GUI in one form or another.

Prelude
10-14-2006, 06:27 AM
>I'm just curious as to if anyone else doesn't feel that drive towards moving their C++ learning (or experience) to GUI development.
First, I'm not qualified to write GUIs. On top of that, my area of expertise is fundamentally at odds with front-end development. I've kept abreast of current technologies and techniques, but I honestly don't feel the need to write pretty interfaces when the guy a few doors over is so much better at it.

Wraithan
10-14-2006, 11:11 AM
Providing a nice API then handing it off to someone who likes/is good at writing GUIs does sound like a pretty good idea.

lilrayray
10-14-2006, 11:26 AM
It's like asking "What is the standard way to cut things?".
To cut wood, you need a saw. To cut an apple, you need a knife.
To cut paper, you need scissors.

Well, you can also cut an apple with a saw and I expect if you really wanted to you could cut a piece of paper with a saw ;)



Drag-and-drop isn't programming.

Ahh, but when using a form editor, after you have "dragged and dropped" an object, you need to edit the newly created code in order for the app to be even the slightest bit useful.

maxorator
10-14-2006, 11:48 AM
Well, you can also cut an apple with a saw and I expect if you really wanted to you could cut a piece of paper with a saw
I've tried, it's impossible.

System_159
10-14-2006, 12:04 PM
I started out in Visual Basic, and I think it actually helped me out a bit. I learned to look at the program as a whole, and get teh basic ideas down before moving on, and that's what's setting me apart in my C++ classes now.

As for learning GUI's, I'm intereseted, but only because I know most people would look at the run window of a standard C++ window and just kinda sit there. People like pretty things, and if you want to write a program on your own and have it succed, you're going to have to learn at least some kind of graphics.

Here's a very large program I wrote in VB in High school. It's a trigonometry tutor. A lot of it is just designed pages, but at the school(where they use it on a regular basis now), it's very neat. It saves encrypted files of the students names/password/progress to a hidden folder in the trig teachers section on the network. So the teacher can login from anywhere in the school to check on students progress, but if you were to look at the files you'd just see a bunch of letters and numbers that don't make sense.
Anyway, change the .txt to a .zip, and read the "read me" inside first.

maxorator
10-14-2006, 12:20 PM
So the teacher can login from anywhere in the school to check on students progress, but if you were to look at the files you'd just see a bunch of letters and numbers that don't make sense.
Those are called binary files.