Survive as a grad student in scientific computing
What is version control? Most jargons in Git have "literal" meanings.
- pull, commit, push
- branch, pull request, merge, comments
- head, stash, pop
- (intermediate) merging conflict
- (advanced) submodule
- (advanced) pull request to others' repo, rebase, incoming vs current change
GUI for git
The best thing about GUI is difference viewer/editor integration:
- Github desktop
- GitKraken (written in Electron/NodeJS, I recommend this one even it is paid sub, free for Github Edu users)
- Statistics of the repo
- GitHub website (we can use
jekyllto "build" a site)
- Making friends, expand the network
- Submit bug report/feature request to other's package
Visual Studio Code
- We need a good editor, possible candidates: Atom, Sublime Text, JetBrains' bundle (PyCharm, etc).
- VS Code is an all-in-one package.
- A pro debugging environment
- Highly customizable b/c written in Electron/NodeJS
- Machine-learning driven intelligent code autocompletion
- Customized snippets
- Nicely integrated with Git (checkout to branches, resolving conflits)
- Setting sync across different platforms (YMMV)
- LaTeX workshop
- JS, TypeScript, C/C++, many others
Good coding habit I wish I knew 13 years ago
Here the examples are based on using Dr. Long Chen's iFEM package:
- Categorize and summarize solutions to common problems, e.g., how to build the incidence matrix based on the topological relation between objects, or even just how to read a pickled file, etc.
- Write lots of comments even to ourselves.
- Set up common sandboxes for testing purposes: (example 1) set up explicit procedures (not function calls if in MATLAB) for getting
edgerelated datastructures if we were to code something related to that, instead of directly writing functions. (example 2) set up common test meshes like 8x8 that labeling of the vertices are fixed.
- To learn advanced vectorization is to come up with a
forloop that produces the same thing first.
- Use Boolean indexing more often, avoid using absolute numerical indexing (more bug prone when concatenating).