Categories
Uncategorized

13.33

That the ratio you get when you divide 1000 by 75. What that ? that was the ratio of CRPF and Naxalite rebellion.

I just realized that a Naxalite only killed 7.5% of one CRPF personnel.
View 1
View 2

Categories
Learning Programming

Programming Republic of Perl

I've decided to dive into Perl, and I'm starting with Learning Perl by Randal Schwartz and Tom Phoenix. As someone who's mainly worked with more conventional languages, Perl's philosophy and governance model are fascinating.

The Benevolent Dictator

One of the first things you learn about Perl is that it's not governed by committee or corporation—it has Larry Wall, its creator, who serves as the "Benevolent Dictator for Life." The community has even codified this into the "2 Rules":

Categories
Personal

Rubik’s cube

I can solve a Rubik's cube. That too in less than 10 minutes.

Unsolved Rubik's Cube

Tips for Beginners

If you want to learn to solve a Rubik's cube, here's what helped me:

  1. Start with the layer-by-layer method – It's the easiest approach for beginners. Solve the white face first, then the middle layer, then the yellow face.
  2. Learn algorithms one at a time – Don't try to memorize everything at once. Master one algorithm, practice it until it's automatic, then move to the next.
  3. Practice daily – Even 10-15 minutes a day makes a huge difference. Muscle memory is key.
  4. Use online tutorials – YouTube has excellent step-by-step guides. I learned from video tutorials that break down each algorithm clearly.
  5. Don't give up – The first solve might take an hour or more. That's normal! Each solve gets faster as the algorithms become second nature.

It took me about a week of daily practice to get my first solve. From there, it's just about repetition and gradually learning faster methods.

Categories
Humor

I love you xkcd

This doesn't make any logical sense, but I just want to say: I love xkcd. Really loud. I LOVE XKCD!

For those who don't know, xkcd is a webcomic by Randall Munroe that brilliantly captures the intersection of math, science, programming, and life. It's smart, funny, and often hits way too close to home for programmers.

Today I'm sharing one of my favorite comics about pointers:

XKCD - pointers

Pointers (XKCD #138)

Why This Comic Is Perfect

If you've ever tried to explain pointers in C or C++ to someone, you know the pain. Pointers are one of those concepts that seem simple in theory but confuse the hell out of beginners.

The comic shows a recursive definition: "A pointer is a variable that contains the address of another variable." And what does it point to? Another pointer definition. And that one? Another pointer. It's pointers all the way down.

Categories
Technology

GTalk Bookmark button

One of my computers is an old RHEL 5.1 system on which I'm not allowed to install Pidgin or other desktop IM clients. So I was trying to figure out how to create a bookmark button for the GTalk gadget that opens in a convenient popup window. Here is the solution. 🙂

The Problem

Many work environments have restrictions on what software can be installed. If you're on a locked-down system but need to use Google Talk for communication, you're stuck. The web-based Gmail interface has GTalk integrated, but it's not ideal for quick conversations—you have to keep Gmail open, and it's buried in a tab.

Categories
Motorbike Specification Technology

2009 Pulsar 150 specifications

I am a proud owner of a 2009 Bajaj Pulsar 150cc DTSi. When I was researching this bike, I found it surprisingly difficult to find complete specifications online. Most sites had partial information or conflicting data. So after purchasing the bike, I compiled the complete specifications from the official manual and my own measurements.

Why the Pulsar 150?

I chose the Pulsar 150 for several reasons:

Categories
Command Line Development Tools Productivity

Oh My Zsh: Making Your Terminal Beautiful and Productive

Introduction

I've been a bash user for years. It's the default on most Linux systems and Mac OS X, and it works fine. But I kept hearing about Zsh (Z Shell) and how much better it is – better tab completion, better history searching, more customization options.

The problem is that Zsh is intimidating to configure. The configuration file can be hundreds of lines long, and getting it right requires deep knowledge of shell scripting.

Categories
PHP WordPress

WordPress Plugin Development: Getting Started

Introduction

WordPress is powerful out of the box, but its real strength lies in extensibility. Plugins let you add features without touching WordPress core files. This is crucial – when WordPress updates, your customizations remain intact.

There are thousands of plugins available, but sometimes you need something specific. Maybe a custom widget, a specialized shortcode, or integration with your company's API. Learning to build plugins opens up endless possibilities.

Categories
Database MySQL Performance

Optimizing MySQL Query Performance

Introduction

Your web application is slow. Pages take seconds to load. Users are complaining. You check your code – it's fine. You check your server – plenty of resources. The problem? Your database queries.

Database performance is often the bottleneck in web applications. A poorly optimized query can turn a fast application into a sluggish mess. But with the right techniques, you can make your database scream.

Categories
Frameworks PHP Web Development

Introduction to PHP Frameworks: Why and Which One

Introduction

PHP is easy to learn. You can build a working website in an afternoon. But as projects grow, PHP code can become messy fast. Files scattered everywhere, SQL mixed with HTML, no structure, impossible to maintain.

This is where PHP frameworks come in. They provide structure, enforce best practices, and include tools that make development faster and more maintainable.