Posts

Showing posts from February, 2018

Typing Test hack with Python

Image
10fastfingers.com provides a simple typing test. One look at it and it looks hackable. Hence I wrote a code in python to read the words from the division containing the words and type it in the textbox. Here is the stepwise procedure: 1. Find out the id of the division that contains words and the format in which it is contained. For this, we right click on the words on 10fastfingers.com and click Inspect Element. Here we find out that the id of the node containing the words is row 1. 2. Right click on the parent div of the row1 division, and copy the inner Html, and paste it in  a text file. 3. We use BeautifulSoup Python library to extract the words and then use pyautogui library to write the words as though written by the keyboard. We introduce a delay at the start so as to open the test page and click on the input field. 4. Run the python file, quickly reopen the test page and click on the input field. and BOOM! see the magic happen! Code : import requests from b...

Some suggestions for programmers

1. Increase your typing speed : Improve your typing speed by learning how to touch type ( typing without looking at the keyboard ). Believe me it is easy, and it will help you a lot. It can save a lot of time which is lost while looking at the keyboard. 2. Learn to use Google appropriately :  The main problem with many programmers out there is they don't use the best resource they have to solve their problems : GOOGLE. Search for only relevant text of your problem, google will do the rest. Try to open links only pointing to some famous sites such as stackoverflow, w3schools etc. 3. Do not reinvent the wheel : There are tons of libraries at your disposal that can be used to make your program more concise and efficient, both performance and logic vise. And most importantly the libraries contain codes which are in the best optimized condition, something an amateur programmer cannot write by himself. 4. Comment your Code : NEVER forget to comment any logical block of your prog...

Started Learning Github

Today, with the motivation of my senior, I started to learn how to use git versioning in github, using the trial lesson on Github.io . Learned the basics of push, pull, repository, branches, commit, adding and delete files to the repo.