Results 1 to 21 of 21
  1. #1
    Old fogey Bender's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Sep 2008
    Post Count
    3,593
    In the midst of all the MW2 threads, here's something different...

    thinking about playing around with learning a more modern language in my spare time at home. I have never been able to get my head around OOP the few times I have dabbled in it.

    I'm an old guy, used to be an RPG II programmer and a COBOL programmer back in the early 80s, before PCs were common in business. Anything that came after cobol is "modern" to me.

    I dabbled in java for a little while, but never really went after it. Was thinking about learning python... What is python used for? is it a rinky dink language like basic, or can it do hard-core stuff? Is python an OO language?

    what's a good language to learn OO programming?

  2. #2
    If you can't slam with the best then jam with the rest sabar's Avatar
    My Team
    San Antonio Spurs
    Join Date
    May 2006
    Post Count
    2,628
    Python is usually used for scripting, but it is certainly powerful enough to write just about anything. It can be used for OO if you choose.

    Almost every language nowadays has OO support natively or from additional modules. C-sharp, C++, and Java are by far the most common OO languages taught. You can easily learn them from the internet or a cheap book.

    In the end, any language is good. You can do OO in C++, C#, Java, Lua, Ruby, Python, Perl, or in a lot of ancient languages too. Look at the syntax of them and pick something that looks easy or useful. Once you pick up OO fundamentals, you can easily transition to any other programming language.

    Even COBOL has OO support these days.

  3. #3
    Rising above the Fray spursncowboys's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Jan 2009
    Post Count
    7,669
    lifehacker just did a good blog on this:
    http://lifehacker.com/5401954/progra...lf-how-to-code

  4. #4
    Old fogey Bender's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Sep 2008
    Post Count
    3,593
    I downloaded python 3.1.1, been playing with the interpreter.

    thanks for the lifehacker link.

    I just want to learn the concepts of OOP. Back in the day, it was all procedural programming.

    I've read a few books on oop, but I think it is harder for an ex-procedural programmer to grasp the concept of objects than it is for someone new to programming.
    Last edited by Bender; 11-11-2009 at 11:59 PM.

  5. #5
    Basketball Expertise spurster's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Aug 1999
    Post Count
    4,132
    Java and C# are probably the best OO languages out there. The languages themselves are so-so, but they come with huge libraries. The disadvantages is that they are slow for anything computationally intensive and they need more a lot more runtime memory.

    Python is a cool language. Its main use is for scripting rather than large-scale programming. It has OO, but that is not its key feature, which is that Python uses indentation for program structure rather than { } or other delimiters. You'll need a editor that will help you keep the indentation consistent.

  6. #6
    Old fogey Bender's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Sep 2008
    Post Count
    3,593
    so what's a good, simple IDE? something better than notepad, but without all the complications and bells & whistles of a powerful IDE.

    a couple years ago when I was messing with java, I used eclipse for an ide, but I thought it was more complicated than I needed at the time.

    I bought a bunch of highly recommended Java books back then, and still have them. Maybe I should get back on learning java instead of python. Yeah, I know, most info is available on the web... but us old guys like books...

    edit: I remember there was something about eclipse I wasn't crazy about. something about directories, or something... workspaces?
    Last edited by Bender; 11-12-2009 at 11:44 AM.

  7. #7
    絶対領域が大好きなんだよ baseline bum's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Mar 2003
    Post Count
    82,061
    If you want to learn Java, Core Java by Cay Horstman is by far the best book out there. I don't know what to recommend if you didn't like Eclipse though. Eclipse is an awesome IDE with its ability to do things like text completion and show do entation in popups. I'm not sure what's good on Windows as a lightweight text editor with syntax highlighting for writing small programs, but in GNU/Linux I like using Kate.

    Python is a really cool language, and if you want a good but not too fast intro to programming it you can watch the lecture videos for MIT's 6.00 class at http://ocw.mit.edu/OcwWeb/Electrical...Home/index.htm.

  8. #8
    絶対領域が大好きなんだよ baseline bum's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Mar 2003
    Post Count
    82,061
    Also, if you want a good overview of OOP, I think Brian Harvey at Cal Berkeley gives a great explanation of it in his CS61A class. It's in the video led Object Oriented Programming I at the page http://webcast.berkeley.edu/course_d...esterid=2008-D

  9. #9
    絶対領域が大好きなんだよ baseline bum's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Mar 2003
    Post Count
    82,061
    If you want to learn a really cool language though, I recommend Scheme. It's incredibly easy to learn while providing powerful techniques that languages like Java and C++ implement in clunky ways. On top of that, the greatest computer science book ever written, the Structure and Interpretation of Computer Programs, uses it to teach one how to program.

    Here's a link to SICP, which is freely available online from MIT Press:
    http://mitpress.mit.edu/sicp/full-text/book/book.html

    I highly recommend following the rest of those CS61A lectures I posted above if you're interested in programming, and the authors also have some outstanding lectures posted at MIT's 6.001 website at http://ocw.mit.edu/OcwWeb/Electrical...Home/index.htm

  10. #10
    Old fogey Bender's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Sep 2008
    Post Count
    3,593
    thanks, I'll check all that out when I get home from work today!

  11. #11
    絶対領域が大好きなんだよ baseline bum's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Mar 2003
    Post Count
    82,061
    Let me warn you that SICP isn't going to spend much time explicitly on OOP though. It'll show you how to implement it, but it's definitely not what you're looking for if learning OOP is your single goal. Still, it's filled with lots of mind-blowing "I didn't know you could do that!" moments.

  12. #12
    絶対領域が大好きなんだよ baseline bum's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Mar 2003
    Post Count
    82,061
    I bought a bunch of highly recommended Java books back then, and still have them. Maybe I should get back on learning java instead of python. Yeah, I know, most info is available on the web... but us old guys like books...
    I'm curious... which books did you try? There are so many awful CS books out there.

  13. #13
    Old fogey Bender's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Sep 2008
    Post Count
    3,593
    can't remember which ones offhand, they are at home. These were recommended on amazon (by noobs), so they may be simplified books...

    edit: oh yeah, I remember a couple: Head First Java, by Kathy Sierra, and Thinking In Java, by Bruce Eckels. And a couple more that I can't remember.

  14. #14
    絶対領域が大好きなんだよ baseline bum's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Mar 2003
    Post Count
    82,061
    Crap. I loved Head First Java.

  15. #15
    Old fogey Bender's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Sep 2008
    Post Count
    3,593
    I remember Head First having an unusual presentation... but I liked it ok. Didn't get very far into it before I quit Java and got into something else.

    The Eckel book was real good if I remember. I might have the Murach Java book too.

  16. #16
    Veteran velik_m's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Jul 2005
    Post Count
    5,663
    It has OO, but that is not its key feature, which is that Python uses indentation for program structure rather than { } or other delimiters.
    Indentation is a key feature of Python?

    Python is the language that in my opinion sucks the least, so i would recommend it.

    Most languages nowdays have OO support. But if you want to learn it, then perhaps a language designed around OO principles like Smalltalk, or maybe even Java, would be best. I think the best method to learn OO, is to at first force yourself to think about everything in terms of objects, methods, inheritance... and try to write everything with object. And then, when you get comfortable with it, you scale back the OO principles to something useful and practical.

    so what's a good, simple IDE? something better than notepad, but without all the complications and bells & whistles of a powerful IDE.
    Python has Stani's Python Editor, which is very nice. I used Notepad++ on Windows and I use Geany on Ubuntu.

  17. #17
    Old fogey Bender's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Sep 2008
    Post Count
    3,593
    my problem a couple years ago while trying out OO, was that, coming from cobol 74, I couldn't get my mind thinking in terms of objects, encapsulation, etc....

    guess I have a linear brain.

    have a lot of time on my hands every evening, so was thinking about getting into it again.
    Plus my 11, almost 12, year old son has expressed interest in learning programming. He's pretty geeky with computers.

  18. #18
    絶対領域が大好きなんだよ baseline bum's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Mar 2003
    Post Count
    82,061
    Just think of OOP as a metaphor where your encapsulated local state, i.e., your object, has a certain level of intelligence built in. You tell it to do things by passing it a message, and it knows how to do them. Your object has all the functions it needs physically encapsulated in it. Instead of having smart functions like in the procedural world, you have smart data that knows how to operate on itself when given simple instructions (i.e., a message telling it to do something, a.k.a., a method call).
    Last edited by baseline bum; 11-12-2009 at 05:39 PM.

  19. #19
    Veteran velik_m's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Jul 2005
    Post Count
    5,663
    my problem a couple years ago while trying out OO, was that, coming from cobol 74, I couldn't get my mind thinking in terms of objects, encapsulation, etc....
    Yeah, i had the same issue - i understood everything about the OO, but when i wrote the program, i just didn't use any of it. Then one day, i said my next program will be OO, no matter what, from now on everything is an object, even if i know there is a better alternative. I forced myself to use OO principles, even if i thought that something was stupid and i could do that stuff faster and better with procedural programming.
    At first it was kind of wierd, but after a while it started to feel natural to think of everything as objects. Of course in practice OO is sometimes overkill and not every situation calls for it, and procedural is just as ok.

    It's always fun to learn new programming philosophies, for instance learning something like Prolog or Erlang. It gives you a new, fresh perspective on stuff, even if you don't end up using it.

  20. #20
    Old fogey Bender's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Sep 2008
    Post Count
    3,593
    I wonder what type of home programming projects I could mess with...?

  21. #21
    Basketball Expertise spurster's Avatar
    My Team
    San Antonio Spurs
    Join Date
    Aug 1999
    Post Count
    4,132
    Indentation is a key feature of Python?
    And parentheses are the key feature of Scheme, lots and lots of parentheses.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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