Saturday, September 14, 2013

Dynamic languages? Be ready for some discipline

Dynamic languages like Python, Ruby or Javascript are truly awesome. The removal of the compilation step make them super useful for quick scripting or prototyping, and that is a huge gain.Dynamic languages allow some features that would simply not be possible with static languages.

By dynamic behavior has a cost, you are scarifying the immense help that the compiler provides to help us dumb engineers all. You can only have piece of mind in and trust in your dynamic code if you really are obsessed with tests (better still with TDD). Dynamic interpreted code only blows up when exercised, there is no compilation step to help here, and you only discover that a Duck is not a duck when at runtime someone passes a Pidgeon.

Long story short, in order to use dynamic languages in large projects, you are going to need a very strong team, really committed to best testing practices, and really into code reviews, otherwise you are putting yourself in a path to sure disaster.

In fairness you can do stupid things in most languages (crazy use of reflection in Java, passing around void pointers in C/C++, etc), but the problem here is that with dynamic languages it is much easier.

"As an engineer use whatever technology suits the needs of the project and the team better." I mean, sometimes Java is better simply because that is what your team has expertise about. Maybe your IT department is a disaster and C/C++ are not even an option because of the lack of management of system libraries in your production boxes. Be smart, inform yourself, gather data, and make and informed decision.

Enjoy.

http://stackoverflow.com/questions/35753/is-python-good-for-big-software-projects-not-web-based

Sunday, September 08, 2013

Amazon Leadership Principles

Having worked at Amazon, has given me a different perspective on they way engineering can be practiced for the greater good. Software engineering is not the business of using the fanciest, coolest, latest technology, it is the business of adding value, of solving problems that someone may have, maximizing people's skillsets, etc.

At the core of it is the fact that we owe ourselves to our customers. There is no point in developing something nobody cares about, or developing something useful, but rigid, that will not be able to satisfy your customers in a couple of months time.Sometimes you'll have to invent new technologies and ways of doing things, but most of the time you won't.

Amazon is pretty much a self organized organism. Very few things are enforced explicitly, but everything is measured up against the leadership principles. Let me tell you something, it works! In the beginning you are curious, and not totally convinced about all the values, but little by little they get into you. I didn't meet a single amazonian not really convinced in the values of the leadership principles. In the end people believe in them, and because of that they behave in a similar way, and the organism is not only able to survive, but to be extremely successful.

So, what are those principles (not braking any NDA here, they are publicly available):

http://www.amazon.com/Values-Careers-Homepage/b?ie=UTF8&node=239365011

Customer Obsession
Leaders start with the customer and work backwards. They work vigorously to earn and keep customer trust. Although leaders pay attention to competitors, they obsess over customers. 

> As Jeff Bezos said, "the only person that is pretty much never in our meetings is the most important: our Customers." Everytime you make a decission, think about them. Go even further, first think about them, and then walk back until you have the product they want.

Ownership
Leaders are owners. They think long term and don’t sacrifice long-term value for short-term results. They act on behalf of the entire company, beyond just their own team. They never say “that’s not my job." 

> How many of you are in companies that once Quality Assurance signs off, the "problem" is theirs. That is awful in many ways. You engineers do not get to experience the satisfaction of end-to-end work, and your customers suffer because the diluted ownership result in less quality.

Invent and Simplify
Leaders expect and require innovation and invention from their teams and always find ways to simplify. They are externally aware, look for new ideas from everywhere, and are not limited by “not invented here." As we do new things, we accept that we may be misunderstood for long periods of time. 

> Simple is better. Do not just accept whatever solution is used by everyone. You can do better for your customers!!! Really, I have seen so many people concerned about make hiper-flexible architectures loosing themselves in the details, using millions of asynchronous queues, and crons, and what not => Nightmare, software may be flexible, but adding to that flexible structure is a nightmare, and your customers don't get new features fast enough.

Are Right, A Lot
Leaders are right a lot. They have strong business judgment and good instincts. 

> Well, in this case, this is more of a hiring criteria. But it also involve that your people do not talk sh*t. Your people are curious and study and have informed opinions.

Hire and Develop the Best
Leaders raise the performance bar with every hire and promotion. They recognize exceptional talent, and willingly move them throughout the organization. Leaders develop leaders and take seriously their role in coaching others. 

> I think this is very important. It is the team who hires its members. That has deep implications. Most importantly, that super arrogant guy will most probably not get into your team and destroy it. Let me tell you a secret, it is not so hard to find very talented and also very nice people!

Insist on the Highest Standards
Leaders have relentlessly high standards - many people may think these standards are unreasonably high. Leaders are continually raising the bar and driving their teams to deliver high quality products, services and processes. Leaders ensure that defects do not get sent down the line and that problems are fixed so they stay fixed. 

> This would be inline with the metaphor of software and a building you own. One day there is a storm and a window breaks. You are tired and decide not to fix it today. Tomorrow you are doing something else. Then another window breaks, but what the hell! nothing happened the last time, so I won't fix it, not just yet. This goes on a on, and one day you get a call from the police: "Mr, your building has been occupied by hippies!".

> This is one of the hardest principles to follow, because it may create conflicts. Insisting relentless will get some people to look and you and thing "F***ing idiot, as if we didn't know how to do your job", and things like that. But your leaders need to stand on their ground.

Think Big
Thinking small is a self-fulfilling prophecy. Leaders create and communicate a bold direction that inspires results. They think differently and look around corners for ways to serve customers. 

> Always, always! Every time you do something ask yourself: "How would I do this if there were no restrictions whatsoever? I know my customer wants this, but wouldn't they love to also have that?". Thinking big is an attitude, and once you get into it, it makes you believe in your self, you will develop a sense of  "I can do it".

Bias for Action
Speed matters in business. Many decisions and actions are reversible and do not need extensive study. We value calculated risk taking. 

> Another fundamental one. Do not over think stuff. When something is not as you would like it to be, go fix it. If you want to talk to someone go do it. Need a prototype? do it, don't wait for your manager to come asking. Surprise people, be active. In order for this to work, teams must be very cohesive, and a lot of trust must exist. Communication is also fundamental.

Frugality
We try not to spend money on things that don’t matter to customers. Frugality breeds resourcefulness, self-sufficiency, and invention. There are no extra points for headcount, budget size, or fixed expense. 

> This is very Amazonian. I believe that the idea here is to avoid turning into another super huge, slow mammoth company. I won't give examples, but there are many companies out there that over the years start developing money spending "traditions", unnecessary and ineffective, since they do not act as rewards anymore.

Vocally Self Critical
Leaders do not believe their or their team’s body odor smells of perfume. Leaders come forward with problems or information, even when doing so is awkward or embarrassing. Leaders benchmark themselves and their teams against the best. 

> Not only this is a sign of intelligence, but admitting your mistakes creates a much better atmosphere of trust in the team. We ALL make mistakes, but talking about them we learn lessons and give others opportunities to help.

Earn Trust of Others
Leaders are sincerely open-minded, genuinely listen, and are willing to examine their strongest convictions with humility. 

> Does anyone doubt of the importance of having people respecting you? We all know the guy in the office that people tend to go when they need something. Ideally you'd like all the people in the team to be like that. If you doubt of the abilities of your colleagues, you'll never be able to accept their ideas.

Dive Deep
Leaders operate at all levels, stay connected to the details, and audit frequently. No task is beneath them. 

> Understand what you are doing. Don't just patch stuff. Be passionate for god's sake!!!!

Have Backbone; Disagree and Commit
Leaders are obligated to respectfully challenge decisions when they disagree, even when doing so is uncomfortable or exhausting. Leaders have conviction and are tenacious. They do not compromise for the sake of social cohesion. Once a decision is determined, they commit wholly. 

> Respectfully challenge. That's it. Just because the most senior guys is proposing something, doesn't mean that that is the way to go. Ask questions, propose alternatives, use data (as opposed to gut feeling)

Deliver Results
Leaders focus on the key inputs for their business and deliver them with the right quality and in a timely fashion. Despite setbacks, they rise to the occasion and never settle. 

> This basically means: "Man, software engineers make a lot of money, and have a lot of freedom in their jobs. I only ask you to promise me you'll work as hard as you can when things start looking bad (like we are not meeting a deadline). Meet the deadlines whatever it cost (within reason)."

> This also means: "do not give me excuses". If we are missing a deadline gather data to tell me why, and to demonstrate that it would be basically impossible to deliver, even working super super hard.

As I said, I have been there, and I know it works. I also have to say that an environment driven by this principles is hard. You have to be strong, you have to love what you do. I have seen people drowning  unable to handle the pressure  but if you have what it takes, it is a very rewarding experience, and you'd carry this message around with you, wherever you go.

Enjoy!!