A number of things have come up in the last few weeks for a project I’m involved in that has shaken my beliefs and shifted my perspective.

The team I work with have all developed a deep level of experience within their domain of expertise.  This is part of the competitive advantage we use to win clients.  Smart people with a tightly focused specialization can work faster and produce better work than a generalist that hops to the new hotness on every other project.

The problem is that these specializations prevent individual developers from breaking out of their circle of perceived experience without great effort.  Specialization codifies itself into the how the team functions, who can work on what and who cannot work on what.

When a problem that demands some technology or tools which are outside of the normal comes up it can throw a wrench in things. Sometimes there are justifiable questions – can we support a solution written in Lua if the original developer leaves?  Other times it can devolve into a rather insulting “‘We’ don’t know how to do that” for something that can be learned in a few hours of reading or working through a tutorial.

The perceived difficulty and risk of something new can prompt only the most senior developers to get assigned to work on new things.

In the past at various different jobs we did one of two things.  We noticed that the existing technology stack was no longer meeting our needs so we evaluated some alternatives and then everyone was given some insight into the decision, how it was made and then either:

  1. Everyone was given training to get up to the same level of proficiency at the same time
  2. A hard cut over to the new project on a new stack and forced everyone to pick it up quickly on their own

Most good developers have no problem picking up a new language quickly. A significant portion of the knowlege you have as a Computer Science or Software Engineer is not tied to the syntax of a particular language.

Part of a good education in Computer Science is experience with a wide range of types of applications.  I did AI algorithms, wrote a real-time operating system, OpenGL and ray-tracing,  web applications along with the basics of algorithms and data structures.  Part of being a great developer is having the breadth of experience to know when to apply certain technologies over others.

A perceived specialization can negate all that past experience, and hinder an individual’s opportunity to tackle new challenges.  It demands a balance that must weigh company goals and efficiency won from deep expertise with the desires of each individual developer to work on interesting things and continue to learn.

 

One thing has come crystal clear over the last couple of weeks.  Distractions can easily destroy your productivity.

I remember fondly the days when I would write hundreds of lines of code per day.  Find a problem to work on and focus intensely on it for hours. Churning out features and fixes at a steady pace.

These last few weeks it feels like I barely manage to write 10’s of lines per day. Juggling multiple projects, getting messages on slack, emails,  and meetings all add up to a massive amount of context switching, loss of focus and limted progress.

The scary thing is just how effective these distractions are at killing productivity.  Judging by how much software I am writing now vs how much I used to write each day, these distractions have reduced my productivity by 10x.  What would have taken a good focused day now takes a week.

It’s clear that something needs to change.

I have slowly started to add some distraction reducing software to my toolbox.

Concentration – this is a python script which will block time sucking websites.

For Slack, the unread notification is a constant reminder that draws me back to read communications.  I changed the settings: https://get.slack.help/hc/en-us/articles/201675007-App-icon-notifications to hide this notification.

Email notifications similary are a way to keep drawing me back to gmail. I turned off email notifications to my phone and try to check email no more than 3 times per day.

400x40000bb.png Windy – an iOS app that I bought years ago and still use regularly when I need to drown out any noise.

 

Ah algorithms, that fundamental part of computer science education (and job interviews) which seem to very rarely come up in real world, day to day software development.

Sometimes I have a  real yearning to tackle a technical problem that involves writing an implementation of a red-black tree or a bucket sort, or hell, just write a function that uses recursion.  These opportunities come up so infrequently that when they do it’s a real pleasure to be savored.

It’s worth making those moments happen if they don’t come up very often at work.  Go out of your way to find projects that create the challenges you want to take on.  It’ll really remind you about what you love about writing software.

They say that the market for Mobile Apps is now mature. The stores are topped by the big companies – Facebook, Google, Microsoft and the design languages are now more or less stable for mobile platforms.

The next hype’d interface is chat. For a generation of kids txting is the most comfortable way to communicate and having services that can tap into that already popular mode may have a good chance of sticking.

Text bots are apps that interact with users almost exclusively through chat applications – Facebook Messenger, Google Hangouts, WeChat, SMS, iMessage etc.  But even though these platforms are relatively new, text bots certainly go back a long way.

I can recall one particularly smart grade 9 kid in school wrote a computer chat application back in 1995.  Not that it was very sophisticated.. more or less just 1000’s of hard-coded text responses to your questions.  By the time that IRC started to become popular there were plenty of hackers writing bots that would try and pass off as human, or just do useful things.  It’s hardly a new idea to have text conversations with computers over chat.

Yet here we are in  2016 and the new hotness in UX and interactive design is to go back to text chat. But there’s one thing that is being overlooked.

Despite it’s long history, it’s still really hard to do a good job.  There are few if any frameworks for building applications like this.  Sure, you can pull out some NLTK code and parse sentences, but writing something to reliably handle arbitrary strings of text from users is still very difficult.

I had gotten my hopes up, with the growth of Slack and the buzz around chat, only to be dashed when it came time to implement an app idea I have.  Suddenly I’m finding myself inventing algorithms for maintaining the context of a conversation.  There are still hard problems to solve before chat interfaces will be something that are easy to build.

And until they are easy, they won’t be prolific.

What the world needs is a Ruby On Rails for chat.  A conventional approach for building complex chat applications that will allow any developer to take their ideas to production.

It’s something I wish I had time to work myself, but am instead asking the wider community to pick up the torch and help us all out.

I have noticed something very different about how I develop my own projects compared to the ones where I’m working for someone else.  It’s a pattern I think many people follow in how they tackle hard intellectual problems in a work setting based on the expectations of others.

When working on my own projects I often find myself sitting in a comfortable chair to think.  I close my eyes and ponder various solutions, wrap my head around implementation details and workout the complexities and issues that might arise when I implement it.  All that thought usually results in some a-ha moments and hopefully less re-work.

On the other hand when working with a team or for someone else I’m anxious to show progress every hour of effort. This means more thinking while doing and occasionally finding myself in a spot where I need to stop and refactor, or re-implement something differently.

It occurred to me that refactoring code in your head is very quick. So the iterations are also quick on improving the design of any solution.  It’s very easy to just toss out an entire train of thought and start somewhere else, but tossing out 100’s of lines of code can feel like a loss.  There could be orders of magnitude better productivity if people spent more time quietly contemplating their code before writing it.

The other thing I find is that when I really know what I’m going to write, having thought about it deeply.  The coding part is just a matter of typing my thoughts out into the computer.  It is then that typing speed can actually become a limiting factor in how fast you can code – rather than splitting time between thinking and typing.

It seems that as I’ve gained experience, my effort of thinking about how to implement something has given way to instinct and habits.  Which is a good thing.  But sometimes there are particular problems that demand a thoughtful response and for those maybe the best place to accomplish great work is from your comfortable Lazy-Boy.

 

We all only have so much time and attention, and with constantly being pulled by work, friends, family in various directions we are only able to give our own causes and ambitions a percentage of ourselves.

Opportunity cost is what we lose out on for taking one path over another.  In a way opportunity cost is infinite.  We could at any time take any of thousands of possible actions which could, in aggregate, lead to very different futures.

In the present though, opportunity cost is speculative.  We can’t know for certain how much taking one action over another will be better or worse than another action.  Although we usually have enough information to help make informed choices.

Making the optimal choice is non-trivial.  And so we apply tools to help us make smart decisions.  We go to school to understand how things work, study history to learn how things have been done in the past, and use frameworks to help guide us to use best practices.

Going against these best practices are countless other factors.  Emotional impulses, reaction to external factors, others asking things of you, habits, and restraints. They act like friction preventing us from making better decisions. Some of these things we can easily do things about, recognize and counteract. While other things are very difficult to ignore or fix.

 

I’m going deeper in my learning about how to successfully implement machine learning algorithms this year by initally doing a survey of all the resources out there for learning this stuff.

It is a fast moving area of expertise and as such newer techniques and tools wont be covered in older books or tutorials.

MOOCs are now a great way to get up to speed on the Deep Learning approaches to Machine Learning.  And while there are some good quality general books out there about ML, most are currently in pre-order.

The most appealing to me right now is the course on Udacity, presented by Google which uses Tensorflow in iPython notebooks to teach how to build and apply ML.  The best thing is that it’s

  1. in Python
  2. uses the latest ML library TensorFlow (developed at Google)
  3. Is free

As with all learning, the best way to learn is by doing it yourself and practicing enough to make it stick.

This is not the first resource I’ve used to learn about topics in Machine Learning and it won’t be the last.  Taking multiple courses, reading multiple books and tackling multple problems on your own is the best way to ensure you have no gaps and a well rounded deep understanding of the concepts.

Actually mastering a new skill is hard and there are no shortcuts.  Accept that and jump into the challenge.

This year seems to be a big year for AI development. Deep Learning approaches are going to be applied to more areas and I expect most of the big name tech companies will continue to expand their research in the area.

The encouraging thing for the rest of us developers is going to be the opening up of core technologies.  The algorithms themselves are not significantly complicated. And the true value comes from the data used to train these models.  So there is some incentive for companies like Google to open-source their AI tooling.  It will enable more developers the chance to push the boundaries of AI techniques, while the companies themselves maintain ownership of the critical training data used to get the best results from these models.

What that means is that this year there will be more than a few new start-ups trying to turn these AIs into web services, or sell trained libraries as tools you can use in your own code.

Take for instance, something like sentiment analysis.  There are already quite a few APIs you can easily tie into to get this sort of analysis added to your own projects.

This year I expect this will expand into a large variety of areas.

Spell checking is prime for disruption.  For too long spell checking has relied on simple dictionary lookups and Levenshtein distance to guess at correct spelling.  These are relatively crude compared to the ability to understand context within a sentence and give much more probable corrections.

Google has open-sourced TensorFlow, and it has already gotten some significant attention from the developer community.  As more developers learn how to use these tools this year, you’ll see a lot of very interesting developments.

One of my goals for the year is to get deeper into learning the new generation of AI algorithms and practice getting good at applying those to real problems. AI has been one of those areas that always fascinated me, and then I took the AI course at university and learned that it just wasn’t as difficult or as interesting once the covers had been lifted on the mystic of it.

There are many approaches to algorithms that can be classified as AI.  If you consider that AI is the ability of a program to be given a dataset and then answer questions outside that dataset then something as simple as a linear regression is considered and AI.

#!/usr/bin/env python3
import random
def linear_regression(x, y):
 length = len(x)
 sum_x = sum(x)
 sum_y = sum(y)
# Σx**2 and Σxy
 sum_x_squared = sum(map(lambda a: a*a, x))
 sum_of_products = sum([x[i] * y[i] for i in range(length)])
a = (sum_of_products - (sum_x * sum_y) / length) / (sum_x_squared - ((sum_x**2) / length))
 b = (sum_y - a * sum_x) / length
 return a, b # y = ax + b
if __name__ == '__main__':
 simple_data = [[0, 10], [0, 10]] # slope=1, intercept=0
 print(linear_regression(*simple_data))

random_data = [list(range(1000)), [random.triangular(20, 99, 70) for i in range(1000)]] # should be slope ~=0 intercept ~= 70 print(linear_regression(*random_data))

In a real world example this would be expanded into an N dimensional regression where each dimension is an attribute.  As the data gets bigger and bigger, regressions need more advanced techniques to comute things efficiently.  But ultimately it never feels like you’re doing something emergent, you’re just doing math.

Decision trees are another popular form of AI algorithm.  in the most basic form this is just a binary tree of questions, to answer a question like “do I have cancer?” you start at the top of the tree and answer yes or no questions at each node until you reach the leaf which should provide the answer.  Again these get more advanced as they are applied to more difficult use cases but never really get to the point where they feel like an intelligence.

Neural networks and the new research in deep learning approaches are by far the most interesting, and yet they are also still nowhere near a state of general intelligence.  A neuron in a neural network is a simple program that takes input, modifies it and sends that as ouput and accepts feedback to re-inforce positive modifications.  These neurons are then connected into vast networks, usually in layers.

The breakthough in deep learning is that we can provide re-inforcement at different layers in the network for successively more specific things and get better results.  Applied to a data set these can do remarkably well at thing like identifying faces in a photo.

There is a bit of artistry required to apply these to a real world problem. Given data and a problem to answer from it, which type of algorithm do you use, how does the data need to be cleaned up or re-factored, how will you train and verify your AI algorithm afterwards?  There’s enough options there that just choosing a path to go on is often the most difficult task.

The whole AI space still is at it’s infancy and really needs a genius to come in and shake up everything.  All the current approaches are narrow in scope and a breakthrough is required to find a path that will lead to a strong general AI.

Luck and success comes to those who persist.  And for the last couple of months I’ve been planning and doing some market research on a way to pivot halotis into a new business.

As part of this transition I’ll be re-doing this website and you’ll see some new kinds of posts published here.

I’m hopeful that you’ll come along for the journey into a new space and watch as this business is re-born.