thinking

My Photo
Name: Tyler
Location: Mountain View, California, United States

thinking := [life, games, movies, philosophy, math, coding, pizza, &c.]

Tuesday, November 28, 2006

A new calendar system

Today (as I write this) is 653.2006. That's Tuesday 28 November 2006 for you Gregorians out there.

Before explaining why today is 653., let's see the motivation for a new date system: months and weeks.

About months: the idea of a large group of days forming a regular pace at which to pay bills and receive paychecks is fine by me. What's wrong with our current Gregorian months is simply that they are archaic, unnatural, unwieldy motley relics of millennia past.

About weeks: compared to months, weeks are great. They are always the same length. They give us a convenient and universal way of dividing our days into work and non-work. They help us decide when to plan our vacations, holidays, weddings - basically everything.

Have you ever noticed that it's not so easy to perform computations with hours, minutes, and seconds? For example, quickly find exactly how many hours:minutes:seconds elapsed between 11:51:43 am and 2:41:20 pm today? You can do it if you try (2:49:37), but it would be a lot simpler if we simply used a purely decimal system (e.g. 14.689 - 11.862). The challenge is that we're using a mixed-base representation here. Really, it's a strange combination of base-10 numerals within a base-60 system - a vestige of the Babylonians, those crazy guys.

What could be worse than a base-10 notation within a base-60 arithmetic? How about a base-10 date within a base-?!@# month system, where ?!@# is either 28, 29, 30, or 31 depending on where you are in the world, your religion, which year it is, and how far into that year you are. Yes, that makes perfect sense. (I mention location and religion as a reference to those who for hundreds of years used the Julian calendar; of course there's also many lunar calendars and others as well!)

Here is the proposed system of numbering days: each day is simply notated "day.year" (or simply "day.") where "day" is the number of days since the previous year in base 7.

In other words, 1 January 2007 will be 1.2007. Next is 2.2007 and counting up until we get to 7 January, which is denoted 10.2007. Continuing, 14 January is 20.2007 and 21 January is 30.2007. The idea is that each time a digit would normally (in base 10) become a 7, in base 7 it becomes a 10. This is a well-known idea to mathematicians; in fact, since you already know how to think base-60 (and base-12 or -24 for hours of the day), it shouldn't be hard to grok for base 7 as well. Here are a few more example conversions:

Gregorian dateDay of yearbase 7
28 January2840.
31 January3143.
1 February3244.
28 November332/333653./654.


First: we may now consider each 49-day period as a new kind of month. This is very easy in the new system since days 0. - 66. are the first month, followed by 100.-166., then 200.-266., etc. In other words, the third digit from the . indicates the current "month". At the end of the year is a half-month of either 22 or 23 days depending on leap years.

The new system is independent of how you choose to track your years. It would be best for everyone to agree on a single, elegant and easy-to-use system, but historically that is a colossal task. Leap years and the length of years in general are topics for another post.

Second: All of the same days of a week end in the same digit. For example, because today, 653., is a Tuesday, I also know that 3. (3rd of January) was a Tuesday and that 665. (7 December) will be a Thursday.

In fact, if this system were to be widely adopted, then we could coordinate all 1's (dates ending in 1) to be Saturdays, 2's to be Sunday's, etc. Thus computing the day-of-year of any date in any year would be trivial (even some monkeys could do it). Furthermore, holidays which we prefer to stay on a certain day of the week will remain the same date year-to-year. No more X falls on the 6th Wednesday of Frebtober. The cost of this adoption would be a slight discontinuity at the end of every year. However, keep in mind that this "discontinuity" translates to "three-day weekend" every non-leap year and "four-day weekend" every leap year (this may be one of the strongest selling points here).

I've been using the system for my own personal records for a couple years now. It is tricky at first, mostly because no one else has even heard of it (so far). It is also difficult to buy calendars in this new system. However, a while ago I put together a little php page to display the calendar year in this system. Back then I was a little less modest and had called the system the "tdate". Here is the php calendar. [landscape-printable version]

Sunday, November 26, 2006

SketchUp fun :)

Having a little extra free time over the Thanksgiving weekend, I downloaded SketchUp, a free piece of software for 3D modeling with a nice GUI.

My earliest experiences with 3D modeling, way back in the early 90's, were with command-line programs like POV ray. These tools would parse an ASCII file describing primitive shapes using 3D coordinates and convert the data file directly into an image file. For a high school project I designed a short animation. It took hours with graph paper, typing, and rendering just to produce a single image. If I had the angle or the eye position wrong, or made a slight typo in the data file, I'd have to re-render the entire image. It was a debugging nightmare.

Modeling has come a long way since then. Most of us have seen a few good Pixar movies, which really illustrates what a large group of empowered artists/renderers can do working well together. (Btw: anyone seen Tron, which has a computer-generated feel to it? It turns out that something like only 120 seconds of actual footage in that film was truly computer-generated. The rest was live-action with hand-drawn effects on the cells.)

But what can an amateur, or even anyone with a little time and a single computer, do as far as modeling goes? There are a number of high-end software packages available which offer power tools. But in my (admittedly limited) experience, these tools have historically been tricky to master.

Enter SketchUp. Thing about this program is that it is Easy to use and learn. So easy it's really honestly a lot of fun. I have never before seen the push/pull tool in any other modeling software (am I just out of the loop?) and I love it. It's the kind of tool that makes you say "why wasn't this in all modeling software from the beginning?" Every once in a while there's a leap forward in UI, and to me, SketchUp does this for 3D modeling.

So how easy is it really to learn? Check out the tutorials. The first two give you a lot of the basics. Even if you don't want to try out SketchUp at least check out the "Textures: Using Photos" tutorial. You have to admit that's kind of cool.

So anyway, I've only had it for a day and I've made a couple models for fun. Here's a house (the scale's a little off on this one):
[skp file]
One limitation you might notice is that you can't create arbitrarily weird shapes. In mathematical terms, I think you can (theoretically) make any shape out of surfaces with zero curvature, but more "curvy stuff" is difficult (maybe impossible?). Intuitively, if you could possibly make it out of paper by cutting, folding, or bending in one direction, then you should be able to model it in SketchUp. Spheres or saddles (like one you would put on a horse) have nonzero curvature, and those shapes are impossible to make by drawing a planar outline and pulling or pushing that outline into a third dimension. Anyway, you can still make some crazy-looking stuff; check this out:
[skp file]

Finally, I discovered it's really useful to print out the quick reference card - you can do that from the Help menu. Have fun!

Friday, November 24, 2006

NYC Subway Stories

I'm sure there are several good things to say about the NYC subway system. Every once in a while I can remember one. This post is not about them.

I have lived in New York now for just over five years, and to this day I still occasional get lost. Technically, there is very often some way to tell in which direction a train is going, which stops it is making, and which line it is running on. In theory.

A couple months ago I, perhaps a bit delirious in my post-graduation giddiness, made the highly dubious decision to take the J/M/Z train from one point in Manhattan to another. The first indication that this may not have been my wisest choice came when no train arrived for almost twenty minutes. [If three trains (J/M/Z, e.g.) each arrive every 20 minutes with random offsets, my average waiting time for the first train should be 5 minutes.] The second indication that something was amiss came to me as I was admiring the peaceful reflection of the night sky in the East River as the subway passed over it. You see, usually, when travelling underground within Manhattan Island, one does not take a bridge over the river. But that's the subway for you. (Actually of course I took the train the wrong way due to confusing signs.)

That story may lead you to conclude merely that the author is absent-minded (to which there is some slight truth). However, I stubbornly persist in my thesis that the subway is in fact a shoddy operation, irregardless of any absent-minded passengers.

Several years ago I remember once, while waiting for the F train, being quite surprised to see instead an N train pull into the station. This is unexpected because these two trains run on completely different lines. I thought that maybe the large yellow N's written all over the train were simply wrong, as is often the case. The conductor then announced that this train was in fact running on the A line. Ah, that clears everything up. It's simply the olde N-train-running-on-the-A-line-but-just-stopping-by-the-F-platform-to-say-hallo again. Yes, that makes perfect sense.

Remain there any nay-sayers? What's that you say? Nay? You argue that even a good system has an occasional N on the A at the F? Ah, but I have one more story.

This is the most recent - I think it was about three or so weeks ago. On my daily journey to work, I entered my local F/V station. Sitting on the V track was (surprise!) a V train. The interesting thing was that the doors were shut, people were in it, and it wasn't going anywhere. That is slightly unusual, but not unheard of. Soon, my F train came along, and as I was getting on, I noticed the people in the V train were getting very upset. One woman was actually banging on the doors and screaming "let us out!" Instead of getting on my train, I walked over to the people who were screaming within the closed subway car (many other people heard them but in New York fashion they basically ignored them). The woman explained that they had been trapped in that car, patiently waiting for the doors to open, for quite some time, and there was no way out.

I said I would try to help them out. First I asked if they could move to another car in the train, since other doors to the other cars were open -- they could not. So I walked to the middle of the train to find the conductor, only to find his/her booth empty. So I continued to walk down the platform in search of somebody who works for MTA (who runs the subway). Finally I chanced across an MTA maintanence worker, and briefly explained the situation to him. He looked at me with a serious and annoyed expression, and expelled "Whadahel dyawanme todoboutit?" Deciphering his response, I realized I had best look elsewhere.

On my way back through the station, the doors suddenly opened and the trapped travelers emerged unharmed (except perhaps psychologically of course). I still don't know how the doors were finally opened. In any case, these are not the symptoms of a healthy mass transportation leviathan.


If you live in New York, though, you really have to use the subway. It's best to live near a good line. Here's my ranking, from best at top to worst at bottom (excluding a few I don't have much experience with):
4/5/6
1/2/3
F
A
C/E/V/B/D
L
J/M/Z
G

Sunday, November 19, 2006

Fraud-resistant voting protocols

In attempting to implement a large-scale voting system, one major concern is cheating, which may be committed by either the voters or the votees (by which I mean those administering the vote). Here are some ideas about how to fight many types of voting fraud. There is certainly a significant body of existing research related to voting so please excuse (and enlighten) me concerning any obviously-pertinent omissions.

Voting, version 0
Everyone registers ahead of time (to prevent illegal folks from participating). At the time of the vote, each voter must arrive at a local designated voting station where their registration is confirmed and they submit the information they wish to have counted on their behalf. Everyone trusts the administration to fairly count all votes accurately, and shortly thereafter the winners are announced.

This is meant to model the present voting scenario in the US. Here are the problems with this model:
1) Any errors or corruption within the administration are virtually transparent to the voting population. Logically, we only know if something has gone wrong when we vote for someone and the tally indicates they got zero votes. This very case occurred recently (which inspired me to start thinking about these challenges).
2) A voter may complain that their vote was mis-counted but we have no way of confirming or denying the voter's claim.

The following version is a very easy fix for some of these issues, but not all:

Voting, version 1
At the time of voting, each voter is given a secret unique id number which only the administration and the voter know. Once the voting is complete, two separate lists are published in a publicly accessible manner:
  • Each unique id along with all the information of that person's vote
  • Enough information (such as their name and zip code, e.g.) to uniquely identify each person who voted
The lists are completely separate so that each person's vote is only listed with thier secret id number, and not their name. Before you object to the immediate privacy concerns of publishing all voters' names, let's examine the benefits of this relatively easy-to-implement version. First, all voters can confirm that their vote was tallied correctly. If I voted for Jack Johnson, I can look up my id number to see that my vote was posted as I gave it. At the same time, no one else knows my number, so that my preferences are kept anonymous. Secondly, if we trust that most people are responsible enough to verify the veracity of their votes in the tally, then we can feel confident that the total scores are in fact correctly computed, since we can add up the votes for each candidate ourselves using the public posting. However, there is still the problem that the administration may have cheated by creating fictional voters in order to sway the majority one way or another. This is deterred by the list of names. The idea is that responsible voters pick a small random subset of these names, and confirm that these people actually exist. Unless the vote is very close, there will need to be a large percentage of fictional voters in order to cheat this way -- in that case, it is very likely that someone will notice some of the supposed voters do not exist.

But there are still problems with this system. Of course, some people are likely to object to having their names published - I'm not sure how to fix that (any ideas?) In addition, suppose a voter claims that his vote was not counted correctly. The voter knows the truth, but the administration still has no means to confirm the voter's claim. Although this system gives the voters close to complete knowledge of the fidelity of the tally, it does not afford a recourse in the case of an invalid count.

Hence, let us now consider

Voting, version 2
This case is an augmentation to version 1. Now we assume that all parties - voters and the administration - each have a means of digitally signing all transactions. (This unfortunately assumes that all voters have some access to a computer they can trust in order to generate a public/private key pair.) In order to vote, a person must submit a digitally signed form including their vote. Once the vote is received, they will immediately obtain a receipt, signed by the administration and confirming the information of that voter's choices.

This solves the problem of how to respond to a claim of an incorrect vote tally. If a voter claims a mistake has been made, they may back up their claim with the signed receipt they received. If a voter claims that their vote was mistakenly not counted at all, the administration can provide the signed vote they submitted. In either case the evidence or lack thereof is a strong indication in favor of one party or the other.

However, in the end, there remains the issue of voter privacy and verifiability. If we do publish, say, the names and addresses of all voters, who in reality would confirm their existences? Moreover, who would want to have strangers knocking on their door simply to check that they're not a fake voter? In the end it seems the fundamental problem of confirming that a person is real is the core challenge remaining here -- especially while protecting as much privacy as we reasonably can. Ideas?

Monday, November 13, 2006

New York City pizza pie

The best pizza in New York City?
Grimaldi's
Without question my fav pie in this little town. This is no Ray's, folks. The crust is New York style (thin) yet pleasantly palpable. The mozzarella - deliriously fresh. The sauce proffers an excellent semisweet aromatic tomaticity delicately juxtaposed by a hint of olio e pecorino. The pepperoni's pretty good too (if you're a carnivore of course).

Grimaldi's [map] 19 Old Fulton St, Brooklyn side of the Brooklyn Bridge, take the A/C/E to High St

Other places of note:

In Queens: Nick's
This fun little shop deserves a more central location, but I suppose it's pretty convenient for a few tens of thousands of people who live in the area. The pie is Grimaldi's style, although apparently with a conventional gas oven. It's on the cusp of true excellence.

Nick's Pizza [map] 108-26 Ascan Ave in Forest Hills, Queens, take the F to 75th Ave or the E/R/V to 71st Ave.


(The rest are in Manhattan)
Lombardi's
Last time I checked, Lombardi's still serves the best slice on the island. Problem is, they've become touristerized. Pies are a little more rushed and feel a tad more mass produced than they used to. But these bites, if you can handle the weekend wait, come with a bit of history - Lombardi's is officially America's first pizzeria, having been licensed as such in 1905. Yep, over 100 years old! There's a few good desserts right around the corner in Little Italy as well.

Lombardi's [map] 32 Sprint St between Mott and Mulberry Streets, take the 6 to Spring St, the J/M/Z to Bowery, or the B/D/F/V to Broadway-Lafayette.


John's
John's pizza is the king of the non-fresca crowd. Their mozzarella isn't quite up to par with the aforementioned, yet somehow it tastes pretty good. These slices are just a hint thicker (still New York style to any windy citians) and perhaps a tad cheesier. A decent choice for large groups as well (esp the mid-town location).

John's [map] Three locations: 278 Bleecker St | 260 W 44th St | 408 E 64th St


La Pizza Fresca
This place is included here out of respect for the excellent taste of my former roommie Mariapia (a good Italian cook & economist) who singled out La Pizza Fresca as her personal NYC favorite. One of the differences in this pie is the use of good buffalo mozzarella, which in my mind adds a sort of buttery appeal.

La Pizza Fresca Ristorante [map] 31 E 20th St, betw Broadway and Park Ave, take the R/W, 6, or F/V to 23rd St (3 different stations but all close together) or the N/Q/L to 14th St/Union Square.


Patsy's
Patsy's is my favorite Manhattan pizza chain (not counting John's I guess). It's not quite gourmet, but it's reliably enjoyable. On top of that, they usually don't have a long wait to sit down, and the menu offers plenty of alternatives (salads and pasta, etc) for those strange folk you go out with who might have a crazy urge to not eat pizza. If you're in a cool part of town, there's a good chance a Patsy's is within walking distance.

Patsy's [map] Many locations - see map. (Note that item "J" on the map is actually Grimaldi's, since Grimaldi's was once called Patsy's (although it is and has always been a distinct entity).)


Ray's
Do not eat at Ray's. Please. Think of your poor, innocent taste buds.

Saturday, November 11, 2006

MathSearch

Google has a new service called "co-op" which basically lets users build their own very customized version of web search and share/collaborate their specialization with the world.

So, let's get started with MathSearch! Just click on "edit this search engine" to help out (remind you of anything?)

By the way, the front page for google co-op is:

www.google.com/coop

A dense point set, no three points on a line

The other day I was thinking about sets of points in general position, which means that no three of the points are on a single straight line. Can you think of an infinite such set?

One answer: Here's one way to do it: just take the set of points (x,y) with x a positive integer and y=x2. Then you can see by the convexity of the parabola that no three of these points are in a line.

So that's an infinite set. Can you think of a set X in general position which is also dense, meaning that every point in the plane is a limit of some subsequence of points from X?

The solution is actually kind of easy (where by "easy" I mean that math professors would call it easy :) Check it out: [PDF] [TEX].

Friday, November 10, 2006

How to see hidden files in finder on Mac OS X

Certain prefixes to files, such as a period '.' will normally make them disappear in a finder window. You can change this behavior with a couple command lines. In case you don't know how to start the Terminal it's under Utilities within your Applications folder. To see hidden items, type these two lines in your Terminal:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder


Don't worry, the second line doesn't hurt any innocent windows -- it will restart your finder windows so they reflect the new behavior. To go back to hiding hidden folders, do the same thing again except with FALSE instead of TRUE.

Also, in case you didn't know how to see hidden files from the terminal, just type 'ls -a' which lists (that's the "ls" part) all (that's the "-a" part) files. Without the "-a" it excludes all files beginning with a dot.

Tuesday, November 07, 2006

BKLYN



This makes a great desktop background.

This is Brooklyn as seen from approximately where 14th St would hit the East River, if it did (it doesn't though; otherwise cars would be driving in the river a bit more often). I took this on 16 April (211.2006).

Saturday, November 04, 2006

two curious incidents


1Yesterday (by which I mean Friday) morning I awoke without an alarm clock. This in itself is curious but less so when it is added that it was rather late in the day. The true element of intrigue occurred when I reached for my clock to see exactly how late I was. Half-blindly groping the spot on my bedside desk where my clock often lounges I found an unusually empty bit of desk. My clock was nowhere to be found. I am quite sure it was there the night before, and I have yet to discover its whereabouts. This will become even more interesting on Monday when it might be desirable for me to appear at work before everyone else leaves.

2This evening as I was walking home I saw a man get hit by a car. There was the usual melodramatic screeching of tires, a slight thud (at which point I turned my head to see the event unfolding) followed by a cry from a woman standing at the corner. This was no light tap - the man was thrown upward past the hood onto the windshield. Having been prepared for this exact moment by years of television, I knew exactly what would happen next. The poor man would slam forward to his demise as the errant vehicle speeds away cackling.

However, it turns out that not all events on television are entirely accurate. The man in reality rather gracefully rolled off the car onto his feet put his hands in the air, and shouted "I'm ok! Don't worry!" then picked up a few things that had fallen out of a plastic bag he was carrying, and walked back to the corner to wait for the rest of the oncoming traffic to pass. I stared for a little while thinking there may just be some sort of a delay before he collapsed on the sidewalk, but nothing of the sort happened.

I am beginning to doubt the disturbingly large portion of my education endowed by televisory means.

Friday, November 03, 2006

reality and movies

Movies are very different from reality. In a lot of ways, this is good. However, at other points, I really feel that we are stuck in a creative rut ("we" being the collective movie-producing society that we are) and need a little introspection on what a movie can really do. Without further ado, The Movies vs. Reality table:

regular lifethe movies
regular clothes (mostly)costumes
chit-chat, mumbling, pointless talkingwitty, clever, meaningful dialogue
sometimes predictable, sometimes notcliched, formulaic
pseudo-romanticromantic
lack of key informationredundant key information
messyneat (except art films)
continuingconclusive
imprompturehearsed
overwhelming pointless informationlack of pointless information
boringartistic


Key:
   =bias this way   =go for balance   =bias away from this


Have you ever watched an old movie and thought how cheesy is this? The farther back in time you go, the more theatrical they seem. We can see the evolution as the players mold their stage techniques to the big screen. It's a natural transition, really, since those involved in entertainment have to learn how to best adapt to their medium as it changes.

I think that we still have yet to fully realize the potential of film as an artistic narrative medium. Directors, actors and actresses, and producers et al. are inevitably tainted in their image of the typical moving picture by the formative visions of the past. Lately there has been certainly been growing interest in a "reality" movement, but I feel as if this impetus has been misdirected. Do we gain the most reality by watching unrehearsed nonplayers? I think not.

What I would most like to enjoy as a movie-goer is a sense of profound truth, or at least credibility. This is not the same as watching untrained actors/actresses. Hence the above table, which professes to draw a more consciously-drawn line between those distinguishing elements tween film and real. In some cases, such as the "artististry," I think we would be mistaken to alter a film in favor of a more "realistic" feel. Others less so.

I cannot conclude this post without mentioning Andrew Bujalski's Funny Ha Ha, which is not so much a great film as it is a triumph of what I would consider a misguided set of reality features. It does an excellent job of capturing everyday dialogue (a good thing!) and an equally impressive job of seeming completely mundane (not as good!) Watching this movie while thinking about how it pushes the envelope can really open your eyes to the different means one may choose toward credibility, and how much they can change the way you feel about a film.

Wednesday, November 01, 2006

a 4-word conjunction

I will not have => I'll'nt've

In attempting to think of an example usage, I'm realizing that "have" in a conjunction is not arbitrarily the same as direct use of the word "have". (Btw I'm aware that that last period "should have" been within the quotes, but I consciously rebel against that particular illogic grammatical gristle.) Without a conjunction, I could easily say "I have to eat some pizza", but the phrase "I've to eat some pizza" somehow just doesn't sound right. Then again the very phrase "have to" (or even "used to") sounds a bit funny to my auricular palate. It is tempting to conclude that a "helping" form of a word may not be conjunctivized, but certainly we may do so with the word "not": He couldn't see very far with those zucchini slices on his eyeballs. We could even push the envelope with: She couldn't've eaten the entire pizza had she not covered his eyes with zucchini slices. My guess is simply that "have to" cannot be "split" by a conjunctionation.

Without further ado, the example:

I'll'nt've any pizza until thou remove these blasted slices zucchini whence mine squash-obstructed eyeballs.