PDA

View Full Version : Intro - Warning: BBBOORRRIINNGGG!!!!!



katrina
6th January 2006, 01:56
Hi!
My name is Katrina and I am one of the all-too-few female programs out there!
I have only been programming in Qt for a couple months; prior to that I mostly used GTK+ but my love of the KDE desktop (and the promise of easily-portable code) brought me over from the 'dark-side' ;-)

I have been using Linux ever since Slackware was THE distro and it only came on a mountain of floppy disks which I happily downloaded with my 2400bps modem using a dos ftp program and put them on 5.25" DSHD floppys.

I also do a lot of programming in PHP (4&5) and Java (especially Micro Edition (I work for a cell phone company(in addition to freelance stuff on the side)))

My first language was GW-BASIC, then QBasic, then LP MUD coding (does that count?) then C, then x86 ASM then VB, then 68000 ASM then C++ then HTML then PHP then Java oh yeah and English and French are in there somewhere too ;-)
LOL

And in case any of you younger programmers out there are wondering, going from 'procedural' to 'object oriented' was a hell I wish on no one :-)

Anyway thats enough about me, what about you?
:-)

Katrina

jacek
6th January 2006, 10:22
LP MUD coding (does that count?)
Sure it does! I was very impressed by MudOS capabilities.

wysota
6th January 2006, 16:37
LP MUD or correctly LPC is a kind of interpreted C-variation, so it may count as 'C' ;)

katrina
6th January 2006, 18:55
I tell ya, having learned BASIC first, I had a really hard time learning C. I just couldn't grasp the whole concept behind it. (New programmers: DO NOT LEARN BASIC FIRST UNLESS YOU PLAN ON MOVING TO FORTRAN NEXT!)

Then I started "mudding" a lot and got a wizard position, so I had to learn LPC...and fast...

But when I actually started coding for objects in the MUD it hit me like a Great Shield upside the head. :-)

At that time there simply weren't a lot of examples that showed WHY you would seperate your code into seperate functions with their own private internal workings and the practicalities of it had never occured to me.

I credit LPC with me being able to program in "real" languages today :-D

Katrina

jacek
6th January 2006, 21:28
DO NOT LEARN BASIC FIRST UNLESS YOU PLAN ON MOVING TO FORTRAN NEXT!
I don't think that Basic could be compared with the World's oldest high-level language. Fortran is a very good language, although only for scientific computations. If you ever used Matlab or Octave, you used language that might be called a script version of Fortran. The only problem are coding conventions that look like they didn't change since the fifties.

katrina
6th January 2006, 21:55
I don't think that Basic could be compared with the World's oldest high-level language. Fortran is a very good language, although only for scientific computations. If you ever used Matlab or Octave, you used language that might be called a script version of Fortran. The only problem are coding conventions that look like they didn't change since the fifties.

My understanding has always been that BASIC was invented as a stepping stone to FORTRAN...

Katrina

wysota
6th January 2006, 22:41
No, it was invented because BASICly everyone could learn it ;) And people didn't want to only be able to move the turtle around :rolleyes:

jacek
6th January 2006, 22:46
And people didn't want to only be able to move the turtle around :rolleyes:
Hey! I liked Logo. In fact it was my first programming language. While playing with it I learned that procedures and functions are usefull. I even learned how to use recursion.

wysota
6th January 2006, 22:58
I didn't say I didn't like it :) I used to draw the alphabet using the turtle ;) BASIC was my first language, though... I have been learning it more than 15 years ago on my ATARI 65XE box.

10 PRINT "Witek"
20 GOTO 10

:eek:

katrina
7th January 2006, 03:14
I have actually never used logo at all...
I did load up KTurtle one day but it looked too complicated so I didn't mess with it much lol

const QString &signature = new QString("Katrina");

wysota
7th January 2006, 06:23
const QString &signature = new QString("Katrina");

Wow, two errors on one line! ;) "new QString" returns QString* and not QString and you can't assign a newly created object to a reference -- a reference is just a "handler" for already existing objects. But besides that -- nice :)

jacek
7th January 2006, 14:12
you can't assign a newly created object to a reference

#include <iostream>

class Test {
public:
Test() {}
int foo() const { return 1; }
};

int main()
{
const Test& t = Test();
std::cout << t.foo() << std::endl;
return 0;
}

katrina
7th January 2006, 14:16
Wow, two errors on one line! ;) "new QString" returns QString* and not QString and you can't assign a newly created object to a reference -- a reference is just a "handler" for already existing objects. But besides that -- nice :)

LOL Hey, I was trying to be funny, not syntactically correct! LOL

QShutTheHeckUp *;-) = new QShutTheHeckUp;

(JUST KIDDING!)
sorry couldn't help myself :-D

Katrina

wysota
8th January 2006, 17:09
#include <iostream>

class Test {
public:
Test() {}
int foo() const { return 1; }
};

int main()
{
const Test& t = Test();
std::cout << t.foo() << std::endl;
return 0;
}

Are you sure this is correct? You hold a reference to a temporary object here. The fact that it works in this case doesn't mean this is a correct statement.

What if you store the reference to that object as a member of some class?

Will compiler optimisations not affect the correctness of the above statement?

jacek
8th January 2006, 17:42
Are you sure this is correct? You hold a reference to a temporary object here.
The secret lies in the "const" keyword.

bood
10th January 2006, 03:31
The secret lies in the "const" keyword.

yep, agree:D
And it's pretty useful.



void foo(const string & s); //no 'const' whill lead to error
foo("abc");

wysota
10th January 2006, 13:12
yep, agree:D
And it's pretty useful.



void foo(const string & s); //no 'const' whill lead to error
foo("abc");


In this case this is only because there is a cast defined from const char* to const string.

jacek
10th January 2006, 13:49
In this case this is only because there is a cast defined from const char* to const string.
I wouldn't be so sure:
#include <iostream>
#include <string>

void foo( std::string& s )
{
std::cerr << s << std::endl;
}

int main()
{
foo( std::string( "aaa" ) );
return 0;
}


$ g++ -Wall a.cpp
a.cpp: In function `int main()':
a.cpp:11: error: invalid initialization of non-const reference of type 'std::string&' from a temporary of type 'std::string'
a.cpp:5: error: in passing argument 1 of `void foo(std::string&)'

GreyGeek
11th January 2006, 17:01
My understanding has always been that BASIC was invented as a stepping stone to FORTRAN...

Katrina
Ohhhh! Now you are getting into my territory, and I'll give a short bio as well! As the oldest greyhair on the forum (64.5) I took FORTRAN 64 in grad school in 1968. Beginners All purpose Symbolic Instruction Code was invented by two Dartmouth profs in 1964 (http://www.truebasic.com/) and wasn't related to FORTRAN in any way. The profs merely wanted a language that was easy to learn so their students could study programming. Just to round out matters here is how Pascal got started:

"In the late sixties, several proposals for an evolutionary successor to Algol were developed. The most successful one was Pascal, defined in 1970 by Prof. Niklaus Wirth at ETH Zürich, the Swiss Federal Institute of Technology. Besides cleaning up or leaving out some of Algol's more obscure features, Pascal added the capability to define new data types out of simpler existing ones. Pascal also supported dynamic data structures; i.e., data structures which can grow and shrink while a program is running.

Pascal received a big boost when ETH released a Pascal compiler that produced a simple intermediate code for a virtual machine (P-code), instead of true native code for a particular machine. This simplified porting Pascal to other processor architectures considerably, because only a new P-code interpreter needed be written for this purpose, not a whole new compiler. One of these projects had been undertaken at the University of California, San Diego. Remarkably, this implementation (UCSD Pascal) didn't require a large and expensive mainframe computer, it ran on the then new Apple II personal computers. This gave Pascal a second important boost. The third one came when Borland released TurboPascal, a fast and inexpensive compiler, and integrated development environment for the IBM PC. Later, Borland revived its version of Pascal when it introduced the rapid application development environment Delphi."


My first forray into programming was at the Barnes School of Business in 1959. There I learned to "program" an IBM 402 Tabulator (http://www.columbia.edu/acis/history/402.html) using banna plug wires to connect various electrical signals to a central ground plane (the version I was trained on had removable plug boards). IIRC, the process was called "patching". What it did was to connect a wire brush to ground if a hole in a Hollerith punch card passed underneath the brush on it's way from the hopper to one of the sort bins. The brush was connected to a particular sorting bin and the hole allowed the circuit which deflected the card into that bin to be completed. The IBM 402 Tab weighed 4,000 LBS, IIRC, and was called "heavy iron". The IBM 82 Sorter did something similar.

It was all for naught, though. When I started looking for a job I couldn't get hired because while I was 18, I looked like I was only 14 or less. So, I went to college instead. Turned out to be a good move.

After graduation I taught for 18 years - 10 in HS and 8 at the college level... physics, calc, both chems, biochem, anat&phys, microbio and some earth sciences. Teaching is living in early American poverty. In 1980 I started my own computer consulting business around the Apple[] and later the IBM PC. Apple BASIC and UCSD Pascal were the first two languages I used to generate income. When Borland's TurboPascal 3.02A came out I used it for some solutions. It included a database "Lunch Box" which was really powerful. But, the MOST POWERFUL gui/db programming tool Apple[] ever had was SAVVY. I and two others purchased a franchise for 12 states here in the midwest. I computerized a lot of businesses and sold a lot of SAVVY peripheral cards. I was asked by the creator of SAVVY to demo it at the 1983 computer expo in Las Vegas.

My first attempt at C++ was Borland's TurboC++ 1.5 for Windows, circa 1983, and it quickly ended when my first "Hello World" required 1,500 lines of code. You can't be competive and earn a living when coding is that difficult! I did not return to C++ until the fall of 2005, when I learned it so I could use QT. VB came out about then and with VB 3.0 I was able to do a lot of work. My real workhorse for programming was a Pick clone for the IBM PC called Advanced Revelation. It was an amazing DOS based development tool. The db part uses a violation of the 3NF by using "associated mulitvalued" row-column intersections, but you could put all of a customer's invoices in the customer file without having to putz with a two table parent-child relationship. It is still around as as a GUI Windows (AND Linux!) version called"Open Insight", but that tool has a sordid history, which is one reason why I left it behind and moved to PowerBuilder 3.5. Powerbuilder has a unique db object which is very powerful, but like AREV speed is an issue when compared to Oracle or PostgreSQL.

I closed my consulting business to avoid traveling so much and most of my contract work was VB base, with the occasional AREV tossed in. One of my contracts was a 3 month VB job here at the Nebraska Dept of Revenue, 9 years ago. One month into the contract they opened a position up and asked me to apply for it. I did and I've been here every since. My wife loves the fact that I now come home on evenings and weekends!! :) I am eligible for retirement after Feburary, 2007 but I told the managment that I'd stay on till I am 70. So, I'll be here until one of four things happen: I turn 70, I become senile, I get fired or I die. Hopefully the first.

One nice bennie is that my 40 yr old son, who is also a pro programmer, applied for an opening here 5 years ago and was hired. His cube is two down from mine and we work togeather on a couple of projects. And he, too, is a Penquinista! Like me, all four of his computers at home run Linux and his workstation here dual boots with SimplyMEPIS. Life is great!

McToo
11th January 2006, 21:02
Ohhhh! Now you are getting into my territory, and I'll give a short bio as well! As the oldest greyhair on the forum (64.5)

I salute you, sir! There was me thinking I was the oldest!

I started programming on a Sinclair ZX80 back in 1980, using BASIC - but quickly found that doing anything remotely interesting (or fast) which for a spotty teenager meant GAMES required learning Z80 assembler. Happy days sat in front of an old black and white TV, hoping the RAM pack didn't wobble so you lost all your code, that the tape recorder correctly saved all your code, so you didn't lose it and that the 10 minutes it required to load 16K worth of code wasn't wasted because the volume was turned up too high (or too low) - those funny lines that appeared on the TV while loading and saving had to be just so, or else catastrophe!

The polytechnic I went to luckily had an old PDP 11 running Berkeley Unix where I cut my C programming teeth, while the rest of the students were busily learning COBOL so they could get a job with IBM! The tutor put me in touch with a gruff old Scots programmer who was looking for someone to help him out with admin and programming tasks on Bull XPS-100 system running AT&T Sys V. In between programming and looking after users, if the hardware department in the basement had a large hardware order I was seconded to the depths to build 8086 and 80286 PC's! It stood me in good stead for later life!

I learned to program Windows (version 1.0 - it was horrible in retrospect) using Charles Petzolds book and bought the MS C Compiler and the Windows SDK which cost £1000 in 1990 - a princely sum in those days, but I managed to blag my way into a firm in London just by being able to 'talk the talk'. In those days if you mentioned Petzold and the 'switch statement from hell' you obviously knew how to program Windows and there were very few programmers in the country programming Windows in those days!

Learned C++ with the advent of MFC in 91/92, continuing on the Windows platform. Had the opportunity to move to the Solaris platform but turned it down 'cos contract rates for Windows programmers was higher (money changes everything!).

Got a real buzz when a colleague introduced me to SuSE... my first experience of Qt came when 'she who must be obeyed' wanted me to modify the KSirtet code to save the statistics of the two player game so she could crow about how many times she'd kicked my butt at it!

Now I use Qt seriously for a real time trading system, I've got real coffee on tap, a kick ass stereo system - 4 x 20" flat panels hooked up to a Matrox G400MMS card (Ok, they're the traders hand-me-downs, but I've never had 4 monitors to program/debug with!) - and I'll be here till my face hits the keyboard too!

McToo

GreyGeek
11th January 2006, 22:07
I salute you, sir! There was me thinking I was the oldest!
I didn't see your age? :) Talking about ages, I wonder what aniversery of her 21st birthday did Katrina last celebrate?


'she who must be obeyed'
So you married a Greek Goddess too, eh?

My wife has well established my creditials as the "Family Idiot". ;) She had me wrapped around her little finger since I first saw her in the lunch line in college in 1960! :D

My hobby is using computers to create calculus models of physical events. Part of my consulting business was criminal forensics - using math to compute trajectories of bullets, impact damage to the body, and other tidbits of murder investiagations because of my training in anat&phys, biochem, etc. But, that stuff got too depressing so for that and because my wife requested it, I stopped doing that stuff.

high_flyer
12th January 2006, 00:48
My name is Katrina and I am one of the all-too-few female programs out there!
Damn right about that one! :D
So bring your (girl) friends over ;)

Cheers
theLSB.

McToo
12th January 2006, 08:08
So you married a Greek Goddess too, eh?

My wife has well established my creditials as the "Family Idiot". ;) She had me wrapped around her little finger since I first saw her in the lunch line in college in 1960! :D


:) I met mine while waiting on the platform for the last train home! I never usually caught the train as I rode a motorbike, but a wet road and a driver with questionable driving qualifications had put the steel stallion in bike doctors and I was reduced to using public transport.

I hit the big 4-0 last year, I think I'm around the same age as your son!



My hobby is using computers to create calculus models of physical events.


I was glad to leave calculus behind at Uni... ;)

Back to work. Have a good 'un!

McToo

katrina
15th January 2006, 00:20
Talking about ages, I wonder what aniversery of her 21st birthday did Katrina last celebrate?



LOL I really am 25. My uncle started teaching me BASIC at the young age of 5 on a Tandy COCO 3 (which rocked back then, it had 256k RAM!) Between 6 and 10 I also aquired a TI 99/4A and a Timex Sinclare (complete with the "printer" which looks like a modern reciept printer and the 16k ram module)
I remember all too well saving things to tape and hoping that it worked so you didn't waste all that time (My sister and I were home schooled and I even wrote a small (small by modern standards...big when you are typing basic line by line) program for my mom to make tests for us when I was 8)

My big break came when I was 11 and was given a Tandy HD 1000 (a 8088 with 384k RAM and a 10mb hard disk) by a friend of my parents who had gotten a new computer; my uncle then introduced me to QBasic and gave me a 1200bps modem. (I spent a fortune calling BBS's long distance lol)
around 13 I started trying to learn C with varied results. When I was about 15 I learned LPC and then the C lightning bolt hit me. Eventually (around 20y/o) I gave up my anti-object-oriented stance and learned C++ and most recently Java. There were a few other languages in between those that I learned, although I have all but forgotten some of them (z80 ASM for instance)

Katrina

CuCullin
15th January 2006, 01:43
It may just be nostalgia.... but I loved mt TI-99/4a. I think I still have two at my parents house somewhere....

Now I have to go look for them. Oh well, free food from my mom when I stop by anyways :D

Twey
15th January 2006, 07:48
I started programming on a Sinclair ZX80 back in 1980I have a ZX81 hooked up to a tiny TV on top of my monitor... just in case any museums put a bid in :p
So the RAM pack is meant to be that loose? I thought it just got jolted somewhere. ;)

fullmetalcoder
17th January 2006, 14:29
:( Snifff...

Am I the only young man here???

My bio is much shorter and maybe less interesting but, well...
What if I become famous someday??? :cool: You could make a lot of money by selling it to journalists!!! :D

I started by learning C, at 10 when my father got interest in it for his job.
I didn't understand it well and stopped coding for a whole year!
Then, I played a bit with HTML, JavaScript and the revelation came ...

My parents gave me a TI-84+ calculator, I began my "career" by writing Scientific programs and then games in a basic like languages. Then I discovered that asm was avaiable on TI-8x calcs and I immediatly started learning z80 asm. It was quite hard to "think asm" but I produced some interesting and rather fast programs. But I have fastly been fed up with typing thousands of lines of code to get half a working program and GFX limitations drove me mad so I came back to C and C++.

I made some stuffs using Gtk+ and Irrlicht but the true APOCALYPSIS (revelation, for non-latinist) was the discover of Qt4!!!

Not too bored ??? :D

Here is the story until then. pfuu... 6 years of coding summed-up in 12 lines!!! I impresses myself!!!

edit: fixed a typo

Mariane
17th January 2006, 21:30
going from 'procedural' to 'object oriented'
Katrina


:D Try going from 'procedural' to 'declarative'... and then back... :D

Mariane

CuCullin
17th January 2006, 22:01
:( Snifff...

Am I the only young man here???

I'd consider myself a young man at 24 :P

katrina
18th January 2006, 01:37
Damn right about that one! :D
So bring your (girl) friends over ;)

Cheers
theLSB.

If I had a single female friend who knew C++ I would LOVE to! but, alas, they are hard to come by :-(

Katrina

katrina
18th January 2006, 01:52
[QUOTE=fullmetalcoder
My parents gave me a TI-84+ calculator, I began my "career" by writing Scientific programs and then games in a basic like languages. Then I discovered that asm was avaiable on TI-8x calcs and I immediatly started learning z80 asm.[/QUOTE]

I remember sitting in calculus programming my TI calculators instead of paying attention lol (could be why I failed the first time)
I still have: 2 TI-82's 2 TI-85's and my TI-92+(I bought the +upgrade module the day it came out) I also had a TI-86 which I bought the day it came out! LOL (not sure what happened to it though?)
I still use my 92+ on a regular basis and carry a 85 in my laptop bag :-)

Katrina - Way too geeky for her own good

CuCullin
18th January 2006, 14:53
If I had a single female friend who knew C++ I would LOVE to! but, alas, they are hard to come by :-(

Katrina

That they are... I ended up meeting a girl who understood computer geeks though... her dad is a coder and a linux guy. When we first started dating, her dad gave her three questions to ask me that were little C and linux trivia questions... like what handles the logins for the command line ftp client, a question about a particular type of variable, etc. He didn't do it to harass, just for fun :D Lucky for me, my gf has a working knowledge of linux. She surprised me with "where did you hide gaim?" and "don't you use firefox? I don't like konqueror".

PS: If you were a TI-86 fan, I got mine too early... an all too confused sales guy at a walmart or something took a TI-86 out of the back before it was set to be sold, and I got mine very early. As a result, I had written a boatload of articles on the 86's assembly..later stolen by this guy Cyber Optik. I wouldn't have minded if he gave me credit.

Anyways, its always good seeing some female coders. Theres been a drop in the number of female engineering majors in recent years, with many young women (about our age and a little younger) feeling that computers and such were a "guys thing". I'm also impressed by everyone here and their responses, since the typical leg-humper tends to scare away any user that admits she's female.

Well.. back to work I suppose, I've got a school to design...

impeteperry
18th January 2006, 16:44
Ah you children!
My first programming was in 1970 on an Olivetti Procrammable Calculator 101.
Next Dartmouth basic on an HP-9830 ( i think );
Next Assembler & basic on an Olivetti M30, a Zilog 8002 cpu using PCOS as os. ( 1980 or 1981 )
All this pre Bill Gates
Then Assembler ( printer drivers for graphic output on dot-matrix printers) and basic in DOS
Next C
Next C++
MDL for add functionality to MicroStation's graphic program
Next Visual Basic
NOW!!! Ubuntu/Kubuntu linux,
Qt3 designer for screen layouts,
Qt3 for program ( rewriting designer code ) &
KDevelop for editing and debugging.
I started with KDevelop 2. but could not make the switch to KDeveiop 3. (age I guess). Designer is great for screen layouts and getting a program started, but I felt more comfortable with straight code, so I wrote code equivalent to the .ui code from designer. I had much trouble with "ddd" and "gdb" so I imported my Qt code into KDevelop where editing and debugging (which I need) are trully great.

All of this programming is for the design & production of precast concrete elements for buildings.

I find the "Signal - Slot" mechanism to be a major advance in controlling progam. I have no "enum"s or "externs" in my program.

Katrina, it is 2006 and you list your age as 25. In 2010 will you still be 25?

katrina
21st January 2006, 19:59
Katrina, it is 2006 and you list your age as 25. In 2010 will you still be 25?

Nope. In November of 2010 I turn 30 :-)

Katrina

impeteperry
22nd January 2006, 05:07
Nope. In November of 2010 I turn 30 :-)

Katrina
Unless yqu change your profile, you will still be 25.

Well in 2 months I will be 80 and still trying to learn somthing new every day. I hope in 55 years you will too.

I think this thread is one of the more enjoyable on the net. you all are great!.

Good Luck

pete.

jacek
22nd January 2006, 13:17
Unless yqu change your profile, you will still be 25.
No, it will be corrected automagically.

katrina
22nd January 2006, 15:52
Designer is great for screen layouts and getting a program started, but I felt more comfortable with straight code, so I wrote code equivalent to the .ui code from designer?

Yeah, I use designer pretty much to make a mock-up of a program, then go back and write the whole thing in straight code. Having had a lot of Java experience I tend to do things overly object oriented, so I find it even more flexible doing it that way than using designer for the actual application.

Katrina

katrina
22nd January 2006, 15:55
I think this thread is one of the more enjoyable on the net. you all are great!.


Maybe I should change the title to Intro - Warning: IIINNNTTEERREESSTTINNGG!!!!

;-)

Katrina

yop
22nd January 2006, 16:23
Yeah, I use designer pretty much to make a mock-up of a program, then go back and write the whole thing in straight code. Having had a lot of Java experience I tend to do things overly object oriented, so I find it even more flexible doing it that way than using designer for the actual application.

KatrinaI 'm trying to achieve the exact opposite...

wysota
22nd January 2006, 16:37
Yeah, I use designer pretty much to make a mock-up of a program, then go back and write the whole thing in straight code. Having had a lot of Java experience I tend to do things overly object oriented, so I find it even more flexible doing it that way than using designer for the actual application.

But Designer generates a minimal code, you can't do better than that, and additionaly you get ui/logic separation. It is not Java, you know :) Designer is meant for rapid ui development and integrates very well with the rest of the framework, so I see no point in not using it. If you write your ui code manually it won't be smaller or faster. The only difference is that with Designer you have to inherit/include the ui definition class (so one additional inheritance/object), but one can't treat it as an overkill.

I know not using any GUI-tools seems more "hackish", but hacking is about easing ones life and that's what's Designer for. Since Qt 4.1 Designer is quite usable, so why not use it?

impeteperry
22nd January 2006, 22:26
Mysota, you make a good point, but in my case I am in a learning process and re-writing designer code is a great learning tool. I also have problems with "ddd" and "gdb" (listing string variables ) so I import my code into KDevelop which has excellent debugging features. Can I import designer code into KDevelop.

wysota
22nd January 2006, 23:32
Can I import designer code into KDevelop.
What do you want to debug in UI files? uic generates normal C++ classes out of ui definitions, so I don't see a reason not to be able to open them from within KDevelop.

impeteperry
23rd January 2006, 05:30
What do you want to debug in UI files? uic generates normal C++ classes out of ui definitions, so I don't see a reason not to be able to open them from within KDevelop.
I'm sorry, I guess i didn't make myself clear. I want to work in an enviroment where I can look at "string " variables. I started programming using KDevelop 2.1 where I had the designer and good debugging facility.. I had trouble understandiny all the options offered in KDevelope 3.1 so I went to Qt designer (trully a great),

Whether it is O'Reilly's Programming with Qt or C++ Programming With Qt3, my two bibles, I have to actually keyin the examples for the stuff to sink in my thick head and so as I used designer, I tried to duplicate the designer layout with writing the Qt code. This works for my program as I have pretty much a fixed layout. ( the original was a DOS command line engineering graphics program )

I never could find a way with gdb or ddd to look at string variables!

I found I could import my hand-coded program into KDevelop3 and see these damm string variables, not on the layout stuff, which is static, but on operational functions. My program is heavy with string variables and stringlists.

My question was "could a program whose layout was developed in designer, be imported into KDdevelop?

I see that KDevelop has a designer option, but I have not been able to get it to load.

If I could get ddd to display string variables and get kwrite to be the default editor I would be happy.

Sorry to be so long winded,
pete

yop
23rd January 2006, 07:52
If you open up QMake tab of your project in KDevelop, you 'll see that there is a FORMS entry. This is where you should put your .ui files (right click, add files) and KDevelop will take care of the rest ;)

impeteperry
23rd January 2006, 16:01
If you open up QMake tab of your project in KDevelop, you 'll see that there is a FORMS entry. This is where you should put your .ui files (right click, add files) and KDevelop will take care of the rest ;)
Thank you very much I shall try that.
Any help on "ddd" and string variable?

wysota
23rd January 2006, 18:08
Thank you very much I shall try that.
Any help on "ddd" and string variable?

Could you elaborate on the problem a little more? What kind of "string variables" are we exactly talking about? All string variables in a UI definition are visible in the form or in object properties. And after uic does its job, they get wrapped into the C++ class which gets generated, so you can access it like any other class.

Codepoet
23rd January 2006, 19:09
I believe he wants to know how to display a QString variable in ddd in readable form:
Break where your QString is defined as usual. Now type in the command window:


print variableNameOfYourQString.toStdString()

Not perfect, but it works ;)

yop
23rd January 2006, 19:19
I believe he wants to know how to display a QString variable in ddd in readable formYeap that's it, we had a similar conversation in http://www.qtcentre.org/forum/showthread.php?p=1628#post1628
Codepoet I love your workaround, I never thought of that, thanks :)

wysota
23rd January 2006, 19:23
But what has designer generated code to do with it?

yop
23rd January 2006, 19:26
But what has designer generated code to do with it?
Nothing, it's just that impeteperry remembered us having this conversation and he asked :)

katrina
23rd January 2006, 22:07
additionaly you get ui/logic separation.

Seperating ui and logic as a great, great thing...
Thats why I write my ui and logic into different classes when hard coding :-)
LOL

Katrina

impeteperry
24th January 2006, 00:56
Hi Codepoet (what a great name for a programmer )
Now I have to go back and learn ddd all over again.
Thanks a lot.

Codepoet
24th January 2006, 11:25
Hi Codepoet (what a great name for a programmer )
:D


DDD is a wonderful tool - have you ever tried using it together with gnuplot? It can plot the contents of your datastructures ;)

impeteperry
25th January 2006, 02:58
Thanks Codepoet, but right now I have a "senior moment". I can't seem to get started with ddd. I load my program (pm) from a thrminal with "ddd pm".
ddd comes up withh my "main.cpp" showing ok, but how in the h... do i get "dlgmain.cpp" to show?
Even tho I used ddd quite a bit a yeari or so ago, I never quite usderstood the help aids and what I don't use I forget .
Since you are so high on ddd and there is a clue on displaying string variables I would like to try it a again

pete

yop
25th January 2006, 07:45
but how in the h... do i get "dlgmain.cpp" to show?
Even tho I used ddd quite a bit a yeari or so ago, I never quite usderstood the help aids and what I don't use I forget . File->Open Source... (with your programm loaded). You ll see all the sourcefiles of your app listed.

Codepoet
25th January 2006, 12:58
yop is right. You only have to take care when you work with plugins - those are not loaded until your program runs / you load them in your code. Just "run" the program untill they are loaded, interrupt and then use File->Open Source.
I often have a little problem with that dialog: If I want to enter a fliter string for the filenames I have to first click into it (normal so far) but the mouse cursor must stay in the field - otherwise ddd does not accept input... Maybe only my machine here...

I have a link to a ddd tutorial that I've read a long time ago: http://www.linuxgazette.com/issue73/mauerer.html

impeteperry
25th January 2006, 16:58
File->Open Source... (with your programm loaded). You ll see all the sourcefiles of your app listed.
I must be very stupid but all I get when I try File->Open dlgMain.cpp is " try help".
( I get the same responce with any variation of the file, File Files, files with -> or without )

I start with "ddd pm".
ddd loads with "main.cpp" showing.
Program runs
I can step thru "main.cpp" (which I don't ned to do.)
What do I enter on the command line to replace "main.cpp" with "dlgmain.cpp"?

I go thru the tutorials and the manual and all I find are examples working on "main.cpp"

yop
25th January 2006, 18:56
I meant the menu item File :) not write file on the command line

impeteperry
25th January 2006, 20:13
I meant the menu item File :) not write file on the command line
Now I really am confuned.!

What do I key in at the botton of the screeen.

(gdb) ????

to get my "dlgmain.cpp" to replace the "main.cpp"

yop
25th January 2006, 22:47
Just see the attached image. This will give you a listing of all of your source files and you can select which one you want to open from there.

impeteperry
26th January 2006, 01:20
At long last!!!!!!!!!!
Thank you for being so patient with me.

impeteperry
26th January 2006, 02:53
OK up and DDDing
now for the string variable.
I tried " 1. print variableNameOfYourQString.toStdString() " as suggested

(gdb) p k.toStdString() where "k" is my string variable.
I got "Couldn't find method QString::toStdString"

yop
26th January 2006, 08:28
For Qt3 try
print k.ascii()

impeteperry
26th January 2006, 13:12
For Qt3 try
print k.ascii()
got it. Thanks

is the same with Qt4?

wysota
26th January 2006, 13:34
got it. Thanks

is the same with Qt4?

.toAscii()

impeteperry
26th January 2006, 17:47
Thanks, I'll save it.

You all have beem most patient with me which I appreciate very much.

bye for now