Skip to content

Instantly share code, notes, and snippets.

@taroyanaka
Last active December 28, 2020 03:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taroyanaka/0c1fd3665a12f15044a43ec3ce158c87 to your computer and use it in GitHub Desktop.
Save taroyanaka/0c1fd3665a12f15044a43ec3ce158c87 to your computer and use it in GitHub Desktop.
Tips for learning a new programming language, etc. 新しくプログラミング言語等を学ぶコツ
方法
・単語を理解する。JSであれば関数。CSSであればプロパティ
→辞書形式のリファレンスを何度も読む
・文章を理解する。JSであればブロック単位のコード。CSSであれば機能としての塊。
→教本のコードを読む、読まずに書くを繰り返す
・パーツ単位で引き出しを増やす。JSとCSSでは機能単位のコードのまとまり。CSSではデザインのイディオム。
→できることのリストを増やす。できるようになったらJSと組み合わせて実際に組み込んで使う
・手軽に実行できる環境を作る
→CSSではHTMLとそれに入れるデータ(文章、画像、SVG)を事前に用意してセットアップ段階を済ませておく
その他
・できないこと/できることの引き出しのリストを作る
→できないこと、から、できることのリストに移し替えていけば、少なくともできることのリストで何かを作ることはできるようになる。
・嵌った時の解決手段を増やす
→JSであればchromeのデバッガー。CSSであれば要素の範囲を示すためにbackground-colorで色付けする、等
・頭の中で「こういうのを作りたい」という課題を適当に作って、頭の中で組む。事前に分からない部分はドキュメントを読む
→実際に組み上げて答え合わせをする
・小さくシンプルに作る
→複雑で大きいコードで書こうとすると学習速度が落ちる。100種類のAPIを理解するには100個作る
・やる気の無い時でも手を動かす
→そういう時は低いクオリティでも構わないし、ごく短時間でもいいし、コピーペーストだけでもいい。手を動かす習慣を失わないために書く
・やる気の無い時用の方法を用意しておく
→JSであればchromeで適当に開いたページでconsoleでdocument.querySelectorAll("any")をタイプして適当に処理。CSSではanimationで何かを雑に動かす。
Methods
Understand the words: functions in JS, properties in CSS, etc.
→Read references in dictionary format as many times as possible.
Understand the text: block of code in JS, chunk of function in CSS.
→Read the code in the textbook and write it without reading it repeatedly.
For JS and CSS, it's a block of code per function; for CSS, it's a design idiom.
→Increase the list of things you can do. Increase the list of things you can do. Once you can do them, combine them with JS and actually incorporate and use them.
Create an environment that can be easily executed.
→In CSS, prepare HTML and the data (text, images, SVG) to be inserted into it in advance to complete the setup stage.
Others
Make a list of what you can't do and what you can do.
→If you make a list of what you can't do, and move it to a list of what you can do, you will at least be able to create something with the list of what you can do.
Increase the number of solutions when you get stuck.
→For JS, use chrome's debugger; for CSS, use background-color to indicate the range of elements, etc.
Create a task in your mind "I want to make something like this" and build it in your mind. Read the document if you don't understand the part in advance.
→Read the documentation for the parts you don't understand.
Make it small and simple.
→If you want to understand 100 different APIs, create 100 of them.
Even when you don't feel like it, work on it.
→When you are not motivated to do something, you can do it even if the quality is low, even if it is very short, even if it is just copy-paste. Write to keep the habit of moving your hands.
Prepare a method for when you are not motivated.
→If you are using JS, type document.querySelectorAll("any") in console on a page opened in chrome and process it appropriately; if you are using CSS, use animation to move something around.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment