Test-Driven Development Isn’t Testing [Guest Post]

This is a guest post from Judge Maygarden:

I’ve tried diving in to test-driven development (TDD) a few times over the years. For some reason, it’s never really stuck with me. So, I went looking for literature critical of TDD. This led me to an interesting article.

Jeff Patton makes the point that TDD is not a testing process; it’s a design process [1]. Unit tests should not be written to test a function or an object. Rather, the tests should be defining some specific program functionality with objects and methods created to make that happen. So, a unit test describes the software design first, and any thorough testing is more of an afterthough.

That makes the leftover regression test part of TDD a little less appealing. However, Patton makes a very good case for TDD by replacing “testing” with “design” as follows:

Looking back at the three common reasons for not writing unit tests, let’s substitute design for test:
• Designing takes too much time.
• How could I design first if I don’t know what it does yet?
• Designing won’t catch all the bugs

That makes TDD sound like a no-brainer. In my opinion, it really seems to boil down to using the best tool for the job. If your development environment is geared towards the TDD design process and profligate refactoring, then go for it. It does seem like a productive design process. Just don’t forget to test it with other techniques as well.

[1] Patton, Jeff (2005). Test-Driven Development Isn’t Testing. In StickyMinds.com Software Testing & QA Online Community. Retrieved from http://www.stickyminds.com/s.asp?F=S8497_COL_2.

Tagged , , , , , ,

Unit Testing using files from Amazon S3 in C#

Using actual files is not an ideal solution for unit testing. You should have some sort of interface that duplicates what’s in a file. Unfortunately, the current solution I’m working on doesn’t have an interface (yet!). I thought about storing the files in the project, but was concerned because the files we were testing would probably adjust, and I didn’t want the size of the project to expand. In our project, we use NUnit but the concepts are similar across most unit testing tools. One other thing to note is that you will need the AWS SDK for .NET.

First we need a way to store the files in our unit tests and access them across multiple tests while without having to download them multiple times.

private List<string> _s3Files;

[TestFixtureSetUp]
public void Init()
{
    _s3Files = GetFilesFromS3();
}

Now let’s take a look at the GetFilesFromS3() method:

private IEnumerable<string> GetFilesFromS3()
{
    List<string> files = new List<string>(5);
    
    foreach (string fileKey in AmazonS3Utils.GetFilesFromBucket(ACCESS_KEY, SECRET_KEY, BUCKET))
    {
        //place them in a temporary directory
        string fileName = Path.GetTempPath() + fileKey;
        AmazonS3Utils.DownloadFile(ACCESS_KEY, SECRET_KEY, BUCKET, fileKey, fileName);
        files.Add(fileName);
    }

    return files;
}

Notice that you’ll need to use your Amazon S3 access key, secret key, and the specific bucket to download the files from. As you can see, I created an Amazon S3 helper class for some of the functions to download the files. Here’s the GetFilesFromBucket code:

public static List<string> GetFilesFromBucket(string accessKey, string secretKey, string bucketName)
{
    List<string> files = new List<string>(5);

    using (AmazonS3 client = Amazon.AWSClientFactory.CreateAmazonS3Client(accessKey, secretKey))
    {
        try
        {
            ListObjectsRequest request = new ListObjectsRequest();
            request.BucketName = bucketName;

            do
            {
                ListObjectsResponse response = new ListObjectsResponse();
                try
                {
                    //for some reason, I had to try catch just this method to get it to work
                    response = client.ListObjects(request);
                }
                catch { }
                 

                // Process response.
                files.AddRange(response.S3Objects.Select(entry => entry.Key));

                // If response is truncated, set the marker to get the next 
                // set of keys.
                if (response.IsTruncated)
                {
                    request.Marker = response.NextMarker;
                }
                else
                {
                    request = null;
                }
            } while (request != null);
        }
        catch (AmazonS3Exception amazonS3Exception)
        {
            if (amazonS3Exception.ErrorCode != null &&
                (amazonS3Exception.ErrorCode.Equals("InvalidAccessKeyId")
                 ||
                 amazonS3Exception.ErrorCode.Equals("InvalidSecurity")))
            {
                Console.WriteLine("Check the provided AWS Credentials.");
                Console.WriteLine(
                    "To sign up for service, go to http://aws.amazon.com/s3");
            }
            else
            {
                Console.WriteLine(
                    "Error occurred. Message:'{0}' when listing objects",
                    amazonS3Exception.Message);
            }
        }
    }
    return files;
}

And now, here’s the code to download a file from s3 using an access key, secret key, bucket name, and the output file name:

public static void DownloadFile(string accessKey, string secretKey, string bucketName, string key, string outputFileName)
{
    //only download if file doesn't exist
    if (File.Exists(outputFileName))
        return;

    AmazonS3Client client = new AmazonS3Client(accessKey, secretKey);

    GetObjectRequest request = new GetObjectRequest().WithKey(key).WithBucketName(bucketName);
    using (GetObjectResponse response = client.GetObject(request))
    {
        using (FileStream fs = new FileStream(outputFileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None))
        {
            using (Stream responseStream = response.ResponseStream)
            {
                //if using .NET 4 or higher, we could just use stream.copy
                //since we are using .NET 3.5 we have a helper method to buffered copy
                responseStream.BufferedCopyTo(fs);
            }
        }
    }
}

So now, we’ve successfully downloaded a list of files from an Amazon S3 bucket and stored the file names to be used for each of the tests we’re running. Now we need to use them in a unit test:

[TestMethod]
public void ClassToTest_TestToRun()
{
    IEnumerable<string> files = GetFilesFromS3();
    foreach (var file in files)
    {
        //do whatever you need to do
    }
}

This might not be an ideal use case for extremely large files because every time the project builds, it has to download the files and run the unit tests. The nice thing is that if the files are already downloaded, the code above doesn’t need to download the files from S3.

Tagged , , , ,

Time Periods in .NET

I was working on a difficult problem last week at work. I had a list of times and I needed to find the overlapping periods (if any). Here’s a simple example, if we have 3 periods of time:

  • 3/24/2013 5:00am – 3/24/2013 7:00am
  • 3/24/2013 6:15am – 3/24/2013 12:00pm
  • 3/25/2013 10:00am – 3/25/2013 6:00pm

The expected output would be one overlapping period of 3/24/2013 6:15am to 3/24/2013 7:00am.

To add more complexity to the problem I was facing, there are three types of periods and we have to find overlaps in each. In other words, I needed to find overlapping times that occurred in Type A, Type B, and Type C. Which means I couldn’t just throw all the times together and find overlaps because it might just be an overlap in Type A and Type C.

As you can tell, it became complicated, quickly. I spent an hour or so trying to figure out how to get it to work, and was struggling. I then found a great utility called Time Period Library for .NET. It’s a great tool if you are building a reservation program to see if a room is available for selected times.

In my case, I imported the Time period Library from NuGet into my project (p.s. I love NuGet!). Then I declared a TimePeriodCollection for each type of  period I need to use.


TimePeriodCollection typeAPeriods = new TimePeriodCollection();
TimePeriodCollection typeBPeriods = new TimePeriodCollection();
TimePeriodCollection typeCPeriods = new TimePeriodCollection();

In my case, the three types of periods are optional, so there’s another layer of complexity. Based on which type of periods are being used, I fill up the TimePeriodCollections.

if (isTypeA)
	foreach (var dateTime in typeADates)
		typeAPeriods.Add(new TimeRange(dateTime.Start, dateTime.End));
if (isTypeB)
	foreach (var dateTime in typeBDates)
		typeBPeriods.Add(new TimeRange(dateTime.Start, dateTime.End));
if (isTypeC)
	foreach (var dateTime in typeCDates)
		typeCPeriods.Add(new TimeRange(dateTime.Start, dateTime.End));

Once the TimePeriodCollections are filled, I have to find the overlapping times. If we are only using one of the types, then it’s a simple case of using ALL of the time periods (no need to use the Time Period library. If we are using two of the types, we only have to run the calculation once. Finally if we are using all three types, have to run the calculation twice.

First, we declare the variables that will hold the results:

//final overlapping periods
ITimePeriodCollection overlapPeriods = new TimePeriodCollection();

//used to help find overlaps
TimePeriodIntersector<TimeRange> periodCombiner = new TimePeriodIntersector<TimeRange>();    

//periods to check to see if they overlap
TimePeriodCollection periodsToCheck = new TimePeriodCollection();

First, I check to see if Type A is being used (if so, then we might be using all three types). If we aren’t using type A, then we know we are using type B and C (remember, I check for the use of only one type prior to all of this).

if (isTypeA)
{
	periodsToCheck.AddAll(typeAPeriods);
	if (isTypeB)
	{
		//find overlaps between type a and type b
		periodsToCheck.AddAll(typeBPeriods);
		overlapPeriods = periodCombiner.IntersectPeriods(periodsToCheck);
		
		//reassign periods to check to the overlapping periods if we have to look at type C
		periodsToCheck = (TimePeriodCollection) overlapPeriods;
	}
	if (isTypeC)
	{
		//find overlaps between type a (and possibly type b)
		periodsToCheck.AddAll(typeCPeriods);
		overlapPeriods = periodCombiner.IntersectPeriods(periodsToCheck);
	}
}
else
{
	//find overlaps for just type B and type C
	periodsToCheck.AddAll(typeBPeriods);
	periodsToCheck.AddAll(typeCPeriods);
	overlapPeriods = periodCombiner.IntersectPeriods(periodsToCheck);
}

From here, the variable overlapPeriods contains the range of start and end times that are overlapping. The Time Period Library is great for any date/time logic you might have for your .NET application.

Tagged , , , , , ,

Free Kindle Books

I have a bad habit of buying 3 or 4 books when I already have 20-30 books waiting to be read in my backlog. It doesn’t help when I get an email every morning from Amazon about their kindle daily deals. There’s usually 4 or 5 books on sale for $1.99. Some of the books have been amazing (see Philip K. Dick) and some of been awful. There’s also the kindle monthly deals which is 100 books for $3.99 or less.

If you’re just starting your kindle book collection or looking to read some classics, there are a lot of classics from Project Gutenberg that are completely free and can automatically be downloaded in a kindle format. Downloading a book from Project Gutenberg and getting it to your kindle takes a few steps:

  1. Once you have found the book you want to download (I’d suggest The Time Machine by H.G. Wells), there will be links for several formats. If you are using a kindle, left-click on the Kindle link.kindle
  2. Once you have downloaded the file, you will need to send to it your kindle through email. To find your Send-to-Kindle e-mail address, visit the Manage your Devices page at Manage Your Kindlekindle2
  3. Send an email to that address and add the file you downloaded as an attachment. After a few minutes, it will show up in your kindle.

If you have Amazon Prime, you also have access to several thousand books through the Kindle lending library. The program allows you to borrow one book a month from their specific lists of books. I have read 15 books using this and it’s been a great perk of the Amazon Prime program. To access the list, you can click here, or you can do it the manual way by:

  1. Go to Amazon
  2. Under the “Shop by Department” header, select “Books”
  3. Then select “Books” again (note: don’t go to the kindle books link)
  4. On the left, if you scroll down, there will be a checkbox that says, “Prime Eligible.” Check that box
  5. After the page reloads, at the top of the list of books, select “Kindle Edition”
  6. You now have a list of all books available to borrow for free. (link for the lazy)

One thing to note, to actually borrow it for free, you will have to shop for the book on your kindle.

Amazon EC2 Explained for a Five Year Old [Guest Post]

We are working with Amazon EC2 at work and a coworker wrote up a story to help explain EC2. Enjoy.

There once was a King named King ComputerCorp who wants to build a nice town for his people. So he set out to find other Kings who have done something like that. One day, after almost giving up, The King eventually found a very large castle called Amazon! As he stood on the long road that goes into this massive castle, he sees that there are many many towns surrounding it! This made the King very excited! The King set off to the castle to speak with the King there.

Upon reaching King of Amazon, he asked how he could build a large town for his kingdom. The Amazon King said, well you would need servants and a wizard to do something like that. The King was glad to hear that it would be easy to do. So he asked if he could buy some from the Amazon King. The Amazon King was happy to do so!

So the King of ComputerCorp got a few servants and a wizard and stared his long journey back to his kingdom. He set out his servants to start building a town for his people. Before long, the King noticed that the people of his kingdom needed more towns to live comfortably. He had some servants but he needed more to do this, so he asked his wizard to make more servants! The wizard started to make more, but the King was not happy. The Kings people needed those towns quickly, but the wizard was very slow. The King thought and he thought and he thought: “How can I make my servants that I have now, work more and stay working without stopping?”. The King new this was a bad idea because it would cost the King all of his gold to keep those servants going.

The King was furious, and wanted to know why his wizard was so slow! He sent a messenger to the Kingdom of Amazon to ask their King why the wizard was so slow. The King of Amazon replied “Well, making new servants take time. The wizard needs to make sure there isn’t anything wrong with the new servant. I only provide perfect wizards who do this! I can say, if my daughter, Princess FeatureResearch, would have signed the treaty with the Kingdom of CommonSense, I could provide much faster and ideal wizards!” The King of Amazon sent the messenger back with that message.

The King of ComputerCorp received the message and became sad. He knew that if only the wizards worked just a bit faster, his towns would be built and ready for his people much sooner. So the King thought of another idea or two. He thought what if he invented a single powerful wizard to build he towns with magic? He also thought what if he could just get a lot of servants and have his servants work on multiple towns instead of just one at a time?

To this day, it is missing from history and time itself, what the King of ComputerCorp done to make sure his people has towns to live in. Maybe he got that one powerful wizard to do it, maybe he got hundreds of servants? It was rumored that a dragon found the Kingdom of ComputerCorp and destroyed all his towns and forced the King to invent robots. We may never now!

Now goodnight and go the f**k to sleep!

– written by Richard Shaw

Tagged , , ,

Atomic Time in C#

Sometimes knowing the exact time is important. If you are trying to sync data between GPS or other values that are synced to satellites, getting the atomic time from an NIST server is required.

I created a method of getting the current time from one of several time servers at any time. You do this by calling:

AtomicTime.Now

The good thing about the code is that once it has the exact time from a server it no longer has to contact one of them because the code keeps track of the time since we originally got the time by using a Stopwatch.

First I created a static class so we can call it anywhere and at anytime.

public static class AtomicTime

Then we added a few private variables to help with getting the current time:


 private static DateTime _currentAtomicTime;
 private static bool _canConnectToServer = true;
 private static Stopwatch _timeSinceLastValue = new Stopwatch();
 private static readonly object Locker = new object();
 private static Countdown _countdown; //used to help ensure we get the fastest server

You’ll see that I created a Countdown object to help us get the fastest server. Currently we are using the .NET 3.5 platform so we don’t have access to a CountdownEvent from .NET 4.0 and higher. I got help for the following code from Joseph Albahari great instruction on Threading in C#.


public class Countdown
{
  readonly object _locker = new object();
  int _value;

  public Countdown() { }
  public Countdown(int initialCount) { _value = initialCount; }
  public void Signal() { AddCount(-1); }
  public void PulseAll()
  {
    lock (_locker)
    {
      _value = 0;
      Monitor.PulseAll(_locker);
    }
  }

  public void AddCount(int amount)
  {
    lock (_locker)
    {
      _value += amount;
      if (_value <= 0) Monitor.PulseAll(_locker);
    }
  }
  public void Wait()
  {
    lock (_locker)
      while (_value > 0)
        Monitor.Wait(_locker);
  }
}

The Countdown object helps us connect to multiple time servers at once and when we finally get the time, we can pulse the Countdown object and stop all the other threads. Now we create a way to get the current time from a server by passing in the name of the server. If the server is currently up and working, the value it returns needs to be parsed. There is some information about the return value which is RFC-867 format. I’ve commented in the code some of the places where I found examples on parsing the information. What wasn’t clear however is how to handle the milliseconds portion of the time. I know we get the date and time down to the seconds. There seems to be a milliseconds portion that I handle by subtracting from the received date and time to help ensure we have the exact atomic time. As you can see in the following code, once we have a valid time, we can pulse the other threads and stop attempting to contact the time servers.

</pre>
private static void GetDateTimeFromServer(string server)
  {
    if (_currentAtomicTime == DateTime.MinValue)
    {
      try
      {
        // Connect to the server (at port 13) and get the response
        string serverResponse;
        using (var reader = new StreamReader(new System.Net.Sockets.TcpClient(server, 13).GetStream()))
          serverResponse = reader.ReadToEnd();

        // If a response was received
        if (!string.IsNullOrEmpty(serverResponse) || _currentAtomicTime != DateTime.MinValue)
        {
          // Split the response string ("55596 11-02-14 13:54:11 00 0 0 478.1 UTC(NIST) *")
          //format is RFC-867, see example here: http://www.kloth.net/software/timesrv1.php
          //some other examples of how to parse can be found in this: http://cosinekitty.com/nist/
          string[] tokens = serverResponse.Replace("\n", "").Split(' ');

          // Check the number of tokens
          if (tokens.Length >= 6)
          {
            // Check the health status
            string health = tokens[5];
            if (health == "0")
            {
              // Get date and time parts from the server response
              string[] dateParts = tokens[1].Split('-');
              string[] timeParts = tokens[2].Split(':');

              // Create a DateTime instance
              var utcDateTime = new DateTime(
              Convert.ToInt32(dateParts[0]) + 2000,
              Convert.ToInt32(dateParts[1]), Convert.ToInt32(dateParts[2]),
              Convert.ToInt32(timeParts[0]), Convert.ToInt32(timeParts[1]),
              Convert.ToInt32(timeParts[2]));

              //subject milliseconds from it
              if (Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator == "," && tokens[6].Contains("."))
                tokens[6] = tokens[6].Replace(".", ",");
              else if (Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator == "." && tokens[6].Contains(","))
                tokens[6] = tokens[6].Replace(",", ".");

              double millis;
              double.TryParse(tokens[6], out millis);
              utcDateTime = utcDateTime.AddMilliseconds(-millis);

              // Convert received (UTC) DateTime value to the local timezone
              if (_currentAtomicTime == DateTime.MinValue)
              {
                _currentAtomicTime = utcDateTime.ToLocalTime();
                _timeSinceLastValue = new Stopwatch();
                _timeSinceLastValue.Start();
                _countdown.PulseAll(); //we got a valid time, move on and no need to worry about results from other threads
              }
            }
          }
        }
      }
      catch ()
      {
        // Ignore exception and try the next server
      }
    }

    //let CountdownEvent know that we're done here
    _countdown.Signal();
  }

Once we are able to get the time from a server, we are able to I created a DateTime called Now to duplicate the name of DateTime.Now. If we have already retrieved the time from a server, we just have to add the length of time since we last retrieved and return the time. If we were unable to contact any server, we return with DateTime.MinValue and will handle that wherever we call AtomicTime.Now.

</pre>
public static DateTime Now
{
  get
  {
    //found part of this code here: http://www.datavoila.com/projects/internet/get-nist-atomic-clock-time.html

    //we have attempted to connect to the server and had no luck, no need to try again
    if (_canConnectToServer == false)
      return DateTime.MinValue;

    //keep track so we don't have to keep connecting to the servers
    if (_currentAtomicTime != DateTime.MinValue)
    {
      _currentAtomicTime += _timeSinceLastValue.Elapsed;
      _timeSinceLastValue.Reset();
      _timeSinceLastValue.Start();
    }
    else
    {
      //ensure we aren't doing this multiple times from multiple locations
      lock (Locker)
      {
        if (_currentAtomicTime != DateTime.MinValue) //we got the time already, pass it along
        {
          _currentAtomicTime += _timeSinceLastValue.Elapsed;
          _timeSinceLastValue.Reset();
          _timeSinceLastValue.Start();
        }
        else
        {
          // Initialize the list of NIST time servers
          // http://tf.nist.gov/tf-cgi/servers.cgi
          var servers = new[]
          {
             "nist1-ny.ustiming.org",
             "nist1-nj.ustiming.org",
             "nist1-pa.ustiming.org",
             "nist1.aol-va.symmetricom.com",
             "nist1.columbiacountyga.gov",
             "nist1-atl.ustiming.org",
             "nist.expertsmi.com",
             "nisttime.carsoncity.k12.mi.us",
             "nist1-lnk.binary.net",
             "www.nist.gov",
             "utcnist.colorado.edu",
             "utcnist2.colorado.edu",
             "ntp-nist.ldsbc.edu",
             "nist1-lv.ustiming.org",
             "nist-time-server.eoni.com",
             "nist1.aol-ca.symmetricom.com",
             "nist1.symmetricom.com",
             "nist1-la.ustiming.org",
             "nist1-sj.ustiming.org"
          };

          // Try 5 servers in random order to spread the load
          var rnd = new Random();
          _countdown = new Countdown(5);
          foreach (string server in servers.OrderBy(s => rnd.NextDouble()).Take(5))
          {
            string server1 = server;
            var t = new Thread(o => GetDateTimeFromServer(server1));
            t.SetApartmentState(ApartmentState.STA);
            t.Start();
          }
          _countdown.Wait();
          if (_currentAtomicTime == DateTime.MinValue)
            _canConnectToServer = false;
        }
      }
    }

    return _currentAtomicTime;
  }
}

Mobile App Revolution

I think there’s almost a belligerence – people are frustrated with their manufactured environment. We tend to assume the problem is with us, and not with the products we’re trying to use. In other words, when our tools are broken, we feel broken. And when somebody fixes one, we feel a tiny bit more whole.
– Jonathan Ive

Obvious statement of the day: the iPhone has revolutionized the way things are done in our lives. There are millions of apps that give us access to parts of our lives that we didn’t know we needed 10 years ago. With a swipe of a finger we have access to our insurance companies; social media; photos of family; and any type of game you can imagine.

On reddit there’s a a sub-reddit for iPhones and about once every few months people post pictures of their iPhone home screen (herehere, and here). These pictures tell you a lot about a person. The home screen contains a person’s most used apps. You’ll see a lot of the same apps on the home screen, including: camera, phone, messages, email, web, and some social app. There are so many apps out there, that looking at someone else’s phone allows you to discover more apps. It can be difficult to find new apps due to their enormous numbers and lack of organization. My current home screen is on the right. What does your home screen look like?

What surprises me about apps is how people will refuse to pay $1.99 for a quality app on their phone. For some reason, if it’s not $0.99 or free, it’s too expensive. While there are many quality free apps in the app store, as with most things in the world, you pay for what you get. Here are the apps on my home screen that were at least $1.99:

  • Alien Blue – it’s a free reddit app but I bought the in-app extras to support the creator
  • TweetBot – the best Twitter app I have found
  • Golfshot GPS – $20 app that has amazing GPS maps and distances when playing golf
  • British Military Fitness – the My Instructor app near the bottom right that includes guided workouts following the BMF style
  • Sparrow – the email app that Apple should have made. It was recently bought by Google, so development has ceased, but it is still worth the $3
  • Downcast - As I mentioned in my podcast post, I listen to a lot of podcasts. I’ve tried probably 5 different apps, and Downcast is the best.

How has the smart phone changed your life?

Tagged , , , , , , ,

Tubas on the March

“The tuba is certainly the most intestinal of instruments, the very lower bowel of music.”
― Peter De Vries

I’m always surprised at how well my dad remembers lyrics from 50+ years ago, but then again music is an important part of his life. He’s been playing guitar since he was a young boy and is the best singer in our immediate family.

I played in the band through middle and high school (including a year of Marching Band in college). Some of my best times in school were in the band. A few months ago, I was able to borrow a tuba from my wife’s middle school to play over the summer. It’s amazing how much you lose after 10 years. One of the reasons the band instructor let me borrow the tuba was to provide support for the young players at school. I volunteer a few times a week with some one-on-one practice and time with the whole band. I’m sure it’s helping the students, but more so, I love being part of a band again. My wife, a flute player, also plays with the band a few days a week during her planning period.

My favorite present growing up was to see Maynard Ferguson at Blues Alley with my parents and friend for my 16th birthday. We sat in the table closest to the stage and I was less than six feet from hearing his amazing trumpet. It was an experience I will never forget. Check out my favorite Maynard song.

Another memorable moment from my past was playing in the Kennedy Center for Tuba Christmas in high school. Over 100 tubas and euphoniums from around the DC area met and rehearsed for an hour or two and then played in front of a large audience at the Kennedy Center. Hearing that many tubas playing Christmas carols was hilarious. There are still plenty of Tuba Christmas events around the country. Find the one closest to you and play along or be a part of the crowd.

I’ve met at least one person who said that they didn’t really like music and preferred to listen to talk radio. I like talk radio and podcasts more than most people, but nothing can replace the emotion that music generates. Needless to say, that person who doesn’t like music is no longer in my life.

Tagged , ,

Your Presentation Sucks

I have a terrible condition where my eyes glaze over as soon as I’m in an audience in a dark room with a projector turned on. We’ve all been subjected to boring presentations; whether in a conference room at work or by a professor in a classroom. As soon as you read straight from a PowerPoint slide, the audience tunes you out.

At the iTen Wired Summit, David Powell from TekLinks gave a great overview of how consumers are driving mobile technologies to the cloud and beyond. Some of the content was a rehash but was so well presented in a hair band theme that made the presentation memorable and entertaining. What a concept: enjoying and remembering ideas in a corporate setting.

On the flip-side, there was a presentation given at a conference on Big Data this past summer. I had high hopes. The audience was full of people who are dealing with massive amounts of data and weren’t sure how to handle it. Rather than talking about the challenges and some recommendations, the presenters spent 45 minutes flipping through slides and speaking as fast as possible. Some slides had 100+ words on them and were impossible to follow. Rather than telling the story of Big Data, they just explained facts faster than the audience could comprehend. We all left more confused than when the presentations started.

Here are some tips to improve your presentations:

  1. Keep it simple. Presentations can contain very complex items, but the more information you show on a slide, the less information your audience will retain.
  2. Tell stories. Viewers of your presentation are more likely to remember a story and the ideas presented in the story that just straight facts. (Check out this quick video on story telling in presentations).
  3. Give the audience something to remember your presentation. This can include a theme to your slides or a simple key phrase you repeat several times.
  4. Provide more than just bullet points with lists of information (including large pictures, audio clips, and/or video clips). Avoid using cheesy clip art as this takes away from the professionalism.

For a quality example, check out: http://www.slideshare.net/jmtcz. You can also check out Garr Reynolds’ book Presentation Zen for ideas on how to improve your presentation delivery. Take that extra 30 minutes to improve the presentation and people will enjoy your talks rather than dread them.

Tagged , ,

TED Talks

“If you hire people just because they can do a job, they’ll work for your money. But if you hire people who believe what you believe, they’ll work for you with blood and sweat and tears.”

— Simon Sinek

TED Talks are a great way to learn about new ideas and new technologies in short (less than 20 minute) talks by leaders in a field. Here are some of my favorites:

  • Ramesh Raskar: Imaging at a trillion frames per second
    • Ready to have your mind blown? “Ramesh Raskar presents femto-photography, a new type of imaging so fast it visualizes the world one trillion frames per second, so detailed it shows light itself in motion. This technology may someday be used to build cameras that can look ‘around’ corners or see inside the body without X-rays.”  The future is now, and it’s being developed at research institutions like MIT.
  • Simon Sinek: How great leaders inspire action
    • Simon’s talk inspired me to buy his book on the same subject, Start with Why. His talk really helps show how when you get people who believe in WHY you do things, they’ll work their ass of for you. Rather than starting with What gets done or How it gets done, we need to focus on Why we do things in our daily work life, our personal life, and even how we market ourselves and our products.
  • Ian Dunbar on dog-friendly dog training
    • I love dogs, I’m sure most of you know that. It’s why three of them look to us to feed them. Please learn to train your dogs the right way. Focusing on the dog’s perspective allows us to build their love and trust. We can’t get mad at a dog for doing something that we’ve trained them to do when they were younger.
  • Dan Ariely asks, Are we in control of our own decisions?
    • I’ve read Dan Ariely’s book Predictably Irrational and this is an extension based on the book. It’s amazing to see how often humans make poor decisions in situations where we’d like to think we know what is best for us. He gives several cases for how companies and governments present information to us can change outcomes. For example, the DMV is where we choose whether we are organ donors. In one place, there was an opt-in policy. The customer had to check a box saying they WANTED to be an organ donor. In another location, there was an opt-out policy. The customer had to check saying they DIDN’T want to be an organ donor. The location with the opt-out policy had a large amount of organ donors because the simple act of reading and checking a box can be challenging for us.
  • Dan Pink: The puzzle of motivation
    • I first saw this talk just a few weeks ago while reading Jeff Atwood’s book Effective Programming when he talked about motivating employees. It relates to Simon Sinek’s talk from above. Money doesn’t motivate people for complex tasks.
  • Ken Robinson says schools kill creativity
    • Sir Ken’s humorous talk gives the case to increase creativity in schools by actually acknowledging the different types of intelligence. My wife’s a teacher and loves this talk. Rather than just to teach towards standardized tests, let us find ways to teach kids art, music, and dance in addition to the 3 Rs.
  • Michael Specter: The danger of science denial
    • “Vaccine-autism claims, “Frankenfood” bans, the herbal cure craze: All point to the public’s growing fear (and, often, outright denial) of science and reason, says Michael Specter. He warns the trend spells disaster for human progress.”
Tagged , , , ,
Follow

Get every new post delivered to your Inbox.

Join 162 other followers

%d bloggers like this: