ALL
The several flavors of random in Java
Random number generation is one of most basic features in any programming language. The basic utilization is always the same: generate a random number between 0 and 1. With such a simple resource at hand we sometimes overlook some interesting features.What do we learn from the books?The most obvious and maybe intuitive way to generate random numbers in Java is simply calling:java.lang.Math.random()Random generation is in the Math utility class with abs, pow, floor, sqrt and other mathematical functions we see in all other languages. Most people will learn about this class...
Set Theory in C++11
Have you ever felt the need to perform set theoretic operations on types? Not really? Me neither, but I thought it’s a fun thing to try out. So, if you ever feel the need of using type sets, C++11 makes it quite easy to do so. Especially variadic templates allow for a much more condensed syntax compared to type list constructs formerly used. (Disclaimer: This is rather a proof of concept, but maybe somebody comes up with a useful scenario.)Let’s start by defining an empty type_set type:template<typename ... Types>struct type_set; typedef type_set<>...
2,891 0 C++ SET THEORY MATH
Secret Symphony: The Ultimate Guide to Readable Web Typography
Right now, there’s a mathematical symphony happening on your website.Every single one of your readers is subconsciously aware of this symphony, and more important, they are all pre-programmed to respond to it in a particular way.The question is this:Is your site’s symphony pleasing and inviting to your readers, or does it turn them off and make it harder to communicate with them? The Mathematical Symphony of TypographyAs it turns out, this symphony is not unique to websites. You “hear†it every time you read a book, newspaper, magazine, or web site—every place ...
3,611 0 WEB DESIGN TYPOGRAPHY MATH GOLDEN RULE
Why Do So Many Gifted Kids Think They Don't like Math?
Why do so many bright and gifted kids think they don't like math? Experience and the reading of lots of research leads me to believe that boredom, under-instruction and poor instruction throughout elementary and middle school lie behind the problem.My best girlfriend since high school is a math teacher north of Philly. We've talked about this a lot. She and I are both aware that our own math instruction lacked a lot. As I give IQ tests, too, I see something that I thought many people would be interested to know. As those who have read the work of Benbow and Lubinksi, among others, know, math-r...
2,382 0 MATH BRIGHT KIDS HATE GIFTED BORING