Quotes

U.S. Senator John McCain and Former USN pilot, U.S. Naval Academy Commencement Address, 1993

Posted on

“As ensigns and second lieutenants, the character of the young sailors and Marines entrusted to your care will be formed in large part by their appreciation of your character. You are where leadership begins. You are the models who stand just past the sergeants and chiefs, and those under your command will derive from your behavior the direction of their own lives. Their firm respect for you, on which their lives and our security will depend, will be determined by how faithfully you keep, on duty and off, the code you learned here.

I will go to my grave in gratitude to my Creator for allowing me to stand witness to such courage and honor. And so will you. My time is slipping by. Yours is fast approaching. You will know where your duty lies. You will know. God bless you. Semper Fi. Fair winds and following seas.”

– – U.S. Senator John McCain and Former USN pilot, U.S. Naval Academy Commencement Address, 1993

USNA-Pete- Bakke

SEO

How to become a consultant in SEO for the first time

Posted on

[Cross post from Quora]

I’d make sure you know what you are getting into. SEO is complicated and multifaceted. You need to be qualified to work for clients. I’d start with the following guidelines and afterwards, search for other free guides and tutorials and consume them all: The Beginner’s Guide to Search Engine Optimization from Moz

The next step is to gather all the tools you’ll need to be successful. Check this out: World’s Best SEO Tools and Free Search Software

As far as salary goes, it has a large range, mostly based on your experience. If you have no experience, but know enough and have the tools, I’d suggest getting some SEO projects done so that you build your experience and confidence. Check out Upwork, the world’s largest online workplace for freelance gigs.

SEO-Peter-bakke

 

Digital Marketing

Black Hat SEO is a bomb waiting to explode

Posted on

Quora question: Can an on-page SEO and off page SEO with backlinks and social signals alone be enough to skyrocket your site or do you also need a marketing campaign as well?

It sounds sketchy. Backlinks and social signals ONLY sounds a black hat SEO strategy. I’d suggest you never do this for a client. The risks are stratospherically too high. Buying cheap backlinks and social signals is easy on sites like BHW and Fiver. I would never do that for clients. In the new world of SEO, content rules as do REAL backlinks and social signals. The search engines have won. Get over it. Else you may build up a site for a few months and then Google Seach’s AI catches up with you and that site drops like a ballistic missile. Don’t chance it.

Data Analysis

State data within a Python Class definition

Posted on

From my procedural language days, state data was easier for me to understand than in some OOP languages. It took me a while, for instance, but I finally got the syntax correct below for creating a local state variable within a Python class here: [the solution was to create the var “self.count” with the _init_ method below… not as ‘count’ but as ‘self.count’ and referenced as such elsewhere]


class Classy(object):

# PAB: note that I added self.count and referenced it elsewhere in the class methods.

def __init__(self):

     self.count = 0

     return

 

def addItem(self, item):


# Python's version of a CASE statement:

    if item == "tophat":

        self.count += 2

    elif item == "bowtie":

        self.count += 4

    elif item == "monocle":

        self.count += 5

    return

 

def getClassiness(self):

    return (self.count)

# You’ll get the following error if you don’t add (self) to all of your Class def methods:

" ... takes no arguments (1 given)"

python-logo-Pete-Bakke

Data Analysis

Combinatorics problem

Posted on
  1. You are given a ten piece box of chocolate truffles. You know based on the label that six of the pieces have an orange cream filling and four of the pieces have a coconut filling. If you were to eat four pieces in a row, what is the probability that the first two pieces you eat have an orange cream filling and the last two have a coconut filling?

(given, O = orange, C = coconut) :

P(OOCC)

= P(1st is orange) * P(2nd is orange) * P(3rd is coconut) * P (4th is coconut)

= 6/10 * 5/9 * 4/8 * 3/7

= .6 * .556 * .5 * .429

= .0716

Follow-up question: If you were given an identical box of chocolates and again eat four pieces in a row, what is the probability that exactly two contain coconut filling?

  • Step 1 involves a combinatorics problem of 4 choose 2 to determine how many combinations of oranges and coconuts we can obtain given 4 pulls from the box :

= 4C2

= 4!/ (2! * (4-2)!)

= 24 / (2 * 2)

= 6

This is equivalent to the following six combinations:

CCOO, COCO, COOC, OCCO, OCOC, OOCC

  • Step 2. In the first question above, we learned that the probability of pulling exactly 2 coconuts in 4 pulls from the box is the same at pulling exactly 2 oranges as well and we can see that the probability is the same for all 6 combinations of Os and Cs.

Therefore, the probability of pulling exactly 2 coconuts

=  4C2 [see step 1 above] * .0716

=  6 * .0716

=  .4296

Digital Marketing

Are all my Digital Assets Secure when a key person leaves my organization?

Posted on

If you lost access to your business emails at this moment, what shape would your business be in? In the digital world, email accounts and passwords are now the “keys” to your business kingdom. Share them sparingly and covet them fiercely.

Do not have your team sign up for vital online services using their individual emails. The business manager’s email, say freddie@acme.com, may seem adequate and safe, but it is not. Most likely, only Freddie has access to that email and therefore all the business-related digital properties and services are tied to it. Instead, maintain a generic company email account and password for Internet services which can be accessed by several people by using a service such as LastPass.

For company-wide use, create something like web@acme.com to access your vital online services such as website hosting and merchant accounts. If Freddie the business manager decides to leave the company, perhaps in a huff, all you have to do is change one password and your business’s online accounts are secure. And please make your passwords non-trivial. Use an app like Norton’s free Password Generator to create tough-to-crack passwords. Don’t worry, LastPass will manage all the wacky passwords for you.

If your company is large, you can create several categorical email accounts like webDev@acme.com,  webAnalytics@acme.com, and webFinance@acme.com depending on departmental responsibilities. In this scenario, each password should be different across functional areas.

You get the picture. No matter what scheme you come up with to keep your digital business organized, make sure your emails and passwords are current, secure, and backed up, else you may face days of unnecessary fear and dread when Freddie the business manager decides to quit his job to work for the competition or join a rock band.

As a modern-day King Richard might cry at such a predicament, “My Kingdom for all my business-related email passwords!”

Fare thee well.

Data Analysis

U.S. Healthcare Associated Infections ( HAIs ) using CDC public data

Posted on

I just finished my @CDCgov data story about Healthcare Associated Infections ( #HAIs ) using D3. These infections are particularly nasty as they are antibiotic-resistant. I’ve created an interactive map of the U.S. with the total number of infections per state and the rate of infection per 1000 people for the latest available year, 2014. If CDC funding continues to be cut, it is unknown when the next HAI updates will be made.

Check it out here: http://www.peterbakke.com/bits/cdc-hai/

Image: CDC
Data Analysis

Excel and .csv lesson learned… Includes painful waste of time, unfortunately.

Posted on

I found out that when you export data in .csv format from #Excel make sure you don’t have a trailing space after any column names. They are exported as “col_name ” with the space AND quotes. Beware when using them to index your array! They will fail. Simply delete any hidden spaces in your column names before exporting. Please. For your own sanity. #DataAnalytics #ERROR #painful lesson.

Peter Bakke DOH!

Data Analysis

Debugging Javascript – one useful tool

Posted on

Here’s an idea for displaying those pesky ephemeral variables that come and go like ghosts in JavaScript. Check this out. I
want to know if I’m reading in a CSV file properly or not. You can use for any variable / array / object.

<script>

// Read in a .csv file
d3.csv(“../datafile.csv”, function(someData) {
debugMe(someData);

});

function debugMe(whateverData) {

// ‘Sum Ages’ is a variable in row zero of passed var ‘whateverData’
document.getElementById(“debug”).innerHTML = “Debug: ” + whateverData[0][‘Sum Ages’].toString()
}

</script>

<p id=”debug”></p>