

InterviewSolution
Saved Bookmarks
1. |
Solve : programming lang? |
Answer» i dont know which lang to learn Java, Java 2, C, C++, C# C++ would be a bit more of a challenge - it is OO-based. what do you mean 00-based?? :-?Object orrientated. Or whatever I can't spell.oh ok.. i think im going to do programming for a hobbyDo you have any programming experiance? And what is your PARTICULAR reason for wanting to program for Linux (is that your OS)?dont laugh but ive programmed in truebasic and thats pretty much it.. it is my os for my computer in my room and it will also be on my new macbook when i get it.. and couldnt i use c for in windows kinda?Any programming language is a good start. I say C for Linux because it is the major programming language used for developing the operating system. The great bulk of the kernel, drivers, libraries etc. are coded in C. Some stuff is in C++. I find object-oriented programming languages less intuitive than procedural languages, but that is very much a matter of training and personal preference.Quote I find object-oriented programming languages less intuitive than procedural languages, but that is very much a matter of training and personal preference. Does that mean you like it more or less? whats the difference between the two?Quote Does that mean you like it more or less?Hah! I'm too old, or dense, or both, to get on with OO. Procedural languages harmonise better with the way I think - step by step, one thing at a time... (No, I don't do parallelism and semaphores either...)im still confused on the difference between the two :-?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.oh kool thanksProcedural 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.i love this forum.... i learn new stuff daily 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.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 \ [emailprotected]'(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.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?it's for the purpose of code obfuscation http://en.wikipedia.org/wiki/Obfuscated_codei 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Í!@John Chain, try making a chess game in OO. It's hard enough in procedural They are both designed for different needs.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.Quote i kinda thought so. like the wiki says, it has its uses. http://en.wikipedia.org/wiki/Obfuscated_code#Uses_for_obfuscation How would OO be easier? What about the AI?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... } }im so confused |
|