Saturday, September 27, 2014

The Newest Nexus in the Family

We just got the Nexus 5 (32 GB) that I ordered on the Play Store for my wife, and not surprisingly I'm considerably more excited about it than she is.  That's not to say she's not extremely happy about her new phone, which is replacing an HTC Amaze (ruby) that just went belly up.  It's just that I'm really starting to love our collection of Google Nexus devices.
There's my Nexus 4 (mako) on the top right, the Nexus 7 (2nd gen, flo) on the bottom, and the Nexus 5 (hammerhead) on the left.  Coming soon: Nexus 6.
We've owned a plethora of other mobile devices, including an HTC Touch Cruise, myTouch 3G (aka magic), myTouch 4G (glacier), HTC Amaze (ruby), and a Galaxy Tab 10.1 (p4wifi), which were all misconceived on some level.  The best of these devices was the myTouch 4G, which survives to this day.  The Galaxy Tab was great for a while, but the flash memory is flawed and with no TRIM support (this device should have been codenamed glacier).  The Touch Cruise ran Windows Mobile - enough said.  The two myTouch devices were actually quite good, aside from HTC Sense occasionally crashing.  The myTouch 4G just kept on giving, with a 4.4.4 Evervolv ROM from xda-developers and a stable overclocking to 1.5 GHz.  The Amaze became very unstable, and despite many factory resets and several half-baked ROMs later, went to the phone junk yard (a drawer in the garage).

The Google Nexus devices put the others to shame.  The LG-made devices are particularly good.

Friday, September 26, 2014

Negative Zero and Complex Number Initialization in MATLAB

Background

Floating point numbers have one bit that is used to designate sign, and this bit applies when the value of the number is zero.  This is called "signed zero".  MATLAB hides this very well in most situations, but it does pop up in certain cases.  Recently this came up in a question on Stack Overflow involving complex numbers initialization.

Example

Below is a demonstration of how one complex number initialization syntax can inadvertently create a signed zero.

Create two complex numbers, a and b.  The intent it that both variables have the value (0, -1).
>> a = 0-j;
>> b = -j;
 Extract the real component and verify that they are 0, and that they are "equal".
>> ra = real(a)
ra =
     0
>> rb = real(b)
rb =
     0
>> ra==0
ans =
     1
>> isequal(ra,rb)
ans =
     1
But it's clear they are not equal with this operation:
>> 1/ra
ans =
   Inf
>> 1/rb
ans =
  -Inf
Interesting.  Why does rb clearly have a sign associated with it even though it is not visisble?

Monday, September 22, 2014

NVIDIA Releases GPU-accelerated Machine Learning Library: cuDNN

First cuBLAS, then NPP, now cuDNN (CUDA Deep Neural Network).  Announced on September 7, this is a library for GPU-accelerated machine learning that can be dropped into high-level libraries such as Berkeley's Caffe.  Thanks, NVIDIA!

UPDATE 1: By the way, NVIDIA Performance Primatives (NPP) is an awesome GPU-accelerated clone of Intel's Integrated Performance Primitives, which are pretty awesome too!  Interestingly, Intel is in the process of dropping multi-threading support from IPP.  In all fairness, the strength of IPP is how well it utilizes CPU-based SIMD instructions, rather than how well it exercises OpenMP internally for multi-threading.  The emphasis is now on managing threading at a higher level, such as with Thread Building Blocks (TBB) and Cilk Plus.

Update 2:  DNNs are big business.  In March 2013, the headlines read "Google Has Bought A Startup To Help It Recognize Voices And Objects".

#quickie

Friday, September 19, 2014

How to do Stack Overflow Wrong

Stack Overflow is not just a resource; it can be a game.  A very addicting game, if you really get into it.  Here's how it's often done by those who really "play", but I don't suggest doing it like this if you want to maintain your sanity.

Well, first I want to clarify that I'm not advocating for everyone to just quit contributing to Stack Overflow entirely.  This is more of a parody of Stack Overflow as a addictive online game, which for some people reflects quite accurately how they participate (to the internets' benefit, I should note!).

Assuming you have something approaching expertise in a certain area of programming, say MATLAB or C++, life as a regular answerer on Stack Overflow could easily go something like this (dramatized for effect):
  1. Stalk the new questions section in your tag(s) of expertise.  For example, check the "newest" tab for [matlab] every 1 to 15 minutes, depending on how busy you are.
  2. A question that actually seems worth answering pops up.  Hurray!  [reward]
  3. Quickly, scan the new question.  Mind racing, blood pressure rising.
  4. Can you answer it and how fast?  Standard operating procedure - it's all in the chart:
guide to obsessive stack overflow participation

Before going on, I want to remind that this is a tongue-in-cheek breakdown of the Stack Overflow (hereinafter known as SO) game.  To actually do SO "right", this is a terrible guide.  See Duncan Lock's Smart Guide to Stack Overflow for some good suggestions.  However, as it pertains to the potential for SO be a powerfully addictive pastime, I think the process diagrammed above is pretty accurate.

Monday, September 15, 2014

Catching up on a Decade of Crazy (Science and Society)

A few things of note in the worlds of science and society have happened in the world during the 9 years and 3 months since my blog post post before last.  So, let's recap the most notable events so that blogging of the mundane may recommence:

2005 (post-June)
2006
  • August 24.  Pluto no longer a planet, now "dwarf planet", says IAU.
  • October 3.  North Korea gets nukes.
Team America.
  • December 30.  Saddam Hussein executed.
  • DECEASED: Syd Barrett, Steve Irwin and that Iraqi dictator.
2007
  • World economy begins to implode as the shit hits the fan over sub-prime mortgage shenanigans (and other financial non-sense).  Lehman Brothers and Bear Sterns go under.  Fannie Mae and Freddie Mac nationalized.  AIG and Citigroup bailed out.  Lots of normal people screwed, executives go unpunished.  Thank you, S.E.C. and G.W.B.!

Thursday, September 11, 2014

New Google Hangouts Dialer App Provides Free Incoming/Outgoing Calls with a Data Connection

With an update of the Google Hangouts app to v2.3 and the introduction of the Hangouts Dialer app, it is now possible to place and receive calls using just your Google Voice number and a data connection. I've been eagerly anticipating this capability for a long time, especially since GrooVe IP lost the ability a few months ago.  Did I mention it is free, at least in the US?  It seems like these updates made my wish come true, but there is one thing that I can't figure out.  But first, downloads.

Getting the Updates

Droid Life posted an APK of the v2.3 Hangout, in case the Play Store doesn't give you the update automatically:

    com.google.android.talk.2.3.apk

Naturally Android Police and APK Releases posted their own links.  Take your pick.

Screenshots


Hangouts Dialer
Hangouts Dialer
Incoming call ringing in Hangouts Dialer
Incoming call ringing in Hangouts Dialer




Incoming call ringing stock Android dialer
Incoming call ringing stock Android dialer