• Meira (unregistered)

    A contractor once demanded bilingual comments on every line of code, with different color for each language.

  • Techpaul (unregistered) in reply to dkf

    Saw similar problem many years ago on VMS (microVax).

    One day everyone came in and could not log on, so a few of us went to computer room. Yes system was powered up, check console and it was halfway through printing out (yes a hard copy terminal) a comms error. Look across at the in those days Rack mounted disk drives, one of the drives had the activity light continuously flashing.

    What drive was it, oh only the main OS drive. Luckily we could tell from the console printout that the backup had completed successfully. Swap out hard drive, restore from backup and 2 hours later everything working.

    Looked like while logging the comms error, the logger had encountered a bad block, so logged the error, to get a bad block, so logged the error.....

    Unfortunately as this was running at system level nothing else including the printout of the original error message could continue!

    Don't even get me on Ultrix back ups that did not recognise end of media properly....

  • Techpaul (unregistered) in reply to Code Dependent

    yes you are only thinking about Gabrielle Drake and no I don't blame you either...

  • Patrick (unregistered) in reply to Jon
    Jon:
    I'm no VB6 user, so I may be mistaken, but I'm pretty sure that Format(Date, "mm/dd/yyyy") means the dates are in fact padded on output. They're padded in a stupid way, but they are padded.
    I'm also pretty sure that "mm" in VB6 date formatting is the minute field.
  • Stiggy (unregistered) in reply to Patrick
    Patrick:
    Jon:
    I'm no VB6 user, so I may be mistaken, but I'm pretty sure that Format(Date, "mm/dd/yyyy") means the dates are in fact padded on output. They're padded in a stupid way, but they are padded.
    I'm also pretty sure that "mm" in VB6 date formatting is the minute field.

    Yes. And no.

    Specifically, m and mm yield unpadded or padded minutes if, and only if, the field immediately preceding it is h or hh.

    The equivalents n or nn could (and should) be used to guarantee minutes in all cases.

    And no, there was corresponding way to get months immediately after hours, other than calling Format twice and concatenating.

    I try to forget the hell that was VB6, but still the nightmares come...

  • VB++ (unregistered)

    It's a long time since I used them, but didn't pre-DOT-NET versions of VB ( and QuickBasic / QBasic ) auto-format all numbers ?

    So, any number intended to be displayed on screen automatically acquired a single space prefix, which had to be stripped using LTrim$ or Mid$ ...

  • pifpafpuf (unregistered)

    The date format is a complete wtf!

    Least significant first (dd/mm/yyyy) or most significant first (yyyy/mm/dd) makes sense, but mm/dd/yyyy is totally retarded.

  • Sebastian (unregistered) in reply to pifpafpuf

    The recursive error logging is pretty bad, but what caught my eye was the all encompassing IF, that really bothers me, exit the sub if its not going to be used :|

  • DiverKas (unregistered) in reply to ParkinT
    ParkinT:
    What's the complaint? The code is heavily commented!!

    What drives me nuts with VB it is intolerant of my habit (from working with a dozen 'normal' languages) of terminating every line with a semicolon. It wouldn't be so bad if VB simply accepted semicolons as another delimiter.

    VB doan nee no stinkin semicolons!

    Seriously, what is the love with that crap anyway? I keep hearing the chants about how C# is so much more terse than VB, then we wade through the endless braces and semicolons and I weep. meh

  • blaster999 (unregistered) in reply to pifpafpuf
    pifpafpuf:
    Least significant first (dd/mm/yyyy) or most significant first (yyyy/mm/dd) makes sense, but mm/dd/yyyy is totally retarded.

    Agreed, but as I heard mm/dd/yyyy is the default in USA.

    Capcha similis. Latin?

  • fizze (unregistered) in reply to Mad Formatter

    Actually this is not a WTF. If you sort filenames alphabetically you do want them to be ordered by year, month then day.

  • (cs) in reply to fizze
    fizze:
    Actually this is not a WTF. If you sort filenames alphabetically you do want them to be ordered by year, month then day.
    Actually, Mad Formatter's point wasn't that yyyMMdd was a bad format, but that first:
    'Create the file name for the current day
            strLogFileName = "Logs\" & CStr(Year(Now)) & CStr(Month(Now)) & CStr(Day(Now)) & "_Log.txt"
    
    Good - except you'll find the logs for the fifth of November (Remember, remember) in the log file for the fifteenth of January, should have used the format "yyyMMdd". But a few lines down:
    'Write the new line to the system log file
            Print #1, Format(Date, "mm/dd/yyyy") & "  " & Format(Time, "hh:mm:ss") & "  " & strFunction & "  " & strMsg
    
    Bad.
  • Mark (unregistered) in reply to ParkinT
    ParkinT:
    What's the complaint? The code is heavily commented!!

    What drives me nuts with VB it is intolerant of my habit (from working with a dozen 'normal' languages) of terminating every line with a semicolon. It wouldn't be so bad if VB simply accepted semicolons as another delimiter.

    I agree with that, but, paradoxically, I also am strangely attracted to the idea of 'overloading whitespace'.

    print( fn()'text'fn()'text' 'text');
    

    instead of

    print( fn()+'text'+fn()+'text' +'text');
    

    or even

    Db db=connstr
    $ !SuicideFee=1.50    // decl money type const, auto-literal
    
    newfn Deposit as // unspecified params from passed objects become named and attached to fn
    db Customer name=fn.name  //autoparsing named params, hidden 'that' assigned
    i id=that.id //customer
    db Account type=fn.3  //positional param, hidden passing of 'that', hidden 'that' assigned
    
    // note invisible fn. below
    msgbox Q You have that.balance as dollars left in your 2 account, commit suicide? Yn
    if Y // search open recent objects for member Y
      add log.txt -+that commited suicide on yy-mm-dd because he only had that.Balance in his 2 account. //pushpop that selector, using that.toString(), expansion of yy-mm-dd from context
      Balance-=SuicideFee // invisible 'that'
      db CustomerDeath -that // push 'that'
      db Accounts.Close   // invisible 'that'
    el
      that.Balance+=2      // param fn.2 or 'amount' or fn.amount
      that.Balance-= %2    //literally $2.00
    ei
    endfn
    
    newfn Main
     msgbox I Please enter you +name and deposit +amount Oc
     Deposit msgbox savings
    endfn
    

    Conclusion, a lot of our syntax exists simply to be kind to parsing tools, the compiler parser could deal with such a context sensative language.

  • jak pozycjonować stronę wordpress (unregistered)

    Excellent blog! Do you have any tips and hints for aspiring writers?

    I'm hoping to start my own site soon but I'm a little lost on everything. Would you propose starting with a free platform like Wordpress or go for a paid option? There are so many choices out there that I'm completely overwhelmed .. Any recommendations? Thank you! http://w.koreaht.kr/bbs/board.php?bo_table=free&wr_id=255850

  • Essie (unregistered)

    http://www.pmslaw.kr/bbs/board.php?bo_table=onlinesangdam&wr_id=133293 Very good post. I will be going through some of these issues as well.. http://koreaht2.motionblue.org/bbs/board.php?bo_table=free&wr_id=252273 http://www.gabiz.kr/g5/bbs/board.php?bo_table=free&wr_id=367304

Leave a comment on “Desperate Times”

Log In or post as a guest

Replying to comment #:

« Return to Article