30,000 students and growing!


This week my total number of online students reached 30,000 and I wanted to share an important lesson with you about what I’ve learned from teaching others.

Throughout my 18 years providing technology-based solutions to startups and corporate, I’ve always had a desire to teach others what I’ve learned. That’s why I began to develop online courses based on my expertise in Leadership, Software Development, and DevOps with the goal of educating others to help them become passionate, highly competent software engineers. It’s two years since I started teaching online and I’m grateful to be currently teaching over 30,000 students around the world through LinkedIn Learning, Lynda and Udemy. It gives me great joy to read reviews from my students and hear how my teachings have positively impacted and helped them to progress.

The lesson I’ve learned is that we have a responsibility to share our knowledge and experience to help others following behind us and that teaching other is truly fulfilling. Whether we teach one person or thousands of people, having a beneficial impact on others, teaching them new skills, boosting their confidence and seeing them progress in their career is priceless.

Do you feel the same sense of fulfillment when you help others?

Advertisements

Proof that More People Solve Problems Faster and More Efficiently


In Leadership, it is proven by experience and by common sense that, if you have (for example) 50 problems to solve for a team of (again for example) 10 people in a given time (say 4 months) the team can solve the 50 problems much faster and more efficiently compared to when you give 5 problems to each member of the team (and each member works on their own 5 issues only).

For those who need numbers to believe this, here is the proof:

Proof

Let X be the number of problems,

n be the total number of the team and

t be the time taken to complete a task by an employee

We wish to show that a can be accomplished faster and more efficiently compared to when you divide the task equally among each employee;

  • 50>10*(5) where 50 is the number of tasks to be accomplished, and 10 is the number of employees. 5 is the number of tasks divided within each employee; 50/10

For the first case, the task to be done = x

Assuming that t is directly proportional to x

for the second case, the task to be done = x/n +x/n + x/n+….+x/n =

Using induction method, we wish to proof that >n

Take x/n =I,    

Theorem:

For all fixed nN,

For 1 step summation of 1,

=1(2)/2

Solving by induction process, . Now consider

= +n+1

=

This therefore is a proof that by induction, the theorem holds.

We recall our i=x/n

=

For 1 step, = 1(2)/2 =1

For 2 = 2(3)/2 = 3, for 3=3(4)/2 =6



Say n =10 and x=50,

Then x/n =5


= 30/2

=15 which is greater than 5.

Recall that t is directly proportional to x; therefore, it will be faster for the problems to be solved by a team within a given time period compared to dividing the problems within the group.

Aref Karimi

https://www.linkedin.com/in/arefkarimi/

Why are individual goals/KPIs outdated, and how do modern organizations use KPIs to thrive their teams?


Google’s new cross-industry survey about key performance indicators (KPIs)/Goals, shed light on the challenges and emerging opportunities companies face when using KPIs, demonstrating the many ways advanced use of KPIs can benefit organizations, and offer steps leaders can take to make the most of KPIs going forward.

Old school managers (who tend to lead their organizations based on books written in the 1950s), use KPIs (or Goals) to (micro) manage their organization and measure the performance of each individual based on their past. These KPIs are known as Measurement Capable and Measurement Challenged.

Use KPIs to lead teams rather than to manage individuals

Let’s quickly have a look at the obvious downside of when KPIs are set for individual team members rather than for the teams. Then we will explore how modern organizations use KPIs to lead rather than just to manage.

The first obvious downside of an individualized KPIs is that the team spirit will die out and a given team will fail to operate as a unit with a shared goal. This becomes even a larger issue when KPIs or goals are bound to bonuses and remunerations, as each person will focus on ticking their own goal off in order not to sabotage their bonus, rather than helping the team to thrive and perform at its best.

For those who need numbers rather than common sense only, I have done a mathematical calculation which proves my point!

So now that we have the proof that team KPIs are way more efficient than individual goals, it is worth noting that rather than focusing exclusively on how KPIs can help them manage their organization, leading companies look to KPIs to help them lead — to find new growth opportunities for their company and new ways to motivate and inspire their teams. Simply put, KPIs will be used as a guide for a better future rather than for the past.

Use KPIs to align the organization

Now that we have proven the obsoleteness of individual goals, we can see how the team KPIs can help align the different teams or departments effectively because an organization cannot succeed if they isolate internal, employee-related KPIs and financial or process KPIs from the customer experiences (they endeavor to create). Leading organizations use KPIs to effectively align people and processes to serve the customer and in general the company vision.

But how team KPIs can be used for organization alignments? How do we know what the client KPIs can or should be?

To answer this question we need to remind ourselves that KPIs are a tool for leaders to set the right vision and come up with correct strategies for their future. Thus, in order to use KPIs as a navigator rather than a performance management tool, KPIs must be turned into insight, or simply put, into data!

One major data that can help us, leaders, to come up with efficient KPIs that can serve our customer and our brand is customer feedback. If the customer experience is recorded and processed (by data analysis experts) then it can offer us invaluable insights which can be used by product managers, marketing leaders, sales directors as well as by the executives.

Although the fast pace and smaller companies must be careful not to slow themselves down by waiting for insights before making every decision, we must look at insights as our guide to set the strategies right.

Use KPIs for machine learning

Now that we live in the machine learning era and artificial intelligence is booming, ML/AI technologies can help us achieve enterprise goals.

The greater potential of ML is empowering software and systems to learn from data-driven experience. This creates opportunities to use KPIs and their underlying data to “train” ML algorithms. That is, KPIs can be used, individually and collectively, to teach AI systems to improve and optimize their performance.

KPIs are not the target, they are tools

There is no magic number for the optimum number of KPIs for an organization or a team. While a properly set number of KPIs could compel the managers to bring a laser focus to the team’s most essential strategic goals, too many KPIs easily become unwieldy, unmanageable, and create unrealistic expectations; too few might result in the neglect of critical business issues.

From my experience, the best way of coming up with the right number and reasonable complexity of KPIs, is by both learning from the past and by adhering to SMART goals.

As we learned before, KPIs are for us, leaders, to learn from the past. So if by looking at past data we learn that the team failed to deliver their goals in time or with the desired quality, then the KPIs must be reviewed.

One common issue with the KPIs and Goals, especially when there are too many of them and when they are set for each individual person in the company, is that goals deviate from being SMART. SMART goals are Specific, Measurable, Attainable, Relevant and Time-bound. When companies set goals for each individual team player, making the KPIs specific becomes hard and the expected outcome becomes vague. Even more so, in a fast-paced organization, since things change frequently, goals tend to lose their relevance and attainability. And this sets the teams and people to failure.

What do we learn?

We learn that individual goals and/or KPIs are frowned upon in modern leadership. Teams can deliver way more efficiently if KPIs are set for the team rather than for the individuals.

We also learn that KPIs must not be for measuring the performance and should not be bound to remuneration and/or bonuses. At least not only for that. Rather KPIs must be used for better future strategies and for better alignment of various teams and departments in the organization.

Thanks

Can Techies be Leaders?


Although I am a techie myself one thing that I am passionate about is teaching management skills to new managers and talents both online and on-site.

One thing that I have learned myself through teaching management and mentoring talents is that transitioning from a tech person to a manager is quite difficult for most people. I often hear from my senior engineers that “I do not see management capabilities in myself”.  You may think that this may be a self esteem-related issue, which is somewhat correct, however we have to bear in mind that lack of confidence can rise from lack of knowledge and skills.

I have also witnessed that companies tend to promote technical staff (e.g. senior developers) to tech leadership positions. Although in rare cases it turns to be a successful experience, in most cases it does not end well.

1433926_27df_4
Learn How To Become A Manager Now!

In fact my personal experience with this has been appalling! In 2005 when I was asked to manage a team for the first time, I was actually a senior developer who had many good ideas and was able to deliver work fast and with good quality. But I am not sure if it was enough for me to become a manager. From what I remember, the first few weeks went well but then issues started coming up. There were quite a few reasons for that and amongst them the most important one was my “Technical Mentality”!  A “Technical Mentality” is the thinking process of technical guys (e.g. engineers, developers etc) which is very black and white. 1 + 1 is always equal to 2 in a techie’s mind, and white is always white!  Plus, they tend to think that they are always right, and it is too hard to convince them otherwise!

So you may ask that “isn’t 1+1 equal to 2?”. Or you may ask “What do you mean that white is not always white?”.

The fact is that for good managers and for leaders, there is always a gray area and they tend to find a win-win solution when the disagreements arise. They are flexible and instead of insisting on their own opinion or solution, they listen actively and try to underestand where the other person comes from. For them a win-win situation is better than a triumph in a technical debate which  may damage the other person or even the entire team’s engagement, positive energy and moral.

You may not believe that how many tech guys I know that they dislike someone else just because the other person is not as good as they are in technical subjects! Unlike these types of techies, leaders never like or dislike any of their teammates for their strengths or weaknesses. A manager’s job is to focus on people’s strengths and help to improve their weaknesses. What I believe and  always say is that: If you do not love your team, you cannot do anything good for them!

But is this “techie mindset” fixable? My answer to this questions is “Hell yes!”.  A techie mindset is like a crooked tooth! What it needs is some force in the right direction and then over time it will go where it should go to! The force for tech people and new managers is courses and/or books, and direction comes from mentoring! Just like any other job, one can become a manager by learning the concepts and skills, then putting them in practice and making them a habit!

Setting up a TeamCity 2017 Cluster


It is very common for companies, teams and engineers to setup TeamCity in a way that TeamCity will not be able to unleash its real power!

The main two major .mistakes that are made in setting up a TeamCity-based continuous integration and delivery system are:

  • Putting the build agent software on TeamCity server (server hosting both TeamCity software and the build agent software).
  • Installing TeamCity as a single server.

Although TeamCity allows you to to install both TeamCity web application and its build agent service on the same computer it does not mean that it is a good idea! Only for learning purposes can someone install both TeamCity software and TeamCity build agent on the same machine otherwise this setup is not good and will cause headaches. So why should not you put both the TeamCity 2017 web site and its build agent on the same computer?

  • Because servers must be single responsible! One server should not have two responsibilities, which means your server must be either a TeamCity server or a Build Agent server.
  • Because build agents run the risk of getting corrupt and you may need to kill them at times! If this happen then you will have to kill your TeamCity server too!
  • Because you may want to take advantage of cloud build agents, in order to save $$$. If you set up your build agent on your server, you will not be able to terminate/stop your build agents when you do not use them.
  • You cannot scale out your build agents. The more concurrent builds you have the more build agents will be spun up by TeamCity but if you put the agent and the web-app on the same server this cannot be done.

Also setting up TeamCity as a single server does not seem to be a good idea for being used in production capacity as it will not be able to scale out. The figure below shows a typical (and not ideal) TeamCity setup:

pic
SIngle-server setup of TeamCity

As you see the TeamCity server will be able to spin up multiple TeamCity Build Agents (if you setup cloud build agents) but it will not be able to scale out the actual TeamCity application. It will also not be highly available as a failure in the TeamCity Server will take down your CI/CD system.

In order to have a highly available and highly scalable TeamCity setup it is needed to use a centralised database such as SQL Server or MySQL so that all the projects, build configurations, templates etc can be shared amongst TeamCity servers.

Apart from a shared database, the data directory of the TeamCity servers have to be shared too so when you install the servers make sure you choose the same shared (e.g. network) location for all servers. You can also update the path of the data directory later via modifying the configuration file.

Copy of LearnTeamCity.pngScalable and Highly Available setup of TeamCity

Speaking in Amazon Web Services language, in the above diagram, our TeamCity Serves are part of an Auto Scaling group, which means that as stress and load goes up on the servers, AWS will spin up more and more TeamCity servers.

If you want your set up be highly available as well you will have to make sure that your Auto Scaling group stretches across multiple availability zones (physical locations) too.

To learn more about CI/CD with TeamCity 2017 and AWS CodeDeploy, you can see this online course. I have set a very special price on this course for my blog readers 🙂

TeamCity
Click to get 85% discounted online course about CI/CD with TeamCity 2017 and AWS CodeDeploy

TeamCity 2017: Build and deploy the modern way!

Grafana, Graphite and StatsD:Visualize your metrics!


Hey guys,

I have recently published two new courses on Udemy, and one of them has become a “Best Seller” so fast, in only two weeks! This course is interesting for a lot of DevOps engineers because monitoring and visualising the metrics of infrastructure, websites and applications is an absolute must-have skill for all DevOps engineers!

Developers also show interest in this course because the almighty Grafana-Graphite pair is an excellent tool for instrumentation and health check of application and websites.

In my course I have explained in over 25 lectures and 5.5 hours of videos that how you can extract and visual metrics from various sources whether it is supported by Grafana out of the box or not!

If you are an IT professional I highly recommend this course to you because based on my experience good instrumentation and having visibility on your systems metrics is what differs a good software system from the average ones!

Here is a coupon for my blog readers, which offers 80% discount!

Grafana
Grafana and Graphite for DevOps Monitoring

 

Working with AWS S3 through C#


A while ago I needed to use AWS S3 (the Amazon’s cloud-based file storage) to store some files and then download them or get their listings through C#. As ironic as it sounds I noticed that there was no .NET implementation nor a documentation for S3 so I decided to create a file repository in C# which lets .NET developers access S3 programmatically.

Here is a rundown as to how you would work with AWS S3 through C#:

In order to use any APIs of Amazon Web Services (AWS) you will have to add the nugget package that is provided by Amazon. Simply bring up the Nuget Package Manager window and search for the keyword AWS. The first item in the search result is most likely AWS SDK for .NET which must be installed before you can access S3.

 

 

Once the SDK is installed we will have to find the properties of our S3 bucket and place it somewhere in web.config (or app.config) file. Normally these three properties of the S3 bucket is required in order to access it securely:

 

  1. Secret key
  2. Access key
  3. Region end point

These details will be provided to you by your cloud administrator. Here is a list of region end points that you can place in your configuration file (e.g. us-west-1)

 

Region name Region Endpoint Location constraint Protocol
US Standard * us-east-1 You can use one of the following two endpoints:

  • s3.amazonaws.com (Northern Virginia or Pacific Northwest)
  • s3-external-1.amazonaws.com (Northern Virginia only)
(none required) HTTP and HTTPS
US West (Oregon) region us-west-2 s3-us-west-2.amazonaws.com us-west-2 HTTP and HTTPS
US West (N. California) region us-west-1 s3-us-west-1.amazonaws.com us-west-1 HTTP and HTTPS
EU (Ireland) region eu-west-1 s3-eu-west-1.amazonaws.com EU or eu-west-1 HTTP and HTTPS
EU (Frankfurt) region eu-central-1 s3.eu-central-1.amazonaws.com eu-central-1 HTTP and HTTPS
Asia Pacific (Singapore) region ap-southeast-1 s3-ap-southeast-1.amazonaws.com ap-southeast-1 HTTP and HTTPS
Asia Pacific (Sydney) region ap-southeast-2 s3-ap-southeast-2.amazonaws.com ap-southeast-2 HTTP and HTTPS
Asia Pacific (Tokyo) region ap-northeast-1 s3-ap-northeast-1.amazonaws.com ap-northeast-1 HTTP and HTTPS
South America (Sao Paulo) region sa-east-1 s3-sa-east-1.amazonaws.com sa-east-1 HTTP and HTTPS

 

In order to avoid adding the secret key, access key and region endpoint to the <appSettings> part of your configuration file and to make this tool more organised I have created a configuration class for it. This configuration class will let you access the <configurationSection> element that is related to S3. To configure your app.config (or web.config) files you will have to add these <sectionGroup> and <section> elements to your configuration file:

 

<configSections>

<sectionGroup
name=AspGuy>

<section
name=S3Repository
type=Aref.S3.Lib.Strategies.S3FileRepositoryConfig, Aref.S3.LiballowLocation=true
allowDefinition=Everywhere />

</sectionGroup>

</configSections>

The
S3FileRepositoryConfig 
class is inherited from ConfigurationSection class and has properties that map to some configuration elements of your .config file. A sample configuration for S3 is like this:

 

<AspGuy>

<S3Repository


S3.ReadFrom.AccessKey=xxxxxxxxxx


S3.ReadFrom.SecretKey=yyyyyyyyyyyyyyyyy


S3.ReadFrom.Root.BucketName=-bucket-name-


S3.ReadFrom.RegionName=ap-southeast-2


S3.ReadFrom.RootDir=“”>

</S3Repository>

</AspGuy>

Note that <AspGuy> comes from the name property of <sectionGroup name=”AspGuy”> element. Also <S3Repository> tag comes from the name of <section> element. Each property of S3FileRepositoryConfig
is mapped to an attribute of <S3Repository> element.

Apart from SecretKey, AccessKey andBucketName you can specify a root directory name as well. This setting is there so you can begin accessing the S3 bucket from a specific folder rather than from its root, and obviously this setting is optional. For example imagine there is a bucket with the given folder structure:

  • Dir1
  • Dir1/Dir1_1
  • Dir1/Dir1_2

If you set the RootDir property to “” then when you call the GetSubDir methods of the S3 file repository if will return “Dir1” because Dir1 is the only top-level folder in the bucket. If you set the RootDir property to “Dir1” and then call the GetSubDirs method you will get two entries which are “Dir1_1” and “Dir1_2”.

Here is the code of the configuration class mentioned above:

 

For the repository class I have created an interface because of removing the dependency of clients (e.g. a web service that may need to use with various file storages) on S3. This will let you add your implementation of file system, FTP and other file storage types and use then through dependency injection. Here is the code of this interface:

 

In this interface:

  • Download: Downloads a file hosted on S3 to disk.
  • ChangeDir: Changes the current directory/folder to the given directory. If the new directory (relativePath parameter) starts with / then the path will be representing an absolute path (starting from the RootDir) otherwise it will be a relative path and will start from the current directory/folder.
  • GetFileNames: Retrieves the file names of the current folder
  • GetSubDirNames: Retrieves the name of folders in the current folder
  • AddFile: Uploads a file to S3
  • FileExists: Checks to see if a file is already on S3
  • DeleteFile: Deletes the file from S3

The implementation of these method are quiet simple using AWS SDK for .NET. The only tricky part is that S3 does not support folders. In fact in S3 everything is a key-value pair and the structure of entries is totally flat. What we do however is to use the forward slash character to represent folders and then we use this character as a delimiter to emulate a folder structure.

Untitled

 

 

 

You can clone the repository of this code which is on GitHub to play with the code. Feel free to send a pull request if you want to improve the code. The GitHub repository is located at https://github.com/aussiearef/S3FileRepository