background preloader

Big-O Algorithm Complexity Cheat Sheet

Big-O Algorithm Complexity Cheat Sheet

50 Coolest Gifts for Guys Under $25 | Dodo Burd You don’t have to spend a lot to get a cool gift for your guy friends and family members. In fact, some of the coolest gifts you can get him are under $25. No matter what his likes and interests are, you can find the perfect gift for any occasion without breaking the bank. Whiskey Stones A set of whiskey stones makes an elegant gift for any guy who enjoys the occasional nightcap. Nine grey whiskey stones are made from natural soapstone, making them as elegant as they are functional. LifeStraw Personal Water Purifier When camping, hiking, kayaking canoeing, and embarking on all manner of outdoor sports, having access to clean water is a constant concern. Stanley Classic Flask Whether he’s on a camping trip or enjoying a celebration, he can sneak a drink with the rugged Stanley Classic Flask. Black Playing Cards Pick Punch You can never have too many guitar picks, and with the pick punch, you’ll never have to worry about running out. Scratch Map Itching to take a vacation? Grime Writer Geek Soap

Statistical Formulas For Programmers By Evan Miller DRAFT: May 19, 2013 Being able to apply statistics is like having a secret superpower. Where most people see averages, you see confidence intervals. When someone says “7 is greater than 5,” you declare that they're really the same. In a cacophony of noise, you hear a cry for help. Unfortunately, not enough programmers have this superpower. As my modest contribution to developer-kind, I've collected together the statistical formulas that I find to be most useful; this page presents them all in one place, a sort of statistical cheat-sheet for the practicing programmer. Most of these formulas can be found in Wikipedia, but others are buried in journal articles or in professors' web pages. Send suggestions and corrections to emmiller@gmail.com Table of Contents 1. One of the first programming lessons in any language is to compute an average. 1.1 Corrected Standard Deviation The standard deviation is a single number that reflects how spread out the data actually is. Where: SE=s√N 2. 3.

nyanp/tiny-cnn How to Hunt Elephants MATHEMATICIANS hunt elephants by going to Africa, throwing out everything that is not an elephant, and catching one of whatever is left. EXPERIENCED MATHEMATICIANS will attempt to prove the existence of at least one unique elephant before proceeding to step 1 as a subordinate exercise. PROFESSORS OF MATHEMATICS will prove the existence of at least one unique elephant and then leave the detection and capture of an actual elephant as an exercise for their graduate students. COMPUTER SCIENTISTS hunt elephants by exercising Algorithm A: Go to Africa. EXPERIENCED COMPUTER PROGRAMMERS modify Algorithm A by placing a known elephant in Cairo to ensure that the algorithm will terminate. ASSEMBLY LANGUAGE PROGRAMMERS prefer to execute Algorithm A on their hands and knees. DATABASE ADMINISTRATORS do not need to go out and capture elephants when they can retrieve them simply with an ad hoc query: STATISTICIANS hunt the first animal they see N times and call it an elephant.

Essential Math for Games Programmers As the quality of games has improved, more attention has been given to all aspects of a game to increase the feeling of reality during gameplay and distinguish it from its competitors. Mathematics provides much of the groundwork for this improvement in realism. And a large part of this improvement is due to the addition of physical simulation. Creating such a simulation may appear to be a daunting task, but given the right background it is not too difficult, and can add a great deal of realism to animation systems, and interactions between avatars and the world. This tutorial deepens the approach of the previous years' Essential Math for Games Programmers, by spending one day on general math topics, and one day focusing in on the topic of physical simulation. Topics for the various incarnations of this tutorial can be found below. Current Materials Slides The latest available versions of the slides for the math tutorials at GDC 2015 are as follows: Past Materials Core Mathematics

The Evolution of a Programmer High School/Jr.High First year in College program Hello(input, output) begin writeln('Hello World') end. Senior year in College (defun hello (print (cons 'Hello (list 'World)))) New professional #include <stdio.h> void main(void) { char *message[] = {"Hello ", "World"}; int i; for(i = 0; i < 2; ++i) printf("%s", message[i]); printf("\n"); } Seasoned professional Master Programmer Apprentice Hacker Experienced Hacker Seasoned Hacker % cc -o a.out ~/src/misc/hw/hw.c % a.out Guru Hacker New Manager Middle Manager mail -s "Hello, world." bob@b12 Bob, could you please write me a program that prints "Hello, world."? Senior Manager % zmail jim I need a "Hello, world." program by this afternoon. Chief Executive % letter letter: Command not found. % mail To: ^X ^F ^C % help mail help: Command not found. % damn! Anonymous If you enjoyed this, you might like:

Bit Twiddling Hacks By Sean Eron Anderson seander@cs.stanford.edu Individually, the code snippets here are in the public domain (unless otherwise noted) — feel free to use them however you please. The aggregate collection and descriptions are © 1997-2005 Sean Eron Anderson. The code and descriptions are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY and without even the implied warranty of merchantability or fitness for a particular purpose. As of May 5, 2005, all the code has been tested thoroughly. Contents About the operation counting methodology When totaling the number of operations for algorithms here, any C operator is counted as one operation. Compute the sign of an integer The last expression above evaluates to sign = v >> 31 for 32-bit integers. Alternatively, if you prefer the result be either -1 or +1, then use: sign = +1 | (v >> (sizeof(int) * CHAR_BIT - 1)); // if v < 0 then -1, else +1 On the other hand, if you prefer the result be either -1, 0, or +1, then use:

Humor - How to Shoot Yourself In the Foot Using Any Programming Language The proliferation of modern programming languages (all of which seem to have stolen countless features from one another) sometimes makes it difficult to remember what language you're currently using. This guide is offered as a public service to help programmers who find themselves in such dilemmas. 370 JCL You send your foot down to MIS with a 4000-page document explaining how you want it to be shot. Three years later, your foot comes back deep-fried. Ada After correctly packaging your foot, you attempt to concurrently load the gun, pull the trigger, scream, and shoot yourself in the foot. APL You shoot yourself in the foot, then spend all day figuring out how to do it in fewer characters. ASP.NET Find a gun, it falls apart. Assembly You try to shoot yourself in the foot only to discover you must first reinvent the gun, the bullet, and your foot. brainfuck Just looking at the gun gives you a migrane, so forget about actually shooting it. Forth Foot in yourself shoot.

Related: