Impressed with myself

2

Disclaimer: Just another personal rant written with sleepy eyes & confused mind (as always). Helps in killing a minute or two of your time (better to kill the time by yourself, rather than allowing it to die by itself, isn’t it?)

If you knew me personally, you’d certainly remember me complaining that I completely wasted my 4-years of time during my under-graduation. No I’m not denying that now.. Its still holds true… However, like Milton said “Every cloud has a silver lining”, I realized just a couple of days ago that my college days weren’t as worse as I always believed (in terms of learning & profession).

Hmm.. lets see.. What could it be that changed my mind? Some things (which I can share in public), that, well not exactly proud of, but feel-good things I did or happened during those interesting (like that Chinese curse – May you live in the interesting times) years.

  • My first semi-serious PHP site, self-learning, and doing all things by myself (design, backend, security, database etc.) came out pretty well than I expected. Site is archived here. (Well, thanks to CodeIgniter for making a lot of stuff easier :) )
  • Again PHP, a complete rewrite of the above site using Kohana & a fresh new design.. Actually, I copied basic idea of UI from IITB’s Techfest site (maybe, 2008), changed the color theme, changed & improved few elements, but I still consider it my best UI design yet (apart, from the top banner & menu). And the best part – the site is still in use actively (since 2008).
  • Breaking into Technozion site (NIT, Warangal’s Technical fest) and worse, I kind of defaced it. Did things like changing the password’s of all accounts once in every few hours, modifying database records of some particular users etc. (Thanks to some simple SQL injections). It was really fun, but I realized lately it wasn’t very moral thing to do. (actually, I passed the vulnerability info their web team, but they fixed it only partially, which kind of drove me crazy to do all that stuff).
  • Thanks to @sumit_bindal for reminding me how much I used to enjoy the puzzles on hackthissite.org. I used to spend my free-time on this site very much & certainly gave me a new angle of thought while writing code. Maybe, I should start again on those puzzles & see where I stand today…
  • It certainly feels good when you are only the one who solved the problem (with correct answer) in your lab exam. Doesn’t it? Thankfully, it was open-book exam, or else who would remember what is meant by articulation points, connected components etc. when you always know Google will help you anytime you need it..
  • B-Tree implementation, which took me some 7 hours, and yet I was really really excited that I could do that… solving the 8-queen problem in my 1st year of C++, without using 8 loops (sadly, I can’t think of any solution even today). Credit certainly goes to K.Ramesh for showing that programming is fun, and nothing else.. :) . After all, I ended up being “not the worst programmer ever”..
  • Getting a job in the first campus placement company itself. I was shocked, so was the complete college (considering how bad my academics were, and the other students who got selected were the class-toppers of the course). Actually, this became a memory I relish, not because of getting a job, but how awesome it was to fool @harikine for 2 complete days making him believe I didn’t get that job, but everyone else knew the truth… (Trust me, it wasn’t easy, but a lot of people helped in hiding it from him..) Certainly a contender for my best moment of my college life…

Ouch… just 7 points… The silver lining seems to be very slim, but nevertheless, it exists.. And I can even say I’m impressed with myself, for the joy of something coming out from what you believe as a black hole…

Learning Android : Why I moved away from Eclipse

0

So, after a very long break, I started back with getting familiar with Android development… Felt happy seeing that Google has made a lot of improvements / features in the ADT. But, everything evaporated when I tried to debug an app on my machine, and got this error: “Android Packaging Problem: resources.ap_ does not exist”. I tried cleaning the project, restarted Eclipse, and re-creating the Eclipse project and this error didn’t go away… Googling it also didn’t help much… Then, I went to sleep….

The next day, to my surprise, there was no error and I was able to debug my app, at last… But, it didn’t last long… After 3 hours, the same error is back…. It looked like this ADT solves everything else (Resource Editors, WYSIWYG Editor etc.) but the basic task it is supposed to do (Basic compiling / packaging / debugging)…

Now that perfect mood is set to go hunting for a new and *reliable* IDE, I searched in stackoverflow.com for answers… Found some thread saying IntelliJ IDEA is good…. So, downloaded it, downloaded its dependencies (JSDK 1.6) and installed them… And there is no turning back… I don’t miss the resource.ap_ error at all…

The Pros of IDEA:

  1. Reliable (unlike ADT for Eclipse) at compiling and packaging…
  2. Supports the Android “Library” projects also… (Tried it with GreenDroid, and worked without a glitch)
  3. Import Eclipse projects directly…
  4. Integrated github support (and a few more Version Controls)
  5. Decent enough features, for Refactoring, Imports optimization, Code completion etc.

The Cons:

This could become a big list, but the reliability when compared to Eclipse beats everything in the below list combined..at least for me…

  1. Page Scrolling – Cannot use the Mouse Scroll.. Need to click on scrollbar and scroll it down.. :(
  2. Logcat sucks!! The one in Eclipse is hell lot better.. Seriously needs Filter by Application, Colored text based on log level, and saved searches.. A simple textarea doesn’t justify such an important feature..
  3. The keyboard shortcuts are completely different from Eclipse.. Why doesn’t IDEs come with keyboard binding set of other IDEs that user can choose to use? :(
  4. Memory hogger, seems to be more than Eclipse.. Could it be because of Swing & Java?
  5. Basic XML Editor – There are no Android Resource Editors…. I prefer to write XML files by hand, though…
  6. Some code warnings may misguide you.. It keeps telling me that Cursor cannot be NULL, though I have personally seen cases where it will be…

In simpler words, IDEA may not be as good as Eclipse in general, but for Android development, it is certainly a better choice… at least for now..

Atleast, you’ll know you are frustrated not because of IDE… (Trust me, frustration because of an IDE, instead of logic/code isn’t even worth trying to know.. )

Square One

0

You begin at the Square One, you go forward with hopes and dreams, and most importantly with no idea what the future holds for you. You go non-stop until that day comes when completely unexpected happens, and you’ll be just thrown out back on to Square One.

You get dejected, depressed and lose all your hopes that everything got ruined. You live in darkness of the past, until one day you say to yourself “Enough! You got to get moving”… And, you start moving into that unknown future, with fear still in your mind…. You try to take one step at a time, but you haven’t gotten over your prior experiences. Yet, when you start getting over past and start moving forward with confidence, it happens again! You’ll land in the Square One again, now with no knowledge on how, when and why….

This time, you begin your journey again into those unknown lands, but instead of fear, this time you have that strange confidence – “Not to fear… I can get over even if the worse happens again!”

Geeks are awesome!

1

You got to love the geeks! For their unique talent & ability to transform any topic (including philosophy) into a discussion topic of bytes, pointers, stacks, exceptions etc…. They can convert every topic in this world to their area of expertise.. :D

A small geeky conversation from my wall on Facebook

 

Dedicated to the geeks Shrey Banga & Sharad Banka :D :D

Update (11 September, 2011): Updated the image to include a missing comment (missed earlier since the account was then in deactivated state..)

Browser Wars: Learning from each other

0

The most popular browsers from the country I come from (where Mac is rare) are Google Chrome, Mozilla Firefox & Microsoft Internet Explorer. Like any other browser, these all have the same goal – to make browsing experience richer & better. Yet, there are a lot of differences in their ways and some are better than other in some ways.

If I ever have to make a generic purpose browser, I’d certainly pick good (for inclusion) & bad (for exclusion) things from the current browsers.

Google Chrome:

The recent one and certainly a game changer. It has improved the user expectations from a browser by 100x.

The Good:

  • The crashless browser -  protect the user even from the crashes in external plug-ins (Thankfully, Firefox also implemented out-of-box plugins)
  • Faster startup time – Do things that are only absolutely needed. Nothing more. Defer everything else, to post-startup (in parallel with the user’s browsing).
  • Sandboxing – Whatever you do on web stays on web. Protect the machine from all the various security issues.
  • Explicit permissions listed for Extensions – user must know what an extension is capable of (despite of what it claims to do)
  • Silent updation: Push updates only when it is good for users. Then, who would say “no” to better browsing experience? So, there is no point in showing an annoying dialog “Updates Available” when you already know the user clicks “yes”.
  • Incognito Mode starts a new session without closing the current session (sadly, Firefox does that)

The Bad:

  • Weakest & the most limited extension model – So limited that it may give you a feeling that the word “extension” doesn’t suit it.
  • Still an immature platform for developers. Extension Model hasn’t moved but the other parts (rendering, UI etc.) are moving forward at a very fast pace. Even, many bugs in the chrome extensions are not getting fixed for many months.
Mozilla Firefox

The Good:

  • Super cool extension model. There is almost nothing that can’t be done by the addons. And, XPCOM works across all the platforms.
  • Known to be the developer-friendly browser from long time. One of the early browsers that emphasized on standards and innovation from its early days.

The Bad:

  • Known to be memory hog. Not efficient at Memory management. Have issues with Intel’s hyperthreading.
  • MaxVersion in addons is mandatory and is limited to current version (you can’t just use * for maxversion). The only issue with this is each and every addon is to be updated (you add features or not) with every major version release (which is once in 12 weeks as of now).
  • Private browsing closes the current session and starts a new one. After closing private session, it restores the earlier session. This means you can’t do both (with default command line options)
  • Every extension have complete control (including a binary component), because of lack of a permission model. You can never trust an extension because of this!
Internet Explorer

The Good:

  • Its never late to catch up with the standards, speed & security (with IE 9 & IE 10)
  • Native 64-bit for 64-bit OS. (I can’t believe Firefox and Chrome do not have them for Windows)

The Bad:

  • Still maintains the completely idiotic ‘Quirks Mode’. I don’t see the greater cause of maintaining a version which is full of bugs, extremely slow and follows no standards, and also all developers hate it.
  • Extension Model – Its a big pain. You need to be comfortable with COM to get started with. Its much comfortable to think addons don’t exist at all for this version.
  • Supports ActiveX plugins when the whole world uses NPAPI plugins.

Disclaimer: All the above are my own thoughts, and I’ve to confess I haven’t researched every point. So, not all the above may be true, but is to the best of my knowledge.

Go to Top