• TuxGirl (unregistered)

    Why are they using Cint on a date?   I generally don't like dates stored as integers...

  • codemoose (unregistered) in reply to awefwafwaewaefsadf

    They're not using it client side - it's a server-side error message.  Doesn't take away from the WTF-ey goodness, though.

    (ironic captcha: quality)

  • JR (unregistered) in reply to TuxGirl

    Anonymous:
    Why are they using Cint on a date?   I generally don't like dates stored as integers...

    See yesterday's post.  You'll like that one.

    captcha=perfection

  • JoeBloggs (unregistered) in reply to GalacticCowboy
    GalacticCowboy:
    (include a self-abused stomped antelope if you want this form returned to you...  ;)  )

    Are you advocating that antelopes should engage in self-abuse? ;-)

  • (cs) in reply to GoatCheez
    GoatCheez:

    .. the POINT I'm trying to make is that anyone who only knows how to "program" in vb, doesn't know how to program. What frustrates me even more is that VB tends to make the people who fall into that category think that they actually can program. I hate VB. I hate VB so much... OH SO MUCH....


    I'll take a good "vb-programmer" over an ignorant, close-minded "non-vb programmer" any day of the week.  
  • (cs)

    cry I finally make it in the main post and dont even get credit. :(

    http://thedailywtf.com/forums/thread/62886.aspx

  • fuzzylollipop (unregistered)

    I guess it goes without saying, you get what you pay for with off shoring, you would think people would understand this by now. And this HAS to be something from off shore, even victims of the public school system in the US have better grammar than that dialog box!

  • (cs)

    "Your data is invalid.  You might want to find out why."

  • (cs) in reply to Jeff S
    Jeff S:
    GoatCheez:

    .. the POINT I'm trying to make is that anyone who only knows how to "program" in vb, doesn't know how to program. What frustrates me even more is that VB tends to make the people who fall into that category think that they actually can program. I hate VB. I hate VB so much... OH SO MUCH....


    I'll take a good "vb-programmer" over an ignorant, close-minded "non-vb programmer" any day of the week.  


    Even if that "vb programmer" doesn't think that they'll ever need to learn another programming language? Even if you are writing a driver for anything? Even if you are working in a non-windows environment? Yeah... didn't think so....
  • (cs) in reply to GoatCheez

    GoatCheez:
    On the second error.....

    For some reason, VB programmers don't know how to properly trap errors. Somehow they all know about "On Error Resume Next", but ask them what it actually does and they stare at you with a blank look as if they don't need to know.

    I think in this day and age it's not really appropriate to associate a programmer with a language, given that 95% of us have probably developed in at least 3 languages.

    I think the term you were looking for is 'Beginning programmer that has only programmed in VB'.  There's no such thing as an 'advanced VB programmer' because at that point they wouldn't be using VB except to support legacy applications.  Does anyone really start new projects in VB.Net rather than C#.Net?

  • Hectore (unregistered) in reply to GoatCheez

    GoatCheez:
    On the second error.....
    .... the POINT I'm trying to make is that anyone who only knows how to "program" in vb, doesn't know how to program...

    <FONT face=Verdana size=2>


    </FONT><FONT face=Verdana size=2>I really didn't get this, if someone programs in VB doesn't know how to program? So I could assume that if I don't read French I don't know how to read right?</FONT>

    <FONT face=Verdana size=2>If you know how to program, you know how to program, now if you learned how to use an IDE and started writing stuff from "cookbooks" that's not programming, in VB, C, Perl, or any other language.</FONT>

    <FONT face=Verdana size=2>The Language is just a matter of syntaxis... If you have the brains and the knowledge, the only thing you need is a reference book and library documentation (unless you chose to build you own in Assembly of course). </FONT>

    <FONT face=Verdana size=2>And you know what?  Curly Brackets are overrated anyway...</FONT>

    <FONT face=Verdana size=2>Hectore</FONT>

  • (cs) in reply to Bus Raker
    Bus Raker:

    GoatCheez:
    On the second error.....

    For some reason, VB programmers don't know how to properly trap errors. Somehow they all know about "On Error Resume Next", but ask them what it actually does and they stare at you with a blank look as if they don't need to know.

    I think in this day and age it's not really appropriate to associate a programmer with a language, given that 95% of us have probably developed in at least 3 languages.

    I think the term you were looking for is 'Beginning programmer that has only programmed in VB'.  There's no such thing as an 'advanced VB programmer' because at that point they wouldn't be using VB except to support legacy applications.  Does anyone really start new projects in VB.Net rather than C#.Net?

    Me thinks you would be surprised.  I like C#, personally, but there are people that I work with or have worked with that prefer VB and therefore create new apps in VB. 

    To the English language police:  please correct any spelling or grammar errors in my post because I almost care.

  • (cs) in reply to Bus Raker

    I totally agree... Unfortunately though, some people so like to label themselves as "advanced VB programmers". Because I'm in support, I see alot of very strange stuff. The most surprising is that people do start projects in VB.NET instead of C#, and that people are learning VB.NET as their first language. It is simply not a good idea. IMHO, the only reason that VB.NET exists, is so that existing VB6 programmers have a similar syntax to make their transition to .NET and C# easier. That is only my opinion though, and I am aware that VB9 is on the way....

    sigh

    If you only saw the things I see every day....  There is one good thing about being in support: I get more than one WTF per day ;-P

  • (cs) in reply to Hectore
    Anonymous:

    GoatCheez:
    On the second error.....
    .... the POINT I'm trying to make is that anyone who only knows how to "program" in vb, doesn't know how to program...

    <font face="Verdana" size="2"> </font>

    <font face="Verdana" size="2">
    </font><font face="Verdana" size="2">I really didn't get this, if someone programs in VB doesn't know how to program? So I could assume that if I don't read French I don't know how to read right?</font>

    <font face="Verdana" size="2">If you know how to program, you know how to program, now if you learned how to use an IDE and started writing stuff from "cookbooks" that's not programming, in VB, C, Perl, or any other language.</font>

    <font face="Verdana" size="2">The Language is just a matter of syntaxis... If you have the brains and the knowledge, the only thing you need is a reference book and library documentation (unless you chose to build you own in Assembly of course). </font>

    <font face="Verdana" size="2">And you know what?  Curly Brackets are overrated anyway...</font>

    <font face="Verdana" size="2">Hectore</font>



    The problem is that average Joe Shmoe opens up VB6, throws a label and a picturebox on a form. Has a button assign the image (one actual line of code), and then thinks they are a coding god because it was so easy. Everything else stated I agree with 100%.
  • (cs) in reply to iwpg
    iwpg:
    The Real WTF™ is the Selective "Service" exists in the first place.


    I wholeheartedly agree.
  • (cs) in reply to GoatCheez

    Personally, I think that VB can, and often does, instill a lot of bad habits in new programmers.  It's only after gaining some experience in other languages that they can become well-rounded in their skills.

    "It is practically impossible to teach good programming style to students that have had prior exposure to Basic; as potential programmers they are mentally mutilated beyond hope of regeneration." —Edsger Dijkstra <o:p></o:p>

  • (cs) in reply to GoatCheez
    GoatCheez:
    Anonymous:

    GoatCheez:
    On the second error.....
    .... the POINT I'm trying to make is that anyone who only knows how to "program" in vb, doesn't know how to program...

    <FONT face=Verdana size=2></FONT>

    <FONT face=Verdana size=2>
    </FONT><FONT face=Verdana size=2>I really didn't get this, if someone programs in VB doesn't know how to program? So I could assume that if I don't read French I don't know how to read right?</FONT>

    <FONT face=Verdana size=2>If you know how to program, you know how to program, now if you learned how to use an IDE and started writing stuff from "cookbooks" that's not programming, in VB, C, Perl, or any other language.</FONT>

    <FONT face=Verdana size=2>The Language is just a matter of syntaxis... If you have the brains and the knowledge, the only thing you need is a reference book and library documentation (unless you chose to build you own in Assembly of course). </FONT>

    <FONT face=Verdana size=2>And you know what?  Curly Brackets are overrated anyway...</FONT>

    <FONT face=Verdana size=2>Hectore</FONT>



    The problem is that average Joe Shmoe opens up VB6, throws a label and a picturebox on a form. Has a button assign the image (one actual line of code), and then thinks they are a coding god because it was so easy. Everything else stated I agree with 100%.

    Just curious, but does your company let "Joe Shmoe" write some VB app for a group and then when it breaks they call you?  If so, why does your company let non-programmers program? 

  • (cs) in reply to James Brantly
    James Brantly:
    *cry* I finally make it in the main post and dont even get credit. :(

    http://thedailywtf.com/forums/thread/62886.aspx


    Sorry, James.  I am hogging all your glory!  Ha, ha! 

    Actually, my co-worker is the one who suggested sending in the screenshot--although we were thinking it would be a "Popup Poupourri" item.

    The program was written outside our company, but it wasn't offshore.  This does not imply, of course, that English is that programmer's first language.  And we sure know by now that project done onshore does not imply its being completed competantly*.




    *Hate having to explain jokes; it's spelled rong for ironic effect.

  • (cs) in reply to Digitalbath
    Digitalbath:
    GoatCheez:
    Anonymous:

    GoatCheez:
    On the second error.....
    .... the POINT I'm trying to make is that anyone who only knows how to "program" in vb, doesn't know how to program...

    <font face="Verdana" size="2"></font>

    <font face="Verdana" size="2">
    </font><font face="Verdana" size="2">I really didn't get this, if someone programs in VB doesn't know how to program? So I could assume that if I don't read French I don't know how to read right?</font>

    <font face="Verdana" size="2">If you know how to program, you know how to program, now if you learned how to use an IDE and started writing stuff from "cookbooks" that's not programming, in VB, C, Perl, or any other language.</font>

    <font face="Verdana" size="2">The Language is just a matter of syntaxis... If you have the brains and the knowledge, the only thing you need is a reference book and library documentation (unless you chose to build you own in Assembly of course). </font>

    <font face="Verdana" size="2">And you know what?  Curly Brackets are overrated anyway...</font>

    <font face="Verdana" size="2">Hectore</font>



    The problem is that average Joe Shmoe opens up VB6, throws a label and a picturebox on a form. Has a button assign the image (one actual line of code), and then thinks they are a coding god because it was so easy. Everything else stated I agree with 100%.

    Just curious, but does your company let "Joe Shmoe" write some VB app for a group and then when it breaks they call you?  If so, why does your company let non-programmers program? 



    WE WRITE COMPONENTS AND SDK'S...

    sorry for shouting.
  • (cs) in reply to Bus Raker
    Bus Raker:

     Does anyone really start new projects in VB.Net rather than C#.Net?


    A friend of mine, who is a very skilled programmer and made his way through assembler, C, Delphi etc. prefers VB.
  • (cs) in reply to ammoQ
    ammoQ:
    Bus Raker:

     Does anyone really start new projects in VB.Net rather than C#.Net?


    A friend of mine, who is a very skilled programmer and made his way through assembler, C, Delphi etc. prefers VB.


    It's very desirable in certain situations.... VB definitely has it's place, just make sure you know where that is ;-P
  • codemoose (unregistered)

    Well, at least the VBScript guys can still gun on the ColdFusion guys.

    {duck}

  • Hectore (unregistered) in reply to GoatCheez

    I agree with you there too...but the problem is not so much the Language (in VB is seen more though I agree)... "Programmers" are sooooo lazy, I guess they believe in the development knowledge fairy or something like that...or that they don't have to learn because they know this guy and can just ask him, or they know this guy in X company that he can call because his company uses their services.

    Hectore

     

  • (cs) in reply to ammoQ
    ammoQ:
    R.Flowers:
    Funny. I'm pretty sure that it took longer to write the FAQ article than it would have to correct the bug.

    The FAQ was probably not written by the programmer(s).
    <font size="5">E<font size="3">nd users are remarkably flexible when it comes</font></font> to quick fixes like that.  We had the opposite problem with our product. Our first salesmen found a bug, in the very first release, something like: "Program will crash if the operator tries to pick a province or state before picking a country.  The fix for this was to pick a country before choosing your province or state."
    Years later, I was out with him visiting a potential customer and I heard him mention that Canada should be entered before Alberta or the "program won't like it."
    Back at the hotel I had a good laugh at his expense when he told me that he mentioned this to every potential customer and new salesman that he trained,  The bug was fixed in the second release and since we had no customers for the first release, it was all in his mind.  He assumed we never fixed it and he never bothered to check to see if we removed it.


  • noname (unregistered) in reply to Digitalbath
    Digitalbath:
    GoatCheez:
    Anonymous:

    GoatCheez:
    On the second error.....
    .... the POINT I'm trying to make is that anyone who only knows how to "program" in vb, doesn't know how to program...

    <font face="Verdana" size="2"></font>

    <font face="Verdana" size="2">
    </font><font face="Verdana" size="2">I really didn't get this, if someone programs in VB doesn't know how to program? So I could assume that if I don't read French I don't know how to read right?</font>

    <font face="Verdana" size="2">If you know how to program, you know how to program, now if you learned how to use an IDE and started writing stuff from "cookbooks" that's not programming, in VB, C, Perl, or any other language.</font>

    <font face="Verdana" size="2">The Language is just a matter of syntaxis... If you have the brains and the knowledge, the only thing you need is a reference book and library documentation (unless you chose to build you own in Assembly of course). </font>

    <font face="Verdana" size="2">And you know what?  Curly Brackets are overrated anyway...</font>

    <font face="Verdana" size="2">Hectore</font>



    The problem is that average Joe Shmoe opens up VB6, throws a label and a picturebox on a form. Has a button assign the image (one actual line of code), and then thinks they are a coding god because it was so easy. Everything else stated I agree with 100%.

    Just curious, but does your company let "Joe Shmoe" write some VB app for a group and then when it breaks they call you?  If so, why does your company let non-programmers program? 



    Two letters: H R

    Nuff Said.

  • Jimbo (unregistered) in reply to GoatCheez

    Just a note on all this crap.  A skilled VB programmer knows another language that he is decent with.  Normally that language is C++.  That way you don't have to spend 2 weeks building an interface that VB could do in 15 min.  Then you write .dlls or modules to get all the work done.  In the professional world this is called efficent.  Of course I've heard that the whole .net thing has fixed this, but i've not delt with that yet.

  • Shizzle (unregistered) in reply to Jeff S
    Jeff S:
    pjsson:
    Anonymous:

    Hehe, a quick search and you find a few more:

    http://support.salescart.com/faq-advanced.htm#q10 http://www.liberum.org/snitz/topic.asp?TOPIC_ID=3824

    What's the best way to handle database validation to be immune from format changes? Say you work in a large organization and several applications access a database. The DBA for some reason changes a format, for example increasing length of some string column. Do all applications need to be changed or is it possible to query a database for data constraints? Haven't done any DB programming since SQL Server 97 and our application owned the DB scheme so we never had this problem.



    Another great use of stored procedures.   In .NET, the CommandBuilder class lets you query a stored procedure to see what datatypes and lengths all of its parameters are.  From there, your app has all it needs to know about the database schema and can validate input.  This does require an extra round-trip to the database rather than setting the parameters at the client, but it results in more accurate parameters and handles the situation you describe.  Also, your code is a little shorter and easier. 

    Older ADO has a refresh() method (or something like that, don't remmeber exactly the name) of a command object that does the same.

    Funny, that's a great question and something that is usually overlooked in the "stored procedures versus in-line code" debate.

    - Jeff

    Unfortuantely, validation often requires much more than knowing the data type and its maximum size.  For example, are you allowed to enter dates entered that are in the past?  Can the date be more than 5, 10, 15 (or whatever your application requires) days in the future?  Maybe the amount of days in the future is dependent on what service level they selected in another field!  Can the weight be over 500 pounds?  Does the zip code match the city?  Did they fill in the required information for the type of widget they specified?

    This is the whole issue with putting all the 'business logic' into stored procedures.  The knowledge of the logic often needs to be known on all levels of an application, and once it sits in the database, it's pretty much lost to everything else.  Sure you can build table after table in some crazy attempt to capture logic in tables and rows, but then you are almost putting code into tables.

    In really complex applications, it is far better to put behavior, rules, etc, into objects.  Let the database store the properties of these objects, but put the validation and actual behavior in the objects, in code, that can be used by any layer of the application.

    I am the shizzle, and so was my captcha

  • blar (unregistered) in reply to awefwafwaewaefsadf
    Anonymous:
    Poultine:
    Sadly, anyone who has dealt with the FAFSA or paid student loans online has undoubtedly noticed that they require DOB in MMDDYYYY format. Because, lord knows, modern languages are completely unable to parse human-readable dates.

    FWIW, in Connecticut (and elsewhere, I would imagine) entering dates into crime information searches is still largely done in this format. I assume that this is so deeply entrenched in Gub'ment
    functioning that they don't even realize it's a WTF.
    Tell me what this date is:
     
    12062006
     
    Is that:
     
    Dec 6, 2006
    June 12, 2006
    June 20, 1206
    simply invalid, because there is no 20th month?
     
    Yeah, they ask for a specific date format.  That's because people like to write stuff like:
    Yesterday
    Today
    Tomorrow
    June 12
    Ju 12 06
     
    12/06/2006
    06/12/2006
     
    in date fields.
     
    The real WTF is that you don't realize just how ambiguous dates can be...

     

    It's pretty simple really. You just constrain the input to drop downs or a calendar control.

  • (cs)

    This reminds me of the Corel Paradox error message:

    "You have tried to use an undeclared variable"

    It doesn't tell you which variable was undeclared.

     

     

  • (cs) in reply to triso
    triso:
    ammoQ:
    R.Flowers:
    Funny. I'm pretty sure that it took longer to write the FAQ article than it would have to correct the bug.

    The FAQ was probably not written by the programmer(s).
    End users are remarkably flexible when it comes to quick fixes like that.  We had the opposite problem with our product. Our first salesmen found a bug, in the very first release, something like: "Program will crash if the operator tries to pick a province or state before picking a country.  The fix for this was to pick a country before choosing your province or state."
    Years later, I was out with him visiting a potential customer and I heard him mention that Canada should be entered before Alberta or the "program won't like it."
    Back at the hotel I had a good laugh at his expense when he told me that he mentioned this to every potential customer and new salesman that he trained,  The bug was fixed in the second release and since we had no customers for the first release, it was all in his mind.  He assumed we never fixed it and he never bothered to check to see if we removed it.


    Yes, I've more than once found a bug in our software, months after it went life, but no-one ever complained; they just found a way around it, assuming it was their fault if the program oppened messages boxing saying something like "ORA-1722: invalid number". (Yes, when our program runs into an unhandled(*) error, we do not try to hide it - we show it to the user, hoping he will tell us...)



    (*) it will be catched on the outermost level, where the specific reason cannot be determined anymore; of course the right place to handle it would be close to the source of the problem

  • Dave (unregistered) in reply to GoatCheez

    For some reason, people lump all programmers whowrite in any particular language together, e.g. "C programmers are dinosaurs" "Java programmers are wet behind the ears" "C++ programmers are narrow minded jerks" "perl programmers are undisciplined cowboys"  ... "VB programmers don't know how to properly trap errors".

    It's quite possible to be an excellent VB programmer, or a lousy C/C++/Java etc programmer. I've programmed in more languages than I want to think about, and it's the programmer, not the language.


  • (cs) in reply to Shizzle
    Anonymous:
    Jeff S:
    pjsson:
    Anonymous:

    Hehe, a quick search and you find a few more:

    http://support.salescart.com/faq-advanced.htm#q10 http://www.liberum.org/snitz/topic.asp?TOPIC_ID=3824

    What's the best way to handle database validation to be immune from format changes? Say you work in a large organization and several applications access a database. The DBA for some reason changes a format, for example increasing length of some string column. Do all applications need to be changed or is it possible to query a database for data constraints? Haven't done any DB programming since SQL Server 97 and our application owned the DB scheme so we never had this problem.



    Another great use of stored procedures.   In .NET, the CommandBuilder class lets you query a stored procedure to see what datatypes and lengths all of its parameters are.  From there, your app has all it needs to know about the database schema and can validate input.  This does require an extra round-trip to the database rather than setting the parameters at the client, but it results in more accurate parameters and handles the situation you describe.  Also, your code is a little shorter and easier. 

    Older ADO has a refresh() method (or something like that, don't remmeber exactly the name) of a command object that does the same.

    Funny, that's a great question and something that is usually overlooked in the "stored procedures versus in-line code" debate.

    - Jeff

    Unfortuantely, validation often requires much more than knowing the data type and its maximum size.  For example, are you allowed to enter dates entered that are in the past?  Can the date be more than 5, 10, 15 (or whatever your application requires) days in the future?  Maybe the amount of days in the future is dependent on what service level they selected in another field!  Can the weight be over 500 pounds?  Does the zip code match the city?  Did they fill in the required information for the type of widget they specified?

    This is the whole issue with putting all the 'business logic' into stored procedures.  The knowledge of the logic often needs to be known on all levels of an application, and once it sits in the database, it's pretty much lost to everything else.  Sure you can build table after table in some crazy attempt to capture logic in tables and rows, but then you are almost putting code into tables.

    In really complex applications, it is far better to put behavior, rules, etc, into objects.  Let the database store the properties of these objects, but put the validation and actual behavior in the objects, in code, that can be used by any layer of the application.

    I am the shizzle, and so was my captcha


    Good post, but you missed the entire point.  In fact, this "object layer" that you propose may very well make use of stored procedures and use the technique I discussed to validate it's input before calling a stored proc to put data in the db.  I don't recall him asking about business logic or me mentioning anything about it; the question was regarding changes in the physical database schema.

    A common, and often crucial, mistake that you and many database developers make is confusing the logical business model with the physical database design.

  • (cs) in reply to noname
    Anonymous:
    dhromed:
    ammoQ:
    R.Flowers:
    Funny. I'm pretty sure that it took longer to write the FAQ article than it would have to correct the bug.

    The FAQ was probably not written by the programmer(s).


    That wouldn't make the point less valid.

    The following could have happened:

    - lazy or incompetent or both programmer uses CInt(input).
    - Within half an hour, that part is tested and judged to accurately process numbers and reject NaNs. Spec fulfilled!
    - weeks later, the product is shipped.
    - within days, a call comes in, stating that particular error message
    - the support team contacts the development team there is an error such and such.
    - the development team looks into it.
    - the next day, the development team communicates back what the cause is.
    - the support team talks to management about what needs to be done.
    - the next day, management decides not issue a patch, but to add to the documentation.
    - somewhere in the week after that, an entry gets added to the FAQ with this problem and its solution -- which really is a workaround, not a fix.
    - the problem remains in the FAQ forever and never gets solved.

    OR

    - The programmer formats the input with a few deft keystrokes in 5 minutes.
    - The world is a happier place.


    To be fair you left some parts out of option 2.
    • ...
    • The next day, management decides to fix the issue.
    • The issue is added to the issues log
    • The requirements, test, development and support teams give thier estimates for how long the fix will take.
    • A project planning meeting is held to discuss the priority rankng of the issue versus other open issues.
    • A project planning meeting is held to discuss which group will supply funding for fix to the issue.
    • A project planning meeting is held to discuss changes to the timeline to account for the addition of the issue to the project plan.
    • The programmer formats the input with a few deft keystrokes in 5 minutes.
    • That part is tested by the test team and judged to accurately address the issue.
    • A project planning meeting is held to develope a deployment plan for the fix.
    • A change request is issued to apply the fix to the UAT testing environment
    • The change request is finally approved after several minor typos are fixed.
    • That part is tested by the user acceptance test team and judged to accurately address the issue.
    • A change request is issued to apply the fix to the Beta testing environment
    • The change request is finally approved after several minor typos are fixed.
    • That part is tested by the beta test team and judged to accurately address the issue.
    • A change request is issued to apply the fix to production
    • The change request is finally approved after several minor typos are fixed.
    • Weeks later, the product is shipped.

    There are two types of people in business:

    Those who attend meetings

    and those who take messages for those in meetings

  • (cs) in reply to Shizzle
    Shizzle:

    Unfortuantely, validation often requires much more than knowing the data type and its maximum size.  For example, are you allowed to enter dates entered that are in the past?  Can the date be more than 5, 10, 15 (or whatever your application requires) days in the future?  Maybe the amount of days in the future is dependent on what service level they selected in another field!  Can the weight be over 500 pounds?  Does the zip code match the city?  Did they fill in the required information for the type of widget they specified?

    This is the whole issue with putting all the 'business logic' into stored procedures.  The knowledge of the logic often needs to be known on all levels of an application, and once it sits in the database, it's pretty much lost to everything else.  Sure you can build table after table in some crazy attempt to capture logic in tables and rows, but then you are almost putting code into tables.

    In really complex applications, it is far better to put behavior, rules, etc, into objects.  Let the database store the properties of these objects, but put the validation and actual behavior in the objects, in code, that can be used by any layer of the application.


    The reason why you put the checks into the database is that you want to make sure that no invalid data ever makes it to the database, no matter if it comes from an interactive session with a database tool, your objects or any other program that has access to the database.  Constraints are the safest way to ensure that. But then it might be to late for well-behaving program to wait until the real insert is attemted to report on an invalid field value. I think there is no easy way around that without violating the DRY principle. One possible way out of this dilemna would be to have this constraints in some meta format, so a generator makes both the db constraints as well as the source code for your objects in Java, C# or whatever.
  • blar (unregistered) in reply to Dave

    Anonymous:
    For some reason, people lump all programmers whowrite in any particular language together, e.g. "C programmers are dinosaurs" "Java programmers are wet behind the ears" "C++ programmers are narrow minded jerks" "perl programmers are undisciplined cowboys"  ... "VB programmers don't know how to properly trap errors".

    It's quite possible to be an excellent VB programmer, or a lousy C/C++/Java etc programmer. I've programmed in more languages than I want to think about, and it's the programmer, not the language.


    I don't know about you but I'm a programmer. End of story. I sometimes use C#, sometimes it's Java, sometimes it's C/C++,sometime's it's even VB and rarely it's Perl. That's the difference. A guy who says their a VB programmer is a novice to be wary of.

  • (cs) in reply to GoatCheez
    GoatCheez:
    Anonymous:

    GoatCheez:
    On the second error.....
    .... the POINT I'm trying to make is that anyone who only knows how to "program" in vb, doesn't know how to program...

    <font face="Verdana" size="2"> </font>

    <font face="Verdana" size="2">
    </font><font face="Verdana" size="2">I really didn't get this, if someone programs in VB doesn't know how to program? So I could assume that if I don't read French I don't know how to read right?</font>

    <font face="Verdana" size="2">If you know how to program, you know how to program, now if you learned how to use an IDE and started writing stuff from "cookbooks" that's not programming, in VB, C, Perl, or any other language.</font>

    <font face="Verdana" size="2">The Language is just a matter of syntaxis... If you have the brains and the knowledge, the only thing you need is a reference book and library documentation (unless you chose to build you own in Assembly of course). </font>

    <font face="Verdana" size="2">And you know what?  Curly Brackets are overrated anyway...</font>

    <font face="Verdana" size="2">Hectore</font>



    The problem is that average Joe Shmoe opens up VB6, throws a label and a picturebox on a form. Has a button assign the image (one actual line of code), and then thinks they are a coding god because it was so easy. Everything else stated I agree with 100%.


    Goat cheeze -- who cares what that particular person thinks of their programming skills?  Does this intimidate you?  Do these "vb programmers" hurt your feelings or affect your career?  Should no one ever be allowed to write any code other than people with 4-year college degrees, multiple certifications, and 10-years of assembly experience?  Hobbyist programmers shouldn't exist?  RAD programming that small companies often need shouldn't be allowed?  All code should be in one of the languages that you approve of?  (have you published a list yet, by the way?)

    Labelling all vb programmers in this manner makes you sound bitter, jaded, ignorant and close-minded; grow up, open your eyes and try opening your mind a little.  Should we hate everyone who writes batch files for the same reason?   HTML?   Javascript?  All these people should be classified in the same manner that you are proposing?  Am I automatically a crappy programmer because now and then I like VB myself?  Does that information alone give you the info you need to judge my programming skills, without even seeing the code?

    In a way, asking someone their opinion of VB (VB.Net, by the way, not VB <=6) is a great interview question.  If you get "I love VB!  It's all I know/use" then it tells you to maybe avoid that candidate, but if you get "VB sucks!  It is for noobies!  All VB code is bad!" it tells you that that candidate is even worse.
  • rp (unregistered) in reply to GoatCheez
    GoatCheez:
    (...) This person was unable to translate 15 lines of C# to VB.NET.

    Times like this I want to wrap my hands around someone's neck... Awell....

    You sure have unorthodox translation techniques ... I prefer to use Lutz Roeder's Reflector myself. And I think SharpDevelop can do it as well.

  • tyfon (unregistered) in reply to blar
    Anonymous:

    It's pretty simple really. You just constrain the input to drop downs or a calendar control.

    Or you can just enter those into a postgres database and it will accept them happily ;)

  • (cs) in reply to Bus Raker
    Bus Raker:

    GoatCheez:
    On the second error.....

    For some reason, VB programmers don't know how to properly trap errors. Somehow they all know about "On Error Resume Next", but ask them what it actually does and they stare at you with a blank look as if they don't need to know.

    I think in this day and age it's not really appropriate to associate a programmer with a language, given that 95% of us have probably developed in at least 3 languages.

    I think the term you were looking for is 'Beginning programmer that has only programmed in VB'.  There's no such thing as an 'advanced VB programmer' because at that point they wouldn't be using VB except to support legacy applications.  Does anyone really start new projects in VB.Net rather than C#.Net?



    Sure, I do now and then?   Why not?  Because I should be afraid that people like Goat Cheeze will laugh at me?  I think I can handle it.

    It's funny, we often think of programmers as "independant thinkers", those who "don't conform" or who don't worry about what other people think .... but it seems that this fear of using VB or even  considering it to be worthy is the equivalent of peer pressure and the need to be accepted and to avoid being labelled a certain way by others that might not be "cool".  Kind of ironic.  
  • Scott (unregistered) in reply to GoatCheez

    GoatCheez:
    The most surprising is that people do start projects in VB.NET instead of C#, and that people are learning VB.NET as their first language. It is simply not a good idea.

    What a completely uneducated, thing to say.  Did you know that anything I can do in C#, I can do in VB.NET?  Why is it a bad idea?  Probably only because you've heard people bash VB.  VB is a great language.  So is C#.  So is Java.  That's as moronic as saying "It surprises me that people drive blue cars.  It is simply not a good idea."

    Language wars are pointless.  I've seen as much bad C# as I have bad VB, and I'm sure I could find a bunch of bad Java, PHP, Perl or any other language. 

    If you prefer a language other than VB, good for you.  Many smart people do.  And many smart people prefer VB.

    GoatCheez:
    There is one good thing about being in support

    In support? So I guess you aren't a programmer either?

  • dave (unregistered) in reply to awefwafwaewaefsadf

    The real WTF is that you don't realize just how ambiguous dates can be...

    Of course if Americans stop using the mindless and illogical way of putting the months first (AFAIK they're the only people who format dates this way) then it would be unambiguous using either the European or International forms: 06062006 20060606

    As you can work out which the year is by examing either the last or first four digits. (Would only cause problems if you're using dates back to 0 CE).

  • (cs) in reply to noname

    i like your thinking...
    but after all that analysis and requirements gathering, i hope something other than "The programmer formats the input with a few deft keystrokes in 5 minutes." is determined as a suitable change!!!

    limiting keystrokes is all good and well, but take a look at the bigger picture. what usuability rule implies that date input such as 05201981 would ever be good practice @%#!

  • Maz (unregistered)

    Is the captcha test reading stuff from the forums? Because I just got "stfu".

  • rp (unregistered) in reply to dhromed
    dhromed:
    [...] The programmer formats the input with a few deft keystrokes in 5 minutes.
    - The world is a happier place.

    b: dhromed, I'd like to have a word with you about this forms application you are responsible for.

    d: Sure boss, by the way, remember that stupid CInt() error we were getting last week? It's fixed! It only took about 5 minutes, actually.

    b: How's that?

    d: Harry said: this is a one-line fix, and then two months for it to make it through the paperwork, tell you what, why don't you just give me a remote desktop connection and I'll fix it for you on the spot. I swear, it only took five minutes!

    b: Who is Harry?

    d: Well, Harry N. Scarry from Vaporware, the firm that built the application. I have him on the phone every other day! Talk about product support.

    b: Are you aware that Vaporware fired Harry a couple of months ago?

    d: ???

    b: Now what I wanted to discuss with you, last evening I tried this form from home, and I noticed that it didn't ask for a Social Security Number; it asked for my Credit Card Number instead. How long has it been doing this, you think?

    d: I've never seen this. It always ask me for my Social Security Number.

    b: Here at the office, yes. Have you ever tried it from home?

    d: Ummm ... well ... that would be ... ummmm ... yes I think I tried that ... umm ... a couple of months ago. You know maybe it's a glitch, I talked to Andy over lunch and he said he and Bert have been fixing some things earlier this week.

    b: How many people have used this form this month, you think?

    d: Well, that would be over 10,000. It's very popular. No wonder, it's so convenient ...

    b: Well on the other line I have a certain Mr. Johnson, he was called by his credit card company, he claims $100,000 have disappeared from his account, and he thinks it has something to do with filling out his credit card nuber on this forms application, shall I put him through to you?

    d: If you would be so kind sir, much appreciated.

  • (cs) in reply to Jeff S
    Jeff S:
    Bus Raker:

    GoatCheez:
    On the second error.....

    For some reason, VB programmers don't know how to properly trap errors. Somehow they all know about "On Error Resume Next", but ask them what it actually does and they stare at you with a blank look as if they don't need to know.

    I think in this day and age it's not really appropriate to associate a programmer with a language, given that 95% of us have probably developed in at least 3 languages.

    I think the term you were looking for is 'Beginning programmer that has only programmed in VB'.  There's no such thing as an 'advanced VB programmer' because at that point they wouldn't be using VB except to support legacy applications.  Does anyone really start new projects in VB.Net rather than C#.Net?



    Sure, I do now and then?   Why not?  Because I should be afraid that people like Goat Cheeze will laugh at me?  I think I can handle it.

    It's funny, we often think of programmers as "independant thinkers", those who "don't conform" or who don't worry about what other people think .... but it seems that this fear of using VB or even  considering it to be worthy is the equivalent of peer pressure and the need to be accepted and to avoid being labelled a certain way by others that might not be "cool".  Kind of ironic.  

    All of the signs coming from Microsoft are VB out C# in.  Analyzing the supply and demand will demonstrate why C# coders get paid much more.  Maybe that's why my senior programmer spent $1000's to send me to a 'C# for experienced VB Programmers' class three states away.

    It's your own problem if you are looking for a job in 5 years and you only are confortable in VB, and speak only Latin for that matter.

  • (cs) in reply to Jeff S
    Jeff S:

    Do these "vb programmers" hurt your feelings or affect your career?


    They do hurt my career, yet at the same time advance it in a way.
    The "vb programmers" I speak of write poorly architectured applications for corporations and then get to keep their job simply because they can never finish the application. Instead of having the application upgraded every couple of years, it gets upgraded constantly, and is always undergoing fixes for "random" crashing. It's not the fault of VB, but rather of the programmer, who thinks VB is god and that everything should be done in it. Have they ever used another language? No.
    NOT ALL VB PROGRAMMERS FALL INTO THIS CATEGORY, BUT ALL TOO MANY DO!
    They advance my career because they rely on other programmers to do the real programming of their application. Real programming being the components they they all so rely on. I would say that 98% of the code that I fix is in VB. Not all of it is poorly written, but the majority is. The majority of support is also questions on basic design as opposed to fixing a bug. They have no idea how to do simple things like using a control array (in vb6), or what a hashtable is or how to use one(vb.net). Granted, no one knows these things right off the bat, but they don't even bother to search for information themselves.


    Jeff S:

    Should we hate everyone who writes batch files for the same reason?   HTML?   Javascript?  All these people should be classified in the same manner that you are proposing?


    I have no idea where you get this or where it comes from. I never said anything of the sort.

    Jeff S:

    Labelling all vb programmers in this manner makes you sound bitter, jaded, ignorant and close-minded; grow up, open your eyes and try opening your mind a little.


    I never labeled ALL vb programmers in that manner. I said those that ONLY know how to program in vb. I consider myself a VB programmer. I use it when it fits. It is a fine language in the right hands. Most of my bitterness comes from the times of VB6. I am bitter towards VB.

    Scott:

    GoatCheez:
    The most surprising is that people do start projects in VB.NET instead of C#, and that people are learning VB.NET as their first language. It is simply not a good idea.

    What a completely uneducated, thing to say.  Did you know that anything I can do in C#, I can do in VB.NET?  Why is it a bad idea?  Probably only because you've heard people bash VB.  VB is a great language.  So is C#.  So is Java.  That's as moronic as saying "It surprises me that people drive blue cars.  It is simply not a good idea."


    Why is it uneducated?
    A person learning VB.NET instead of C# as their first language will get frustrated with most other languages when they try to learn another. C# is a smarter choice because of how similar it is to C, C++, and Java. There are others that it is also similar too, but I simply listed the most popular ones. If a person is coming from a VB6 background, they should learn VB.NET. I stated earlier why that path is better.

    I have thought poorly of VB since I first came in contact with it: VB5. Even then though, I did see where it is useful. VB(6) is not a GREAT language. It gets the job done where needed. VB(.NET) is MUCH better (it is almost the same as C#, but with different syntax). It is useful, however I STRONGLY suggest that VB programmers of all kinds LEARN OTHER LANGUAGES.

  • byrmol (unregistered) in reply to Shizzle
    This is the whole issue with putting all the 'business logic' into stored procedures.  The knowledge of the logic often needs to be known on all levels of an application, and once it sits in the database, it's pretty much lost to everything else.  Sure you can build table after table in some crazy attempt to capture logic in tables and rows, but then you are almost putting code into tables.

    In really complex applications, it is far better to put behavior, rules, etc, into objects.  Let the database store the properties of these objects, but put the validation and actual behavior in the objects, in code, that can be used by any layer of the application.

    I am the shizzle, and so was my captcha

    What a great way to waste the most expensive component in your enterprise. After 30 years of theory and impementation, we'll just throw it all away and jam the data logic into some busted arse middle tier.....

    You just made baby Codd cry, Date morn and Pascal froth... not a bad effort really.....

  • Paula (unregistered) in reply to David
    Anonymous:
    I find it amusing that only VB developers comment on grammatical and spelling errors on here.


    On Spelling Error Resume Next

    Reply

        That's Because They Don't Know How To Code

    End Reply
  • (cs) in reply to GoatCheez
    GoatCheez:
    POINT I'm trying to make is that anyone who only knows how to "program" in vb, doesn't know how to program.


    Keyword here, people, is ONLY.


    It also seems that the people who feel the need to defend VB agains all attacks, real or perceived, are also incapable of simple English language comprehension or analytical thinking, and yet pride themselves on picking up minor grammatical and spelling errors.  Quite the contradiction that is.


    You know what, I've been thinking about what GoatCheez said, and I'm going to step it up a notch.  I put it to you that anyone who only knows how to "program" in one language, doesn't know how to program.


    I leave the proof as an exercise for the reader, as it seems it should be obvious.


    Further, I suggest you take the word "program" and the word program to mean two different things, and I expect this was the meaning that GoatCheez intended when he wrote the PP.

  • zebedee (unregistered) in reply to awefwafwaewaefsadf
    Anonymous:
    Poultine:
    Sadly, anyone who has dealt with the FAFSA or paid student loans online has undoubtedly noticed that they require DOB in MMDDYYYY format. Because, lord knows, modern languages are completely unable to parse human-readable dates.

    FWIW, in Connecticut (and elsewhere, I would imagine) entering dates into crime information searches is still largely done in this format. I assume that this is so deeply entrenched in Gub'ment
    functioning that they don't even realize it's a WTF.
    Tell me what this date is:
     
    12062006
     
    Is that:
     
    Dec 6, 2006
    June 12, 2006
    June 20, 1206
    simply invalid, because there is no 20th month?
     
    Yeah, they ask for a specific date format.  That's because people like to write stuff like:
    Yesterday
    Today
    Tomorrow
    June 12
    Ju 12 06
     
    12/06/2006
    06/12/2006
     
    in date fields.
     
    The real WTF is that you don't realize just how ambiguous dates can be...

    $ cvs diff -D "1 hour ago" foo.c

    Magic.

Leave a comment on “Form Invalidation”

Log In or post as a guest

Replying to comment #:

« Return to Article