"Not all scattered pieces are of broken glass"
Sai Prasad
This user hasn't shared any biographical information
Homepage: http://www.saionline.co.in
Yahoo Messenger: saiprasad_35
Jabber/GTalk: saiprasad.ch
Posts by Sai Prasad
Just Friends! It got something !!
Aug 6th
If you’re wondering what it is, ‘Just Friends‘ is a novel by an Indian writer. I think it is his debut novel, but don’t take my word on this. You need to google (or bing, for Bing fans) it to be sure. By ‘It got something’, I don’t mean to say, its an awesome book. I wouldn’t even say its a good book, its just another book (add some 18+ masala content to the recipe) . What impressed me in the book are the quotes (quoted by the author himself, I believe) in it. They are not inspirational or something, but I liked them (not that I like only inspirational, in general). So, I decided to put my favorites here and share with you.
- Sleep is deadly and love is lethal. The combination is so powerful that it leaves you helpless, forcing you to sleep later.
- A sleepless night is a lover’s right
- Restless nights, drowsy mornings, confused afternoons, lonely evenings…
- Eyes are like prostitutes – they reveal more than they can conceal.
- I laughed, she laughed. Problem solved.
- I smiled, she smiled. All problems could wait.
- You pose a great competition to sugar for its characteristics of deadly sweetness and mixing quickly and easily in unknown waters.
- I wasn’t superstitious. It was just… love.
In case they don’t make sense to you, you need to read the novel then coz they all are situational, though you can identify the situations from the statements itself for many of them.
Until next post, have a peaceful life (great would be great, though)…
Learning Android: Part I
Jul 22nd
I will use this post to talk about my ‘Getting familiar with Android’ learning. As announced in the last post, I’ve started learning Android, but not even at half-pace as I wanted to.
Anyways, let me tell what I’m doing in learning. I’m using ADT on Eclipse Helios and using the Emulator for testing purposes. Currently focusing on the samples present along with Android SDK. Gone through the Application Fundamentals available along with the SDK.
Interesting Things:
- Most importantly, its good to see myself learning the things I’m interested in from the start (FYI, I always have that thing for Web & Mobile Development)
- Very clear & highly helpful documentation (and, also downloadable). And the docs are developer-focused & also lays emphasis on good practices at every step, like i18n, using resources instead of hard-coded strings etc. etc..
- Separation of layout of the app and the application logic (supports XML files for layout). I get the feeling this is inspired from Flex (mxml & as), but I don’t know.
- Provides a very good mechanisms for interoperability between various applications. Simply said, I can use the capabilities of other applications installed, and also I can expose my app’s capabilities to other apps. Also, Android search also integrates good with any application’s search.
- Application Development is done in Java, which is said to be a very developer-friendly. I can utilize this to brush my skills in java, as I have other plans to work in Java in some not-so-far future.
Annoying Things:
- Tabs are NOT simple to use. I’d prefer a way to declare tabs and its contents in the XML itself.
- In TabHost, mandatory referencing of elements to’ tabs’ & ‘tabcontent’ doesn’t look like a good programming feature.
- Missing the tabs & tabcontent id referencing in the TabHost would give no error / warning by Compiler, but fails at Runtime, without any proper information (even while debugging)
- Emulator takes very long time to start. So, its preferred not to close the emulator after every run. (start along with eclipse and close it before closing eclipse)
- Emulator keyboard shortcuts – Not too easy to remember (like, Ctrl + F12 for Toggle Portrait / Landscape modes). I’d have preferred if the emulator itself has a help button, to show the shortcuts.
- Nothing to do with Android, but the bug in Helios (Eclipse Web tools plug-in) has become a pain, forcing me not to us any features while editing resources. Bug – https://bugs.eclipse.org/bugs/show-bug.cgi?id=318108
- Again, may not be related to ADT (frankly, I don’t know), but the auto-complete context is very slow, taking 30-60 seconds (which is tooooo long, btw). Here again, I’m forced to disable Auto-Activation of context Assist at ‘Window -> Preferences -> Java -> Editor -> Context Assist -> Enable Auto Activation’
- IĀ can’t run the application when my focus is on layout files (on resource files, for that matter). I always need to switch to a java file, to run (Ctrl + F11) the application
- The layout filenames cannot contain uppercase letters. If it contains, the error shown doesn’t help in identifying it
Unclear points for me:
- In Android XML, for TabHost, @android:id/tabhost works ( i.e; referencing other element with tabhost id ). How can access this element from my Activity class? (since, no reference is created in R.id )
- Is XML compiled ? Or interpreted at Runtime? If compiled, how can I see the generated Java (?) files? (something similar to -keep compiler option in Flash Builder)
- And many other things (like, working of Intent, i18n, logging), but these are somethings I need to learn as I dive further in android..
Tasks for coming days:
- Finish the Tutorials in the resources, and then go to the samples folder available with the SDK.
- Try to make a couple of simple *usable* apps, so that I get enough practice with the SDK APIs
Also, attaching the projects HelloAndroid.zip and HelloViews.zip I made during my learning.
Wish me that I gain pace in learning Android over the next few weeks…
And, I’m back!
Jun 18th
I’ve decided that I need to celebrate the release of WordPress 3.0. So, I’ve given a thought about the best way to celebrate! And guess what? Using it & spreading the word will the best (both for myself & WordPress too
). So, I’m back to my blog. And this is not like my previous times !!! I’m going stick around updating my blog for quite some time (a couple of months, for a minimum).
Let me start with what happened during last few months. Actually, many of them I wish they didn’t happen or they happened other way..
- I tried to get a driving license at Noida, but failed because of lack of local address proof. Seriously, going back to my hometown just for getting a license – doesn’t it sound stupid?
- With no license, my dream of a getting a bike got wiped away !
- I’m getting bored (read as vexed, irritated and so on…) of Noida ! What a stupid place it is !! Isn’t it?
- Laptop is troubling me a lot…. Currently under repair. Wish I get it back soon!
- Lost all the contacts from the mobile!
And the good part: Google I/O 2010 brought back my interest in Web & Mobile development, due to which, I decided to spend atleast 40 hours in the coming couple of months learning Android. I’ve also decided Learning is going to my major focus area for a couple more years!!
So, wish me luck in putting things into execution !
The Benefits of Failure
Feb 12th
This is video of the speech by the famous J.K. Rowling at the Harvard Commencement, 2008.
So, whats in the video?
- It has some humor in it, especially the first 150 secs. I’m sure a few smiles you’d certainly escape from your tender lips..
- She talks how ‘being poor’ influences (or atleast attempt to) your life and all in it including career, passion etc. etc.
- And the core part – The benefits of failure. I think she had put this part in action in a great way, or else, after watching this video, why did I desperately want to fail in a big way despite my fear of failure??
Now that I mentioned I fear failure, let me tell what my mind tells me right now. “You do not fear the failure itself, but your fear its after-effects. Its capable of taking everything fro you !”. But my heart is encouraging me – “When you had done everything from scratch, why do you fear to do it again? It’d easier this time.. !!”
I know it sounds funny, but really can’t help. Perhaps, this is why people call – “An idle brain is the Devil’s workshop”
I had a problem
Dec 1st
Symptoms:
- Language: C++, Operating System: Windows
- Target Audience: Programmers
- Sub Area: Reading ASCII / UTF-8 files from the disk using C++ streams.
- Trouble: How to handle files whose file names contains non-ASCII characters?? (coz ifstream takes a ASCII file path
)
Solution:
- Use _wfopen_s(), the safe version of _wfopen(), which takes a wide-character file name & gives a FILE pointer i.e; FILE*.
- Use the obtained FILE* to create a stream, like ifstream in(fp);
- We used wide-character file name & are reading the file byte-by-byte (actually, its char). DONE !!
BTW, I got help from here ! Hope this savesĀ time for someone out there…