## Why Art Leads To Mathematics

I was recently approached to write an essay to convince (high school) art students that math is freaking excellent. This was the result:

You can think of the study of mathematics as the study of art. Throughout our childhood schooling, we were mostly taught the mechanics of art: drawing lines, shading, painting techniques. These notions are developed in a technical way without an inherent understanding of aesthetics. Furthermore, without being exposed to art galleries or painting schools, the capacity of these devices to express emotion, people, philosophy and concepts remains unplumbed. It is only after studying artistic techniques, and art from the masters that we begin to appreciate art.

Our first attempts at art are challenging and sloppy. Many a student cannot see the forest for the trees and complains about how pointless art is. Even over the course of high school, most students remain bogged down in the mechanics, and cannot experience the joy of self expression. By and large, the children who quickly grasped the technicalities and were able to freely express themselves through various media are the ones who became talented artists. If you approach a sketch artist drawing a woman, and comment on the difficulty of drawing curved lines, you will probably get a strange look. The artist has transcended individual shapes and sees the bigger picture.

Mathematics comes less naturally than art to most of us: it requires a degree of abstraction that our primate brains have only recently been equipped to handle. As such, many students will continue to study the technicalities and mechanics of math until they are almost done with their math degree. Any mathematical idea you were taught in school or have come across since is most likely a tool akin to spelling or vocabulary. To be honest, the same is probably true for me. However, the junior math major either immediately grasped the mechanics of mathematics, or he learned not to get bogged down by them. When you see a mathematician manipulate some equations, it may appear to you as an exercise in futility. Bear in mind, however, that algebraic manipulation is as trivial to the math major as drawing curved lines is to you. If so, what does the mathematician see behind the equations that makes him love mathematics?

When studying mathematics, the math major sees pure truth in our understanding of everything. When something is proved in mathematics, it is true forever. Mathematics is also completely subject to our imagination, and not at all limited by the the outside world. Math is a language that allows us to speak about concepts and ideas that no language can express. Algebra is not a series of mindless tricks but the study of the idea of structure. Almost anything you can think of that possesses structure (including art), can be modeled using algebra. Analysis is more than taking a complicated derivative. It allows us to describe and understand the very notion of change. Every physicist, economist, chemist, etc. uses calculus to study the world around us, but calculus itself is more than this. Furthermore, not being bogged down by reality, mathematics is capable of arriving at beautiful generalizations where we discover that there are simple yet powerful laws that govern space, structure, change, and quantity.

Art enables us to describe every emotion and experience known to man, but mathematics enables us to understand the laws that govern everything. Art cannot show us something that is not a human experience, for it is limited by the person who uses it. Mathematics, on the other hand, can show as absolute truth realities too grand to be fully understood by the human mind.

At this point, you may appreciate that others love mathematics, but it “isn’t for you.” Before we proceed: what is mathematics, anyway?

When you think of math, you probably think of the tedious stuff that you do when you are forced to add, subtract and multiply long lists of long numbers. However, this isn’t math; this is arithmetic, which is barely a toenail on the huge elegant beast that is mathematics (i.e. arithmetic is only a teeny tiny part of math). Arithmetic isn’t what gets mathematicians up, out of bed, and excited about their jobs. We don’t just sit around doing long division all day.

Math is not about crunching numbers. Sure, that is part of math, but real math is exploring the properties of shapes, patterns, logic, algorithms, programs, and the relationships between all of these things. It’s about finding elegant and beautiful connections that naturally exist both in the real world and in the perfect mathematical one. It’s full of puzzles and mysteries!

Think about some of man’s greatest achievements:
Sending people to the moon and rovers to Mars, and coming up with mathematical models that describe everything from weather patterns to how galaxies and stars form to how the universe began and maybe will end – the glue that holds all of these things together is math. So, as you can see, math isn’t just boring arithmetic or formulas that come from nowhere. The distance formula is derived from the Pythagorean theorem, where the differences in x and y between two points are the lengths of the base and height of a right triangle. The area of a triangle, 1/2*(base)*(height), isn’t something to memorize: it is half of a square or rectangle.

What is the best way to use linear perspective fool the eye’s depth perception? Use math! Alter the image with various linear transformations.
How do you get your sculpture to remain stable while it strikes an uncommon pose? Use physics! Move your sculpture’s center of mass to the appropriate location.
How do you create an eye-catching pattern as a background or an engraving? Use Escher’s symmetrical method or use fractals! There are so many options!
Are you bored in class? Think about all of the math in the room around you! Transform the ceiling tiles into weird diamonds! Imagine graphs of various polynomial functions that you can ride on like a roller coaster!

Math isn’t boring, it’s fascinating, and it allows us to do magnificent things. Do you want to be more creative? Math allows you to draw connections between otherwise unconnected objects. Math is the same in every country. Being fluent in mathematics gives you super powers: the ability to apply universal truths across fields. Are you tired of waiting on the world to change? Go out and change it yourself with your new found superpower.

Based of off this and this.

## Why Young Innovators Should Answer the Call

Disclaimer: The following is only my opinion. I am not directly affiliated with the Thiel Fellowship or Thiel Foundation, but I did have the opportunity this summer to interact with and work with many of the fellows and other people involved in the community.

This is a response to an article, by a man that I respect and appreciate, regarding how to succeed as a Student Entrepreneur.

TL;DR I believe that to find success, you must go at your own pace.

Mike Olson is a very intelligent and cool guy. I appreciate that he used female pronouns in his theoretical example. I agree that experience is important and often undervalued. I agree that one should intern before starting their own company. I am incredibly grateful for my life-changing experience during my internship at Cloudera, which I’ve written about in greater detail here (post).

I’m not technically an entrepreneur. I’m a researcher who wants to help people on a large scale. In fact, not all of the fellows are working on companies. Many of the fellows are devoted researchers who want to help people and find the standard university system too limiting. I’ll use the term “innovators” to encompass entrepreneurs and researchers.

When I was accepted into university right out of 8th grade, I received very similar feedback: I was told that I needed to wait to grow up first, that I was too young to succeed. Many expected me to drop out and return with my tail between my legs to the local high school. Fortunately, the challenging and fast-paced environment I surrounded myself with was exactly what I needed to be happy and prosper. In university, I found that math and science are tool kits – not the rote and useless subjects my previous schooling experience had led me to believe. I learned that using these tool kits to solve problems and help people was more creative and satisfying to me than making art or writing short stories. I discovered my passion for research through brainstorming with my professors and pursuing my ideas to a close. I learned that working through tedium is necessary to achieve goals.

My emotional maturity quickly grew once I found intense passion in learning and inventing. I realized that, in order to stay in university, I had to work hard. I’d never had to work hard before. I learned a lot of lessons very quickly, and I loved it. The opportunities which allowed me to find such a competitive and nurturing environment are opportunities I will always be grateful for. When opportunities are given to you, it is best to heavily consider them, and not just pass on the call.

Classes have contributed a minor amount to my overall STEM knowledge; they served to introduce me to interesting topics and spark my curiosity. University certainly isn’t necessary to discover your passion in science and math. With a significant amount of determination, this love can be discovered and fostered through other means. People, including professors (they are people too!), are generally happy to share their knowledge. The internet is also a magnificent resource for autodidacts; it provides access to online textbooks and courses. There are many resources and introductions to explore STEM outside of university. You can find passion with some scrap metal, a battery, rubber bands, and a library card.

Many younger innovators find themselves stuck in the mud, and discouraged by the slow pace of the world around them. Mike makes a valid point: that fellows (and others in the under 20 community) have less experience than those who have taken the conventional education/work route. However, the selection process for the Fellowship quickly weeds out those who will not benefit from going at their own pace; those who don’t have the emotional maturity/correct mindset to succeed as innovators at their current age. Obstacles are there to keep out those who don’t want it badly enough.

The Thiel Foundation provides the broader Under 20 community and their select group of fellows an opportunity to seize their goals and help the world around them. It gives us a friend group floating in the same boat – people who have been through similar experiences, and are more than willing to brainstorm with us. It gives us tools to complete our projects and help the world around us. We are determined people who learn from our mistakes quickly, and ask the opinions of more experienced innovators when we are unsure. We know how to work hard to achieve goals that we are passionate about. We thrive off of overcoming hardships and learning from our mistakes. Why wait on the world to change when we can go out and change it ourselves!

Success is about finding your niche. It is about figuring out how to help others by doing what you love.

The Fellowship and the community surrounding it provide a platform for hundreds to find their place and succeed. It provides opportunities and motivation to young innovators. Staying in the conventional educational path may be the right answer for some. For others, the right answer is to dream more and work harder. There are many ways to go at your own pace, and one of them is picking up the phone when Peter Thiel calls.

I’d like to thank Thomas Sohmers for giving me extraordinarily helpful feedback on a pre-launch draft of this article.

## Visual Morse Alphabet Binary Tree

The ultimate mental image for transmitting and receiving the Morse alphabet (click on the image for larger view).

Here is a greater resolution image of each half:

## Playing in Vim

Today’s dose of code will be less of a program and more of an advanced vim tutorial.

By the power invested in me by my favored plain text editor, I created a todo system. All tasks are stored in a plain text file, their notes are folded, and they are sorted by priority.

Each entry looks like this, ordered by priority:: [0 = Immediate, inf = Soon]

- Notes
- Notes
- Notes
- ...

For example, if my text file looks like this:

3 Send Email to Dr. Suess
- Hello Sir, you are cool.
- Send from junk email account
2 Braille Contractions +B
- The anecdotes for how I recall each contraction
- See draft post for details

Only the following will be displayed.

3 Send Email to Dr. Suess
2 Braille Contractions +B

This is done via vim trickery. :set fdm=indent will create folds which you can open with zo and close with zc.

3 Send Email to Dr. Suess
+--  2 lines: - Hello Sir, you are cool.--------------------------
2 Braille Contractions +B
+--  2 lines: - The anecdotes for how I recall each contraction---

Next step is being able to prioritize lines. The naive way to this is :sort. However, this doesn’t preserve folds! What shall we do? We could manually yank and put, but that’s no fun.

Let’s see if we can come up with an atrocious command that sorts tasks by priority while preserving folds.

First, we replace the line delimiters with something not found in the text, in our case %%.
Using :set list, we see:

3 Send Email to Dr. Suess$^I- Hello Sir, you are cool.$
^I- Send from junk email account$^I$
2 Braille Contractions +B$^I- The anecdotes for how I recall each contraction$
^I- See draft post for details\$

We can replace the delimiters nt- with %%, using :%s/nt-/ %%, invoke :sort, and return the delimiters to their rightful places :%s/ %%/rt-/g

Sidenote: I use r instead of n in the previous command because r will show up in the editor immediately, while n will show up as ^@ until you exit with :set nolist.

This is combined into the following, which sorts our document and eliminates blank lines, leaving their corresponding folds unchanged!

:%s/nt-/ %%/ | :sort | :%s/%%/rt-/g

Do not fear! You can alias commands in vim with :command. Note that user defined commands must be capitalized. The following command will create the alias :Todo.

:command Todo :%s/nt-/ %%/|:sort|:%s/%%/rt-/g

In conclusion, although this is a fun exercise in vim – use a bash script for your todo list needs!

## Consequent Challenge

Today, as I was writing a post on sorting in vim, I issued myself a challenge.

The challenge: without using a bash script, write a one liner that reads through all the lines in a file, sorts them and printed these sorted lines to stdout. Do so in under a minute without using the internet.

Before you continue, I encourage you to try it yourself. Get out a timer … Ready? Go!

print 'n'.join(sorted([line.strip() for line in open("file.txt")]))

Although this one-liner works, the filename is hardcorded. Quick fix (finished at 52 seconds):

import sys; print 'n'.join(sorted([line.strip() for line in open(sys.argv[1])]))

I find that self-issuing pseudorandom timed challenges is a fun way to train yourself to work under pressure. ‘Tis one of the many ways to gamify everyday life!

Sidenote: Do not fall into the trap of using one-liners in actual code. The Pythonic way to do this is:

import sys
try:
with open(sys.argv[1]) as f:
for line in f:
print 'n'.join(sorted(line.strip()))
except IOError:
print "File does not exist."

## Temporarily Mute: An Overview of Communication Methods

If you’ve run into me in the past 2 days, I’ve squeaked at you and scribbled on my notebook “lost my voice! How are you?” As of this post, I am still mute. However, I will write it in the past tense to create a false sense of encouragement that my voice will return soon.

At first, I attempted to squeak and whisper to talk over the phone and converse with friends over lunch. Vibrating my swollen larynx made my problem worse. Thus, I switched to keeping my mouth shut and set about finding less damaging methods of communication.

Gestures/ASL
My first realization was that my knowledge of sign language is useless without having conversation partners who are also fluent in ASL. (This supports my opinion that ASL should be a required language in elementary schools, or at least present at every primary school as an afterschool club.)

Without both parties knowing ASL, gestures lose their usefulness and specificity. While communicating with general gestures is useful, playing conversation charades is highly inefficient for conveying complex information.

The most useful gesture I’ve found is that of pointing. Pointing to my notebook where I’ve scribbled things or to my computer screen where I’ve typed something – which brings me to…

Text
I type an order of magnitude faster than I write, so, when possible, I relied on typing in gedit (Notepad, TextEdit, etc. depending on your platform and preferred plain text editor).

However, there were myriad situations writing in my notebook was easier. Additionally, scribbling furiously has the added benefit of being amusing to observers.

The efficiency of typing and scribbling is greatly improved by not deleting or scribbling out previous conversations. As you build a library, you can gesture, draw arrows, highlight, circle, etc. your previous phrases instead of creating each new sentence from scratch.

Text-to-Speech apps
TL;DR I found it mainly useful for getting people’s attention.

When unable to get your intended conversation partner’s attention (if pointing or tapping their shoulder fails), using text-to-speech apps is useful. Out of SVOX, Talk, and Virtual Voice (free on Google Play), I found Virtual Voice to be the easiest to use and the most natural sounding.

The main issue I found with text-to-speech apps is the lag time. By the time I was able to type my sentences out fully and press “speak”, the conversation had moved on. Text-to-speech apps have the disadvantage of not being able to repeat past comments and phrases. I found myself deleting text repeatedly, and ruling out comments as not important enough to type for one time usage.

My main finding was the kindness of people. Strangers recommended cold remedies and offered me lozenges. People got the attention of professors for me, or acted as my text-to-speech mechanisms. A funny instance of this occurred during my Quantum Mechanics class as I was attempting to respond to a classmate who asked “Which old quantum mechanics papers do you [our QM professor] recommend?”

I responded (by furiously typing in gedit) “Learn German to read old Quantum Mechanics books and articles. An example of this is Mathematische Grundlagen der Quantenmechanik by Johann von Neumann. Highly recommend.” However, the friend who was kind enough to act as my voice didn’t know German, and hilariously Americanized the pronunciation of the title and author of the book. This amused the professor, who speaks German. The professor was further amused as I attempted to squeak out the correct pronunciation.

Being temporarily mute taught me to value my voice and helped me to explore the efficiency of methods of communication to the general population (those who are not versed in ASL).

Communication is mostly used for creating connections – not necessarily just the connections between people, but the connections between ideas.

Every conversation creates connections in your mind between previously separated concepts and spark chains of new ideas. Value this truth, and utilize it. Go call a loved one and tell them I love you or record yourself singing a song, and appreciate your voice for the efficient vessel of connection it is.

## Procrastinating? Fix it.

I am often asked how to stop procrastinating or asked how I get so much done. While I think I don’t get enough done, I will share some of my methods of crushing procrastination with mindfulness.

Step 1. Make Time.

There is always 5 minutes to squeeze in one more thing. Get up an hour earlier, drink some coffee, it makes a difference. Use the “in-between” time: read over your paper as you walk to class, answer emails in line at the cafeteria, code while you eat dinner.

Step 2. Create visible todo lists, and prioritize them.

It’s easy to put off your work if you can’t see the length of your list increasing in size as you laze about.

Be careful not to spend more time on todo lists than actually doing. It is easy for some to fall into a false sense of accomplishment by writing lists. Make sure you are moving from thinking to doing.

Step 3. Procrastinate the right way.

Of course, I encourage you to prioritize and stick to your priorities as much as possible.

However, as much as everyone would love to not procrastinate, we are human. I’ve found that the best method of procrastination is doing another task of a lower priority.

Let’s say I have a psychology paper due in 2 days and a simulation due in 8 days. Instead of procrastinating my paper by going on YouTube, I’ll procrastinate by doing my simulation.

Step 4. Learn when to multitask and when to hyperfocus.

The title is mostly self explanatory.

Step 5. Work is Play.

Life is a game and a constant test.

As John Green said, “The test will measure whether you are an informed, engaged, and productive citizen of the world, and it will take place in schools and bars and hospitals and dorm rooms and in places of worship. You will be tested on first dates, in job interviews, while watching football, and while scrolling through your Twitter feed. The test will judge your ability to think about things other than celebrity marriages, whether you’ll be easily persuaded by empty political rhetoric, and whether you’ll be able to place your life and your community in a broader context. The test will last your entire life, and it will be comprised of the millions of decisions that, when taken together, will make your life yours. And everything, everything, will be on it.”

This pressure can be smothering for people, especially those in highly competitive environments. By thinking of learning/life as a game by setting goals for yourself as levels and creating reward systems, you can greatly reduce this stress.

Step 6. Get passionate.

I’ve found that passion for an idea will push me past my perceived limits.

Feeling sick? Lay in bed and rest while answering emails, coding some simple scripts, or writing blog posts.
Feeling frustrated? Obstacles are set up in our paths to keep the people out who don’t want it badly enough.

Step 7. Fill your free time with fun projects.

You can learn anything by doing fun projects. Building your set of skills and practicing a combination of these skills regularly while having fun will make you faster and more efficient at completing tasks.

Finally, JUST DO IT! The mental blockade you’ve put up by calling yourself lazy, or staring blankly at your todo-list is easily overcome. It is literally as easy as just doing it. Be direct with yourself: stop wasting time.

## Tired of the References Section?

Due to my accelerated graduation, I’m taking a lot of general education requirements this semester.

I’ve discovered that, unlike my usual computer science/math/physics class regime, quite few of these liberal arts courses require highly detailed bibliographies and references sections in specific formats.

http://www.bibme.org/ is a magical place with manual entry, multiple styles, and most importantly, an automatic look up of articles by article name.

I am a huge believer in maximizing time efficiency without jeopardizing quality, and this site facilitates just that.

## Popular Weekdays

The code on my blog will range in quality from “I’m waiting in line and have 10 minutes to code” to “I’ve been working on this all day.”

Let’s with begin some quick, semi-hardcoded scripts, shall we?

# dayofweek.py
import datetime
from sys import argv
from calendar import day_abbr #import day_name for full name
"""
Counts the amount of hits per weekday, given a file of data corresponding to "year month day amount-of hits"
"""
#starts with a zero counter array (each index corresponds to a weekday, 0:Sunday, 1:Monday, ...)
weekcount = [0]*7 #hits per day
argv = argv[1:] #get rid of script declaration in args
#make sure string has year, month, day, amount-of-hits-that-day
if len(argv) % 4 == 0:
for c in range(0, len(argv),4):
#increment slice so we are only looking at one set of (year, month, day, amount-of-hits-that-day) at one time
if (a.isdigit() for a in argv[0+c:4+c]):
year, month, day, count = int(argv[0+c]), int(argv[1+c]), int(argv[2+c]), int(argv[3+c]);
#get index of day that the given date corresponds to
daynum = int(datetime.date(year, month, day).strftime("%w"))
#add the amount-of-hits-that-day to the counter
weekcount[daynum] = weekcount[daynum] + count;
#display days from most to least popular
print 'n'.join([day_abbr[(sorted(range(7), key=lambda k: weekcount[k]))[d]] for d in range(7)])

Okay, we need some random data to test this bad boy on. Naively, we could create a random data set of valid days as follows:

# randomday.py
import random as r
f=[]for x in xrange(12):
year = r.choice(range(1997, 2013))
month = r.choice(range(1, 12))
day = r.choice(range(1, 28))
hits = r.choice(range(6666,9999))
f.extend((year, month, day, hits))
print ' '.join(map(str,f))

An example of this output is:

2008 9 15 7311 2007 7 1 9812 2011 6 9 7721 2003 7 21 6736 2010 9 13 7776 1997 9 14 8776 1999 7 14 8617 2012 9 4 8208 2006 11 26 9689 2004 11 10 8952 1997 7 19 7799 2007 9 15 7858

We can feed these test values into our original script with a quick bash one-liner:

python dayofweek.py python randomday.py

We will receive the most and least popular weekdays in this random set of data:

Wed
Fri
Sat
Mon
Tue
Sun
Thu