Recent Updates RSS Toggle Comment Threads | Keyboard Shortcuts

  • Mohammad Jangda 1:17 pm on December 27, 2011 Permalink | Reply  

    Co-Authors Plus v2.6: Search user’s display names, change byline order and more | danielbachhuber.

    Thanks to Daniel, Co-Authors Plus, which I’ve long neglected, finally has an update with some long-overdue bug fixes and some sweet new features.

     
  • Mohammad Jangda 12:48 am on December 5, 2011 Permalink | Reply
    Tags: graphic novels, review, tintin   

    Review: Tintin in America 

    Tintin in America
    Tintin in America by Hergé

    My rating: 3 of 5 stars

    I’ve started reading through the whole Tintin series again (partially in preparation for the movie) and the experience is very similar to re-watching your old childhood TV shows. You get that warm, nostalgic feeling which slowly dissolves into doubt and and leaves you wondering how you could possibly enjoyed something so bad. This particular book has a lot of racist overtones and the dialogue is pretty poorly written (which I guess is really the norm for any comic book written in the early 20th Century).

    Overall, though, the book is still a fun read and I can’t wait to re-read the rest.



    View all my reviews

     
    • Joen 4:31 am on December 5, 2011 Permalink | Reply

      Tintin comics high five, these are my favorites!

      Though to be frank, the first two (or three depending on whether you count Tintin in Soviet) I find to be rather boring and dull. It’s not until Cigars of the Pharaoh (or whatever it’s translated to) that things get into gear.

  • Mohammad Jangda 3:30 pm on November 23, 2011 Permalink | Reply
    Tags: , wpdb, wpdb-prepare   

    On $wpdb->prepare 

    If you do the following, you’re a terrible person:

    $query = "SELECT ID from {$wpdb->posts} WHERE ID = %d";
    $query = $wpdb->prepare( $query, $value );
    

    There is absolutely no reason for prepare to be on a separate line.

    Here’s how you do it the right way:

    $query = $wpdb->prepare( "SELECT ID from {$wpdb->posts} WHERE ID = %d", $value );
    

    One line. Simple, easy to read, and not confusing.

     
    • Mohammad Jangda 3:31 pm on November 23, 2011 Permalink | Reply

      And, yes, the query in the example makes no sense.

    • Lloyd Budd 7:19 pm on November 23, 2011 Permalink | Reply

      You know how they come to that anti-pattern though, right? They want to isolate the query, so that if it was more easily cowboy coded — add and remove print and debug.

      Wonder if prepare() having a debug/echo parameter would be useful, or too abstract… aside, does WP still not have as good of debug infrastructure as bbPress?

      • Mohammad Jangda 10:48 am on November 24, 2011 Permalink | Reply

        The problem is that prepare doesn’t do much other than sprintf the query with the values passed in. Developers can still do something like:

        $query = $wpdb->prepare( "SELECT ID from {$wpdb->posts} WHERE ID = %d", $value );
        error_log( 'Woo! I'm querying IDs! My query: ' . $query );
        $id = $wpdb->get_col( $query );
        

        Which is why this anti-pattern baffles me…

  • Mohammad Jangda 12:01 pm on September 15, 2011 Permalink | Reply
    Tags: id card, Karachi Grammar School, kgs, school   

    Photo: Old School 

    My Student Identity Card from elementary school. Yes, I had terrible hair back then.

     
    • Amy 6:53 pm on September 19, 2011 Permalink | Reply

      How could you even THINK that you had terrible hair?? Your hair most definitely rocked…

    • Rumpy Drummond 12:33 pm on September 23, 2011 Permalink | Reply

      awwwww…. what a sweet little boy. And I agree with Amy- the hair was cool!

  • Mohammad Jangda 10:57 pm on August 22, 2011 Permalink | Reply
    Tags: , canadian politics, jack layton, ndp, politics   

    A letter to Canadians from the Honourable Jack Layton 

    And finally, to all Canadians: Canada is a great country, one of the hopes of the world. We can be a better one – a country of greater equality, justice, and opportunity. We can build a prosperous economy and a society that shares its benefits more fairly. We can look after our seniors. We can offer better futures for our children. We can do our part to save the world’s environment. We can restore our good name in the world. We can do all of these things because we finally have a party system at the national level where there are real choices; where your vote matters; where working for change can actually bring about change. In the months and years to come, New Democrats will put a compelling new alternative to you. My colleagues in our party are an impressive, committed team. Give them a careful hearing; consider the alternatives; and consider that we can be a better, fairer, more equal country by working together. Don’t let them tell you it can’t be done.

    My friends, love is better than anger. Hope is better than fear. Optimism is better than despair. So let us be loving, hopeful and optimistic. And we’ll change the world.

    Even at his weakest, Jack could still inspire us to be our strongest. Sir, you will be missed.

    Read the full letter | See Jack at his best best: happy | Six ways Jack Layton helped build Toronto

     
  • Mohammad Jangda 1:01 pm on August 5, 2011 Permalink | Reply
    Tags: all you can eat, dairy queen,   

    Photo: “All The Ice Cream You Can Eat” 

    All The Ice Cream You Can Eat

    Ice cream?! All you can eat?! 10 cents?! Sign me up!

    (Spotted at Dairy Queen)



    Posted from Toronto, Ontario, Canada.

     
  • Mohammad Jangda 1:21 pm on August 4, 2011 Permalink | Reply
    Tags: distraction-free writing, matrix, terminal,   

    WordPress Distraction-Free Skin: Terminal/Matrix 

    Just Write! Like you're in the Matrix!

    Because all the cool kids want to feel like they’re writing posts in the Matrix. (Inspired by Zen)

    http://wordpress.org/extend/plugins/zen
     * License: GPL v2 Baby!
     */
    add_action( 'admin_print_styles-post.php', 'dfw_terminal_style' );
    add_action( 'admin_print_styles-post-new.php', 'dfw_terminal_style' );
    
    function dfw_terminal_style() {
            ?>
    
    
            
    

    View on Github

     
    • Joen 2:15 pm on August 4, 2011 Permalink | Reply

      This reaches a weird equilibrium between terrible and awesome. Kinda like the movie Time Cop.

      • Mohammad Jangda 2:23 pm on August 4, 2011 Permalink | Reply

        Time Cop was an incredible movie.

        • Joen 2:24 pm on August 4, 2011 Permalink | Reply

          So good! Especially that part where he does the split!

          I think Mia Sara peaked in that film.

  • Mohammad Jangda 12:01 pm on June 29, 2011 Permalink | Reply
    Tags: bbc, sherlock, tv   

    The Case of The Traveling Text Message — Michele Tepper walks through one of the most powerful features of BBC’s Sherlock, which is just one of the many reasons why I love the series. I can’t wait for new episodes this year.

     
  • Mohammad Jangda 12:01 pm on June 20, 2011 Permalink | Reply
    Tags: book auction, , donation, slave lake library   

    A final word and a thank-you | Slave Lake Book Auction 

    Well folks, that’s a wrap for the Slave Lake book auction.

    [...]

    While the auction was an unbelievable amount of hard work, it was also a lot of fun. I LOVED watching the bidding wars going on and all the fun comments between bidders, egging each other on (yes Angie, I’m looking at YOU!). I loved that some of the books were hand delivered to the winners. I loved that authors offered up a SECOND copy to auction losers who wanted to pony up the same amount as the winners. I loved that up until the last post I was still getting donations in.

    So thank you all so, so much for making this auction a roaring success. Because of you Slave Lake Library now has $4,909 to put towards rebuilding their library.

    And that’s just freaking awesome.

    Despite not winning any books, this is still beyond awesome. Great job Colleen!

     
  • Mohammad Jangda 1:01 pm on June 14, 2011 Permalink | Reply
    Tags: kickstarter, plush, swoop the owl   

    Swoop the Owl – Mobile Plush (on Kickstarter) 

    I pledged. Because I’m not afraid to admit that I sleep with my phone beside me. Maybe you should too?

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel