Category Archives: Software

Software Architecture and coding

Don't let nosebleed levels of abstraction kill your ability to make leadership decisions!

Facebooktwittergoogle_plusby feather

 

Politicians spend their lives mastering it. Good BS'ers have practiced it for years. It's a great way to make people think you have "senior management potential".

budgetjoke

Abstraction  

  1.  the act of obtaining or removing something from a source : the act of abstracting something
  2. a general idea or quality rather than an actual person, object, or event : an abstract idea or quality
  3. the state of someone who is not paying attention to what is happening or being said : an abstracted state                                                                                   - from Mirriam-Webster

Back in the day I worked for a brilliant manager who had his team meet with 2 PhD psychologists regularly  to practice the latest and greatest theories on effective behaviors and team building skills. During one session we read and worked over "Language in Thought and Action" by S.I. Hayakawa (a U.S. Senator). First published in 1949, it is  considered a classic work on semantics.

My first takeaway was  to recognize conversations moving  from lower-to-higher or higher-to-lower levels of abstraction.  This is critical when making decisions since it is usually easier to move up rather than down yet YOU CANNOT RESOLVE ANYTHING MOVING UP!

Consider making a decision about Betsy, the cow....  cow1

cattle...we can talk about her contributions to our herd of cattle....

....or what a valuable piece of livestock she is but...
livestock

...unless we go the other way, perhaps applying our policies on Livestock to Cattle and Cattle to  Betsy,  we can expect a courteous and politically correct conversation  but CANNOT ADD DECISION VALUE on what to do about Betsy.

Unfortunately my experience is that  1) resolving problems  2) recognizing opportunities and 3) defining strategies happen at lower levels of abstraction (often the lowest).

"We're customer oriented"  detail-devil1

"Innovation is the lifeblood of our Company"

 "Lets make America Great Again!"

"It's time that we move from good words to good works, from sound bites to sound solutions"

"It's irresponsible to question the science of climate change"

Software indirection

Abstraction layering (implemented as indirection) has driven Software development productivity to grow exponentially by allowing us to label and manipulate "cumulatively all that went before". But even in this virtual world, constructs of the mind have limitations.


Good stuff, BUT going lower often makes conversations more confrontational, especially when stakes are high.  My second takeaway is that it is ALWAYS helpful to rebuild trust by moving up the abstraction ladder. Stating COMMON GOALS AND DESIRES rebuilds confidence that we're still on the same team. This leadership trait is demonstrated spectacularly in Apollo 13 by Jim Lovell when the crew is getting frayed from rapid-fire life and death decisions...

Jim Lovell (Tom Hanks): Gentlemen, what are your intentions?

[Jack Swigert and Fred Haise turn around and stare at Lovell]

Jim Lovell: I'd like to go home.

They did too.

 

" You've got to be careful when you're talking about reality"    -- my friend Ed Hudson

Facebooktwittergoogle_plusredditlinkedinby feather

I've Been Hacked!

Facebooktwittergoogle_plusby feather

wordpress-hack

On August 20, I recieved an email from my hosting provider (www.Arvixe.com) saying they deleted something bad from my directory and I was likely part of a phishing scheme. When I went to the website every page  said:  "hacked by Hwins2005"    Bummer....

So here I am on August 23 after 20 hours of deep dives into WordPress,  (opening more PHP files than God intended), a bit of Apache, every tool CPanel offered and I'M BACK!  I still have a ticket with my provider which is making it's way up the queue.

This is a record of those lovely hours. I hope it is helpful for anyone that has to go through it.  First however is the emotional aspect... it is a mini version of a feeling I had many years ago when my house was broken into.  A feeling of invasion, violation of personal space and anger. People have this feeling  and it is why privacy is manifesting itself politically, whether it's the NSA, Scott McNealy's 2009 quote: "You Have Zero Privacy Anyway. Get Over It" or Facebook data-mining your friends to  get a better credit score on you... GET THE F*%$ OUT OF HERE!

So here's what I did:

TRY TO FIX THE EXISTING SITE

  1. Read about the first 6 or 7 search items on "WordPress Hacked"  (half were advertisements)
  2. Logged into wp-admin and realized that my backup settings were not scheduled and my backup was months old (while fearing I was doing something bad by logging in)... more Bummer
  3. Ran a backup because the searches said to
  4. Downloaded a malware plugin and ran it ( $ to get the fix-it plugin)
  5. Deleted that plugin then downloaded and ran another ( $ to get the fix-it plugin)
  6. Ditto for that plugin
  7. Spent some time cruising WP directories and opening files hoping for a hail mary
  8. Gave up
QNAP Storage Server

Qnap NAS Storage Server

ABANDON THE EXISTING SITE AND REBUILD ON A STAGING SITE

  1. Decided to build a "staging version" and was always intrigued what the performance of a WordPress stack would be  on my QNAP TS-419U II NAS
  2. Built a clean MySQL/WordPress/Apache stack on the QNAP and the
    performance SUCKED (minutes to do  single digit second tasks on my hosting provider)!
  3. BTW I'm a BIG fan of QNAP and their hardware/software. This server has a Marvell  2GHz single core processor and it just wasn't up to managing the RAID as well as the WP Stack.
  4. Before the hack I was moving my trading  code (C#.Net, C++, Amibroker and Matlab) to the cloud using virtual machines in Virtualbox mixing Win7 and Centos.  I intended to automate the configuration and provisioning with Vagrant.
  5. Great stuff but  realizing I was getting far away from fixing my blog,  I Gave Up ( ummm..... more like postponed to  fix the specific, instead of the general problem  )

TRY TO FIX THE EXISTING SITE OR REBUILD AT THE HOSTING PROVIDER

  1. I started running phpmyadmin browsing the SQL tables and removed a bunch of users, changed my admin account Usernames and Passwords and the character code from UTC-7??? Back to UTC-8.
  2. Deleted (not just de-activated) all plug-ins except the most basic.
  3. Without a terminal on CPanel to "grep" my way through all the WP files I kept wondering how long it would take to build a diff tool to compare my site to the WP release on GITHUB. Then I found Anti-Malware and Brute-Force Security by ELI.  I installed and ran it.
  4. The plug-in did not find the problem but gave me about 10 suspect files. I opened them with the CPanel editor and pasted the current GIT versions.  When saving, the editor informs whether anything changed, two files had changed.
  5. The site and pages still redirected to the "hacked by Hwins2005".  I figured if my php files were cool there must still be issues in the javascript
  6. I deleted my Theme and reloaded it
  7. I'M BACK

Whew....   probably saved $250 to have someone clean it for me but I learned alot about WordPress' architecture and improved my CPanel and overall web stack chops. I'll be attempting to harden things more going forward.

Cheers,

virtualbox       vagrant   centos

Facebooktwittergoogle_plusredditlinkedinby feather

Disassembling Software Architecture

Facebooktwittergoogle_plusby feather
modelt

Disassembled Model T - Henry Ford Museum

I've been time traveling after seeing a great O'Reilly Video by Mark Richards on Software Architecture Patterns http://goo.gl/vAQloM. He includes some well thought out metrics as well.

Mark describes 4 of the 5 architectures in his book(s):
1) Layered
2) Event Driven (brokered and not-brokered)
3) MicroKernel
4) MicroServices
5) Space Based

I remember the early days of IC design (70's-80's) when product ideas became components in future products (the engine of exponential growth). The 1T DRAM, 6T SRAM, PLA's, ALU's started out as chips on boards but eventually were microcoded together to create a microprocessor, then SOC etc.

In the mid 90's I saw Mr. Silicon Graphics and Netscape Jim Clark (I consulted with Jim in 1983 when his "Geometry Engine" ran slower than simulation) at a Stanford Hot Chips conference. He forecast...

1) "We used to build small/consumer products by cost-reducing components for big systems"

2) "In the future we will build big systems from cheap components developed for small/consumer systems"

He spotted the pattern.

After the video I compared Mark's 5 patterns to  "Software Architecture in Practice", Bass et al,  a Stanford U. early 00's Software Architecture class textbook.   Chapter 18 of 19 is "Building Systems from Off-the-Shelf Components". I'm struck by how software architecture has moved from case studies to building with off-the-shelf components Just like early IC's.

Fast forward to the mid 00's when I ran a SaaS company warehousing chip measurement data. The product started with a 3-layer architecture (browser + "big ball of engine" + OracleSQL). We bogged down trying to add new features. How do we dis-assemble and re-factor the engine while the car is in the race?  A recent piece by Mat Stine at http://pivotal.io/ pointed to two recipes from SoundCloud http://goo.gl/nluAmU and Karma http://goo.gl/HpUOSp . Nice to see my problem dis-assembled 10 years later.

TAKEAWAY: BUILD SIMPLE SYSTEMS FROM SIMPLE STANDARDIZED BUILDING BLOCKS. Unless you're on the bleeding edge of speed, the benefits over a product's lifecycle outweigh any monolithictarball  approaches appear to bring. For you scrummy, lean and agile folks, kludge a prototype but don't evolve a prototype into a platform.

George Whitesides does a TED talk http://goo.gl/YGd6ta about the same idea (importance of building complexity from simple building blocks) to build pieces of paper that diagnose diseases... Same movie different actors...

So there... at the "right" level of abstraction you can re-factor West Side Story into  Romeo and Juliet by changing the UI.

The Connection Machine

The Connection Machine -space based architecture

 

Facebooktwittergoogle_plusredditlinkedinby feather

Hardly anything hard to say about "The Hard Thing About Hard Things"

Facebooktwittergoogle_plusby feather

HardThingI recently read Ben Horowitz's book "The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers",  it was great!  I've read alot of management, marketing and strategy books but  I can honestly say it is the only book I've read that captured any of my experience as a CEO or being in the inner circle with a CEO in a startup. 

Einstein once said of his friend Kurt Godel http://en.wikipedia.org/wiki/Kurt_G%C3%B6del that his mere existence brought him happiness. I can say that about this book.

Ben captures five things that are integral to the role yet is never portrayed in the happy crap "small big company with freedom and payouts"  media and journalism stuff...

1) Impossible odds and running out of money (again)

2) Peacetime vs Wartime CEO

3) Firing / laying off friends

4) Lonely decisions (esp:  People Choices)

5) Overwhelming Guilt

Start ups are hard... it helps to be naive... why do people do it....  not all do...

Facebooktwittergoogle_plusredditlinkedinby feather

Mythical Man-months, Microservice Architectures and a Million Developers

Facebooktwittergoogle_plusby feather

farm-workersWatching a presentation on scaling microservices by Adrian Cockcroft http://perfcap.blogspot.com/  Adrian mentioned Twitter had over 1M developers using their API's. DEVELOPERS, not API calls or Apps using the API's etc. WOW!

So when Fred Brooks published "The Mythical Man-Month" in 1975 (MUST reading for all managers esp tech) he described solving the people scaling problem at IBM using clever team designs. His "Perfectly Partition-able Task" (like picking corn or strawberries) stuck in my head (I read it in the early 80's) as a framework ever since.

The gist was that teams working on complex systems had a communications/coming up to speed burden proportional to (N^2-N)/2 , where N is the number of team members (developers). So if we can scale "Dev Ops" unbounded using these architectures, I believe we have a tangibly different world than the words "big data", "cloud computing" or scalable software captures.

Partitioning tasks changed the size of things we built in the physical world... pyramids, Ford's assembly line, etc. it will do the same for what we build in the information world. A much bigger deal than many recognize...

Facebooktwittergoogle_plusredditlinkedinby feather