Pages

Perfection and Details 28 December, 2023

I spend time on tasks all day long. When attempting to be as complete and polished as possible on a task, it's easy to get too far into the details. The time spent on a small detail of a task can overwhelm the allotted time for the whole task and put more pressure on following days. How can you tell if too much time is being spent on a specific detail?

If you've spent enough time tuning a detail that you're pausing to ask if it is good enough, here's a question to ponder. Is the detail critical to solving the overall problem? If not, go back to the larger task. Here's an example.

I create capacity plans for engineering teams. The real task and overall problem is to understand how much work teams can take on. At one point in my process I found myself calculating holidays and adding it to the equation. Accounting for this could make capacity more accurate. This was a detail of the overall problem. The overall problem was to understand how much teams could take on. There were so many variables in the small details that the general velocity of the team was lost when compared to every other detail taken into account. Visually, you can see the difference in how much time was being spent on a detail vs the overall problem.

Focusing on certain capacity details led to spending time on this way of thinking.


While these kinds of details can be important, they are important to questions about why capacity is what it is instead of answering the overall question of what future capacity is.


This second graph speaks more to what future capacity will probably be than the previous more comprehensive calculations.

More examples of perfection and details could be in my normal workflow. How does the perfection and details issue affect your tasks?



Evolving 1-on-1s 28 February, 2018



A few years ago, teams where I work made the move from semi-annual performance reviews to having 1-on-1s every two weeks. Don't let the benefit of meeting frequently overshadow the fact that you can have bad or unhelpful 1-on-1s.

Everyone should have some idea of what to expect in a 1-on-1. Here some things I've learned.

1 - Figure out how each peer, team member, direct report, and leader is different. 
Understand what is important to them. These differences should be available to you at any time. If you’re not sure how to start, find out what the most recent book they’ve read is. That will tell you a lot.

2 - Negotiate personalized goals.
Although it is great to have team goals, most of the growth in people will come from personal goals. Some people may not even know the good that goals can do for them. Create goals for where they want to be as well as where you see their potential being. These goals should be easily available to both you and them. Goals should have a great deal to do with super-boss theory. Caring about the future of the business and the person equally.

3 - Understand expectations of each other.
No matter the roles of each person, there should be an understanding of what each person expects of the other. It is very revealing what some will limit or expand their expectations to.

4 - Always be upfront about excellent or poor.
It is much easier to have this steady and trusting line of communication than to ignore it for a long time and then have someone shocked when they are asked to set a goal, improve, or try something different. There are few things worse than thinking you're doing great and nobody caring to help you know otherwise.

5 - Be cognizant of the time each person needs.
Some people will only want 20 minutes. Others will need an hour. That is okay. The more that people trust you and feel like you care enough to make time for them and listen, the better.

6 - Understand the non-technical roadblocks.
Something I recently learned is there is a big difference in a person saying they can’t do something and they won’t do something. This can also give you insight into their state of mind. Some are willing, others are afraid to try, some really dislike change.

7 - Informally follow up between 1-on-1s
You can send a note to people between 1-on-1s as a non-intrusive reminder of the most recent 1-on-1. This helps avoid scenarios where action items were discussed in a 1-on-1 but nobody remembers until the next meeting.

Whether you’re running it or being invited, I hope you have a few more helpful ideas going into your next 1-on-1.

Arguing and Alignment 26 January, 2018

Often in a company or team, there is an individual that does a great job of shouting the loudest. Sometimes groups rely on someone being very opinionated in order to make a decision. If you find yourself in this kind of situation, your group may not be aligned towards the same goals or strategy.

Probably the biggest indicator that this is happening is the loss of priority of an idea because its advocate is not there to defend it. It means that the members of a group aren't aligned on what the most important things are. This is a different manifestation of the classic company values test. If you publish a list of company values, and there is laughter or mocking, the values won't affect the work.

What can you do to help combat this problem? Here are some ideas.
  • Before you publish a strategy, make sure all your influencers are aligned with it.
  • Make sure your organizational structure supports the strategy.
  • Be transparent in what teams are excited about, and what teams are alarmed about.
  • Make sure everyone has a way to propose ideas and be heard.
  • Teach everyone some strategy fundamentals.


The Pitch 28 February, 2017

The Pitch

Most people think of a pitch as a rehearsed reason someone gives when they need help making a new idea come to life. I think it should be recognized more widely as a good way to communicate in business. People should be pitching much more often than they are.

Here are a few situations that I think it applies to.

  • Hackathons
  • Raise Meetings
  • Feature Requests
  • One-on-One Meetings
  • Team Meetings
  • Planning
  • Anything you're working on - What if someone comes up to you and says "That looks interesting. How will it actually help us?"

Here is a simple way to organize a pitch. Be able to explain the following.

  • A problem that exists
  • Why the problem matters to the listener
  • How you're trying to solve it
  • Why your idea matters to the listener

Give it a shot.

Sprint Length Heuristics 31 January, 2017

If you're thinking of changing your sprint length, but aren't sure if you should run shorter or longer sprints, here are some heuristics that I've observed. First, I'll give you some background on what I've tried.

At a previous startup, we had 1 week sprints. That worked fine at a startup because everyone did everything. Devs were devs, but they were also client services, designers, DBAs, and devOps. Later, while working at a more established company, we ran three week sprints because there wasn't a pressing reason to change. Let me rephrase that last comment. The established company was used to running sprints like every other established company and 'best practice' was equivalent to whatever was in standard training materials. Now, after switching from a Kanban style (for reasons I won't discuss here,) I am back to 1 week sprints. I feel like that's currently the best match for the company I'm at.

I understand that there are trade-offs in the sprint length that is chosen. So I'll get on with the actual heuristics I'm using to set my sprint lengths.


<------------------------------------------------>
SHORTER                                             LONGER
smaller feedback loop                       You know your strategy
Forces you to break up issues          Priority of features doesn't change often
You may be reactive                          You're just starting out and going with historical opinion


I hope you can use this scale to better match up your circumstances to an appropriate sprint length for your company.

Growing from 360 Reviews 18 September, 2015

  Improving in your career is often difficult. Most of the time, people won't tell you what you could be doing better. What's worse, as long as you're doing okay in some area, you have no idea that you're just okay. Being mediocre doesn't elicit response or comment. There's also been a growing trend to focus solely on strengths and not on weaknesses. I understand their arguments, but it's still damaging when a person doesn't know they are weak in an important area. Obviously, based on the title of this post, I'm describing problems that 360 reviews aim to solve.

  I've been toying around with 360 reviews, and like them. From a tools perspective, there are probably many out there that do a great job. Unfortunately, it can take a great deal of time to investigate several solutions, especially if you need to contact the companies, or pay upfront without seeing the systems in action. I wasn't able to find one that I could easily try without signing up, so I created one.

  Take a look at CircleStats. It facilitates the 360 review process and presents the results in a very visual way.


  If not for your team, you should at least know if there's a discrepancy between how you think you're doing in an area, and how others think you're doing in that same area. If taken with a grain of salt, you can learn more about how you're doing from 360 review feedback than you can in talking to peers, direct reports, and managers, even if you talk often.

Pattern Recipes 10 March, 2015

Patterns are mechanisms that invoke an instant understanding of what's happening. At least they're supposed to be. In many scenarios, devs pause blankly for a moment trying to remember what processes that pattern name is supposed to represent.

I wonder if how we index software development patterns is one reason that many people don't remember and use them more often. For example, the Visitor pattern obviously implies that something goes and visits something else. Presumably this happens for decoupling reasons, but other than these basic assumptions, I can't really derive from the pattern name what the pattern really does, or what an optimal use case for it is.

I'm going to propose better names for several well known patterns. The names are longer, but I believe they do a much better job of explaining the pattern. I'll also give a tweet sized explanation. I call these pattern recipes.

Encapsulate a Task == Command
Make an object that can run a task, maybe even undo the task it ran, etc.

Register for Notifications == Observer
Registering and unregistering for notifications by letting an object call a known methods on you.

Algorithm delivery truck == Visitor
Visit me and run an algorithm or method on my data.

Composition over Inheritance == Strategy
Add behaviors by adding objects that encapsulate those behaviors.

Choose Implementation at Runtime == Factory
A class that manages creation, teardown, and resources of related implementations(subclasses).

Choose Implementation Groups at Runtime == Abstract Factory
A class that manages creation, teardown, and resources of implementation groups(factories).

Adapt One Call to Another == Adapter
With API mismatches, create a class that can converts data and bridge any mismatches.

Hide Complex Behavior == Facade
Make code easier to read and use by encapsulating more and hiding dependencies.

Template == Template :)
Like a mix of facade pattern and using an interface or subclasses
one easy call exists, which runs some more complex code.  when that one simple call is running, there is the possiblity for it to ask some subclass or implementing class whether it should execute certain steps.
the simplest version is just a superclass and set of subclasses.
the more complex version then may or may not run specific parts of the complex code.

Mix Composition and Inheritance == Bridge pattern
By using both inheritance and composition, you can decouple more
if you have a long chain of subclasses, try keeping some as subclasses and turn others into a strategy of those subclasses
it also helps when you are mixing and matching classes instead of a Cartesian number of classes, you have just the number needed to represent different objects/behavior instead of objects X behavior.

Prototype == Prototype pattern
A polymorphic version of the copy constructor
deep copy an object in hopes of avoiding lots of init-calc code to recreate the same object

Add One Piece at a Time == Builder
Use if there are too many combinations for constructors...
return self to keep calling setters

Linked Wrappers == Decorator
Create a class for each attribute, rather than for all combination of attributes

Iterator == Iterator
separate algorithm and structure traversal from data container

A Tree with Branches and Leaves == Composite
Treat individual objects and groups of those objects in a similar fashion, like trees with branch and leaf nodes
interface -> both individual and group
this lets you iterate over a mixed hierarchy of this kind smoothly

Reuse Object Parts == Flyweight
Reuse the immutable parts of objects to save memory

I Know My Options == State
An object can change its behavior by changing its internal state. At a simple level, an object knows its state and the options for getting to a new state. Specifically, its state points to different subclasses of some interface dynamically during runtime.

Proxy == Proxy :)
Exactly what it says it is... it sits in front of some class, both the class and proxy implement the same method. The proxy can limit, change, or do whatever it wants to the call. It probably implements all the same methods as the class it is acting as proxy for. no changes to the original object are needed

Push the Problem Up the Ladder == Chain of Responsibility
Several classes that can handle a specific but different case to a problem all implement an interface. Each of these handlers knows about a sibling handler it can pass the problem to if it can't handle the problem.

Language Interpreter == Interpreter
Uses the composite pattern along with a context(parsing) class to process language.

Middleware == Mediator
When objects want to interact, a mediator can encapsulate this activity if there are too many relationships between objects.

Remember States at Points in Time == Momento
Snapshots, some managing class(could store a list of states) that interacts with some state class.

I hope this helps you remember what patterns really mean.

How People Learn Software Languages 28 March, 2014


The idea of a polyglot developer is quickly moving from a state of imagination to a state of reality. I 'm realizing that although there is immense job security for those who know what they are doing in a single language, there are several real benefits to being competent in several languages. 

Some benefits include cross pollinating patterns and faster tool creation. However, I believe the biggest benefit is removing the thought constraints a person can have when they limit themselves to only using one language most of the time.

For many languages, it's not the syntax-sugar a language can have, but their ability to answer questions like "What if I didn't have to...?" or "If I wasn't focused on this area of the problem, would I see a different solution?" 

So, how do you go about being competent in several languages? I recently surveyed a number of software developers, asking them what they prefer to do when learning a new language. This is what I heard.
  1. Always start by coding
  2. When you get stuck, follow an online tutorial
  3. For all the details, read a spec or the official book
  4. To keep it fresh in your memory, submit/merge pull requests in that language

Here are some techniques that were listed by survey responders.
  • Only use what you’re learning (immersion)
  • Start a new project
  • Understand the wrong way to use it
  • Learn it at your own pace
  • Be able to apply each thing you learn
  • Like it
  • Practice it
I wish you the best of luck on your road to polyglot serenity.

SOLID - What It Means For Your Code 14 January, 2014

The SOLID acronym is fairly well known, but the phrase it represents seems to be the only well known part of it. It's a set of letters representing techniques for creating maintainable code. What I've done here is give a brief explanation of each solid principle, followed by a short explanation of how you can apply that principle to your code.

Single Responsibility Principle - Each object should have one responsibility, the granularity of which depends on future changes. Develop with the current feature set in mind and using small objects. The first time that code changes, you'll have a better idea about what the single responsibility should be.

Open/Closed Principle - The goal is to keep the number of code changes low. Requirements will change, but the less code you change, the easier regression testing will be. If a code change requires enough testing that it bothers you, you probably need to adapt the code to be more open for extension and closed for modification. You probably can't always follow this principle, but you can segregate the "open for modification" part while trying to keep it small.

Liskov Substitution Principle - Subclasses and superclasses should be able to run interchangeably without breaking the system. Precondition and postcondition consistency across these objects is a key to avoiding bugs in substitutable types.

Interface-Segregation Principle - Code shouldn't depend on something it doesn't use. If you find you are changing or implementing unused methods, break up whatever you are inheriting or abstracting from.

Dependency Inversion Principle - When you depend on an abstract class, a change in one class has a lower chance of forcing a change in dependent class. You don't need to create an abstraction for every kind of object up front because most abstractions never get a second implementation. Often it is better to wait until the need for a second implementation arises, and then create an abstraction.

Kotter's Steps to Change: A Case Study 08 November, 2013

Recently I've witnessed a change in management. With these management changes, came ideas on how work could be done differently to produce some fantastic results. After everything was said and done, there was an interesting division in the group. Many people liked the old way, and many people liked the new way. Regardless of whether the change was a good thing, I thought it would be interesting to use this experience as a case study for change.

John Kotter has taught leadership courses at Harvard, and is known for an eight step process for bringing about change. These eight steps need to happen in the outlined outlined order. Here are the steps.

Kotter's 8 steps What I observed
1Create urgencyCuriosity/excitement/fear of management changes/new vision
2Form a group of advocatesNew hires under new management
3Get the vision rightWe can be the best...
4Communicate to get buy inHappened hour by hour
5Empower actionBudgets/Autonomy were given
6Create short term wins???
7Don’t give up???
8Work changes into the cultureThis happened early in the process

So, did it work? Many people are now onboard with some general dreams of improvement, but the division I mentioned still exists between those who were for the change, and those who were against it. In this example, three things diverged from Kotter's process:

  1. It is debatable if there were short term wins
  2. The short term wins that existed were not observed by everyone
  3. Overall culture changes happened to early (before the benefits were seen)

It would seem that for this case, John Kotter was correct. I believe that if the three points that diverged from Kotter's process were done as he outlined, the change would have been embraced by most people, and there would be no division.

Here are the takeaways:

  • Short term wins are necessary
  • They need to be seen by everyone
  • Culture can't change until they come
Make sure these steps don't go awry, and you'll see your changes take place with the lowest amount of pushback.

Mobile apps: Native or Web? 18 October, 2013

We usually write web apps in order to sell a product. Often the web app is the product or service we sell. At some point, the question will probably arise: Should we write native mobile versions of our web app. Here are some obvious pros and cons for native mobile apps:
Pros for native apps
1 - Launching an app is usually easier than navigating a browser
2 - You don't have to login every time
3 - You don't wait for script or content downloads, just network calls

Cons for native apps
1 - Apps are harder to update than websites
2 - Development other than web is required (more $ and people)


Under certain circumstances, these pros and cons might not matter. You may be able to save a bookmark on the home screen. Your browser could remember login info for you. Your scripts could be small. You could have continuous deployment. Depending on your site complexity, performance may be the same. Point #1: Not all your users will know-how/want-to/be-able-to bookmark, login, or buy fast devices. Native mobile apps make sense when you are targeting these time-sensitive/budget-conscious customers. That's the customer-resource based reason.

Now, let's look at the rising-competition based reason. Because of the increasing sophistication of browsers and js libraries, a lot of web apps look really good. What then, differentiates your product from a competitor's product? Besides price and the actual idea or feature set, there is UI and UX.

Design is a differentiator. If you believe that good design matters and want a good design, you will have to ask yourself how custom or dynamic your design should be. It's how real and usable things can look. Pixel level UI control is how that's accomplished. Companies have tried to fix this in the web. There's been ActiveX, VML, Browser DirectX, DOM Manipulation, Flash, and Canvas. These were aimed at getting more UI/UX control, some with good frame rates.



So, let's compare UI/UX control on native apps to that of the web using the most direct control mechanisms that users have access to: Canvas Web Elements vs. Custom Android UI Components. Both have pixel level control, but only one is available to every device running that platform. Canvas doesn't work with some browsers, but Custom Android UI Components work with every Android smartphone. Point #2: If you need the extra differentiation in your UI/UX, get more pixel level control. Native mobile apps make sense when you need to differentiate your UI/UX more.

Eventually, mobile OSes will get ironed out and browsers will improve. Everyone will be on fast mobile devices, and have fast connections. Until then however, many native apps just feel awesome when compared to their web counterparts. The only question right now is whether that awesomeness will draw sufficient users to interact with xyz more than a standalone web experience. Hook up some analytics, and you'll get an idea of how you should proceed.

First Impressions: Dart (DartLang) 02 May, 2013


Dart is a language that can compile down to javascript. It also will make command line apps that run in a VM. It has some nice language features, including with being able to write javascript with compile time static type checks. It also includes DOM manipulation based on selectors. I might use this language for some tools.

Tools

Dart tools are pretty good. The Eclipse plugin had an issue, but the standalone Dart IDE worked great. I had no issues with the stand alone version's logging, warnings, errors, running, or auto-completion.


Speed

It's not fast.


Database Access

Fourth party support is needed for database drivers. By this I mean that DB vendors don't have Dart drivers and there is a small amount of support for third party support for the third party vendor drivers.

Intermingling Static and Dynamic Types

int a;
var b;

Implicit String Evaluation

int a = 5;
String b = "I have $a apples";

Underscores Control Visibility

//private:
int _i;
//public:
int i;

Everything is an Object

5.toString();
1 however is not == true

One Line Functions

//Instead of:
int add(int a, int b) {
  return a+b;
}
//You can do this:
int add(int a, int b) => a+b;

Function Parameters Can be Default / Optional

int add(int a, int b, [int c]) {
  if (?c) print(c); //c was passed
}add(a:6, b:2);

Closures

void main() {
  var f = add;
  f(2,3);
}
int add(int a, int b) {
  print(a+b);
}

Typecasting

Typecasting in Dart is a little different. You use the as keyword:
(someObject as Animal).eat();

Shorthand for Caller reuse

Meet the Cascade Operator.
class test {
  func1() {print("in 1");}
  func2() {print("in 2");}
  func3() {print("in 3");}
}
void main() {
  var t = new test();
  t..func1()
    ..func2()
    ..func3();
}

Easy Object Construction

Observe the absence of a constructor body, yet x gets set.
class test {
  int x;
  test(this.x);
}
void main() {
  var t = new test(6);
  print(t.x);
}

Constructor Delegation

Non-verbose constructor delegation.
SomeClass.myDefaultConstructor(x, y) : this(x, y, 0);

The Factory Keyword

There is a factory keyword to designate constructors that will not create new objects, even though you are using the new keyword when executing the constructor
factory Person(String name) {
  //Get a person from cache and return it
}

Implicit getters/setters

By default, getters and setters exist for all class variables. Extra ones can be created like this:
class Person {
  int baggageWeight;
  int personWeight;
  int get totalWeight => baggageWeight + personWeight;
}
void main() {
  Person p = new Person();
  int total = p.totalWeight;
}

Operator Overloading

A great return from C++.
class Person {
  int age;
  int operator +(Person p) {
    return this.age + p.age;
  }
}
void main() {
  Person p1 = new Person();
  Person p2 = new Person();
  p1.age = 20;
  p2.age = 30;
  int total = p1+p2;
  print(total);
}

Annotations

Dart annotations are easy to declare. They're just classes that usually start with lower case characters.
class asdf {}
@asdf
class Person{}

Name Spacing

You can use the as keyword to alias some package you've imported
import package:a/lib;
import package:b/lib as img;

The library and packaging system

So this is a little different than Java/C++ packages/headers
Libraries: The code part of a package that uses library and part keywords to modularize code for a package.
Packages: A package is a config + Library. The config lets you to define dependencies of a package using a Pubspec file (yaml).

Threads (Futures & Isolates)

Futures allow you to run callback after a Timer or thread(Isolate) has completed or erred out.
Isolates(Threads that are isolated from each other) are just functions passed to spawnFunction(). They can talk to other threads using send(), receive(), and call().
import 'dart:isolate';
import 'dart:async';
go1() {
  port.receive((msg, reply) {
    print ('i got $msg');
  });
}
Future go2(){
   Completer completer = new Completer();
   new Timer(new Duration(seconds:1), () {completer.complete("Time is up");});
   return completer.future;
}
void main() {
  var sendPort = spawnFunction(go1);
  sendPort.send("hello"); //Might not get processed if main exits too fast
  sendPort.call("a better way to send").then((reply) {print("sent");});
  go2().then((String result) {print(result);});
}

First Impressions: Go (GoLang) 30 April, 2013


Go is a language that mixes old and new concepts. They use automatic memory management, but also bring back pointers and unsigned primitives. Other differences include forcing defensive style. It is a statically typed language, which helps find errors at compile time rather than waiting for a runtime error/test to catch the problem. Something else that I really like is the basic web site readiness. Go comes built with web technologies built in.

I think it's a decent language, but for me to spend more time using GO, it needs:
1 - a unique name (try to google 'go' + something)
2 - to be built out more (ex: compiler optimizations, improved web site readiness)
3 - better data integration (it feels like the only good support is for AppEngine's Datastore)

The use of GO seems to be restricted to a few startups, or to tools of better known or longer lived companies. Here's a list of some features I wanted to highlight:


Tools

The tools are still ramping up. Getting automatic building and completion on OSX seems like it was more of a pain than it should have been. The windows setup was pretty simple. It gives you an idea of what is available, but isn't quite as smooth as your standard Eclipse or VS auto-complete.


Speed

Another thing that needs some love is the compiler optimizations. I ran a couple of benchmarks. I know these are specific cases, but  for a compiled binary, it should have out preformed Java. Instead Java was at least twice as fast. The two tests I ran were SHA2 generation, and Fibonacci generation.

Built In Web Framework

There is no need for an additional or external web container. No Tomcat. No Rails. It runs it's own server and it's built in.
package main
import (
  "net/http"
)
func main() {
  http.HandleFunc("/", someHandlerFunction)
  http.ListenAndServe(":8080", nil)
}

HTML Templating

Built into the language is the ability to markup HTML with GO data:
.go file:
x, y := template.ParseFiles("some.html")
x.Execute(httpResponse, dataModel)
.html file:
<a href="someLink">{{.LinkTitle}}</a>

Multiple Return Values

func getPair() (int,int) {
  return 1,2
}

Signed & Unsigned Types

a int8 = 127b uint8 = 255

Forced Style

{}s required for one line if/for blocks. Not doing this creates a compile time error. Also, else statements must be on the same line as it's braces.
Right:
if i==0 {
  //Something
} else {
  //Something else

Wrong (no braces):
if i==0
  i = -1

Wrong (closing if/starting else braces are on different lines):
if i==0 {
}
else {
}

Unused Code

Unused code (variables/imports/etc.) will create compile time errors instead of warnings.

Initializing Statements for if Blocks

if i:=math.Max(a,b); i==5 {
  //Do something, possibly using i
} else {
  //Use i here too 
}  

Easy Small Object Construction & Assignment

Java:
class Pair {
  int a;
  int b;
  public Pair(int a, int b) {
    this.a = a;
    this.b = b;
  }
}
new Pair(1, 2);
V.S.
GO:
type Pair struct {  a int  b int}Pair{1,2}


Pointers (No Pointer Arithmetic)

func mod(i *int) {
    *i++
}
func main() {
    i:=4
    mod(&i)
    fmt.Println(i)
}

Variable Struct Construction Args

type fourPropertyStruct struct {
    a,b,c,d int
}
func main() {
    fmt.Println(fourPropertyStruct{b:4,d:7})
}


Simpler Syntax for Arrays

someArray[firstElement:lastElement-1] will return the appropriate subset of someArray[]. Missing indexes imply beginning or end ([:3] or [3:] for example)


One Form of For

Instead of a multi step for and a simple iterator based for, one form is used:
var list = []int{1, 2, 4, 8, 16}
func main() {
    for i, v := range list {
        fmt.Printf("index: %d, value: %d\n", i, v)
    }
}
To keep a single For form, _ is used when you don't need either the index or value
for _, value := range pow {
    fmt.Printf("%d\n", value)
}

Object Creation

new creates New Objects
make creates New Arrays & Maps
a:=new(SomeStruct)
b:=make([]int, 5)
Maps are declared: map[keyType]valType
maps can return a key, boolean pair describing what the value is/if the key existed

Simultaneous Assignment

x,y = y,x+y
Temp variables are no longer needed!


No Break Statement Needed in Switch Statements

switch ret {
  case 1: //Do something
  case 2: //Do something else
  default:
}

No Classes. Just Structs with Methods Appended

interface types can have method signatures defined in them. a type implements an interface when it has those methods, not by tagging it as that interface
type Greeter interface {
    Greet() string
}

Errors Implemented by Having an Error()(string) Method

You don't tag a struct or object with an interface. If an object has the methods defined in an interface, it is automatically-polymorphically-compatible.

Easy Threading

go someMethod, will launch that method on a separate thread. When you combine this with channels (a report back mechanism), concurrency becomes simple compared to many other languages:
func getInfoFromThread(x chan string) {
    x <- "hi"

}
func main() {
    x := make(chan string)
    go getInfoFromThread(x)
    z := <-x br="">    fmt.Println(z)
}

Transistors and Computer Science 22 March, 2013

It feels like there are a multitude of developers who talk about Arduino, Raspberry pi, and computer hardware in general. This being said, I haven't observed many that add this type of knowledge to their arsenal. Over the last year, I caught myself doing the same thing, so I finally took the plunge.

Understanding topics like Ohm's law and current are necessary to get into any detail. If you're a hobbyist, Maker Shed has a great intro. But for a developer looking for the executive summary, the transistor is a good place to start. Not only is the transistor something your dev box is based on, but it has the fascinating application of being able to represent boolean logic in hardware. This lays the foundation for all those truth tables you did in your Computer Architecture/Systems classes.

Here's an example.
Inputs: A, B
Output: C

Here's a truth table for C = f(A, B):
ABC
000
010
100
111

A boolean expression that calculates A and B based on this truth table would be:
A AND B, also commonly written as A∧B or A && B.
If both A and B are 0, or either A or B are 0, C equals 0.
C is only 1 if both A and B are 1.

Here's where transistors come into play. Basic Bipolar Junction Transistors take two inputs, and have a single output. They are perfect for creating AND, OR, NOT, XOR, NAND, and NOR operations. Transistors may need to be chained together while acting as a series of cascading switches to get such benefits, but they can do it.

Once we chain enough of these logic gates together, we can do more complicated computations.


Here's a transistor schematic symbol:
Here's a schematic for an AND gate using two transistors:

Simple, yet interesting.

From Strategy to Marketing 24 May, 2011

At a high level, marketing can be broken down into four steps:
  • Understand needs
  • Plan for meeting those needs
  • Communicate & execute the plan
  • Build relationships
The first and last items in the above list are largely marketing oriented. The middle two are strategy oriented. Strategy and marketing are often taught separately, but are very intertwined.

Marketing is all about capturing value from targeted customers by creating profitable relationships with them and building value for them. This requires a great deal of strategy.

During the screening and concept phases of product development, a need is targeted. This need is compared to current solutions using both marketing concepts and value propositions.

Targeting and Segmentation
Markets can be segmented in many ways. Segment variability and available resources determine a which segments are targeted (chosen as the buyers or consumers). The most common segments are based on:
  • Geographic
  • Demographic
  • Age
  • Lifestyle
  • Gender
  • Income
  • Psycographic
  • Behavioral
  • Occasion
  • Benefit

Effective segmentation means that a segment and resulting reactions must be:
  • Measurable
  • Accessible
  • Substantial
  • Differentiable
  • Actionable

One way to identify holes in the market, or segments that are not being served is to use positioning maps. An example is shown below:



Marketing Concepts
Concepts in marketing (your overall strategy for selling) include:
  • Availability and affordability
  • High quality and high performance
  • If large scale marketing and selling efforts take place
  • Knowing the needs and wants of the consumer
  • Long term interests of consumers in business and society

Value Propositions
A value proposition (all the value that you are offering) points you in the direction of your positioning strategy. A positioning strategy is generally one of the following:
  • More for more
  • More for the same
  • More for less
  • The same for less
  • Less for much less

To communicate this to the customer, you create a positioning statement. This statement takes the form of:
"To our is that "

The marketing mix supports the positioning strategy and statement.

Corporate Governance 07 April, 2011

While management is about directing activities, governance is about setting the conditions within which activities can be directed. Formally defined, corporate governance is about management and the board of directors enforcing policy that:
  • Balances the interests of shareholders
  • Forces responsibility, accountability, and transparency
  • Challenges management to achieve high performance
Agency Theory
Agency theory is one way of looking at the problem of controlling the performance and ethics that a business’s influence carries. In agency theory, there are two actors. One actor is a principal, which is thought of as a stakeholder (someone who is affected by an entity). The other actor is an agent, or someone managing the entity. It is often the case that the principal and the agent do not have the same goals. For example, although the principal may have a monetary stake in the entity and the agent is an employee of the entity, the principal and agent may not share the same work ethic for company success or the same notion of what appropriate risk is.

Given these differences in how the principal and agent think about an entity, it may be difficult for a principal to monitor the actions of the agent. When active monitoring does not take place, it is easy for the gap between a principal’s and an agent’s desires to grow wider and conflict. Corporate governance can help close this gap.

Who is Involved?
Although everyone should act responsibly, the board of directors has the explicit responsibility for overseeing corporate governance. The board is usually broken up into several committees who each have one or two main objectives. The responsibilities of the board of directors and its committees include:
  • Nominating other board members
  • Auditing and determining who performs the audits
  • Setting the tone for ethical behavior and high performance
  • Approving budgets
  • Ensuring availability of financial resources
  • Setting salaries and compensation for executives
  • Watches out for a “if it is legal, it is okay” attitude
  • Questions executive decisions
  • Allows the outside to see success
  • Looks out for shareholder equity
  • Balances stakeholder interests
Stakeholder Analysis
Being aware of all stakeholders that are affected by the company and balancing their needs can cover much of what corporate responsibility is meant to do. The following list outlines basic stakeholder analysis steps:
  • Identify all stakeholders and their relationship to the company
  • All stakeholder needs must be identified (time, quality, cost)
  • An organization must understand how well stakeholder needs are being met
  • Gaps in providing for needs must then be weighed and necessary changes made
Independence
The executives of a company are responsible for following guidelines and rules, but it is the board of directors that should have the last say in questionable matters. Given all the decision making and analytical power that the board possesses, an important caveat in structuring a board of directors is the degree to which they are independent. Independence in a board of directors will determine how easy it is for a company to become unethical or underperform.

The degree to which a board of directors is independent directly affects how equitable it is with shareholders as well as how it balances stakeholder needs. When a board is independent, it can act without bias. When a board is not independent, conflicts of interest arise. To help ensure the independence of board members, they must:
  • Not have any conflicts of interest
  • Not be afraid to speak out
  • Be trained to ask the right questions
Making sure that an annual meeting calendar with topics exists, and making a distinction about what decisions the board should make can help the board operate effectively.

Companies must pay the price to help ensure that conflicts of interest do not exist, that boards are independent, decisions are transparent, and that auditing is done correctly. If they do not, more regulations will be put in place and fewer overall benefits will be garnered by stakeholders.

Deciding in Light of Uncertainty and Risk 05 April, 2011

Decision making can be difficult because there are often many options to chose from, and varying levels of risk are built in to these options. Many times, when people talk of managing risk, they simply mean transferring the risk elsewhere. Decision and risk are necessary issues that must be dealt with, simply because business is a competitive environment. Conservatism can work for a period of time, but it opens the door for others to leapfrog a business that is unwilling to take some risks or make decisions involving uncertainty.

Risk and uncertainty often are the result of incomplete information, ambiguous information, or time constraints. Sometimes, they are a result of people interpreting the same information differently. A representative sample may be necessary from which to base a decision.

Another reason that this subject warrants attention is because common solutions for dealing with risk and uncertainty have become flawed. History is not an indicator of black swan events. Although using historical data to analyze current situations can be useful, it should probably be used as a last resort in many scenarios. The following set of generic and specific frameworks will help identify what a correct decision should be, regardless of the uncertainty level.

Decision Making Steps
  • Recognize the need for a decision
  • Generate alternatives
  • Assess alternatives
  • Choose among alternatives
  • Implement the chosen alternative
  • Learn from feedback

You may be able to narrow alternatives by removing those that are not:
  • Legal
  • Ethical
  • Economical
  • Practical

Risk Matrix

A risk matrix simply interpolates and visualizes what risk may be associated with familiarity of products/technology, as well as what risk may be associated
with familiarity of markets.


Reality Check
Simply asking the following questions can provide a person with a reality/sanity check and as an initial feasibility test. An entire Harvard Business Review article was written on this:
  • Is it real?
  • Can we win?
  • Is it worth doing?

Cynefin Framework
A decision is categorized into one of four levels of order/organization, and then dealt with accordingly:
  • Simple - Clear cause and effects -> Use best practices
  • Complicated - Multiple right answers exist -> Use expertise
  • Complex - No visibly right answer -> Look for patterns
  • Chaos - No right answer, no pattern -> Establish order

Uncertainty Framework
Three academics (Courtney, Kirkland, and Viguerie) established a model for identifying levels of uncertainty and dealing with them.
  • Level 1 - Basic uncertainty -> Learn the required information
  • Level 2 - A few possible outcomes exist -> Use a decision tree
  • Level 3 - No discrete number of outcomes -> Use scenario planning
  • Level 4 - Even variables are discrete or unknown -> Use analogies to simplify

Decision Styles
Subordinates are all on a spectrum of needed supervision. When others cannot or will not decide, you decide for them. Otherwise, responsive, intellectual, and participative decision styles should be used.

Decision Trees
If a few requirements are met in a given scenario, it is possible and useful to use decision trees to narrow down and grasp options. The following steps outline how to create and use a decision tree:

Prerequisite - You must know all the alternatives, be able to assign probabilities to them, and have clear objectives.
  1. State your decision
  2. Draw branches for any intermediate results that could occur
  3. Draw branches any decisions that should be made at that stage
  4. Repeat steps 1 & 2 until no more intermediate results or decision points exist
  5. End each final branch with a outcome result ($ for example)
  6. Multiply probabilities and outcome values where it makes sense
  7. Based on all probabilities and final objectives, choose the best outcome

Example Decision Tree

Avoiding Decision Making Pitfalls
  • Don't form an immovable hypothesis from the piece first information you get
  • Don't justify decisions simply from historical data
  • Don't use the status quo as a benchmark for success
  • Get an outside point of view
  • Phrase the problem differently to see other sides
  • Be mindful of over emphasis by individual sources
  • Watch out for assumption padding on multiple levels
One of the most important things that can be done to improve decision making abilities is to receive quick and clear feedback after a decision has been made and results are available.

Leadership vs Management

Leadership vs Management

The words management and leadership both describe ways of dealing with people, but they underscore two very different ideals. At a high level, management deals with complexity by breaking up work. Leadership deals with change by applying a vision to everyone’s work.

A higher level of leadership would normally be found in the executive ranks of organizations. A higher level of management is usually found in the middle ranks of an organization. Finding the best mix of management and leadership for a person is extremely important. One reason for this is that the amount of supervision needed theoretically changes as you look higher towards C-suite positions. When less supervision is needed, there exists in subordinates attributes needed to make decisions. They need to be led more than they need to be managed.

Peter Drucker said “There is nothing more wasteful than becoming highly efficient at doing the wrong thing”. I would add that “There is nothing more frustrating than knowing you are on the right path, but getting nowhere”. Management is doing a thing right. Leadership is doing the right thing.

Although managing complexity can be hard, changing can be harder. John Kotter outlines an eight step change process that can help:
  • Create urgency
  • Form a group of advocates
  • Get the vision right
  • Communicate to get buy in
  • Empower action
  • Create short term wins
  • Don’t give up
  • Make change stick

Here is a comparison of leadership and management goals:


Can anyone be a leader?

Kouzes and Posner say that a leader must be able to:
  • Find your voice (your words must be consistent with your actions)
  • Affirm your values (what you care about – determined by how you spend your time)
  • Express yourself in your own way (others follow authenticity)
  • Challenge the process (experiment and grow)
  • Enable others to act
  • Encourage optimism

Formally, there are several academic frameworks for understanding leadership

Trait approach
This approach goes in and out of style every few years. It says that there are specific traits that define whether or not a person is a leader. Research shows that most of these traits can be learned. These traits drive decision making and generally include:
  • Drive
  • Extraversion
  • Integrity
  • Self-confidence
  • Knowledge of the business
  • The ability to read others

Behavioral approach
This approach is simply to focus on both project goals as well as team relationships. Finding the right balance of these two items determines the effectiveness of the leader. This approach can be seen in many aspects of the situational approach.

Situational approach
This approach to leadership says that universal leadership traits and behaviors don’t exist and you must look at the situation before deciding what to do.

Three popular situational models include the Vroom model, Fiedler analysis, and the Hersey/Blanchard theory.

1 - The Vroom model looks at situational attributes such as decision significance and where subjet matter experts are, assigning each one a status of high or low. A funnel method is then used to narrow down how the decision should be made (on a spectrum of autocratic to democratic). If more than one option seems to fit, use the one that will take the least amount of time.

2 - Fiedler analysis asks three questions and uses a funnel model similar to that of Vroom’s to determine if a leader’s decision should favor project goals or personal relationship maintenance. The three questions include the following:
Is the leader to other relationship good?
Is the task understood?
Does the leader have power?

3 - The Hersey/Blanchard theory looks at the maturity of individuals involved and decides whether to focus on project goals or personal relationship maintenance. It simply states that if a person or group has a low or high maturity, a focus should be placed on project goals. If, however, the person or group is of moderate maturity, a decision should focus on personal relationship maintenance.

With knowledge workers, helping everyone to exemplify a shared leadership is critical. It is often difficult to do everything by oneself. After all is said and done, I think one of the easiest ways to act is based on a statement I once heard “Help others fall into the pit of success”. Although oversimplified, this very well may sum up the way managers and leaders should act.

What most people call the 'org chart' 30 March, 2011

Organizational design describes how an organization is configured. It helps assign tasks and roles to people. It also allows people to integrate ideas and communicate. A few main components of organizational design are:
  • Reporting relationships
  • Reward systems
  • Rules and procedures
  • Communication methods
  • Job specialization
  • Decision making methods
  • Learning
  • Distribution of authority
One way to organize and setup these components is to follow the “Structure should follow strategy” mantra. Look at what the strategy is, and design the previous components accordingly. When many people think of organizational design, they think of the structure component (the “org chart”). This may be due to the difficulty in thinking through many of the organizational design components. Instead of customizing the level of each component to a strategy, many people use a canned or popular default organizational structure. Default structures help determine how organizational components are designed.

Before describing popular organizational structures, it should be noted that all organizational structures can fall within a spectrum. One end of this spectrum is labeled ‘Mechanistic’, and the other end is labeled ‘Organic’. Mechanistic organizations are considered to be closed to their environment because they cannot adapt or deal with complexity. Organic organizations on the other hand, are considered to be open to their environments because they can adapt and deal with complexity.

Typically, mechanistic structures have the following characteristics:
  • Many levels of management
  • Centralized decision making
  • Many processes and procedures
Mechanistic structures are the most common because the first enterprises were patterned after the Army which had a very strict chain of command.

Organic structures usually have these characteristics:
  • Few levels of management
  • Decentralized decision making
  • Few formal processes and procedures
Here is where each of the following default structures lie on the mechanistic-organic spectrum.

Simple:
This is generally used by small businesses or startups. Although they can be quick to respond, adaptations come in small iterations. They cannot handle complexity and usually bottleneck when coordinating with ‘the boss’.

Functional (Unitary-Form):

This form organizes people based on their skills. It can deal with more complexity than simple organizations because of the specialization groups that employees are in. Each department however, has a hard time seeing the big picture which involves the other departments and their concerns. Processes are usually required to facilitate or force coordination between departments. This is generally the most common. This structure promotes centralization.

Conglomerate (Holding-Form):
A conglomerate is a set of unrelated businesses and based on departmentalization. Each of these businesses could be further categorized.

Divisional (Multidivisional-Form):

Instead of creating departments based on skill, departments are created based on geographical regions, customer groups, or product groups. Customer needs can be better met with this type of structure. Divisional structures are scalable and do not force employees to specialize. Administrative costs rise because each department could be a miniature functional company. Divisional structures can adapt and deal with complexity better than functional structures because a divide and conquer approach is present. These organizations start sharing resources.

Matrix:

A matrix structure tries to get the best of both worlds by superimposing a functional structure on top of a divisional structure. High levels of communication and coordination are present, but this comes at a higher cost. Less time is spent supervising, but decisions may take longer because consensus from a diverse group will be harder to achieve.There are also usually two bosses which can cause confusion. This structure takes full advantage of its human resources.

Project/Team:

Like matrix structures, team organizations are hybrid structures, but with only one boss per person. They adapt well, and can handle complexity well. They are very costly to operate. There is often forced collaboration because teams are made up of multiple skill sets. People can easily move from project to project when they are needed, and this transient behavior helps transfer information throughout the company.

Network:

The network organization is one which is almost exclusively made up of partnerships and outsourcing. These partnerships and outsourcing contracts can easily be renewed, replaced, or removed. Sometimes called a virtual corporation, it can be accommodating but can also be a communications nightmare. Many online companies take this form.

The following factors can help determine how mechanistic or organic an organization should be:
  • Stability of the industry
  • The pace of industry innovation
  • Number of products
  • Number of competitors
  • Number of external partners
  • Number of employees
  • Number of clients
  • Internationalization
  • Company culture

If a company wants to change its structure to fit its strategy, the company culture will probably determine whether the effort will succeed or fail. Often the level to which an organization can be organic will be determined by the self-motivation of its people and their ability to understand each other.

Getting What You Want: Negotiating 27 January, 2011

Getting what you want is an important skill. However, it is shadowed by the skill of conceding only what you must while keeping relationships in tact. Winning really means satisfying interest. Much of what follows is based on the work of Roger Fisher and William Ury, although I have tuned much of it to be what I feel is relevant. Lets begin by defining negotiation.

Negotiation:
  • Dealing with differences and needs
  • Getting more
  • Satisfying a need you cannot get on your own
  • Building relationships that benefit all parties (debatable by some)

There are two main schools of thought when it comes to negotiating. The first, and most common, is bargaining. Academically, it is referred to as positional negotiating. In this kind of negotiation, parties believe that there is a fixed amount of value that can be claimed. Each party tries to get as much value as possible. The second kind of negotiation is sometimes referred to as integrative. In this second kind of negotiation, parties believe that it is possible to create new value in addition to what is up for negotiation and then have parties claim the parts that are important to them.

A classic example of the difference in these two negotiation styles is two children that both want an orange. In distributive negotiation it would be fair to cut the orange in half. Integrative negotiation however, would look to the interests of the two children to discover that one child wanted to make orange juice from the fruit, and the other child wanted to use the rind to make a cake. Here on child would get the entire peel and the other child would get the entire fruit, with both children being better off than the standard bargaining and fairness models.

There are hybrid models of course, where one party bargains and the other tries to create value. Most research suggests that when one party sticks to value creating negotiation, the other party can be convinced to do the same. Some authors like Jim Camp, argue that trying to attain a win-win situation brings in too much emotion and allows you to be taken advantage of. If the parties remove irrational emotion from the equation and really focus on what is going on.

Differences in belief, or even different interpretations of a fact make deals possible (eg: buying and selling stocks). To understand these differences pre-negotiation preparation and during-negotiation preparation is a key. Lack of preparation is the biggest problem in negotiating. Having said this, keep in mind that the amount of prep required should be proportional to what is at stake.

Planning Steps
  • Know the other group's culture and beliefs
  • Determine interests and good outcomes for each party
  • Identify differences and opportunities for trade
  • Identify each party's best alternative to the negotiation
  • improve your best alternative before and during the negotiation
  • Negotiate with those who can make the decision
  • Be patient
  • Acquire external standards for top and alternate possibilities

The Negotiation
  • Distinguish personalities from the problem
  • Focus on interests
  • Explain your interests as they explain theirs
  • Generate more options
  • Listen carefully, expressing empathy when needed
  • If your best alternative is weak, don't divulge it

Tactics
  • Recognize malicious tactics and call them out
  • Present interests first, then the proposal
  • Praise for something still under way makes a person want to keep doing it
  • If you think the other party can improve their alternatives, put an expiration on the offer

If Things are not Progressing
Ask "How might the other side be criticized if they made the negotiation?".

If Your Ability to Trust is Questioned
Try something like "I don't think it is a question of trust, I think it is a question of making sure we are on the same page".
Also, "It is not about trust, it's about everyone feeling like there is a fair deal".

Making it Easy to Say Yes Without Sounding Like a Threat
Attribute the statement to standards or established facts. Be careful of the phrasing and bring up the importance of the relationship between the two parties.

You Need More Information
Silence can be powerful and act as a smooth rejection of what was just said. It can also make the other party feel like they need to back up what was just said with more information. Talking specifically to people who have less authority to make decisions and are not as worried about keeping quiet on certain topics can bring you more information.

The Negotiation's Initial Direction is a Problem
Statistically, the first offer correlates with the final agreement. Putting the first offer on the table can help drive the whole discussion but you must be able to back it up. If another party makes a proposal first, bring in standards that are in your favor, bring up interests, and then put your offer on the table.

Things to Keep in Mind
Along with general negotiating practices and tactics, there are several ideas whose diversity keeps them from being categorized. Even though they may be smaller, individual ideas, they should not be underestimated. For exanple: Don't attack or defend. The more you can remove irrational emotion from the negotiation, the better chance you will have of being able to concentrate on satisfying both parties.

Make yourself open to correction. Remember that those with whom you are negotiating are people and have the same basic human needs that you do. People do not like to be threatened, told they are wrong, or insulted. Also, don't assume that your worst nightmare is the other party's top priority. Thinking in this way only allows value to be claimed, not created.

When comparing two options or one option to a standard, it is important to have some value associated with the differences. The benefit of having a defined point at which you will walk away is debatable. Some critics argue that it impedes new option generation, while the other side claims that you leave yourself open to an end result that is less desirable than if you had not negotiated. If you do subscribe to having a reservation price, it can be determined by looking at your best alternative and then adding the value of any extras.

There is a difference in knowing what consessions to make and when to make them. When getting ready to make a consession, make sure it is really worth it. if you are unsure about the concession and it is a big deal, you can always take a break to think. If the other side is making a concession, keep in mind that bigger concessions show that a party is more flexible while smaller concessions show that a party is less flexible.

Overcoming Cultural Differences
Geert Hofstede created five scales that help determine the attributes of a person. Although thoroughly understanding everything about someone's personality is probably not your objective, some important observations can be made (eg: is the person more fact oriented or relationship oriented).

The following is a list of the five scales and a brief description of each:
  • Power distance: Are all people equal in authority?
  • Individualism: The preference of individuals or groups
  • Uncertainty avoidance: The resistance to change
  • Masculinity: Assertiveness or dependence
  • Long term orientation: Long vs short term

Even though you can't give the other side a personality test to fill out, you can identify some of these elements based on geographical averages and organizational culture. By looking at jargon, dress code, rituals, ceremony, layout, and values (Hofstede helps here) you can tell what is important to that person. From this you can get a better picture about what they are willing to do and trade.

Negotiating is a useful art that takes practice to master. Understanding these elements will help guide that mastery as you run into opportunities to practice.