Harvard CS50の動画で、VSCodeの使い方を学ぶ
Harvard のプログラミングコースCS50を受講する際に、VSCodeの使い方について事前に勉強しておくと便利です。下記に、オフィシャルのYouTube動画のリンクそれからこの動画で学べる内容について、記載します。
18分ほどの動画です。
Visual Studio Code for CS50
VSCodeは、Cloud上のものを使う
動画内で使われるVSCodeは、GitHubのCode Space(cloud)、ウェブブラウザを使って、使用できるものです。環境などを1から自分で作る必要がないので、初心者がすぐにコーディングを勉強できるのでとてもお勧めです。下記サイトからGitHubアカウントにログインして使用します。
このサイトにログインする際にGit Hubアカウントが必要なので、事前に作成しておいてください。
Visual Studio Code for CS50
プログラミングを始める前のやることリスト
GitHubアカウントの作成以外にもやって置くといいことが他にもありますので、まとめて下記にやることリストを記載しておきます。これを事前にやっておくとスムーズに行くのでぜひやっておくことをお勧めします。
動画の内容は、Terminalを使って、ファイルやフォルダの作成移動など基本的なCommand Lineについての解説です。まだ使ったことがない人はぜひこの動画で勉強してみてください。
具体的なCommand lineの内容は下記に記載します。
学べるCommand Lineのリスト
ls
cp
mv
rm
mkdir
cd
rmdir
clear
1. Visual Studio Code for CS50
2. Getting Started
まだアカウントを持っていない場合は、GitHubアカウントの作成。
アカウント作成ができたら、code.cs50.ioにアクセスして、GitHubアカウントでログインします。
3. Visual Studio Code's Interface
4. Command-line Interface
code hello.py
print("hello, world")
code hello.py
python hello.py
5. Unix Commands
ls list
cp copy
mv move or rename
rm remove
mkdir make a directory
cd change directory
rmdir remove directory
clear clear terminal window
6. Listing Files
ls
7. Copying Files
ls
cp hello.py goodbye.py
ls
cp hello.py goodbye.py
code goodbye.py
print("goodbye, world")
8. Renaming Files
ls
cp hello.py goodbye.py
code goodbye.py
mv goodye.py farewell.py
9. Removing Files
ls
cp hello.py goodbye.py
code goodbye.py
mv goodye.py farewell.py
rm far hit tab and enter
and hit y and hit enter
hit tab to autocomplete
10. Creating Folders
ls
cp hello.py goodbye.py
code goodbye.py
mv goodye.py farewell.py
rm far hit tab and enter
and hit y and hit enter
clear
mkdir folder
11. Changing Folders
ls
cd folder/
folder/ ls
folder/ code farewell.py
12. Moving Files
folder/ ls
folder/ mv farewell.py ..
folder/ ls
folder/ cd
13. Removing Folders
ls
rmdir folder
14. Command History
hit up to back through history of command