위장을 튼튼하게 하고 싶다.

지난 주에 감기 몸살로 고생하다가 이내 회복해 참 흐뭇했는데, 몸살이 같이 데려온 장염은 쉽게 낫지를 않는다. 며칠 전 갑자기 악화되면서 순식간에 수척해지고 몸무게가 줄었다. 참다 못해 병원에서 주사를 맞아 부모님 댁에서 회복중이다. 다른 데보다 위장이 아프면 더 고생스럽다. 예전에 복막염을 앓던 날이 떠오르기 때문이다. 약한 나의 위장을 튼튼하게 할 좋은 방법이 없을까?

Spring Framework의 열기를 느끼며

나는 Spring framework의 장점을 UNIX의 장점에 비유하곤 한다. POJO에 대한 메타 모델을 정의하고 이를 바탕으로 POJO의 Factory 및 Registry 역할을 한다는 아주 기본적인 생각으로, 그 역할 정의를 훼손하지 않고 다양한 확장을 통해 수많은 기능을 제공하기 때문이다. 이러한 확고한 디자인 철학은 UNIX와 마찬가지로 감동을 가져다 준다.

그러나 이런 구조적 아름다움은 UNIX의 단점 (또는 단점 아닌 단점) 또한 그대로 보여주고 있다. 즉 그 구조가 훤히 들여다 보인다는 점이다. 거기에다 오픈소스이기까지 하니, 내가 아는 만큼 모든 것을 다 이해하고 시험할 수 있다. 쓰이지 않는 것을 가차 없이 빼 버릴 수도 있고, 언제든 추가할 수 있다. 아는게 별로 없다면? 아무리 간단한 일이라도 원하는 대로 할 수가 없다. 어쩌면 초심자들에게 Spring framework는 옛날 리눅스에서 X 서버 한 번 띄워 보겠다고 시커먼 콘솔 앞에서 몇 시간을 보내던 그 심정과 다를 바 없는 느낌으로 다가오고 있지는 않을까?

가장 대중적인 UNIX 계열 운영체제인 Linux를 사용하는 나지만, 일반인에게 Linux를 권하기가 망설여지는 것이 사실이다. 같은 UNIX 계열이지만 놀라울 정도로 잘 포장된 MaxOS X나 그저 무난한 MS Windows를 추천할 것이다. 나 스스로는 UNIX를 꽤 잘 안다고 생각 (또는 자만) 하고 있으므로 항상 Linux를 선호할 지라도 말이다. 그것은 Linux가 나빠서가 아니다. 단지 Linux가 잘 맞는 경우와 그렇지 않은 경우가 있기 때문이다.

같은 맥락에서, 모든 개발자들이 Spring framework을 자유 자재로 사용할 수는 없을 것이며, 따라서 쉽사리 추천하거나 강요할 수 없을 것이다.

UNIX든 Windows든, 운영체제가 앞으로 갈 길은 아주 많이 남았다. Spring framework도 마찬가지다. Spring framework 덕택에 개발이 많이 편리해졌다고는 하지만, 나는 그 편리함의 정도가 우리가 꿈꾸는 수준의 발 끝에도 미치지 못하는 수준이라고 생각한다. 누구에게나 망설임 없이 추천할 수 있는 쉽고 강력한 프레임워크가 등장한다면 Spring에 대한 열기는 여느 다른 프레임워크가 한 때 누렸던 영광과 마찬가지로 순식간에 사그러들 것이다. 그날이 영원히 오지 않지 않겠느냐 묻는다면, 그만큼 암울한 질문은 이 세상에 없지 않냐고 반문하고 싶다.

역시나 결론은 ‘the best is yet to come!

A Few Tips on JavaDoc

JavaDoc에 대한 몇 가지 팁

It’s another Java 5-ish post which might not attract people, yet is very important. I find a lot of wrong or out-of-date JavaDoc due to lack of understandings on useful JavaDoc tags. Bad JavaDoc affects the quality of in-house softwares seriously, so knowing and using the following tips will improve the quality of your projects significantly.

사람들한테 별로 흥미가 없을, 하지만 아주 중요한 또 하나의 Java 5 스러운 이야기입니다. JavaDoc 태그에 대한 이해 부족으로 잘못되거나 철지난 내용을 담고 있는 JavaDoc을 많이 보아 왔습니다. 잘못된 JavaDoc은 사내 소프트웨어의 품질에 심각한 영향을 주므로, 다음의 팁을 이해하고 사용한다면 여러분 프로젝트의 질을 놀랍게 향상시킬 것입니다.

@link and @linkplain tags

@link tag creates a link to an other type. I always prefer to use @link tag rather than not using it because it’s robust to refactoring (i.e. renaming classes also changes JavaDoc). @linkplain is also useful when you prefer a text link with a variable width font.

@link 태그는 다른 타임으로의 링크를 만듭니다. 저는 항상 @link 태그를 쓰지 않는 것 보다는 쓰는 것을 선호하는데요, 리팩터링할 때 JavaDoc에 적어 놓은 클래스 이름이 깨지지 않아서입니다. @linkplain 또한 고정폭 텍스트 링크보다는 가변폭 텍스트 링크를 쓰고 싶을 때 유용합니다.

/**
* Creates a new {@link Element} with the
* specified name.
*/

package.html (or package-info.html)

javadoc detects an HTML file named as ‘package-info.html‘ in each package directory, and integrates its content into the generated JavaDoc. Here’s my template.

javadoc은 각 패키지 디렉토리의 ‘package-info.html‘ HTML 파일을 찾아 생성될 JavaDoc 내용에 통합시킵니다. 다음은 제가 쓰는 템플릿입니다.

<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
</head>
<body>
The first sentence is copied to the top of the
class list in the generated JavaDoc. From here,
it's displayed after the generated class list.
...
</body>
</html>

package-info.java (New in Java 5)

Since Java 5, you can put package-info.java instead of package-info.html. What is the advantage BTW? It’s in that you can specify package annotation.

Java 5부터는 package-info.html 대신 package-info.java를 넣을 수 있습니다. 그런데 장점이 뭘까요? 장점은 패키지 애노테이션을 적어 줄 수 있다는 데 있습니다.

/**
* The first sentence is copied to the top of the
* class list in the generated JavaDoc. From
* here, it's displayed after the generated class
* list.
*/
@Annotation1
@Annotation2
...
package org.apache.mina.common;

That’s all. No class definition. It’s a bad idea to define a class here.

이게 답니다. 클래스 정의는 없습니다. 여기에 클래스를 정의하는 것은 좋지 않습니다.

@literal tag (New in Java 5)

No more unreadable &lt;s and &gt;s!

더이상 읽기 어려운 &lt;&gt;를 쓸 필요가 없습니다!

/**
* Returns true when
* {@literal the specified value < 3}.
*/

@code tag (New in Java 5)

@code tag is actually @literal + (<pre> or <code>).

@code 태그는 사실 @literal + (<pre> 또는 <code>) 입니다.

/**
* Returns {@code true} when something cool
* happened.
* {@code
* multilined expression
* is also fine.
* }
*/

NOTE: JavaDoc doesn’t support multilined expression yet: Sun Bug Database.

NOTE: 아직 JavaDoc이 여러 줄로 나눠 쓰는 것을 지원하지 않네요: Sun Bug Database.

@value tag (Better in Java 5)

@value tag inlines the value of the specified static constant field.

@value 태그는 주어진 static 상수 필드의 값을 문서에 복사해 넣어 줍니다.

/**
* Sets the property X. If an invalid value is
* specified, it's set to the default value,
* {@value Constants#DEFAULT_X}).
*/

@deprecated tag and @Deprecated annotation

According to JavaDoc manual, it is a good practice to specify both a @deprecated tag (to specify a reason) and a @Deprecated annotation (for a compiler), though I don’t know why they had to introduce the annotation part.

JavaDoc 매뉴얼에 따르면 @deprecated 태그 (이유를 설명하기 위해)와 @Deprecated 애노테이션 (컴파일러를 위해)을 둘 다 쓰는 것이 좋다고 합니다. 왜 애노테이션을 만들어야 했었는지는 잘 모르겠지만요.

/**
* @deprecated This method has been deprecated
* since 1.0 because it performs a
* unsafe operation that breaks data
* integrity.
*/
@Deprecated

2007 is now! What's my resolution?

이제 2007년이다! 나의 결의는?

Personal Stuff

지금까지 행복했던 것 보다 더 행복해진다. 영희씨와의 결혼 생활을 시작한다. 잘 먹고 잘 운동하여 건강해진다. 마음의 평정을 되찾는다.

Be happier then ever. Start to live in harness with Young-hee, my girl friend. Eat well, exercise well, and be healthier. Take my composure back again.

Open Source Activity

Apache MINA에 집중한다. 우선 1.x 버전에 대한 문서화를 마무리한 뒤, HTTP, SMTP, FTP 중 한 가지 이상의 프로토콜을 기본 제공하는 2.0 안정 버전을 릴리즈한다.

Focus on Apache MINA. Finish documentation on 1.x versions, and then release 2.0-GA with at least one out-of-the-box protocol implementation among HTTP, SMTP, and FTP.

NHN Corporation

NHN에서 사람들이 일하는 방식을 근본적으로 바꿔 놓는다. 소프트웨어 개발 및 의사 소통 과정을 적절한 도구를 통해 투명화한다. 사내 플랫폼 소프트웨어 개발의 촛점을 기능의 양적 만족에서 플랫폼 사용자의 질적 만족으로 옮겨, 서비스 개발의 품질과 생산성을 혁신한다. 이를 위해 오픈 소스 소프트웨어 프로젝트의 베스트 프랙티스를 도입하고, 팀 내외에 걸친 교육을 실시한다.

Change how people work in NHN essentially. Make software development and communication process transparent using proper tools. Move the focus of in-house platform software development from the quantitive satisfaction of features to the qualititive satisfaction of platform users, and hence, innovate the quality and productivity of portal service development. To support it, embrace the best practices of open source software projects, and provide training programs for both inside and outside the team.

The Memory of Black Tea

홍차의 추억

Once upon a time when many people was into green tea, I tried black tea because I always had wanted to be special. But it was too bitter for me because it was just a cheap tea bag listed just to provide an assortment of a menu. Did it taste this bitter? I soon forgot this disappointing moment.

많은 사람들이 녹차에 빠져 있을 무렵, 남들과는 다른 무언가를 좋아했던 나는 홍차를 시도했다. 하지만 메뉴에 구색을 맞추려고 올려진 티백 홍차는 너무나 썼다. 이런 맛이었다니. 실망하고는 이내 잊고 지냈다.

It was our hundredth day anniversary since my girl friend and I met one day. (Yes, most Korean couples count the number of days since two met, and celebrates every hundredth day at least for the first two years 😉 I was looking for a great gift which is destined to move her heart, and a tea pot and cups caught my sight. They were creamy white, chubby and cute, and modern Japanese ceramic tea pot and cups. I loved it much more than other similar ones.

그러던 어느 날 영희씨의 마음을 움직일 백일 선물을 고민하던 중 우연히 찻잔 세트가 눈에 들어왔다. 뽀얀 백색의 통통하면서도 앙증맞은, 모던한 분위기의 일본산 사기 찻주전자와 찻잔이었다. 다른 찻잔 세트들보다도 디자인이 마음에 들었다.

By the way, don’t I need tea if I am going to present tea things? I started to investigate on various kinds of tea because I had no idea on this topic. It was nothing comparing to choosing cosmetics which has encrypted product names and vague description under stress in the future, but I was in agony for at least a couple hours. It was earl gray from ‘Whittard of Chelsea‘.

그런데 찻잔이 있으면 차가 있어야 할 것 아닌가? 차에 대해서는 문외한이나 다름 없는 나는 이것 저것 조사하기 시작했다. 후일 화장품을 사면서 그 난해한 제품명과 애매한 설명에 스트레스 받던 것에 비교하면 아무것도 아니었겠지만 족히 몇 시간은 고민했던 것 같다. 그래서 결국 결정한 것이 ‘위타드 오브 첼시‘라는 브랜드의 얼 그레이였다.

Tea pot and cups as an anniversary gift, it seems like it was a special gift for her. The heat and fragrance of earl gray was mild enough for us to forget cold and harsh weather outside. Surrounded by the mildness, night came sooner than we expected with endless whispering, and my way back home just felt so far away from there. Our love grew up and up like that. The cups have been cracked unexpectedly and became useless now, but the feeling at those moments have been carved into my body and soul. Recalling back, the first place I hold of her hands were also a tea house in Insadong. Special tea might have led two persons’ relationship through a special mood.

백일 선물로 찻잔 세트라, 그녀에게는 특별한 선물이었던 것 같다. 기념으로 따라 본 얼 그레이의 향과 열기는 추운 바깥 날씨를 잊게 할 정도로 포근했다. 그 포근함에 감싸여 담소를 나누다 보면 어느새 밤이 깊고 귀가길은 멀게만 느껴지기 일쑤였다. 그렇게 우리의 사랑은 커갔고, 그 잔은 세월이 흘러 예기치 않게 여기 저기 금이 가 못 쓰게 되버렸지만, 그때의 느낌만은 지금도 내 몸 속에 기억되어 있다. 돌이켜 보면, 내가 그녀의 손을 처음 잡은 곳도 인사동의 한 전통 찻집이었다. 색다른 차는 색다른 분위기를 통해 두 사람의 관계를 이끌어 주었는지도 모르겠다.

It was quite long time after when I bought my own tea cup. It was a ‘tea for one‘ from Jenaer Glas made with glass, which was found after wandering for a couple hours to meet my strict taste that even myself can’t often meet. I was surprised that the cup was bigger than I thought, but its practical design was very attractive. I enjoyed the fragrance and heat radiated from the tea cup after lunches when I am alone in my house. Looking into the calm flow of time from a sandglass, I was able to empty my head at least at that moment. The cup also has broken into pieces thanks to my mother, but I still just feel like I can go back to the touch that the weight of the full cup gave tension to my forefinger.

집에 내 찻잔을 들여 놓은 것은 그 뒤로 짧지 않은 시간이 흘러서였다. 스스로 맞추기에도 벅찬 내 취향에 맞는 찻잔을 찾기 위해 몇 시간 즈음 해매다가 찾은 것은 예나 글래스의 유리로 만든 티포원이었다. 찻잔이 생각보다 커서 조금 놀랐지만 실용적인 디자인이 참 마음에 들었다. 집에서 혼자 점심 식사를 하고 나면 찻찬에 물을 붓고 가만히 앉아 은은히 퍼져나오는 향과 열기를 만끽하곤 했다. 모래시계가 고요히 품어내는 시간의 흐름을 가만히 들여다 보고 있으면, 그 순간만큼은 모든 생각을 비울 수 있었다. 지금은 그 찻잔도 어머니의 실수로 깨어지고 없지만, 그 때를 추억하면 홍차가 가득 차 나도 모르게 긴장한 집게 손가락의 감촉마저도 돌이킬 수 있을 것만 같다.

I ordered two ceramic tea-for-ones today; one for me of the next year, and the other for my acquaintance. I hope I feel the composure moment again and he also enjoys such a moment. I’m waiting for a moment my mind is empty listening to endlessly flowing time in satisfaction, with my beating heart now.

오늘은 도자기 티포원을 둘 주문했다. 하나는 내년의 나를 위해서고, 또 하나는 지인을 위해서다. 다시 한 번 그때의 여유와 행복을 느끼고, 다른 사람도 그 순간을 만끽하기를 기원하고 싶다. 나는 그렇게 아무 것도 생각나지 않는, 하염없이 흐르는 시간을 만족스럽게 받아들이는 그 순간을 두근거리는 마음으로 기다리고 있다.

ALSA OSS Emulation with Multiple Sound Cards

사운드 카드 여러개일 때의 ALSA OSS 에뮬레이션

aoss is a useful command that forwards all OSS (Open Sound System) requests to ALSA (Advanced Linux Sound Architecture) device drivers transparently, but it’s sometimes not so easy to use when an executable is wrapped by a shell script like VMware. The most easiest and clean solution for OSS emulation is loading snd-pcm-oss module by adding the following line in the /etc/modules file.

aoss는 모든 OSS (Open Sound System) 요청을 ALSA (Advanced Linux Sound Architecture) 드라이버로 투명하게 전달해 주는 유용한 명령이지만, VMware처럼 실행 파일이 쉘 스크립트로 둘러싸여 있으면 사용하기가 쉽지 않습니다. OSS 에뮬레이션에 대해 가장 쉽고 깔끔한 방법은 /etc/modules 파일에 다음 행을 추가해 snd-pcm-oss 모듈을 로드하는 것입니다.

snd-pcm-oss

Is that all? Not actually if you have more than one sound cards. You have to choose which one is your primary sound card, where the OSS requests should be forwarded to. In my case, my primary sound card is ESI Audiotechinik Juli@, and the secondary one is built-in Intel i8x0 chip. You can set the order of these sound cards by adding kernel options to the /boot/grub/menu.lst file like the following.

이게 다일까요? 사운드 카드가 하나 이상이라면 다가 아닙니다. OSS 요청을 포워딩 받을 첫 번째 사운드 카드를 정해 주어야 합니다. 저같은 경우 첫 번째 카드는 ESI Juli@이고, 두 번째 카드는 내장된 인텔 i8x0 칩입니다. 다음과 같이 /boot/grub/menu.lst 파일에 커널 옵션을 추가하여 이들 사운드 카드의 순서를 정할 수 있습니다.

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=snd-ice17xx-ak4xxx.index=0 snd-intel8x0.index=1

If you are using a different sound card, you could replace the driver names above (snd-xxxx) with yours. If you are finished editing the menu.lst file, you have to run update-grub command to auto-generate other sections of the menu.lst.

다른 사운드 카드를 사용하고 계신다면 위의 드라이버 이름들을 (snd-xxxx) 갖고 계신 사운드 카드의 드라이버로 바꾸면 됩니다. menu.lst 파일 수정을 마치면, update-grub 명령을 실행해 menu.lst 파일의 다른 부분을 자동 생성해야 합니다.

trustin@primary:~$ sudo update-grub
Password:
Searching for GRUB installation directory ... found: /boot/grub
Testing for an existing GRUB menu.list file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /vmlinuz-2.6.17-10-generic
Found kernel: /vmlinuz-2.6.15-27-686
Found kernel: /vmlinuz-2.6.15-26-686
Found kernel: /vmlinuz-2.6.15-25-686
Updating /boot/grub/menu.lst ... done

Presentation Material: Java 5 Generics

발표 자료: Java 5 Generics

Download here. (Korean)
여기에서 받으실 수 있습니다.

Yes, I know. Java 6 has been released. But it is also true that not all developers know how to design their API with Generics, and it’s because they might not have a chance to catch up this big change. So, I wrote a presentation material for my teammates, and of course, myself.

압니다. 얼마전 Java 6가 나왔지요. 하지만 모든 개발자들이 Generics를 이용해 API를 디자인하는 법을 알고 있는 것은 아닙니다. Generics라는 큰 변화를 따라잡을 기회가 없었을 수도 있거든요. 그래서 우리 팀원들, 그리고 물론 제 자신을 위해 발표 자료를 만들었습니다.

(Please note this presentation material is written in Korean, my mother tongue. But wait! Just download and try to read the code and a few English sentences. If you are interested in this material, please let me know. I could translate it to English if I notice there’s demand for it. 🙂

Setting svn:keyword Property Automatically

svn:keywords 프로퍼티 자동으로 설정하기

Subclipse dropped ‘Add Keywords…’ dialog since 1.1.7. I couldn’t understand why they got rid of such a useful feature, but now I figure out that it is because there’s much easier way to do that. Yes, I don’t need to forget to set the property or to make mistakes by applying the properties to wrong targets such as binary files; we got auto-props.

Subclipse 1.1.7부터는 ‘Add Keywords…’ 대화창이 없어졌습니다. 아주 유용한 기능이었는데 왜 없앴는지 이해가 안갔지만, 더 쉬운 방법이 있어서였다는 것을 알게 되었습니다. 프로퍼티 설정하는 것을 잊어버리거나 바이너리 같은 엉뚱한 파일에 프로퍼티를 적용하는 실수를 할 필요가 없었던 것이죠. auto-props가 있으니까요.

auto-props configuration adds specified properties to the files that matches certain patterns automatically when svn add or svn import operation is executed. This feature is disabled by default. To enable it, add the following line to the [miscellany] section of your ~/.subversion/config file.

auto-props 설정을 사용하면 svn addsvn import 명령을 수행할 때 특정 패턴에 맞는 파일들에 프로퍼티를 자동으로 추가할 수 있습니다. 이 기능은 처음에는 꺼져 있습니다. 켜려면 ~/.subversion/config 파일의 [miscellany] 섹션에 다음 라인을 추가합니다.

enable-auto-props = yes

Now, you can add your auto-prop settings to the [auto-props] section. Here’s mine I brought from here.

이제 auto-prop 설정을 [auto-props] 섹션에 추가하면 됩니다. 다음은 제가 여기서 빌려온 것입니다.

*.java = svn:eol-style=native;svn:keywords=Rev Date
*.xml = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
*.xsl = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
*.xsd = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
*.wsdl = svn:mime-type=text/xml;svn:eol-style=native;svn:keywords=Rev Date
*.properties = svn:mime-type=text/plain;svn:eol-style=native;svn:keywords=Rev Date
*.c = svn:eol-style=native;svn:keywords=Rev Date
*.cpp = svn:eol-style=native;svn:keywords=Rev Date
*.h = svn:eol-style=native;svn:keywords=Rev Date
*.dsp = svn:eol-style=CRLF
*.dsw = svn:eol-style=CRLF
*.sh = svn:eol-style=native;svn:executable
*.bat = svn:eol-style=native
*.pl = svn:eol-style=native
*.py = svn:eol-style=native
*.cmd = svn:eol-style=native
*.txt = svn:eol-style=native;svn:mime-type=text/plain
*.htm* = svn:eol-style=native;svn:mime-type=text/html
ChangeLog = svn:eol-style=native;svn:mime-type=text/plain
README* = svn:eol-style=native;svn:mime-type=text/plain
LICENSE* = svn:eol-style=native;svn:mime-type=text/plain
NOTICE* = svn:eol-style=native;svn:mime-type=text/plain
TODO* = svn:eol-style=native;svn:mime-type=text/plain
KEYS* = svn:eol-style=native;svn:mime-type=text/plain
INSTALL* = svn:eol-style=native;svn:mime-type=text/plain
WHATSNEW* = svn:eol-style=native;svn:mime-type=text/plain
*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
*.gif = svn:mime-type=image/gif
Makefile = svn:eol-style=native
*.css = svn:eol-style=native
*.js = svn:eol-style=native

Inner Game – Work as Experiential Learning

이너 게임 – 체험적 학습으로서의 일

체험적 학습으로서의 일

I drew a mind map of ‘Inner Game of Work‘, written by Timothy Gallwey. It was quite an interesting read though there were several boring sections. (Sorry for not publishing the mind map in English. I don’t have time to translate it and it won’t worth that much because I didn’t read the English edition so the terms used in the translation will be very different from the original.)

티머시 골웨이의 ‘이너 게임‘을 읽고 마인드 맵을 그려보았습니다. 몇 군데 지루한 부분도 있었지만 꽤 재미있게 읽었습니다.