Although it has been nearly three months since the last two articles in my Django series, I am pleased to present part three. We continue to develop Track Me, a simple web application that allows users to post short status updates about what they're doing. Forms Anyone who has worked with server-side scripting languages knows just how tedious and error-prone ...
In my last article, I went over the process of getting Django set up and outlined a sample application that would allow users to post short status updates and view updates from others. The article briefly mentioned views but I ran out of space to actually describe them. Thus, we will begin this article by creating some views. But First... ...
I have been asked a number of times what web framework I prefer, so to provide a canonical answer, I have decided to write this article. That way, whenever someone asks me that question, I can point them here. This is going to be the first of (likely) several articles and will begin with a basic introduction to the topics ...
If you’ve had to work with Bootstrap, or have had to tweak some CSS in some other person’s code (or maybe yours) and have a tough time finding out the exact selector to apply the new CSS to, welcome :) Although you can use your web browser’s in-built development tools, I prefer using Firebug and will be using that in ...
If you’re like me, you have a bunch of symbolic links in your webroot (/var/www) and it’s getting tough to keep a track of all the things hosted on your local machine – locations, link names, etc. I am merely documenting(and explaining) how I found a solution to this problem. Code – /var/www/index.php: <?php $dir_open = opendir('.'); while(false !== ($filename ...
The ternary operator is used to write a very short version of an if-else block (in one line) and is used in a number of programming languages. The format of using a ternary operator is (condtion) ? truth statement : false statement Let’s see a simple example in PHP to check if the number stored in the variable is 1 ...
Sometimes we need to write up long strings in PHP and things might get confusing the next time we read through it or someone else takes a look at the code. That’s when heredoc comes to the rescue. The way to use heredoc is as follows $var_name = <<<HEREDOC_NAME /* String assignment values go here */ HEREDOC_NAME; <<<HEREDOC_NAME marks the ...
In my previous article, I went into quite a bit of detail on the basics of JavaScript. Since I was only able to cover a small subset of JavaScript syntax in the first part, I will pick up right where I left off and we will begin by taking a look at functions. Functions Functions consist of a series of ...
You are probably asking the question "Why is an article about JavaScript being published here?" Good question. The answer lies in some future articles I have planned for later that include Chrome / Chromium extension development - and you can't write a Chrome extension without a firm grasp on the basics of JavaScript. So without further explanation, here is an ...
Yesterday, I wrote an article on how to write a manpage. After hearing a lot of positive feedback on that article, I decided to tackle something else that can be a challenge for those just getting started with software development: writing a makefile. As was the case with writing a manpage, I decided to learn how to write a makefile ...