'2008/04'에 해당되는 글 6건

  1. 2008/04/10 # GM Gentra X
  2. 2008/04/09 # Code Kata One
  3. 2008/04/09 # Code Kata Background
  4. 2008/04/04 # 아둥바둥....
  5. 2008/04/03 # 그 놈 참....
  6. 2008/04/01 # 구글의 사투리 번역 서비스
2008/04/10 11:04

# GM Gentra X

# 나름 깔끔하고 작지만 이쁜 것 같은데.
   갑자기 차 사고 싶어~~~~~~~~~~~~~~

사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
크리에이티브 커먼즈 라이선스
Creative Commons License

'Bla Bla Bla~' 카테고리의 다른 글

# Toroid: An Open Source Middleware for IPTV!  (0) 2008/05/29
# 빌게이츠 방한, 무엇을 하나?  (0) 2008/05/06
# GM Gentra X  (0) 2008/04/10
# 아둥바둥....  (0) 2008/04/04
# 구글의 사투리 번역 서비스  (0) 2008/04/01
# 결국 노트북 지르다..  (0) 2008/02/25
Trackback 0 Comment 0
2008/04/09 20:41

# Code Kata One

Code Kata One - Supermarket Pricing

This kata arose from some discussions we’ve been having at the DFW Practioners meetings. The problem domain is something seemingly simple: pricing goods at supermarkets.

Some things in supermarkets have simple prices: this can of beans costs $0.65. Other things have more complex prices. For example:

  • three for a dollar (so what’s the price if I buy 4, or 5?)
  • $1.99/pound (so what does 4 ounces cost?)
  • buy two, get one free (so does the third item have a price?)

This kata involves no coding. The exercise is to experiment with various models for representing money and prices that are flexible enough to deal with these (and other) pricing schemes, and at the same time are generally usable (at the checkout, for stock management, order entry, and so on). Spend time considering issues such as:

  • does fractional money exist?
  • when (if ever) does rounding take place?
  • how do you keep an audit trail of pricing decisions (and do you need to)?
  • are costs and prices the same class of thing?
  • if a shelf of 100 cans is priced using "buy two, get one free", how do you value the stock?

This is an ideal shower-time kata, but be careful. Some of the problems are more subtle than they first appear. I suggest that it might take a couple of weeks worth of showers to exhaust the main alternatives.

Goal

The goal of this kata is to practice a looser style of experimental modelling. Look for as many different ways of handling the issues as possible. Consider the various tradeoffs of each. What techniques use best for exploring these models? For recording them? How can you validate a model is reasonable?

What’s a Code Kata?

As a group, software developers don’t practice enough. Most of our learning takes place on the job, which means that most of our mistakes get made there as well. Other creative professions practice: artists carry a sketchpad, musicians play technical pieces, poets constantly rewrite works. In karate, where the aim is to learn to spar or fight, most of a student’s time is spent learning and refining basic moves. The more formal of these exercises are called kata.

To help developers get the same benefits from practicing, we’re putting together a series of code kata: simple, artificial exercises which let us experiment and learn without the pressure of a production environment. Our suggestions for doing the kata are:

  • find a place and time where you won’t be interrupted
  • focus on the essential elements of the kata
  • remember to look for feedback for every major decision
  • if it helps, keep a journal of your progress
  • have discussion groups with other developers, but try to have completed the kata first

There are no right or wrong answers in these kata: the benefit comes from the process, not from the result.

크리에이티브 커먼즈 라이선스
Creative Commons License

'Programming > Code Kata' 카테고리의 다른 글

# Code Kata One  (0) 2008/04/09
# Code Kata Background  (0) 2008/04/09
Trackback 0 Comment 0
2008/04/09 20:37

# Code Kata Background

Code Kata

Background

How do you get to be a great musician? It helps to know the theory, and to understand the mechanics of your instrument. It helps to have talent. But ultimately, greatness comes practicing; applying the theory over and over again, using feedback to get better every time.

How do you get to be an All-Star sports person? Obviously fitness and talent help. But the great athletes spend hours and hours every day, practicing.

But in the software industry we take developers trained in the theory and throw them straight in to the deep-end, working on a project. It’s like taking a group of fit kids and telling them that they have four quarters to beat the Redskins (hey, we manage by objectives, right?). In software we do our practicing on the job, and that’s why we make mistakes on the job. We need to find ways of splitting the practice from the profession. We need practice sessions.

CodeKata:
A description of how this all started
MoreKata:

Sometimes ‘kata’ isn’t quite the right word; karate uses other techniques to teach too.

The Kata

What makes a good practice session? You need time without interruptions, and a simple thing you want to try. You need to try it as many times as it takes, and be comfortable making mistakes. You need to look for feedback each time so you can work to improve. There needs to be no pressure: this is why it is hard to practice in a project environment. it helps to keep it fun: make small steps forward when you can. Finally, you’ll recognize a good practice session because you’ll came out of it knowing more than when you went in.

Code Kata is an attempt to bring this element of practice to software development. A kata is an exercise in karate where you repeat a form many, many times, making little improvements in each. The intent behind code kata is similar. Each is a short exercise (perhaps 30 minutes to an hour long). Some involve programming, and can be coded in many different ways. Some are open ended, and involve thinking about the issues behind programming. These are unlikely to have a single correct answer. I add a new kata every week or so. Invest some time in your craft and try them.

If you want to discuss kata, there’s a mailing list here, and a wiki here. However, remember that the point of the kata is not arriving at a correct answer. The point is the stuff you learn along the way.

KataOne: Supermarket pricing. Pricing looks easy, but scratch the surface and there are some interesting issues to consider.
KataTwo: Karate Chop. A binary chop algorithm is fairly boring. Until you have to implement it using five totally different techniques.
KataThree: How Big, How Fast? Quick estimation is invaluable when it comes to making design and implementation decisions. Here are some questions to make you turn over the envelope.
KataFour: Data Munging. Implement two simple data extraction routines, and see how much they have in common.
KataFive: Bloom Filters. Implement a simple hash-based lookup mechanism and explore its characteristics.
KataSix: Anagrams. Find all the anagram combinations in a dictionary.
KataSeven: Reviewing. What does our code look like through critical eyes, and how can we make our eyes more critical?
KataEight: Objectives. What effects do our objectives have on the way we write code?
KataNine: Checkout. Back to the supermarket. This week, we’ll implement the code for a checkout system that handles pricing schemes such as "apples cost 50 cents, three apples cost $1.30."
KataTen: Hash vs. Class. Is it always correct to use (for example) classes and objects to structure complex business objects, or couple simpler structures (hash as Hashes) do the job?
KataEleven: Sorting it Out. Just because we need to sort something doesn’t necessarily mean we need to use a conventional sorting algorithm.
KataTwelve: Best Sellers. Consider the implementation of a top-ten best sellers list for a high volume web store.
KataThirteen: Counting Lines. Counting lines of code in Java source is not quite as simple as it seems.
KataFourteen: Trigrams. Generating text using trigram analysis lets us experiment with different heuristics.
KataFifteen: Playing with bits. A diversion to discover the pattern in some bit sequences.
KataSixteen: Business Rules. How can you tame a wild (and changing) set of business rules?
KataSeventeen: More Business Rules. The rules that specify the overall processing of an order can be complex too, particularly as they often involve waiting around for things to happen.
KataEighteen: Dependencies. Let’s write some code that calculates how dependencies propagate between things such as classes in a program.
KataNineteen: Word chains. Write a program that solves word chain puzzles (cat -> cot -> dot -> dog).
KataTwenty: Klondike. Experiment with various heuristics for playing the game Klondike.
KataTwentyOne: Simple Lists. Play with different implementations of a simple list.

There are places (apart from the comments in this blog) where you can discuss Code Kata.

The first is a YahooGroups mailing list, the second an index page on the PragProg wiki.

I have to admit that I’m nervous doing this. My hope is that folks will work on the kata for a while before discussing them; much of the benefit comes from the little "a-ha!" moments along the way. So, it’ll be interesting to see how (and if) the discussion develops.

크리에이티브 커먼즈 라이선스
Creative Commons License

'Programming > Code Kata' 카테고리의 다른 글

# Code Kata One  (0) 2008/04/09
# Code Kata Background  (0) 2008/04/09
Trackback 0 Comment 0
2008/04/04 00:30

# 아둥바둥....

# 너무 사는게 아둥바둥 사는 것 같다.
   뭔가 내 삶에 활기를 줄 수 있는 그런 것들을 찾고 싶다.
   내가 누군가에 기대는게 아닌
   무언가를 바라보고 있으면 힘이 솟는, 마음이 편안해지는
   그런 것들을 찾고 싶어진다.
   찾기는 쉽지 않겠지만 하나하나 찾아보면
   내 스스로 만족하지 않을까? 이런 생각을 해본다..
크리에이티브 커먼즈 라이선스
Creative Commons License

'Bla Bla Bla~' 카테고리의 다른 글

# 빌게이츠 방한, 무엇을 하나?  (0) 2008/05/06
# GM Gentra X  (0) 2008/04/10
# 아둥바둥....  (0) 2008/04/04
# 구글의 사투리 번역 서비스  (0) 2008/04/01
# 결국 노트북 지르다..  (0) 2008/02/25
# 노트북을 지르고 싶다..  (2) 2008/01/21
Trackback 0 Comment 0
2008/04/03 00:08

# 그 놈 참....

# 여행 다니던 사진들을 정리하고 있던 중에 발견한 사진
   쪼그만 것이 생각보다 쎄네... ^^;

사용자 삽입 이미지

크리에이티브 커먼즈 라이선스
Creative Commons License

'Photographs' 카테고리의 다른 글

# 그 놈 참....  (0) 2008/04/03
# FC Eleven  (0) 2007/10/08
# 시선의 방향을 바꿔보자  (1) 2007/05/17
# 노출, 조리개, 셔터스피드  (0) 2007/01/25
Trackback 0 Comment 0
2008/04/01 15:05

# 구글의 사투리 번역 서비스

# 역시 구글에서도 만우절 맞이 '구라' 서비스를 하나 만들었군..

http://www.google.co.kr/landing/saturi/
크리에이티브 커먼즈 라이선스
Creative Commons License

'Bla Bla Bla~' 카테고리의 다른 글

# GM Gentra X  (0) 2008/04/10
# 아둥바둥....  (0) 2008/04/04
# 구글의 사투리 번역 서비스  (0) 2008/04/01
# 결국 노트북 지르다..  (0) 2008/02/25
# 노트북을 지르고 싶다..  (2) 2008/01/21
# 누구나 10Kg 뺄 수 있다.  (0) 2008/01/21
Trackback 0 Comment 0