Cautiously optimistic on the pain front

This morning, the intense pain I had in the left hip is almost completely gone. I can sort of feel it lurking at the edge, but it’s not actually causing me any pain. The other, more familiar pain in the right hip has been fading slowly over the last two days and I think it will be away (on vacation) quite soon.

In much, much better news, my shoulder is doing better. A little while ago I blogged about how hopeless I felt because when I did my physio exercises, I’d be in pain for 3 or 4 days afterwards, which meant I wasn’t doing them often enough. A day or two later I saw my doctor and he did something where he had me lying down on my back and he reached under me and pushed his fingers into the base of my trapezius muscle and pushed down on my shoulder. That very day, I did my physio exercises and wasn’t in pain the next day. So I erged a bit that day, and I wasn’t sore the next day. So I did my physio, etc. After my business trip (where I didn’t do my physio or my erging, although I did try to stretch), the pain was starting to come back a bit, so my physiotherapist suggested that I just lie down on the floor with a tennis ball under my back, and relax and let my shoulder come back down to the floor. I’ve been doing that (although with a dog toy rather than a tennis ball, because that’s what I have to hand), and it helps a lot, although not as completely as what my doctor did. It might be time to start seeing a massage therapist again. But meanwhile, I’m erging!

Well, that wasn’t as easy as I’d hoped…

In my job, I often have to make accommodations for the security desires of my clients. That can be a massive pain in the ass, but it’s better than working in an office.

So when I started this new job, I worked on my Linux box and my Mac laptop, with a massive preference to my Linux box because it’s got two nice big monitors, a really nice clicky keyboard, and I have all the ergonomics dialed in. I had Postgres running on both systems already for other purposes, and it wasn’t hard to install the software we were using as the base system on both. I kept the software in sync between both of them and the client’s dev server using git. Everything was beautiful. For accessing things like time sheets and corporate email, as well as connecting to their dev server, I had to use Citrix, which was a minor pain, but fortunately I didn’t have to do it very often.

But then the client said “oh, that test database we gave you has real employee ids and the like, and so we need you to take some security precautions with it. Specifically, you need to turn on full disk encryption on your laptop, and purge the copy of the database on your desktop.” It took a bit of work, but I managed to get it so that my software would still run on the Linux box and connect with PostgreSQL on the laptop over an SSH tunnel, and so I’m in compliance with their wishes – I do have to remember to shut down the test server on my Linux box and the SSH tunnel before removing my laptop from the LAN, but that’s ok. That’s what you’ve got to do in this brave new work of computer security.

But now we’re entering a new phase of the project, where my code has to talk to a web service that a different group at the client site provides. And that web service is only available inside their firewall. That gives me a few choices for development:

  1. Do my local development without benefit of the web service calls, “comment them out” or the equivalent, and only test them when I “git pull” the code down to their dev server. Not a great option, because the code I’m testing locally is even further away from their code.
  2. Write a dummy web service on the Linux box or my laptop or both, and use that for testing. Probably feasible, but more trouble than I’d like to go through.
  3. Get a VM on their site where I can do development and testing both.

The last option is probably the easiest. It also means I can get rid of my copy of their database, and therefore get rid of full disk encryption on my laptop (which means no more typing my password every time the display blanks). The downside is that the VM will probably be Windows, which is nowhere near as nice to do development on as Linux or Mac, especially if you don’t have admin privs and so you can’t install the stuff you like. (I’m guessing I can’t install Sublime Text, not sure even if I can install gvim.) The real clincher is whether I’m going to be able to install a version of the base software or not, because if I can’t do that, I can’t work. If I can install it, then I probably can work that way – it’s a simple as that.

But if I’m going to do that, I’m going to want to log in from Linux because of the ergonomics I mentioned earlier. I’ve been using my MacBook Pro (or even this shitty Dell laptop I have for testing purposes) to log into Citrix because I didn’t want to install the Citrix client program on Linux. But needs must, etc. I looked on the Citrix web site and they have a .deb “for 64 bit Linux”. I downloaded it and clicked on it, and it said that it needs to install 246 other packages to satisfy dependencies, including 32 bit versions of nearly every major library out there. Sorry, Citrix, that’s not my definition of a version “for 64 bit Linux”. Ok, I thought, I know a way around this! I’ll install a 32 bit version of Linux in a VirtualBox VM, install the Citrix client in that, and use that to log into the work site.

Well, that turned out to be an adventure in itself. Mostly because I’m using Kubuntu (which is Ubuntu with KDE instead of the god-awful Unity Desktop), which is a little too resource hungry to run in a VM. So I was installing vanilla Ubuntu, Unity Desktop and all. But there was something weird about Ubuntu – I would install it and it was fine, but then it would download the required security updates, and suddenly the “VirtualBox Guest Extensions” stopped working and they refused to re-install. And what that means is that I could share any directories between the host OS and the guest, and more importantly, I couldn’t get the guest to expand to use the entirety of my beautiful 2560×1440 IPS monitor. And that’s a deal-breaker. I tried installing from scratch, and I tried using a pre-built Ubuntu image, and both times if failed after installing upgrades. But I tried a Debian pre-built image, and that worked fine, even after installing upgrades. The only drawback of Debian is that they don’t have proper Firefox, they have their weird-ass IceWeasel browser, which lags way behind the current version of Firefox. So I had to install real Firefox from a tar file, which is like a throwback to the bad old days of Slackware. But that worked fine, and the Citrix 32 bit client installed without any drama, I was able to log into Outlook and Putty on the client side, and so I’m ready for when they get the VM set up for me.

First thoughts on the Nexus 7

I got a Nexus 7 for Christmas. This was something I’ve been thinking about for a while – I wanted to see what the state of the art of Android was, and maybe start developing some apps for it. I haven’t done any benchmarking or measurements, this is just my subjective experiences and some comparisons with my iPad 3.

First off, appearance.

It doesn’t feel as well made as the iPad, and the plastic back makes it seem cheaper. I haven’t checked the specs, but it also feels thicker. I’m told it’s half the weight, but if you asked me I’d say it was nearly as heavy – maybe it’s just denser or something. However, the device is a very nice size. You can hold it in the palm of your hand with your fingers on both sides of the screen, as opposed to the iPad which you hold from one edge. It feels like a very good size for portability. It fits in your hand nicely, and it even fits in the back pocket of your jeans (just make sure you don’t sit on it). The screen isn’t as beautiful as the retina display on the iPad, but it seems good enough for watching movies and web browsing. Both devices have adequate battery life, and I don’t have to slavishly remember to plug them in every night like I had to with older generation cell phones, which is all I really care about. Which one has 9 hours of battery life and which one has 10 hasn’t really made an impact on my life yet.

Secondly, user experience.

If you just care about getting stuff done, I can see the appeal. I turned it on, put in my Google credentials, and just about everything set itself up. I didn’t have to set up or re-log in to Gmail, YouTube, Google Plus, Calendar, Google Play, etc. It all just worked. That was pretty cool. I’ve had no need or desire to connect it to another computer.

On the other hand, the default widget set, which are used by lot of the apps including Google’s own apps, are ugly as sin – flat, boxy, unshaded, untextured, visually unappealing. I’d say whoever designed them has spent way too much time using the Xt X Toolkits Intrinsics widgets on Unix, and that’s probably showing my age. There is also a lot of inconsistency – for instance, it was sometimes a bit of a hunt to figure out how to refresh a screen in different apps – sometimes it was the “getting more common all the time” pull the screen down and release it, sometimes it was a circle icon in the middle of a bunch of other icons near the top, and sometimes it was something completely different. Unlike iOS, where if you’ve got a small popup on top of a bigger display, tapping outside the popup will dismiss it, in Android apps you often have to use the “Back” button on the bottom of the screen.

On the other hand, the fact that the “Back” button works across different apps is the most awesome thing ever. I wish iOS has something similar. In iOS, if you’re in one app and you tap something that opens a web page in Safari, it’s a pain in the ass to get back to the original app – I think that’s why so many apps open web pages in their own UIWebViews. In Android, you just click the “Back” softkey and you’re back in the original app – and it even takes care of closing the tab in Chrome that it opened. Very cool. And it appears to chain across multiple apps as well. To me, that’s a good reflection of the Unix philosophy – if you make it easy to get stuff from one app to another, you don’t have to make one app do everything.

Another indication of the Unix design philosophy is that appears that there is less sandboxing between the apps, and so, for instance, Dropbox can see all the files on the device. If you click “Upload Here” you can see the equivalent of a $HOME directory and all the files below it. And your ebook reader app can read books directly out of your Dropbox. I can see the advantages of this, but I can also see the drawbacks of it. I think it was Dennis Ritchie who said that “Unix doesn’t prevent you from doing something stupid, because that would also prevent me from doing something amazing”. I wonder what Android does to prevent these apps that have access to each other’s data from modifying each other’s data, or from stealing information they shouldn’t be seeing. I guess that’s a question I’ll have to answer when I start doing some Android app programming.

Update: I forgot to mention this when I first posted this, but there are a couple more things I really like about Android. The first of these is the menu that comes up when you swipe down from the top right corner. It puts a couple of things that I need to access far too frequently, like wifi settings and airplane mode, way more handy and accessible than they are on iOS. The notifications (accessible from the top left corner) are also, I believe, somewhat better than iOS. As a matter of fact, they’re almost as good as the notifications on WebOS, which I think are still the best I’ve ever seen. I also like the way the keyboard has that built-in “Swype-style” thing, although I suspect that’s more of a gimmick than a really useful feature. I also like the way it shows a couple of autocorrect choices. Too bad it (the keyboard, I mean) looks so damn ugly.

Houston, We Have A Problem

In the two weeks that I’ve had this device, I’ve had one minor freeze-up (where everything stopped working, including the off button and the volume buttons) for 30 seconds or a minute and then it started working again, and one major freeze-up (where everything stopped working, including the off button and the volume buttons) for several minutes until I could walk up stairs to another computer and Google how to do a hard power off. Both times it happened, I was using the Facebook app. To me that’s a major red flag – an application should not be able to make the OS unresponsive, no matter how badly written. (And my experience with the Facebook iOS app and the Facebook web page is that Facebook stuff is *very* badly written.) I’ve had a few app freeze-ups with iOS, and I can recall using the hard power off a time or two, although as far as I can recall it was when I was moving from one wifi network to another (a constant problem in this old plaster and lath house), which iOS has had problems with in the past. I wasn’t doing anything of the sort when Android froze up – just sitting still putzing around on an app.

Where am I going with this?

Well, my overall impression is that for things where functionality is more important than a beautiful user experience (like a phone), I could easily transition to Android and I’ll certainly look at both Android and iPhone when my next contract renewal comes along. I’ve often wished my iPhone had a bigger screen like a Galaxy Note II. On the other hand, for day to day tablet use, I think I prefer the user experience and beauty of the iPad.

As a long time Java developer, I’d like to try my hand at Android development. I worry about the lack of compatibility between different Android platforms and I’ve heard that professional Android development shops will have dozens if not hundreds of Android devices to test against. On the other hand, I have a feeling that the future of app development is exactly where Steve Jobs said it was when the iPhone first came out – HTML5 and Javascript, with whatever you want on the server side.

I’ve seen people using a Nexus 7 as a navigator in their cars. I’d love to replace the piece of shit navigation system that’s built into my car, but to use a Nexus 7 I’d either need to tether my phone or get a Nexus 7 with 3G. Either is probably more money than I need to spend. I think I’ll stick to the Garmin app on my iPhone.

Design iteration

I have a web page that shows a bunch of data (trouble tickets) on different tabs.

In the first iteration, I was doing a ton of queries at load time, and building up the content of each tab using Perl Mason. Tabs that had no data on them were not even created on the page. There were three problems with this:

  1. It took a while to load the page
  2. Any time you did anything that would change the tickets that are on the page (like resolve or reassign one of them), I’d have to totally reload the page.
  3. You’d probably have to occasionally reload the page to see if anybody else had done anything that would cause more or fewer tickets to appear on one of your tabs.

In the second iteration, I changed it so each tab would only load itself when you clicked on it by making an AJAX call. This did wonders for the speed of the initial page load, you’d see the latest and greatest information on the tab when you clicked on it, and if you resolved or reassigned one, it would repopulate just that one tab. As an added bonus, I added paging and sorting to each tab. I was happy about the paging and sorting. The biggest problem is that I couldn’t hide the tabs with nothing in them, because I didn’t know there was nothing in them until you clicked on them. I didn’t like that.

In the third iteration, I added an argument to the AJAX call that would allow it to just return the count of tickets in the tab, instead of actually returning a page’s worth of tickets. This is fairly fast. So now when it goes to refresh tab “B”, it makes simultaneous ajax calls to get the count for tabs “A”, “C”, “D”, etc. This means that tabs that have no tickets are disabled, giving you a good visual indication of which tabs you need to look at. Also, any time you interact with the page, in the background it’s checking to see if any of the other tabs need to be enabled or disabled. I’ve checked in Firebug and it’s apparent that it does all these other tab count AJAX calls while the “repopulate the currently selected tab” AJAX call is processing, so it’s nice and fast. I’m pretty happy with this.

Next iteration would probably be to add some searching or filtering.

After that, maybe using a WebSocket or periodic polling to see if anything has changed instead of only refreshing when you interact with it.

Today in technology

A week or so ago, I bought an Auria EQ276W 27″ IPS Monitor – this is one of those very high resolution IPS monitors you read about, but instead of having to buy them from dodgy unknown companies on eBay like the “Catleap” monitor that everybody is raving about, it actually comes from a brick and mortar store with branches all over the country. It is the brightest, sharpest, most beautiful monitor I’ve ever owned in my life. I haven’t been this excited about a monitor since I bought a then top-of-the-line Iiyama 17″ semi-flat CRT monitor.

The monitor needs either a dual-link DVI or DisplayPort to drive it at the full 2560×1440 resolution. The nVidia GeForce GT430 video card I bought when I bought this motherboard has dual-link DVI and HDMI output, and the on-motherboard video has DVI, DisplayPort and HDMI outputs and I was sort of hoping that I could hook up both of my existing 21″ monitors to that, and maybe buy another one of these monitors in the new year and drive it off the DisplayPort, but it appears that when you have a video card, the onboard video is disabled and can’t be turned back on. However, I was pleasantly surprised that the HDMI port on the GeForce card still works, so I can still have one of my two 21″ monitors working. There is a second PCI-X slot on the motherboard, so there is still a possibility of having a second one of these lovely 27″ monitors some day.

There are still a few flies in the ointment. Every time I have to reboot the computer or just log off and log on again, I have to re-tell Kubuntu that I want the left monitor to display its own stuff, not a rehash of the first 1920×1080 pixels of the big monitor. The weird things is that when I check deep in the bowels of the .kde directory, I can see that it has saved that xrandr setting, but then when I log in it doesn’t seem to get applied. Also, every so often when the screens go to sleep, only the small screen will wake up again. Which is inconvenient, because the menu bar with the log out button is on the big screen. So far, every time it’s happened I’ve managed to wake it up again by hitting shift-control-F1 to switch to one of the virtual terminal logins, and then hitting control-F7 to switch back to the graphical screen, although last time I had to do this several times before it woke up. Oh, and I should mention that the monitor’s own on-screen menu won’t show up if it doesn’t think there is any input signal, which is stupid because one of the functions of the on-screen menu is to switch which input signal it should be looking for if it doesn’t manage to auto-detect it.

Another tech thing comes with living in an old plaster and lath house. My wifi base station puts out two signals, the conventional “Tomblin-Robinson” (TR) on the normal frequency band (2.4GHz?) that 802.11b, g and n all share, and the higher speed “Tomblin-Robinson-5G” (5G) which uses the 5GHz(?) band that only 802.11n uses. I prefer to use “5G” one because it’s noticeably faster, but down in the dining room, both bands show one or two bars of signal strength, but they’re actually unusably slow. And Vicki uses her laptop mostly in the dining room. So I installed a “wireless repeater”, which picks up the signal in the library, and repeats it. It creates a new network called “Tomblin-Robinson-EXT” (EXT). I’d prefer not to use it, because every packet it sends out has to be picked up by the repeater, and sent out again on the TR network, and then the base station sends it out to the internet, and then the response comes in, and gets sent out on TR, then picked up and repeated on EXT. So the presence of EXT slows down RT and EXT, and using it slows them both down even further. If there was only a way to run a wire from the base station to the repeater, the slowdown would be less, but there isn’t any way to do that in this house. But seriously none of this would be a problem if in the dining room, the TR and 5G networks would just show 0 bars instead of 2 bars, because then my laptop and iPad would automatically switch to EXT when they needed to. But instead, I have to manually switch between them, and I usually only remember to switch when I’m sitting at the dining room table wondering why my Weight Watchers app is stuck in “Updating Points Tracker”.

My work project, which is currently being done in Perl, looks like it’s transitioning to Python and Django. That’s great, because I’ve been looking for an excuse to learn Python. A few weeks ago O’Reilly Books was having an ebook sale and I bought a couple of Python books. I was amazed that O’Reilly has an option now where for delivery they’ll just drop it in your Dropbox, because that means that they can update it when they want. Unfortunately, it turns out that the Python books I bought are all for Python 3, and Django only supports Python 2. So it’s off to find older versions of those books or other books that still cover Python 2. (And I wonder how long it will be before somebody writes a book about the Django framework with the word “Unchained” somewhere on the cover?)