Monday, February 26, 2018

Addiction - It's an unfair advantage

"You will never know love like an addict and their vice " -- Anonymous 

I wish I had an elevator pitch that was this concise. Anyone who has spent a small amount of time around me will know I suffer from an addictive personality; hear me out, this is a force of good. 

An "addictive personality" is a colloquial or informal term based on the belief that certain people have a particular set of personality traits that predisposes them to addiction and other problematic behaviors, such as drug abuse or gambling . Although it is a fairly common concept, there is no medical or scientific definition of an "addictive personality" or "addictive personality disorder."
The article goes further to define personality traits that can lead to addiction:

Impulsivity, Sensation-seeking behavior, Negative affect, Negative urgency, Neuroticism, Disagreeableness, Narcissism, Aggression. 

  • Impulsive - Check - although I have learned to keep this in check by slow thinking exercises.
  • Sensation-seeking - Check
  • Narcissism - Depends on which of my ex's you talk to
  • Aggression - I am the most loyal friend a person can have, but god help you if we are enemies. 

Since there is no full DSM / Medical definition for this complex it is left to individuals and their practitioners to decide.

Over the years I have suffered from minor addictions, I am biologically wired for novelty and when I find something I love, nothing stops me from becoming the master of my domain. Sprinkle in a constant struggle with Nicotine addiction and I think I fit the bill moderately well.

So why is this a good thing?

Luckily I know where to draw my lines when it comes to vices and substance and have strict boundaries - if it is unhealthy/damaging and I suspect I will like it, I never try it. Sorry meth, maybe in another life.

Some of my friends who have been on this wild ride with me (life) for a few years will know, I swing in body weight by about 30lbs pretty consistently. Why?  Because of addiction. Whenever I find myself getting back into exercise, I don't just dip a toe in and establish a healthy life style, I go whole-hog. 7 days a week, multiple times a day. It's an unfair advantage, I become addicted. Unfortunately for my waist line, I never end up loving it enough to end up with a new long term addiction.

Oh well that is just the eb and flow of life.

Now lets look at how this affects my professional life?

I love what I do for a living, I don't have children, so for me, work is life. Dare I say it sets me, no no no, we won't say that.

It is just an unfair advantage. You can't be my competitor.

You don't get it, do you? 80 hour work weeks? Unacceptable, the addict in me craves 130 hours. I am never off. You are eating dinner with your family, me? I am snorting lines of Soylent Green while developing a new business plan/piece of technology/method of crushing you.

3AM Saturday - Wake up in middle of night to use the bathroom...
- First thought, lets find that bathroom
- Second thought, did I sleep enough so I can return to my work?

6AM Sunday - Is it to early to start sending emails to employees?

11:45PM Tuesday - Why don't these customers work harder and reply at all hours of the day?

12:15PM Thursday - I can't believe people take lunch so regularly, how can they eat with all this anxiety around returning to their computers.

8:00AM Friday - Oh no, must hurry, half of my contacts vanish in a few hours for something they call the weekend, I just don't get it.

How can you compete against someone who get's a dopamine rush from working every waking hour of the day?

I just don't know how to play and relax. Because playing and relaxing is stressful, I can feel the cortisol levels backing up. This isn't good, it makes me angry, I have to return to my work. Just a small hit, I swear I won't abuse it, just one more bump of this drug called power point, maybe a few quick lines of code. I swear I won't use it all up - OK, maybe my inner narcissist it lying... gimme all those PDFs, and give them to me now.

While you are busy burning out, I am getting high on my own supply. Biggie Smalls got it all wrong.

Saturday, February 3, 2018

iPhone X - Comparison of A1865 vs A1901/A1902

There is a lot of debate over the Qualcomm vs Intel modem versions of the iPhone X (and iPhone 8 AFAIK).

The A1865 contains a Qualcomm CDMA compatible modem, and is typically sold in the USA for Sprint and Verizon customers. You can purchase an unlocked A1865 for Verizon at the Apple store for full price.

The A1901/A1902 contains an Intel modem and supports all networks, sans CDMA providers.

Both the A1865 and A1901/A1902 support all global GSM standards.

So why get the A1865 if you don't need CDMA? Well from my speed tests the Qualcomm performed significantly faster in almost all conditions than the Intel modem. My methods of testing were not super scientific. I purchased both phones, plugged in the same T-Mobile SIM card and tested them each one after the other in locations I commonly sit with no WiFi coverage. All tests were inside of buildings around the Bay Area.

Here are the results:

So there you have it, an in the field comparison of the iPhone X Qualcomm modem vs. the iPhone X Intel modem.

Non-measurable performance differences:
- The iPhone X with Qualcomm seemed to perform drastically better in areas with low reception (1 bar).
- The iPhone X with Intel seems to have a slight advantage on battery. When carrying both of them for a few weeks I found the Qualcomm always ended up slightly lower on battery. Many other reviews online claim the Qualcomm is more energy efficient, esp in bad reception. This does not seem to be the case.
- The iPhone X with Qualcomm modem has a much more stable bluetooth connection. The Intel modem version (like my prior iPhone with Intel modem) has issues with BT audio crackling with my Apple Airpods when in a call (happens randomly for a few seconds per call and then clears up).

Favorite Products

Electronics / Accessories

Best travel computer:

iPad Pro 10.5 256GB + LTE with keyboard cover and Apple Pencil:

Bonus: Add a T-Mobile international sim card for $10 a month - 5GB roll over data a month with free international roaming. Never be without a working computer, no need to chase down wifi. Combined with killer battery life, ability to sign/send documents, hand written notes, and side by side multi tasking. There are few tasks that leave me wishing I had a normal computer/laptop when traveling. Factor in it's size, weight, small cable / charger (same as for phone) and it becomes a no brainier. For those who need to present the Lightening/HDMI cable works brilliantly. 

Bonus: Combine this with a short 1ft Anker Powerline Micro USB cable and Anker High Power Auto Charger for a winning combination

Best iPhone X Case:

PITAKA Carbon Fiber (with rubberized coating) case. Includes embedded magnetic plate for above mount. 

Best Battery Pack:

Aukey 20,000mAh Pack with 3 outputs (USB A) and 3 inputs (Micro, Lightning, USB-C)

Best Chargers:
I usually take one of each - The mini charger will do 2.4 amps (I have tested) of total power, this is actually more than the 10w iPad charger. These are almost as small as the included Apple iPhone charger. With international travel it isn't uncommon to only have one good outlet to use to setup a charging station, so I keep the big charger (iPad, iPhone, Battery pack, iWatch) but usually try to weasel one of these guys in near the bed with a long (7ft) iPhone cable. 

My current electronic travel kit:

Inside of a BAGSMART Travel Universal Cable Organizer Electronics Accessories
1 x Anker PowerLine Micro USB 3ft
1 x Anker PowerLine Lightning Cable - MFi Certified 1ft (usually used on plane or in backpack with battery pack)
1 x 1 M iWatch Cable
2 x British Style Plug Adapters (in universal international sockets, these usually stay plugged in best)
3 x random others - usually used as risers out of deep surge bar sockets. 

Friday, January 5, 2018

A simplified explanation of "Spectre" and "Meltdown" security exploits

Lets talk about what programming is at a high level, it is a specific set of instructions a computer must follow in order to complete a task. For my example I will use baking a cake:
  1. Check recipe for ingredients
  2. Inventory kitchen for ingredients
  3. If you do not have all ingredients go to the store
    1. Get in car
    2. Arrive at store
    3. Buy missing ingredients
    4. Travel home
  4. If you have ingredients begin preparation
    1. Combine dry matter and eggs
    2. Stir ingredients
    3. If the oven is off
      1. Turn on oven to desired temperature
      2. Wait for 15 minutes
    4. Place ingredients in pan
    5. Place pan in oven
    6. Bake for 30 minutes. 
  5. Remove cake
  6. Enjoy cake

Normal execution mode

Modern processors have many cores (cooks), think of these cores as miniature processors that can each do their own task or in our example they would represent second cook in the kitchen. 

In order to speed up the execution of requested tasks modern processors begin the execution of multiple steps of work at a time, often the work they begin processing is part of a logical conditional statement (IF this THEN do something). They sometimes get the prediction of the logic statement correct (speculatively) and this will speed up the overall execution time of the task.

In our example it would be similar to having two cooks in the kitchen. At the beginning of the task, we would proactively dispatch one of the cooks to the store, in a prediction that we will need ingredients to bake our cake. This would happen in parallel to the first cook beginning to check the recipe. The assumption (speculation) is if we arrive at the conclusion we are missing eggs, we have already began work on fetching the eggs, so we can get to the step of combining ingredients faster. If our cook who job it is to check inventory arrives to the conclusion we have all of the required ingredients, we tell the second cook who is headed to the store to undo his effort of acquiring supplies (return items to shelf, get back in car, drive back to home). This is called a roll back. 

Speculative execution mode

Modern processors are designed to  pre-process various steps of conditional statements in effort to improve the overall performance of a computer. In order to more accurately predict which decision path they will need to start working on, modern processors utilize various types of local memory about prior decisions to make this prediction via their local cache and BHB (Branch History Buffer). If the last time you baked a cake and you were missing ingredients, they will predict that this time you will also be missing ingredients and take the necessary steps to remedy this ahead of time.

Like all fortune tellers, they don't always get this prediction correct and will need to roll back / or undo their proactive work. In our example they would recall the cook who was dispatched to the store, but they do not purge the prior list of ingredients from their memory. from the last time you tried to bake a cake. Removal of this prior memory would negatively impact the performance of the system, and as such the prior decision/memory persists in the system.

The current security vulnerability takes advantage of the CPU's prior memory state, it allows an attacker to read this data, if the prior state was something like a log in session, it could allow an attacker to obtain privileged information such as a security token or password by accessing this memory that is tracking the current inventory of the kitchen. There is a second level to this attack where the attacker can prime the conditional statement with nefarious code and force the CPU to execute this code out of order in order to take over the system, but this concept is beyond the scope for a high level summary - just know this is where things get dark and dirty quick.

Many people have asked if we (security community) believes this exploit as been known by groups such as the NSA/CIA/FBI, to our knowledge it was not, as this exploit is rooted in the base hardware of the processor and negatively impacts their systems as well. Due to it being a hardware bug, it is exceptionally difficult to patch and control. We strongly feel it would have been reported to Intel if discovered. 

I hope this explanation helps a few of my non-technical friends to understand the reasons why this bug is so serious, as the only true fix is a redesigned/replacement of your computer's CPU (brain chip). In the meantime major operating system vendors (Apple, Linux Community, and Microsoft) are working on software patches that will limit the scope of this bug/vulnerability, but unfortunately the fix will have to disable a key feature that was designed to boost the performance of modern processors, as such it will have a negative impact to all systems that are vulnerable to this attack. Early estimates indicate that the patch for this vulnerability could slow down all computers vulnerable to this attack by 30%. Imagine if your processing task (computer vision/perception/AI) utilized 95% of your systems performance... yup oooops. 

A big hats off to the team at Google's Project Zero for discovery of this critical bug.