Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 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...

3,971 0       JAVA TYPE MATH THREAD RANDOM


  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,714 0       C++ MATH SET THEORY


  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,415 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,209 0       MATH BRIGHT KIDS HATE GIFTED BORING


  Surprising applications of math

The comments in the previous post touched on surprising applications of math, so I thought I’d expand this theme into it’s own post. Below I’ll give a couple general examples of surprising applications and then I’ll give a couple more personal applications I found surprising.Number theory has traditionally been the purest of pure mathematics. People study number theory for the joy of doing so, not to make money. At least that was largely true until the advent of public key cryptography. The difficulty of solving certain number theory problems now ensu...

2,071 0       MATH ALGORITHMS NUMBER THEORY DIFFERENTIAL EUQATION


  Translating math into code with examples in Java, Racket, Haskell and Python

Discrete mathematical structures form the foundation of computer science.These structures are so universal that most research papers in the theory of computation, programming languages and formal methods present concepts in terms of discrete mathematics rather than code.The underlying assumption is that the reader will know how to translate these structures into a faithful implementation as a working program.A lack of material explaining this translation frustrates outsiders.What deepens that frustration is that each language paradigm encodes discrete structures in a distinct way.Many of the e...

3,056 0       MATH ALGORITHMS FORMULA PROGRAM PYTHON