The Dirac equation is consistent with special relativity by Ciro Santilli 35 Updated +Created
TODO, including why the Schrodinger equation is not.
Dirac Lagrangian by Ciro Santilli 35 Updated +Created
where:
Remember that is a 4-vetor, gamma matrices are 4x4 matrices, so the whole thing comes down to a dot product of two 4-vectors, with a modified by matrix multiplication/derivatives, and the result is a scalar, as expected for a Lagrangian.
Like any other Lagrangian, you can then recover the Dirac equation, which is the corresponding equations of motion, by applying the Euler-Lagrange equation to the Lagrangian.
Pre-order depth-first search by Ciro Santilli 35 Updated +Created
This is the order in which you would want to transverse to read the chapters of a book.
Like breadth-first search, this also has the property of visiting parents before any children.
Or equivalently, the set of rows is orthonormal, and so is the set of columns. TODO proof that it is equivalent to the orthogonal group is the group of all matrices that preserve the dot product.
Bisection (software engineering) by Ciro Santilli 35 Updated +Created
One of the Holiest age old debugging techniques!
Git has some helpers to help you achieve bisection Nirvana: stackoverflow.com/questions/4713088/how-to-use-git-bisect/22592593#22592593
Obviously not restricted to software engineering alone, and used in all areas of engineering, e.g. Video "Air-tight vs. Vacuum-tight by AlphaPhoenix (2020)" uses it in vacuum engineering.
The cool thing about bisection is that it is a brainless process: unlike when using a debugger, you don't have to understand anything about the system, and it incredibly narrows down the problem cause for you. Not having to think is great!
WikiLeaks by Ciro Santilli 35 Updated +Created
CC BY by Ciro Santilli 35 Updated +Created
SymPy by Ciro Santilli 35 Updated +Created
This is the dream cheating software every student should know about.
It also has serious applications obviously. www.sympy.org/scipy-2017-codegen-tutorial/ mentions code generation capabilities, which sounds super cool!
The code in this section was tested on sympy==1.8 and Python 3.9.5.
Let's start with some basics. fractions:
from sympy import *
sympify(2)/3 + sympify(1)/2
outputs:
7/6
Note that this is an exact value, it does not get converted to floating-point numbers where precision could be lost!
We can also do everything with symbols:
from sympy import *
x, y = symbols('x y')
expr = x/3 + y/2
print(expr)
outputs:
x/3 + y/2
We can now evaluate that expression object at any time:
expr.subs({x: 1, y: 2})
outputs:
4/3
How about a square root?
x = sqrt(2)
print(x)
outputs:
sqrt(2)
so we understand that the value was kept without simplification. And of course:
sqrt(2)**2
outputs 2. Also:
sqrt(-1)
outputs:
I
I is the imaginary unit. We can use that symbol directly as well, e.g.:
I*I
gives:
-1
Let's do some trigonometry:
cos(pi)
gives:
-1
and:
cos(pi/4)
gives:
sqrt(2)/2
The exponential also works:
exp(I*pi)
gives;
-1
Now for some calculus. To find the derivative of the natural logarithm:
from sympy import *
x = symbols('x')
diff(ln(x), x)
outputs:
1/x
Just read that. One over x. Beauty.
Let's do some more. Let's solve a simple differential equation:
y''(t) - 2y'(t) + y(t) = sin(t)
Doing:
from sympy import *
x = symbols('x')
f, g = symbols('f g', cls=Function)
diffeq = Eq(f(x).diff(x, x) - 2*f(x).diff(x) + f(x), sin(x)**4)
print(dsolve(diffeq, f(x)))
outputs:
Eq(f(x), (C1 + C2*x)*exp(x) + cos(x)/2)
which means:
To be fair though, it can't do anything crazy, it likely just goes over known patterns that it has solvers for, e.g. if we change it to:
diffeq = Eq(f(x).diff(x, x)**2 + f(x), 0)
it just blows up:
NotImplementedError: solve: Cannot solve f(x) + Derivative(f(x), (x, 2))**2
Sad.
Let's try some polynomial equations:
from sympy import *
x, a, b, c = symbols('x a b c d e f')
eq = Eq(a*x**2 + b*x + c, 0)
sol = solveset(eq, x)
print(sol)
which outputs:
FiniteSet(-b/(2*a) - sqrt(-4*a*c + b**2)/(2*a), -b/(2*a) + sqrt(-4*a*c + b**2)/(2*a))
which is a not amazingly nice version of the quadratic formula. Let's evaluate with some specific constants after the fact:
sol.subs({a: 1, b: 2, c: 3})
which outputs
FiniteSet(-1 + sqrt(2)*I, -1 - sqrt(2)*I)
Let's see if it handles the quartic equation:
x, a, b, c, d, e, f = symbols('x a b c d e f')
eq = Eq(e*x**4 + d*x**3 + c*x**2 + b*x + a, 0)
solveset(eq, x)
Something comes out. It takes up the entire terminal. Naughty. And now let's try to mess with it:
x, a, b, c, d, e, f = symbols('x a b c d e f')
eq = Eq(f*x**5 + e*x**4 + d*x**3 + c*x**2 + b*x + a, 0)
solveset(eq, x)
and this time it spits out something more magic:
ConditionSet(x, Eq(a + b*x + c*x**2 + d*x**3 + e*x**4 + f*x**5, 0), Complexes)
Oh well.
Let's try some linear algebra.
m = Matrix([[1, 2], [3, 4]])
Let's invert it:
m**-1
outputs:
Matrix([
[ -2,    1],
[3/2, -1/2]])
Cloud computing platform by Ciro Santilli 35 Updated +Created
Everything can break everything by Ciro Santilli 35 Updated +Created
Whenever someone asks:
I can only see this one thing different our setups, do you think it could be the cause of our different behaviour?
you don't need to read anymore, just point them to this page immediately. Virtualization for the win.
Keep debug notes by Ciro Santilli 35 Updated +Created
When debugging complex software, make sure to keep notes of every interesting find you make in a note file, as you extract it from the integrated development environment or debugger.
Especially if your memory sucks like Ciro's.
This is incredibly helpful in fully understanding and then solving complex bugs.
Plasmid by Ciro Santilli 35 Updated +Created
Hydrogen chemosynthesis by Ciro Santilli 35 Updated +Created
Cell wall by Ciro Santilli 35 Updated +Created
Sass (stylesheet language) by Ciro Santilli 35 Updated +Created
The more of their syntax gets merged into mainline Cascading Style Sheets, the better the world will be.
Sugar by Ciro Santilli 35 Updated +Created
We define a "sugar" as either of:because these are small carbohydrates, and they taste sweet to humans.
Fundação Estudar by Ciro Santilli 35 Updated +Created
Video 1.
What I learned in Harvard part 1 by Jorge Paulo Lemann (2012)
Source. Portuguese talk about his experiences. A bit bably, but has a few good comments:
  • You don't learn the Harvard experience, you absorb it.
  • Being amongst excellent people makes you learn what excelent people are like, just like only by tasting many different types of wine can you know what good wine is like.
    This one does have bias danger though. But detecting greatness, is as type of bias arguably.
University of São Carlos by Ciro Santilli 35 Updated +Created

Unlisted articles are being shown, click here to show only listed articles.