Tutor profile: Raghav K.
Subject: Python Programming
C/C++ is so fast. Why do people use Python? Why are computationally intensive algorithms of tensorflow written in Python?
Great question! You're right, C/C++ are much faster than Python. But they're also a pain to use. The programmer has to take care of a bunch of things that they don't have to with Python. Memory cleaning, out of array indexing error - Python helps you with a lot of things C/C++ don't. The cost of this is that Python is very slow. Now Tensorflow has neural nets etc that are very computationally expensive. So what's the hack. Well, all these machine learning libraries are actually written in C/C++ and Python is only a wrapper. That way you get the best of both worlds! The speed of C/C++ and the intuitiveness of Python.
Subject: C++ Programming
Why is C, C++ so fast?
C and C++ algorithms run much faster than their Python/Java counterparts. This is because C and C++ put a lot of responsibility on the programmer to take care that they are adopting good programming practices and correctly implementing the algorithms. For example, if you access out of array elements, Python will give you an error. In C, you will just get garbage values. No error, C will just run. Well, this stripped down error checking allows C to be really really fast!
Subject: Arduino Programming
I am often confused as to what's the difference between an Arduino and a Raspberry Pi?
Well, while there are many operational and functional differences between the two microcontrollers, one of the most fundamental one is that an arduino does not have an operating system or an OS. A raspberry pi on the other hand, comes equipped with a full fledged OS. Now why does that matter? An OS allows you to make use of something known as 'threads'. Threads are the essence of our everyday computers. Ever wonder how so many different applications can run in the background on our laptop or Ipad? Well, there are all being run on different threads which are sharing the CPU resources! An OS manages all these threads and makes sure no thread (or application) hijacks the CPU and stalls the other threads. If the CPU is the factory worker doing all the work, the OS is the manager of the factory, allocating workers to the right tasks :).
needs and Raghav will reply soon.