Wednesday, March 23, 2016

Da' Truth!!!

So, there I am; innocently driving our ferret back from a veterinarian visit when what in my wondering ears should echo???  The ranting, irritating, disingenuous voice of Sean Hannity on our local AM radio station.

Now, I am neither liberal or conservative; neither republican or democrat.  I am a proud independent.  That stated, never have I listened to the Sean Hannity show when something was said that didn't make me giggle because of...  well...  Here's what I heard on the trip home from the vet...

Sean is ranting about how President Obama and Hillary Clinton were both "friends" with the Reverend Al Sharpton;  how Reverend Sharpton is a rabel-rouser, a firebrand, an agitator.  Those things, I just don't know and honestly don't really care.

Here is what made me LOL...  One of the voice tag lines for the show had something to do with the "Truth";  something like "Only the Truth!" or something like that.  OK...  Still don't care...  but then the LOL hit.  According to Mr. Hannity, the President and Ms. Clinton both "Kiss Al Sharpton's Ring."  Really?  I mean, did they kneel?  Were they all sitting?  Did they bow?  Was it one-on-one or a threesome?

Mr Hannity???  Pictures?  "Only the Truth" but you say they kissed his ring?  Do you have a reference for this?  Can you prove they kissed his ring???

Years ago these type of radio shows irritated me.  Now they simply provide my inner child with comic relief.  Keep talking!!!  I need the laughs!

Friday, March 4, 2016

Break-Even Performance/Cost Evaluation of Two Computers

So, my cheapie motherboard is on it's way and still waiting on my Pine64 to be shipped.  Hmmm...  I have been wondering how I can evaluate which platform will get me the best 'bang for the buck.'  Well, the main job of these machines is to use ImageMagick and maybe some other image utilities, to comb through hundreds (or thousands or millions) of photos and identify meteors.

So...  I start at total system cost.  A complete Pine64 should cost about $40 (inclusive of processing board, flash drive and power supply).  A complete, low-end AMD system using an AMD Dual-Core Ontario C-70* processor  (from NewEgg) should cost about $85 (inclusive of motherboard, processor, 4GB RAM, flash drive and power supply).

I want to evaluate which is a better value based on the amount of time required to process the same 100 images through the same processing steps.  It is really a pretty simple calculation; just required me to open some cranial doors to past algebra classes...  Those door hinges were rather creaky this morning. :-)

The calculation is simple and based on the ratio of  costs; in this case, 40/85.  Let's say the Pine64 requires 10 minutes to process 100 images.  For the AMD solution to be a better bang for the dollar, how many minutes should it take on the AMD platform to process the same 100 photographs?  simple...  10 * (40/85)  or 4.705 minutes.  Any longer and the Pine64 is a better deal.  Any less and the AMD solution is better.

And...  by inverting the ratio, we can solve how many minutes are required by the Pine64 to have a higher performance; 85/40.  Let's say the AMD requires 5 minutes to process 100 images, then 5 * (85/40) = 10.625 is the breaking evaluation point.  If the Pine64 takes less than 10.625 minutes, it is a better deal.

So...  Some algebra...
p1 - Price of system 1
t1 - Time to perform a process on system 1
p2 - Price of  system 2
t2 - Time to perform a process on system 2

t2 = t1*(p1/p2)  - use if t1 is known and looking for t2
and
t1 = t2*(p2/p1)  - use if t2 is known and looking for t1

If the real world results are less than or equal to the above results of t2 or t1, then that system is better in terms of performance/cost.

Now, back to something a bit more simple - website migrations, SQL optimizations and thredifying single thread processes...  oh boy oh boy.

* - Processor and Board Disclaimer - Yes, I know the AMD C-70 is an older, less powerful processor.  That, however, means that available motherboards are quite inexpensive.  Plus, the power consumption of the C-70 is really very low - big plus.

Thursday, March 3, 2016

OMG! News Flash! SalesForce & TITSUP

HAHA  OH MY GOD!!!  Thanks goes out to Simon Sharwood and The Register for this article about a Salesforce Outage.

I simply MUST quote their update:
"One of Salesforce.com's European instances is enduring a lengthy un-planned PITSTOP incident – that's a Partial Inability To Support Totally Optimal Performance, a whit below our other status indicator of a Total Inability To Support Usual Performance or TITSUP."

HAHAHAHAH!!!!!  OH MY!!!!  TITSUP!!!!!  Never have I seen TITSUP and Salesforce on the same page before.  SO apropos, So right.  Thanks for the Thursday morning laugh!!!

**Disclaimer - I am not a fan of Salesforce, its abysmal development environment, its incomplete programming language APEX, its poorly thought out data structures and generally the whole Salesforce concept and system.

Wednesday, March 2, 2016

Oracle VM VirtualBox - Just a Misleading Error Message

Three weeks of fighting a "cold from hell" gave me time to think about my little project to automate a search for meteor photos.  Sure, I have a PINE64 on order.  Sure, it may be delivered later in March.  Sure, there may be a flavor of Linux available for it sometime soon.  Sure, I may be able to build ImageMagick and other tools I need for the Pine64.  Sure, the performance may be acceptable for my goal.  Crap, no planned PXE/net-boot planned.

What if...  Let's see...  a complete Pine64 compute node with 1GB Ram and the OS on an 8GB flash drive will cost roughly $35 accepting a lot of "maybe" assumptions.  Let's remove the assumptions and calculate the cost of a good old AMD or Intel processing node.  Looks like a 64 bit AMD based system with 4GB RAM, with PXE boot will run about $85.

So...  I decide to emulate a 32 bit Debian text-only install on an Orable VM Virtual box using 4GB Ram to sort-of emulate the AMD solution.  Which gives me an idea for a new word...

umulate - An emulation that is not exact; allowing certain differences for the sake of brevity or simplicity.  "I am going to umulate this Debian install; the real machine will not have a hard drive, but will boot from a flash drive."  But...  I digress...

BUT SMACK...  An error pops up from Oracle Virtualbox when I try starting the virtual machine...

Failed to open a session for the virtual machine DebianPNode.

Under "Details" it read...

VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)

Well, after some research and comparing this virtual machine with the operational virtual version of Debian, I arrived at a repair that seemingly has nothing to do with the error.  I changed the Base Memory for this Virtual machine to 3072 GB and SHAZAM.  No more error.  Keep in mind, my machine has 8 GB and runs a pretty lean install of 64 bit Windows 7.  Why this misleading message popped up, I have no idea...  but reducing the Virtual machine's Base RAM fixed the problem.

Friday, February 19, 2016

Teaching an Old Dog New Tricks.

Regardless the age of an old programming dog, new tricks are pretty important to learn.

My initial success with night sky photography with my Canon EOS Rebel T3 tumbled in my mind over the last few days.  Recorded remnants of a thought from a few years ago popped up when searching an old personal hard drive...  An automated search for meteor photos.

Well, I was nearly there.  After spending a few nights with ImageMagick and some meteor photos, I built a basic recipe to find meteor strikes in night sky photos.

Hey, I thought...  I have a PINE64 on order.  Wouldn't that be cool to make one of these tiny ARM based computers comb through photos for meteors?  Ohhh...  With a little thought this could be easily scalable.  What about controlling my camera with one of these PINE64 computers?  Maybe a loosely coupled cluster of these $15 computers to search these photos in different ways?

I needed a control language for this; something interpreted and not terribly complex.  It only needs to be able to run shell commands, copy files and talk to MySQL.  Lua had my vote until I tried MySQL.  After two hours of trying to make it work on my Windows 7 computer, the necessity for a different language became apparent.  Sorry Lua.

A buddy of mine at work likes Python.  My daughter learned a little Python at college last year.  Python is a language specifically being ported to the Pine64.  The memory footprint of Python is larger than that of Lua but should work fine in the constrained environment of the Pine64.  MySQL Connector was easy to install and setup.  After a running a few little trial scripts, I was convinced Python would be my control language for this little project.

So, over the last week or so, this old dog has learned a few new tricks; and he is enjoying it!

Saturday, February 13, 2016

First Dark-Sky Photo! May have a new Hobby!

After reading a little bit following a few frustrating attempts at dark-sky photography, I think I might just have a new hobby!

Actually came out better than I thought it would.  Orion, Gemini, Cancer and Canis Major are all obvious.  The star cluster M44 is easy to see and with a little squinting, M67 is there. 

Some fine tuning is still necessary - the focus is still not as sharp as I would like and less trees would be nice.  Our backyard is an OK spot for now.  Getting the focus properly set and fine tuning a few other things just might let me see some decent objects down to 7+ magnitude or maybe even more dim! 

Photo date/time: 2016-02-12 at about 2248 Central Time. 
Camera: Canon Rebel T3
Lens: EF-S18-55mm f3.5-5.6 IS II
Focal Length: 18mm
ISO: 1600
Aperture: 4.0
Exposure: 25 seconds
Tripod: Super cheap (and I mean CHEAP) Targus from Walmart.

What is my goal?  I want to see meteors!!! 

Astrophotography - might just be a cool little hobby!

Monday, February 8, 2016

Adventures with a free PC and Linux

Many people do it...  In many parts of the world, dumpster diving is a profitable undertaking.  As a matter of fact, I knew someone in Los Angeles years ago who made some nice cash by simply checking out local dumpsters, cleaning her finds and selling them on Craig's List and E-bay.  Most of her finds were clothes, fashion items and artsy collectibles.  Me???  Back in my college days I could regularly be found snooping around dumpsters for electronics items.  Some of my best finds from years ago include an oscilloscope, several televisions and a shortwave radio receiver.

Well, even now when I see something interesting in the garbage, I simply can't help myself.  A few weeks ago my wife and I were driving to the local grocery store.  In the parking lot of the grocery store is the local community dumpster where people occasionally toss their unneeded electronic items.  The local waste disposal company hands that stuff off to an electronics recycling company...  Unless someone gets it first.  On that rainy cold January day I grabbed a soaked Dell Dimension E310, Dell monitor and an Epson printer.

"Sure, honey!  I bet I can get that stuff to work!"   She just looked at me sideways, smirked and nodded her head.

After a few weeks of drying, I cleaned everything up, applied electrical power and SHAZAM - up popped a Windows XP logo.  She Works!!!

Sort-of...  The installation of XP was messed up; likely due to malware.  It was SLOW, booted erratically and generally did not behave like a healthy computer.  What to do...  My wife wanted a computer to browse the internet and handle email; basically something to replace her laptop until we can afford a replacement laptop.  Me; well, I would like a separate computer to let me brush up on C.

This computer fit the bill.  It only has an 80GB hard drive, 512 MB RAM with an Intel Pentium 4 processor running at 2.8 GHz, but that should be able to handle these undemanding tasks, right?  Well...  It depends.

I didn't want to waste time repairing and/or reinstalling Windows XP, so I decided to install Linux. My first two choices were Ubuntu and Debian.  This wasn't because they were especially fast or known for performing well on older, under powered machines.  These were selected because they were mainstream distributions and...  I already had installation ISOs on my work computer from a previous project.

First up...  Ubuntu.

I burnt the Ubuntu 14.04.03 installation ISO to a flash drive and installed it flawlessly, albeit slowly to the Dell.  After install, the little TP-Link WiFi USB dongel worked easily.  Basically, the install worked but was SLOOOWWWW.  I was not used to the Ubuntu desktop and honestly is was not intuitive for me to navigate.  Where is the control panel?  The settings?  Fading windows and sliding controls aren't necessary here.  How the hell do I shut them off???

There was no desire in my blood to google every little question I might have about this installation.

So, not happy with the interface and performance provided by the default Ubuntu installation, I decided to try Debian Jessie (8.3.0).

Quick lesson here - when using the Universal USB Installer program from pendrivelinux.com, remember to format the flash drive before copying a new installation ISO over a previously copied installation ISO.  Not doing so caused all sorts of problems.  Debian wouldn't install and regularly complained about a missing kernal image or problems installing GRUB.  Subsequently trying the Ubuntu install caused both installs to get tangled; I saw some Debian install options on Ubuntu reinstall attempts!

At any rate, after finally, successfully installing Debian with the XFCE desktop,  all was almost good.   Performance was decent and XFCE navigation was intuitive and complete.  Supposedly my little TP-Link USB dongel should have worked but didn't.  So, after a little research I downloaded, built and installed a new driver and...  drum roll please...  After spending only $15 for power and VGA cables and a lazy Sunday afternoon, my wife has a temporary computer and I have something to mess around with and brush up on my C... with operational TP-Link WiFi.

Hurray for dumpster diving.!!!