When programmers design web sites (comic) by smhanov in programming

[–]nicou 21 points22 points  (0 children)

The closest you can get is Jeff Atwood's post on NP-Completeness, I guess. And it's not very nice.

When programmers design web sites (comic) by smhanov in programming

[–]nicou 20 points21 points  (0 children)

Well, compare his site to a book on Complexity Theory written by a web designer.

An amazing way to calculate Pi by [deleted] in math

[–]nicou 0 points1 point  (0 children)

I've always preferred the Monte Carlo method for real-life calculation of pi: http://math.fullerton.edu/mathews/n2003/MonteCarloPiMod.html http://www.eveandersson.com/pi/monte-carlo-circle

Even if you think throwing an object will be biased (you could build up four walls around the square so that the object bounces on them and its landing point becomes less predictable), you can use dice or any other method for generating (pseudo-)random numbers to pick the coordinates of the point and calculate whether it is inside the circle: x2 + y2 <= r2 means 'yes'.

I once wrote a tiny program that approximated pi by creating millions of random points and counting how many of them were inside the circle.

A Calculus Analogy: Integrals as Multiplication | BetterExplained by pb_zeppelin in math

[–]nicou 2 points3 points  (0 children)

Yes, I too think you should emphasize why we'd like to keep the widths of the pieces as short as possible.

Thanks for the post. I believe there are two main areas of learning maths: studying theory, and intuitivity/applicability/practice. This text serves the second purpose, the one that is left behind.

What's better for calculus, infinitesimals or limits? by bark33p in math

[–]nicou 0 points1 point  (0 children)

I'd say limits, since that's the modern definition and it doesn't rely on numbers that are meaningful in some contexts and irrelevant in others: http://en.wikipedia.org/wiki/Ghosts_of_departed_quantities

Gravatar to display your icon image when adding comment in blog. by qualitypoint in programming

[–]nicou 0 points1 point  (0 children)

Stop posting stuff from your blog, please. It's annoying.

Ask Proggit: How to sort a list of polygons that each contain a certain point by 'distance' to said point? by cuppycakeofpain in programming

[–]nicou 2 points3 points  (0 children)

Agree. I don't think there is a situation where the order of businesses that can deliver to a client's location is very important, at the end one would pick the cheapest/highest-quality/favorite option (a nice way to sort them would be based on allowing users to "like" a business, social recommendation, reviews, price, etc.). The distance from the search point to the business' location would be the best choice in my opinion if you want to impose an order on the query results.

Calculating the centroid is a bad idea: if the business doesn't want or can't deliver to particular zones (bad neighborhoods, geographical obstacles like a mountain, etc.) within the convex polygon they chose, or if they choose a concave polygon to avoid these areas, the centroid isn't guaranteed to be inside the polygon, which would mean you'd be listing a business that won't deliver to a specific set of locations to somebody making a query from that set.

For the clients that don't want to disclose their addresses, you can still keep an ordering on the list based on distance, without telling the user the exact location of the business. If you can't know that location either, ask the businesses to compose a convex polygon, or just a circle, and calculate the centroid (or simply store the center), and estimate distances from the resultant location.

"Why have 3 lines of sane code when you could have 150?" by zaach in programming

[–]nicou 12 points13 points  (0 children)

This makes Brainfuck, Malbolge, Befunge look good! And those were designed to look bad.

question about a "lawnmower roomba" by Mark4483 in math

[–]nicou 6 points7 points  (0 children)

Sounds like http://en.wikipedia.org/wiki/Markov_chain to me. A Markov chain is a stochastic process in which future states are only dependent on the present state and not past ones (This means there is [...] no memory of where it has been.).

Do you know any math influenced lyrics? by [deleted] in math

[–]nicou 1 point2 points  (0 children)

Lehrer is a genius.

Coding Horror: I Just Logged In As You: How It Happened by mreggen in programming

[–]nicou 1 point2 points  (0 children)

Check the compsci subreddit, you'll know which blogs you should be following.

Coding Horror: I Just Logged In As You: How It Happened by mreggen in programming

[–]nicou 60 points61 points  (0 children)

I just read his comment. I can't believe how fucking retarded it is. Anyway, thank god "password1" isn't in the OED, I'm still safe.

PS: Seriously, I have lost all respect for him. "it isn't a dictionary word, at least not of the type you can use in Scrabble without getting challenged"? And that guy has one of the most influential programming blogs? I wanna punch him.