- January, 2005
-
Presentation for developers
Yesterday, I had to give an introduction to the LAMP stack to a group of trainees. My energy was mostly focused on the MySQL and PHP part. I had gone to the workshop with some source code examples and no slides. I am convinced that this is the best way to present talks to a group of developers i.e. using a white board and source code. Though I will not say that the trainees were hanging on to my every word, they asked question and I did not see anyone fall off to sleep
. I introduced them to DBDesigener, phpmyadmin, and Adodb.
It also helped that I used these tools in most of the work I do and knew them quite well. I was able to show them how they will be using them in Real Life.
-
Advanced PHP Programming impressions
Got myself "Advanced PHP Programming" by Schlossnagle. I started reading it last night, (currently on chapter 3 - "Error Handling"). Excellent book, with clear and good examples. The examples are culled from real life. In chapter 2 (Object Oriented Programming through Design Patterns), he explains how Design Patterns can be applied when making websites. It was one of those "aha!" moments. This is a book I have been looking forward to lay my hands on for a long time.
One complaint though (with the Pearsons's Low Price Edition of this book) is the pathetic quality of figures. It looks like the pages have been photocopied from their original color print.
Defined tags for this entry: geek stuff -
Fighting Comment spam
Wordpress has a nifty feature for fighting comment spam. It allows you to blacklist certain words (like Viagra, casinos). Any comment which has those words (either in the URL, comment body or email) is held for moderation.
However, this method is not perfect. For example, the default word list does not contain the words "poker" or "anti-wrinkle cream". I use a combination of Bloglines (my feed reader) and my "Comments RSS" feed. I have subscribed to my "Comments RSS" using Bloglines. This enables me to keep an eye on what comments have been posted on the site.
An aside: Interestingly, I have seen that the spammers target the articles which are older rather than the ones that are fresh. (i.e. my posts of November receive more spam comments as compared to the December ones). I guess, the idea is that once the articles have been moved off from the front page, not many users bother going back to the archives.
Whenever a new comment appears on the blog, I can either respond to it (if it is legitimate comment) or in a quick glance check out what new words the spammers are linking to. Add the new words to the Wordpress's blacklist, rerun the comments through the new blacklist, remove the comments that have been trapped and you are back in business with a spam-comment free blog.Defined tags for this entry: geek stuff - December, 2004
-
sending a geek on a guilt trip
One of the methods used by normal humans to send other (normal humans) on the "guilt trip" is to use the cliche "every time you do THIS or THAT god kills a kitten. Please, think of the kittens..." For an even bigger guilt-trip, you can use "every time you do THIS , somewhere a kitten gets run over by a Monster truck. given not ten minutes ago to the five year old girl standing by the side of the road, spattered, red, and crying as she fumbles with her inhaler" (Thanks to Brian Bilbrey, member of The Answer Gang for the picturesque description )
Frankly, the whole killing of the kitten part leaves me rather unmoved. Having lots of free time on my hand lately, I thought of things that would send me on a guilt trip.
- every time you do THAT, your email id gets harvested by Mr. Joseph Adisa of Lagos, Nigeria
- every time you do THAT, Microsoft issues ten critical updates
- every time you do THAT, some clueless bastard says "Linux has less viruses because it is less popular " (my veins are throbbing just writing this)
- every time you do THAT, some luser says "IE is better than Firefox since IE supports advanced features like ActiveX"
- every time you do THAT, someone starts building a new Linux distro
Defined tags for this entry: geek stuff, humour -
php manual on your hdd
One of the strong points of PHP is its well annotated online manual, which is peppered with useful code snippets and hints. How many times have you pointed your browser to php.net/manual/ to look up that at-the-tip-of-your-mouth function's argument list ? If you or your company use the manual frequently, it might be a good idea to mirror the manual in your internal network. I have mirrored the manual in my office, and the two benefits that I see are
- Faster manual lookup - Living in a bandwidth starved country(India), this is a major win for us.
- A peek at well written code, again a major win if you are always looking for new and nifty way for doing things
The process of how to go about mirroring the manual is surprisingly well documented at Mirroring The PHP Website. As suggested by the documentation, You may want to exclude out certain non essential things ,like the manual in different languages. I also excluded the
tar.gz
and thezip
files in theextra
directory.After downloading the manual pages, I created the virtual host (a simple copy-paste with some minor modifications) for the manual and that was it. To keep the manual uptodate I run the rsync command once a week.
For the record, my rsync command is
rsync -avzC --timeout=600 --delete --delete-after --include='manual/en/' --include='manual/en/**' --exclude='manual/**' --exclude='distributions/manual/**' --exclude='distributions/*.exe' --exclude='extra/*.zip' --exclude='extra/*.tar*' --exclude='distributions/*' rsync.php.net::phpweb ./
Of course, you will need to change this to suit your needs.Defined tags for this entry: programming -
Against signing online petitions
I must write this before I am drowned in "armchair activism".
Armchair Activism refers to efforts to influence socio-political change through the ineffective use of e-mail and Web sites, ignoring safer, more effective means of advocacy. Armchair Activism comes in two basic flavors: the e-petition and the boycott chain. Both are typically poorly designed, misguided and pitifully ineffective.
(Taken from Break the chain)A few days back I received an email asking me to sign an online petition protesting against the move to have reservation for SC/ST in private sector companies. Of course, I did not sign the petition. Anyone can create a online petition and any one can sign it. If you really want to support a cause, then break into your piggy bank. Put your money where your mouth is. Seriously, if you care about something, is creating a petition on PetitionOnline.com the best you can do ? If you want to see some change in the way the system works, you have to exert yourself. We live in a real world, where decisions are not changed because some minister receives an email with hundreds of signatures (none of which can be verified). Emails can be deleted and forgotten about. However, it is hard to delete the articles in the newspapers, it is harder to ignore the criticisms on the TV and it is even harder to ignore people protesting on the streets or sitting on a hunger strike or a Public Interest Litigation filed against a government decision.
Defined tags for this entry: India, My take on life -
copy paste job
Yesterday while chatting on IRC, one of the participants pointed to the Reliance's "Acceptable user Policy (AUP)" (sic!). You can find a copy here. Interestingly, the Reliance's AUP is a copy and paste job of UKFast's AUP. Of course, not the whole thing is a ditto copy, let it be known that Reliance is not an amateur. It has added one line in the end listing the ports it has blocked and replaced all instances of UKFast with Reliance.
This reminds me of an argument I had with one of my friends a few months back. We were going through some flyers that one of our clients had sent us (we were to create some web content based on the flyers). I pointed out a few grammatical errors in the flyer but my friend said ,"The people who made these are professionals, getting paid more than you to write these. Don't you think you are the one who is wrong ? " (of course, this is slightly paraphrased). This just goes to prove my point, "Incompetence and laziness is not a forte of only small companies".
Defined tags for this entry: My take on life
Page 54 of 60, totaling 418 entries