Shaumik is an optimist, but one who carries an umbrella. An undergrad at Indian Institute of Technology Roorkee and the co-founder of The Blog Bowl, he loves writing, when he's not busy keeping the blue flag flying high.

Shaumik's articles

  1. Top 5 Tools for Naming Your Startup

    So you’ve got a great idea for a business. You’re sure it’s the next big thing, and you’re ready to start bringing it to life.

    But first you need a name.

    If you were Evan Williams), you’d instantly come up with a name like Odeo or Twitter.

    Instead, you’ve come up with 100 name ideas–and they were all terrible. Now you’re looking for some outside help.

    As it happens, there are some useful tools out there that can help you find the name that’ll make you famous.

    Here’s a look at five of the best (plus a few bonus tools that didn’t quite make the cut).

  2. The 10 Things You Should Do When You Have Your Next Web Idea

    You’re spending a lazy afternoon with your family, when a brilliant idea suddenly strikes you. Whether it’s an app, a product, a service, or a new way of doing things: if done right, this idea could be the next uber cool thing, and even change the world. What do you do next? Here’s a guide […]

  3. APIfy Your Legacy App with Toro

    For the Google Summer of Code 2014, I was selected for a project to create a REST API for ATutor. ATutor has hundreds of thousands of lines of code, yet is written in core PHP. Introducing a PHP router class for the API was necessary, but we needed something unintrusive. In this post, we discuss the essential parts of the project. For this post, all code examples would correspond to my fork of ATutor’s repository (links to files will be provided whenever necessary).

    Note – Google Summer of Code is a program where students all around the world can participate in open source projects of mentoring organizations. Google organizes the program and pays the stipends, but the students are not employed by Google at any point during the program.

    Web Routing with Toro

    The first step in the process was to create or write a PHP class to perform the routing. After considering a few options, we decided to go with Toro, a the light weight PHP router. It performs just the routing – nothing more, nothing less. The syntax is pretty intuitive and you will get started in minutes.

    Toro is RESTful- it has support for the standard HTTP methods- GET, POST, PUT and DELETE. There is support for JSON based requests too. All of this is packed in a 120 odd line file.

    Before we proceed, one more step was to configure the server to redirect all requests to the router. This can be performed by adding an .htaccess file in Apache, or changing the configuration file of Nginx. This step of server configuration is explained on the README of Toro’s GitHub repository.

  4. The WordPress Database Demystified

    Since it was released over a decade ago, WordPress has become the most popular CMS choice for beginners and experts alike. Although the installation of WordPress, and the addition of data does not require any knowledge of the underlying structure, you might find yourself in a situation where some knowledge of the database is required.

    The WordPress Database

    Although the favorite choice of users when it comes to working with databases is often phpMyAdmin, we will focus on raw SQL queries, keeping in mind that everyone may not be comfortable with phpMyAdmin (you have an option in phpMyAdmin to run raw SQL queries too!).

    Exploring the Database

    As you probably know, WordPress uses MySQL. To log into MySQL, run the following in your terminal:

    mysql -u [username] -p -D [database_name]
    

    Once you have logged into the WordPress database in MySQL, you can check the tables that WordPress has created by running the following:

  5. 8 Essential Skills Developers Can Learn in a Weekend

    If you’re a beginner who’s finally comfortable developing projects in a particular language, there’s still a long way to go before your work is efficient. There are many technologies that you can learn, certain processes that you can follow that will help you in your life as a web developer. Here’s a basic list — but rest assured you’ll develop your own along the way.

    1. The magic of revision control

    If you haven’t used revision control in the past, you’ve probably been in a situation where your code isn’t working and you’d give anything to get back to the earlier, functioning state of your code. Or perhaps if you maintain backups yourself by adding a suffix to the file name, you have files such as index_17.html.

    Revision control means you can go back to any version of your code — from hours to months in the past. If you’ve used Google Drive, you would probably have used the feature of going back to an old version of a file — that’s rudimentary revision control.

    If you are which software you should learn, here’s the status of such softwares in 2014 — personally, I’d prefer a distributed VCS like Git or Mercurial , as I contribute to open source software. Here’s a guide to getting started with Git, and a guide to using Git in open-source projects.

    2. The secrets of a text editor

    A big chunk of a developer’s day is spent in front of the computer staring at a text editor. Depending on your needs and your development environment, you should master one text editor and thoroughly learn its tips and tricks to get certain stuff done quickly.

    If you prefer working on the terminal, you could try VIM or Emacs. If you like working with a native text editor, you could give Sublime Text a try. If you work on a Mac, you could try something like TextMate.

  6. Debugging in Git with Blame and Bisect

    When you are working with a huge code base, you may discover bugs in your code (or worse, in someone else’s code) that prevent you from proceeding any further in your development. You can checkout to an old commit to see if the bug was present there — but this is often the worst way of doing so. Imagine you have a hundred commits to check — how much time would be wasted?

    Thankfully, Git has two tools that help you with debugging. We will have a look at both and try to understand their use cases. Let us start by intentionally introducing a bug into our code:

    Adding an error line intentionally

    I’ve added a line to the file my_file that is unwanted and assumed to cause the error. I also add a few commits after that to bury the faulty commit. Let us verify that the faulty line has been added to the file by running the following:

    [code language="shell"]
    cat my_file
    [/code]

    Faulty file

    Notice the “Unwanted line” that is supposedly causing the error.

    Debugging with Blame

    Once you have discovered a bug, you may or may not know the location of the faulty code. Let’s say that you do. In our case, let’s say that you know my_file is causing the trouble. In that case, we can run the following command to get more information about the lines in the files, and the commits those lines belong to.

    [code language="shell"]
    git blame my_file
    [/code]

    blame contents of a file

    If you look at the output of git blame, you can see that commit 0bf63b53 is what introduced the bug (“Unwanted line”). If you want to check what else was changed in that commit, or want more information about the same, you can run the following:

    [code language="shell"]
    git show 0bf63b53
    [/code]

    running git show on the bad commit

    There you go — we now know which commit caused the error and what else was changed in that commit. We can proceed to fixing the error.

    Debugging with Bisect

    git blame helps you when you have some idea about what is causing the problem. What if you had no idea what is causing the error and there are hundreds of commits before you can go back to a working state? This is where git bisect comes into play.

    Imagine git bisect as a wizard that takes you through your commits to find out which commit brought in the error. It performs a binary search to look through the commits, before arriving at the one that introduced the bug.

    To start off, we need to select a “good” commit, where the bug is not present. We then need to select a “bad” commit where the bug was present (ideally the latest commit that contains the bug, so you can assign it as “bad”). Git then walks you through recent commits and asks you whether they are “good” or “bad”, until it finds the culprit. It’s essentially a binary search algorithm over the array of commits to find which commit was the first “bad” commit.

  7. A Web Scraper’s Guide to Kimono

    Being a frequent reader of Hacker News, I noticed an item on the front page earlier this year which read, “Kimono – Never write a web scraper again.” Although it got a great number of upvotes, the tech junta was quick to note issues, especially if you are a developer who knows how to write […]

  8. Create a Static Ghost Blog with Buster

    If we were in the mid 2000s, the unanimous choice to start a blog would have been WordPress or Blogger. The last few years have seen a rise in the number of blogging platforms, making this a great time for someone who likes to experiment. One such option, that was released to the public late last year, is Ghost.

    The best part about Ghost is the support for Markdown — which lets you focus on writing. However, if you are still skeptical, you should look at David Blane’s comparison of Ghost’s features to the big three.

    If you agree that you should give Ghost a try, there is a small hiccup. If you want to use Ghost.org for hosting your blog, the basic plan starts at $5 per month, restricting you to 10,000 page views (which you can easily reach if your post has a good day on Hacker News). If you download the source code, you would need to host it on a separate server, something that requires some expertise.

    But we can overcome those issues. In this post, I will show you an easy way to use Ghost for your blog, yet host it for free.

    What are Static Websites?

    A static site is a set of HTML documents or static web pages, nothing more, nothing less. It means that irrespective of the user requesting the site, the content would remain the same. On the contrary, for a dynamic site, the same URL might show different content to different users (for example, https://twitter.com would show me something entirely different to what it would show you, assuming one of us is logged in).

    A static website is often cheap or free to host as compared to a dynamic website. But, to generate and update a static site, you would need some specific skills. Unless, of course, you have Buster.

    What is Buster?

    Buster is a “brute force static site generator for Ghost”. Buster lets you preview the generated static blog and deploy to GitHub for hosting your site. It’s written in Python and it’s easy to install. You can either download through pip or clone the repository and install.

    The process that we will follow is something like this:

  9. 10 Essential Sublime Text Plugins for Full-Stack Developers

    When I started with web development a few years ago, Vim was my first choice of text editor. It was easy to work with and I could get the basics done without much hassle. Also, many developers like terminal based text editors because they get the same environment in both their local development machines and […]

  10. How I Set Up My Development Machine

    Every developer has a set of tools that make their life easy, without which their development life feels crippled! Over the years, I have developed my own set, which I describe in this post. The primary OS for my development related tasks is Ubuntu, and I would assume that you have one of the latest versions of Ubuntu (12.04+).

    When I started off developing, I only knew basic PHP. Setting up a development machine was as easy as installing PHP5, MySQL and changing the home directory of Apache2.

    But over the years I have changed as a developer and the tools that I use have evolved too- so it’s safe to say that next year, I will probably read this and smile, full of new tips and tricks.

    Except for Google Chrome and Sublime Text, everything else in the list can be installed through the command apt-get. Therefore, I have written a simple bash script which installs them in sequence. Note that a few (like mysql-server) require you to set certain options (like a password for the root user) before the installation can be completed.

    Here’s what I absolutely need in a development machine: