Posts

How to geek: Learn to code like a pro

Image
Warning! Philosophical text ahead. Skip to the next section to avoid it. A lot of people come up with a lot of brilliant ideas. But not all of them are able to execute their ideas due to lack of programming knowledge. Lack of programming knowledge is something that can only be solved by sitting your ass down and doing a course patiently without giving any excuses. It is important to assess yourself thoroughly. If you don’t know something, you need to accept it. You can’t call yourself a web developer after editing a few HTML templates. If you want to be a web developer, stop editing templates and start building one from scratch. Speed is not more important than fundamentals. If you go after speed, you will end up becoming like season one flash. Another thing I’ve noticed in people is, they are not able to stay motivated for more than a day. They start a course online, binge watch a few videos and then forget about it the next day. An online course is not the same as a TV sh...

Vim: The Text Editor For Geeks

Image
Many of us just love to work with Vim , a simplified text editor with Mouse and GUI is rarely something we use.Being a touch typist we don’t want to move our hands from their position on the keyboard.In simple words,there’s command to everything,from moving the cursor to save and exit. But wait, should I start using Vim just because I’m too lazy to move my hands around mouse? Let me complete, Vim can be used remotely. We can use Vim everywhere and can be run over an SSH connection and it works just well. So if you need to do remote work you only need to learn one tool so why not Vim? What’s Vim? I’m not good with the definitions so lets just copy it from Wikipedia , “ Vim (a contraction of Vi IMproved ) is a clone of Bill Joy 's vi text editor program for Unix. It was written by Bram Moolenaar based on source for a port of the Stevie editor to the Amiga and first released publicly in 1991. Vim is designed for use both from a command-li...

What went wrong with Arrow?

Image
At the beginning of the production of the first season of Arrow, showrunner Greg Berlanti stated that the theme of the series will be loosely based upon Christopher Nolan’s Dark Knight Trilogy henceforth the inception of series was with the neo-noir touch. The character background of Nolan’s Batman is very realistic and thus each of its characters suits to the neo-noir genre. Nolan chose the Joker to be an anarchist psychopath  with assaulted facial scars rather than a sick eerie smiling clown  who gets deranged due to a genetic reaction with a chemical waste. Similarly in Arrow, The Count is shown as a drug dealer  who rolls drug onto the streets by the name of Vertigo rather than the last descendant of a royal family  in the country of Vlatava, who dons an eye gear emitting the EM waves which gives vertigo. The series stick to its continuous theme but when Berlanti announced that he’ll be producing another series with The CW this time of...

How to keep your free hosted Heroku web app awake 24/7

Image
Heroku is a very exciting free hosting service that allows us, developers to host free web apps or websites on the cloud in minutes . This service is especially famous among python developers, as it is probably the only free hosting service that supports python (If you know any other service, let me know in the comments). It is very convenient to deploy experimental code or small scale apps. For those of you who don't know, this format of cloud service is called PaaS, which stands for Platform as a Service. The problem The thing about all these free services online are, they all come with strings attached. Some of them are free only for a limited period of time, and some are free for a limited set of features. I personally prefer the later. An example of the first kind is Microsoft Azure. They have a 30 day trial period and they take your credit card information while registering. Whereas Heroku doesn't take your credit card information while registering. But it has li...

How to get started with applied artificial intelligence : Make your own J.A.R.V.I.S in minutes

Image
2016 has been the year of the chatbots. A lot of instant messaging platforms have opened up to us developers to allow us to integrate our apps and services with them. This allows the apps/businesses to add an element of conversation to their service. Or it can also act as an automated customer service. What is a chatbot A chatbot is a service, powered by rules and sometimes artificial intelligence, that you interact with via a chat interface. This allows us to add an element of conversation to businesses, apps and literally everything around us. How it is made A chatbot is made using the power of natural language processing or NLP which helps in parsing text typed or spoken by a user in natural speaking language. This is achieved by the help of machine learning. Once the language is parsed, the required data can be extracted and used to perform the required actions. This makes it look like the machine is understanding and obeying what we say i...

The magic of recursion

Image
I first encountered the concept of recursion in 11 th grade, in an object-oriented programming class. At the time, I never really bothered about it that much. But now that I really understand the concept, I realized how magical it is. I was very fascinated to see how elegantly it worked. Sometimes I still wonder how it works. Last year, I was doing a course on python on edX. And in the course, I again encountered the concept of recursive functions. The professor explained the concept using the example of ‘towers of Hanoi’, which made it all the more interesting. The best part was, the solution for a classic problem like ‘towers of Hanoi’ could be derived using just seven lines of code. For those of you who don’t know, recursive functions are function that invoke themselves. It works like a loop. The function keeps calling itself until a certain condition is met. All recursive functions can be broadly divided into 2 parts. A condition and a recursive call. A recursive call...

Python swag: Removing duplicate elements from a python list (the unconventional way)

Image
We know that the reason for python to be so popular is that it is very easy to use and a lot complex algorithms can be implemented very easily. Today I am writing this post to share a simple way to do something that is slightly tedious in nature. A ‘list’ is a beautiful data type that is widely used to store a set of data. It is a significant improvement from the concept of arrays. Arrays were static, homogeneous, and pathetic. Lists are dynamic, heterogeneous and so ‘not arrays’. In modern day programming, lists are so much more preferred because we deal with so much real-time data. With this, one of the challenges that we face is redundancy of data in the list. Or in simple words, duplicate elements or repeated elements. It’s not a very complicated problem but it is a thing to consider. There are many ways to remove duplicate elements form a list. But most of them involve iterating through the entire list to compare each element with each other. Today I am going to show...

HOW TO DEPLOY A PYTHON SCRIPT OR PROJECT ON HEROKU

Image
Cloud computing has been one of the biggest revolutions of our time. This has given birth to a lot of cloud services that help, developers and even common people, solve day to day problems. For example, google drive, dropbox etc. are cloud services that give us space to store our data on the cloud (server). Cloud computing has nothing to do with the actual clouds (if you don’t already know). A cloud is a reference to a remote server that we are given temporary access to for a particular kind of usage. Heroku is on such service which allows users to use their server for hosting applications.  This is, provide a platform for running the source code of the project. This service is free, however, there is also a paid account with more privileges. It also allows users to host databases on it. It supports several languages. And it provides a log of all the activities of the project. So let get to the part where we have to deploy python projects or scripts on heroku. Since python is also...

How to automatically ping search engine crawlers using python.

Image
In today’s post we will see how to make a python bot that will automatically ping the search engine crawlers to come and crawl your website/blog. For this. we will be using the help of ping-o-matic.com. Ping-o-matic is a website that dose the same thing i.e it pings the search engine crawlers to come and crawl your website/blog. This helps in getting better ranks in the search results. I don’t know if it really works, but it is definitely worth a try. Once you go into the ping-o-matic website, it will ask you for your website name, website URL, etc. once you hit submit, it will start the pinging. After that it will ask you to bookmark the page so that you don’t have to type in the details again and again. The next time you want to ping, you just have to click on the bookmark. What we will be doing is, we will be opening the bookmarked URL through python. It is not at all complicated. The coding is very simple. Because most of the work will done by ping-o-matic. If you ...

How to use a text file as a database while programming

Image
Welcome back to another post of Teckguide. It has been really long since I have written a post, I am really sorry about that. But I am back with a useful and informative post for all of you. In this post we will see how to use a simple text file as a database. Not a lot of people realize this but normal text file can be a simple alternative for a database like SQL, mongo etc. Although a database is simple to use, beginners find it difficult to use them in their program. So this post if for you if you belong to that category. But before that, What is a database? A database is a collection of data that is stored in the form of tables or relations to easily access any element and all its aspects in one place. These databases have a special column for a ‘primary key’ where a value, that uniquely differentiates all the element, is stored. So it can be imagined like a table with multiple rows and columns. A database can multiple tables. For example, a company can have a da...