A Pen by Chris La Torres on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x89b1959823bF3a9621C4a028B0448b22E44f9dE8 |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This function evaluates points along a bezier curve given by a starting position and velocity, and an ending position and velocity | |
// This can be thought of as interpolating between two linear trajectories | |
public static Vector3 cubicBezier(Vector3 aStart, Vector3 aVel, Vector3 bEnd, Vector3 bVel, float duration, float time) { | |
float alpha = time / duration; //Normalize the time | |
Vector3 aEnd = aStart + (aVel * duration); //Where it would end up if it were just A's dynamics | |
Vector3 bStart = bEnd - (bVel * duration); //Where it would start if it were just B's dynamics | |
return | |
(Mathf.Pow(1 - alpha, 3f) * aStart) + | |
(3f * Mathf.Pow(1 - alpha, 2f) * alpha * aEnd) + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules | |
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules | |
package-lock.json |
Rich Hickey • 3 years ago
Sorry, I have to disagree with the entire premise here.
A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.
Mastery comes from a combination of at least several of the following:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
body { | |
margin: 0; | |
} | |
</style> | |
</head> | |
<body> | |
<script src="three.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/mnt/c/Users/chris/MagicLeap/mlsdk/v0.19.0/tools/toolchains/bin/aarch64-linux-android-clang++ '-DNODE_GYP_MODULE_NAME=exokit' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DNOMINMAX' '-DLUMIN' '-DWRAPPING_CEF_SHARED' '-DWEBRTC_POSIX' '-DBUILDING_NODE_EXTENSION' -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/include/node -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/src -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/deps/openssl/config -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/deps/openssl/openssl/include -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/deps/uv/include -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/deps/zlib -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/deps/v8/include -I/mnt/c/Users/chris/exokit/node_modules/nan -I/mnt/c/Users/chris/exokit/node_modules/native-canvas-deps/include/core -I/mnt/c/Users/chris/exokit/node_modules/native-canvas-deps/include/config -I/mnt/c/Users/chris/exokit/node_modules/native-canvas-deps/ |
OlderNewer