Posts

Showing posts with the label help

Start C++?

I've been writing C++11 or better code, well since 2010, as I started doing so with the TR1 as was.  We're nearing eight years since then, and it starts to show. So, where would I recommend starting to learn modern C++?  Well, if you've never programmed before, don't start by learning C or C++, go learn Pascal, or Python , or something else which is more friendly.  I started out in Pascal, for a good three years, before I started to work in C and later moved into C++ (in 1998) so if 20 years of C++ teach me anything, it's don't try to learn if as your first language. Once you have a concept of how to program, then start to learn C++, and I would recommend finding someone - hopefully like me - and asking them.  An hours chat with them, to help swap what you know with what they know, is a good start. Saving any such friends, YouTube, watch CPPCon, BoostCon, watch talks about programming C++ but most importantly get a development environment and cut some code, if y...

C++ : Ignored qualifiers (-Wignored-qualifiers)

What is an ignored qualifier?  Well, in a class, lets have a student class: #include <string> class Student {     public:         const std::string Name;     private:         bool m_Present;     public:         Student(const std::string& p_Name)             :             Name(p_Name),             m_Present         {         }                 void SetPresent() { m_Present = true; }         void SetAbsent() { m_Present = false; } }; Now, we may want to access the present flag, therefore provide a function to do so:     bool Present() const { return m_Present } This function is telling the user of our class quite a bit, it tells them that the return type is boolean and that the calling...

Development : Python, MySQL and Protocol Buffers Build

Today I've come to a totally virgin installation upon a server, this was for a work group I've got to head up whom are looking at pushing MySQL with Python.  And things initially went wrong... I stipulated they had to use Python3 and thought everything else would be fine for them to install with Pip3, so... sudo apt-get update sudo apt-get upgrade sudo apt-get install python3 sudo apt-get install python3-pip sudo apt-get install mysql-server Everything looked fine, their user could install packages through Pip3 and they had Flask and a few other things and were flying.  I used the mysql client on the command like to test I could add a few items and also ran... sudo mysql_secure_installation To do the basic hardening of the database, so everything was fine... Right?....RIGHT?!?! No, not exactly....  "I can't get mysql.connector" .... Came the cry. And they were right, it reported a myriad of build issues and could not install.  I took a look... NIGHTMARE! It appear...