Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
I'm trying to learn as much as I can about programming/linux/computers. What are some good lesson sets or books for learning C++ and Terminal? I really enjoy "Learn Python The ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2013
    Posts
    19

    Resources for learning to program


    I'm trying to learn as much as I can about programming/linux/computers. What are some good lesson sets or books for learning C++ and Terminal? I really enjoy "Learn Python The Hard Way" (sorry I cant post links yet) . Could you find something similar?

    Thanks!

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,533
    Here is a link to an updated version of Niklaus Wirth's "Algorithms and Data Structures" book - he is the inventor of the Pascal and Modula-2 programming languages, and was the faculty advisor of one of my best friends who subsequently went on to be one of the inventors of the Intel 8086 and 8076 chips. The original edition has a place of honor on my bookshelf, and I still refer to it from time to time, 28 years after it was published. Do bear in mind that this is an academic text that treats software engineering issues in great depth and detail. Keep a bottle of aspirin handy!

    http://www.ethoberon.ethz.ch/WirthPubl/AD.pdf
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jul 2013
    Posts
    19
    Quote Originally Posted by Rubberman View Post
    Here is a link to an updated version of Niklaus Wirth's "Algorithms and Data Structures" book - he is the inventor of the Pascal and Modula-2 programming languages, and was the faculty advisor of one of my best friends who subsequently went on to be one of the inventors of the Intel 8086 and 8076 chips. The original edition has a place of honor on my bookshelf, and I still refer to it from time to time, 28 years after it was published. Do bear in mind that this is an academic text that treats software engineering issues in great depth and detail. Keep a bottle of aspirin handy!
    Thanks man, but that's not really what I'm looking for. I need something a tad bit more specific to certain topics. (All that is code for: I'm really stupid, dumb it down)

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,533
    Quote Originally Posted by emanmcdow View Post
    Thanks man, but that's not really what I'm looking for. I need something a tad bit more specific to certain topics. (All that is code for: I'm really stupid, dumb it down)
    First, don't sell yourself short. Second if you are interested in C++, then Dan Saks has written some great books on that subject, with appropriate OOPS stuff included. I work with a lot of engineers who are like you - keep it simple! Unfortunately, REAL software engineering is NOT simple. I was an engineering major in the 1960's. My most useful class for software engineering (I was a mechanical engineering major at the time)? A philosophy course in formal logic! Fortunately, my university had a philosophy requirement for engineering majors, so I picked formal logic. Seems that it was the perfect fit!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    Jul 2013
    Posts
    19
    Quote Originally Posted by Rubberman View Post
    First, don't sell yourself short. Second if you are interested in C++, then Dan Saks has written some great books on that subject, with appropriate OOPS stuff included. I work with a lot of engineers who are like you - keep it simple! Unfortunately, REAL software engineering is NOT simple. I was an engineering major in the 1960's. My most useful class for software engineering (I was a mechanical engineering major at the time)? A philosophy course in formal logic! Fortunately, my university had a philosophy requirement for engineering majors, so I picked formal logic. Seems that it was the perfect fit!
    Cool, I'll take a look at some of his stuff. Right now I'm pretty new to the computer world, so I'm trying to take it slow. I plan to get into some more complicated things later on.

  6. #6
    Linux Newbie Syndacate's Avatar
    Join Date
    May 2012
    Location
    Hell..no literally, this state is hell..
    Posts
    192
    Not entirely sure what you mean by 'terminal'. If you mean BASH scripting, just google 'bash tutorial' and you'll get like 100 hits. Any of them is more than enough of a primer as what you'd need to do simple BASH scripting.

    If you're talking about "what commands to type, when to type them" - as I see that question come up a lot - that comes with time, there's no easy one-stop-shop book for that. There's really not much to a shell as you interact with it from a terminal, it's just a bunch of path variables and the exec of programs, i/o redirection, etc. This is why most OS classes have people write a basic shell. It's all about how you use the power with it, extend it, etc. For this you simply need to be around a Linux OS long enough to know what to type, why you're using a terminal, etc. Hope that explains it.

    As for C++. There's 1001 books for C++, and just as many online primer guides. As for that, what I'd recommend is actually learning Java. Why? Not because Java is good or anything, but it has the **** engineered out of it and coding wise is arguably as close as you can get to perfect in terms of object oriented program. Once you know understand how the blocks fit together in Java, it's very very easy to port this to C++. The only difference is that with C++ you won't have the entire world at your finger tips in terms of libraries, built in GUI's, etc. Though there's still regular C/C++ bindings for that so you can always use external libraries anyway. Yes, there's a little extra memory management stuff in C++, but it's very easy to pick up...and you'll have a good place to start it from using Java as the object use concepts will be near-identical. Java seems like a complete hassle when you first use it, because it takes time to learn why things are done a certain way, though I honestly think that learning Java first made me a better C++ developer in terms of OO programming. Good OO usage + design patterns + SW architecture lead to very nice OO programs. The problem is simply that it's a lot easier to abuse C++ than Java when it comes to OO principles.

    Now everything I do is in C and I still preach OO-esqe design where applicable, haha.

    Sorry that this post is all over the place in terms of thought process, I'm tired and am just kind of writing my thoughts out in whatever order they spill .

  7. #7
    Just Joined!
    Join Date
    Jul 2013
    Posts
    19
    Quote Originally Posted by Syndacate View Post
    Not entirely sure what you mean by 'terminal'. If you mean BASH scripting, just google 'bash tutorial' and you'll get like 100 hits. Any of them is more than enough of a primer as what you'd need to do simple BASH scripting.

    If you're talking about "what commands to type, when to type them" - as I see that question come up a lot - that comes with time, there's no easy one-stop-shop book for that. There's really not much to a shell as you interact with it from a terminal, it's just a bunch of path variables and the exec of programs, i/o redirection, etc. This is why most OS classes have people write a basic shell. It's all about how you use the power with it, extend it, etc. For this you simply need to be around a Linux OS long enough to know what to type, why you're using a terminal, etc. Hope that explains it.

    As for C++. There's 1001 books for C++, and just as many online primer guides. As for that, what I'd recommend is actually learning Java. Why? Not because Java is good or anything, but it has the **** engineered out of it and coding wise is arguably as close as you can get to perfect in terms of object oriented program. Once you know understand how the blocks fit together in Java, it's very very easy to port this to C++. The only difference is that with C++ you won't have the entire world at your finger tips in terms of libraries, built in GUI's, etc. Though there's still regular C/C++ bindings for that so you can always use external libraries anyway. Yes, there's a little extra memory management stuff in C++, but it's very easy to pick up...and you'll have a good place to start it from using Java as the object use concepts will be near-identical. Java seems like a complete hassle when you first use it, because it takes time to learn why things are done a certain way, though I honestly think that learning Java first made me a better C++ developer in terms of OO programming. Good OO usage + design patterns + SW architecture lead to very nice OO programs. The problem is simply that it's a lot easier to abuse C++ than Java when it comes to OO principles.

    Now everything I do is in C and I still preach OO-esqe design where applicable, haha.

    Sorry that this post is all over the place in terms of thought process, I'm tired and am just kind of writing my thoughts out in whatever order they spill .
    Are you saying cpp has a lot of the same syntax, or its generally similar in how it's arranged?

  8. #8
    Linux Newbie Syndacate's Avatar
    Join Date
    May 2012
    Location
    Hell..no literally, this state is hell..
    Posts
    192
    Quote Originally Posted by emanmcdow View Post
    Are you saying cpp has a lot of the same syntax, or its generally similar in how it's arranged?
    Both.

    The semantics is similar, the syntax is similar, and the architecture you'd ideally create with both is similar. That's why I kind of recommend it as learning. I suppose if you don't want any OOP experience it's kind of useless, but if that's the case theres' no point in learning C++, just learn C and leave it at that. It kind of forces you to use (at least decent) OOP concepts, which C++ will not at any level. Because of this, it's much easier to abuse C++ as it lacks any kind of enforcement when it comes to any kind of principles of the language, it'll only care about actual code errors.

  9. #9
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,533
    Quote Originally Posted by Syndacate View Post
    Both.

    The semantics is similar, the syntax is similar, and the architecture you'd ideally create with both is similar. That's why I kind of recommend it as learning. I suppose if you don't want any OOP experience it's kind of useless, but if that's the case theres' no point in learning C++, just learn C and leave it at that. It kind of forces you to use (at least decent) OOP concepts, which C++ will not at any level. Because of this, it's much easier to abuse C++ as it lacks any kind of enforcement when it comes to any kind of principles of the language, it'll only care about actual code errors.
    C++ was originally called "C with classes". It used a pre-processor (like cpp) to turn C++ code into C code. This is why C code works with C++ applications. Of course, the world has turned a few times since that! Myself, I prefer C++ because of its better support for object-oriented constructs, but I often use C inside it when that makes sense (network/socket programming comes to mind). Also, there are a lot of STL (Standard Template Library) constructs in C++ that are incredibly useful, such as vectors, queues, maps, etc. There are no equivalents (other than for vectors/arrays) in C, so if you need such constructs, you generally have to code them yourself. Having done that, I can say I would rather not do it again!

    That said, I was using object-oriented concepts in my C code back in the 1980's, but when I discovered C++ around 1990 or so I never looked back, except when I need to write operating system kernel modules or low-level TCP/IP code, which I normally wrap inside C++ classes.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  10. #10
    Linux Newbie Syndacate's Avatar
    Join Date
    May 2012
    Location
    Hell..no literally, this state is hell..
    Posts
    192
    Quote Originally Posted by Rubberman View Post
    C++ was originally called "C with classes". It used a pre-processor (like cpp) to turn C++ code into C code. This is why C code works with C++ applications. Of course, the world has turned a few times since that! Myself, I prefer C++ because of its better support for object-oriented constructs, but I often use C inside it when that makes sense (network/socket programming comes to mind). Also, there are a lot of STL (Standard Template Library) constructs in C++ that are incredibly useful, such as vectors, queues, maps, etc. There are no equivalents (other than for vectors/arrays) in C, so if you need such constructs, you generally have to code them yourself. Having done that, I can say I would rather not do it again!

    That said, I was using object-oriented concepts in my C code back in the 1980's, but when I discovered C++ around 1990 or so I never looked back, except when I need to write operating system kernel modules or low-level TCP/IP code, which I normally wrap inside C++ classes.
    Yeah, C++ is no longer like that. I have heard of the days (I didn't program through them, haha) where it was literally just a preprocessor. Now compiler optimization allows for a better compilation if it's not translated first. Though yeah, C++ has evolved quite a bit. I think what you're saying is slightly false because of this, and I hear it all the time at work. First let's determine that C != C++. Yes, they claim it's completely backwards compatible but anybody whose had to port a large C app to C++ app knows better. Also, using non-member functions (ie. "C") in C++ isn't using C, it's using non-member C++ functions, or using C++ procedurally instead of OO. The difference I see is mostly in how it's named in compilation, IMO, hence extern C's.

    That all being said, as far as the STL goes, you need to remember that that's **not** part of C++. It's very common with C++, some might even say 'standard' , but it's not part of the C++ draft spec. This is the case with some embedded systems, they'll have a C++ compiler, but the STL isn't always implemented. It is a library, not built-in functionality, despite it being 'standard', ha. So while you have no equivalent in C, you don't exactly have them in C++ per-se either. Not sure why somebody hasn't implemented a version of the STL in C to some extent with opaque pointers and less typing, but I'm sure somebody has and it just isn't as common due to the lack of classes. You can't do the full thing due to the lack of templates and classes, but you could make some equivalents, for vectors, maps, strings, etc. Obviously they'd be used a bit differently, but same in concept.

    As for using C++ vs C, yeah, I prefer C++ as well. Unfortunately in driver development there's a lot of incorrect info floating around at the managerial level keeping me using C. Namely it's to the tune of "C++ is slower" - which is true to some extent if it's used properly as an OO system with virtual functions/vtable luts and what-not, but IMO the better system arch can (and typically does) make up for the loss in performance. Though I guess one can argue that a properly crafted C arch would always be faster by some small margin.

    C++ is nice because you can opt to do things in an OO design OR you can do things procedurally, as one would in C. That flexibility makes it an epic programming language, IMO.

Page 1 of 2 1 2 LastLast

Posting Permissions

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