• (cs) in reply to Sch3lp
    Sch3lp:
    I bet she was pretty though :)

    I dunno, but her List sure was Hot.

  • brendan (unregistered)

    158 items on the stack, If they were all pointers (assuming that VB passes pointers as args (I wouldn't put it pass microsoft to make a copy of the item on the stack), and assuming that it's a 32-bit machine), were looking at 158*4=632 bytes on the stack and that's just in calling the function (let alone the any local variables or the stack frame). Now imagine this function being recursive.

  • J (unregistered) in reply to luke727
    luke727:
    That's because your code is slutty.

    Do we have any moderators on this site? I'm fed up of all the idiots.

    Anyway, cute code:

    int kittens = fuzz / claws;

  • (cs)

    Yeah course teaching WTF, regular news. I failed my Fortran course at Uni. They didn't ask 'what flavour of fortran?' so I declared 'ANSI 77 standard' and wrote to that. Got 35% 'coz none of it compiled on the very badly defined VAX compiler (code samples typed by the data-prep dept including transcription errors).

    Where's the WTF in that you may ask?

    Why, the tutor spoke no english and reverted to a series of video tapes. Examples were entered partly real-time by a young programmer who everyone in the class should have recognised - ME! In fact I helped to write the course material in the first place (on a true '77 compiler). On appeal I got 99% due to a spelling mistake. Horrifyingly some of the students on that course went on to military and civilian embedded systems.......

  • whicker (unregistered) in reply to Kiboro
    Kiboro:
    Yeah course teaching WTF, regular news. I failed my Fortran course at Uni. They didn't ask 'what flavour of fortran?' so I declared 'ANSI 77 standard' and wrote to that. Got 35% 'coz none of it compiled on the very badly defined VAX compiler (code samples typed by the data-prep dept including transcription errors).

    Where's the WTF in that you may ask?

    Why, the tutor spoke no english and reverted to a series of video tapes. Examples were entered partly real-time by a young programmer who everyone in the class should have recognised - ME! In fact I helped to write the course material in the first place (on a true '77 compiler). On appeal I got 99% due to a spelling mistake. Horrifyingly some of the students on that course went on to military and civilian embedded systems.......

    And, surprisingly enough, they did just fine. After all, they were intelligent people who either were capable of learning and found other means to learn programming than this one course, or already knew how to program.

    I hope...

  • brendan (unregistered) in reply to Kiboro
    Kiboro:
    Yeah course teaching WTF, regular news. I failed my Fortran course at Uni. They didn't ask 'what flavour of fortran?' so I declared 'ANSI 77 standard' and wrote to that. Got 35% 'coz none of it compiled on the very badly defined VAX compiler (code samples typed by the data-prep dept including transcription errors).

    Where's the WTF in that you may ask?

    Why, the tutor spoke no english and reverted to a series of video tapes. Examples were entered partly real-time by a young programmer who everyone in the class should have recognised - ME! In fact I helped to write the course material in the first place (on a true '77 compiler). On appeal I got 99% due to a spelling mistake. Horrifyingly some of the students on that course went on to military and civilian embedded systems.......

    Can I ask why you didn't know which compiler they were running. And if you weren't told, why didn't you ask?

  • Luke (unregistered) in reply to brendan

    Oh no, not 632 bytes! At that rate, if this function were recursive, you could run out of memory with a depth of just 424,739 calls!

    Ever seen this:?

    #define BUFFER_SIZE 1024
    char temp[BUFFER_SIZE];
    strcpy(temp, ...)
    

    Not that that's a good practice, but declaring bunches of variables has much bigger problems than the memory it uses.

    (Since VB is a garbage collected language, I'm assuming that it declares locals on the heap. If you were on the rediculously small Windows C stack, yes, you would blow your stack faster.)

  • brendan (unregistered) in reply to Luke
    Luke:
    Oh no, not 632 bytes! At that rate, if this function were recursive, you could run out of memory with a depth of just 424,739 calls!

    that's based on a 256_MB_ stack. The default stack size that IIS gives each process is 256_KB_ (based on this KB article) which means that there can only be 414 depth of calls. Which is still a lot in anybodys books. But what I was tring to point out is that I consider this function to memory hungry.

    Luke:
    Ever seen this:?
    #define BUFFER_SIZE 1024
    char temp[BUFFER_SIZE];
    strcpy(temp, ...)
    

    Not that that's a good practice, but declaring bunches of variables has much bigger problems than the memory it uses.

    But is the above code considered to be a good practice when within a recursive function?

    Luke:
    (Since VB is a garbage collected language, I'm assuming that it declares locals on the heap. If you were on the rediculously small Windows C stack, yes, you would blow your stack faster.)
  • Diego (unregistered) in reply to Danielle S. O.
    Danielle S. O.:
    I love how because she's a woman, it's "cute" code. Sexism is alive and well in the programming industry.
    LOL... I'm female, and I say she earned that "cute" title, fair and square ;)

    No collegue of mine has ever, ever considered my code even remotely cute. I may have earned "buggy" , "over designed", "over simplistic", and plain old "WTF" ... but never "cute".

    I used the "cute" term myself on some of my half-baked interns (their code, that is), regardless of gender. Definitely patronizing, but I can't help it, they really are cute, lost puppy style.

    None of them would ever produce a masterpiece such as that Dimmer's, though. Not even students.

    men cant decorate a house women cant code

  • Darwin (unregistered) in reply to Will Perdikakis
    Will Perdikakis:
    That poor, poor stack.

    Not necessarily. The compiler might have optimized the entire sub away. (I think even VBScript compiles to some kind of a bytecode internally, no?)

  • Darwin (unregistered) in reply to Rich
    Rich:
    What I think is the case is that there aren't many other professions where you are thrown in at the deep end with little to no on-the-job training or apprenticeship. Even a bricklayer will spend most of his startup days carting rubbish around the site and making coffee.

    And after some time carting rubbish and making coffee, their skills as bricklayers improve? How?

  • Darwin (unregistered) in reply to luke727
    luke727:
    akatherder:
    Maybe it is just clitems.
    What the fuck is a "clit em"?

    Clit 'ems! They plump when you ***k 'em!

    Perhaps her best area was her stacks. You know, push down, pop up, push down, pop up....

    (OK, OK, I know, that was completely out of line.)

  • iNFiNiTy LoOp (unregistered) in reply to brendan
    brendan:
    that's based on a 256_MB_ stack. The default stack size that IIS gives each process is 256_KB_ (based on this KB article) which means that there can only be 414 depth of calls. Which is still a lot in anybodys books. But what I was tring to point out is that I consider this function to memory hungry.
    And for the record, the NES has a 256 Byte stack. Hurray.
  • brendan (unregistered) in reply to iNFiNiTy LoOp
    iNFiNiTy LoOp:
    And for the record, the NES has a 256 Byte stack. Hurray.

    Just out of curiosity. How big is the address space?

  • Another Anon Coward (unregistered) in reply to brendan

    The real WTF is that this cheap-ass startup was using unpaid intern labor illegally. Legitimate unpaid internships are available only to college students in exchange for college credit, and they're supposed to be watch-and-learn experiences. This type of internship is not supposed to provide any benefit to the company other than props for good corporate citizenship and possibly the advantage of identifying future talent that can be hired after graduation.

    Outside of this narrow scope, unpaid internships in the private sector are illegal under Federal minimum wage laws.

  • Brett (unregistered)

    At least it was dimmed, we had a guy who would've done this but just randomly created the variables anywhere in the code.

  • VB never again (unregistered)

    VB is Evil, nuf said

  • (cs)

    Ha, foolish girl trying to declare her variables in a subroutine. That is not how it's done! You must create an include file. <!--#include file="../../dim_clit.asp"--> where the vars are declared globally. Then just include that file on every page that needs one of your variables such as CurrentUser, pageColor, or Completed. This will wreak maximum havok on your fellow programmers.

  • fgb (unregistered)

    This reminds me of a co-op student I hired (many years and companies ago). I had him write a program do some fairly simple processing of text files.

    When he was done, I took a look at his code, which was reasonably well structured except for the fact that he had made every single variable a global. So there I was, looking at about twenty functions which were all using the same set of roughly twenty variables. So, I though I would help him out a bit and had a discussion with him about using local variables.

    He "rewrote" the program and showed me the results. He had simply taken all those global variables and made them local to main(). He then passed that same long list of variables as parameters to every function in the program.

Leave a comment on “The Dimmer”

Log In or post as a guest

Replying to comment #:

« Return to Article