Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've had a couple of memorable epiphanies. The fact that they are programming related probably says something about me but heck, I can't change that.

Epiphany 1: one day I realized that Bresenham's line algorithm wasn't just a way to draw lines. In reality, it linearly interpolates values over a range. Example: get the gradient/color values along a horizontal line from x0,color0 to x1,color1.

Epiphany 2: The 2nd big "aha" moment was when I worked for a machine tool company and someone explained how our ball screws (a big threaded rod that moves a tool or cross slide when you turn it) was "mapped" so we could tell what the error was at each point and thus correct for that error with a resulting greater accuracy. That concept can be applied to all kinds of problems. For example: Instead of making a "perfect" lens at great expense, you can make a "map" of the lens's imperfections and correct the image in software.



So for the second part, maybe you can sum it up in a pithy way by saying "Sometimes it's more cost effective to know your flaws than to be perfect".


> Example: get the gradient/color values along a horizontal line from x0,color0 to x1,color1.

Sadly, colors don't blend as easy as coordinates: http://www.stuartdenman.com/improved-color-blending/ ... but in general I agree.


Thanks for the link!


Welcome :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: