Announcement

Collapse
No announcement yet.

DDT kills bugs dead (and me)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Borje Hagsten
    replied
    Did it take one day to learn how to master VB, the first time you
    loaded it up? Heck, it took me almost one day just to install and
    setup Borland C++ properly once upon a time..

    PB takes a bit of learning to master, yes, but once you get over
    the treshold, the reward is well worth it. If you take it bit by
    bit, it eventually becomes quite easy. Play around with sample code
    provided in the source code forum, plus the samples provided by PB.
    Read the helpfile.

    Start out by porting small samples from VB to PB and then slowly
    work your way up to bigger projects. In just a couple of weeks
    time, you will start to understand how to get things done in PB
    and thereby also appreciate it more, I can guarantee you that..


    ------------------

    Leave a comment:


  • Siamack Yousofi
    replied
    After spending half of my programming life porting stuff from one platform to another, I have come to the conclusion that usually it is better to re-write the stuff from the ground up instead of spending time porting it.

    Siamack

    ------------------


    [This message has been edited by Siamack Yousofi (edited June 08, 2000).]

    Leave a comment:


  • Troy King
    replied
    Warren, I'm sorry to hear you had a tough day. We've certainly all had days like that. However, you can't expect to pick up a new dialect and compiler and learn it in one day. I suspect what you're finding tough is that you have to code a bit closer to the Windows API than VB makes you. There are lots of us here that were also stunned a bit about how little we knew about Windows programming once we started the move away from VB.

    I can tell you that it does get easier. You will be rewarded for the effort you put into learning more about how Windows programming works. Contrary to how you feel right now, PB is capable of doing far more than VB can do, and can do it without the external runtimes and object libraries. People in these very forums have coded NT Services, ISAPI extensions, Control Panel applets, database-access programs, web servers, web clients, time clients, email clients, shell extensions, help-file addon dlls, CGI applications, and lots more, not to mention "regular" Windows apps. One of the few things PB cannot do, however is create Windows device drivers. I too was dumbfounded by the samples at first, but committed to learning more about how Windows works. There are some excellent books on the subject; check the Frequently Asked Questions forum for some suggestions.

    I also beleive that you may be confusing the BASIC language with VB's easy access to OLE features and its many wrapper-routines that are disguised (sometimes very thinly) as part of the "language". With time, you'll build your own library of wrapper-routines with PB that will simplify complex tasks. Using VB-style object.property and object.method is not part of BASIC per se. However, if that's the sort of thing you want to do, there is at least one third-party add-on to enable you to do it if you choose not to learn API-level COM programming, just as there is an excellent ODBC library and in these very forums, lots and lots of sample code and people willing to help and answer questions.

    Don't get discouraged so easily. PB can be sometimes a fairly verbose dialect of BASIC, and once you get the hang of DDT and/or SDK-style programming, you'll still have some long and/or complex-seeming lines of code, but you'll know what they mean. Most of the tougher lines of code, though, are because of the API calls being made rather than something native to PB.

    If you want something to ease the transition, there are several third-party graphical IDEs that resemble VB in many ways. There are apps to convert VB forms, Windows resource files, and those with custom runtime DLLs. As to the close-window button on the app's title bar, all your code is missing is a window style on your dialog: you'll need to add the %WS_SYSMENU style. If you'd like to post the code to your VB app on a web or ftp site somewhere, and then post a note here, I'm sure someone would be happy to help convert it to PB for you to give you something to reference as you learn.

    Don't give up too quickly. It took me a few months to begin to "get it", but I am now a better programmer for it. I think that if you stick it out, you will be glad you did. Pick up a copy of "Programming Windows" by Charles Petzold, and start reading. Compare examples in the book with PB sample code and it will start to make sense. In fact, all the samples in that book have already been converted to PB, and are downloadable from PowerBasic's web/ftp site.

    Good luck, and if there's something specific any of us can help with, please post a question and I think you'll be surprised at all the help you get. Everyone here remembers starting out on a new dialect/language/compiler/environment (PB included<grin&gt and the difficulties that come with it. VB is not the world, and I think the effort you put into mastering Windows programming with PB will pay off.


    ------------------
    Troy King
    [email protected]

    Leave a comment:


  • Guest's Avatar
    Guest replied
    WOW!

    so you've found out that you need a little patients to program...

    Come on now, you have given it ONE day and you expect to be able to port your code over. Okay, here's a little challenge for ya, maybe you should try and port you code over to VC++ in one day and see how far you get! No matter who you are and how good you are at programming there is no way you can JUST port a program over to another language in ONE day. Perhapse you should spend some time looking in the forums and the example code. Im sure after a good nights sleep and a fresh look at the examples you'll probably see things a little clearer. As for your "Destination file write error at the end of the compile" that is a very simple problem, one that I have encountered many times because "I" forgot to write the proper exit code. Just because your dialog/window is gone doesn't mean your program is dead. It is very likely that if you press "CTRL+ALT+DELETE" to bring up the task manager you will see that your program is still running... hence, compiler can't overwrite file in use!

    Just wondering... The first time you bombed with a girl did you give up on them all together?

    ps: please take this with a grain of sugar, because this is all supposed to be FUN!

    ------------------
    Cheers

    Leave a comment:


  • Warren Daniel
    started a topic DDT kills bugs dead (and me)

    DDT kills bugs dead (and me)

    After giving PB/DLL a whole day of testing, i've come to some conclusions:

    1) PB/DLL is pretty much bug free.
    2) PB/DLL compiles fast and small.
    3) PB/DLL was a waste of money.

    I quickly realized it wouldn't be possible to port any of my more complex VB programs over to PB/DLL without a full re-write of code. After a few hours, and a few hours more of reading help files, I decided to port an EXTREMELY simple page-long VB program over. Unimaginable stress followed, and I ended up with an actual working copy -- just without a close program box. I'm sure it's possible as some of the samples are able to do it -- through extraordinarily complex lines of code. I must be cursed because even copying the cryptic code line-for-line from the examples rarely work for me. After today, I think I may have a basic understanding of PB/DLL -- it's fast, small, and bug free because it can't DO anything. I've finally given up since i've managed to get the source to compile without syntax errors, only to end up with a Destination file write error at the end of the compile. It'd probably be ok for CGI but i'm certainly not (even if I HAD the money) throwing down another $190 for PB/CC, and probably another $100 just to get database capabilities. I know, it CAN do PLENTY -- and it's a LITTLE bit easier than programming your own compiler. I was sold PB/DLL under the impression that it was Visual Basic minus the memory hogging and slow execution.. I feel like it would be more truthfully marketed as NOTEPAD.EXE that can compile ASM code.
Working...
X