Is Kohana moving faster than Codeigniter ?

Traffic Codeigniter VS KohanaPHP

Look at the Alexa graph above. What do u think ?  

I’ve been using Codeigniter in Mid and Fairly Big project for over a year and a half. Kohana was released before i started but the amount of online support and tutorials and an active company development (EllisLab) made me decide using CodeIgniter. But I keep checking updates on Kohana because it has lot of extra features over CI. It’s Strictly PHP5 OOP and has libraries like ORM which doesn’t exist CI’s distribution. Just out of curiosity, i went to Alexa and compared the traffic for CI and KohanaPHP and it really surprised me. Kohana is way ahead in terms of traffic. What does that mean? People are more involved with Kohana than CI ? Well, apparently YES. Kohana is community driven development. In CI, user contributes as addons to the Framework, which is ok. But when there’s an active driving force by the community, it’s better, at least i think. 

Moreover I read some articles how to easily use Zend in Kohana in the beyondcoding.com. So that makes me think of leaning towards Kohana for my next projects. There are of course ways to use CI with Zend though but the integration method of Kohana with Zend looked neat. It won’t get much tough to switch to Kohana because it was originally based on CI. And default design pattern in Kohana is Factory (as it appears) while CI is singleton. Of course I’ll need to analyze some more benchmarks for scalability and other features before shifting focus. 

Screen saver like Javascript

 This is one of my old creations of my early programming life, probably in 2000. It’s basically some rotation geometry. When you run it (changing the name parameters), the name will behave like rotating in 3D across the screens and bouncing from corners to corners. It was made for IE only that time. I’ve ported it with jQuery a bit so that it runs on current browser. 

screen_saver

 

See it in action here  and download the source here

PhpMinAdmin – nearest alternative to phpMyAdmin

I can’t possibly tell how many times i’ve been seriously irritated  navigating to phpmyadmin option of my hosting or hostings of the projects i have worked with. Most of the cases you’ll have to click many times. And in Plesk ? It simply sucks when it comes to use phpMyAdmin from there. I’ve always used phpminiadmin as a quick alternative solution because it needs no configuration and no install. But it’s very basic and needs too much typing to get things done. Today I found phpminadmin. It’s just the name without the i in php phpminiadmin. It simply rocks!! It has nearly every option that you’d normally expect from a db admin tool. And to me, it’s a substitute to phpmyadmin for ongoing operations.

phpminadmin screenshot

It has select, search, edit, index , create — almost everything u need. The best part is that it needs no install and it’s a single file weighing about 167KB.

But of course, i’m not saying it’s a fully alternative to phpmyadmin. No way. They have been developing this mighty tool for over nine years.  But phpminadmin surely is a very very good altenative of that for quick solutions. Check it out here.

http://phpminadmin.sourceforge.net/

Why didn’t I find it earlier ?  :-(

UPDATE : THE PROJECT HAS BEEN RENAMED TO “adminer” AND IS AVAILABLE at http://www.adminer.org/en/

jQuery removes backward compatibility in selector

[@attr] removed from jQuery

There were lot of scripts where I used jQuery selector with using [@attr]. Like if you want to select an input with a name="input_test" , you’d probably write  

$("input[@name=input_test]") to select that input. But it’s removed from releases of 1.3 and later. Now you have to write $("input[name=input_test]") and I have got no problem with removing the @ sign. It should have not been introduced at the first place. Now that there are lot of plugins are written using that and lot of custom scripts on site have used it, jQuery team should have kept a backward compatibility for the @ thing. I upgraded jQuery to latest version 1.3.2 and lately discovered that some features are simply not working. In firebug i was getting uncaught exception.  It took me a little while to understand why they were not working at all. Later i found at http://docs.jquery.com/Selectors writing 

Note: In jQuery 1.3 [@attr] style selectors were removed (they were previously deprecated in jQuery 1.2). Simply remove the ‘@’ symbol from your selectors in order to make them work again.

Then I had to find and replace all the instances where i used the [@attr] thing in the whole site. I could not appreciate this move of jQuery Team. 

Celebrating PIE day

3.141592653589793238462643383279502884197169399375105820974944592307
81640628620899862803482534211706798214808651328230664709384460955058
22317253594081284811174502841027019385211055596446229489549303819644
288109756659334461 2847564823378678316527120190914564856692346034861...

Day before yesterday, i read in the newspaper that 14th March is the PIE day. That sounded interesting. Why ? cuz i had some sort of fascination about the value of PIE. i used to memorize upto 22 numbers which is 3.14159265358979323846 and i used to create kind of geek situation when i needed asking people how many numbers they could tell for pie. Typically teachers at school used to tell the number as 22/7 which breaks the value at the 3rd decimal point. Mizan Bhai at omeca coaching told that if you use 355/113 you get more accurate value which shows correct value up to 5th decimal point. So it was fun using the value of pie. Moreover there were times when i used to do JS apps with geometrical calculations.

So all these made me think that i should be a part me this celebration.

What did i do in this day? Nothing much, added 10 more numbers to my existing pie portfolio.

And i should ask the same question as the site. How many numbers did you memorize last year?

What if there were no firebug ?

firebug

Sometimes this comes to my mind that what if there were no firebug ? What would it mean to debug the DOM and Javascript, AJAX – everything ? The answer comes like a dark age. Seriously, we got so much used to Firebug that i can’t even think of making apps that involves DOM manipulation, AJAX. If you’re reading this blog, i’m sure you know what’s firebug and what it does. Wait let me just list’em down what would life mean without firebug.

  • I’d probably give up developing JS intensive pages
  • Would have stopped to enjoy playing with DOM and CSS 
  • I’d be a guy with less AJAX knowledge than what i’m now
  • My hundreds of Man Hours would have been wasted trying to run after stupid errors.
  • I would scold and curse Microsoft for IE every other day
  • May be some other browser would have been my default browser
  • Or may be i’d be truly dependent on DOM inspector and web developer toolbar of FF although they are not as good as firebug.

What else? Let me know what’s in your list.

And if you haven’t used firebug yet, to my language, you have committed a SIN. Let’s not bear the sin anymore GETFIREBUG

9 cool css headers i frequently use

CSS, CSS and CSS, that’s what you should know well to even judge some designs. I’m basically a programmer but I think i can do some kick ass designs too. From the very beginning of web development, i learned both Web programming and designing. There used be a tool called "Top Style Lite". It’s still there btw. I used to use that to do tests with CSS properties of HTML elements. It’s long ago may be around 2000-2001. But in recent years, especially from 2006, we see a boom in web trends. The Web 2.0 thing where css is extensively used to make appealing pages. It doesn’t get better on your concept if you don’t keep browsing better styled sites. From last year, smashingmagazine.com has been a really cool site to bring up the state of the art collection of tools for web developers. Things are pretty available these days. Wish it was there 5-6 years back!!

Anyways, using a good header will completely change the looks of your page especially some pages like your blog. And choosing cool headers is always a dilemma, at least to me. So i keep playing the css properties and look how they can be improved. Of course i get inspired from many sites. But i have my own style gallery of headers which i normally use. Take a look at this.

fav_headers

This is one of the gallery of headers i most commonly use in web apps. Although i’m not in charge of designs in the company i work, i try to influence when i see it can look better. These headers use most common fonts which are generally available in operating systems. You can take the file  if you like. Hope it helps some people :) 

I’ll write a post about my favorite picks on content text styles later. 

So, some people stole my script and i didn’t know !!

Thought I’d share some more snippets of javascript I wrote back in 2000-2001. It was fun playing with hex colors and at some point of time i could tell closer hex color code of thing I see around. Sounds geeky? No. I just enjoyed to do that. When I’m writing this, out of curiosity i googled for "inverse color generator". And I got bunch of results. 

Number 1 is

http://www.angelfire.com/ny5/consigliere/inversegenerator.html/

Number 3 is

http://janim.net/free-online-tools/inverse-color/inverse-color-generator.php

And this is the one I think i submitted to a site

http://webdeveloper.earthweb.com/webjs/jsbg/item.php/67221

And surprise!! this is the original one i wrote in 2001. See, they copied my script and didn’t even notify me :(

Inverse Color Generator

 

VIEW HERE

Hmm, gotta look for more on the WWW.

 

My Old day’s JavaScript

It’s been more than 10 years I’ve been playing with Javascript. There were times when we had to fight hard for netscape and IE’s weird behavior on DOM. But still i enjoyed those days. Making hobby projects truly for my own was a different level of fun. No commercial thoughts behind efforts. I’d call those days "my innocent javascript days". So I had made a handful of utility scripts out of my own interest. In those days, it was easier to play with IE’s DOM than Netscape’s DOM. IE 4 was better than Netscape 3/4. One of the script I wrote in year 2000 (my second year of undergrad) is to find your birthday calendar for a specified period of time.

Birthday Calendar

Like if you were born on 24th July 1980, it was a Thursday. So using this script

Make yourself comfortable with Circle Dock

How many times have you been irritated finding your most frequently used tools in quick launch, programs menu ? I guess lot of times. Clicking the mouse 3-4 times or more to execute your favorite programs is just awful. There are lot of programs coming to rescue to minimize clicks like using dockbars. But I’m more of a keyboard user and less mouse clickers. After using so many dock programs , my most favorite pick is the circle dock. You can add as many programs and folders as you want and they come like this

Circle Dock

Looks awsome, right?