Nithin
Linux | Web Technology | php-zend | Python | Obj-c | c | c++ | Tweeter | Thinker | Night-Life | Badminton | Music | Friends | Hangouts | Pub | Loves driving alot
Professionally: php-zend, python-django, iPhone app dev in Obj-C
Passion: Programming, Research, Social service
Posts
Pros and cons of a web app over a native app from a web developers perspective
Native app
Pros:
- Millions of registered credit card owners are one click away.
- Xcode, Interface Builder, and the Cocoa Touch framework constitute a pretty sweet development environment.
- You can access all the cool hardware features of the device.
Cons:
- You have to pay to become an Apple developer.
- You are at the mercy of the Apple approval process.
- You have to develop using Objective-C.
- You have to develop on a Mac.
- You can’t release bug fixes in a timely fashion.
- The development cycle is slow, and the testing cycle is constrained by the App Store’s limitations.
Web app
Pros:
- Web developers can use their current authoring tools.
- You can use your current web design and development skills.
- You are not limited to developing on the Mac OS.
- Your app will run on any device that has a web browser.
- You can fix bugs in real time.
- The development cycle is fast.
Cons:
- You cannot access the all cool hardware features of the phone.
- You have to roll your own payment system if you want to charge for the app.
- It can be difficult to achieve sophisticated UI effects. But still you can use jQuery frameworks like jQtouch
But apart from these, even though you are a web developer you could achieve most of the hardware gestures via javascript if you could use phonegap which is a device independent framework with a very very less knowledge in xcode & ~ 0% knowledge in Objective C
This is a feature included in jQuery API v 1.0+. I have noticed this when I was working on multiple select boxes which has to do the same job on its onChange event. When I noticed that the code seems a bit ugly -
$('#start_time').change(function(){ showTimeDiff();});
$('#end_time').change(function(){ showTimeDiff();});Then I implemented Multiple Selector feature to avoid the repetition of showTimeDiff() function call
$('#start_time, #end_time').change(function(){ showTimeDiff();});
I am just sharing a picture which explains well the architecture of android OS.
courtesy: datasprings.com
Lets see how can we write JavaScript object oriented with a simple example.
(function(){
// Initialize namespace
window.foo = window.foo || {};
// create a class named alerts for foo
foo.alerts = (function() {
// here you can write the constructor stuffs
var windowAlert = "this is window alert"; //instance variable
var anchorAlert = "you clicked on anchor tag"; //instance variable
return {
// write member functions here
showWindowAlert : function() {
// this is a member function
// and can be called as foo.alerts.showWindowAlert();
alert(this.windowAlert);
},
showAnchorAlert : function() {
// this is anoter member function
alert(this.anchorAlert);
}
};
})();
})();This JavaScript will be called in page load. To call fist member function showWindowAlert(), you have to call like this,
foo.alerts.showWindowAlert();
The second function showAnchorAlert() can be called like this,
foo.alerts.showAnchorAlert();
Unit Tests are the living description on how the Unit should work, and ensure that your own Creation is working in that way you wanted to. To write unit test cases in php, I would recommend you to go for PHPUnit. I will tell you an easy way if you are going for a manual installation.
The way of manual installation mentioned in PHPUnit manual is as follows:
- Download a release archive from
http://pear.phpunit.de/get/and extract it to a directory that is listed in theinclude_pathof yourphp.iniconfiguration file. - Prepare the
phpunitscript:- Rename the
pear-phpunitscript tophpunit.
- Replace the
@php_bin@string in it with the path to your PHP command-line interpreter (usually/usr/bin/php).
- Copy it to a directory that is in your
PATHand make it executable (chmod +x phpunit).
- Rename the
I was bit confused while going through above steps as they mentioned :p.
Easy Method (in linux & mac):
- Download a release, extract it (no matter where). And find the
phpunit.phpinside the extracted folder. - In terminal, change directory to
/usr/binthen create symbolic link tophpunit.phpand name it phpunit.In case you don't know here is the syntax,
sudo ln -s <absolute_path-to-phpunit.php> phpunit
Happy coding!
The nice thing about Windows is - It does not just crash, it displays a dialog box and lets you press 'OK' first :p
When I was working with the fbconnect in a python-django project, I found something missing. There was no method to update rsvp for an event. I am not sure how/why those brains missed this case. Anyways, a little hack for the existing pyfacebook library does the job. Here is it.
You can download the existing project from github - http://github.com/sciyoshi/pyfacebook
Inside the package, you just need to edit one file to make it possible. Open facebook/__init__.py in your favourite editor ;).
In that file go to the definition of the dict METHODS change the value of the key 'events', initially it is like
# events methods
'events': {
'get': [
('uid', int, ['optional']),
('eids', list, ['optional']),
('start_time', int, ['optional']),
('end_time', int, ['optional']),
('rsvp_status', str, ['optional']),
],
'getMembers': [
('eid', int, []),
],
'create': [
('event_info', json, []),
],
},Now add the rsvp method to the events dict, then this dict will be like this
# events methods
'events': {
'get': [
('uid', int, ['optional']),
('eids', list, ['optional']),
('start_time', int, ['optional']),
('end_time', int, ['optional']),
('rsvp_status', str, ['optional']),
],
'getMembers': [
('eid', int, []),
],
'create': [
('event_info', json, []),
],
'rsvp': [
('eid', int, []),
('rsvp_status', str, ['optional']),
],
},Official documentation for facebook's event rsvp is here - http://wiki.developers.facebook.com/index.php/Events.rsvp
While developing django applications, did you ever get confused about the unexpected result by the query generated by ORM and wished to check that query? There is a good solution. I have a habit of watching #django at times and thats how I got to know about this. Its django-devserver. Package is available here - http://github.com/dcramer/django-devserver/. After installing(with dependancies) you need to include devserver in INSTALLED_APPS in your settings file as:
INSTALLED_APPS = (
'devserver',
)and also you have to add a new tuple in settings as DEVSERVER_MODULES. This is for specifying which all modules to load.
DEVSERVER_MODULES = (
'devserver.modules.sql.SQLRealTimeModule',
'devserver.modules.sql.SQLSummaryModule',
'devserver.modules.profile.ProfileSummaryModule',
# Modules not enabled by default
'devserver.modules.ajax.AjaxDumpModule',
'devserver.modules.profile.MemoryUseModule',
'devserver.modules.cache.CacheSummaryModule',
)You will have to use python manage.py rundevserver instead of python manage.py runserver to run your development server. Then you will get additional informations like real-time SQL-Loggings and a summary of your cache calls
Go through the Read Me file before installing.
NB:- Beware - your terminal may get spammed by the sql-logs :p
Happy coding!
I am not gonna tell about some scripting languages, but script.
script is a GNU project which is a simple terminal application which can log the activities in a terminal with their outputs. To start script, you just have to give script in your terminal. Then you will see a message saying Script started, file is typescript (If you have to mention filename, then give script <filename> ). Once you finished up with everything which needs to be logged, just press ctrl-d or exit and that will exit script with a message script done, file is typescript(or filename you seleced). For the better view of the log, use cat or more.
It is helpful to show somebody a log about what you have done in terminal. This terminal logger is quite a simple and useful application right?
Are you a terminal/konsole freak? Then you might be knowing it else you will love it.
At times most of us used to face the worst scenario that a single terminal window with hell lot of tab opened or multiple terminal windows itself. Do you need anything else to hang urself?
A simple & humble solution - screen :) Most of the linux distros comes with screen installed by default.
Most effective usages - The basic usage I have already told you. And another interesting one is here. Did you ever think about terminal sharing? screen can be used somewhat like desktop sharing.
To start screen, all you have to do is just type screen On your terminal. You can create any number of windows in a single screen. To create new screen, you have to give ctrl-a c and a simple ctrl-d (logout) will end the current window. ctrl-a n & ctrl-a p to switch between next & previous windows. ctrl-a N will give you an option to enter window number & switch to that window. ctrl-a " will list all the windows, you can use arrow keys to select.
Terminal Sharing: start screen from machine A, from machine B ssh to A and then use screen -x to get into the already started screen. From both machines it is able to use the same screen in real time just like VNC for remote desktop.
In short it is a terminal application which allows any number of terminal application in single terminal window & single screen can be accessed from multiple terminals ;)
other options for screen is shown in the image:
Yesterday I saw the movie Final Destination-4 in 3D. The 3D effects was awesome but the movie was not up to the mark when compared to its previous series. The whole time I was thinking about the 3D technology, a nostalgic scenario - that is the same thoughts came wen I watch avatar for the 2nd time. And after that movie I was searching for how to view a 3D movie in my 17" crt. but ended up with no-working-proofs/findings. But this time while watching movie I tried watching with one eye closed for sometime. But you know what, i didn't feel that 'effect' then. And I was so interested in thinking about its technology.
Here we go. In this 3d technology, two images are projected superimposed onto the same screen through different polarizing filters. The 3d glass we wear will b having the polarizing filters. And each eye sees different images. So projecting the same scene in to both eyes from different perspectives will create the ILLUSION or 3D EFFECT.
So the technology behind the stereoscopic motion picture (3D movie) is Fooling Our Eyes ;)
If you check the 3D image below you can see that there are 2 images overlapped.
NB:- Image is borrowed from ioquake3.org
When i was trying login to posterous via fbconnect (like always) I got this strange f**'d up msg. WTF!!!
When I started my day today, and after a meeting I was so confused looking on my desktop. Which One I have to be with first? *headbang* kinda situation. I felt really mad!!!
I have attended kerala - google technology user group's launch event held @ technopark today(10/04/10)
- randomized algorithms
- MapReduce framework to supported distributed computing
- unladen swallow -> http://code.google.com/p/unladen-swallow/
- O3D API -> http://code.google.com/apis/o3d/
- google tips & tricks
- Closure Compiler -- this is one of the most wonderful app i have ever seen.. wow! http://code.google.com/closure/compiler/ -- http://closure-compiler.appspot.com
- Ajax Playground -- that too wonderful... http://code.google.com/apis/ajax/playground/
Profile
Experience
- Nov 2011 - PresentProject Lead / Waybeo technology Solutions Pvt Ltdworking on www.bounzd.com
- Apr 2010 - PresentTeam Lead / Pollenizer Indiacurrently working on iPhone app dev
- Jan 2010 - PresentSenior Software Engineer / XMinds Pvt Ltd.python-django, mysql, postgresql, linux, NetBeans IDE 6.5. familiar with fbconnect, twitter connect, REST, SOAP, CRUD, jinja templates, ICU
- Oct 2008 - PresentSoftware Developer / XMinds Pvt Ltd.Curretly I am using these.... python-django, mysql, postgresql, linux, NetBeans IDE 6.5. familiar with fbconnect, REST, SOAP, CRUD...
- Jul 2008 - PresentTrainee Engineer / XMinds Pvt Ltd.Joined x-minds as a trinee software engineer in python-django
- May 2006 - PresentSoftware Engineer / Childfoot TechnologiesVoIP
Education
-
2002 - 2006Anna UniversityBE in CSEActivities: Computer science Association
-
2002 - 2006National CollegeBE in Computer
-
2000 - 2002University of KeralaHSS in CS
- MMRHS
Additional Information
Updates
-
Go to Google Translate; Copy this text: pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk Pick German as the 'from' language; Press the 'Listen'-button2 weeks ago
-
Actors are playing cricket, Cricketers are playing politics, Politicians are watchin porn and Porn stars are becoming actors!! via Nitin Prabhakar3 weeks ago
-
Updated4 weeks ago
-
I need help in recovering files from a kingston usb (g3 model, 8gb) which s nt detecting n win,linux,mac. Sis's friends final proj (msc) in it, no other backup :( !5 weeks ago
-
Facebook for Skype or skype for Facebook5 weeks ago
Wall Photos
Cover Photos
Onam 2011
Posterous Photos
Twitxr Photos
Latest checkin
-
@Kairali Theater (Aristo jn.)5 weeks ago in Trivandrum, Kerala
Badges
Checkin history
-
@Kairali Theater (Aristo jn.)5 weeks ago
-
@Waybeo Technology Solutions Pvt. Ltd. (T-BIC, 4th floor, Nila)5 weeks ago
-
@Cafe Coffee Day (Kaudiar)6 weeks ago
-
3 months ago
-
@Amrita Vishwa Vidyapeetham (Amritapuri Campus)3 months ago
-
@Mascot Hotel Trivandrum (Mascot Square Dr. D. N. Road,Near Crawford M)5 months ago
-
@Safari (thampanoor)5 months ago
-
@SL Theatre Complex (near overbridge)5 months ago
-
@Shoranur Jn. Railway Station (Shornur Ring Rd)6 months ago
Updates
-
The INR effect! RT @JuwalBose: Buying a macbook pro today - pro: Indian price < apple price. Con: new mac versions coming soon.
-
@sreenadhtg mappu koora. So far
-
Reached thenmala Yeko-tourism. Phew!
-
The dichotomy of fame #clt
-
Currently listening to 018VENGABOYS_PLATINUM_ALBUM
-
@FairyDevil_ wife nd her students
-
@dileep_gg with wife nd her students! #avastha
-
@FairyDevil_ yeco-tourism, thenmala
-
@dileep_gg agrahamund :-/
-
Off to a one day trip
-
@amSadu pwoda!
-
@iyarthegreat pinnalla :D
-
be grateful for what you got
-
With my wife for #TechABreak closing event :(
-
Think globally, innovate globally - @shiv_waybeo . A big #woohoo to you mate!
-
#exodus'12 @shiv_waybeo answering the queries of students regarding incubators and 'How to startup' http://t.co/dxnYqyVf