I was watching #MSBuild2017, looking over the balcony, up to the cloud, a voice whisper in my head, Oh man, you are far behind. What a moment! So many new things, I decided to pick Docker as a starting point. Honestly, I had no clue where to start. However, I did know that I had to start somewhere. A wise man said start small. Docker has just that, a hello world application.
Whenever I want to learn something, I head over to Pluralsight. Here we go. Give me Docker
I decided to take the Getting Started with Docker, then later Docker Deep Dive (still enjoying this course). They are awesome. The author, Nigel Poulton, has a good sense of humor.
Docker on Windows
I have been using Windows since I first met a computer. It is fairly simple to run and try out docker on Windows. Head over to Docker on Windows, download and follow the instruction.
After installation completed, fire up PowerShell, your very first command is docker version.
Have not used Command Line Interface for years, that output gave me a strong feeling. I uttered “wow it is cool“.
You cannot imagine my feeling when I ran this command
From that moment, I know that I can do many things with the abilities Docker gives.
Docker on Linux
Here is another fact. I do not know Linux. I have not used any Linux system. Years ago, it was hard to setup a Linux lab. What is now?
With the power of Hyper-V, I can have as many machines as I wish. I decided to download and try with Ubuntu server (The course suggested it as well).
Such an amazing moment 🙂 They are exactly the same in both versions.
Values?
Sound a trivial task. However, there are many things that I gained during the weekend.
It triggers my learn process. I feel energized again after years of writing code.
It opens opportunities. The more I know, the better I am. The better I am, the more opportunities I see.
What I showed here is the end result. Just like anything else in the world, the devil is at the detail. When you actually get your hands dirty, you will meet the roadblocks. Solving them gives me some Linux pieces.
Some Linux (Ubuntu Server) Command Line I learned
sudo su: Run as administrator (mapped to Windows environment).
ifconfig: Same as ipconfig in Windows.
ip addr show: Display the IP addresses with other information
route -n: Display kernel routing table.
apt-get install [name]: Install a package. For example: apt-get install docker.io will install docker on your Ubuntu
apt-get update: Install all updates.
service [name] status: View status of a service [name]
Not a bad result for my weekend. Not mention that I, now, love the Command Line approach.
So far so good. It is enough for me to move on. My next challenge is how to take advantages of them. It would be fun.
People talk about agile these days in Software Project Management. Each has their own understandings and practices. Sometimes, I have a feeling that people focusing too much on its concept; on what it is; on what we should apply; on how to apply …
Is there any problem with that? I do not know. I cannot judge someone decisions.
However, these are what I know. I know that I have to start with asking the right questions, that Agile is a tool to solve a set of problems.
What are my problems?
How can Agile help solve my problems? Has it solved the similar problems?
What are fundamental steps I should follow?
What Are Problems?
You cannot bring a tool to fix a problem that you have not known. It seemly does not work. There are hundreds of problems when running/working a team. Each team has different set of problems. There is no perfect team, my opinion.
The first step is to identify basic problems that the team is facing. As a software development team, there are some common problems that I have seen. Yours might be different than mine.
Lost Focus
What if you ask a developer in your team “what are our goals this week?“. I hope you will get good answer that your members know the team’s goals. From my experiences, they cannot say clearly about the team’s goals. They might say let me check the board. The point is that those goals are not clear to them.
Why? There are 2 possible reasons I could think of
Developers are so focus on their tasks (or they say so). Everyone has their own “to do” list on their mind.
The goals themselves are vague. Even the leader cannot say it clearly in 1-2 sentences.
Low Productivity
Output is not good. There is a high bug rate, high regression bugs. There are different definitions for Productivity depending on the team and organization. However, in short, Productivity means you deliver what you are supposed to deliver.
Why?
Lost Focus (from above): People are not aware of what they should deliver.
Cooperation: a crucial factor of a team.
Lack of energy: There is no rhythm in the team. People feel bored.
Agile as a God
Agile has emerged. People pay attention to it, read articles, books. And they quickly start to apply in their own teams and organizations.
Then we see people asking about “how to apply agile?”, “why does Agile not work in their team?”, …
Imagine the situation when you come to your team meeting with a strong claim: guys, we apply Agile. Then you start explaining about it. How cool it is. How popular it is. You have hundreds of reasons. You, then, set up Kanban board, announce daily standup meetings, … all other practices written for Agile.
What will you get after some weeks?
Soon you will chase to solve another new problem: why has Agile not worked with my team?
Wait a second! What was the problem that we wanted to solve at the first place? I hope someone in the team will ask that question.
Agile, on My Eyes
I would like to use Agile as adjective (yes, Agile is an adjective). That is Agile is a set of principles to help us improving our way of thinking, help us delivering better software, better output. That it has some practices to help us solving (improving) our problems (some I mentioned above).
I do not like to think Agile as a set of processes, steps, … or a set of instructions that we should follow.
Let take it small steps.
Daily Standup Meeting
The most common concept that people talked in that meeting is the three questions. In the nutshell, they are
What have you done yesterday?
What will you do today?
What block your way?
My opinion, they are boring. I do not think they work as expected, either. To force myself from not thinking about them, I called them Three Stupid Questions.
Wait! What the problems the meeting is trying to solve? Focus and Cooperation. By letting the rest of the team knows what you have done, everyone has the same vision. By raising the impediments, other can have a chance to help. The intentions are good.
However, in practice, I have not seen it worked (I know it might work on other teams). How to verify that? I suggest asking one of these questions (after the meeting)
How far are we closed to the delivery?
What were the team’s accomplishment yesterday?
Pyramid and Brick
I created my own version of daily standup meeting. The main idea is to utilize the visualization. In stead of writing the goals in words, I draw a picture with the concepts of Pyramid and Brick.
It must be a hand-drawing one. Team leader will draw it everyday in the team meeting.
Pyramid: is the rectangle.
Brick: the yellow or black boxes.
The window on the top right: The visualization of the delivery. In this example, it is a web form.
The face (with 2 arms): The team. The team controls the pyramid. They are in charged of everything. In the end of the meeting, it will either a smiled or sad face.
How does it work?
In the first meeting of the week (or sprint, I prefer weekly basic), the team will help build the pyramid. Bricks are work they have to do to build the pyramid. In the Agile terminologies, they can be either Epic, Feature, User Story, Bug, or task.
On the next meetings, each member will say what they have done will either move the bricks forward or out of the pyramid.
By having this visualization, everyone is more aware of what going on and how far they are closed to the delivery without reading a whole bunch of words.
At the end of the meeting, we should expect this happy face. If not, we should draw a sad face, honestly.
It depends on the creativity of each team to make the visualization alive. The more creative the better they will remember.
Task Based Completed
Put aside the requirement of having a good user story. Because we do not have that much luxury. The reality is that most of the time, we do not have a clear requirement, a well-written user story. That causes some problems. One of them is the feeling of getting thing done. Having spent more than 8 hours per day, working hard on the job, and the next day, we cannot proudly say what exactly we have done. We are kind of aware of what we did, but fail to name them.
To improve the situation, we came up with “Task Based Completed“, known as “The Golden Board“. In the Standup Meeting, your face should be on the board. There is no rule, no punishment, nothing required. Simply your face should be on the board. If not, not a problem, see you tomorrow. Again, your face should be on the board.
There are some benefits with this approach.
Encourage the cooperation and design. To breaking down in to small delivered tasks, they have to cooperate with each other and in that process, design the system. Tasks become your technical design documents.
Short error prone detection cycle: While implementing a task might spot a fraud in the design or requirement. The sooner the better.
Feel good. We know for sure that we have done something; that we get the job done; that we move things forward; that we cooperate with others.
One of the key point to make this system works is to make the task creation/completion super easy. In other word, do not put processes in the task creation. Task creation should be easy as creating a task in to-do list application. However, one should be improving the task’s name. The task’s name should be clear and understandable to the creator. Again, there is no requirement for others to understand others’ tasks.
Final Thoughts
Tools are tools. They are their to help us, human being, do our job. Each tool solves a set of problems. Before applying any tool, make sure we analyze our problems first.
When come to the teamwork, the most important factor is people, not tools/processes. Do not throw a tool to a person without instruction/training.
The only thing in this universe that we have control over is ourselves. Speaking another way, we have the full power on ourselves. For things to change you have to change yourselves, people said.
Yeah! I know I have full power on me. I have to change me (I wrote me on purpose). But, what exactly should I change/improve/focus on? How do I get started? To get started, we need more concrete detail than a general statement.
I am pretty sure that many people have heard about that statement. However, they have not still made any progress on their life. Why? Maybe, yes just maybe, they have not had a clear idea of what it means, what they should start with. Therefore, they might choose to know and let it go as any other events in life.
Since I have started a new journey of Personal Development (sometimes I called it Personal Excellent) some years ago (around 3 years). I have read books about the topic, applied and experienced in my daily life. I have made a good progress. Which encourages me to try more, experience more and as a result, share more. Sharing is a part of Personal Development.
A human being has 3 parts: Spirit, Mind and Body. They are all equally important. Do not neglect any.
I am sure there are books talking in detail about them. However, I choose to explain them in the way it makes sense to me; in the way I understand them.
Spirit
It is our mental assets. Everyone has their own relationships. We have parents, children, spouse, friends, coworkers, classmates, … Some people have plenty of good ones. Whereas some have a few or none.
To leave a good life, we have to built up our mental assets. As any other asset, mental asset can come and go if we do not build/protect it. I have a few suggestions
Assert your current relationships. Simply write them down will make a huge impact on your thinking. Not believe me? Try it.
Priority the relationships that you value most.
Focus on improving them. Sometimes a phone call might help.
There are things that make us feel better such as favorite songs, movies, …
It is our attitude on life. Some looks at life with an anger eye. For some people, everything is so annoying. They hate everything. They have a pessimistic opinion. But, there are people who see life joyful. Every event is a gift, no matter how bad it is.
You do not have to cheer for a sad event. You do not have to cry for a good event, either. Develop yourself to have the right attitude on each event.
Same event, different reactions, choice is yours.
Mind
It is our intelligent assets. It is our knowledge, our skills. Unfortunately, many people that I knew, spoke to do not care much about this (Yeah, maybe I have not met enough people).
My favorite question that I usually ask myself is “what have I learned since the last year?“. In any job interview, I asked candidate the same question. Sometimes, I felt one year was too short, I asked them: what have you learned since graduated from the university?. Not many said it fluently.
What have I learned since the last year?
Are you dare to ask yourselves that question?
You should have a plan for your mind. Otherwise, you will stay behind. We are leaving in a fast changing age. The information is on over the internet.
Some might say “I do not have time and money to learn.”
Oh really! Are you sure?
Body
It is our health (not the body building part 😛 ). It is not the good looking appearance (of course if it is good, then perfect). With the fast growing of internet, mobile devices, IoT, everyone seems too busy.
“I do not have time to exercise“, they claimed. If a 70 years old, laying on the bed (or hospital) says it, I believe.
We can build up our Spirit, improve our Mind anytime. But we cannot do the same with Body. The body has time constraint. Therefore, you cannot delay it for tomorrow. If you delay it too long, you will reach “I do not have time” soon. In other word, it is too late.
Suggestion? Yes. Do whatever it takes to build a habit of improving your Body (the health) NOW. Keyword is NOW.
Everyone is unique. Each has their own life, their own way of living. If we choose to think that we are victims of circumstances, then we have no power to improve. But if we choose to think that a human being has 3 parts Spirit, Mind and Body; and we have full power on them, that we can control and improve them; we will make a huge difference on our life. In fact, circumstance is the result of our actions. You reap what you sow.
Spirit, Mind and Body! I hope the post will give your some ideas to think over the weekend and get you started if you choose to. Once you choose to do it, you will find out how to do easily.
One day, you got a performance bug report. The report said that the customer got a timeout issue. Because the system database is SQL, you open SQL Profiler and monitor what happened inside the SQL server when a single button clicked.
Right in front of you opened eyes, there are more than 7.000 (yes, seven thousands) queries executed to serve a single request. The request is to search a list of records, and there are more than 2.000 records returned__seven thousands queries for two thousands records.
The system is a typical client – server application. The server side is built with WCF + NHibernate (SQL). The system has the notion of CQRS. NHibernate is used to manage domain object with mapping to the database. Therefore, the request (search records) belongs to Query side.
Root Cause
Lazy Loading! It is not hard to figure out the root cause. We use NHibernate to conduct a search query and load all the found records. Here is a simple overview of the architecture.
The problem happens at the map between domain and view.
Solution
Quite simple. Follow these steps
Define the Model that contains enough data for the View. Note that I am talking about Model not Domain.
Define a SQL View that collects all the data to serve the Model.
Use NHibernate to load data from SQL View instead of Domain.
The general idea is that we should get enough data in a single or two queries.
Lessons Learned
Command and Query Separation
Even the architecture says CQRS notion, there is no real separation of Command and Query. They share the same data model (the domain). The Domain should only appear and use in Command side only. And the Query side, there should be a notion of Model. Domain holds the business logic of the system. Whereas, Model models the read data of the system.
NHibernate is a great tool. However, just like other tools, it has good and bad scenarios. I am sure NHibernate is not a good fit for searching data just to returning partial data for clients. In the example, NHibernate is used to search for list of records, take some of information, and transfer to a view.
However, if we decide to use NHibernate to for this job, then we should read about Select N+1 problem.
Utilize Our Tools (SQL)
We tend to depend so much on ORM framework that we forget how powerful SQL Server is. By defining a SQL view for search request, we can utilize the SQL server. Later we can ask DBA experts to improve SQL performance without redeploying the application.
Final Thoughts
Today, there are thousands of tools at our disposal. We should choose them wisely. Otherwise, there is a big payback in the near future. Every tool has its advantages and disadvantages. You do not have to know them all. However, you should consider studying them before using.
The more I code the more I love CQRS principle. At the highest, it is about Separation of Concern.
I have introduced some concepts in this post. Just in case you have not known about them yet, here are some references:
Write down your value in a white paper! And from that moment, you will work as if you deserve to have that value.
Money does not mean Value. However, for the economic sake, most of us are working for a living. And we could not live without money. Unless you are at the higher course, I assume Money (income) is Value.
The value I am saying here is your rate per hour. No matter what, where you are working, in the end you can calculate how much you get per hour.
In this post, I want to share
How to calculate your current rate?
Why do we have to write down our value?
To make the system work, both you and I must have some kind of faith.
If you do not, that is ok. You can enjoy the reading or simply stop reading 🙂
I believe it works. That’s why I wrote this page. And later I shared this tip with my team. Now I share it with you.
Calculate Your Rate
The formula is simple
Your Rate = (Total Income in a year)/ (Total working hours in a year)
If you have a habit of tracking your income, your working hours (usually freelancers have). You can easily come up with your rate. Or you have already known your rate (you get paid by your customers).
However, if your salary is monthly basic, and your working schedule follows 9-5 pattern, the formula is
Your Rate = (Salary * 12 + (bonuses))/(40*52)
And The Number?
The number depends totally on you. You make that call. If you still do not know, let take (Current Rate) * (1.5-2). The most important part is you have to write a number. At the end of the journey, what important is not the number, it is the process, the progress that the number triggered.
The Why
Because the number gives you a clear picture, a clear image of the person you want to become.
Because it gives you a clear goal. Think about people who make this wish every year: I wish to have a lot of money. Wow, what do you mean “a lot”?
Because it changes the way you look at yourself. Therefore change the way you look at the world.
Because it helps you ask better questions.
The How
You have to track your total income and working hours every month. An excel spreadsheet should be enough to track.
Whenever you go to work or do something, constantly repeat your value (whispering in your head).
For every problem, you have to solve, ask this question
What a guy with {your number} value will do?
That question will trigger a whole new process inside you. What process is it? I do not know. It depends on who you currently are. However, I know that it will bring you to a new level. The key here is repetition. Do not quit at the first time you ask the question.
I am a Software Developer. I will take an example in my field.
You are responsible for solving a bug.
Depending on the process of your organization, however, I would assume these are steps that should be done
Reproduce the bug with unit test if possible
Fix the issue
Write unit test to verify your fix.
Manual testing
I know there might be more to get a bug done.
Here are some facts I observed
A few will follow 4 steps
Some will do steps #2 and #4.
Some will do steps #2 and #3.
….
Question is, who will you be? What will you do as you are now? Then you can practice asking the question.
What if you know what that guy will do, but you decide to drop some steps?
I hope your inner voice will speak: Hey! That is not what that guy will do.
As I said in the beginning, I applied this hack (tip). And I believe it will work. I do not know where it will bring me to. But I do know that I will become a better person in this progress. Since I started, it has given me a lot of courage (writing this post is a big courage). It has helped me shape the way I think when I deal with problems.
I rather give it a go than sit in a corner and do nothing. Right now I am thinking of the moment when I write another post to share the process and the result.