Skip to content

Instantly share code, notes, and snippets.

View sjoonk's full-sized avatar

Sukjoon Kim sjoonk

View GitHub Profile
@sjoonk
sjoonk / gist:1470762
Created December 13, 2011 05:41
Facebook Add Page Tab
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">
<body>
<a href="#" onclick=window.open("http://www.facebook.com/dialog/pagetab?
app_id=YOUR_APP_ID&next=YOUR_URL","PageTab","width=500,height=200");>
Dialog</a>
</body>
</html>
@sjoonk
sjoonk / gist:1564068
Created January 5, 2012 06:56
Facebook OpenGraph Tag Sample
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
<meta property="og:site_name" content="IMDb"/>
<meta property="fb:admins" content="USER_ID"/>
<meta property="og:description"
@sjoonk
sjoonk / self_signed_cert.rb
Created January 19, 2012 14:50 — forked from nickyp/self_signed_cert.rb
create a self-signed certificate using ruby-openssl
We couldn’t find that file to show.
@sjoonk
sjoonk / blog.html
Created May 21, 2012 03:43
Facebook App Template: Blog RSS Feed
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Blog Demo</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="../stylesheets/facebook.css" type="text/css">
<link rel="stylesheet" href="../stylesheets/application.css" type="text/css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script>
<body class="container timeline">
@sjoonk
sjoonk / simple-event-form.html
Created May 21, 2012 08:27
CookinFB App Template Simple Event Form
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>입력폼이 있는 간단한 이벤트</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="../stylesheets/facebook.css" type="text/css">
<link rel="stylesheet" href="../stylesheets/application.css" type="text/css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script>
<style type="text/css" media="screen">
@sjoonk
sjoonk / invite_friends.html
Created May 22, 2012 15:00
CookinFB App Template Invite Friends
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>친구 초대하기</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="../stylesheets/facebook.css" type="text/css">
<link rel="stylesheet" href="../stylesheets/application.css" type="text/css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script>
<style type="text/css" media="screen">
@sjoonk
sjoonk / mongo_cache.rb
Created June 14, 2012 13:45
MongoCache: Simple key/value cache store based on MongoDB/Mongoid
# encoding: UTF-8
# MongoCache
# Using MongoDB as a simple cache store
# by sjoonk@gmail.com 2012
require 'mongoid'
class MongoCache
include Mongoid::Document
@sjoonk
sjoonk / passenger_memory_stats
Created June 18, 2012 13:16
Munin Phusion Passenger Plugins
#!/usr/bin/env ruby
# put in /etc/munin/plugins and restart munin-node
# by Dan Manges, http://www.dcmanges.com/blog/rails-application-visualization-with-munin
# NOTE: you might need to add munin to allow passwordless sudo for passenger-memory-stats
def output_config
puts <<-END
graph_category App
graph_title Passenger memory stats
graph_vlabel count
@sjoonk
sjoonk / photo_contest.html
Created June 26, 2012 04:31
CookinFB Photo Contest Demo App
<!DOCTYPE html>
<html xmlns:fb="http://ogp.me/ns/fb#">
<head>
<meta charset="utf-8">
<title>Photo Contest</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<div id="fb-root"></div>

테스트 주도 개발로 배우는 객체 지향 설계와 실천 | 스티브 프리먼, 냇 프라이스 저 | 이대엽 역 | 인사이트 | 2013.06.20

번역이 조금 아쉬운 책입니다. 아래와 같은 번역들이 군데군데 들어있어 따라 읽기 어렵게 만드네요. 명색이 TDD 책이라는데 이런 번역이 나와서야. 그냥 코드만 따라 갈거면 모를까 내용까지 읽을 거면 차라리 원서로 읽는 게 나을 듯.

(번역서 114쪽 마지막 문단)

우리에겐 애초부터 테스트를 실행하고 테스트가 실패하는 모습을 지켜보기에 충분한 기반 구조가 있었다. 이 장의 나머지 부분에서는 테스트를 통과하게끔 만들기 전까지 기능을 한 번에 하나씩 추가하겠다. 이 기법을 처음 사용하기 시작했을 때 "일단 코드를 작성하라. 무엇을 해야 할지 알고 있지 않은가!" 라고 해서 너무 까다롭게 느껴졌을 것이다. 시간이 지나면서 그렇게 하는 데 시간이 별로 들지 않고 진행 과정이 훨씬 더 예측 가능하다는 사실을 깨달았다. 한 번에 한 측면에만 집중하면 그러한 측면을 확실히 이해하는 데 도움이 된다. 대체로 뭔가를 동작하게 만들면, 그것은 동작하는 상태로 유지된다. 해결책에 관해 논의할 필요가 없다면 많은 과정이 시간이 거의 걸리지 않는다. 그러한 단계는 구현보다 설명하는 데 더 시간이 걸린다.

아시다시피 이 문단은 저자가 테스트 주도 개발법을 익히는 과정에서 느꼈던 감정과 테스트 주도 개발의 좋은 점에 대해 얘기하고 있는 문단입니다. 개발자들이 TDD를 접할 때 흔히 갖는 선입견 중 하나, 즉 "무엇을 만들지 아는데 굳이 테스트부터 작성할 필요 없이 그냥 바로 코딩을 하면 되쟎아!" 하는 생각을 똑같이 말하고 있습니다. 이어서 저자는 실제 테스트 주도 방식으로 개발하는 것이 생각만큼 그렇게 시간을 잡아먹은 일도 아니며 또 여러 가지 좋은 점들도 있음을 말하고 있습니다. 그런데 저는 유감스럽게도 위의 번역문을 읽으면서는 도무지 그 "느낌"을 얻을 수 없었습니다.