Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: programming lang  (Read 12104 times)

0 Members and 1 Guest are viewing this topic.

Rob Pomeroy



    Prodigy

  • Systems Architect
  • Thanked: 124
    • Me
  • Experience: Expert
  • OS: Other
Re: programming lang
« Reply #15 on: August 03, 2006, 04:07:00 PM »
Well procedural is mostly do this do that blah blah blah.

OO is all about objects.  X does this, X does that, X relates to Y in this way, etc.
Only able to visit the forums sporadically, sorry.

Geek & Dummy - honest news, reviews and howtos

unlovedwarrior

    Topic Starter


    Guru

  • someday this name will be known
  • Thanked: 13
    Re: programming lang
    « Reply #16 on: August 03, 2006, 04:40:20 PM »
    oh kool thanks

    Neil



      Expert
    • Fear me Track. Noone can escape my wrath.
    • Thanked: 3
      Re: programming lang
      « Reply #17 on: August 03, 2006, 05:25:14 PM »
      Procedural is easier to understand what's going on... OO is easier to make "windows" applications, meaning it has buttons and scroll bars and things. But it's rarely used for games.

      unlovedwarrior

        Topic Starter


        Guru

      • someday this name will be known
      • Thanked: 13
        Re: programming lang
        « Reply #18 on: August 03, 2006, 06:17:25 PM »
        i love this forum.... i learn new stuff daily ;D

        johnchain

        • Guest
        Re: programming lang
        « Reply #19 on: August 03, 2006, 07:32:00 PM »
        Why is procedural seen as easier. Object Orientated programs are basically designed for simplicity.

        Create and object->make it do something.

        I think it is simpler in many cases. And I am not sure, but I think all OO languages are high level languages.

        Learn C for linux and just in general. Good place to start and know how your computer works at the same time. They call it the "high low-level" language. Since it can touch parts of your hardware while being easy to read and understand.

        Rob Pomeroy



          Prodigy

        • Systems Architect
        • Thanked: 124
          • Me
        • Experience: Expert
        • OS: Other
        Re: programming lang
        « Reply #20 on: August 04, 2006, 04:20:11 AM »
        Quote
        while being easy to read and understand.
        Can you read and understand this?  ;)
        #include <stdio.h>

        main(t,_,a)
        char *a;
        {return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
        main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a
        )&&t == 2 ?_<13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t<0?t<-72?main(_,
        t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+\
        ,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/\
        +k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){n\
        l]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\
        n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
        ;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;\
        #'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/")
        :t<-50?_==*a ?putchar(a[31]):main(-65,_,a+1):main((*a == '/')+t,_,a\
        +1 ):0<t?main ( 2, 2 , "%s"):*a=='/'||main(0,main(-61,*a, "!ek;dc \
        i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}

        Compile and run if you're curious.  You'll be surprised at the results.
        « Last Edit: August 04, 2006, 04:21:32 AM by robpomeroy »
        Only able to visit the forums sporadically, sorry.

        Geek & Dummy - honest news, reviews and howtos

        panboy



          Adviser

        • Its all just a twisted game of cat and mouse
        • Thanked: 4
          Re: programming lang
          « Reply #21 on: August 04, 2006, 09:24:55 AM »
          Rob if your going to post Code , at least try to format it into Brain Usable Segments.

          I could Go trough that and tell you what it would do.... But its a Mess why would you write it like that?
          Wields The Mighty Hammer of Computer Justice

          ghostdog74



            Specialist

            Thanked: 27
            Re: programming lang
            « Reply #22 on: August 04, 2006, 09:38:49 AM »
            it's for the purpose of code obfuscation
            http://en.wikipedia.org/wiki/Obfuscated_code

            panboy



              Adviser

            • Its all just a twisted game of cat and mouse
            • Thanked: 4
              Re: programming lang
              « Reply #23 on: August 04, 2006, 09:57:50 AM »
              i kinda thought so.

              But why would one use Obfuscated Code to show someone how complicated it is?

              it doesn't show it's Real Difficulty

              thats kinda like posting the contents of a compiled EXE and saying this is what OO looks like

              Code: [Select]
              MZ1     ! !     Ð                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ËË€üu8<w4.ƒ>}  u
              .€> tè& r
              P.¡} ÄÄXƒÄÏ
              Àu3Ûë      < u3À»­­Ï.ÿ.y PSQRVWŒÈŽØŽÀ¾€ ¿Š »š Yº° ÄÄX r.£} .Æ _^ZY[Xà       VCDEX.DLL VDDRegisterInit VDDDispatch ‡Û‡Û‡Û‡Û‡Ûÿÿÿÿ@È    MSCDEX00             ¸3Í!€ûtëP?€ÿ2tëH?´° Í/?û­­uë9?&Ž, ´IÍ!´5°/Í!.‰y .Œ{ º ´%°/Í!ºÐ ±ÓêƒÂ´1° Í!¸ LÍ!
              « Last Edit: August 04, 2006, 10:01:54 AM by panboy »
              Wields The Mighty Hammer of Computer Justice

              Neil



                Expert
              • Fear me Track. Noone can escape my wrath.
              • Thanked: 3
                Re: programming lang
                « Reply #24 on: August 04, 2006, 11:36:47 AM »
                @John Chain, try making a chess game in OO. It's hard enough in procedural ;)

                They are both designed for different needs.

                Rob Pomeroy



                  Prodigy

                • Systems Architect
                • Thanked: 124
                  • Me
                • Experience: Expert
                • OS: Other
                Re: programming lang
                « Reply #25 on: August 04, 2006, 01:42:55 PM »
                To be honest, I would have thought that a chess game would be the perfect candidate for OO code.  The elements of chess lend themselves readily to description as objects.  I would make an exception to my preference for procedural coding.
                Only able to visit the forums sporadically, sorry.

                Geek & Dummy - honest news, reviews and howtos

                ghostdog74



                  Specialist

                  Thanked: 27
                  Re: programming lang
                  « Reply #26 on: August 04, 2006, 08:04:51 PM »
                  Quote
                  i kinda thought so.
                  But why would one use Obfuscated Code to show someone how complicated it is?

                  like the wiki says, it has its uses.
                  http://en.wikipedia.org/wiki/Obfuscated_code#Uses_for_obfuscation


                  Neil



                    Expert
                  • Fear me Track. Noone can escape my wrath.
                  • Thanked: 3
                    Re: programming lang
                    « Reply #27 on: August 05, 2006, 04:23:20 PM »
                    How would OO be easier? What about the AI?

                    Rob Pomeroy



                      Prodigy

                    • Systems Architect
                    • Thanked: 124
                      • Me
                    • Experience: Expert
                    • OS: Other
                    Re: programming lang
                    « Reply #28 on: August 06, 2006, 01:44:28 AM »
                    class brain {

                      brain
                      {
                        iq = 100;
                        inebriation = 1;
                        confidence = 10;
                      }

                      drink
                      {
                        this.inebriation++;
                        this.iq -= 10;
                        this.confidence++;
                      }

                      think
                      {
                        if (this.inebriation > 3 || this.iq < 50)
                        {
                          result = rand(0, 2000000);
                        }

                        // etc...
                      }

                    }
                    Only able to visit the forums sporadically, sorry.

                    Geek & Dummy - honest news, reviews and howtos

                    unlovedwarrior

                      Topic Starter


                      Guru

                    • someday this name will be known
                    • Thanked: 13
                      Re: programming lang
                      « Reply #29 on: August 06, 2006, 11:33:34 PM »
                      im so confused