Skip to content

Commit

Permalink
πŸ™ˆ
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricky Reusser committed Mar 5, 2020
1 parent ade657c commit baefadd
Show file tree
Hide file tree
Showing 371 changed files with 1,661 additions and 2,002 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ src/src/tmp
dev
node_modules
src/src/unused
.DS_Store
build
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<body>
<div id="idyll-mount"><div data-reactroot=""><div class="idyll-root"><nav class="menu"><button class="menu__thumb"><span class="menu__hamburger"></span><span class="menu__hamburger"></span><span class="menu__hamburger"></span></button><div class="menu__content"><div class="menu__heading"><a href="/">rreusser.github.io</a></div><div class="menu__items"><a class="menu__item" href="/sketches/">Sketches</a><a class="menu__item" href="/writing/">Writing</a><a class="menu__item" href="https://github.com/rreusser">github.com/rreusser</a><a class="menu__item" href="https://twitter.com/rickyreusser">@rickyreusser</a></div></div></nav><div class="article-header"><div class="article-header__content"><h1 class="hed">A Series of Unfortunate Things I Programmed One Time</h1><div class="byline"><a href="https://github.com/rreusser">Ricky Reusser</a></div><div class="published-at">March 16, 2015</div></div></div><div class=" idyll-text-container"><p>I’ve been thinking lately about what makes good engineering. Actually, let’s be honest. As engineers, that’s not what we focus on. We get hung up on the failuresβ€”which always seem to outnumber the successes. Of course once you get out into the real world of programming for a livelihood, success is measured in terms of project completion and client satisfaction, but as easy as it is to put your head down and focus on the next ticket, that doesn’t absolve us of having to master our craft, to learn new things and better understand and utilize the old.</p><p>But I won’t try to say anything intelligent on good engineering. Instead, I’ll try to communicate the regrets that surfaced last weekend when I plugged in my old laptop and sifted through a decade-old folder called <code>projects</code>.</p><h2>How I started programming</h2><p>The first thing I went looking for was one of my first major programming efforts, the result of the reason I started programming. A pretty long time ago, I came across a paper called <a href="http://graphics.ucsd.edu/~henrik/papers/smoke/smoke.pdf">Visual Simulation of Smoke</a> by some pretty impressive people at Stanford. Research like this is what makes those Pixar movies possible. That you can simulate such complex dynamics from a set of simple principles fascinated me. This was about halfway through high school, so I decided to learn vector calculus and linear algebra just to make this happen.</p><p>It was a long, slow process. Timestamps indicate that I finally got something working five years later in about 2005 (Junior year of college). Frankly, I still feel pretty good about the result!</p><figure><video src="https://s3.amazonaws.com/rickyreusser.com/fluid.mp4" loop="" controls=""></video><figcaption>
The finished product, five years in the making.</figcaption></figure><h2>Down the Rabbit Hole</h2><p>In hindsight, this shouldn’t really amount to more than a week or two of work, but learning is the process of making hindsight obvious. One way or another though, I had something special: knowledge. And experience. At this point, I had three options:</p><ol><li>Learn from what I’d done and improve</li><li>Learn from what others have done and improve</li><li>Go down the rabbit hole and see how complicated I can make things</li></ol><p>
Given my experience at the time, it’s hard to say I chose the wrong option, but let’s be clear: I chose (3), and I didn’t just slowly wade into it. I sought out complexity. I enhanced the complexity. No, seriously. I took the basic method and made it as absolutely opaque as I could. I wanted to enter it into the <a href="http://www.ioccc.org/">International Obfuscated C Code Contest</a>:</p><pre style="display:block;overflow-x:auto;padding:0.5em;color:#abb2bf;background:#282c34"><code><span style="color:#61aeee">#<span>include</span><span style="color:#98c379">&lt;X11/Xlib.h&gt;</span></span>
Given my experience at the time, it’s hard to say I chose the wrong option, but let’s be clear: I chose (3), and I didn’t just slowly wade into it. I sought out complexity. I enhanced the complexity. No, seriously. I took the basic method and made it as absolutely opaque as I could. I wanted to enter it into the <a href="http://www.ioccc.org/">International Obfuscated C Code Contest</a>:</p><pre style="display:block;overflow-x:auto;padding:0.5em;color:#abb2bf;background:#282c34"><code> <span style="color:#61aeee">#<span>include</span><span style="color:#98c379">&lt;X11/Xlib.h&gt;</span></span>
<span style="color:#61aeee">#<span>include</span><span style="color:#98c379">&lt;math.h&gt;</span></span>
<span style="color:#61aeee">#<span>include</span><span style="color:#98c379">&lt;stdio.h&gt;</span></span>
<span style="color:#61aeee">#<span>include</span><span style="color:#98c379">&lt;unistd.h&gt;</span></span>
Expand Down Expand Up @@ -56,7 +56,7 @@
a,<span style="color:#d19a66">0</span>,l,U(b,<span style="color:#d19a66">0</span>,l,c=<span style="color:#d19a66">0</span>;P()c=l<span style="color:#d19a66">-1</span>;P(-)))T(<span style="color:#d19a66">1</span>,Q=-r(<span style="color:#d19a66">8</span>);U(d,<span style="color:#d19a66">0</span>,<span style="color:#d19a66">3</span>,Q+=_(<span style="color:#d19a66">9</span>,O[d])+_(<span style="color:#d19a66">9</span>,-O[d
]);)r(<span style="color:#d19a66">9</span>)+=<span style="color:#d19a66">0117</span>*(Q/<span style="color:#d19a66">6</span>-r(<span style="color:#d19a66">9</span>))/<span style="color:#d19a66">0620</span>;)}T(<span style="color:#d19a66">1</span>,U(d,<span style="color:#d19a66">0</span>,<span style="color:#d19a66">3</span>,<span style="color:#c678dd">if</span>(a)r(d)=r(d+<span style="color:#d19a66">4</span>)-r(<span style="color:#d19a66">9</span>)+_(<span style="color:#d19a66">011</span>,-
O[d]);))W=u[<span style="color:#d19a66">3</span>],u[<span style="color:#d19a66">3</span>]=u[<span style="color:#d19a66">7</span>],u[<span style="color:#d19a66">7</span>]=W;}<span style="color:#c678dd">if</span>(S<span style="color:#d19a66">-2</span>)<span style="color:#e6c07b">putchar</span>(<span style="color:#d19a66">05</span>);<span style="color:#c678dd">else</span>{<span style="color:#c678dd">if</span>(getchar()<span style="color:#d19a66">-05</span>){
rewind(<span style="color:#e6c07b">stdin</span>);getchar();}}usleep(<span style="color:#d19a66">9</span>&lt;&lt;<span style="color:#d19a66">9</span>);}}</code></pre><p>This has basically all the features of the video above, except it’s dramatically less useful. I even RLE-encoded the University of Michigan β€˜M’ on line 22 and a small part of line 21. It has a X-Windows interface. It doesn’t run correctly unless line 1 starts with a tab.</p><p>So am I proud of this code? Yeah, a little. (<a href="https://github.com/rreusser/rrcfd/">It’s on github by the way.</a>) But that’s vastly outweighed by the regret I have over not having used this period of my life more effectively. It’s likely I may never again have the combination of time, motivation, and inspiration that it takes to dive so deep into this particular confluence of math, science, and programming.</p><h2>Still more</h2><p>Actually, I went a bit farther. The next stop on this journey through my time capsule was into the pejoratively named field of Colorful Fluid Dynamics (CFD) (not to be confused with the more useful field of Computational Fluid Dynamics). Colorful Fluid Dynamics is what you get when you leave behind rigor and accuracy and just try to make pretty pictures.</p><p>In 2006, I got my Incomplete LU-Preconditioned Bi-Conjugate Gradient Stabilized (ILU-Preconditioned BiCG-Stab) solver working and used it to solve Laplace’s equation (think: stretched membrane) on a two-dimensional finite volume grid. I’m pretty certain it remains the most complicated thing I’ve ever programmed successfully, but by the time I finally got it working, I was so exhausted and burned out on my search for complexity that the rest of my career in Aerospace Engineering was really just a slow coming-to-terms with the fact that I no longer wanted anything to do with it.</p><p>I found the complexity I was looking for, but it didn’t have the meaning I’d hoped for.</p><figure><img src="images/homework-soln.jpg" alt="Finite Volume Homework"/></figure><h2>So did I learn anything?</h2><p>I’m not trying to bash all my old projects. I learned a lot. I made some things I’m proud of. But for such a large amount of effort, there are so many ways I could’ve put this effort and energy to better use. So has anything changed? I’d definitely say soβ€”at least I like to think I’m finally failing lessβ€”but for someone who codes full-time now, it’s hard to look at my github page and convince myself that I’m actually doing a better job of integrating meaningfully into a larger community of developers. Of course to be frank, that’s not the goal I’m after anyway. Tools are fun to use, learn, and create, but they’re not inherently meaningful. They are means to an end. So my real goal?</p><h2 style="text-align:center;margin-bottom:0em;margin-top:1.5em" idyll="[object Object]">goal:</h2><h3 style="text-align:center;color:#ca4747;margin-top:1.0em;margin-bottom:2em;font-weight:normal;max-width:375px;margin-left:auto;margin-right:auto" idyll="[object Object]">communicate passion and knowledge about things I find meaningful</h3><p>And frankly, I think I’ve been doing a pretty poor job. <a href="https://www.youtube.com/watch?v=vMN5uQhF-Ro">But I’m trying real hard</a>.</p></div><footer class="footer"><div class="footer__content"><div class="footer_copy">Β© 2018 Ricky Reusser</div></div></footer></div></div></div>
<script src="static/idyll_index.js"></script>
rewind(<span style="color:#e6c07b">stdin</span>);getchar();}}usleep(<span style="color:#d19a66">9</span>&lt;&lt;<span style="color:#d19a66">9</span>);}}</code></pre><p>This has basically all the features of the video above, except it’s dramatically less useful. I even RLE-encoded the University of Michigan β€˜M’ on line 22 and a small part of line 21. It has a X-Windows interface. It doesn’t run correctly unless line 1 starts with a tab.</p><p>So am I proud of this code? Yeah, a little. (<a href="https://github.com/rreusser/rrcfd/">It’s on github by the way.</a>) But that’s vastly outweighed by the regret I have over not having used this period of my life more effectively. It’s likely I may never again have the combination of time, motivation, and inspiration that it takes to dive so deep into this particular confluence of math, science, and programming.</p><h2>Still more</h2><p>Actually, I went a bit farther. The next stop on this journey through my time capsule was into the pejoratively named field of Colorful Fluid Dynamics (CFD) (not to be confused with the more useful field of Computational Fluid Dynamics). Colorful Fluid Dynamics is what you get when you leave behind rigor and accuracy and just try to make pretty pictures.</p><p>In 2006, I got my Incomplete LU-Preconditioned Bi-Conjugate Gradient Stabilized (ILU-Preconditioned BiCG-Stab) solver working and used it to solve Laplace’s equation (think: stretched membrane) on a two-dimensional finite volume grid. I’m pretty certain it remains the most complicated thing I’ve ever programmed successfully, but by the time I finally got it working, I was so exhausted and burned out on my search for complexity that the rest of my career in Aerospace Engineering was really just a slow coming-to-terms with the fact that I no longer wanted anything to do with it.</p><p>I found the complexity I was looking for, but it didn’t have the meaning I’d hoped for.</p><figure><img src="static/homework-soln.jpg" alt="Finite Volume Homework"/></figure><h2>So did I learn anything?</h2><p>I’m not trying to bash all my old projects. I learned a lot. I made some things I’m proud of. But for such a large amount of effort, there are so many ways I could’ve put this effort and energy to better use. So has anything changed? I’d definitely say soβ€”at least I like to think I’m finally failing lessβ€”but for someone who codes full-time now, it’s hard to look at my github page and convince myself that I’m actually doing a better job of integrating meaningfully into a larger community of developers. Of course to be frank, that’s not the goal I’m after anyway. Tools are fun to use, learn, and create, but they’re not inherently meaningful. They are means to an end. So my real goal?</p><h2 style="text-align:center;margin-bottom:0em;margin-top:1.5em" idyll="[object Object]">goal:</h2><h3 style="text-align:center;color:#ca4747;margin-top:1.0em;margin-bottom:2em;font-weight:normal;max-width:375px;margin-left:auto;margin-right:auto" idyll="[object Object]">communicate passion and knowledge about things I find meaningful</h3><p>And frankly, I think I’ve been doing a pretty poor job. <a href="https://www.youtube.com/watch?v=vMN5uQhF-Ro">But I’m trying real hard</a>.</p></div><footer class="footer"><div class="footer__content"><div class="footer_copy">Β© 2018 Ricky Reusser</div></div></footer></div></div></div>
<script src="index.js"></script>
</body>
</html>
100 changes: 70 additions & 30 deletions a-series-of-unfortunate-things-i-programmed-one-time/index.js

Large diffs are not rendered by default.

File renamed without changes.
126 changes: 82 additions & 44 deletions aligning-3d-scans/index.js

Large diffs are not rendered by default.

File renamed without changes
2 changes: 1 addition & 1 deletion fibonacci-sphere/bundle.js

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions fibonacci-sphere/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<!DOCTYPE html><html lang="en" dir="ltr"><head><title>Fibonacci Sphere</title><meta charset="utf-8"><meta name="twitter:image" content="https://cdn.rawgit.com/rreusser/rreusser.github.io/08e316fc/src/src/fibonacci-sphere/thumbnail.jpg">
<meta name="twitter:card" content="summary_large_image">
<meta name="application-name" content="Fibonacci Sphere">
<!DOCTYPE html><html lang="en" dir="ltr"><head><title>Fibonacci Sphere</title><meta charset="utf-8"><meta name="application-name" content="Fibonacci Sphere">
<meta name="subject" content="From Martin Roberts' article about evenly distributed points on a sphere">
<meta name="abstract" content="From Martin Roberts' article about evenly distributed points on a sphere">
<meta name="twitter:title" content="Fibonacci Sphere">
<meta name="description" content="From Martin Roberts' article about evenly distributed points on a sphere">
<meta name="twitter:description" content="From Martin Roberts' article about evenly distributed points on a sphere">
<meta name="author" content="Ricky Reusser">
<meta name="twitter:creator" content="Ricky Reusser">
<meta property="og:image" content="https://cdn.rawgit.com/rreusser/rreusser.github.io/08e316fc/src/src/fibonacci-sphere/thumbnail.jpg">
<meta name="twitter:card" content="summary">
<meta property="og:title" content="Fibonacci Sphere">
<meta property="og:description" content="From Martin Roberts' article about evenly distributed points on a sphere">
<meta property="article:author" content="Ricky Reusser">
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit baefadd

Please sign in to comment.