Quality's not always more important than quantity.
I know that I've been growing learning slowly because I'm too meticulous. Some things you really only learn by doing. And if you work your whole life away perfecting one painting or writing the perfect program, you'll probably never get it just right. With some things you must go start to finish over and over and over and over.
And by doing more, you understand more, which leads to more (and better) applications of your particular art.
Maybe the quickest way to elegance is not by trying to have the most elegant solutions. And the quickest or best, or maybe only way towards that elegance is through relatively crude iterations.
Thursday, December 30, 2010
Sunday, December 26, 2010
The Quest for Random
Think of a sequence of five random numbers.
Got them?
Good.
Actually, hate to break it to you, but the numbers you just picked aren't truly random. In fact, I can probably tell you a good bit about all of the numbers you just thought of.. They're all most likely:
* Between 0 and 1000. And thus, positive.
* Whole integers, that is, none of them are fractional or have trailing decimals.
* Non-repeating.
To say all of those are probably true about your "random" numbers is pretty bold. But think about the numbers you generated. Are all three assumptions true?
In some respects, humans are poor random number generators. But don't feel bad because I have another surprise; sometimes computers are much worse!
Computers follow precise instructions. It's the nature of a computer. In fact, if it doesn't follow instructions perfectly, it's considered broken. There are formulas that a computer can execute in order to get a sequence of numbers that seem random. And for most purposes these pseudo-random numbers are close enough to random to use in gambling and simulations and such. But true random is hard and maybe even impossible to come by.
It really boils down to how we believe the universe behaves. Some people believe the universe, ever since its inception, is set upon a predetermined course. Others believe that the universe, at some level, perhaps at the quantum/sub-atomic level, is the way it is without cause.
If the universe is deterministic, and we are able to collect information about everything, then randomness becomes impossible to achieve. Even the things "True Random Number Generators" are based on, such as quantum physics, weather patterns, and atmospheric noise, become calculable, predictable, and thus non-random.
What's perhaps even more interesting, even if we were to have a perfectly random number generator, we could not formally prove its randomness! We would need a list of infinitely long numbers from it as well as an infinite amount of time to conduct statistical analysis on it.
Having said all this, I'd like to claim back the word 'random'. To be able to use it colloquially, we distinguish it from 'true randomness' by defining regular old randomness as simply being "unpredictable".
Got them?
Good.
Actually, hate to break it to you, but the numbers you just picked aren't truly random. In fact, I can probably tell you a good bit about all of the numbers you just thought of.. They're all most likely:
* Between 0 and 1000. And thus, positive.
* Whole integers, that is, none of them are fractional or have trailing decimals.
* Non-repeating.
To say all of those are probably true about your "random" numbers is pretty bold. But think about the numbers you generated. Are all three assumptions true?
In some respects, humans are poor random number generators. But don't feel bad because I have another surprise; sometimes computers are much worse!
Computers follow precise instructions. It's the nature of a computer. In fact, if it doesn't follow instructions perfectly, it's considered broken. There are formulas that a computer can execute in order to get a sequence of numbers that seem random. And for most purposes these pseudo-random numbers are close enough to random to use in gambling and simulations and such. But true random is hard and maybe even impossible to come by.
It really boils down to how we believe the universe behaves. Some people believe the universe, ever since its inception, is set upon a predetermined course. Others believe that the universe, at some level, perhaps at the quantum/sub-atomic level, is the way it is without cause.
If the universe is deterministic, and we are able to collect information about everything, then randomness becomes impossible to achieve. Even the things "True Random Number Generators" are based on, such as quantum physics, weather patterns, and atmospheric noise, become calculable, predictable, and thus non-random.
What's perhaps even more interesting, even if we were to have a perfectly random number generator, we could not formally prove its randomness! We would need a list of infinitely long numbers from it as well as an infinite amount of time to conduct statistical analysis on it.
Having said all this, I'd like to claim back the word 'random'. To be able to use it colloquially, we distinguish it from 'true randomness' by defining regular old randomness as simply being "unpredictable".
Friday, December 24, 2010
Reflections on the English language from the mirror of C++
The most common cause of security problems and run-time errors are "buffer overflow" errors (C++ Primer 4th ed).
Basically, this means that the programmer has written a program incorrectly. He/she has either tried to access an element of a container that doesn't exist, or tried to assign a value to a class that doesn't accept that type of value. Or something similar.
This sounds like an easy problem to fix--only assign numbers to number-type variables. Assign text to text-type variables. The real problem is that there are a lot of different "number-type" and "text-type" classes. And every different kind of class you can think of and a lot more that you haven't thought about. Even within the type "number" we can talk about whole integer type numbers, or floating point type numbers, imaginary numbers, Marsenne primes, etc.
Another problem; a lot of the types built into the C++ language are non-intuitive. Or rather, the vital differences are difficult to remember and cumbersome. Example, there are three different types of floating point classes, each with different storage capacities. And even the capacities are not set in stone, they depend on the machine that runs the source code a programmer writes.
So why don't we just change the language?
Because it's precise. Everything that C++ is, is that way for a good reason. It is a very powerful, efficient, and precise language. The fact that C++ seems "non-intuitive" really highlights how imprecise we are.
And I'm not saying it's a bad thing. Languages are developed for purposes. Programming languages are developed to solve problems and create data structures. English is a very general purpose language that I think succeeds in its goal. To communicate.
Sometimes its ambiguity is even a good thing. It helps succintly create multiple meanings in literature. We enjoy discovering and creating our own meanings from our experiences. Being able to communicate those meanings gives English--and other spoken languages--a power of their own.
Basically, this means that the programmer has written a program incorrectly. He/she has either tried to access an element of a container that doesn't exist, or tried to assign a value to a class that doesn't accept that type of value. Or something similar.
This sounds like an easy problem to fix--only assign numbers to number-type variables. Assign text to text-type variables. The real problem is that there are a lot of different "number-type" and "text-type" classes. And every different kind of class you can think of and a lot more that you haven't thought about. Even within the type "number" we can talk about whole integer type numbers, or floating point type numbers, imaginary numbers, Marsenne primes, etc.
Another problem; a lot of the types built into the C++ language are non-intuitive. Or rather, the vital differences are difficult to remember and cumbersome. Example, there are three different types of floating point classes, each with different storage capacities. And even the capacities are not set in stone, they depend on the machine that runs the source code a programmer writes.
So why don't we just change the language?
Because it's precise. Everything that C++ is, is that way for a good reason. It is a very powerful, efficient, and precise language. The fact that C++ seems "non-intuitive" really highlights how imprecise we are.
And I'm not saying it's a bad thing. Languages are developed for purposes. Programming languages are developed to solve problems and create data structures. English is a very general purpose language that I think succeeds in its goal. To communicate.
Sometimes its ambiguity is even a good thing. It helps succintly create multiple meanings in literature. We enjoy discovering and creating our own meanings from our experiences. Being able to communicate those meanings gives English--and other spoken languages--a power of their own.
Tuesday, December 21, 2010
Good Tidings
There are a surprisingly many kinds of loneliness, and they seem to creep up at very unexpected times. You can be lonely sitting next to good friends. Or lonely in a classroom full of people. It's even possible to be lonely and crowded at the same time. It can be trasient, or chronic. Excruciatingly painful, or just slightly annoying.
Loneliness can come even during the warmest time of the year: Christmas. To everyone experiencing the holiday blues; I send my heart and all my warmth.
Loneliness can come even during the warmest time of the year: Christmas. To everyone experiencing the holiday blues; I send my heart and all my warmth.
Monday, December 20, 2010
n-dimensional Learning.
A lot of the technical learning I do seems to come from books. Textbooks. Reference books. Manuals. Etc.
But I'm tired of learning in one dimension.
The author(s) organize the text to be read, generally, from front cover to back. Reference manuals are a little more generous. The authors of such books usually assume the reader will jump from topic to topic and there may be more of a guide than a simple table of contents and index. But no matter how the information in a book is organized, I feel like the job of connecting all the topics is up to me.The problem, is that I get it wrong initially and it takes me a while to get it right.
So I want to introduce a new way of learning. One that's more conducive to spatial understanding. A way of organizing information so that the connections between topics is obvious.
This won't be the first time graphical, spatial interfaces are used to organize information. Visuwords is a free online graphical dictionary. You can type in a word and see a word's hyper/hyponym, mero/holonym associations, related verbs, nouns, adjectives, adverbs, topic/region/usage domains, etc.
Essentially, my system would consist of a number of orthogonal axes 'n' and an origin. For instance, in learning C++, the origin might be the following: "C++ is a programming language. The language is made up of: Classes, Functions, Variables, (etc.)." Then to the right would be a column-like space. The top sub-space of the column might be Classes, below that, Functions, below that, Variables, then Enumerators, etc. So we might have a column of 7 'sub-spaces'. In one of the seven sub-spaces we might read "Enumerators group sets of integral constants." To the right of that, a more detailed explanation of enumerators, specific syntax, limits to how we can use enumerators. To the right of that would be a space for concrete examples of enumerated lists in C++, more detailed explanation, problems and solutions. To the right of that might be more challenging exercises, abstract relations problems, etc.
In the example we deal with two axes. The horizontal axis would be depth of one topic, and the vertical axis would be breadth of all topics given a certain depth. The interface for a book-space of C++ might look like:
The grand idea might be to have a single, universal Information-Space (IS). Something like Wikipedia but with more detailed information as well: textbook-depth information, academic journal level information. You could navigate the IS through a customizable digital interface. An IS browser. Your browser could track where you spend your time learning/studying. The breadth you cover as well as the depth of individual topics. You might chart it out and see that "Oh, while I was in school I spent a lot of time in the Math sector of the IS, now I'm spiralling outwards, hitting computer sciences, chemistry, and physics. But compared to last year, my average depth in topics of the IS has increased."
The goal of this all is just to help people learn. And maybe to help us see something about how we learn.
But I'm tired of learning in one dimension.
The author(s) organize the text to be read, generally, from front cover to back. Reference manuals are a little more generous. The authors of such books usually assume the reader will jump from topic to topic and there may be more of a guide than a simple table of contents and index. But no matter how the information in a book is organized, I feel like the job of connecting all the topics is up to me.The problem, is that I get it wrong initially and it takes me a while to get it right.
So I want to introduce a new way of learning. One that's more conducive to spatial understanding. A way of organizing information so that the connections between topics is obvious.
This won't be the first time graphical, spatial interfaces are used to organize information. Visuwords is a free online graphical dictionary. You can type in a word and see a word's hyper/hyponym, mero/holonym associations, related verbs, nouns, adjectives, adverbs, topic/region/usage domains, etc.
Essentially, my system would consist of a number of orthogonal axes 'n' and an origin. For instance, in learning C++, the origin might be the following: "C++ is a programming language. The language is made up of: Classes, Functions, Variables, (etc.)." Then to the right would be a column-like space. The top sub-space of the column might be Classes, below that, Functions, below that, Variables, then Enumerators, etc. So we might have a column of 7 'sub-spaces'. In one of the seven sub-spaces we might read "Enumerators group sets of integral constants." To the right of that, a more detailed explanation of enumerators, specific syntax, limits to how we can use enumerators. To the right of that would be a space for concrete examples of enumerated lists in C++, more detailed explanation, problems and solutions. To the right of that might be more challenging exercises, abstract relations problems, etc.
In the example we deal with two axes. The horizontal axis would be depth of one topic, and the vertical axis would be breadth of all topics given a certain depth. The interface for a book-space of C++ might look like:
The grand idea might be to have a single, universal Information-Space (IS). Something like Wikipedia but with more detailed information as well: textbook-depth information, academic journal level information. You could navigate the IS through a customizable digital interface. An IS browser. Your browser could track where you spend your time learning/studying. The breadth you cover as well as the depth of individual topics. You might chart it out and see that "Oh, while I was in school I spent a lot of time in the Math sector of the IS, now I'm spiralling outwards, hitting computer sciences, chemistry, and physics. But compared to last year, my average depth in topics of the IS has increased."
The goal of this all is just to help people learn. And maybe to help us see something about how we learn.
Tuesday, December 14, 2010
Punctuation.
I have a real problem with quotations in written English. I'm not sure this problem persists when writing most other languages, but I believe it to be quite a nuisance in mine:
QUOTATIONS
The period ( . ) indicates the end of a complete thought. Quotation marks ( " " ) delimit text you've taken from somewhere and inserted somewhere else. But if I'm making a list of topics and one of the the elements is "bracket," then according to proper style I have to put whatever (if any) punctuation inside the quotation marks.
If my list is:
List:
full stop
bracket
quotation marks
There might be an important reason I didn't capitalize or add punctuation to the elements in my list. However, when I mention this element, "bracket--" I have to include punctuation inside the quotation as if it were a part of where it came from. Even when it looks ridiculous, as in the previous example! I propose that punctuation outside of the quotation marks becomes standard.
QUOTATIONS
The period ( . ) indicates the end of a complete thought. Quotation marks ( " " ) delimit text you've taken from somewhere and inserted somewhere else. But if I'm making a list of topics and one of the the elements is "bracket," then according to proper style I have to put whatever (if any) punctuation inside the quotation marks.
If my list is:
List:
full stop
bracket
quotation marks
There might be an important reason I didn't capitalize or add punctuation to the elements in my list. However, when I mention this element, "bracket--" I have to include punctuation inside the quotation as if it were a part of where it came from. Even when it looks ridiculous, as in the previous example! I propose that punctuation outside of the quotation marks becomes standard.
Time again;
#include <iostream>
#include <string>
int main( ) {
std::cout << "Hello World." << std::endl;
return 0;
}
#include <string>
int main( ) {
std::cout << "Hello World." << std::endl;
return 0;
}
Sunday, December 5, 2010
Lip balm.
You never run out of chapstick. It's one of the few things in the real world that is infinite. No matter how long you have a stick or how often you use it or how heavily you apply it, there's always more.
The only reason chapstick manufacturers make money is because I keep losing sticks and have to buy more.
The only reason chapstick manufacturers make money is because I keep losing sticks and have to buy more.
Saturday, December 4, 2010
-
Winning
I think about the future a lot.
I think about all the material things I want. The way I want my relationships with people to be, what I want to know and be able to do.
But now I'm asking myself why I want that future. I guess I have this notion these things and relationships will bring me peace of mind.
I see that a portion of this 'notion' is illusion. Maybe peace is found. Maybe you have to just get lucky.
Siddhartha's Struggle
I never feel like I'm telling the truth.
Life can be complex. Feelings and human things especially. By the time I describe precisely how I feel, my emotions will have changed.
My pains lie in discrepancies. The world I see and the world I want are different, and the discrepancy gives me a driving pain. The difference I see in the way I want to be and the way I really am induces a sinking pain.
I thought being more honest and self-aware would make the discrepancies clearer and easier to deal with, but that's not necessarily the case. I just see more and more differences between ideal and actual.
Why is it that discrepancy causes me such disturbance? Why can't I just accept discrepancy?
Paths
I've recently had the opportunity to work with power tools.
A lot of my studies seem abstract. Beatiful, but I work a lot with my head. To work with my hands trying to construct something almost as beautiful out of wood or metal is refreshing.
It's making the division between engineer and mathematician more evident I think. Part of me is interested in application. I find real-world problems fascinating. But part of me is curious. Mathematics does not limit itself to what is real, or even what's possible. Math seems limitless. And the more I see of it the more curious I become.
Unfortunately, it may be a dangerous road. You know what happened to the cat who got too curious.
I think about the future a lot.
I think about all the material things I want. The way I want my relationships with people to be, what I want to know and be able to do.
But now I'm asking myself why I want that future. I guess I have this notion these things and relationships will bring me peace of mind.
I see that a portion of this 'notion' is illusion. Maybe peace is found. Maybe you have to just get lucky.
Siddhartha's Struggle
I never feel like I'm telling the truth.
Life can be complex. Feelings and human things especially. By the time I describe precisely how I feel, my emotions will have changed.
My pains lie in discrepancies. The world I see and the world I want are different, and the discrepancy gives me a driving pain. The difference I see in the way I want to be and the way I really am induces a sinking pain.
I thought being more honest and self-aware would make the discrepancies clearer and easier to deal with, but that's not necessarily the case. I just see more and more differences between ideal and actual.
Why is it that discrepancy causes me such disturbance? Why can't I just accept discrepancy?
Paths
I've recently had the opportunity to work with power tools.
A lot of my studies seem abstract. Beatiful, but I work a lot with my head. To work with my hands trying to construct something almost as beautiful out of wood or metal is refreshing.
It's making the division between engineer and mathematician more evident I think. Part of me is interested in application. I find real-world problems fascinating. But part of me is curious. Mathematics does not limit itself to what is real, or even what's possible. Math seems limitless. And the more I see of it the more curious I become.
Unfortunately, it may be a dangerous road. You know what happened to the cat who got too curious.
Subscribe to:
Posts (Atom)