Polytechnical Careering

ted@tedneward.com | Blog: http://blogs.tedneward.com | Twitter: tedneward | Github: tedneward | LinkedIn: tedneward

What?

We begin with the question you're all asking:

What the h3ll is "polytechnical careering"?

What?

"Careering"

verb, to manage one's career

(in this case, one's technology-related career)

Polytech Career

Polytechnical

Being a combination of a variety of things, on a variety of things, in technology

Polytech Career

When you are polytechnical...

Polyglot

'Many languages'

Polyglot

The world has always been a polyglot one

Polyglot

The world has always been a polyglot one

Polyglot

The world has always been a polyglot one

Polyglot

The world has always been a polyglot one

Polyglot

Requirements for polyglot:

Polypraeclusio

'Many storages'

Polypraeclusio

"Many storages"

Polypraeclusio

In the beginning, God invented the relational database...

Polypraeclusio

Relational model challenged data store systems at the time

Polypraeclusio

But along came the Internet...

Polypraeclusio

With the advent of the Web, we changed our enterprise apps

Polypraeclusio

The problem is one of load/scale and contention

Polypraeclusio

The problem is one of load/scale and contention

Polypraeclusio

CAP Theorem

Polycrepido

'Many platforms'

Polycrepido

What do we mean by a 'platform'?

Polycrepido

In the beginning, God invented... um...

Polycrepido

Many, many platforms exist today

Polycrepido

Requirements for polycrepido:

Why, again....?

... would I want to do this?

Why

Polytechnical approaches come with costs

Why

Consider the following scenarios:

Why

Solution: from each tool... to each problem...

Why

Logic changes routinely

Solution: Scripting engines/languages

Why

Problems are complex permutations of possibility

Solution: Logic engines/languages

Why

Logic is best expressed by domain experts

Solution: Domain-specific languages (DSLs)

Why

Requirements don't fit one particular paradigm

Solution: Multiple storage tools/tiers/engines

Why

Disparate team with wide range of skills

Solution: Embrace the polytechnical

Why

"It could never work"

Why

Obama's 2012 Election IT Team

Practicum

An example of the benefits of a polytechnical mindset

Practicum

Consider the Haskell concept of a list

  let numbers = [ 1, 2, 3 ]

Practicum

We can do a few things with a list

  let headOfList = head numbers
  print headOfList        {- 1 -}
    
  let lastNumber = last numbers
  print lastNumber        {- 3 -}
    
  let tailOfList = tail numbers
  print tailOfList        {- [2, 3] -}
    
  let takeSomeOfList = take 2 numbers 
  print takeSomeOfList    {- [1, 2] -}

Practicum

We can create a list out of a range of values

  let numberRange = [1..100]
  print numberRange {- [1, 2, 3, ... , 99, 100] -}
    
  let evens = [2, 4..100]
  print evens       {- [2, 4, 6, ... , 98, 100] -}

Practicum

We can create a list out of code

  let otherEvens = [x | x <- [1..10]]
  print otherEvens
    
  let squares = [x*x | x <- [1..10]]
  print squares
    
  let fizzBuzz = [ if x `mod` 5 == 0 then "BUZZFIZZ"
        else
          if x `mod` 3 == 0 then "BUZZ" 
          else
            if x `mod` 4 == 0 then "FIZZ" else show x 
            | x <- [1..25]]
  print fizzBuzz

Practicum

We can even create an infinite list

  let forever = [1..]
  {- printing forever is a bad idea.... -}
    
  let foreverLove = cycle ["LOVE"]
  print $ take 3 foreverLove {- ["LOVE", "LOVE", "LOVE"] -}

Practicum

What a silly idea... Infinite lists

I mean, who ever would have a collection that goes on forever?

What kind of list goes on forever?

Practicum

Haskell calls these infinite lists "streams", by the way

Practicum

What if we had a Java Iterator... without a Collection?

Practicum

An "evens" for-comprehension, in Java

class EvensToAHundredComprehensionIterator 
    implements Iterable<Integer> {
  public Iterator<Integer> iterator() {
    return new Iterator<Integer>() {
      int count = 0;
      public boolean hasNext() { return count <= 100; }
      public Integer next() {
        if (count % 2 == 0) return count++;
        else {
          count++;
          return next();
        }
      }
      public void remove() { }
    };
  }
}

Practicum

Using it in Java

    for (int val : new EvensToAHundredComprehensionIterator()) {
      System.out.print(val + "..");
    }
    System.out.println();

Practicum

How about an Iterator that knows how to read a file?

class FileIterator implements Iterable<String> {
  BufferedReader br;
    
  private FileIterator(BufferedReader br) {
    this.br = br;
  }
  public static FileIterator open(String filename)
    throws IOException {
      FileReader fr = new FileReader(filename);
      BufferedReader br = new BufferedReader(fr);
      return new FileIterator(br);
  }

Practicum

How about an Iterator that knows how to read a file?

  public Iterator<String> iterator() {
    Iterator<String> ret = new Iterator<String>() {
      String line = null;
      public boolean hasNext() {
        return line != null;
      }
      public String next() {
        String result = line;
        try { line = br.readLine(); }
        catch (IOException ioEx) { line = null; }
        return result;
      }
      public void remove() { }
    };
    ret.next();
    return ret;
  }
}

Practicum

How about an Iterator that knows how to read a file?

    for (String line : FileIterator.open("./ItWithoutColl.java")) 
    {
      System.out.println("FOUND>>> " + line);
    }

Practicum

Gong down this path leads you to a number of interesting things... some of which were captured in Guava

... and some of which were captured in Java8

Practicum

But think about infinite streams again for a second

Practicum

But think about infinite streams again for a second

... what if we think about external events as streams?

... and our responses to those events as functions?

Practicum

Congratulations

Practicum

Congratulations

... for you have just taken your first steps to understanding

So... how?

... for the individual

How

Being polytechnical: The "T-shaped" individual

How

Being polytechnical: The "T-shaped" individual

How

Being polytechnical: The "T-shaped" individual

How

Being polytechnical: The "T-shaped" individual

How

Being polytechnical: The "T-shaped" individual

So... how?

... for the manager

How

Being polytechnical: The "T-shaped" team

How

Being polytechnical: The "T-shaped" team

How

Being polytechnical: The "T-shaped" team

How

Being polytechnical: The "T-shaped" team

How

Being polytechnical: The "T-shaped" team

How

Being polytechnical: The "T-shaped" team

Summary

Polytechnical careerism is not easy

But if it were easy, anybody would do it