The trials

Now let’s work on making the app! Sounds fun, right? Well it sure was.
The first task at hand was that of loading a picture from the gallery and displaying it on the screen to the user. Sounds easy? It did to me. And then, a sweet little thing called karma bit me.
With the task at hand, full of enthusiasm, I installed Android Studio on my laptop and opened it. After going through a few introductory lessons on udacity and then shifting to the new boston tutorials for Android, I decided it’s my time to try my hand at developing my first proper app!
The funny thing is, the most evident question comes to your mind — Where do I begin?
The tutorials taught you about what everything was. But how do you mould all of your knowledge towards your objective? Something that seemed so simple at first? I guess my mentor already knew of this predicament that I would be in, because before I even installed Android she advised me to study about intents. And so, I decided, that this would be my first task — to study about intents.
When I first studied about intents, I thought about it on a very rudimentary level. Intents were something that linked one “activity” to another. Sounds simple right? So I figured, you’ve got to link the button to what activity you want using intents. And then I think, “Enough with the theory, let’s see some application” and I begin hunting samples of intents and look at awe at lines of code that miss my comprehension by a long shot. I was taken aback, I’m thinking, “Hey, this was supposed to be easy, what’s with the plethora of code?”
And then, it hit me. This wasn’t some child’s play, this is gonna take a lot of effort, time and dedication.
Now, I’m having a lot of self doubt right now. I’m thinking, this is the first thing that I need to do, and I’m finding this so hard. I still needed to integrate OpenCV to Android Studio so that I can start working on my project for what it really is about, image processing. Surely, I can’t afford to spend so much time on Android? I made a decision — The main agenda of my project is image processing, and I shall focus all my energies to that. This was a pretty common task, someone must have made something already that might help me? I started hunting again, looking for codes that would suit my need. Finding one such code, I thought I’d work it out, but when I copied the code, I realised that Android Studio wasn’t just about coding one or two files, it was more than that. You got to keep in mind the gradle, the minimum SDK version, the target SDK version, the target API, the main activity, the manifest, the xml files, and the list goes on. So with over a dozen errors in my main activity file, I used a systematic approach, solving one problem at a time. With the help of my mentor and google, after 2 days of sitting in front of my laptop and debugging the code, Eureka! It finally worked!
I can’t describe that moment of elation in text, even though what was achieved was simple, and understanding that the problem was a trivial one which, if I had the experience before I pondered on the fix, I would’ve probably figured out in a while. But it was a good experience, because with the guidance of my mentor I realised that programming is not something as simple as copying and pasting code — it was more than that. Even if you have copied the code from somewhere, real learning comes when you sit down and troubleshoot the problems you face.
