Viewing 14 posts - 121 through 134 (of 134 total)
  • Author
    Posts
  • #28259
    TipponTippon
    Participant
      @tippon
      Forumite Points: 0

      Thanks Ed 🙂

      I haven’t had much chance to do anything this week. I was ill first, then Alice picked up some sort of infection. She’s been waking herself up through the night, and I’ve been getting up with her as Ellen’s got work. Trying to follow the And, Or and Not lessons on no sleep was a bad idea.

      It didn’t help that Codecademy decided to throw in loads of maths in the practice examples too. One of the question was along the lines of ‘Make line 2 equal to (-(-(-2))) * 45 (17 + -34) * 48 = Not Not True. I haven’t used brackets in anger in over twenty years, and they’re throwing that in along with != and > < etc. when I’ve had no sleep! ???

      #28268
      Ed PEd P
      Participant
        @edps
        Forumite Points: 39

        I know that tired feeling – we get it when asked to have the grandchildren for a sleep-over!

        #28342
        Wheels-Of-FireWheels-Of-Fire
        Participant
          @grahamdearsley
          Forumite Points: 4

          He he the good old BEDMAS (brackets, exponent, divide, multiply, add, subtract) chestnut. This works in general but remember you are still working from left to right. In your own programs it is best to use brackets to make sure things get worked out in the order you want.

          #28433
          Wheels-Of-FireWheels-Of-Fire
          Participant
            @grahamdearsley
            Forumite Points: 4

            I am thinking of buying a C++ programming book. I have my eye on “A Tour of C++” by Bjarne Stroustrup (the creator of C++). Anyone have any views on this ?

            #28435
            Ed PEd P
            Participant
              @edps
              Forumite Points: 39

              I am thinking of buying a C++ programming book. I have my eye on “A Tour of C++” by Bjarne Stroustrup (the creator of C++). Anyone have any views on this ?

              Hard graft – probably NOT a good intro book. Don’t laugh but I quite rate’ C++ for Dummies’!

              #28439
              Wheels-Of-FireWheels-Of-Fire
              Participant
                @grahamdearsley
                Forumite Points: 4

                I would never knock the Dummies series. I got the original DOS for Dummies when my company gave me my first PC in 1993. I looked at the preview sections of A Tour of C++ on Amazon though and it seems to be about the right level of detail for me. The same author also does a Guide to programming using C++ book but only the last few chapters look like they will tell me things I dont already know.

                #28452
                Ed PEd P
                Participant
                  @edps
                  Forumite Points: 39

                  C++ is really a language for team development, or the situations where code sections (objects) are frequently reused/modified and maintained. If you are just programming for yourself and getting into the down and dirty sections (normally graphics programming) that need low-level access, then you may be better off learning Rust.

                  [edit] To touch my cap at those who venerate the structured object approach of C++. Learning C++ does teach you to ‘objectify’ your programming, but frankly once you have learned that skill you can even apply it to your C coding. C++ makes writing unsafe code more difficult but still perfectly possible!

                  #28469
                  Wheels-Of-FireWheels-Of-Fire
                  Participant
                    @grahamdearsley
                    Forumite Points: 4

                    And that is why Microsoft would really like us to only write managed code using their .NET framework and C#. As I am a born tinkerer though i’m not having it ?

                    #28470
                    Wheels-Of-FireWheels-Of-Fire
                    Participant
                      @grahamdearsley
                      Forumite Points: 4

                      I am actually coming on a fair bit with my understanding of objects and classes inspite of the errors and omissions in the edX course that i’m following. The whole business of splitting functions into seperate declaration header and definition cpp files outside of the “main” cpp makes much more sense when you do it with classes. If you include a public: constructor in your class then you can create as many instances of that class as you like inside main as class objects. Each instance will have its own name and C++ will treat them as a data type so you can have an array of class objects for instance. I am also finding my way around Visual Sudio much better now so thats handy too.

                      #28471
                      Wheels-Of-FireWheels-Of-Fire
                      Participant
                        @grahamdearsley
                        Forumite Points: 4

                        I said before that there is no easy way to rename a project in Visual Studio but I lied ! All you have to do is make sure the solution window is open (it is by default), right click the project name, choose rename and type a new name. This will change the name of your project folder but it will not rename the folders that Visual Studio created within it so its still best to get it right first time.

                        #28657
                        Ed PEd P
                        Participant
                          @edps
                          Forumite Points: 39

                          @Graham, if you are still playing with C++ check out Godot on Steam (free) this is a C++ (or C#) game engine. Even if you do not like games please do not dismiss it, I have used similar engines to carry out simulation studies (mainly GPSS-;like Montecarlo simulations. but the particle system could allow anything, even fire-spread to be modelled)

                          #28784
                          Wheels-Of-FireWheels-Of-Fire
                          Participant
                            @grahamdearsley
                            Forumite Points: 4

                            It does look interesting Ed but I AM still playing with C++ and its taking up all my spare learning power at the moment ?. I even managed to get a sensible answer one of my question on StackOverflow last week !

                            #28799
                            Ed PEd P
                            Participant
                              @edps
                              Forumite Points: 39

                              The ‘C and C++’ crowd are generally less ‘pissy’ about addressing questions than the high and mighty Pythonistas on StackOverflow.

                              I suspect it is because there are so many logical and work-flow flaws with Python that the Pythonistas fell they need to defend it by reverting to unhelpful responses such as saying the subject is closed because something vaguely similar has been asked before (they rarely provide links to these mythical answers).

                              I only mentioned Godot as I have always found it easier to learn by doing, and visual output (as in games) soon reveals logical and coding flaws.

                              #28819
                              Wheels-Of-FireWheels-Of-Fire
                              Participant
                                @grahamdearsley
                                Forumite Points: 4

                                Oh I don’t know Ed, they can be pretty pissy about C++ as well. Let me list a few of the types I have found.

                                1. Those who know what they are talking about and are glad to help

                                2. Those who know what they are talking about but don’t seem to want to answer questions because THEY had to learn the hard way.

                                3. Those who don’t know what they are talking about but like to look clever so answer with off topic nonsense.

                                4. Those who’s answer to every question is “Go buy a book”.

                                 

                              Viewing 14 posts - 121 through 134 (of 134 total)
                              • You must be logged in to reply to this topic.