// From http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64Bits
unsigned char b; // reverse this byte
b = ((b * 0x80200802ULL) & 0x0884422110ULL) * 0x0101010101ULL >> 32;

June 27, 2010

Resistor Roid: V1 is coming

Filed under: Uncategorized — jon @ 11:36 pm

Just a quick update to explain that since the last post I’ve changed jobs and haven’t had much time to work on anything much. Most of the things on the todo list for the first public release are done and I hope to have it on the market place very shortly.

March 7, 2010

Resistor Roid: Prettier, More Productive

Filed under: Uncategorized — jon @ 1:52 am

Just a few changes I want to mention:

  • Buttons are now based on the default android button, and use setColorFilter(color, Mode.MULTIPLY) to achieve the coloured button effect.
  • I realised I wanted to know the digit while I was entering the colour, and this lead me to thinking that there was no real reason to separate the colour-to-numeric and numeric-to-colour lookups.
  • I bothered to lookup the unicode for the ohm symbol (2126).
  • It has a name: “Resistor Roid” and a logo (based on the official android logo):

The first two bands are simple – just enter the digit regardless of the unit and regardless of whether it’s 32, 320 or 3.2. The third band (the multiplier) is the clever bit. Instead of trying to present a multiplier directly, it shows the end value you actually want. So if you want 3.2kOhm you enter “3″ then “2″ then touch the button which has “3.2kOhm” on it which I think is much more straight forward than “x10^2″ or “x100″.

This is the point where I can really see the application taking shape; and start to assess its value. The UI seems as intuitive in practice as I’d hoped in theory (no substitute for user testing of course) so I’m happy that it’s worth continuing.

My immediate plan to get it ready for the first market release is:

  • Replace that hideous resistor image
  • Use a different drawable to distinguish the gold/silver buttons from yellow/grey. I could probably make some of the other colours clearer too
  • See what IEC 60062 has to say. I can see ambiguities if black is allowed in the first band, but most calculators allow it.
  • Tidy up the internal calculations. There are some things being calculated too often. Ok, so it’s unlikely to be a bottleneck, but this is a mobile app, plus it’s always nice to work with clean code.
  • Implement slide-back, slide-forward to move between the bands.
  • Force portrait mode

After that, these will be top of the list:

  • Add a menu to switch between just colours, just numeric and both.
  • Add five band mode
« Previous PageNext Page »