Better Living
     through
Computing Algorithms?
       Stephanie Troeth
      Montreal Girl Geek Dinner
            May 2...
Project management

[This talk is neither about project management ...]
Computing

[... nor strictly just about computing]
Efficiency ...
... through creative problem solving
Just for fun.
       [nothing scientific, or proven,
but maybe a basis for a thought experiment]
Let’s look at this in
    two unequal parts

• Choosing a couple of known problems, and
  looking at algorithms to apply
•...
Example issue #1:
Time management
Other ways you might know


   • Big rocks vs little rocks
   • Getting Things Done
Big rocks, little rocks
• Consider a finite space, such as a jar
• Imagine you have big rocks and little rocks
• If you fill...
Getting things done
•   Collect - get everything out of your head into your
    favourite form of “bucket”

•   Process - ...
Key aspects of efficiency

• Priorities (though GTD plays down on this)
• How tasks are defined
• Order of tasks
• A way to ...
How do you do it?
[at this point, a few people talked
about their tips and techniques —
  “tiny to-do lists”, variations on
GTD, what’s work...
The computer as your bus driver

• Priority queues
• Schedulers

  [we discussed bus queues as metaphors]
A few algorithms
• First In, First Out / Last in, First Out
• Shortest Job Next
• Shortest Time Remaining
• Critical path ...
First In, First Out
• What comes in first is handled first
• What comes in next waits until the
  first is finished
• Basicall...
Last In, First Out
• What comes in first is handled last
• Every item or task is handled the
  reverse order they arrived i...
Round Robin

• Gives each item an equal slice of time
• Rotates to next item when time is up
• Keeps going until all tasks...
Shortest Job Next
• Do the shortest job on the queue
  until it’s done
• Pick the next shortest job on the
  queue

 gets ...
Shortest Time Remaining
 • Do the task that has the smallest
  amount of time left
• When a new task turns up, compare it
...
Earliest Deadline First

• Do the task that’s closest to its
  deadline until it’s finished
• Then look at your queue for t...
Critical Path Method

•   Work out all activities that are required
•   How long each activity is likely to take?
•   Whic...
Example issue #2:
    Cooking
What’s for dinner?

• Caesar salad
• Lamb roast
• Vanilla ice cream with strawberry coulis
How do you make sure:
• the salad stays fresh
• the roast stays warm
• the coulis is sufficiently cooled (but not cold)
• t...
[at this point the we debated which
dish we should begin cooking first, and
 the finer points on how to make the
         pe...
Other ones to get our heads around
Divide and conquer
 Recursively breaking things down into related sub-problems, until
 ...
Endless fun
•   Putting away groceries?

•   Hanging up / putting away laundry?

•   Cleaning house (bottom up or top down...
All that said,
we are only
   human.
Thank you.
About
    Stephanie Troeth is someone who has the uncanny knack to make things
    happen. She likes the challenge of maki...
Upcoming SlideShare
Loading in …5
×

Better Living Through Computing Algorithms?

2,259 views

Published on

So it happened one day that a project manager Iwas working with complained about having too much to do and not being sure how to attack the pile.

"I use traditional computer processing algorithms," I said nonchalantly, and got an appropriately confused look. I then went on to explain some basic algorithms that helps computer systems prioritise what to do under certain circumstances to ensure maximum "useful" efficiency.

I was partially kidding, but, well, only partially. Is there a genuine possibility whereby we can use formulated ideas from a particular technical field to address day-to-day efficiency?

This talk is was about just that.

Published in: Technology, Business
  • Be the first to like this

Better Living Through Computing Algorithms?

  1. 1. Better Living through Computing Algorithms? Stephanie Troeth Montreal Girl Geek Dinner May 28, 2008
  2. 2. Project management [This talk is neither about project management ...]
  3. 3. Computing [... nor strictly just about computing]
  4. 4. Efficiency ...
  5. 5. ... through creative problem solving
  6. 6. Just for fun. [nothing scientific, or proven, but maybe a basis for a thought experiment]
  7. 7. Let’s look at this in two unequal parts • Choosing a couple of known problems, and looking at algorithms to apply • A brief discussion of other algorithms, and perhaps where we can apply them
  8. 8. Example issue #1: Time management
  9. 9. Other ways you might know • Big rocks vs little rocks • Getting Things Done
  10. 10. Big rocks, little rocks • Consider a finite space, such as a jar • Imagine you have big rocks and little rocks • If you fill it with little rocks first, there will be no more space left for the big rocks • If you fill it with big rocks first, you may still fit the little rocks between the gaps
  11. 11. Getting things done • Collect - get everything out of your head into your favourite form of “bucket” • Process - trimming off small tasks but allow for way to process bigger jobs • Organize - contextualize things that need doing • Review - make sure your lists are current • Do (!)
  12. 12. Key aspects of efficiency • Priorities (though GTD plays down on this) • How tasks are defined • Order of tasks • A way to execute them
  13. 13. How do you do it?
  14. 14. [at this point, a few people talked about their tips and techniques — “tiny to-do lists”, variations on GTD, what’s worked for them and what hasn’t.]
  15. 15. The computer as your bus driver • Priority queues • Schedulers [we discussed bus queues as metaphors]
  16. 16. A few algorithms • First In, First Out / Last in, First Out • Shortest Job Next • Shortest Time Remaining • Critical path method • Earliest Deadline First • Round Robin
  17. 17. First In, First Out • What comes in first is handled first • What comes in next waits until the first is finished • Basically: first come, first served
  18. 18. Last In, First Out • What comes in first is handled last • Every item or task is handled the reverse order they arrived in ... kinda like how you would sort a pile of papers you’ve just stacked together.
  19. 19. Round Robin • Gives each item an equal slice of time • Rotates to next item when time is up • Keeps going until all tasks are done
  20. 20. Shortest Job Next • Do the shortest job on the queue until it’s done • Pick the next shortest job on the queue gets a lot of things done, but longer jobs won’t get done if you keep adding short jobs
  21. 21. Shortest Time Remaining • Do the task that has the smallest amount of time left • When a new task turns up, compare it with the current one that you’re doing, give priority to the task with shortest time ... needs accuracy in time estimation
  22. 22. Earliest Deadline First • Do the task that’s closest to its deadline until it’s finished • Then look at your queue for the next item closest to its deadline works okay if you have enough resources to complete all your deadlines ...
  23. 23. Critical Path Method • Work out all activities that are required • How long each activity is likely to take? • Which activity depends on which? • Map out the shortest possible time to complete everything by adding up longest essential tasks based on dependencies
  24. 24. Example issue #2: Cooking
  25. 25. What’s for dinner? • Caesar salad • Lamb roast • Vanilla ice cream with strawberry coulis
  26. 26. How do you make sure: • the salad stays fresh • the roast stays warm • the coulis is sufficiently cooled (but not cold) • the ice cream stays frozen • the guests don’t have to wait too long between courses?
  27. 27. [at this point the we debated which dish we should begin cooking first, and the finer points on how to make the perfect caesar salad ...]
  28. 28. Other ones to get our heads around Divide and conquer Recursively breaking things down into related sub-problems, until each one can be solved directly. Bubble sort Compare pairs of adjacent items in a list, swap if necessary, until no swaps are needed. Travelling salesman problem What is the most economical route if a person were to travel to each city only once (where the distance between cities is known) and return to the home city?
  29. 29. Endless fun • Putting away groceries? • Hanging up / putting away laundry? • Cleaning house (bottom up or top down?) • Making the bed? • Applying make-up? • Baking? • Washing dishes? • Watering plants?
  30. 30. All that said, we are only human.
  31. 31. Thank you.
  32. 32. About Stephanie Troeth is someone who has the uncanny knack to make things happen. She likes the challenge of making dreams tangible. http://stephanietroeth.com/ Further Reading • http://www.nist.gov/dads/ • http://www.personal.kent.edu/~rmuhamma/Algorithms/algorithm.html • http://en.wikipedia.org/wiki/Scheduling_%28computing%29 Thanks • Olivier Thereaux • Stephanie Booth • http://flickr.com/photos/christajoy42/2385583808/ • http://flickr.com/photos/30261607@N00/2382070344/ • http://flickr.com/photos/gaetanlee/421949167/

×