Skip to content

Instantly share code, notes, and snippets.

@evandrix
Created August 7, 2011 23:57
Show Gist options
  • Save evandrix/1130954 to your computer and use it in GitHub Desktop.
Save evandrix/1130954 to your computer and use it in GitHub Desktop.
Programmer's Links: Basics
@ http://altdevblogaday.com/2011/08/06/demise-low-level-programmer/
Floating Point Numbers
They are very useful but often used in situations where they simply don’t suit the solution the programmer is attempting to write. The following links should provide some background and info on where they are not so useful, what the pitfalls are and sometimes even how to avoid them.
http://www.cprogramming.com/tutorial.html#fptutorial
http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/
http://www.codeproject.com/KB/recipes/float_point.aspx
http://drdobbs.com/184402741?pgno=4
http://users.tkk.fi/jhi/infnan.html
Fixed Point Numbers
Fixed point math is mildly old school but it is VERY useful both to understand its makeup and to use. Sadly because it is considered old school many of the online sources are out of date.
http://x86asm.net/articles/fixed-point-arithmetic-and-tricks/
http://gameprogrammer.com/4-fixed.html
Processor Cache Behavior / Memory
http://www.akkadia.org/drepper/cpumemory.pdf
http://en.wikipedia.org/wiki/CPU_cache
http://igoro.com/archive/gallery-of-processor-cache-effects/
Bit Shifting
http://www.cprogramming.com/tutorial/bitwise_operators.html
useful hacks (use carefully)
http://graphics.stanford.edu/~seander/bithacks.html
http://stackoverflow.com/questions/539836/emulating-variable-bit-shift-using-only-constant-shifts
http://guru.multimedia.cx/avoiding-branchesifconditionals/
Branch Prediction
This may be lower level that people think they need to go… but they’d be wrong. Understanding how the hardware you’re programming for treats branches can affect performance to a HUGE degree… far more than most programmers may appreciate re: death by a thousand cuts
http://cellperformance.beyond3d.com/articles/2006/04/background-on-branching.html
http://igoro.com/archive/fast-and-slow-if-statements-branch-prediction-in-modern-processors/
http://www.k8gu.com/ece.umn.edu/documents/classes/ece362-branch-prediction.pdf
http://www.cs.ucr.edu/~gupta/teaching/203A-09/My6.pdf
Sorting
This isn’t really low-level but something i consider “basic” and its an area where many programmers are simply lacking in understanding. Do yourself a favor and play around with this link, read the links it sends you to for each algorithm and try to grasp when each might be used, the properties as described and the next time you need to sort something… consult it.
http://www.sorting-algorithms.com/
another good link with sub links: http://corte.si//posts/code/visualisingsorting/index.html
a funny one (but still strangely useful), the bubble sort dance: http://www.youtube.com/watch?v=lyZQPjUT5B4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment