And every action you take on a smartphone has the ‘other end’ - the servers and storage in data centers. They are doing more calculation and organization and presentation of information than your handheld device, which is mainly displaying the results these days. The cloud represents the information content of the world, which could never be put on the storage [disk] in your mobile device, or even your personal computer. It‘s easy to see a world of job opportunities writing apps but don’t forget the importance of implementing the data center side of those apps. There‘s a lot of work to be done at that level too. Apps are like furniture. There are infinite variations until we have a few standards that change little. So this is a huge opportunity in the future.



쉽게 말해서 모바일 앱을 만드는 것도 중요하지만, 그 '이면'의 서버 사이드도 생각해야 한다는 사실입니다. 그곳에 정말 거대한 기회가 존재한다는 사실 

http://www.asiae.co.kr/news/view.htm?idxno=2013030609400716499

기사는 소개글 정도입니다. 원문도 아래에 소개합니다. 

원문

First, I would be happy to send you a signed card of mine. Just send me a request for it and include your mailing address. 

As for the students on Jeju island...

I look back to my own days as a student. It was a fun time where everything was provided for my entertainment in life. Our socialization was with friends at school, not via mobile tech devices as it is today. The best I can remember is that, like myself, most students found by accidental encounters what they enjoyed and wanted to do in life.

Near the end of high school and early college years I did a lot of internal thinking. This is the age that I hear a lot of students talking about right and wrong and what values are good and exploring religions if they haven’t had one pressed upon them by their parents.

First, I came to the conclusion that I would rather be an average person joking all the time than a powerful businessman stressing over work every day. I also decided for myself that I‘d want to be ’in the middle‘ in almost every way. I looked hard and the extreme ends of politics and values and wealth were not desirable and led to corrupt behaviors for many. Early on I decided that I would never want to tell one story in different ways. The truth always comes out one way. I decided that telling 2 versions of the same thing is often hypocritical. The teller doesn’t feel that the truth about how they are and how they act is not good, so they hide it with deception and falsehoods. It‘s like having 2 different personalities in your head and can lead to psychological problems and neurosis. I did not want to be like that.

I also decided that I did not have to convince others of my views for those views to be good. They only needed to be good to me. I didn’t have to argue and win points. Arguments rarely have ‘winners’ anyway. I could tell what I believed (even how to make a computer) and if others didn‘t agree, they were not bad. They just thought differently. I would have the belief that my thoughts were good and were inside my head and that’s all that mattered.

Also, my dad had told me that how far you go in a company usually is determined by how well liked you are. So I‘m always very nice to everyone. There’s no need to make enemies. You are recognized by your own skills and good work, and you don‘t have to criticize others for not doing good work. Just worry about your own skills.

One accident that happened to me was that I taught myself, with no books, how to design computers in high school. I loved doing it and designed computers all the time, from descriptions of them in manuals by the companies that made them. I designed the same computers over and over and made a game out of trying to use fewer and fewer parts, coming up with tricks to accomplish my task that could never be in a book. They were ’tricks‘ in my own head. I felt that some of these tricks would be used by probably no other computer designer in the world. In my game world, on paper, where I could never afford to build my designs, I felt I was one of the best in the world.

The best things I did in my young years leading up to the early Apple computers were done because I had little money and had to think deeply to achieve the impossible. Also, I had never done those technologies or studied them. I had to write the book myself. Being self-taught, figuring out how to design computers with pencil and paper, made me skilled at finding solutions that I had not been taught.

Every aspect of our lives and our companies will be changing and improving based on mobile technology. Young people are already ahead in this game and have good ideas of how any operation can be improved. Always focus on good human interface, user interface. Computer apps are not to be judged by what they do or how well they do it. Rather, it is more important that they feel natural to normal humans and they are led to the right actions. An ultimate example is when you speak what you want. If you don’t have to worry about having the right computer words, but just speak it as you would to a human, then the computer has totally gotten out of your way. Finding ways to do this will be very important in the future. The smartest approaches come from understanding normal people.

And every action you take on a smartphone has the ‘other end’ - the servers and storage in data centers. They are doing more calculation and organization and presentation of information than your handheld device, which is mainly displaying the results these days. The cloud represents the information content of the world, which could never be put on the storage [disk] in your mobile device, or even your personal computer. It‘s easy to see a world of job opportunities writing apps but don’t forget the importance of implementing the data center side of those apps. There‘s a lot of work to be done at that level too. Apps are like furniture. There are infinite variations until we have a few standards that change little. So this is a huge opportunity in the future.

If you are not technical, you have many opportunities in your future just knowing how people do things. Do listen to elders. They are mentors who have been in this world working with other humans doing the important things that make life work a lot longer than you students. The world needs all kinds of human effort to work and to progress. It doesn’t need for everyone to be a computer programmer, for example. We need mathematicians, scientists, archaeologists, writers, and every capacity of job for things to work.

Look at companies that you might someday work for. The hot products suggest some of these companies. But pay attention to how good the companies are to employees. Do they respect the employees? Do they allow them a large amount of decision making at the bottom of the org chart? Are responsibilities moved down rather than coming as orders from above. Is there room for growth and advancement in a particular company? Does the company consider employees as family? Will they take care of you if at some point your job is not working out? Will they find a better role for you? It‘s a bad thought that companies easily fire employees and leave them with no income to support a family and home.

best,

 node.js 를 이용해서 개발한지가 몇개월 지났습니다. 그동안 언어 배우느라 (자바스크립트를 할 줄 몰랐음) - 사실 언어 자체는 어려울게 하나도 없더군요. - 개발 환경에 익숙해 져야 해서 좀 더 나에게 맞는 편리한 환경을 만들 여력이 없었으나 이제는 어느정도 익숙해 져서 개발 환경쪽에 신경이 쓰이더군요. (사실은 웹일을 하기 싫어서 딴 짓을 하고 있..)

제가 설명드리는 기준은 OSX 입니다. (우분투를 사랑하지만 제 개발 환경은 OSX 라..)

avascript 개발하는데 있어서는 완전 필수입니다. 문법 체크까지 해서 이상한 거는 빨간 밑줄을 그어주더군요. (빨간펜 선생님?!!) 

설치법 입니다. 

$ svn checkout http://js2-mode.googlecode.com/svn/trunk/ js2-mode
$ cd js2-mode
$ emacs --batch -f batch-byte-compile js2-mode.el
$ cp js2-mode.elc ~/.emacs.d/


이러면 설치 끝입니다. 일단 설치만 하고 나중에 설정을 하기로 합니다. 

yasnippet 

TextMate 의 함수 템플릿 기능을 보고 만든 Minor 모드 입니다. 이런 것이 이맥스의 가장 큰 장점입니다. 필요하면 만들면 된다!! 
이것의 사용법은 쉽습니다. 예를 들면 자바스크립트 코딩할 때 함수 선언할 일이 필요하다면 

fun 입력하고 TAB 을 누르면 함수의 템플릿이 자동으로 생성됩니다. 

/**  */
function my_function( args ){
  
}


이런식으로 그러면 함수 설명과 my_function 과 args 부분을 적어주기만 하면 됩니다. 
https://github.com/capitaomorte/yasnippet 여기에 잘 정리가 되어 있습니다. 설치법도 있지만 퍼 와서 보자면 

$ cd ~/.emacs.d/plugins
$ git clone https://github.com/capitaomorte/yasnippet



.emacs 파일의 한 구석에 

(add-to-list 'load-path
              "~/.emacs.d/plugins/yasnippet")
(require 'yasnippet)
;; (yas-global-mode 1)    


(yas-global-mode 1) 는 필요할 때만 쓰게 일단은 커멘트 처리 해 둡니다. 


js2-mode 인덴테이션(indentation) 수정 

js2-mode 를 쓰거나 아니면 이클립스에서 개발을 하거나, 가장 문제가 되는 것이 바로 이 인덴테이션이더군요. 정말 그지 같은 인덴테이션 아닌가요? 탭 (tab) 한번 누르면 화면의 1/3 정도 지나쳐서 커서가 위치하는 것을 보면 한숨이 나오더군요. 그런데 역시 세상에는 같은 고민을 가지고 있으면 해결할려고 하는 사람도 있는 법입니다. 


바로 여기 입니다. 여기에 보면 수정하는 방법이 잘 정리가 되어 있습니다. js2-mode 는 이미 설치를 했기 때문에 중간에서 설명하고 있는 에스프레소(espresso) 를 설치해줍니다. (java 가 커피라 그런지 에스프레소 등등의 네이밍들이 요즘 눈에 띄는군요 ㅎㅎ) 


여기서 받아주면 됩니다. 이 모드를 설치해 주는 이유는 인덴테이션이 좋기 때문이라고 글쓴이가 설명하고 있더군요. 참고로 저는 저 파일을 ~/.emacs.d/ 밑에 복사해 뒀습니다. 역시 설치만 하고 설정은 나중에 하는 걸로 합니다. 여기까지 설치가 됐으면 이제 글쓴이가 만든 함수 부분이 기니까 한꺼번에 설정하겠습니다. 

~/.emacs.d/ 에 파일 한개를 만들어 줍니다. (제 경우에는 cr-js.el 이였습니다) 
그러면 cr-js.el 이라고 가정을 하고 다음 과 같은 내용을 추가 해 줍니다. 그리고 다음과 같이 파일은 만들어 줍니다. 



그리고 .emacs 파일에 

(require 'cr-js)


한줄만 추가해 주면 됩니다. 
내친김에 다른 것도 손을 좀 볼까요? 
node.js 에서 웹을 개발할 때 쓰는 view 엔진이 여러개가 있습니다. (정확히는 express) 기본적으로 jade 가 쓰이고요. 디자이너들과 공동 작업을 할 때는 ejs 가 많이 쓰인다고 합니다. ejs 를 쓸때 마땅한 모드가 없더군요. 그런데 ruby on rails 에서 사용하는 rhtml 이 문법이 거의 비슷하더군요. 그래서 rhtml-mode 를 설치해 주기로 합니다. 


요게 다른 모드랑 연계해서 동작하지 않고 독자적으로 rhtml 을 처리하더군요. 맘에 들어서 설치해줬습니다. 

$ cd ~/.emacs.d
$ git clone git://github.com/eschulte/rhtml.git 


그리고 .emacs 에 

(add-to-list 'load-path "~/.emacs.d/rhtml")
(require 'rhtml-mode)

(add-to-list 'auto-mode-alist '("\\.ejs$" . rhtml-mode))
(add-hook 'rhtml-mode-hook
          (lambda ()
            (yas-global-mode 1)))


이렇게 추가해 주면 됩니다. 한가지 이상한 점이 있지요? rhtml 도 yas 모드가 있는지 궁금하실 것입니다. (설정에 보면 있는 것처럼 하는데) 그래서 설치해 주기로 합니다. 


rails 용 snippet 을 모아둔 것들입니다. 당장은 rails 개발을 안할꺼기 때문에 rhtml 용만 떼어 오기로 합니다. 

$ cd ~/
$ mkdir temp
$ cd temp
$ git clone git://github.com/eschulte/yasnippets-rails.git
$ cd yasnippet-rails 
$ cd rails-snippets
$ cp -r rhtml-mode ~/.emacs.d/plugins/yasnippet/snippets/


이렇게 해주면 snippet 이 설치가 됩니다. 이제 편하게 코딩을 하시면 됩니다. 

ps.

js2-mode 용 snippet 도 설치를 하셨다면 node.js 에서 자주 쓰이는 prototype method 선언하는 템플릿을 만들어 두면 편합니다. 제가 만들어 쓰는 것을 공개합니다. 

# -*- mode: snippet -*-
# name: protf
# contributor: Wolfgang crazia <crazia@gmail.com>
# --
/** $1 */
${2:my_class}.prototype.${3:method_name} = function ( ${4:args} ){
    $0
}


이 파일 이름을 (확장자 없이) protf 로 만들고 

~/.emacs.d/plugins/yasnippet/snippets/js2-mode/protf 


로 저장하면 나중에 자바스크립트 파일 편집중에 protf 라고 입력하고 탭 (tab)키를 누르시면 자동으로 템플릿이 완성됩니다. 



    - 초간단 요약 -
    기존의 자바 서비스하고 있던 부분의 일부를 node.js 로 포팅해서 두개를 벤치마크 해 봄. 자바는 멀티코어 환경에서 테스트하고 node.js 는 cluster 를 안쓰고 단일 코어에서 (아무것도 안하면 단일코어에서 도니 ㅎㅎ) 동작시켜봄 결과는 아래와 같음 



    씨피유와 메모리는 적게 쓰지만 (훨씬 적게..) 성능은 그리 낫지 않음. 이거저거 바꿔가며 테스트를 하던중 ORM 을 지원하는 Sequelizer 가 느리다는 것을 알아냄, node-mysql 로 바꾸고 나니 바뀐 내용입니다.



단일 코어를 씀에도 불구하고 자바와 비슷하게 성능이 나오고 있습니다. 같은 하드웨어라 가정하면 node.js 에 클러스터 (cluster)를 적용한다고 한다면 자바의 거의 5배에 해당하는 효율을 보일 것으로 예상됩니다. 

   글쓴이가 올린 다음 글을 보면 , node.js 는 성능이 워낙 뛰어나고, 여러사람들이 참여하기 때문에 무섭게 성장하는 개발환경이 될것이기 때문에 주의깊게 보고 있기는 하나, 기업용으로 쓰기에는 아직 치명적인 약점이 있다고 합니다. 바로 node.js 자체의 개발 주기가 너무 짧기 때문에 오랜 기간을 개발해야 하는 기업용 환경에서는 좋지 않다는 것입니다. (개발 하는 중간에 메인 언어가 업데이트 된다고 생각해 보세요 ㅎㅎ) 그렇기 때문에 1.xx 대로 올라가서 안정화가 된다면 그 때부터 기업용으로 쓰기에 무리 없지 않을까 라고 본답니다. 물론 저자는 아주 만족한 거 같다고 하더군요. 

  저도 글쓴이의 의견에 어느정도 동의합니다. 다만 지금 버젼으로도 정말 기업용 커다란 사이트가 아닌, 간단한 기능을 제공하는 사이트를 제작하는 데에는 (특히나 App 서버로) 최고의 효율을 보이지 않을까 싶습니다. 

Express (Node.js의 웹 프레임 워크) 에서의 Middleware 개념은 쉽게 설명하자면 Java 에서의 Filter 와 비슷한 개념입니다. 자주 쓰이고 통념적으로 쓰이는 행위들을 미리 걸러주는 역할을 한다고 볼 수 있습니다.  

예로 들면 express 가 내부적으로 쓰고 있는 formidable 은 HTTP의 request 를 정리하는데 탁월합니다. 그러나 개발자가 매번 formidable 을 불러서 정리하는 것이 번거로울 수가 있기 때문에 이를 middleware 로 만들어서 

   app.use(express.bodyParser());


이런식으로 선언만 해두면 사용이 되는 것입니다. (내부적으로 formidable 이 쓰이고 있음. ) 

이런 미들웨어를 만드는 법이 찾아보진 않았지만 예제가 많지는 않습니다. (너무 쉬워서 그럴 수도..)


다행히 위 링크에 가면 fineuploader 가 올리는 xhr 방식의 asynchronous 데이타 전송을 잡아채서 req.files 에 정리하는 부분을 미들웨어로 구현한 소스가 있습니다. 비록 옛날 소스이긴 하지만 (요즘 express 가 너무 많이 발전을 한 관계로..) 어떻게 미들웨어를 만드는지 참조하시면 좋을 듯합니다. 



글을 퍼올 수가 없어서 어쩔 수 없이 제 gist 에 올렸습니다. 원문은 위에 링크되어 있는 주소로 가면 나옵니다. (동작하는지에 대한 보장은 해 드릴 수 없습니다) 

(req, res, next) 로 이루어진 전형적인 미들웨어형 함수 선언이 보입니다. 위 사이트를 가면 어떻게 npm 패키지를 만드는 지에 관한 방법도 감을 잡으실 수가 있을 것입니다. 
ClojureScript 라고 들어 보셨는가요? 자바 스크립트 (Javascript) 는 대단히 편리한 언어이고 렉시칼 스코프 (Lexical Scope)를 지원해서 Anonymous Function 이나 Closure 를 지원하는 등, 고급 추상적인 언어가 지녀야할 몇가지 장점을 지니고 있습니다. 또한 문법도 쉽고 그래서 빠르게 전파되고 있습니다. 게다가 V8 엔진을 쓰는 Node.js 등 이제는 속도면에서도 자바(Java)에 필적하고 있습니다. (예전 제 포스트 참조) 

그러나 자바스크립트는 또한 약점이 존재합니다. 자바스크립트 지지자들도 여러번 지적하는 사항이라고 하는데요 (사실 저는 잘 모르겠습니다 -ㅅ- ). 지나치게 단순하고 어딘가 허술하며, 확장시키기 좋지 않으며 어떤 기능을 구현하기 위해서 불편하게 추가해야 하는 사항이 많다는 것입니다. 그런 이유로 커피스크립트 (CoffeeScript) 같은 것이 나와서 자바스크립트의 그러한 문제점들을 보완하고 있다는 것입니다. 

그래서 숨어있던 리습(Lisp)의 추종자들이 구글이 제공하는 Google Closure Compiler 의 힘을 바탕으로 해서 강력한 어둠의 Lispy Magic 을 이용해서 커피 스크립트 같은 것을 만들어 냈습니다. 그것이 바로 ClojureScript 입니다. 

예전에 폴 그레이엄이 말하길 '자신이 개발해야 하는 언어로 가장 생산성 있게 개발하고 싶다면, 그 언어를 이용해서 Lisp 해석기를 만들고 그 리습으로 코딩을 하고 나중에 원래 언어로 컴파일 하라.' 라는 이야기를 한 적이 있습니다. 바로 그렇게 만들어 버린 것입니다. 개발자들은 ClojureScript 로 개발을 하고 Google Closure Compiler 로 컴파일을 하면 자바스크립트 파일이 튀어 나옵니다. 이 파일을 이용해서 Client Side 의 작업과 심지어는 Server Side (Node.jsJavascript 로도 바꾸어 줍니다) 작업까지도 일원화 할 수가 있습니다. 

이름에서도 유추할 수 있듯이 사용하고 있는 Lisp 의 방언 (dialect) 은 바로 Clojure 입니다. 

개요만 찾아서 보시고 바로 튜토리얼로 넘어가면 좋을 것 같습니다. 

색이 나오고 안 나오고의 차이가 무지 큽니다. 세팅도 쉽습니다. 

$ git config --global color.ui true



위에 것만  Command Line 상에서 쳐 주시면 끝!!  
OSX 에서 GNU Emacs 를 사용중입니다. 귀찮고도 짜증나는 것중의 한가지가 왠만한 것들에 PATH 가 전혀 안 잡혀 있다는 것입니다. 심지어 $HOME/.bash_profile 에 내용을 넣어준다고 해도 Emacs 는 그 Path 의 영향을 받지 않더군요. 현재 Emacs 가 가지고 있는 PATH 정보를 확인하고자 한다면 

M-x shell 


로 들어가서 Prompt 가 뜨면 

bash-3.2$ env | grep PATH
EMACSPATH=/Applications/Emacs.app/Contents/MacOS/bin
PATH=/usr/bin:/bin:/usr/sbin:/sbin


이렇게 빈약하게 걸려 있는 것 뿐입니다. 귀찮더라도 추가해 주고 싶은 PATH 가 있다면 .emacs 파일에 

(setenv "PATH"
  (concat
   "/usr/local/bin" ":"
   "/opt/local/bin" ":"
   (getenv "PATH")
  )
)


이렇게 추가해 주면 완성입니다. 더 추가해 주고 싶은 PATH 를 쭈욱 써주시면 됩니다. 

전 각성 전 이미지가 더 낫더군요



우동이는 갔습니다. 아아, 사랑하는 나의 우동이는 갔습니다.
 푸른 산빛을 깨치고 단풍나무 숲을 향하여 난 작은 길을 걸어서, 차마 떨치고 갔습니다.
 황금(黃金)의 꽃같이 굳고 빛나든 옛 맹서(盟誓)는 차디찬 티끌이 되어서 한숨의 미풍(微風)에 날아갔습니다.
 날카로운 첫 키스의 추억(追憶)은 나의 운명(運命)의 지침(指針)을 돌려 놓고, 뒷걸음쳐서 사라졌습니다.
 나는 향기로운 우동의 말소리에 귀먹고, 꽃다운 우동의 얼굴에 눈멀었습니다.
 사랑도 사람의 일이라, 만날 때에 미리 떠날 것을 염려하고 경계하지 아니한 것은 아니지만, 이별은 뜻밖의 일이 되고, 놀란 가슴은 새로운 슬픔에 터집니다.
 그러나 이별을 쓸데없는 눈물의 원천(源泉)을 만들고 마는 것은 스스로 사랑을 깨치는 것인 줄 아는 까닭에, 걷잡을 수 없는 슬픔의 힘을 옮겨서 새 희망(希望)의 정수박이에 들어부었습니다.
 우리는 만날 때에 떠날 것을 염려하는 것과 같이, 떠날 때에 다시 만날 것을 믿습니다.
 아아, 우동이는 갔지마는 나는 우동을 보내지 아니하였습니다.
 제 곡조를 못 이기는 사랑의 노래는 우동의 침묵(沈默)을 휩싸고 돕니다.  

  

$ wget http://www.seelotus.com/gojeon/hyeon-dae/si/si-new/han-yong-un-nim-ui-chim-muk.htm
$ emacs han-yong-un-nim-ui-chim-muk.htm



in Emacs

M-x replace-string RET
님은 RET
우동이는 RET



음.. 

M-x replace-string RET
님 RET
우동 RET


됐다.. 

엉엉.. 저에게 수천만 딜을 안겨주었던 우동이는 이제 없습니다. 하지만 내 가슴에! 내 등에! 내 카드덱에 살아 있어.. 후다다닥 

우동이의 5배수 딜 기간이 사라지고 춘향이만 남았는데, 춘향이는 영 그 맛이 안나는군요. 첫타에 힐을 터뜨리지 않나, 끝날때까지 힐을 안하질 않나.. 

이제 무슨 맛으로 확밀아를 할까요.





 


IT 프로젝트도 별반 다르지 않을 것 같다는 생각이.. 

As programming environments grow in power, and languages become more abstract, the Lisp style of programming is gradually replacing the old plan-and-implement model. - Paul graham 



조금 의역을 하자면
(하드웨어 스펙들이 점점 좋아져서 언어별의 속도차이가 별로 티가 안나는) 프로그래밍 환경이 되어가면 갈 수록 , (프로그래밍) 언어들은 점점 더 추상적이 되어 가고 (조금 더 고수준의 언어가 되어 가고) 리습 스타일의 프로그래밍 방법들이 (Bottom-up 프로그래밍 스타일을 말하는 것 같습니다) 옛날 방식의 '계획을 세우고 구현을 하는' 모델을 점차적으로 대체할 것입니다. 

굳이 리습 스타일이라고 표현을 한 이유는 저 문구가 나온 책이 Ansi Common Lisp 이였기 때문이고요, 확실하게 예전의 워터폴 (Waterfall) 이라고 알려진 '요구사항 정의 - 분석 - 기획 - 설계 - 개발 - 테스트' 의 형식을 취하는 개발 방법론들은 점점 더 옛날 방식이 되어 가고 있습니다. 

게다가 하드웨어 스펙들이 점점 좋아지니, 자바나 노드제이에스(Node.js) 나 속도의 차를 일반 사용자는 잘 느끼지 못하는 단계에 이르다 보면 개발하기 빠른 언어로 프로젝트를 개발하는 것이 가장 좋겠지요. (빠른 하드웨어 시대에 가장 큰 병목은 개발자의 개발 속도 입니다) 

그런 의미에서 공감이 되는 글이라고 할 수 있습니다. (이 사람은 이걸 90년대 초반에 예견했네요 ㅎㅎ) 


 

+ Recent posts