Code

Writings about web development especially PHP and JavaScript.

  • 5 Tips to Being a Better WordPress Developer

    It happens to every freelancer to be in need of outsourcing some work once in a while. It has happened to me too. I hired this good fellow from India a year back to do a couple of projects while I was doing other work. But being a quality freak, I soon found out that…

  • Infinite next and previous post looping in WordPress

    It has happened to me several times in my career as a WordPress freelancer to be in need of a infinite next and previous post looping in WordPress. And I have a solution for that.

  • Access an object as an array in PHP

    Have you ever been in that position when you are working with an PHP object and you need only one single peace of the data it contains and you want to skip all that iteration part and access that data directly. I have.

  • Without a Plugin: Display Recent Comments

    This post was originally published on April 9, 2009 and is now being being republished as it has been entirely revised. The original method is removed and now replaced by a new one. WordPress ships with a Recent Comments widget, which is very handy, but on the other hand does not give you much freedom in…

  • Your job is to put yourself out of work

    To get to the post of today, I came across a very interesting article on blogoverflow.com, the programmers community blog of StackExchange, titled 20 controversial programming opinions. One opinion really resonated with the way I feel and I was also surprised to know this makes you more valuable to your employer. So, I am sharing…

  • Easy PHP II: Variables

    In the previous introductory PHP tutorial we talked about what PHP looks like and in what kind of environment it runs. To sum up, we said that we write PHP code between tags that look like this: “<?php … ?>” and we end every command line must and in semicolon (;). We use “echo” or…

  • How to Limit Content in WordPress

    This is an old article describing old-fashioned ways of limiting content. I’m publishing a new article on this topic very soon so make sure you subscribe below. Have you seen those cool magazine style WordPress themes around this days? They are just cool. You might have noticed that they sometimes show a few words of…

  • Easy PHP I: Introduction

    I’ve been involved with PHP since I got into the web design and development world. This is because since in my beginnings I chose to use WordPress as a CMS to build websites with and since that day I have been needing PHP to build WordPress themes (and plug-ins lately). I have learned a lot…

  • Terminal Tip #1 – Aliases

    This is my first Ubuntut, and for it I’d like to start off with a productivity tip. We’re going to create a bunch of aliases (shortcuts) for commands we use often. The first step is to open up your user’s .bashrc file, conveniently located in your home directory with all the other configuration files. The…

  • Practical Python Programming

    Welcome to my Practical Python Programming post, hopefully this will be the first of many. If you have been following my ‘An Introduction to Python Programming’ posts series, then you may already know that in this post we are going to be having some fun. We are going to be creating a text based ‘Guess…