sangheee / issues

2 stars 0 forks source link

프로그래머의 뇌 읽기 #8

Closed sangheee closed 2 years ago

sangheee commented 2 years ago

트위터의 그 책 나도 함 읽어보자 https://livebook.manning.com/#!/book/the-programmers-brain/ https://livebook.manning.com/#!/discussion

sangheee commented 2 years ago

1. On reading Code Better

1. Decoding your confusing while coding

1.1 Different kinds of confusion in code

그러나 현실에서 우리는 코드를 읽는 것을 연습하는 것보다 코드를 작성하는 것을 훨씬 더 많이 연습한다.

2.2 Overcoming sie limits in your memory

2.3 You see more code than you can read

write code easier to chunk, and thus easier to process.

3. How to learn programming syntax quickly

Just seeing information is not enough

특정 문법을 기억하려고 할 때, 문제는 storage strength가 아니라 retrieval strength에 있다.
지식이 얼마나 잘 저장되어 있느냐가 문제가 아니라, 지식을 얼마나 잘 꺼내느냐!가 문제다!!
LTM 어딘가에 정보가 잘 저장되어 있다 한들, 그것을 꺼내오지 못한다면....useless.....

학습을 추가로 하지 않고도, 정보를 능동적으로 기억하려는 시도만으로 배운 것을 더 많이 기억할 수 있다.

우리는 정보를 찾기 너무 쉬운 세상에 살다보니 문법을 애써 기억할 필요를 느끼지 못한다. 그러다보니 retrieval strength가 강화되지 않고 계속 약한 상태에 머무는 것이다.
기억은 안하고 계속 찾아보기만 하게 되는 것이다.....찾았던 것 또 찾아보고 또 찾아보고.... 다음번에 검색할 때는, 검색 전에 먼저 그것을 의도적이고 능동적으로 기억하려고 시도해봐라

새로운 문법을 배울 때

4. How to read complex code

앞선 chapter에서 lack of STM or LTM을 다루었다면, 이 chapter는 lack of working memory 를 다룬다.

working memory is STM applied to some problem

working memory가 문제에 적용된 STM이기 때문에, STM과 동일하게 2-6개의 문제만 동시에 처리할 수 있다는 용량적 한계가 있다 => cognitive load

programming 관련한 cognitive load types

Techniques to reduce cognitive load

  1. cognitive refactoring
    • the goal of cognitive refactoring is not to make the code more maintainable, but to make it more readable for the current reader at the current point in time.
    • cognitive refactoring은 때로 maintainanbility를 저하시킬 수 있다.
    • cognitive refactoring은 자신만을 위한 refactoring이다. 무엇이 understandable한지 개인의 기반 지식에 따라 다르기 때문이다.
    • cognitive refactoring은 코드를 이해하는게 목적이므로, 많은 경우 이해하고 나면 원상태로 롤백한다.
  2. Replace unfamiliar language constructs

위의 두 방법을 썼는데도 코드가 이해가 안되면, 각 코드가 무슨 동작을 하는진 알아도 큰 그림을 이해하지 못하는 경우일 수 있다. 이 때는 코드를 출력해서 변수, 함수, 구조체, 클래스, 인스턴스의 의존성을 연결하라는데...언제 그걸 하고 있니?

sangheee commented 2 years ago

2. On thinking about code

sangheee commented 2 years ago

1,2 ch는 읽을만, 3,4 ch는 하나마나한, 이거 누가 모르나 싶은 소리해서 짜증나고 시간아깝고 나무한테 미안한 책 image