Category: general

  • 18 Years Later: From Harry to Dumbledore

    I recently finished the Harry Potter series for the second time. The nudge came from Saurav Dwivedi, who mentioned on a show that he was rereading the series. Something about that made me pick it up again.

    The books were just as hard to put down. Every plot twist, every death, I knew it all. And yet I couldn’t stop turning pages. But the truly strange thing wasn’t that I enjoyed the story again. It was that I read an entirely different story.

    Eighteen years ago, I saw the world through Harry’s eyes. I questioned Dumbledore and resented his “stupid” authority. This time, I read from Dumbledore’s point of view. I found myself wondering: How do you solve a problem like Harry? How do you lead someone who takes the exact risks you warned them against?

    My hero has changed.

    This shift triggered a question that I kept thinking about while reading: How do you influence outcomes that aren’t directly in your control? Perhaps this perspective is the natural byproduct of age and responsibility.

    Have you reread a book that hit differently the second time? I’d love to hear what changed in the book, or in you?

    P.S. Image was generated using Nano Banana

  • The 3 Podcasts I Was Absolutely Hooked On in 2025

    After 10,000+ minutes of listening, these three podcasts dominated my 2025

    1. Teen Taal: The ultimate Hindi comedy podcast. Hosted by Tau, Sardar, and Khan Cha, it’s pure “therapeutic bullshit.”  Imagine the funniest, most nonsensical conversation with your friends.

    I was skeptical at first, but one episode in late 2024 made me a devotee. I didn’t miss a single one. It was my ultimate driving podcast for most of the year and is, hands down, the best Hindi podcast I’ve ever heard.

    2. Acquired: A business storytelling masterpiece. Hosts Ben Gilbert and David Rosenthal deliver incredibly researched deep-dives into companies. The way they research and tell the stories of iconic companies is next-level. My daily commute soundtrack since September.

    3. Future IQ: Hosted by Navin and Shrikant. I finally started listening seriously in December, and it immediately became my essential morning podcast for sharp, forward-thinking insights.

    My New Rhythm: Morning chai with Future IQ, commutes with Acquired, Saturdays with Teen Taal. This powerful trio even dethroned The Tim Ferriss Show as my all-time favorites.

    Do you have any recommendations for me in 2026?

     

  • From Inspiration to Action: Highlights of DPG Tech Fusion Event

    Amit Singh at DPG Tech Fusion Event

    Last week, I was privileged to participate as a speaker and panellist in the DPG Tech Fusion event. Organized by the Sunbird community and Tekdi Technologies, the event brought together a diverse range of professionals passionate about Digital Public Goods (DPGs).

    One of my highlights was Dr. Pramod Varma’s talk on “India’s DPI Journey.” While the technical aspects of DPIs (Digital Public Infrastructure) were familiar, Dr. Varma’s historical perspective shed light on their evolution. Learning how these seemingly disparate pieces came together to form the foundation we see today was fascinating.

     

    Dr Pramod Verma talking about how India combines public rails and private innovation.

    Following this, a fireside chat between Dr. Varma and Parth Lawate emphasized the importance of reading and writing technical papers. This resonated deeply with me, highlighting the crucial role of  research and clear communication in driving innovation.

    Another notable discussion was the panel on “How, What, Why of Building DPGs.” Atul Tulshibagwale and SasiKumar Ganesan, drawing from real-world experiences, shared invaluable insights into the process of finalizing specifications and addressing challenges in DPI implementation.

    panellist for the "How, What, Why of building DPGs" session

    Later, I had the opportunity to pitch WordPress as a potential platform for building DPGs in education. Interacting with enthusiastic hackathon participants was a rewarding experience.

    Amit Singh is talking about using WordPress as a DPG

    Day two began with Vedant Kulkarni’s inspiring journey into open-source contribution, specifically for Sunbird. His story showed the importance of taking action, just like Dr. Verma discussed the day before.

    Vedant Kulkarni talking about his first PR to an open source project

    This was followed by Dr. Anand Deshpande’s presentation on nano-entrepreneurs’ role in creating jobs and the deAsara Foundation’s efforts to empower them. His concluding call to action, urging participants to identify and solve problems faced by these entrepreneurs, resonated deeply, and Parth announced that in the next edition of the event, they will pick hackathon ideas from problems identified by the deAsra Foundation.

    Dr. Anand Deshpande talking about initiatives by deAsra foundation

    My highlight of day two was participating in a panel on DPG fusion. We explored ways for various open-source communities to collaborate and drive the advancement of DPI and DPG initiatives across India.

    Panellist for the discussion on "collaborate for collective action"

    Beyond the informative sessions, the event provided a platform for networking. I enjoyed reconnecting with old friends and building new connections within the DPG ecosystem.

  • How I started With PHP

    Khayrattee( @7php) of 7php.com recently published an interview with me, do read and let know your feedback.

  • Why PHP is So Popular on Web?

    If you ever wondered why the hell PHP is so popular on the web when there are better and powerful languages available?

    Well, the answer is very simple, It is only language that allows even musicians to build sites for themselves.

    By the way that is also the reason why WordPress has become the king of CMS and my choice for starting a WordPress development team – WPoets.

  • The Pune effect on Indian Tech Events

     

    Do you know about ‘The Pune Effect’ which influences all the Tech events in India, if not go read.

    And if you are an event organiser then consider Pune as venue for your next event.

  • Get An Introduction To Functional Programming At TechWeekend 5

    5th edition of the TechWeekend is going to be about Functional Programming and if are hearing this term for first time, or if you are like me who has heard about it, but never got time to look into the details then you should definitely attend it.techweekend

    Event is on 18th Dec 2010, ie this Saturday from 10 AM – 1 PM, at  505, A-Wing, Ground Floor MCCIA Trade Tower( ICC ) on SB Road.

    Here is the quick agenda,

    1. Why you should care about functional programming – by Dhananjay Nene. His id on twitter is @dnene and he currently writes code for and advises Vayana Enterprises in his role as its Chief Architect.
    2. An Introduction to Erlang – by Bhasker Kode. On twitter he is @bosky101 and he is the CEO and Co-Founder of Pune-based Hover Technologies.
    3. Clojure & its solution to the Expression Problem – By Baishampayan Ghose. On Twitter he is @ghoseb, and he is the co-founder & CTO of http://Paisa.com

    Ohh.. and before I forget you need to register( don’t worry it is free) for the event.

    See you guys on Saturday.

  • Testing Extjs Application With Selenium : Few Pointers

    On a project that I am working on we needed to create few automated tests using selenium. Our frontend is completely written in Extjs.

    Being new to testing using selenium, I searched the web and here are few useful advices that I found.

    The most comprehensive one was by Ates Goral on stackoverflow.

    The biggest hurdle in testing ExtJS with Selenium is that ExtJS doesn’t render standard HTML elements and the Selenium IDE will naively (and rightfully) generate commands targeted at elements that just act as decor — superfluous elements that help ExtJS with the whole desktop-look-and-feel. Here are a few tips and tricks that I’ve gathered while writing automated Selenium test against an ExtJS app.

    General Tips

    Locating Elements

    When generating Selenium test cases by recording user actions with Selenium IDE on Firefox, Selenium will base the recorded actions on the ids of the HTML elements. However, for most clickable elements, ExtJS uses generated ids like “ext-gen-345” which are likely to change on a subsequent visit to the same page, even if no code changes have been made. After recording user actions for a test, there needs to be a manual effort to go through all such actions that depend on generated ids and to replace them. There are two types of replacements that can be made:

    Replacing an Id Locator with a CSS or XPath Locator

    CSS locators begin with “css=” and XPath locators begin with “//” (the “xpath=” prefix is optional). CSS locators are less verbose and are easier to read and should be preferred over XPath locators. However, there can be cases where XPath locators need to be used because a CSS locator simply can’t cut it.

    Executing JavaScript

    Some elements require more than simple mouse/keyboard interactions due to the complex rendering carried out by ExtJS. For example, a Ext.form.CombBox is not really a <select> element but a text input with a detached drop-down list that’s somewhere at the bottom of the document tree. In order to properly simulate a ComboBox selection, it’s possible to first simulate a click on the drop-down arrow and then to click on the list that appears. However, locating these elements through CSS or XPath locators can be cumbersome. An alternative is to locate the ComoBox component itself and call methods on it to simulate the selection:

    var combo = Ext.getCmp('genderComboBox'); // returns the ComboBox components
    combo.setValue('female'); // set the value
    combo.fireEvent('select'); // because setValue() doesn't trigger the event
    

    In Selenium the runScript command can be used to perform the above operation in a more concise form:

    with (Ext.getCmp('genderComboBox')) { setValue('female'); fireEvent('select'); }
    

    Coping with AJAX and Slow Rendering

    Selenium has “*AndWait” flavors for all commands for waiting for page loads when a user action results in page transitions or reloads. However, since AJAX fetches don’t involve actual page loads, these commands can’t be used for synchronization. The solution is to make use of visual clues like the presence/absence of an AJAX progress indicator or the appearance of rows in a grid, additional components, links etc. For example:

    Command: waitForElementNotPresent
    Target: css=div:contains('Loading...')
    

    Sometimes an element will appear only after a certain amount of time, depending on how fast ExtJS renders components after a user action results in a view change. Instead of using arbitary delays with the pause command, the ideal method is to wait until the element of interest comes within our grasp. For example, to click on an item after waiting for it to appear:

    Command: waitForElementPresent
    Target: css=span:contains('Do the funky thing')
    Command: click
    Target: css=span:contains('Do the funky thing')
    

    Relying on arbitrary pauses is not a good idea since timing differences that result from running the tests in different browsers or on different machines will make the test cases flaky.

    Non-clickable Items

    Some elements can’t be triggered by the click command. It’s because the event listener is actually on the container, watching for mouse events on its child elements, that eventually bubble up to the parent. The tab control is one example. To click on the a tab, you have to simulate a mouseDown event at the tab label:

    Command: mouseDownAt
    Target: css=.x-tab-strip-text:contains('Options')
    Value: 0,0
    

    Field Validation

    Form fields (Ext.form.* components) that have associated regular expressions or vtypes for validation will trigger validation with a certain delay (see the validationDelay property which is set to 250ms by default), after the user enters text or immediately when the field loses focus — or blurs (see thevalidateOnDelay property). In order to trigger field validation after issuing the type Selenium command to enter some text inside a field, you have to do either of the following:

    • Triggering Delayed Validation ExtJS fires off the validation delay timer when the field receives keyup events. To trigger this timer, simply issue a dummy keyup event (it doesn’t matter which key you use as ExtJS ignores it), followed by a short pause that is longer than the validationDelay:
      Command: keyUp
      Target: someTextArea
      Value: x
      Command: pause
      Target: 500
      
    • Triggering Immediate Validation You can inject a blur event into the field to trigger immediate validation:
      Command: runScript
      Target: someComponent.nameTextField.fireEvent("blur")
      

    Checking for Validation Results

    Following validation, you can check for the presence or absence of an error field:

    Command: verifyElementNotPresent   
    Target: //*[@id="nameTextField"]/../*[@class="x-form-invalid-msg" and not(contains(@style, "display: none"))]
    
    Command: verifyElementPresent   
    Target: //*[@id="nameTextField"]/../*[@class="x-form-invalid-msg" and not(contains(@style, "display: none"))]
    

    Note that the “display: none” check is necessary because once an error field is shown and then it needs to be hidden, ExtJS will simply hide error field instead of entirely removing it from the DOM tree.

    Check out PHPCamp a place to share news, views and articles that are useful to PHP community.

    Element-specific Tips

    Clicking an Ext.form.Button

    • Option 1
    • Command: click Target: css=button:contains('Save')
      Selects the button by its caption
    • Option 2
    • Command: click Target: css=#save-options button 
       Selects the button by its id

    Selecting a Value from an Ext.form.ComboBox

    Command: runScript
    Target: with (Ext.getCmp('genderComboBox')) { setValue('female'); fireEvent('select'); }
    

    First sets the value and then explicitly fires the select event in case there are observers.

    Second useful tip was about how to continue to run the test when some test fails, it was by Patrick Lightbody

    try {
        selenium.waitForPageToLoad(timeout);
    } catch (e) {
        // this will happen after 90 seconds
        // todo: recover and send the browser to the the next URL

    Another useful tip that I found was by radu that solved the issues caused by auto-generated id by ExtJS.

    Selenium tests for ExtJS should rely on CSS selectors.

    //table[contains(@class,'seleniumOkButton')]

    Finally the most important and useful is the documentation of Testing_Selenium which lists all the supported functions of selenium RC.

    One more thing version 0.4.4 of Testing_Selenium pear pacakge has a missing function getNumber check this bug report to get that function.

  • CodeIgniter 2.0 Is Baking

    Just when I was loosing all hopes about CodeIgniter, yesterday EllisLab announced about their move to assembla and mercurial, in that there was a small but significant news about CodeIgniter 2.0.

    A quick look into the change log revealed

    PHP 4 support is deprecated.  Features new to 2.0.0 may not be support PHP 4, and all legacy features will no longer support PHP 4 as of 2.1.0.

    This is what I was waiting for. What it means, as pointed by Phil Sturgeon and Elliot Haughin, is that CI 2.0 will not run on PHP 4, but more importantly, it can now take full advantages of PHP 5.

    One other thing that I liked is

    Added ability to set "Package" paths - specific paths where the Loader and Config classes should try to look first for a requested file.  This allows distribution of sub-applications with their own libraries, models, config files, etc. in a single "package" directory.  

    Which means that now we can create common area where we can keep helpers, views and libraries that needs to be shared between two applications.

    While there are many more updates these two got me excited.

    For now let’s wait for them to release, meanwhile you can sign up for Bitbucket and follow the updates for CodeIgniter Project.

  • One Year Of Writing

    On 25th February this blog turned 1 year old.

    I am happy to say that in my 3rd attempt to be a blogger I have finally succeded.

    Thank you every one for commenting and reading which kept my interest alive.