Skip to content

Instantly share code, notes, and snippets.

View eebmagic's full-sized avatar

Everett Bolton eebmagic

View GitHub Profile
@eebmagic
eebmagic / approximate.py
Created June 4, 2024 17:07
Approximates pi by generating N random points and then counting how many are in a cirle (have a distance < 1 from the origin). Then uses the ratio of points inside the circle to the total number of points to approximate.
import random
import math
def genPoints(N):
points = []
for i in range(N):
points.append((random.random(), random.random()))
return points
@eebmagic
eebmagic / better_at_programming.md
Last active January 15, 2025 18:48
Getting Better at Programming

For Mak

Yes. I'm writing this in a .md file, hopefully you'll appreciate that lol.

1 - Do as many personal projects as possible

To me this is one of the biggest luxuries of CS over other engineering fields is that our projects have almost zero monetary investment.

  • If you're a civil engineer and want to practice building a small usable bridge, you have to buy materials.
  • If you're a mechanical engineer and want to build a small usable vehicle, you have to buy parts.
  • If you're a chemical engineer you have to buy chemicals and lab equipment.