## Monday, June 19, 2017

### Theseus

If the earth is 4.5 billion years old, our planet has rotated on its axis approximately one and a half trillion consecutive times so far. Does that make tomorrow's rotation a given? No. If every person you’ve ever met has exactly ten fingers, can you make the conclusion that every person, ever, has exactly ten fingers? No. In both of those scenarios, a clear pattern is apparent.

Circa 1740, David Hume came up with the disturbing philosophical problem of Induction. It states that the past doesn't necessarily predict the future and assuming that it does is based on faith rather than rationality; pretty deep stuff from someone who spent a good stretch of his adult life employed as a librarian. Put a different way, believing in patterns is an exercise in piety. Most people naturally take this into account. We notice patterns and apply them until they don’t work anymore. Patterns are useful for efficiency. It's perfectly reasonable to use apparent patterns to develop systems, in fact, it's the most reasonable thing one could do.

Skepticism as a discipline represents an even broader application of uncertainty. Not only does the past not necessarily predict the future, but we should even question what we feel and sense. Question everything. The soul of a skeptic bears much resemblance to the kid in the back of the classroom, raising his hand to argue every small point, the kid that produces consternation from the presenter and eyerolls from everyone else. This youthful fervor is embodied by the turtleneck-clad Carl Sagan. Sagan was certainly intelligent and trained as a scientist, however, he was preoccupied with refuting what others believed, providing the other side of the argument, under the self-righteous guise of promoting critical thinking. This led him to the realm of pseudoscience and UFOs.

Rather than being a shining beacon of upright epistemology, Sagan was a skeptic in the modern sense of the word, which has been unhinged from its original meaning. The modern skeptic community is wacky and Sagan’s presence in it perfectly underscores how little scientific credibility it has. But essentially the community is based around providing counterpoints to mainstream thinking, whatever mainstream happens to be.

Providing counterpoints has it’s value, but you end up being a leech. It amounts to being the reign holding the horse back, as well as the rain on a parade. Rather than acting with creativity and originality, you are the critic. It’s much nobler to try to find the truth for yourself. To use skepticism as a tool to move forward wisely, rather than trying to pull everyone backwards.

A more noble skeptic would look like Theseus. Not the mythical Greek king, but rather the maze solving mouse invented by information theory pioneer Claude Shannon in the early 50's. Shannon created a dinner table-size maze made out of movable partitions and he would drop the robotic mouse in a random location in the middle of the maze. The mouse would proceed to bump against a wall, reverse, turn 90 degrees, and try again, finding all the ways to not solve the maze en route to finding the correct one. Through much trial and error, the mouse finally finds the cheese.

On that first maze run, the mouse is a skeptic in the truest, most radical sense of the word. The mouse is assuming nothing because it knows nothing. It is given an unknown situation and solving it through brute force and blunt force head trauma. Morbidly beautiful. How many walls does it collide with? More than it would care to count, I would imagine. It ends up hitting the same wall many times because it's not absolutely positive that it is the same wall. On and on. Yet Theseus still emerges victorious, battered and bloody, with the cheese.

That was the first maze run. Shannon actually equipped Theseus with a memory and the ability to fill it. In that sense, Shannon actually made Theseus a lot like us. So on it's second time through the same maze it solved the problem faster and with less trial and error. Soon it can solve the maze without hitting a wall once, because it remembers where all the walls are. But solving the maze faster is predicated on the maze itself remaining static. When the walls are shifted, the trial and error process must begin anew and new bruises must be earned.

To be clear, Theseus was a machine. Machines feel no sentimentality, no pain. Machines have no hunches and they make no assumptions unless we tell them to. They are skeptical because it's all they can do. In this we have to make the distinction between not knowing something and willingly refusing to believe something obvious. Theseus did not know the way on the first maze run, but it did the second time.

The truth is we know nothing. It’s depressing but true. All we have are patterns that are extremely reliable. We are all strangers exploring this universe for the first time. Every once in a while, we hear something or read something that produces a tingling sensation, a resonant ring of truth. That can’t be discounted. I consider myself a skeptic, though certainly not in the Sagan-sense. I have my doubts about every single thing I have ever believed or experienced or expect, because that is the only rational position. Along with that, I let myself believe things. Some of those things might very well be wrong. But a measure of belief is necessary to be a human rather than a machine. I also have no problem with slamming into walls just to make sure they are there. If you don’t do a bit of slamming, are you really sure of anything? Giving too much credibility to what someone has told you will blind you, and you will miss great truth. Giving no credibility to what you’ve been told is incredibly stupid. And you will end up with permanent facial fractures.

## Friday, June 9, 2017

### Timeline Compressed

Transcendent figures often seem out-of-place in their time. It’s as if they were actually members of the future but were accidentally born too early.

Generally a writer of true force/originality is anywhere from 20 years to 200 years ahead of his generation. So therefore he starves, goes mad, suicides, and is only recognised if portions of his work are somehow found later, much later, in a shoebox, say, or under the mattress of a whorehouse bed, you know.
-Charles Bukowski

These figures are sometimes writers, sometimes scientists, sometimes philosophers. But during their lifetime, they are not appreciated. Politicians are always appreciated during their lifetime because everything that matters to them is here on earth, power. Without power they aren’t important. So this only applies to people whose contribution is on a non-temporal level. Wouldn’t it be great for humanity if that timeline is compressed and we appreciate what we have? Appreciate the transcendent figures before they perish? I think it’s possible. But first we should talk about how transcendent figures are actually far from transcendent.

There are still tribes in remote parts of the world which have not been “contacted”. The members of these tribes have no sense of the outside world and their place in it. Brazil has the most, apparently having at least 67 uncontacted tribes. A member of one of those tribes is disconnected from the rest of us in a very real way. Similarly, a man in Tokyo is very different than a man sitting in Indianapolis. They are disconnected. But are they really? There are certain characteristics and experiences that every human shares. Both a tribeswoman of New Guinea and a woman in Cleveland experience human childbirth. So it is incorrect to say that anyone is truly disconnected. We are all connected. Between some, the connections are very close, between others, the connections are very remote. In fact, everything, ever is connected in some sense. How’s that for broad generalizations.

Because we are all connected, we can all potentially get to the same destination. But since we are all starting from different circumstances, that rarely happens. Sometimes it does. Simultaneous invention happens. Both Issac Newton and Gottfried Leibniz invented calculus at the same time. The only reason it could happen is because they were connected in some way. Fundamental disconnects lead to divergence, not convergence.

But even given fundamental connection, certain people in history tend to rise way above others of their time. The notion that a person is born great or transcendent is intoxicating because it’s a short cut. We hear stories of great people and think, maybe I’m destined for that too and if so, I don’t have to actually put the work in. In fact, people make up things like “everyone has a special talent” that you just have to discover. As in, everyone can be great, you just have to find your place and then it’s smooth sailing. But the reality is success is much more a function of right place, right time and hard work than special talents. Which is both inspiring and depressing. It’s inspiring because it means that anyone can rise to be great. But it’s depressing because you need to get some lucky breaks for it to work out. It’s somewhat paradoxical. It’s both open to all and only open to a select few. The point is, nothing is given. You earn what you get both through the sweat of your brow and through your lucky breaks. If you are missing either, you miss out.

Gladwell’s Outliers talks about right place, right time. Specifically he mentions Bill Gates and how he attended a private school in Seattle that owned a cutting-edge computer available for student use, unusual at the time. Gates made use of that resource and from that point on, had a leg up the fast growing computer industry. He had access to a resource that few others had, and that allowed him to be transcendent, rather than some innate destiny. The implication is that, while Gates is certainly intelligent, he a product of his circumstances, of his lucky breaks. Maybe that’s not fair. But it has some truth.

I believe there were people just as brilliant as Nietzsche or Plato living concurrently or before. But they received zero recognition because they didn't have the skills to express their ideas well, they didn't have the style and influence. To be clear, I believe there were other people who has the potential to be Plato. In fact, there I believe there were people at that same time who had the exact same thoughts, but were still not remembered. They were victims of their circumstances. All this is to say, seemingly unique people are not so unique after all.

An essential quality of a transcendent figure is being different than the mainstream. That’s the whole point. But you have to be different from the mainstream in a good, forward thinking way, not in a backwards way. Mainstream can be defined a lot of different ways. And mainstream in one region of the country is not mainstream in a different part of the country. What I’m calling mainstream is super broad, as in almost everyone is part of the mainstream. True transcendent figure thinking says that everyone is in the mainstream except for one lucky soul. My thinking is that everyone is in the mainstream except for a few dozen or so people.

Those few dozen people are almost certainly isolated from each other. True originality requires isolation. When something is developed in isolation it becomes a complete living breathing thing of it’s owner. If it’s only partially owned, it loses energy and life. But the isolation doesn’t have to be permanent. It just has to be long enough for the concept to get its legs, its full form. Then it can be exposed to the world without becoming tainted. So these people have to be isolated for a long enough time for each person to fully develop their ideas.

In the past it was very difficult for those people to connect. So they just stay isolated from each other. And that causes some insecurity about the idea. They think, if this is such a great idea, why is no one around me coming up with it? Furthermore, since the idea is ahead of it’s time, no one really endorses the idea either. So the person has an idea that is lonely and unappreciated. A recipe to just keep it to one’s self.

That is one area where modern technology can help. We can connect to others better than ever before. People across the globe are a keystroke away. Which creates a scenario where someone comes up with an original idea, then does a search for others with the same idea. Finds a couple then they reinforce each other. Simultaneous invention, connect, mutual reinforcement.

On the other hand, modern society has provided more ways to squash originality than ever before. The rise of mass media homogenizes culture. So an original can be squashed before they have a chance to bloom. And I believe the modern ability to go from rags to riches is actually counter productive to originality. In a capitalist society, you get rewarded for selling. You sell when you give the market what it wants or needs. And that means transcendent originality often gets punished.

So maybe it all cancels out and we’re in the same boat as we always have been. Where transcendent figures are just going to be ignored during their lifetime. I hope not.

## Monday, May 7, 2012

### DIY: Custom Graduation Photo Cards

 The final result of my DIY photo card adventure
Since I'm graduating this May, I decided to send out a special graduation thank you note to my friends and family. I started using the photo card creator on the Walgreens website but quickly got frustrated with the lack of customization tools. Specifically, I wanted custom fonts and also to change font colors within a text box. Being an incurable DIYer, I thought to myself: "I can make this myself in GIMP and customize it all I want!"

What size card? I started with the assumption that the card would be 5x7 inches, but I changed my mind when I realized I only had letter envelopes (4 1/8 x 9 1/2) which wouldn't fit a 5x7 card. So, I switched to a 4x8 inch card which would fit in a letter envelope. Ultimately, the website where I ordered my prints supplied me with envelopes for free so this was all for naught, but I'm still glad I went with the 4x8 format.

What resolution? For photo prints, you need a pretty high resolution for the photo to look good. For my 4x8 card, the GIMP "canvas" was 2880x1440 pixels.

What design? I came up with a template for my card:
 General template for graduation photo card (2880x1440 px)
In general, pictures on the right and text on the left. I thought that four pictures of myself looked a bit vain, so I made the smallest frame an "object" picture. For my object, I used a cool picture of the golden gate bridge. The  outside black border is 20 pixels and the inside "framing" is 10 pixels.

You might notice a blank black area on the far left side which seems unused. This is a actually a buffer area to make sure the text won't get cut off during printing. The size of buffer you need depends on who you're ordering prints from. With pictures, having the edges cut off is not not the worst thing in the world, but text becomes unreadable with missing letters. I would say a good rule of thumb is to reserve 6% of the total width and height for a buffer. That is, 3% of the total width reserved on both the left and right and 3% of the total height reserved on both the top and bottom. Trust me, it's better to be safe than sorry (see below):
 Edge text cut off on prints=FAIL!
How to put it together? I'm no GIMP expert, so perhaps someone can offer a better way to do it. But I simply created a black "frame" layer with transparent squares at the photo locations. This part took a bit of planning and some back-of-a-napkin calculations, but it wasn't too hard. As a sidenote, I found "Guides" to be especially helpful to line things up appropriately. Try selecting one of the transparent squares and going to Image>Guides>New Guides From Selection. This will create four Guides; one for each side of the square.
 GIMP-tastic photo editing fun
Once you have the frame completed and the pictures you want picked out, open the pictures as new layers. Then you need to adjust the pictures to the right size and frame them in the square the way you want.

The main paragraph of text is simple - just use the text tool. One tip: make the fancy text stuff on a separate GIMP canvas and import the final product into your card canvas. I did that for the "Thank You" header and the major and school overlay at the bottom.

Where to print it? It was surprisingly hard to find a site that will make 4x8 custom prints. I finally stumbled upon artscow.com and ordered from them. They have an elaborate client card designer, but all I did was upload my image, place it on a card and select "Apply to All." I ended up ordering 30 cards and it cost about \$15 including shipping.

I received my package in the mail about 2 weeks later, sent from an address in Hong Kong. The package included all of my cards, nicely wrapped and 30 envelopes to send my cards in. I was very satisfied with the whole process.

Did it save money? No.

Did it save time? No.

Was it worth it? Yes.
 Another view of the final product

## Wednesday, May 2, 2012

### Interesting Infrastructure: Caltrans and Music Notes

These photos are from Cotati, CA in the northern bay area. As you can see, Caltrans incorporated a music note motif into their new overpass project. Since Cotati is sort of a hippie town, and also home of an annual Accordian Festival, it fits the local vibe. The motif has a treble clef sequence and a bass clef sequence, and they appear on the sound walls, the retaining walls and on the actual overpass. I alternate between thinking this is really cool and thinking it is a huge waste of money, but here are the pics anyway:
 Sound wall in final stages of project
 Overpass with alternating design

## Friday, March 30, 2012

### GIMP: Adding New .gpl Palette

Palettes are very useful if you want to have a consistent color scheme. I find that having good colors readily available helps in the creative process as well. You can find great user-created palettes for free at kuler.com (link) and colourlovers.com (link); using these palettes can give your project a very professional look.
 Palette dialog

The easiest way to import a palette is to simply drop the file in the the file system GIMP created when it was installed. On Windows XP, the file would be: C:\Documents and Settings\<fill in user name>\.gimp-2.6\palettes. On Mac OS X, it would be: Users/homefolder/library/applicationsupport/ GIMP/palettes. I am not familiar with the location on other operating systems but if you look around a bit it should be obvious. Note that the file must have the file the extension .gpl to work. Also, you must restart GIMP for the palette to show up.

An alternate way to add palettes is to use the user interface. Since this does not depend on the file structure, it should be valid for all operating systems. From the image window, go to Windows>Dockable Dialogs>Palettes and click to open the Palettes dialog. On the Palettes dialog, click on the little arrow on the top right. This brings up a menu where you go Palettes Menu>Import Palette. From here, you simply select "palette file" as the source and browse to the desired .gpl file.

FYI, I used GIMP 2.6.11 for this tutorial.

 Import New Palette dialog

## Wednesday, March 21, 2012

### Arduino: Sending Hex Bytes to Serial Devices

I have been working on a project which involves an Arduino communicating serially with an LCD display device. Through a lot of trial and error, I finally figured out that when you want to send a HEX-encoded byte from the Arduino, you need to use the Serial.write() command rather than the Serial.print() command. The Serial.print() command works find when you are sending an ASCII byte but it will not work when you try to send a HEX byte. The right and wrong ways are below:
//Serial.print('U');  <----right (ASCII)
//Serial.write('U');  <----also fine (ASCII)
//Serial.print(0x55); <----WRONG! (HEX)
//Serial.write(0x55); <----right (HEX)


Similar problem and solution: http://www.arduino.cc/playground/Learning/SparkFunSerLCD

## Thursday, March 1, 2012

### STK 200: First Program (LED Blink)

For this program, you should already have AVR Studio 5 and AVRISP-U installed on your computer. If you don't, visit my previous post Getting Started Programming Guide (link). This is a simple program which simply makes the built-in LEDs to blink. I'm going to use C for this program because the code looks really simple. The assembly version is not really difficult either but we'll keep it simple for now. Note that AVR Studio 5 has a built-in C compiler. You might remember for AVR Studio 4, you had to download AVR GCC and integrate it. If you downloaded AVR Studio 5, you already have the C compiler.

What will the program do? If you look at the STK 200, there is a row of 10 LEDs numbered from 0 to 7 then "ISP" and "ON." These are the built-in LEDs. Our program will make the LEDs numbered from 0 to 7 blink on and off at a rate perceptible to the human eye. In microcontroller terms, this means physically connecting the LEDs to PORTB and sending alternating HIGH/LOW signals to PORTB. Note that is all output - no input. If you don't know what PORTB is, check my Basic Layout Guide (link).

Step 1 - Create a new project: Go ahead and open AVR Studio 5. From the startup screen, go to File>New>Project... and you should see a New Project dialog box. At the top left of the dialog box, select the C templates and then choose "C Executable Project" in the middle of the screen. At the bottom, fill in "blink" as the name and this should automatically fill the solution name field with the same text. Also, make sure that the "Create directory for solution" box is checked. This checkbox will not affect your code at all, but it will keep your AVRStudio folder better organized. Look at the picture below and make sure your screen looks the same:
 STK 200: New Project Dialog Box

## Friday, February 17, 2012

### STK 200: Getting Started Programming Guide

To start programming the STK 200, you need to download some software. Namely, you need AVR Studio and AVRISP-U. I talked about the basic layout of the board in a previous post (link), so check that out if some of the terms I am using are unfamiliar. I broke the process into three steps below.

Step 1 - Download AVR Studio 5: I started programming with AVR Studio 4, but if you are starting today, you might as well start with the new AVR Studio 5 release. The program is built using the Microsoft Visual Studio Shell (VSS) so the user interface is very similar to Visual Studio. I suppose this can be a good thing for those who like Visual Studio and a bad thing for those who don't. Overall, it seems to have a lot of convenient features such as IntelliSense and debugging interface.

So to get the software, go to the AVR Studio 5 page (link) from Atmel and download the software package you need. I recommend downloading the package that includes VSS and .NET 4.0. The software is completely free but you do have to fill out a registration form. The installer is pretty big (the one including VSS and .NET is over 600 MB).
 STK 200: AVR Studio 5

## Tuesday, February 7, 2012

### Interesting Infrastructure: Mouse shaped wetland

Check out this satellite imagery from Petaluma, California, a city of about 60,000 people in the northern bay area. The city completed construction of a new wastewater treatment plant, the Ellis Creek Water Recycling Facility, in 2009 and they included some polishing ponds which had a very interesting shape. Environmental artist Patricia Johnson worked with the city and their consultants to make this wetland park a unique piece of artwork. The shape is a reference to the harvest field mouse, an indigenous species in the area near the Petaluma River. You can see the actual treatment facility towards the top right of the image.
 Mouse shaped wetland: Raw image
 Mouse shaped wetland: Mouse outlined

## Wednesday, February 1, 2012

### STK 200: Basic Layout Guide

The Kanda STK 200 has a lot of really cool features. But when I first got the board, I didn't even know where to begin. This post goes over the board's basic layout and the main features that it includes.

I/O: Really, the core function of a microcontroller is Input/Output. In fact, out of the ATmega32's 40 pins, 32 pins are set aside for I/O. They are organized into four 8-pin ports named PORTA, PORTB, PORTC, and PORTD. The STK 200 makes it really easy to access these ports by giving them each headers. The board even labels the headers using the standard naming convention established by the AVR family (PORTA, etc.). Each header includes it's own VCC and GND, which devices almost always require. LEDs and switches are probably the most common form of I/O; conveniently, the STK 200 has 8 LEDs and 8 switches built into the board. You can dedicate ports to the LEDs, the switches or both using a 10-pin ribbon cable provided with the board and pictured below. PORTB is lined up with the LED input header and PORTD is lined up with the switches output header for an easy connection.
 STK 200: I/O