Jump to content

Creating GUI - Is it cheating?

Hi P

Creating a program GUI by using a designer such as QT saves so much time, but feels like it's the wrong thing to do... as if I were cheating.

 

Is it better to just code everything from scratch?

 

Thank you

Link to comment
Share on other sites

Link to post
Share on other sites

You could argue if you're using anything other than Notepad, nano, or similar, you're cheating.

 

Use whatever tools makes your life easier. If anyone else says otherwise they're just salty 

 

EDIT: There are some reasons for programmatically adding the GUI elements, but for the most part, figure out what works for your situation.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Hi P said:

Creating a program GUI by using a designer such as QT saves so much time, but feels like it's the wrong thing to do... as if I were cheating.

 

Is it better to just code everything from scratch?

 

Thank you

No, there's nothing wrong with using a visual design tool.

 

No one is interested in tons of boilerplate code that does nothing but setup a window and some controls. Doing it manually is a pain to create and maintain.

 

Link to comment
Share on other sites

Link to post
Share on other sites

Using autocorrect features for an essay would also be cheating then. 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

You should care more about performance than cheating while using libraries or frameworks. That's the only reason which could possibly matter.

Link to comment
Share on other sites

Link to post
Share on other sites

15 hours ago, Mira Yurizaki said:

Use whatever tools makes your life easier. If anyone else says otherwise they're just salty 

I disagree. Adding multi-megabyte JavaScript files to websites makes "your life easier" as well, but you still shouldn't do that unless you have a very good reason to.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Dat Guy said:

I disagree. Adding multi-megabyte JavaScript files to websites makes "your life easier" as well, but you still shouldn't do that unless you have a very good reason to. 

Clearly we aren't talking about website design.

We are talking about using tools such as WPF and QT to create GUIs for desktop applications. I'm not sure about QT, but XAML/C# is nearly as fast as manipulating Windows in C++. You do loose some features (well, not really. P/Invoke is useful) that might be useful, but unless you're designing a game, do you really need blitting?

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, straight_stewie said:

We are talking about using tools such as WPF and QT to create GUIs for desktop applications.

Which is the same thing, that's why I chose the example of JavaScript bloat. WPF and Qt add quite a lot of overhead, including their very own C++/C# dialect. You could ignore the security and performance implications. But you really should not.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Dat Guy said:

Which is the same thing, that's why I chose the example of JavaScript bloat. WPF and Qt add quite a lot of overhead, including their very own C++/C# dialect. You could ignore the security and performance implications. But you really should not.

I'm curious, where do you draw the line with regards to performance for GUI framworks? If you wanted to make a win32 application, would you only work directly with GDI objects for everything?

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to comment
Share on other sites

Link to post
Share on other sites

If you want to achieve the best performance and the lowest overhead: yes. But you'll find yourself writing your own API wrappers soon. ;)

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Dat Guy said:

But you'll find yourself writing your own API wrappers soon.

Would you make a wrapper for every project, or would you abstract that wrapper into its own system so you can reuse it in other projects? Because if you do that, it just sounds like you wrote your own GUI framework lol. Which is fine, but then you are basically just weighing the engineering cost of writing in house vs using existing technologies.

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to comment
Share on other sites

Link to post
Share on other sites

52 minutes ago, reniat said:

it just sounds like you wrote your own GUI framework lol

The resulting code is nothing else but a plain Windows API code, so there is not a single additional header file or even library needed.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

19 hours ago, Dat Guy said:

The resulting code is nothing else but a plain Windows API code, so there is not a single additional header file or even library needed.

That still sounds like a lot of lower level GUI code, which is still an engineering cost to consider.

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to comment
Share on other sites

Link to post
Share on other sites

17 minutes ago, reniat said:

That still sounds like a lot of lower level GUI code, which is still an engineering cost to consider.

It also just smells like premature optimization if this is something someone wants to consider before they even have a working app.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Mira Yurizaki said:

It also just smells like premature optimization if this is something someone wants to consider before they even have a working app.

and premature optimization makes knuth mad!
image.png.77296d48bb2e033b2dd549252287e7c1.png

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×