Tips for Time Management

Intro

"It's all about working smarter, not harder".

Effective Time Management techniques must be one of the most popular online topics among professionals of all fields. In Software Development specifically, being able to manage time is a critical skill every person should master, since the work usually requires large number of complex (and sometimes abstract) tasks, and the pressure to comply with a specified timeline. Also, good time management will allow developers and team managers to provide better estimates and assessments when facing new projects, as well as identifying unrealistic scenarios. At the same time, no matter how obsessed you are about your work, you would also like to accomplish great things in your personal life, have a healthy life-style, and make sure you spend quality time with your family and friends. In this post I’ll provide several tips that I’ve learned throughout my career from listening and paying attention to other great leaders and highly efficient people.

Select the best tools

You will need tools to capture data and manage time and activities. The first thing I’d suggest is to try several tools and find the perfect combination that works for you. Things you should consider are:

  • Easy access from  anywhere (desktop or mobile)
  • Very simple to use (you wanna make this process very simple and pleasant)
  • Use templates and forms (remove the repetitive areas and only focus on what you need)

In my case, I’ve found the following tools very useful:

  • Microsoft Outlook for managing work calendar
  • Google Calendar for managing personal activities (although some times I mingle work and personal items in Outlook, since the 9-5 schedule is no longer so rigid and we can get work done from anywhere and at any time).
  • Microsoft Outlook Tasks for maintaining a lists of pending items at work and reminders
  • Wunderlist mobile app for maintaining a list of personal pending items
  • Company’s Performance Tool to manage career goals
  • Google Drive to store forms and templates I’ll use throughout the year for personal growth

Tips for Time Management

  1. Set your Goals

    You wouldn’t visit a new country and try to drive without a GPS, would you? If you are really serious about your career, you would want to know your accomplishments and identify your areas needing improvements. You need to set realistic goals and push yourself to meet them, then you can perform an honest assessment and determine why you fell short, or if it was an extremely easy year, how to maximize your potential. You can use the TTT&T list:

    • Set goals for This year
    • Set goals for This month
    • Set goals for This week
    • Set goals for Today

    An interesting variation of this is the “Rule of 3“, proposed by JD Meier.

  2. Break down the goals into actionable and time-bound items.

    Tasks should be small (no more than a day) and outcome should be well-defined so you can measure results.

  3. Prioritize

    To be honest, I stopped worrying about keeping my master list sorted by priority at all times, since requirements tend to change frequently, and therefore priorities are affected. What I like to do is to make sure I have meaningful tasks up in the list and prioritize them based on due date and actual value (what benefits do I get from completing a task).

  4. Block time in calendar for focus time

    Calendar is a great tool, use it properly! Most people only use calendar items for team meetings and online calls. It is a great practice to also block time for focusing and completing a task. This is a great way for optimizing the work day and also letting your boss know that those meetings better be critical, otherwise some work is being pushed back.

  5. Set reminders

    Albert Einstein said: “Never memorize something that you can look up.” I guess this phrase universally applies to many things, but in this case, the bottom line is to free your memory and rely on tools to remind you what needs to get done. In my case, this allows me to go home for the weekend and totally disconnect, since I know that Outlook will tell me where I left off. Also, I never miss any birthday 😉

  6. Work more with a fresh brain

    Most people are more aware in the morning, but you should identify what is your most efficient time of the day (I used to prefer late night for getting stuff done when I was in college, but I now I’m more of a morning person). Choose tasks that require high level of concentration and effort and work on them when your brain is fresh, and leave simpler tasks for later.

  7. Track your daily achievements and reward yourself

    This is not about maintaining a diary, but recording meaningful things that are being completed so you can tell whether you are on track or not, and adjust you workload accordingly (or ask for help). I have to agree that this is not a fun task, as it represent extra work, however, the benefits are clearly visible and will be very helpful. You can try these tips:

    • Dot it the same time each day so it becomes part of the daily routine.
    • Use a template so it is very simple to do.
    • Review achievements on a weekly and monthly basis and reflect on them.
    • Recognize your accomplishments and reward yourself.
    • Identify what areas need more attention in order to meet your goals, and act on them.
  8. Calibrate your plan

    You should try to stick to your plan, even if your ultimate goals look impossible to reach sometimes. Perseverance and hard work is one of the greatest skills that will make a person succeed. However, often times the path we are taking to achieve those goals is not always the most efficient one, hence we need to calibrate and make subtle changes to get back on track. It is a good idea to frequently compare your achievements against your goals and make proper adjustments.

  9. Leverage Productivity Tools

    Here are some of the tools that can assist in becoming more efficient and aware:

    • RescueTime – Automatically tracks time and activities to help you understand daily habits and identity productivity issues.
    • Pomodoro Technique – Allows to organize and split the work day into small intervals, in order to reduce interruption and reach maximum focus.
  10. Say “No” more often

    This sounds bizarre, but it is actually one of the most important things we can do to be more productive and reach desired goals. It is not about insubordination or refusing to help others. This is about clearly defining what activities are more important in a given moment, and staying focused. It is also about avoiding unrealistic schedules that will result in stressful situations and missed deadlines. Every “yes” is actually a “no” to something else.

Summary

Time Management is a very critical skill every software developer should master. There are countless guides, articles, and tools available. The most important part is to recognize how to make efficient use of the time by spending it in meaningful tasks. It is also very important to reach a good work-life balance in order to feel accomplished and energized.

Reference

Productivity vs Guilt and Self Loathing – Scott Hanselman

15 Secrets Successful People Know about Time Management – Kevin Kruse

The 7 Habits of Highly Effective People – Stephen R. Covey

Getting Results the Agile Way – JD Meier

How to start doing TDD?

Intro

A colleague recently asked my advice about how to start incorporating Test-Driven Development (TDD) into his project. I don’t consider myself very advanced in this topic, but long ago I recognized the tremendous value of this development approach and the benefits it provides for writing good and clean software, therefore I started practicing it and forming my own learning path. Rather than jumping right into a demo, I decided to provide a set of initial pointers that will allow any developer to better understand and apply this development paradigm, even before writing a line of code.

What to learn before writing unit tests?

Here are some of the topics along with useful resources that will allow developers better understand and apply the TDD approach:

  • Understand how to write testable code
  • Learn the art of refactoring
  • Understand the TDD philosophy
    • What is Red->Green->Refactor workflow?
  • Try and choose a unit test framework that works for you and learn the syntax
  • Define a naming convention for your tests
    • Setting a naming convention is very important, since the number of test cases will grow exponentially as you write more code, and you want a quick way to identify what scenarios are being tested and what is breaking, just by glancing over the list of tests.
    • For test libraries, I like to use:
      • <libraryname>.tests.dll
    • For test methods, I like to use:
      • <classname>_<methodname>_<testconditions>_<expectedresult>
  • Practice, practice, practice
    • Exercism.com – I found this amazing site offering several simple exercises that must be solved using a TDD approach and can be implemented in multiple languages. Great resource not only for learning TDD, but also for keeping programming and logical skills sharp and learning a new language once in a while. It is also great to be able to view how other programmers implement the same solution, as well as providing and receiving feedback. I took the personal challenge of solving a couple of exercises every week.

Once you are very familiar with the above topics, you could try expanding into more adavanced scenarios:

  • Learn how to use mocks and fakes
  • Integrate unit tests into the Continuous Integration build
  • Get test coverage reports

Summary

I hope this post can be helpful to those developers wanting to incorporate TDD into their development approach for the first time. It only touches the surface, but hopefully it can serve as a starting point for future craftsmen, willing to put the extra effort in order to write clean, efficient and maintainable code.
Please let me know if you’d like to expand on any topic or add new ones to this list.

Reference

How to enable the Developer Dashboard in SharePoint 2013

Intro

The SharePoint Developer Dashboard is a built-in tool that has been available since SharePoint 2010. It provides diagnostic information that can be used by developers and system administrators to identify and troubleshoot issues related to page components. It also makes it easier to identify performance issues and resource usage right from the current page, which is easier than analyzing raw data from the ULS logs.

This post provides some details about changes to the developer dashboard in SharePoint 2013 and a PowerShell script to enable and disable the dashboard.

Changes to Developer DashBoard in SharePoint 2013

  • In SP 2010, the Developer Dashboard was rendered as a control in the master page, and it only showed information about the current request. In SP 2013 it shows as a separate window and it shows information about all request since the dashboard was enabled
  • The dashboard depends on “Usage and Health Data Collection Service Application”. This service must have been created and it must be running, otherwise no data trace data will be displayed (see Wictor Wilén post below).
  • The dashboard can be enabled (On) and disabled (Off). See the PowerShell below for performing these two actions.
  • The following tags must be present in the master page:
<SharePoint:DeveloperDashboard runat="server" />
<SharePoint:DeveloperDashboardLauncher
    ID="DeveloperDashboardLauncher"
    ThemeKey="spcommon"
    TouchMode="true"
    TouchModeWidth="30"
    TouchModeHeight="30"
    TouchModePaddingLeft="7"
    TouchModePaddingTop="7"
    TouchModePaddingRight="7"
    TouchModePaddingBottom="7"
    NavigateUrl="#"
    OnClick="ToggleDeveloperDashboard();return false"
    OuterCssClass="ms-dd-button ms-qatbutton"
    runat="server"
    ImageUrl="/_layouts/15/images/spcommon.png"
    AlternateText="<%$Resources:wss,multipages_launchdevdashalt_text%>"
    ToolTip="<%$Resources:wss,multipages_launchdevdashalt_text%>"
    OffsetX="237"
    OffsetY="30"
    HoverOffsetX="219"
    HoverOffsetY="66"
    Height="16"
    Width="16" />

PowerShell Script

The following script can be used to enable or disable the developer dashboard in a SharePoint 2013 farm:

# Add SharePoint cmdlets reference 
Add-PSSnapin "Microsoft.SharePoint.Powershell" -ErrorAction SilentlyContinue

#Enable Dashboard
$contentSvc = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$devDahsboardSettings = $contentSvc.DeveloperDashboardSettings
$devDahsboardSettings.DisplayLevel = "On"
$devDahsboardSettings.Update()

#Disable Dashboard
$contentSvc = ([Microsoft.SharePoint.Administration.SPWebService]::ContentService)
$devDahsboardSettings =$contentSvc.DeveloperDashboardSettings
$devDahsboardSettings.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::Off
$devDahsboardSettings.Update()

Summary

The SharePoint developer dashboard is a great tool to identify and troubleshoot page issues. In addition to ULSViewer, the dashboard is a great addition to the developer toolset for assisting in fine tuning custom components and ensuring good performance.

Reference

Using the Developer DashBoard (MSDN)

Developer Dashboard in SharePoint 2013

SharePoint 2013: Developer Dashboard shows no data “issue” (Wictor Wilén)

 

Testing content database before migrating to SharePoint 2013

Introduction

One of the steps in the SharePoint 2013 migration process is to test the content databases to identify potential issues before migrating to the new 2013 schema. This article shows a PowerShell script to execute the validation and export the results to a CSV file. Special kudos to Joe Rodgers for the original algorithm. I modified the code a little bit to be able to pass the parameters and focus on one DB at the time.

Script

Param(
 [Parameter(Mandatory=$true)] [string]$DBName,
 [Parameter(Mandatory=$true)] [string]$WebAppUrl
)

# array to store the output
$results = @()

Test-SPContentDatabase -Name $DBName -WebApplication $WebAppUrl | % {
   # get the SPContentDatabaseTestResultObject
   $databaseTestResult = $_

   # create a hash table
   $props = @{}

   # add the database name to the output
   $props.Add("DatabaseName", $DBName) 

   # dynamically add all of the SPContentDatabaseTestResult properties to the output
   $_ | Get-Member -MemberType *Property | % { 
     $props.Add($_.Name, $databaseTestResult.($_.Name)) 
   } 

   # add the hashtable to the output array
   $results += New-Object PSObject -Property $props
}

# dump the output to csv
$results | Export-Csv $("Test-ContentDatabaseResults_{1}_{0}.csv" -f (Get-Date).ToString("yyyy-MM-dd_hhmmss"), $DBName) -NoTypeInformation

How to use the Script

  1. Copy the above code into a file a name it “TestDB.ps1
  2. Save the file to a local directory in the SharePOint Server i.e: “c:\temp”
  3. Open SharePoint Management Shell
  4. Navigate to the script location i.e: “PS> cd c:\temp”
  5. Execute the script with the two parameters. i.e: PS> TestDB.ps1 -DBName <NameOfDatabase> -WebAppUrl <UrlOfWebApp>
  6. On successful completion, a CSV file is generated containing the DB name and the time stamp in the title i.e: Test-ContentDatabaseResults_DBName_2016-07-05_025815.csv
  7. Repeat the steps for each content DB to be upgraded

Reference

Upgrade Content Databases to SharePoint 2013

Export Test-SPContentDatabase Results to a CSV File

 

Setup SharePoint 2013 Single Server Environment – Part 4: SQL Server setup

Intro

This series describes the details and required steps for setting up a SharePoint 2013 Single Server Environment. This is typically used by developers in order to write custom solutions without interfering with one another. This type of environment is also is good for evaluation, training and demonstration purposes.
The series contains 6 parts:
  1. Environment Details
  2. VM setup
  3. Windows Server 2012 setup
  4. SQL Server setup
  5. SharePoint Installation and Initial Configuration
  6. Post-Installation Steps

SQL Server setup

This article contains the required steps to properly setup the SQL Server environment to properly run a single server SharePoint 2013 environment.

Install SQL Server 2012 Features

As per the previous article in this series, we should have downloaded the SQL Server 2012 ISO installation file and added it to the VM as a Virtual Optical Drive by now.
  1. From the virtual drive containing SQL installation, Run SETUP.EXE
  2. Select at least the following Core Features:
    1. Database Engine Services
    2. Management Tools – Basic
    3. Management Tools – Complete
  3. Select additional features based on specific needs

Setup Max Degrees of parallelism

Update the following PowerShell script, specifying the appropriate server instance.

#### Set MDOP to 1
Import-Module "sqlps" -DisableNameChecking
$sql = "EXEC sys.sp_configure N'show advanced options', N'1' RECONFIGURE WITH OVERRIDE
GO
EXEC sys.sp_configure N'max degree of parallelism', N'1'
GO
RECONFIGURE WITH OVERRIDE
GO
EXEC sys.sp_configure N'show advanced options', N'0' RECONFIGURE WITH OVERRIDE
GO"
Invoke-Sqlcmd -Query $sql [-ServerInstance "SERVER\instance"]

Open a PowerShell console with administrator credentials and execute the above script.

Note: If you are unable to execute PowerShell commands on the server, you may need to change the execution policy. See this link for reference. 

Delegate Permissions

  1. Open SQL Management Studio
  2. Create SQL Login for sp_admin service account
  3. Assign server roles:
    1. dbcreator
    2. securityadmin

 

<< Windows Server 2012 Setup SharePoint Installation & Config..>>

 Reference

Using the Set-ExecutionPolicy Cmdlet in PowerShell

 

Setup SharePoint 2013 Single Server Environment – Part 3: Windows Server 2012 Setup

Intro

This series describes the details and required steps for setting up a SharePoint 2013 Single Server Environment. This is typically used by developers in order to write custom solutions without interfering with one another. This type of environment is also is good for evaluation, training and demonstration purposes.
The series contains 6 parts:
  1. Environment Details
  2. VM setup
  3. Windows Server 2012 setup
  4. SQL Server setup
  5. SharePoint Installation and Initial Configuration
  6. Post-Installation Steps

Windows 2012 Server setup

This article contains the required steps to properly setup Windows Server 2012 with the required features to run a single server SharePoint 2013 environment, which includes setting Active Directory and Domain Controller.

Windows Server 2012 Installation

As per the previous article in this series, we should have downloaded the Windows Server 2012 ISO installation file and added it to the VM as a Virtual Optical Drive by now. When the VM is started, the Windows installation will kick in automatically.

Configure Server Roles

After the Windows installation is complete, follow this steps to properly add the required server roles and features:
  1. Setting Computer Name and Network Settings
    1. From the Server DashBoard go to Local Server
    2. Change Computer Name and Restart
    3. After restart, select Ethernet > Properties > Internet Protocol Version 4
    4. Specify network settings such as:
      1. IP address: 192.168.100.10,
      2. Subnet mask: 255.255.255.0,
      3. Subnet Gateway: 192.168.100.1
  2. Adding Server Roles
    1. From the Server Manager DashBoard click Add Roles and Features
    2. Set Installation Type to Role-Based or Featured-Based installation
    3. Under Server Roles, select Active Directory Domain Services
    4. Accept popup with required features
    5. Leave everything else as default and click through the end of the wizard
  3. Promote Server to Domain Controller
    1. Go to Server Manager > AD DS
    2. There should be a warning message on top displaying “Configuration required for Active Directory …”. Click More…
    3. On All Server Task Details click “Promote this server to a domain…”
    4. Under Deployment Configuration, select “Add a new forest” and specify the domain name
    5. Enter Administrator password
    6. Leave everything else as default and click through the end of thee wizard
    7. Computer will be restarted at the end
  4. Add users to Domain Controller
    1. After restart, open Active Directory Users and Computers
    2. Under Users, add all required accounts (tick “User cannot change password” and “Password never expires” options):
      1. sp_admin
      2. sp_instal
    3. Add sp_admin to the local “Administrators” group
  5. Install .NET 3.5 Features as prerequisite for SQL Server features installation
    1. From Server Manager > DashBoard click “Add roles and features”
    2. From Features tab select “.Net Framework 3.5 Features”
    3. Click through the end of the wizard.

 

<< VM Setup SQL Server Setup >>

Setup SharePoint 2013 Single Server Environment – Part 2: VM Setup

Intro

This series describes the details and required steps for setting up a SharePoint 2013 Single Server Environment. This is typically used by developers in order to write custom solutions without interfering with one another. This type of environment is also is good for evaluation, training and demonstration purposes.

The series contains 6 parts:

  1. Environment Details
  2. VM setup
  3. Windows Server 2012 setup
  4. SQL Server setup
  5. SharePoint Installation and Initial Configuration
  6. Post-Installation Steps

VM setup

This article describes the steps to create a virtual machine using Virtual Box. It also assumes that a MSDN subscription is available in order to download the required software installation.

  1. Get the software installations from MSDN
    • Windows Server 2012 (64-bit)
    • SQL Server 2012
    • SharePoint 2013 Server
  2. Download and Install Virtual Box
  3. Create a new VM
  4. Assign the following parameters:
    • Type: Microsoft Windows
    • Version: Windows 2012 (64-bit)
    • Memory Size: 8192 MB
    • Hard Disk: Create a virtual hard disk now
    • File Size: 100 GB
    • Hard Disk File Type: VDI (VirtualBox Disk Image)
    • Storage on Physical Hard Disk: Dynamically Allocated
  5. After the VM is created, click Settings from the top menu and set the following from the left menu:
    1. Storage: Add the all the ISO installation files, starting by Windows Server 12
    2. System: Increase the number of processors to 2
    3. Network: On the Adapter 2 tab, select Bridge Adapter and use the current adapter from the host machine

 

<< Environment Details Windows Server 2012 Setup >>

Reference

VirtualBox Site

MSDN Subscriber Downloads