Google+ Screens

Lately, Google released Google+ Project. Sadly, I wasn’t allowed to access Google+ Why? Cause, I am banned from Google Labs.. Reason? My account is marked malicious!

Today, @karansinghmagic sent me an invite :) and I got in! At first glance it felt much better than Facebook, at least visually!

Now for all who want a sneek peak of what Google+ Project looks like, I present following screens. So Enjoy!

Validating URLs

How many times have you struggled with URL validations? I have struggled a lot. Damn, those stupid regex(s). Well regex as a tech is not stupid, it’s awesome. but when u have a 10,000 regex expressions to choose from? and on the top of that every regex gives different result.

When I faced this challenge, I tested more than 80+ regex expressions, obviously not in a day :P. Then had to settle with a regex which had a least probability of producing -ve results.

Obviously as a programmer, I wanted better alternative. And I stumbled upon PHP filters. Well, it can be used for other things than validation as well such as sanitization, etc.

Why I would like to use filter_var instead of my or anybody else’s regex. Simply because, regex used in filter_Var are well tested and produce far less -ves. Moreover, being a native function, it produces results faster.

As far as my Codeigniter Application is concerned, I have extended the Validation library:

And I am all set *grins*.

Mating Processingjs and JQuery

In my latest weekend project, I wanted to integrate jquery with processingjs. The way processingjs is developed, it’s requires a little trick to fire up processingjs at will. Though after much struggling I came up with following.


$(document).ready(function() {

dom_el = $("#canvas").get(0);

code = ''; /* fetch source string using ajax or hard code it */

stage.set_stage(function() {
stage_instance = new Processing(dom_el, code);
});
}

Code is pretty much self explanatory. The real essence is the Processing() constructor. It takes two arguments viz: Canvas DOM element and the source code string.

You can always fetch source code from a file using $.ajax(). I am using $.get();

Looking Back

So, Yesterday I was trying to clean up the F: on my computer’s primary hdd. I was hunting for files which i didn’t even open for more than 5 years. I was about to press shift + del then just stopped. I thought, let me see the files before deleting them. Later, I thanked my instincts for not letting me pressing the keys.

I remembered how I used to sit for hours with a piece of C++ source code and try to figure out how to solve this freaking problem. I was quite surprised seeing the C++ code. I was in ninth grade and was doing system’s programming. I also found out a portable BOCHS installation configured to run as i386.

I also found out a 16 bit MS executable. I fired it up, ended up with a subsystem error! no worries though, I have MS 98 on VirtualBox. I fired it up again. found out that I was actually trying to clone Duck Hunt :D. There were couple of more MS executables.. hangman.exe, mosquito_repeller.exe, key_logger.exe etc.

I did upload some of the code on planet-source-code.com. well, those were days too.

As far as cleaning is concerned, I have moved all my data to Dump Folder.

Semantic Experiment

With social media growing like hell, There’s a wealth of information available over Internet. Be it a company, or a brand or even me for that matter, everybody is talking about everyone.

Put simply,

If you exist in the ‘real’ world, I am talking about you!

Well, this post is not about Social Media or it’s impact or whatever. I am a programmer for god’s sake! It’s about what you can do about this information and how to analyze it and an approach I would be using. Seems Interesting, eh? Yeah it is, but you see, now arises a problem!

The Problem

It’s information out there not just data, you Moron! 😀 If you want to get some knowledge, you have to work on information. Remember classic (data -> information -> knowledge) rule! It applies here.

Short answer: Take advantage of others and use their system to do the tough part on your behalf. There are a lots of systems that are available online for use. For eg. you can use OpenCalais to semantically analyse information to get knowledge. And/or you can use systems like Social Mention to get the popularity index for a ‘Information’.

Solution

I am currently working on a system which does this kind of processing and the system is working perfectly so far. I can’t give out techs or specs about it. Yeah, I could land up behind bars for doing that! 😛

I am still working on it and discovering a lot of things everyday. I’ll post hows and whats of it when I am done building it.

Codeigniter 2.0

So finally Codeigniter 2.0 is here. With 2.0 a lot has changed. Primarily, Ellislab split up CI into two branches, Reactor and Core.

As they say,

CodeIgniter Core
Core is a slow-moving branch that will be used as the base for EllisLab commercial products such as ExpressionEngine and MojoMotor. It will continue at a similar pace that CodeIgniter has in the past and will be useful for large commercial applications that require the upmost in stability and backward/forward compatibility at a pace more typical of SLA backed Enterprise products. Core is publicly available with tagged downloads at BitBucket.

CodeIgniter Reactor
Reactor is a community driven branch of CodeIgniter that will enable faster adoption of the best community submitted code to the framework. This means the community can create a fork of the project on BitBucket and contribute bug fixes, new features, documentation improvements, etc and have it reviewed by a code-review team called Reactor Engineers. These Engineers are primarily responsible for driving the development of the framework.

In simple words, Reactor will be managed by community + Ellislab and Core will be managed solely by Ellislab.

Some interesting things I liked,

  • Support for PHP 4.x is gone
  • Application Folder now sits outside System folder
  • CLI support (I am still trying to figure it out)
  • Full Query String support
  • memcache and APC support

Also, Ellislab has changed the file structure a lot. Check out change log to know more.

In all, new version seems interesting. Though moving 1.7.x apps to 2.x is not easy. Since, Plugins have been deprecated, you will need to convert plugins either into libraries or helpers. Also, some of the libraries may not work with 2.x.

The only thing that is making me doubtful is why CI has been split up into 2 branches? Is Ellislab trying to make money by creating an Enterprise version? I hope they don’t.

Encounter with Deities

Recently I had to visit a temple courtesy my mother. I am an atheist so temples, deities don’t excite me and I can’t understand their purpose.

Anyways, I was asked (forced to be precise) by my mother to go and get some sort of ribbon tied around my neck. So I went. It was quiet an experience. I had to get up early in the morning (6 AM). I obviously couldn’t get up on time. I woke up at 7:30 AM. though I managed to get ready on time. I was more excited because if the fact that I’ll be riding my bike on a chilly winter morning.

Quickly, I realized  that there was no fuel in the tank. Damn.. I had to rush to nearby gas station. Soon, I was blazing through morning traffic at 117+ kmph. My brother was with me too. He caught cold :)

Anyways, we reached. Went to the priest, asked him to do his stuff. but to my surprise, he asked us for 2.5 kgs of grains with Rs. 51 as daskhina. Which I naturally didn’t know. So I asked him what can be done now? He Replied, “Alright, then give Rs. 250 and Rs 51 as Dakshina”. Only words that came out of my mouth were “What the Fuck?”. He couldn’t understand. I was pissed. So I decided to get grains from somewhere. And to my luck, I was able to find out one Ration shop. I bought some rice for Rs. 50.

Total Money got out my pocket, Rs. 101. And the string that he gave is still hanging around my neck. The only thing I liked about it is that it’s black in color :) and my mom is happy.

Though I am still thinking, If he’s a priest then why did he ask me for money? I mean, I can do it to. All it takes is one black string and two hands – A business opportunity? maybe!

ohh BTW, If you are thinking which temple I went to? It’s the one opposite to Pragati Maidan, New Delhi.

Promoting, The Right Way!

Few weeks back I released a WordPress theme – Portraiture.

When I first released it, I thought it will be a huge hit and that too all by it self, with zero external force. Quickly I realized I was wrong. For a week I was checking Google Analytics every day to monitor progress and hits. Damn, It was depressing.

So eventually I decided to take some steps. I started of with tweeting on twitter. Result was bad. I had such good product for community and didn’t know how to promote it.

Then, I went back to grand daddy of information – Google. And after a couple of hours of research. I understood that I was doing it all wrong.

It doesn’t matter if your product is good or bad. If you want to sell, You need to market it right!

In short, I learnt an important MBA lesson :) Anyways, If you want to promote you WordPress theme then following are the places you wanna hit:

  1. http://weblogtoolscollection.com/
  2. http://www.simplethemes.org/
  3. http://wordpress.org/support/forum/themes-and-templates
  4. http://wordpress3themes.com/

There’s one more thing that I did! I searched Google for free themes and started posting comments and links. Don’t spam though, give brief intro about your theme

Result? 100+ downloads in less than two weeks.

Judgement Day

So this is it! Judgement day has come. Gosh! I have waited for a long time for this. I just can’t express my excitement. Adrenaline is rushing all over.

To be straight and short, I am leaving for my trip and I hope it get settled in my synaptic junctions really well.

Will try to keep you guys updated! I will return with lots of photos and a bag full of dope :)

Cheers!

Million Faces, One Window!

Lots has changed since my college got over. A lot of my friends are doing stuff which is not normal. A wannabe scientist is working for a private firm and writing code. Electronics engineer became network analyst. Other one has got into full time rapping.

This is about one of my crazy ass friend who’s an engineer turned photographer. One can easily see his passion in his work. Specially for concept photography. And why I am writing about him or even this post? Because I liked his concept and what he wants to do.

Yesterday, when I met him he told me about his idea and how wants to collect one million photographs, Yeah you read it right! One Million. Idea is nice but I only have one question for him.

How the hell will you be able to acomplish this and that too in your own lifetime?

Well he has some crazy ideas, let see. I hope he makes it!

BTW, you can see his what he’s up to with his idea here.