Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Programming: a Book or Practicing Only?

  1. Jun 4, 2012 #1
    Hi, Everybody

    I'm an electrical engineering student who has been doing Java programming for a while. I have started learning OOP directly from practicing, mostly using youtube tutorials, without getting into theories or concepts before. Lately, I have thought to start reading a book about OOP in an attempt to get a deeper understanding of the concepts behind programming and especially OOP.

    I'm not learning OOP and programming, in general, only to contribute to my discipline, but also as a hobby. I have a vision to learn other languages, such as HTML, CSS, php... so on. For this I want to ask, is it really necessary to read a book abut OOP, or any programming paradigm/language, to be a good programmer? or is practicing more important and enough to do well?

    Thanks.
     
  2. jcsd
  3. Jun 4, 2012 #2
    Well...I don't know about you, but I had been a programmer for a while BEFORE I wanted to learn OOP...not being a CS major but an EE (me too) I was able to follow OOP examples and write an entire OOP program...but I had the feeling and wasn't really getting, so, I audit an OOP class and realized I REALLY wasn't getting it.

    So, I think there are quite a few important concepts you REALLY need to study to fully understand and effectively use OOP...inheritance, encapsulation, etc.

    Other than that, as an engineer, I would recommend learning Python...it's got a lot of modules and tools for engineering/scientific work...I have no use for HTML, CSS, PHP...that's web development stuff...

    my 2cents
     
  4. Jun 11, 2012 #3
    For me, I didn't need any assistance about changing languages.
    The concept is the same everywhere...
     
  5. Jun 11, 2012 #4

    Stephen Tashi

    User Avatar
    Science Advisor

    In my opinion, you are unlikely to learn object oriented programming practices simply by writing code. People who do that merely learn the syntax of an object oriented programming language and they continue to write in a procedural programming style. (The fact that you use classes in your program doesn't mean that you are using object oriented programming.)

    If you think you are an exception to this, verify it by looking at some heavy duty discussions of object oriented programming on the web. Look for some of Marshall Cline's posts. If you know C++, look at his C++ FAQ book.
     
  6. Jun 11, 2012 #5
    I would recommend going to your university library and reading this
    http://dl.acm.org/citation.cfm?id=624721
    or perhaps you can find the original on the net somewhere, I tried and failed.

    This is a revised version he wrote years later
    www.research.att.com/~bs/whatis.pdf
    but I think the original was better.

    I would read the original several times and think about it until I was confident I really understood it.

    He is the C++ guy, but I'm not trying to sell C++. The original was trying to communicate some very fundamental ideas about exactly what object oriented programming was. It was trying to get across the core ideas of what this was and how it had evolved from prior ideas.

    At the end of the original article there were a couple of sentences, roughly "and there is still this problem and this problem and this problem with object oriented programming. Nobody today knows what the answer to those problems are, but in ten years someone will probably figure that out." I have always wondered whether someone did and what the answer was.
     
  7. Jun 12, 2012 #6

    chiro

    User Avatar
    Science Advisor

    Hey CDTOE and welcome to the forums.

    I would recommend you do both: read books and write your own code.

    The thing is, that if you can learn a lesson from someone else just by reading or hearing their story, you can forgo a lot of the trial and error that they had to go through. Even if this is a little superficial, it still helps you advance to a point that would otherwise take a chunk of your time.

    You don't really have to a C++ programmer to program in an OOP kind of style. If you ever look at John Carmacks code, you'll see that he wrote very good code in C that was in the same kind of vein as an object oriented implementation, before he ended up writing things in C++ (which he did for Doom 3).

    You can, if you really wanted to, implement most of the stuff in C++ for OOP in C with a lot of meta-data and some clever design, but it's probably easier to just use C++.

    In fact if you ever end up getting a repository for a complex platform like a game engine, or something like say Adobe photoshop, or anything with support for complex plugins, scripting interfaces and so on, you will see that the design has tonnes and tonnes of metadata that is used to add all the functionality that makes this possible.

    So the main point I'm trying to say is that you can extend one environment to something a lot more rich and flexible by writing your own code to do this, but most people won't want to do this and instead just get something that someone has already created, and also if it is has been tested and is widely used (and some kind of standard).

    The benefits for doing it yourself is that you have control over everything including the design and the implementation itself and for highly specific custom applications, you need this.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Programming: a Book or Practicing Only?
  1. Books for Programming? (Replies: 6)

  2. Free Programming e-books (Replies: 27)

Loading...