Ye Olde Rocket Forum

Go Back   Ye Olde Rocket Forum > BARCLONE > Software
User Name
Password
Auctions Register FAQ Members List Calendar Today's Posts Search Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-15-2011, 05:36 PM
CPMcGraw's Avatar
CPMcGraw CPMcGraw is offline
BARCLONE Rocketry
 
Join Date: Mar 2005
Location: Mobile, Alabama
Posts: 5,357
Default How Qt is it?

I'm starting to learn the basics of the Qt environment, using the latest Qt Creator and the first edition of <b>C++ GUI Programming with Qt4</b>.

C++ has long been my "language of choice", but the tools available have been either cumbersome, inadequate, under-developed, or over-priced. Now that I'm getting comfortable with Linux (Ubuntu 10.10), the thought of "design once, compile many" comes into play; Qt seems to cover that without much effort.

I can now create a "main screen" and an "about box" after only a couple of chapters of the book. Plug-ins (an alternative to DLLs) is something I've been wanting to work on. Other GUI IDEs I've tried (wxDevC++, Code::Blocks, Lazarus...) cannot handle forms-based libraries. Qt is also supposed to handle such tasks easier.

Anyone else out there using Qt in regular day-to-day programming? I know Rocksim is written with it...
__________________
Craig McGraw

BARCLONE Rocketry -- http://barclone.rocketshoppe.com
BARCLONE Blogsite -- http://barclone.wordpress.com
BARCLONE Forum -- BARCLONE Forum

BARs helping BARs

SAM 0044
AMA 352635
Reply With Quote
  #2  
Old 03-15-2011, 07:29 PM
Bill's Avatar
Bill Bill is offline
I do not like Facebook
 
Join Date: Sep 2008
Location: North Tejas
Posts: 3,087
Default

I had been avoiding it because of the strict distribution restrictions. Now that is has gone LPGL, it may be time for another look.


Bill
Reply With Quote
  #3  
Old 03-15-2011, 10:34 PM
Solomoriah's Avatar
Solomoriah Solomoriah is offline
Incorrigible Kit Basher
 
Join Date: Jul 2006
Posts: 1,888
Default

I do all my work these days in Python with GTK.

I just don't see the point of futzing with C++... I get all the objects I need in Python without compiling or dealing with memory issues etc. No, it's not as fast. When I need fast, I build a plugin in C to do that part, then write the rest of the program in Python.

Way, way easier to debug.
__________________
NAR # 115523
Once upon a better day... SAM #0076
My site: http://rocketry.gonnerman.org
Reply With Quote
  #4  
Old 03-16-2011, 10:34 AM
Bill's Avatar
Bill Bill is offline
I do not like Facebook
 
Join Date: Sep 2008
Location: North Tejas
Posts: 3,087
Default

Quote:
Originally Posted by Solomoriah
I do all my work these days in Python with GTK.

I just don't see the point of futzing with C++



I am guessing you do not work on something like Rocksim which is commercially delivered to run on end-user hardware?

There are tools intended to bundle up an app written in Python into a single executable, but I am not aware of anyone using it for anything commercially significant. Protection of the source code is very important in that arena and even Java is considered by some to be insecure (easy to decompile).

Many, many years ago, a friend and I were badly burnt by a brace nesting bug in C and set upon to write a joke paper along the lines of the infamous GOTO Considered Harmful piece. We outlined a programming language dubbed WYSIWYG which used indentation for denoting block structure instead of braces like C or begin/end like Pascal. We did not get it done in time for the publication deadline of the April issue of Dr Dobbs and forgot about it before the next year came. I still have it in WordStar format on a 5 1/4" floppy disk somewhere around here. We concluded that indentation was an unworkable method back then due to the numerous flame wars over hard tabs versus spaces for indentation and the advent of editors like Brief allowing the user to configure the number of columns per tab or even a totally arbitrary tab rack. But I seriously digress...

I am somewhat surprised that Python and now Spin are using indentation for that purpose.


Bill
Reply With Quote
  #5  
Old 03-16-2011, 11:18 AM
Solomoriah's Avatar
Solomoriah Solomoriah is offline
Incorrigible Kit Basher
 
Join Date: Jul 2006
Posts: 1,888
Default

Quote:
Originally Posted by Bill
I am guessing you do not work on something like Rocksim which is commercially delivered to run on end-user hardware?

No. Most programmers actually don't do that sort of thing. However, if I did want to, it wouldn't be hard. Python is very embeddable, or I could use py2exe to generate an installable program. I've used it to create software such as my rocket database (which I need to update on the website, but I think I messed up the automatic database update code).

Quote:
Originally Posted by Bill
There are tools intended to bundle up an app written in Python into a single executable, but I am not aware of anyone using it for anything commercially significant. Protection of the source code is very important in that arena and even Java is considered by some to be insecure (easy to decompile).

Facts I care not a bit about. I'm a true believer in Open Source software... about as devoted as I could be without becoming a jerk about it. I will happily deliver source code to anyone who wants it.

Most of my work these days is on "vertical" software; my biggest software development customers are county property tax offices. When I develop software for them, it's theirs. I consider it inherently wrong to write software on an hourly basis (where I'm paid every hour that I work by the customer) and then try to claim that I still own it and they only have a license. I'm sorry if you believe that way... I don't mean to offend. But I do consider it wrong, and I don't do it.

The counties I work for all do things a little bit differently, so software that is perfect for one is not for the others. However, by being careful to write generics generically, I'm able to share code between them and save them all money (a fact they all understand and agree with).

Quote:
Originally Posted by Bill
Many, many years ago, a friend and I were badly burnt by a brace nesting bug in C and set upon to write a joke paper along the lines of the infamous GOTO Considered Harmful piece. We outlined a programming language dubbed WYSIWYG which used indentation for denoting block structure instead of braces like C or begin/end like Pascal. We did not get it done in time for the publication deadline of the April issue of Dr Dobbs and forgot about it before the next year came. I still have it in WordStar format on a 5 1/4" floppy disk somewhere around here. We concluded that indentation was an unworkable method back then due to the numerous flame wars over hard tabs versus spaces for indentation and the advent of editors like Brief allowing the user to configure the number of columns per tab or even a totally arbitrary tab rack. But I seriously digress...

Ironic, eh, that your joke became a popular reality.

When I first saw Python source code and learned they used indentation, I too thought it was some sort of joke, and I abandoned learning it in favor of other interpreted languages; in fact, at one time I made several contributions to Lua. But then I read Eric Raymond's article about Python in Linux Journal, and it enticed me to look again. I haven't looked back.

Quote:
Originally Posted by Bill
I am somewhat surprised that Python and now Spin are using indentation for that purpose.

You'd be surprised how natural it becomes, and how much more efficient you are when you don't have to match brackets. But my favorite feature of Python is the excellent traceback error messages.

I was taught in college to engage in Defensive Programming: Identify the things that might go wrong, and write code to deal with them. There are problems with that. The main one is that you have to have a freakin' crystal ball to predict all the things that might go wrong.

Now I engage in Offensive Programming. I write the simplest thing that might work, and test it. When it throws tracebacks at me, I write code to fix the bugs. I may miss things, but whatever I miss is usually pretty unlikely so it will rarely if ever bother the user.

Since I deliver source code everywhere, I can fix bugs on the spot when they are found; if needed, I then copy affected modules to my office computer or to a flash drive for later distribution to other customers.
__________________
NAR # 115523
Once upon a better day... SAM #0076
My site: http://rocketry.gonnerman.org
Reply With Quote
  #6  
Old 03-16-2011, 11:36 AM
Bill's Avatar
Bill Bill is offline
I do not like Facebook
 
Join Date: Sep 2008
Location: North Tejas
Posts: 3,087
Default

Quote:
Originally Posted by Solomoriah
I was taught in college to engage in Defensive Programming: Identify the things that might go wrong, and write code to deal with them. There are problems with that. The main one is that you have to have a freakin' crystal ball to predict all the things that might go wrong.


Over many years of developing software products to be delivered to the end user market, I have been conditioned toward defensive programming. Many people think I am a pessimist because I am always looking for things which can go wrong in any situation and I have to explain that anything I miss today is tomorrow's bug.


Quote:
Originally Posted by Solomoriah
Now I engage in Offensive Programming. I write the simplest thing that might work, and test it. When it throws tracebacks at me, I write code to fix the bugs. I may miss things, but whatever I miss is usually pretty unlikely so it will rarely if ever bother the user.

Since I deliver source code everywhere, I can fix bugs on the spot when they are found; if needed, I then copy affected modules to my office computer or to a flash drive for later distribution to other customers.



My brother and I get into debates about this. He works on web software. Stuff which can be baby sat and problems addressed when they happen. Totally different from software delivered to operate standalone on end user hardware or embedded within a device. At least today, fixes can be rolled out via downloaded patches. We did not have that luxury a few years ago.


Bill
Reply With Quote
  #7  
Old 03-16-2011, 12:07 PM
Solomoriah's Avatar
Solomoriah Solomoriah is offline
Incorrigible Kit Basher
 
Join Date: Jul 2006
Posts: 1,888
Default

Gah. If I had to write embedded software, I'd go nuts. You have no choice there but to try to predict everything...
__________________
NAR # 115523
Once upon a better day... SAM #0076
My site: http://rocketry.gonnerman.org
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -5. The time now is 02:09 PM.


Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Ye Olde Rocket Shoppe © 1998-2024