Hello old friend

Well, I’ve just done something unexpected: I installed Opera on my workstation.  It has the operating systems default (a red dinosaur) and Google Chrome setup, which I have used since I got tired of diving into Firefox only for Firebug. In practice, I find Chrome’s stuff to be equally useful to me.

Now, why did I install opera? Generally I like to keep my environment pretty much the same; a look at my shell profile would make that obvious. At home, Chrome has developed an odd problem on my desktop, Dahlia. No sound plays: be it from Flash or Silverlight. Haven’t tried anything else, since e.g. WMV and QuickTime seem to have died out in the last lustrum (good riddens QuickTime!).

So, I am considering replacing Chrome with Opera as my defacto standard browser, as much as I love Chrome, do I really like openning another browser whenever I want sound? If you say try Firefox (or relation there of) I will find where you are and unplug your Internet with a vengeance. The only other browser Dahlia has is Internet Explorer 9; which is actually a nice enough browser to use but doesn’t even meet my criteria as well as Mozilla.

Pluses for Opera:

  • We’re old friends: I used to use Opera 8.5 – early 9.x as my daily surfer.
  • It’s stable, tried, true, and reliable.
  • I use Opera Mobile on my Androids.
  • It’s not the fattest ass at the track, *cough*.
  • Tomorrows staple feature is usually probably be todays Opera feature.

Negatives:

  • Some moron developers treat Opera like a deranged step brother.
  • Silverlight isn’t officially supported, but probably works.

I find it startling how much alike Opera Mobile and Opera is. All that is really missing is more advanced settings, and ‘lesser’ used features like gesture support (cool) and panels.

We’ll see what happens but I’ll give the experiment a go. Something that especially interests me, it seems that Opera Dragonfly is more or less the same thing as what Chrome has, plus “Opera Turbo” may be a viable option. At work, things can get really congested on the network, especially the wired one my desk switch, workstation, and test units mate with. So WiFi is usually the only way to browse to Internet resources – Opera Turbo might help with the network spikes, so I’ve got it set to automatic here, at home I won’t need it.

Opera Turbo is a function that feeds data through a proxy server for compression, all that means to normal people is that if your computer is older than petrified dog shit or you’re on a slow network, you get faster page loads. The privacy issue doesn’t bother me much, not at work. No one is watching closely AFAIK but there’s little to find past e.g. editing my calendar.

Thoughts on Android development *ON* Android

I’m crazy enough for it, after all BTEP+{bash,vim,coreutils,etc} on the TF101 is about as pleasant as on a netbook. The difference between BTEP and XTerm, makes something like Screen or TMUX a necessity IMHO and I favour the latter. Also copying and pasting from vim to Android apps is different. Without vim’s X support, a temp file is the best solution until BTEP gains real support for text selections.

My point being, if you can use a netbook and a command line environment, doing it on Android is no different. Hell you could even SSH into a phone from a PC if you lack a Transformer or a tablet+Bluetooth keyboard setup. Only people that _require_ something like Eclipse or Visual Studio are seriously impacted, and emacs and vim are good tools when combined with GNU tools (BusyBox a bit less so).  I have the equal of Debian without X.Org running on my transformer, a decent terminal emulator, and a real keyboard. So I am well equipped.

Now, the sticky part is actually being able to compile and run Android Java programs. You can write the code on a napkin if you want but that doesn’t work with your devices CPU quite so easily.

Android developers should already know the compilation model:



        *.java -> *.class -> *.dex -> classes.dex

A compiler is used to convert the source code into Java bytecode. This technically means that any language that you can get running on a JVM, and interface with Java code, you can probably use for Android development; in practice I’m sure there are more devils in the finer details.

After we get the Java bytecode, we have to convert it into a format for the Davlik VM to run. That’s where the dx program comes in. It translates Java to Davlik.

Because applications are rarely composed of pure source code, especially Android ones, things get slightly more complicated to create a .apk file you can install. The packaging tool aapt, apkbuilder, and aidl programs join javac and dx in creating the .apk file, the end goal of our the toolchain. In practice: .apk is pretty much .jar, which is pretty much .zip. Only classes.dex is used instead of a .class file per class in your code, and something I wonder why Sun never thought of!

Now, the issue is obviously how to run all this shit on an Android device, like my Transformer.

Google only publishes SDKs for Windows, Linux, and OS X systems on x86, Linux+ARM isn’t supported, sadly. Installing an x86 emulator and a mini distro with Java  and ssh is over kill, even for my Debian chroot loving self! BUT most of the SDK is in Java or BASH!

Java runs on Debian/ARM, so we can install a JDK and JRE, and thus get access to the Java side. Bash is already available for Android, let along Debian/ARM. So! The point of concern becomes x86 binaries. That seems to amount to most programs in platform-tools/ and tools, but what do we /actually/ need? Well guess what Jack, if we’re doing development on device, we don’t need the emulator! AFAIK the tools we do need are:  apkbuilder, dx, javac, probably jarsigner. The aapt and android programs being good to have, ditto for ant I’m sure.

aapt is a binary, so at best it would have to be natively or cross compiled, and much like make in C country, we can probably do it another way. The source is probably in the Android Open Source Project (AOSP) somewhere, which would make this easier.

android, apkbuilder, and dx are bash scripts.

android sets up an invocation of the Java VM (java) with tools/lib/sdkmanager.jar and a suitable SWT JAR and runs the program. I don’t know if SWT needs to be in the classpath when running it in command line mode, but hell, Debian/ARM = SWT deb somewhere.

dx is similar but uses platform-tools/lib/dx.jar.

ditto for apkbuilder, but using tools/lib/sdklib.jar

In looking at the manifests, a suitable Java execution environment is all that is needed for the serious leg work. That surely can be done using the JRE and/or JDK debs. Hoorah! And obviously the point of the “platforms/android-*” stuff is for javac and the emulator to work, android.jar in particular is our interest.

One downside, dealing with Renderscript or NDK stuff is another delema as obviously those rely on binary stuffs that are not Java, and AFAIK the toolchain for Renderscript depends on an LLVM frontend, so idk how to deal with that yet, but I’m not worried about it — most applications shouldn’t be using renderscript, unless maybe you’re making Modern Warfare 4 on Android >_<.

So I think, I is in business.

PostScript: I am aware of the Terminal IDE app but prefer to be closer to the official SDK and I would rather stick closer to my Debian chroot, especially because BTEP+tmux is a better place for using VIM with a real keyboard.

I can’t hep but think, that my brain is trying to tell me something, when I find myself fumbling with mail.google.com.

In the gmail app on Andera, viewing a message displays the message list off to the side as a fragment. None of that &lt; or &gt; buttons for Android. I’m so used to it now, that in Chrome, I was almost thinking, “WTF where did my message list go?” when I saw the usual “Labels” side bar. Oi vey, I need to stop using PC’s so much!!!!

Right, this is some real bullshit. I stick a DVD of Spaceballs into my computer, and get an ELUA pop up for software from “Sonic Solutions”. It is so bland that I can’t even tell what the fuck program it is for (but Google explains), so you can obviously conclude, I ain’t accepting it with such a bland and faceless ELUA, belonging to bloatware I don’t even need.

But, and the big but is, it notes that it may even include the LAME MP3 encoder, which really pisses me off because they couldn’t even be bothered to decide yes or no for the ELUA  o/.

Sometimes Linus is a genius

When you begin to do more advanced things with subversion (not my idea, trust me), I would have to conclude using tarballs and larger hard drives is more useful than subversion.

For the first 10 years of kernel maintenance, we literally used tarballs and patches, which is a much superior source control management system than CVS is, but I did end up using CVS for 7 years at a commercial company [Transmeta[11]] and I hate it with a passion. When I say I hate CVS with a passion, I have to also say that if there are any SVN (Subversion) users in the audience, you might want to leave. Because my hatred of CVS has meant that I see Subversion as being the most pointless project ever started. The slogan of Subversion for a while was “CVS done right”, or something like that, and if you start with that kind of slogan, there’s nowhere you can go. There is no way to do CVS right.[12]

source: Wikipedia on Git.

Please, for the love of sanity (and science), do not use Subversion…..you have been warned!

Reflections on the ICS / TF Prime craze

In the time frame of like July/August I was rather interested in Android 4.0: Ice Cream Sandwich, as well as the ASUS Transformer TF101 that I’m writing this on :-). During the time since though, I am kind of sick of hearing about ICS. However I will admit that I am glad to be proven wrong by some froathy mouthed visitors to xda-developers, that the TF101 ASUS did decide the TF101 will get ICS. 

In the lead up to the ASUS Transformer Prime being announced, the forum section for the TF101 has to many people geared up to swap their TF101’s out for TFP’s, that you can’t help but remember: it is a techno-geeks paradise! That being said, if I have to hear much more about the Prime, I will frakking smack someone lol. 

When I got my TF101, I had the option of waiting a little while for the Prime or getting the current TF101, and obviously chose the original Transformer. Why? It’s got good enough hardware (arguably better than what I need), and it is better debugged. The platform is established along with at least 4 ROMs: Stock, Prime (what I use), Revolver, and Android Revolution HD. Another has recently began as well. 

Now, my concern is what comes after the Transformer Prime, and whether or not it will be worth the upgrade from my TF101. Hehehe. I really hope that ASUS continues with the Transformer product line for a good while and keeps developing it. Either that, or when I retire Andrea, I will probably have to evaluate between a laptop or a tablet with accessors.

Last night I was playing around with custom launchers on my phone. I have an Android 2.2 based Optimus T, so the onky real thing to gripe about is how the “LG Home” apps draw divides into “Applications” for stuff that came with the phone and “Downloaded” for stuff installed by the user. I hit up Google to learn about the basics and what major players exist; I’ve heard of a few but tried none. The launcher is basically an app that provides your application draw and “Home screens”. Go Launcher Ex, ADW Launcher, and Zeam Launcher are the ones I opted to try. In the end, I settled on Zeam.

Zeam has the feature I wanted most: a sane applications drawer. I don’t need the more fancy features of the other two launchers app drawers, and care little about theming. I’m more interested in performance and productivity versus my phones almost-stock launcher. What really makes for a sweet combo’ is Zeam’s dock. I can place shortcuts in the dock and scroll to the side. I’ve been doing the same thing with my home screens. It’s also convienant to e.g. have Opera Mobile where the Dialer/Phone app usually is: I rarly make voice calls.

Zeam doesn’t have many features and the settings are few and self explanitory: it can be configured inside of ten minutes. So far it is simple, stable, and does precicely what I desire and little more. That’s all anyone can ask for, oh and it’s free :-).

Google Music for Android force closing on playback

I had transferred my music files over to Andrea (TF101) from Alice (netbook), and after getting my invite, I transferred them over the work group to my gaming system, so I could add stuff via the PC media player. So I decided to clear my /mnt/sdcard/Music directory and reclaim some disk space, since I rarely listen to it all and I have other copies of the data.

Pretty much, I ended up with a Google Music app still reporting the local data and force closing on playback, even after stopping the service and clearing the apps data. After a little Google fu to see if it ought to work, I rebooted into recovery and hosed the dalvik cache; one perk of being root.

Now it works perfectly, and I doubt I really need a gig of files laying around so Google Music is an idea I like. Even more so because I tend to listen to radio streams more than I buy music, hehe.

A few thoughts on Polaris Office

Although it’s not a feature I was particularlly interested in, so much as the whole dock+battery life thing, I must admit, the Polaris Office suite that ASUS bundled with the Transformers does add value. Most phones come pre loaded with a lot of crapware, and rarely do I actually use any of the crap pre-loaded on my phone, or Andrea. Generally, I don’t need office suites. I used to use word processors excessively so I focus on those tasks. For years now: my word processing tasks get done in Vi IMproved and converted into a format for publishing; such as HTML for web or PDF for general reading. If I wanted someone else to edit the stuff, I would not send an MSWord file either. Read only data should not be sent as a writable .doc[x] file. I don’t do Power PoinT presentations. What stuff most people do with a spreadsheet, I generally do with Python or Perl; a more natural interface for my brain. In fact, there are only about two times that I really use office suites. If I need to share editing tasks with a bunch of people that are probably technically illiterate or just have better things to do than pick up a suitable format; I use Google Docs. For work, I use LibreOffice. That covers both reading whatever files might pop in from other departments but in eningeering we all pretty much rely on plain or marked up text; it’s really mutt/lynx friendly you could say. Something that caught my eye was a comparason of Android office suites over at XDA, Polaris was clearly a solid product. In my own tests, all I can say is that most Android apps for dealing with rich text formats seriously suck. Examples include Google Docs, Blogger, and Evernote; the last is probably the best unless you feel comfortable dealing in HTML for more stuff. Polaris Office is a really is the only Android app that I’ve seen, that really feels like a “Word processor” and so on. Today however, I noticed that the spreadsheet activity may be useful to me. At work, we have time sheets in Excel template format; I have both an Excel (.xls) and Open Document (.ods) files to use as a template; normally I fill it out using LibreOffice and the .ods version, and print it off my work station. I tried opening both files with Polaris Office today, and noticed while it doesn’t understand Open Document formats, viewind and editing the Excel file works perfectly. Rather than screw with Android+Linux+Cloud Print, I just did stuff off my workstation. Why this surprised me is that Google Docs rather fails at doing the same, for both formats. So the question I would have to ask, is how well does Polaris Office do in generating files that work with other office suites (E.g. Microsoft’s), and ditto for interfacing with Google Docs in both directions. Either way, it looks like the ASUS Transformer is as fully functional as my work station and home PC, but sans binary compatbility (x86, x86_64 != ARMv7) and Direct3D. Someday I can’t help but wonder if we will have Android PC’s powerful enough to run Windows in a Virtual Machine for legacy applications.

Is RSS dying?

RSS Rant

I must agree with most of what the author wrote, and confese I prefer RSS – and would like something comparable that offers commenting. But the security implications of that are probably nightmare’ish to say the least.