본문으로 바로가기

프로그래밍 공부하는 방법

category IT 프로그래밍 2018. 1. 24. 23:07




공부하는 방법

오늘 안타까운 메일을 한 통 받았습니다.

알고리즘, 데이터스트럭쳐, 컴퓨터 구조와 같은 것을 열심히 오랫동안 공부했는데 프로그래밍을 할 줄 모른다고요. 자신이 프로그래밍적 사고를 못 하기 때문이라며 그만두는 것을 심각하게 고민하고 있다고 하더군요. 저도 정답을 알고 있는 것은 아닙니다만 평소에 생각하고 있는 것이 있어서 조심스럽게 말을 정리해봤습니다.

적정수준으로 공부하는 것이 중요한 것 같습니다. 언어에 비유를 해볼게요. 아이들은 언어를 배울 때 힘들어하지 않습니다. 아이들은 사고 체계가 고차원적이지 않기 때문에 언어를 복잡하게 사용할 필요가 없거든요. 아이들은 꽤 오랫동안 명사나 동사와 같은 단어로 말을 합니다. 어느 시점에서는 명사와 동사를 조합해서 좀 더 많은 의미를 만들어내기 시작합니다.

이런 과정을 반복하면서 좀 더 복잡한 언어의 체계를 자연스럽게 받아들입니다. 고통스럽지 않지만, 그 효과는 폭발적입니다.

우리가 영어를 배울 때를 생각해봐도 좋을 것 같습니다.







문장을 사용하는 이유는 무엇일까요? 단어를 조합해서 훨씬 더 많은 의미를 만들기 위해서겠죠. 잠깐 따져볼까요? 명사 10개와 동사 10개는 그냥 20개의 의미일 뿐입니다. 하지만 이것들을 조합하면 놀라운 일이 일어납니다. 이것을 주어+동사의 구조에 따라서 조합하면 100(10×10)개의 의미를 만들 수 있습니다.

이를 주어+동사+목적어의 틀에 따라서 조합하면 20개 단어로 1,000(10×10×10)개의 의미를 만들 수 있습니다. 우리가 1,000개의 단어를 조합해서 주어+동사+목적어의 구조로 말을 한다면 우리가 하는 대부분 말이 인류 역사상 누구도 해본 적 없는 말일 가능성이 큽니다. 즉 주어+동사+목적어로도 우리는 충분히 많은 의미를 만들어 낼 수 있습니다.

하지만 제가 학교 때는 이 기초적인 도구의 잠재력을 충분히 사용하기도 전에 관계대명사, 동명사와 같은 것을 배우죠. 이것은 우리 머리를 너무 복잡하게 하는 것 같습니다. 즉 간단한 표현을 할 때도 너무 많은 결합방법이 떠오르기 때문에 아무것도 할 수 없게 됩니다. 누구나 기초가 중요하다는 말을 합니다. 하지만 기초만으로도 충분히 많은 일을 할 수 있다는 말은 잘하지 않는 것 같습니다.

프로그래밍도 사정은 비슷한 것 같아요. 

데이터스트럭쳐, 알고리즘, 디자인 패턴… 이런 것들은 선배 개발자들의 소중한 성취입니다. 그런데 이러한 학문적인 성취들은 아래와 같은 상황들을 해결하기 위해서 고안된 것이 아닙니다.


0. 100건 정도 되는 데이터의 처리

0. 20줄짜리 규모의 코드

0. 혼자서 하는 개발

0. 한 달짜리 프로젝트


롯데월드타워 같은 초고층 빌딩을 짓는 것과 1층짜리 단독주택을 짓는 것은 본질에서는 같은 일입니다. 하지만 현실적으로는 완전히 다른 공학적인 고려가 들어가게 됩니다. 

규모가 달라지면 그 규모를 지탱하기 위해서 막대한 체계들이 필요해지거든요. 1층 건물도 지어본 적이 없는데 초고층 빌딩을 지을 수는 없겠죠. 

동시에 1층 건물을 짓는데 초고층 건물에 필요한 체계들을 사용하는 것은 과한 것이겠죠.

과잉교육의 부작용은 또 있습니다. 공부할수록 좋은 코드에 대한 이해가 높아집니다. 이것 자체는 좋은 것입니다. 






하지만 좋은 코드에 대한 이해가 높아질수록 자신이 만든 코드에 대한 만족도는 떨어지게 됩니다. 

그래서 더 많은 공부를 하지만 자기 코드에 대한 만족도는 오히려 더 떨어지는 악순환에 빠지게 되죠. 

이것이 반복되면 아는 것은 많은데 할 수 있는 것은 별로 없다는 자괴감을 느끼게 됩니다. 적당한 자괴감은 자기 발전의 약이 됩니다. 

하지만 과한 자괴감은 자신감을 괴사시킵니다.

이런 이유로 제가 주장하는 것은 적정수준의 공부입니다. 

장기적으로는 초고층 건물도 지어낼 수 있는 역량을 키워야 합니다. 

동시에 단기적으로는 1층 건물을 짓는 것부터 시작하는 것이 어떨까 싶습니다. 

제가 생각하는 구체적인 공부 방법으로 글을 마무리하겠습니다.

0. 프로그램을 만드는 데 필요한 최소한의 도구를 익힌다.

0. 최소한의 도구로 다양한 문제를 해결해 본다.

0. 가지고 있는 도구로 문제를 해결하는 것이 점점 어려운 일이 되었을 때 선배 개발자들의 성취를 찾아본다. 이 또한 최소한으로.

0. 2번과 3번 반복



How to study



I received a sad email today.


I've been studying algorithms, data structures, computer structures for a long time, and I don't know how to program. He says he's thinking seriously about quitting because he can't think programmatically. I don't know the answer, but I have something in mind that I have always thought about, so I have put it in perspective.


I think it's important to study at the right level. Let me compare it to language. Children don't have a hard time learning languages. Children don't have to use language complicated because their thinking system isn't sophisticated. Children talk for quite a long time in words such as nouns and verbs. At some point, we start to combine nouns with verbs to make more sense.


As you repeat this process, you naturally accept the more complex language systems. It's not painful, but the effects are explosive.


I think it would be good to think about when we learn English.














Why use sentences? It's to put words together and make a lot more sense. Can I have a minute to complain? Ten nouns and 10 verbs are just 20 words. But when you combine them, something amazing happens. By combining them according to the structure of the + verb, you can create 100 (10 × 10) meanings.


By combining them according to the framework of the + verb + object, you can create 1000 (10 × 10) meanings with 20 words. If we give a thousand words together and talk in the form of a + verb or object, it's very possible that most of what we say will be unheard of in human history. In other words, even with the subject + verb + object, we can create enough meaning.


But when I was in school, I learned something like a relative pronoun, a gerund, even before I used it to its full potential. It's like getting our heads complicated too much. So when you're making a simple expression, you can't do anything because you can imagine too many ways to combine. Everybody says that the basics are important. But I don't think you're good enough to say that you can do a lot of things on the ground.


I think the programming is the same. 


Data structures, algorithms, design patterns … these are valuable achievements for senior developers. And these academic achievements are not designed to address these situations.




0. Processing of nearly 100 data


A code of size 0.20 lines


0. Development by yourself


0. A month-long project




Building a skyscraper like the Lotte World Tower and building a one-story detached house are basically the same thing. But the reality is that it involves completely different engineering considerations. 


When the scale changes, it takes a great deal of mechanisms to support it. I've never built a first-floor building before, but I don't think I can build a skyscraper. 


At the same time, it is too much to use the systems needed for skyscrapers to build one story building.


There is another side effect of over-education. The more you study, the better your understanding of the code. This is a good thing in itself. 












However, the more you understand a good code, the less satisfaction you get with the code you create. 


So you study more, but you end up falling into a vicious cycle of satisfaction with your code. 


And when it's repeated, you feel overwhelmed that you know a lot, but you can't do much. Proper sense of shame is the medicine of self-improvement. 


But too much self-despondence can cause a necrosis.


And that's why I'm saying it's the right level of study. 


In the long run, we need to be able to create skyscrapers. 


At the same time, I think it would be better to start by building a one-story building in the short run. 


I will finish my article with a concrete study method.


0.Get the minimum tool you need to create the program.


0.Trouble various problems with minimum tool.


0.When it becomes increasingly difficult to solve problems with the tools you have, look for the achievements of senior developers. This is also the least.


0.Repeat 2 and 3

data-matched-content-rows-num="3" data-matched-content-columns-num="4" data-matched-content-ui-type="image_card_stacked"

--