Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Silly things we used to do?

  1. #11
    You're right.

    Also it should be "fVw / fVh" because is width and height to calculate the OpenGL viewport relation.

    Anyway the result was that graphics were a a bit deformed.
    No signature provided yet.

  2. #12
    The worst thing I did, was try to convert a visual basic app to delphi. It was a totaly mess and a big waste of time. What I learn? never again convert someone else code, specially if it comes from visual basic. It's better to build new things with new approaches. No matter how well writen the original code is, in the end it's always a different way to see and do things, and an incompatible programming philosophy, it's bad if you have only code and zero documentation. I had to refuse the job, but instead I accepted it.

  3. #13
    I would take that challenge But surely there are may coding differences between Pascal and Basic language, that force you to plan some things differently.

  4. #14
    http://govnokod.ru/pascal
    Prepare your facepalm cannon.

  5. #15
    Code:
    FVar : Booelan;
    
    if FVar = True then
    begin
      ...
    end;
    Actually I like doing that!!! I think it is more readable than:

    Code:
    if FVar then
    begin
      ...
    end;

  6. #16
    Not that i have ever done this, but i can imagine the above code would be about same as this
    Code:
    if (a = b) = True then
    begin
      ...
    end;
    Let's hope the compilers know how to optimize the extra comparison out of executable.

  7. #17
    Quote Originally Posted by User137 View Post
    Not that i have ever done this, but i can imagine the above code would be about same as this
    Code:
    if (a = b) = True then
    begin
      ...
    end;
    Let's hope the compilers know how to optimize the extra comparison out of executable.
    As far as I know, Delphi has a shortcut evaluator for booleans. But this is going to push it to the limits

  8. #18
    Quote Originally Posted by pitfiend View Post
    As far as I know, Delphi has a shortcut evaluator for booleans. But this is going to push it to the limits
    I can't see why a compiler should have a hard time optimizing the code. It seems to me, it would be simple to add a rule saying something like:

    Code:
    if our code says
       boolean = True
    then replace the code with
       boolean
    This should be quite easy when you've made a syntax tree.
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  9. #19
    Quote Originally Posted by pstudio View Post
    I can't see why a compiler should have a hard time optimizing the code. It seems to me, it would be simple to add a rule saying something like:

    Code:
    if our code says
       boolean = True
    then replace the code with
       boolean
    This should be quite easy when you've made a syntax tree.
    I misspelled my statement, I wanted to mean: this is pushing the limits of stupidity. Didn't want to sound rude or politicaly incorrect.

  10. #20
    Ah ok, then I misunderstood you
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •