Tuesday, August 2, 2016

The Project of Your Life

By settings personal goals we improve ourselves and become better. I use Lean and Scrum principles for creating and tracking my personal goals.

Keep reading and see how it works.

 

When working on some project we set milestones, long term goals, short term goals and KPIs.

We track progress and learn from our work by having retrospective meetings and checkpoints along the way.

Now imagine you have a very large project ahead of you and you don’t plan at all. You just float and react to the different events along the way. Do you think you can make it right? On time? On budget? The answer, like always, is “it depends”. However, it’s more likely that you won’t.

In order to succeed, we need to manage our life and not be managed by it. You need to manage it exactly like you would manage that project.

multitasking

Your life is a project and you are its developer, designer and product manager

How many times did you say to yourself that you need to be better in this and that you should learn that? How many of those goals have you actually accomplished?

The first step is to define what you want. I personally like this article. It makes me think about my strengths, weaknesses and just the things I want to know. I have a dedicated time every six months when I go over these questions and create my long term goals. These goals are the things I want to accomplish in order to be successful and better than I am today. I keep them in my Google Keep notes.

*These are my personal goals:

1

Every personal (and not just personal) goal should be well defined (SMART goal).

Specific – Your goal definition should answer these questions: Who is involved? What do I want to accomplish? When?
Measurable – How can you measure progress and know if you are done?
Attainable – How can this goal come true?
Realistic – Be honest with yourself. Don’t define unreachable goals.
Timely – Provide a time frame. Then, creating 6 month goals, you are ready to do it.

Breaking Down Long-term Goals to Short-term Goals

Defining long term goals is the first step in improving. Setting a goal is better than setting no goals at all. Writing it down is a commitment to yourself.

In order to accomplish a long-term goal, which is usually a big goal (I want to master JavaScript, etc.), we need to break it down to smaller pieces – smaller goals (milestones) that we’ll accomplish along the way. Those goals should also be SMART goals. I have a recurring monthly time when I go over my long-term goals and decide what I want to do this month in order to get closer to accomplishing the whole goal. Like in Lean development, I constantly adopt and change my goals according to the situation (Perhaps there is no reason why I should learn JavaScript anymore?).

The monthly short-term goals don’t always have to correlate to the long-term goals. Perhaps I want to take care of something in my job or maybe learn something that is not part of my long-term goals and is important for the following month. To be honest, it doesn’t really matter. As long as you take time to think about it, take a decision and commit to it by writing it down you will improve and be better. That is the whole point.

2

If you have never tried to “manage” your life and set goals for yourself, then I suggest you start with monthly goals. Think about the month ahead of you and try to define how this month will become a successful one.

If you have set personal goals before, then I suggest you take it further.

A month is a lot of time – four whole weeks! Usually when we have so much time ahead of us, we won’t start any task until the very end-and that is only if someone reminds us about it in the first place. That’s called the student syndrome.

Weekly and Daily goals

Scrum uses sprints in order to prevent the student syndrome. I like to look on my weeks as sprints. Every week has a sprint planning and a retro. I go over the previous week’s calendar and see how it went. I try to find the things I need to be better in and the things  I need to preserve and keep doing. This way I can improve and track my progress weekly. At the beginning of the week I have a dedicated time for planning my weekly goals which are subsets of my monthly goals, and the tasks I need to accomplish this week regardless of any long-/short-term goal.

3

During the week I have a “daily standup meeting” (although I do it on the train on my way to work) using Any.DO. This has a very cool feature that at 08:00 makes me go over my daily tasks and decide when I want to do them (sometime today or later this week).

4

5

It is simply a to-do list that reminds me of the tasks I need to accomplish every day.

Every week ends with a retro. I go over my previous week and write down important notes, facts and decisions. I write them in Penzu, which is basically a diary with a very cool feature –every week it sends me the note I wrote a year ago. This way, I’m constantly being reminded of my decisions (you need to use it for a year in order for it to be effective - don’t give up!).

6

Summary

If you want to improve, you need to set personal goals.

The goals should be both long- and short-term.

Track both of them in Google Keep.

Every week, set yourself weekly goals and have e retro for the previous week. Write it down in Penzu and be reminded of it afterwards.

Have a daily meeting using Any.Do.

 

 

This works for me, perhaps it can also work for you.

Or maybe I’m just crazy Smile

 

Acknowledgments:

Netanel Lev and Shani Raba for reviewing the post.

Monday, July 18, 2016

Estimations in Agile development – Epics, User Stories and Tasks

Agile, scrum, Kanban and Lean are no longer “new” methods for software development. There are hundreds of articles, books and courses about them. However, most of them include introduction material that mainly focuses on the basics. If you actually start using one of these methodologies you’ll quickly ask yourself with a missing – how are you supposed to estimate your work?
If you search the web you will see that there is not much data about estimations, simply because it is HARD. It is very hard to estimate correctly. Jeff bezos used to say “If you are planning for more than twenty minutes ahead in this kind of environment, you are wasting your time”. We cannot predict the future, but we can maximize our chances in getting as close as possible to it.
After reading several agile books (e.g. Agile Estimating and Planning by Mike Cohn), scrum courses and 6 years of practicing Scrum and Kanban in various projects I’ll try to add that missing piece called estimations in Agile development.
This is the first of 4 posts in the “Agile Estimations” series.
  1. Epics, User Stories and Tasks (you are here)
  2. Estimating User Stories with Story Points
  3. Sprint Planning Methods: Capacity vs. Velocity vs. Feature
  4. Improving Estimations using Burndown, Burnup and Actual time metrics
This series is not an introduction to Scrum. Before you keep reading, you should be familiar with the agile manifesto and Scrum in general. There is no “right” way to do Agile. You should change it so that it fits your needs. However, it is very important to understand the root principles and evolve from them.
Making the series practical
In order for this entire series to be practical and not just theoretical we’ll apply the content on a Youtube like application that I’m building right now. It should allow users to upload and watch videos. It should allow users to edit their videos details and rate others videos. It should have search, tags and filters (top seen, recently added and more). It also should recommend different users videos that matches their interests.
Let’s start
Before we jump to the different approaches regarding estimations let’s first understand what is it that we need to estimate. A project’s specification evolves with time. It starts with large and unknown features requests and eventually transforms to some tiny and technical tasks. In this post we’ll understand how this transformation does happen and why.
It is not just User Stories
Everybody knows that in Scrum and most of the other agile methodologies you must have a board and some sticky notes on it.
clip_image002
*Maybe your board is not a physical board but it is still a board. With notes.
What are those notes? They are the actual work that is currently being done. The actual tasks that the team is working on in order to accomplish some user stories. User stories represent the user’s need. A feature that should be added to the application that will gain the user value. The tasks are the technical representation of that need.
A user story represents a feature. However sometimes that feature doesn’t stand on its own or it is part of some bigger feature or a business concept that incorporates several features. That is called an Epic.
Epic
An epic is the biggest representation of a feature. In order to deliver an epic to the user we must divide the epic to smaller pieces – user stories.
*In the Agile books epic is not divided directly to user stories it first divides to something that is called “Themes” and only they are divided to “User Stories”. However in the last 6 years I have never seen any team that uses Themes therefore we’ll not use them either.
In our application we have three epics:
  1. Allow users to find, play and comment on videos
  2. Allow users to upload and edit content
  3. Recommend videos to users based on their interests
This is our current product backlog. A backlog is basically a list of features that represents all the user’s needs and wishes. The backlog has two main principles that we should always apply:
1. The backlog must always be prioritized from high to low according to the user’s needs.
2. Every backlog item must have a “DoD” – Definition of Done that defines when the feature is actually complete. Sometimes it is called “Acceptance criteria”. It doesn’t replace the full description of the feature or its design. It is only a single sentence (maybe a couple) that describes how the feature will behave in the end.
Our backlog is already prioritized so let’s add DoD to the epics.
1
2
3
*there are many agile management tools out there. You don’t have to use them, a physical board and sticky notes can be enough. However, when working on big project a dedicated virtual tool might be really useful. I personally recommend on Visual Studio Team Services.
Remember that the epics should not include any technical or implementation details. They should only describe the business value. A more detailed description will be found inside the epic’s user stories.
By prioritizing the backlog we know what is the most important feature that the user needs, hence it will be developed first. After we’ll finish it we’ll move to the next one in the list. This way we always deliver the user what he wants the most.
I think that this is one of the best concepts in Agile development that is so different from the traditional ones. This way we can deliver small and valuable features to the user and receive feedback along the way.
Breaking Epics into User Stories
So the first epic is “Allow users to find and play videos”. In order to get a better understanding of what it really means we should divide it to smaller pieces – user stories. Every user story should match the following template: “As X I need/want Y to do/so that Z”. As a logged in user I want to update the details of my videos so that they be correct.
It is extremely helpful when a user story has at least X and Y defined since it clearly expresses the main role of the feature (As a logged in user) and by so the relevant business stakeholders of this feature.
Will we fail if we won’t name our user stories like that? Of course not.
Do all the user stories need X Y and Z defined? Definitely not. However doing so makes you truly understand the scope and value of the feature.
Epic: Allow users to find, play and comment on videos
1
2
3
4
Few things to note:
  • The DoD adds meaningful information for the implementation of the feature.
  • The use of user and logged in user for separating the action of an anonymous user and a logged in one.
  • The priorities of the user stories determine what the most important feature to the user is and which one is the least.
  • Every user story gives actual value to the user and brings us closer to the epic’s DoD.
Now we can split the top user story to its technical parts – the tasks.
User story: As a user I want to play videos from a list of videos
1
1
3
4
The complete backlog:
5
So now after we are familiar with all the product backlog items it is time to give them estimations.
But how do we estimate?
What estimation units should we use?
What are story points?
Do we have the same estimation units to all the backlog items?
 
All the answers and much more are in the next post.
 
Estimations in Agile development – Epics, User Stories and Tasks (you are here)
Estimations in Agile development – Estimating User Stories with Story Points (go here)
Estimations in Agile development – Sprint Planning Methods: Capacity vs. Velocity vs. Feature
Estimations in Agile development - Improving Estimations using Burndown, Burnup and Actual time metrics

























































Friday, April 29, 2016

Should we use MVC for modern web applications?

MVC is one of the most commonly used design patterns in web applications. It can be used both with server and client side rendering. Frameworks like ASP.NET MVC and Angular adopted the pattern and made the development extremely easy and straight-forward.

Despite its popularity, I claim that the MVC pattern is no longer the best solution for creating rich and modern web applications.

 

MVC – the good parts

Single Page Applications rule the web with different client side rendering frameworks like Angular, Backbone, React and many more. These frameworks made JavaScript development easier-and by doing so made the client “smarter” and the server “dumber” by mostly being responsible for communicating with the client and data persistence. Most of the applications’ logic moved to the client side.

In order to support this transition the MVC pattern has moved to the client by creating controllers that manipulate data (the model) that is presented in the views. This makes a lot of sense, as opposed to using just jQuery for some simple DOM manipulation and handling all the heavy lifting in the server.

So instead of rendering the view in the server for each request, now it’s extremely easy to render it in the client and give the users a faster and cleaner experience.

“Magic tricks” like two-way binding allow applications to respond quickly to different events and change the appearance of the app accordingly.

Let’s have a look at the Angular docs website. We can easily navigate through the different sections in the website while avoiding a trip to the server for rendering the next page.

That is a classic MVC case. It works great for the “simple” apps where most of the page content is static and the user’s changes don’t affect different parts of the page.

 

However, this is not what rich modern applications look like.

Let’s look at this example. What happens when we increase a product’s quantity? 

 

Four different parts of the page change (the header counter, the notification, the quantity of the product and the cart title).

 

Let’s try to implement it using Angular

Obviously I won’t build the entire app in a single view or use a single controller. That’s the worst practice, since it will break the SOLID principles of development by creating a giant controller that is responsible for EVERYTHING. This will become difficult to maintain over time.

I want my code to be highly reusable and simple to use, which I can achieve with components. Angular provides me with directives and, since Angular 1.5, it also provides components. I will create a controller, a directive and a template (view) for each of the following elements: the header, the notification and the quantity counter. In order to notify the other components that a product was added to cart, I can do 2 things:

  1. Use $rootScope and raise an event on it while subscribing to it on the other components.
  2. Use a shared service to pass the data between the components.

 

MVC doesn’t provide us with an out of the box solution for cross components communication. We need to extend it and create workarounds.

Here we saw just a single use case for cross components communication. For an entire application we’ll have many different events that will be managed using shared services or the $rootScope.

 

Does MVC help?

MVC forces us to separate the logic that is in the controller from the view that is just a template. It sounds like good practice, but if you think about it (and don’t kill me right away) maybe that’s actually not so good.

We are creating components, self-existing components that, like it or not, have their logic coupled to their view. You can’t really change the controller without affecting the view, and vice versa.

That’s alright! The components can be “smart”, they can have logic, handle their state and respond to different events and properties in a different way. So if that’s the case, why do we try to extract the logic and make the view dumb?

Why not create components that define their functions, handle state and create the view in a single class – a real reusable component. This component will use actions to trigger events that will be dispatched through the application and notify other components that something has happened, and allow them to respond if it’s necessary. This pattern is called Flux and it’s used widely with the promising new framework React.js.

clip_image002

Flux introduces three new features that create the necessary infrastructure:

  1. Action – A simple class that defines the events that components may trigger.
  2. Dispatcher – A class that dispatches the events from the Action to the different Stores.
  3. Store – A store catches the events, processes them and then fires a completion event that components may subscribe to.

 

Let’s implement the previous example with React and Flux

image

Here’s a basic Flux file structure. You can find all the parts we discussed earlier here.

The + button will call an action, which will trigger “INCREASE” event.

 

The CartStore will respond to the event, calling to the server and actually modifying the product’s quantity.

 

Then the store will fire a “PRODUCT_QUANTITY_WAS_CHANGED” event to notify who ever listens.

Then each component that subscribed to the event will be notified and will act accordingly.

 

What’s the difference?

Nothing mind-blowing really. However, we don’t need to create a controller and separate it from the view and then subscribe and fire events in order to communicate. We build components that are responsible for themselves. They constantly pass events from and to each other, allowing us to easily change existing behavior, add new components and integrate them with the existing events.

The classic Model View Controller separation seems a little bit redundant, hence it must be completely changed for creating rich and modern web applications.

 

Agree? Disagree?

Share your thoughts.

 

* I want to thank Yonatan Mevorach for reviewing this post.

Monday, March 14, 2016

My Adventures in the Interviews Jungle

 hiring-manager

As you know I recently switched jobs and while finding a new one I’ve done quite a lot of interviews in different companies.

I really enjoyed the process! Some days I had 3 interviews in a row! My friends called me insane but hey, I can easily talk about software all day long!

While looking for my next job I took the way a company’s interview process as a major factor for my final decision.

In my opinion the interview process should reflect the values, the culture and the professional level of the company. A company that values my time, tries to make me feel like home and asks question that actually reflect my knowledge is most likely a better company than a one that does the opposite.

In this post I want to share some of the questions and tasks that I had in my interviews. Some of them were great. They actually allowed me to show what I know and the overall process made me feel wanted and special. On the other hand there were some that were a complete waste of time.

Let’s start.

Ridiculous, exhausting and a waste of time

Bizarre questions

“How many hair cut places are there in Tel Aviv? How many golf balls can fit into a bus?” These questions were famous due to Google’s interview process where candidates had to answer super hard and bizarre questions.

Few years ago even Google stopped asking these questions!

They are a complete waste of time” - Laszlo Bock, Google's senior vice president of people operations. 2014.

I couldn’t agree more – these questions don’t test anything and furthermore don’t have anything to do with the candidate’s future work.

When my interviewer asked me these questions I asked if their company found it useful. He replied ‘yes, Google does it and so do we’.

That was a red sign for me – if you copy from someone at least stop when they do.

 

Endless trivia questions

By “trivia” I mean questions that don’t make the candidate think. Usually they start with what and not with why. Those questions check whether the candidate knows the answer or not. “What is HTTP? What is a transaction?” They don’t focus on the candidate understanding of why something is used or how is it used. Only if he knows the definition.

Honestly - when was the last time that you used a Mutex? Or had trouble with the GC? Either way it’s googlable. So it’s ok not to know all the answers.

I think that some trivia questions can be useful for three reasons:

1. To check if the candidate is serious about the job and that he took his time to prepare for the interview. Serious candidates usually prepare themselves and come ready for interviews.

2. To check that the candidate is not a complete noob/code monkey. It’s a bad sign if he cannot answer any question.

3. To check if the candidate knows how to say that he doesn’t know something. If he tries to lie and make up an answer in the interview then he will probably do it again in a real situation.

In one interview I had an hour and a half of trivia questions! Needless to say that it was one of the most exhausting interviews I’ve ever done.

In the end I asked the interviewer if they actually need all this knowledge to their day to day work. He told me no. They don’t even use multi threading but he questioned me for 40 minutes about mutexes, threadpool and thread synchronization.

 

Writing code for hours

In one company I had a coding test as the second interview phase. I think that it’s essential to check the way the candidate writes code but and this is a big but it shouldn’t take 6 hours@#$!

A small coding task should check if the candidate writes tests (perhaps TDD), uses SOLID principles and that his code is clear and well written. A simple calculator task can check all these. Writing a 6 hours long project is a waste of both the candidate’s time and the interviewer’s.

The worst part is that it’s in the company office (and not a home task) so the candidate will be stuck for 6 hours in a row writing code for some test in some company. Writing some code in the company office is good but only if it doesn’t takes the whole day.

 

Text exams

As I mentioned before, there shouldn’t be more than a few trivia questions in an interview. The only thing that is worse the asking 30+ trivia questions is having them in a written exam while the interviewer is not even present.

Those tests give the candidate the feeling that his time is not valuable enough for an interviewer to be present while he answers.

As a candidate I want to have the feeling that I’m wanted and that my time is valued. Leaving a candidate in a room alone with a text exam does exactly the opposite.

It can be even worse if the text exam is Scott Hanselman’s 25 things that every .NET developer ought to know and the interviewer tells that it is his private collection of questions.

 

The Good Parts

jhj

Now let’s go through the interviews that I really enjoyed, the technics and questions which allowed me to truly show my skills and made me feel wanted.

Home project, code review and pair programming

In one company I also got a coding project however it was a home project meaning that I could go home, work on it whenever I wanted and send them back the solution when I’m done.

This is so much better than working on it at the company during the interview. It allows me to put in as much effort as I want while doing it in a familiar and comfortable environment.

After I sent them the code I was invited to a code review. I think that this is the best possible interview since it checks everything! Both my coding skills, my ability to explain my choices and to see how I accept critics.

After the code review I was asked to change something in the code – it took just 10 minutes but the interviewer sat with me the whole time and was part of my design choices. It was more like a pair programming than a test. It allowed me to show how I think before I code, my TDD skills and it also allowed me to see how it feels to actually work with someone from that company. This was the best interview process!

 

Team Leader/Group leader who is in charge of the interviews process

As a candidate you usually talk to the HR in order to schedule your interviews, to get more info about the company and simply talk between the interviews. The HR are usually really nice girls (never met a HR guy) but it’s way more welcoming and respectful when your point of contact is a team or a group leader of that company.

It makes you feel important and that you are taken seriously since a manager is investing time from his busy schedule to walk you through the interview process in his company. A company that shows this kind of respect to a candidate must show even bigger respect to it’s employees and that is a company that I want to be part of.

 

CEO that talks to the candidates

I really valued the companies that their CEO invested ~30 minutes to get to know me and tried to make me feel like home even before I decided to sign with his or her company. When the CEOs shared their visions for their companies and told me their missions and values I felt an immediate connection. These talks were the last step of the interview process and companies who’s CEO actually called me or invited me to come and talk to him made me appreciate that company more than others and that is a major decision factor.

One CEO even called me from San Francisco just “to get to know me”. He is the CEO of ~100 people. If he could find the time then most of the high level managers in not huge corporate can.

 

Architectural and design questions

I was surprised to see that most of the companies didn’t ask me architectural questions. Only 2 companies wanted to know if I understood the architecture of the projects that I’ve worked on.

“Why do you have a load balancer? Why don’t you use micro services? Did you have a DRP? How does it work? What is the most fragile place of your architecture? What should you change? How? Why?”

If the trivia questions have usually the “What” prefix then the deep design questions will have the “Why” and “How” prefixes. This way the candidate must understand the pros and the cons of the architecture and more importantly to understand why the architecture is the way it is.

I think that these sort of questions show whether the candidate was just a code monkey or if he truly cared and understood his project.

 

White board role playing

Almost every company asks the candidates to approach the white board to solve a problem or design an algorithm. Remember that the solutions doesn’t matter! It’s how you thinks what’s important. This is why it’s important to think loudly and share your thoughts with the interviewers.

This is a great test however I think that it can be even better.

In one company after I solved the problem at the white board the interviewer stood up and told “now it’s my turn”. He asked another question (something about modeling and design) and then approached to the white board and started to sketch a solution.

Then he asked me if that works and if his solution was good. It wasn’t and I had to spot the problem and then explain him why his solution wasn’t good enough. It was great!

We switched roles and I felt like the interviewer. It was a simulation of a technical argument and he wanted to see if I can spot the design problem and most important part to see if I can hold on to my position and be able to convince him that he was wrong in a good and calm way. This is also one of the best interviews I had.

 

“How do you keep learning?”

There are plenty of developers out there. Only a small part of them are truly great developers. Many things distinguish them from the mediocre ones. One of them is what I call “Continuous Learning”.

The truly great developers always keep learning. They code, they read they write about it, they go to meetups and they are always up to date. Every company want these developers since they will always bring you progress.

If someone asks you to share this then they probably also care about learning and that place will probably have great developers who work there.

 

“Tell me about something that you are proud of?”

Enthusiasm and ownership are extremely important qualities. Every company wants their developers to be enthusiastic about their work, to have ownership for their features and to feel accountable for the application that they are building.

In order to be proud of something you must be involved in all aspects of the product development. You must feel that you own that something to the bones. If someone is truly proud of a feature or a product then he will talk enthusiastically while describing it.

I really liked when in one interview I was asked to tell about a feature that I was proud of. I could explain why did I think that this feature is important, it’s complexities and how did I actually developed it. It allowed me to show my understanding of that feature and my enthusiasm of software development. This is impossible to reproduce with only trivia questions.

 

That’s it.

This was a summary of most of my interviews. It was really interesting to see other companies and developers and to be tested for my skills. My personal advice is that when you go to an interview don’t be in the state of mind of a candidate that needs “to pass” the company’s tests. Go there and be the interviewer. Sure answer their questions, but don’t forget to ask yours. Remember that you are special and not every company deserves you. So be smart when choosing one. I think that the interview process can really help in deciding whether the company is worth going to. I hope that this post helped you know what to look for.

Good luck and feel free to share your experience!

 

* I want to thank Netanel Lev for review this post.

Sunday, January 3, 2016

Increasing Conversion Rate in Web Forms with these 3 HTML5 features

1 

Users hate typing. Most of them will abandon your app when they’ll see a long and frustrating form causing you to miss a potential new user or something important like a purchase.

Users have almost Zero patience. They want to complete what they have started as fast as possible or else they’ll ditch it. This is why you must strive to make the forms as short as possible and allow them to fill them as fast as possible.

 

Autofocus

The current page has a form that the user should fill. Remember that the user patience is short and that’s why you want immediately to focus him on the form.

If you’ll add the “autofocus” attribute to the first element of your form then the element will get focus after the page is ready. In mobile it will immediately show the keyboard.

<input type="text" autofocus>

It is so simple and it puts the user right where you want him.

 

Autocomplete

Users hate to repeat themselves. How many times did you type your full name/address/age/telephone in the last week or month? It’s frustrating! The user has to refill these details over and over again!

There must be a better way.

clip_image004

clip_image006

You’ve definitely seen this before – this is the Chrome’s AutoComplete feature which allows to automatically fill inputs that were filled in the past.

I love it!

You must ask yourself how come that not all the forms allow you to autocomplete this data, after all they all probably use

<input type="email" />and perhaps even give it a useful name attribute <input type="text" name="firstName/">

They just need to add a tiny HTML5 attribute that goes by the name “autocomplete”. The autocomplete attribute can be set with one of these values:

· country

· fname

· lname

· email

Click here for the complete list.

Each element with an autocomplete attribute tells the browser that this element can be autocompleted with a value previously used for this kind of element.

So all you need to do to enable this option and make your users happy is to add autocomplete=”on” and set the right values in the autocomplete attributes. Like so:

<form autocomplete="on"> <label for="firstName"> First Name <input id="firstName" type="text" name="fname" /> </label> <br /> <label for="lastName"> Last Name <input id="lastName" type="text" name="lname" /> </label> <br /> <label for="email"> Email <input id="email" type="text" name="email" /> </label> <br /> <label for="country"> Country <input id="country" type="text" name="country" /> </label> </form>

Wait a second, the label field surrounds the whole input element! Why?

It’s a nice trick that allows your users to click the textbox or the label to get focus to the textbox. Less clicks for the user means better chances that he completes the whole form Smile

 

Geolocation

The last HTML5 feature that can really help your user is geolocation. It allows you (if the user enables it) to get the user’s current location. This means that if your form has some location inputs like shipping address or Zip code then you could autofill them using the user’s location.

Think about all the times you had to look for your Zip code…

Now you can ask the user:

clip_image008

And if he allows it then all this data will be auto filled! The users will love it!

 

With these 3 simple feature you will increase your conversion rate!

 

Feel free to comment if you have another tips.

Thursday, December 31, 2015

My 2016 Goals and 2015 Reading List

2015 was a great year! I’ve worked on some of the coolest projects that I know. I’ve learned the internals on Angular 1.X and typescript. I’ve also started a new job (which is awesome) and made a pivot towards mobile development.



I’m certain that 2016 will be even greater!

Now when 2015 is over I’d like to start a personal tradition for myself in the blog. In the end of every year I’ll set personal goals for the year to come. The goals will cover the blog topics and the desired reading list for the next year. In the end of the next year I’ll go over the goals and verify that I’ve accomplished all of them. I will also list all the books I’ve read in that year so that maybe you will find something that suits you.
 
Let’s Start

This year I wrote 20 posts in my blog which are almost 3 times more than last year!

2016 Goal: Write at least 20 post.

I want to focus on mobile, agile and management topics. I will write on any other topic that I think is worth writing about but these topics will be the core.

Here are some ideas about the upcoming posts:

Mobile oriented posts:
1. TDD in IOS
2. IOS and Android best practices

Agile:
1. The psychology of Scrum
2. Retro done right
3. Agile estimations
 

2015 Reading List

Call me old fashioned but I love reading hardcopy books. My dream is to have a huge library filled will all the best books in the world. I always try to diversify and read different types of books.

I think that I did really well this year and picked awesome books. By the way - this is a great website where you can buy books with free shipping worldwide.

2016 Goal: Read books about management, leadership, innovation and at least one tech book. At least 10 books in total.
 

Here are the books I’ve read in 2015.

1. Steve Jobs – on the greatest minds that ever lived. He had an amazing and not ordinary life (the movies don’t get even close to the real deal). You must read this book if you consider yourself a manager or an entrepreneur.


2. The Last Lecture – an amazing book written by a man that was going to die. This is not one of those books about dying. It is about living. Living the life that you will not regret. The book is about the author’s last lecture which you can also watch here.


3. The Lean Startup
This is a must book for every manager and entrepreneur. It is well written, pragmatic and has lots of great real life examples.


4. 4 Hours Work Week
Life hacker Tim Ferriss in a great book about efficiency and building the life you dream about. It shows that your dreams can be accomplished. Just start and stay focused.


5. How Google Works
The managers of Google share the experience that they gained while working in Google.


6. The Leader Who Had No Title
Robin Sharma is one of the best leadership and life improving authors that I’ve encountered. I enjoyed reading all of his books. In my opinion this one is not as good as the “leadership wisdom” but it has lots of great topics in it (just read both).


7. Start-Up Nation
Great book that tries to determine how a tiny country like Israel has the largest amount of successful startups in the world.


8. The Passionate Programmer
Actually that is not a good book. The title doesn’t fit the content. It’s mostly about how not to lose your job. Don’t read it.


9. מחשבות לעט לילה
Haim Shapira writes about three philosophers: Nitsche, Schopenhauer and Kierkegaard. How did they live, what did they believe in and why? Very interesting.


10. High Output Management
Andy Grove’s book that is considered to be the Holy Grail of management books. It was written in 1983 and it is still accurate for this day. He covers all the aspects of being a manager. Great book, it’s a must read.

 

Allow me to repeat the 2016 goals:
1. Write at least 20 blog posts.
2. Read at least 10 books.
 



I like these goals :)

Now it’s time to start working on them.
Have a great year!

Saturday, December 5, 2015

Everybody has a plan until they get punched in the face

“A failure” can be a result of a software or hardware problem. A fault tolerance design intends to enable the system to continue operating properly in the event of failure. In this post, I’ll talk about a way to treat a special cause of failure – a timeout using a really cool open source framework named Polly.
We prepare for failures, we put “try catch” blocks and check “if(something == null)” every now and then. We think we’ve got it covered and that we are fully protected.
As Mike Tyson said – that’s our plan. However, we all know that something “unpredictable” will always go wrong, and then we’ll be punched in the face.
clip_image002
Let’s say that you have a DB and you query it to get some data – user’s navigation history for example.
clip_image004
One of your users clicked to get his navigation history and waited for almost a minute (yes – that’s a long time) to get an error that crashes the application!
clip_image006
(BTW This not a great error page – read here about the importance of error pages that make your user smile.)
You guessed right – that was a timeout to the DB. Why did it happen? Who cares? It made your user wait and eventually it crashed the application. This is unacceptable!
How can we handle it?
There are two problems in this scenario: the first is that the application crashed and the second is that the user waited a minute for a response.
Let’s start from the crash. The navigation history is a cool and useful feature but it’s not the core of your system. The core feature is the navigation itself. You have to identify the core features of your application and make them work, even if some other features fail.
In this example, the application should have displayed an error message saying something like “History is currently unavailable – try to remember where you went” and allow the user to use its core features any way.
Now let’s deal with the fact that the user had to wait for a whole minute before he saw the error. That’s a horrible user experience. A timeout might happen due to many reasons in any sort of client server communication (no more available connections, waiting for a really long operation to finish or simply a stuck component).
The bottom line is that someday it will definitely happen to you! Furthermore it will cause all your users to wait until they receive the error. A timeout may accrue just once due to a race condition that only a single user will get. However, sometimes the timeout will remain until you manually fix the problem - which can take a while.
You can lower the timeout limit to a second or even 100ms - and indeed no user will wait longer than 100ms - but all the users will wait for 100ms and eventually fail, while choking your servers.
Your goal is to prevent users from waiting at all when you know they will definitely receive a timeout. In other words, if a system component has a timeout,  you don’t want the application to try to communicate with it. You want it to fail fast.


Fail Fast

Fail fast is a concept in fault tolerance systems that is designed to stop flows and normal operations when a possible failure might accrue. Such design will add check points before operations execution, which will check if the operation is “healthy”. Using “health indicators”, the system will know if a certain operation will most likely fail. If an operation isn’t healthy, then there’s no need to execute it and we’d rather call a fallback behavior.
image
This way, we may give the users a better experience then waiting for an error.
Let’s examine our case: the application shouldn’t try to execute the query unless the connection to the DB is “healthy”. So the system will check the “health indicator” before the execution, and if it returns false then it should immediately turn to the fallback and display the error page without even trying to connect to the DB.
You can take it even further – if such health indicators exist, then why can’t we check them on the application startup? If there’s a problem with the feature, then let’s disable it and even not show it to the user. Perhaps it’s better to make the feature “disappear” then exposing the user to a poor experience. That of course is a pure business decision (it might be a really poor experience if the messages tab in Facebook suddenly “disappears”).
Allowing your system automatically to disable features must be done extremely carefully. You don’t want to disable a feature for all of your users if for some reason a timeout has accrued just once. If it happened 10 times in a row, then most likely there is a real problem and only then should the feature be disabled.
 

Polly

Polly is a really cool and useful open source that helps you create a fault tolerant system using policies for handling exceptions and creating fallback solutions. Let’s see how we can use Polly to handle our timeout scenario and allow your application to fail fast.

NavigationHistoryController has a dependency to the database where the navigation history is stored.
It has a single public method, which provides the history by calling the INavigationHistoryProvider.
We have a try-catch surrounding the provider call. As we know this catch will eventually handle the timeout exception, but it won’t fail fast.

We have created a circuit breaker policy on the timeout exception (error code -2) setting the count to 10 and the policy duration for 10 minutes. In other words, our policy will be triggered if a SqlException will accrue 10 times and in the next 10 minutes every call to the provider will not be executed. BrokenCircuitException will be triggered instead, allowing us to quickly fallback and return an error without waiting for the timeout.

 

Let’s test it

We’ll mock the NavigationHistoryProvider and raise an exception for every single call to it “Get” method.
We’ll call it 10 times and then another time to check if the policy was activated.

Works like a charm. The code is available on GitHub.
 

Conclusion

The applications that we build will have failures. We must recognize that things won’t always fail nicely. We must be prepared for all the possible scenarios and edge cases. The sooner we start thinking about them in our development process – the better.
I encourage you to think about it from the beginning. Start using FDD – Fail-Driven Development.


Best of luck.