• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Problem Solving Techniques For Evolutionary Design
 

Problem Solving Techniques For Evolutionary Design

on

  • 1,788 views

In this workshop, Naresh Jain explains what are the core techniques one should master to effectively practice evolutionary design while solving real world problems. To summarize: ...

In this workshop, Naresh Jain explains what are the core techniques one should master to effectively practice evolutionary design while solving real world problems. To summarize:
1. Eliminate Noise - Distill down the crux of the problem
2. Add constraints to future simplify the problem
3. Focus on one scenario at a time & incrementally build your solution
4. Refactor: Pause, look for a much simpler alternative
5. Be ready to throw away your solution & start again

Statistics

Views

Total Views
1,788
Views on SlideShare
762
Embed Views
1,026

Actions

Likes
1
Downloads
16
Comments
0

15 Embeds 1,026

http://blogs.agilefaqs.com 672
http://nareshjain.com 109
http://166.78.107.32 81
http://presentationstack.com 44
http://feeds.feedburner.com 37
http://agilefaqs.com 31
http://cloud.feedly.com 26
http://www.thoughtworks.com 19
http://localhost 1
http://digg.com 1
http://www.feedspot.com 1
http://newsblur.com 1
http://www.inoreader.com 1
http://inoreader.com 1
http://translate.googleusercontent.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Problem Solving Techniques For Evolutionary Design Problem Solving Techniques For Evolutionary Design Presentation Transcript

    • Problem Solving Techniques For Evolutionary Design Distilling Down Any Problem to Its Crux Naresh Jain naresh@agilefaqs.com @nashjain http://nareshjain.com
    • Rounding Up to the Closest 5 Cents • In my billing application • Given the price of an item comes up to $20.23 after tax • I want to round up 23 cents to the closest 5 cents denomination .i.e. 25 cents • So I can charge $20.25
    • Rounding Up - Ans • var price = 20.23; • var rounded_price = ceil(price / 0.05) * 0.05;
    • Commercial Break!
    • Copyright © 2013, AgileFAQs. All Rights Reserved.
    • Mumbai
    • Few More Products Copyright © 2013, AgileFAQs. All Rights Reserved.
    • Open Source Projects FitNesse Panopticode ProTest DBFit Lattu FitDecorator Patang ProFIT QWick
    • Tech Talks!
    • IP Address Range • Each country has blocks of IPv4 address range assigned to it • Given I have an IP address I want to figure out which country it belong to
    • Start End Total IPs Country 1.6.0.0 1.7.255.255 131072 India 1.22.0.0 1.23.255.255 131072 India 1.186.0.0 1.186.255.255 65536 India 1.0.32.0 1.0.63.255 8192 China 1.1.16.0 1.1.31.255 4096 China 1.4.16.0 1.4.31.255 4096 Japan • 196 countries with 100s of such blocks
    • 243.131.122.231 243*256*256*256 + 131*256*256 + 122*256 + 231 = 4085480167
    • public long convertToNumericIp() { long numericIp = 0; String[] octets = ip.split("."); for (int i = 0; i < 4; ++i) numericIp += parseInt(octets[i]) * Math.pow(256, 3 - i); return numericIp; } 243.131.122.231 243*256*256*256 + 131*256*256 + 122*256 + 231 = 4085480167
    • def move(players, player_turn) new_position = players[player_turn] + throw_dice new_position = @snakes_ladders[new_position] if @snakes_ladders.has_key?(new_position) return player_turn if new_position >= @board_size players[player_turn] = new_position next_player = (player_turn + 1) % players.length move(players, next_player) end
    • Medical System Age Calculating Program
    • Medical System Age Calculating Program Age Reported in Greater than 1 Year <Patient Name> is # Years old > 1 Month & < 1 Year <Patient Name> is # Months old > 1 Day & < 1 Month <Patient Name> is # Days old > 1 Hr & < 1 Day <Patient Name> is # Hours old
    • Medical System Age Calculating Program Age Reported in Greater than 1 Year <Patient Name> is # Years old > 1 Month & < 1 Year <Patient Name> is # Months old > 1 Day & < 1 Month <Patient Name> is # Days old > 1 Hr & < 1 Day <Patient Name> is # Hours old Doctors and Nurses might like to add and remove new Durations. For Ex: If they add Decade, and Patient’s age is greater than 10 years, then age should be reported as <Patient Name> is # Decades old. Similarly: If they add Week, and Patient’s age is greater than 7 Day, but less than a month, then age should be reported as <Patient Name> is # Weeks old.
    • private private private private private static static static static static final final final final final long long long long long MILLIS_IN_MIN = 60 * 1000L; MILLIS_IN_HOUR = MILLIS_IN_MIN * 60; MILLIS_IN_DAY = MILLIS_IN_HOUR * 24; MILLIS_IN_MONTH = MILLIS_IN_DAY * 30; MILLIS_IN_YEAR = MILLIS_IN_DAY * 365; private final TreeMap<Long, String> millisPerUnit = new TreeMap<Long, String>() { { put(MILLIS_IN_HOUR, "Hours"); put(MILLIS_IN_DAY, "Days"); put(MILLIS_IN_MONTH, "Months"); put(MILLIS_IN_YEAR, "Year"); } }; public String since(Date dob) { long deltaInMillis = differenceInMillisFromNow(dob); Entry<Long, String> duration = millisPerUnit.floorEntry(deltaInMillis); if (duration == null) return "0 Hours"; return deltaInMillis / duration.getKey() + " " + duration.getValue(); } private long differenceInMillisFromNow(Date date) { return clock.now() - date.getTime(); }
    • Recap • Eliminate Noise - Distill down the crux of the problem • Add constraints to future simplify the problem • Focus on one scenario at a time & incrementally build your solution • Refactor: Pause, look for a much simpler alternative • Be ready to throw away your solution & start again
    • Important Advice
    • Pick a Solution after Trying at least 3 Approaches
    • "Perfection (in design) is achieved not when there is nothing more to add, but rather when there is nothing more to take away." – Eric S Raymond
    • Quit Multitasking
    • Deliberate Practice
    • Next Steps?
    • Practice An Hour Each Day
    • Participate
    • Thank You! Questions? Naresh Jain @nashjain http://nareshjain.com