Friday, July 4, 2008

More about me being pissed at CodeGear RAD

To expand on the visibility issues, when I set a breakpoint and attempted to debug my code, control would flow from "test := TestClass.Create;" in Form1 to the definition of TestClass in global.pas. It would actually step into the constructor, and bomb on the first line of executable code. If I commented out all the executable code in the constructor, it would bomb upon attempting to exit the constructor. If I didn't have the proper visibility to execute the constructor, why did CodeGear RAD's compiler allow me to compile at all, and why would it bomb upon attempting to EXIT the constructor, as opposed to ENTER the constructor (I shouldn't even have been able to enter the constructor if the visibility was wrong).


  1. To me this sounds like a missing initialization of something.

    If it compiles, it runs - but it still may crash if you try to use something that isn't ready for use.

  2. It does sound like a missing initialization, but I cut my code down to an extremely basic class (no variables, constants, or functions) to try to pinpoint what I was doing wrong, and I couldn't find it. All the googling around I did pointed me to not having the proper visibility to instantiate the object.

  3. Can you please post the code of the two PAS files? If it behaves differently depending on whether or not you prefix the unit name to TestClass.Create it sounds like there was an ambiguous declaration in your form unit...

  4. Try installing MadExcept (free for personal use). That will give you a stack trace if you enable it for the project. Absolutely invaluable.

    If it compiles (without warnings), you should have the necessary visibility, unless... you are trying to do an invalid cast somewhere.

    Show us the source already ;)

  5. twm has a plausible explanation for your problem...

  6. We are really pissed by you. You are an incompetent developer that instead of learning just yells around. Be less conceited, and instead of blaming everything else but you, be humble and ask for help.
    There a lot of software written in Delphi around (never used Skype for Windows? It's written with Delphi) - and only beginners have problems like yours - but they usually understand the blame is theirs, not the tool.

    Post the code, please, what are you afraid of? That people may laugh at you? I never laugh at beginners attempts, unless they present themselves as "gurus" while they're not.

  7. LDS:

    You are really pissed by me? Are you so sensitive that you can't handle it when someone has criticism of your favorite tool? All I'm doing is posting my trials and tribulations online while I'm learning Delphi. And yes, the blame usually is mine. The blame is 99% of the time the developers fault.

    And as far as people laughing at me when they see my code? Hahaha...... from anything that you have seen or read here, what makes you think that I care if you laugh or not. I am unable to post the code directly, as it is owned by my employer. I fully intend to try what some people like animal or lars have suggested to see if it helps, but I need to rewrite the code in a project at home before I can post it online.

    And finally LDS, fanboys everywhere are the same, unable to see the value in any opinion that is not their own.

  8. Anonymous Flaming = Trolling.
    Trolls are to be ignored.

  9. Lars:

    *doh*, you're right. I should know better than to get caught up by trolls. I usually pride myself on my thick skin =P.

  10. I can handle criticism. What I can't handle is plain laziness and ignorance. I am one of the biggest critics of what Borland made of Delphi since D7, because, yes, I like Delphi.
    But my criticism is based upon facts. I do not yell "the sky is falling" just because I made an acorn fall from my code. First I try to understand if I made it wrong or not, maybe asking politely to those who has a bigger experience than mine - then, and only then - after I am sure it's not my mistake - I start criticizing.

  11. LDS: I did not yell "the sky is falling". I had a bug that I couldn't figure out directly, so I coded around it and moved on. I posted "now I'm pissed" several hours AFTER I had worked around my bug.

    What I don't like, is how just because I'm a beginner to Delphi, my criticism is not valid. Regardless if the frustrations I face are caused by Delphi/RAD Studio, or my own fault, the fact is that there is a developer who is new to Delphi that is frustrated. Calling him a moron is not a great way to get new people interested in Delphi.

    That's the one thing that companies like Apple get correct. They cater to experienced users AND beginners. They understand that even if it's the beginners fault, the fact that the beginner is frustrated makes Apple look bad.

    I frequently participate in a google group based on VistA (note the capitalized A, this is the EHR that is provided by the VA, the single largest healthcare provider in the United States, also used by the country of Mexico, a few countries in the EU for their state healthcare systems, and a few hospitals in Africa). For VistA, I am an experienced user and developer. I never slam a beginner to VistA, even if their problems are their own fault. The learning curve for VistA and Mumps is many times higher than the learning curve for Delphi, and I understand what it's like to be a beginner there.

    I'm sure I face the same frustrations as any beginner to Delphi, it's just that I'm not afraid to post online about it. If you don't care that Delphi isn't taught at Universities, if you don't care that Delphi's market share keeps slipping, then please, continue slamming people like me. I'm sure we will move on to other languages and platforms as our projects finish, and Delphi's marketshare will keep getting smaller and smaller.

  12. Have you ever looked at VCL source?

    All types initiate with "T". And variables aren't prefixed.
    Enum types have a convention for the enumeration members: add the initials of the type to each member. Example (from production VCL code):
    TDatasetState = (dsBrowse, dsEdit, dsInsert) ;

    (There are other members, but I forgot ;-) )

    In the entire VCL, there are only ONE name colision documented, just with one member of the TDatasetState enumeration in a certain obscure unit.. And the VCL is something like 3 hundred thousand (or more) lines of code.

    Do your code following those conventions. I used those in ALL my Delphi (Object Pascal) programming since 1998, from Delphi 1 to Delphi 2006. I can guarantee that will save you from LOTS of headaches about name clashing on the same scope.

  13. See this link:
    It's a direct response to your problem (the user couldn't post on your blog, apparently), and I can personally vouch for that solution since I also ran into the problem a few months ago, but was able to figure out for myself (of course, the source code wasn't as complicated as yours probably was, it was just a hobby program).

    In the future, I'd suggest trying on a less aggressive, pre-assumptive attitude, or else most people will think that you're a douchebag troll like they just did. If you continue on that path, people with no bias towards a tool or programming language (i.e.: neutral) will likely see you as a fanboy hating anything competing with his favorite tool rather than others as fanboys defending their favorite tools.

    The problem was really that simple, albeit tricky to discover. If you used the standard Delphi name conventions (why in the world are you even programming in Delphi if you don't want to use them? It's like wanting to make your life easier, but instead proceed in a round-about and detoured way), all of these problems would most likely not have even existed for you.

  14. Cloud: The emotion in my post was from banging my head against simple issues like this for several hours. I was in no mood to go to a Delphi forum, have my hat in my hand and ask for help. I needed to vent.

    As far as not using standard Delphi name conventions, the job that I was working on had mandated use of Delphi, I was brought on because of my expertise in the field at hand, not because of any expertise in Delphi.

    Also, I find it funny that some of them were calling me an MS fanboy and telling me to run back to C# and Java if I can't handle Delphi. I've worked with IDE's that are better, and others that are far far worse than Rad Studio.

    About twm not being able to post on my blog, that was an oversight on my part, I originally had all comments reviewed by me and I wasn't getting to them fast enough. Once I realized that I stirred up a hornets nest and that there were Delphi supporters itching to get at my blog I opened up the commenting to everyone. I figure since I posted it in public, its only fair for fanboys of all sides to be able to comment on it.

    In any case, I saw the project I was working on as being not sustainable in the long term, for reasons unrelated to Delphi or Rad Studio, so I left that project. I do value the time I spent in Delphi, learning a new language is always a good thing. There are things that I like in Delphi/Pascal, and indeed some of its syntax has made its way into Go, which is Google's new homegrown language. In general I was far more frustrated with Rad Studio, and with the core API, than I was with Delphi.

  15. As a follow on comment, some of those who posted on my blog were extremely helpful, and should be commended for taking their time to help some random person on the internet solve a problem. Others were just angry that I poked fun at their favorite language/IDE.


Note: Only a member of this blog may post a comment.