Skip navigation

Tag Archives: android

A couple of years back give or take, I resolved getting serious with my dream of becoming a guitar god. So I wrote an app that would help me practice playing/jamming. When I finally resolved to write Museic in Java, it occurred to me that the nature of the app makes it a good mobile app project. However, a few factors like my machine specs then, kept me to a hacky desktop app.

Fast forward to today, I’m a better guitarist but no close to being Jason Mraz or Ed Sheeran. However, I’d like to think that the capability of my personal machine has increased in greater proportion than my guitar playing skill. So it seemed to me that, at last, it is time to tackle that good mobile app project.

And tackle it I did! Despite a couple more setbacks that I won’t go into here, it is with pride that I present the first mobile app I exclusively wrote myself. And whereas most of my projects just live at GitHub, often not in a polished state, and being “deployed” on my local machine at most, this time I have something that definitely screams “finished product”: a page in the app store.

Museician at Google Play Store

This is incidentally the first time I tried using the built-in page screenshot tool in Chrome. Can’t say I’m very impressed.

Born out of my own frustrations playing the guitar, making this felt awesome in more ways than one. Of course it lessens my frustration when learning a piece on the guitar. And then there’s that fleeting high when you create something that was not there before, get something to work when you previously had no idea how. It is not perfect, not very pretty, but I am very pleased with myself for making this. Working in the industry, it is not every day when you can personally help yourself with a program you wrote, something you do not because you’ll get in trouble otherwise, and when it happens Big Data can go hang. I managed to help myself and improve my quality of guitar practice without having to set-up TensorFlow. I feel like 90% of start-ups can’t even say that. Wink wink cringe.

I have a few more things I’d like to achieve with Museician, though I also feel that I’m more likely to just get this to a really-polished state, maybe add just one more feature (if it does not take too long), and then probably jump to the next thing I want to learn. The bad thing about working in Software Engineering today is that there is always a lot to learn. The good thing about working in Software Engineering today is that you need to be constantly learning.

Ever since I got my new laptop and upgraded to Ubuntu 12.04, I noticed that my WiFi has been very unsteady to the point that for anything greater than 100MB, my most reliable download method would be via torrent, unless the server I’m downloading from supports resuming downloads, which is never. That’s a shame since not everything > 100MB can be found in P2P networks. I also noticed that Ubuntu 12.04 oftentimes took ages to connect to our WiFi network upon start-up. This isn’t the case with 10.04 and Windows 8. Unfortunately, the last time I felt this frustrated with WiFi connection upon start-up was with Windows Vista.

At first I thought it is an issue with our router which is around 3-4 years old—a suspicion I got pretty confident with upon checking my ping and traceroute logs. My pings averaged at around hundreds of milliseconds, sometimes even up to 800ms, while the normal was only at around 50ms to 60ms. Traceroute, on the other hand, times out intermittently and, noticeably, on the first hop towards our router (192.168.0.1).

I got a replacement for our router around a month ago and, to my disappointment, the problem persisted. My ping and traceroute returned to normal but the WiFi remained choppy while connected and initial connection upon start-up still took ages. I’ve been searching for a solution for this problem but every solution I come across seem to be very hardware specific (check those network cards, geeks) and involved building some low-level modules. For what it’s worth, it seems that this problem boils down to a conflict among the wireless drivers that come with 12.04.

Then somewhere, in my searches, I encountered a post in Ubuntu Forums which looked like a general solution to the problem I am having. This, as the command suggests, installs a backport of wireless drivers into your machine:

sudo apt-get install linux-backports-modules-cw-3.3-precise-generic

Now, my Ubuntu 12.04 instantly connects to our WiFi upon start-up, just like my old 10.04 installation.

The WiFi still cuts though, something which I’ve pinpointed to be a fault of the router (or, maybe, how I’m positioned with respect to the router): I noticed that my XPeria Z, stationed on the same desk, also gets disconnected. For what it’s worth, reestablishing connection is now faster since I backported my drivers.

Okay. First off, I’m aware that I’ve lagged behind my New Year’s Resolution. But I’ve only lagged behind the blogging part: I’m still exploring new stuff monthly. Guess I’ll talk about them in brief for now and, maybe, expound some other time. ^_^

Just to clear some smoke, last time, I told you that I may be in for a volunteer project. Well, so I’ve been and yes, I did use Django pretty extensively with it. The project is for the up-and-coming Python Philippines. I’m the one behind the website and it’s running on Django CMS. Go visit it. We don’t have content yet but, well, you can look at the pretty theme. Hehe.

And just last Saturday, I talked about Django CMS at Python Philippines’ monthly meet-up, to encourage contributors. I feel that my talk went well and I hope to put up a transcript of it in here, to make up for my lack of blogging. Soon!

 

I’ve also been trying to learn some things from the ground up in Python. I’ve done sockets last time and this time around, I tried doing threads. Straight from the box, Python does not really support threads. You’d need libraries like gevent to actually get some concurrency done in peace. But still, unlike PHP, if you just want to switch among jobs, Python has something for you.

I’ve experimented with Python’s threading library. It’s a curious thing, coming from Java’s threads. I got so curious with it I’m even trying to learn statistics to validate my experiments. Because, you know, I did all my samples in powers/multiples of ten.

 

Lastly, as a form of humbrag1, I got myself an Xperia Z, for around a month now2. I must say, it’s damn gorgeous! I never got people who complain that Samsung uses cheap plastic to house impressive hardware but with the Xperia Z’s all-glass build, I get it now. It’s all about the user experience, people. User. Experience.

The hardware is damn powerful; Iron Man 3 plays very smoothly, save for occasional lags. The camera isn’t shabby either; for quick shots, it can do in place of my bulky SLR. Being water proof, dust proof, and shock proof sealed the deal for me.

At last, at last, I can play Temple Run 2 even when it’s raining.

  1. Okay, really bragging mostly []
  2. Those who know the camera I am using can now scream “Fanboy!” []

Just a test post from my Droid. I’m on a Galaxy Y and it’s a shame to report that landscape mode isn’t very nice here. Shame.

Elsewhere in my life I’ve been doing lots of JSP and Apache. Quite some XML here and there, and bits of Oracle. Oh, and PyGame too!

Biggest. Hurdle. Yet.

The base code I was waiting for came finally this week. They seem to have resolved it last Friday, after I went home. However, I spent the better part of Monday improving on a more stable feature trying to beat an afternoon deadline for a demo build. I only started looking at the base code around noon.

The instructions were pretty simple. Extend and override the methods of class Foo and then call method bar() of class FooBar. Sounds easy right?

Well it is supposed to be easy. Unfortunately, things went a bit more complicated for me in this episode of my adventure.

At this point, I am unwilling to continue my story using the optimistic-man voice I am hoping I have sounded like so far. It wouldn’t do the frustration involved any justice. Instead, I’ll be taking a leaf out of the books of those genii-going-madman from the movies and tell my story…

…event-log style (cf. Darren Aronofsky’s Pi)

Monday, 9/16/2011, sometime after lunch. Carefully read through resources and emails for instructions on how to work with the framework we are using. I coded what I’ve understood so far. Right. This should work. Hit “run”.

Monday, 9/16/2011, around 4PM. How many times have I hit run and I still don’t see a single map tile on my AVD? I already encountered this problem when I first worked with Google Maps but I don’t remember how to resolve it. They say it boils down to my API key, which is already there, copy-pasted from the layout xmls of my previous Google Maps work.

And it doesn’t help that AVD3 takes a lifetime to load or that, every now and then, connection to it times out and you can’t test your code on it anymore and the only solution is to close the AVD and wait for another lifetime.

Tuesday, 9/17/2011, morning. A beginner’s mind is a fresh place to come from, Zen says. So, this morning, I tried to address the issue of Google Maps not showing on my AVD. I perused StackOverflow, Android Dev Notes, Ubuntu Programming Talk forums, hell and high water but nothing seems to work for me. I even tried to regenerate my API key! After a few failed attempts at getting Google Maps to show, my beginner’s mind isn’t so fresh anymore.

Tuesday, 9/17/2011, after about an hour. I decided to test my previous guaranteed-working Google Maps code. They didn’t work. Tried to run them on an AVD in another computer. They worked. What?!

Tuesday, 9/17/2011, after a few minutes. Explained the developments in the issue to my mentor. Turns out that I hadn’t set the proper port and proxy. That’s funny since I don’t remember tinkering with the AVD’s settings since the last time I worked with Google Maps. While I appreciate the art in classic cartography, I never thought the sight of a map can make me this ecstatic.

Right. Whatever. Must. Code. Now.

Tuesday, 9/17/2011, around lunch. I can’t figure out what I’m doing wrong. I followed every instruction—extended every class they told me to extend, overrode every method they told me to override—and it still won’t work. I’m caught up in a cycle of read-code-run-ask. I’m starting to feel embarrassed as I repeatedly go to the same person for help. He seems to be the only one who understands what’s happening in the code and I seem to be the only person in need of his assistance. Perfect combination.

(If it’s any consolation, I’m the only one working with his code.)

It won’t work even after I showed him my codes and he nodded telling me it should work. Should.

Tuesday, 9/17/2011, an hour or so after lunch. I decided to run the sample code instead of just studying it and trying to get the pattern. It works flawlessly. What I can’t understand is why it doesn’t work for me. My bad. This code hates me.

Tuesday, 9/17/2011, after about 30 min from last log. Breakthrough. He pointed out that he didn’t really extend and override the methods of class Foo himself. There were already pre-made classes in the framework which did that for us. All I have to do is add my own code, should I need some more functionality/processing.

Wow. I didn’t know that.

Wednesday, 9/18/2011. (At this point, logs will have precise time stamps as it is this day that I thought up of this whole scheme.)

Wednesday, 9/18/2011, 9:18 AM. Succeeded in disabling the sample code. That’s intentional, the rationale being, if I can break it I understand it…

Non sequitur. Turns out rationale isn’t really very rational as I still can’t do what I want to do with the code.

Wednesday, 9/18/2011, 9:42:56 AM. (Time stamp from Android’s console at Eclipse. That’s accurate!) Modified the code some more and then hit run. Console greeted me with the following message: “Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE”. My bad. How big has our project become!

Wednesday, 9/18/2011, 10:06 AM. I thought I got it but still no. Hmppfff.

Wednesday, 9/18/2011, 10:32 AM. SUCCESS AT LAST!!! Must document how I did it so I can modify further! YEAAAAHHHHHHH!!!! I’m happy again!

<(‘-‘<) ^(‘-‘)^ (>’-‘)>

So. There you go. A story of my descent to madness then rise to happiness for the past few days.

Stay happy. Till next time ~ The Andrei Estioco