All posts by Abhishek Nagekar

Starting With Python

Ok so first let me make it clear, this is not a tutorial. I don’t really know that much as to write a tutorial myself. I am still a beginner.

So let me start with it. I have had a good idea of C programming and can code basic stuff in it. I noticed that even thought I had been learning C from quite a lot of time, I cannot really do much in it. Just some basic operations. I agree that the memory level access that C gives cannot be matched by other languages that I know, but then I was paying a quite high price for this privilege.

I needed to make a decision at this stage. Whether to keep learning C with a hope that someday I will learn it all, get good with all the memory and stack concepts, and will be able to code my complex applications or to start with a different language, a much higher level one. I googled and googled. Read lot of stuff on reputed forums and discussion boards. I was finally convinced to drop C temporarily and start with a new language. Then when I get mature enough with all memory management concepts, I can come back to it and learn it all.

Hence starts my expedition to search for a new language. There are numerous to be honest, but I wanted to go with a highly supported and used language, so that I would have proper documentation to refer. I already knew basics of Perl and PHP, but I always felt they are less programming and more of the scripting type of languages. Java is something I stay away from, and I am still to discover the reason for it. I own a RaspberryPi, which, if you don’t know, is a credit card sized PC, which is used by enthusiasts of all kinds to experiment on. If you read a thread or two on their official forum, you will quickly realize that Python is the language of choice for the people developing hobist projects on their Pi-s. So, I thought, there is something good about this language. I read further and found out that this language has a vast collection of built-in and third party libraries which can help you will pretty much everything you do in Python. Moreover, I found out that it also includes a dedicated raspberryPi library to control the GIPOs of the Pi. Impressive, isn’t it?

So Python was it. Next what?

I knew one thing for sure, that I will never be short on resources for reading about python language. Firing up a google search confirmed it. The documentation on their official site is too good, but the problem is, it is a bit too advanced for newbies to understand.

Searching a bit more, I found something much more for me. It was a book called “How to think like a Computer Scientist with Python”. It is an open and free book, and you can get it anywhere. Here is a link if you are interested. https://www.greenteapress.com/thinkpython/thinkCSpy.pdf

I am currently on this book and I have got a fine idea of what this language is and what not. Hope I finish up with it soon. Till then, keep learning!

Why you must get a RaspberryPi

Since you are reading this, I can assume you have some sort of interest in computers and technology, as that is all this blog has. It is also very likely that you might have heard of this single-board computer called Raspberry-Pi which literally took over the internet back when it was launched. A $35 PC sounds great, and if you ask a tech freak like me, that sounds mouth watering. So what is it that you can really do with this machine and well, do you really need it?

Price

$35 is what you pay for the board. But keep in mind that the board comes as it is, without the supporting material (microUSB charger and SD card) which are a must to boot up the Pi. So it is obligatory expenditure once you buy the Pi, but that’s not too much either. In around $45, you have a ‘working’ Pi. Next problem is of the input and output. Even though the Pi is running, you aren’t really giving it input and taking output, right? For that. you have an array of options. I choose the cheapest; bought a ethernet cable, hooked the Pi to my router and I was able to work on my Pi via SSH. Basically, I had a secondary PC (or server as I love to call it) set up in $50, which is still very cheap, considering the alternatives.

Or, if you got some extra money to put, and to make a proper computer out of it, you can do as one of my friend did. He bought a $30 second hand monitor, a cheap set of mouse and keyboard and set them up like a real pc. The benefit of doing this is you don’t have to depend on your primary pc to work on your Pi and makes it independent. The disadvantage of this, apart from the obvious bigger price tag is that it results in waste of the precious memory, which you should consider when only 512MB is available at your disposal. This option will cost you around $100, if you manage to get the components cheap like my friend did.

Use

This might be the more important thing to consider for most. If you are a techie like me, then you might have already guessed the benefits. Let me just point out a few, that I felt, using it for about 4 months now.Firstly, being a nix fan boy, I tend to troubleshoot more than use something, anything. It might seem normal to some, but earlier, I had to format my desktop every other week due to some or the other troublesome application that I install. Now, since I have a secondary PC to experiment on, I don’t fear of destroying the data or anything, because a new clean OS install just a ‘dd’ away. It really helps you to worry about whats really important, lol.

I use my Pi as a web server most of the time. Earlier I had a Linux VPS with DigitalOcean, the $5/month one. I had my blog on it, and also I used to experiment on it. Problem was, since I had that sole server to experiment on, I would mess it up at times and my blog used to go down. Another problem was, the connection speed. I own a slow internet connection at home, so uploading large files to test was a pain. Now, thanks to my Pi, my web server is just a network hop away. It has really saved my time.

It is not that prototype thing that only a few other know, but Pi has evolved into a very successful computer on the arm platform. Many popular distros have a specialized R-Pi version, instruction set and its dedicated community.

Pi can be used as a compiler or interpreter for the project you are working on and can act as an excellent emulator.

The actual uses of a Pi are only bound by your imagination. You can check out youtube for some inspiration on what people use their Pis for. I have seen amazing quad-copters, small time security systems, robots, model planes and much more, powered by this small device. I didnt do anything interesting with it, but I sure will, till then, a web server works too.

Finally…

So after telling you this, it might be a little more clear as to why you should get yourself a Pi. It is all about learning something new and building something with what you learnt. I will add some of my small time projects on this blog soon.