?

Log in

Dan Peng's Journal
20 most recent entries

Date:2007-01-10 11:30
Subject:
Security:Public

My mom's opening a new practice: Holistic Medicine and Acupuncture, LLC. 9 Professional Circle Suite 212, Colts Neck, NJ 07722. Dr. Wendy Huang. Pediatrics. Not that I expect any of you to care, but search engines will. :P

16 comments | post a comment



Date:2006-03-23 01:33
Subject:Truth in Mathematics --- a social process?
Security:Public

I just read Social Processes and Proofs of Theorems and Programs (1979).

The authors argue that "mathematical proofs increase our confidence in the truth of mathematical statements only after they have been subjected to the social mechanisms of the mathematical community." That is, the reason I accept a theorem is because of a social process that reviews its proof and produces faith in the theorem --- not because I have actually checked its proof.

First, there's no way I could write a Russell-and-Whitehead-style formal proof of anything substantial; and, since I can't do that, I am stuck with the informal mathematical proof, which I can't verify reliably, and neither can even the best of mathematicians. Published papers contain scores of incorrect theorems which remain unchallenged for years, and even the best mathematicians often publish proofs that they later realize to be incorrect. (e.g., Rademacher's 1945 "proof" of the Riemann Hypothesis.) So, verifying the proof myself is not a reliable indication of the truth or falsehood of the theorem.

Rather, the mathematical community reads the proof, internalizes it, looks at it from many different angles, uses it to prove other theorems without reaching a contradiction, and eventually comes to believe that the theorem could be demonstrated by formal, deductive logic, although the theorem probably never will be formalized, and despite that the given proof is probably flawed.

I think I am a formalist at heart. So this sort of knocks down my ivory tower of math as this formally verifiable paradise of truth. Read more...Collapse )

post a comment



Date:2006-02-14 15:12
Subject:New professional website
Security:Public

Daniel Peng. http://www.eecs.harvard.edu/~dpeng/.

(ignore this post).

post a comment



Date:2006-01-23 01:02
Subject:The Bathroom Signs
Security:Public

Amazing. In the men's bathroom on the second floor of Perkins Hall at Harvard, note the three very conspicuously placed signs in the showers:



Observe the funny nose figure. Now, read the text carefully.
Are you thinking of spitting or blowing your nose in the shower?  Please refrain and use a tissue or a paper towel before or after entering the shower!  Depositing your oral or nasal fluids in the shower is unhygienic, spreads disease, disturbs other residents, and mostly is just gross :).  If you have questions about this policy, please refer to the Bathroom Etiquette handout given at the Floor Meeting in September or speak to the 2nd floor RA in room 219.


Consulting the Bathroom Etiquette handout, we discover:
  • When using the shower, it is inappropriate to urinate, defecate, or excavate the nasal cavity.
Ah, we didn't understand before. This must be what we came to Harvard to learn. We also learn such important things like:
  • It is in appropriate to collect and store urine in rooms and dispose of it later in the bathrooms or in trash cans.
I think these lessons must have been in one of those grades I skipped.

Read the rest of the legendary Harvard GSAS Residence Halls Bathroom Etiquette handout...Collapse )

3 comments | post a comment



Date:2006-01-19 01:41
Subject:Penny Stock Spam
Security:Public

If you ever wondered about the effectiveness of the spam that promotes penny stocks, check out this graph:



Each green vertical line represents spam. Notice how nearly every spike in volume (blue, bottom) overlaps with a solid vertical green bar, indicating massive amounts of spam. The spikes represent millions of shares per day! At 10 cents per share, that's hundreds of thousands of dollars in trades resulting from penny stock spam.

More amazing graphs and details in CS 182: Analysis of Penny Stock Spam.

Bottom line: Penny stock spam is highly correlated with spikes in volume and long-term declines in price. Short-term price trends are unclear.

Harr has some thoughts of making money from penny stock spam. :)

3 comments | post a comment



Date:2006-01-18 20:46
Subject:My recent media consumption
Security:Public

I'd love to hear if you've read any of these. Also, book, article, and movie recommendations are most welcome. (This is my little "Collaborative Filtering" experiment.)

Books

Currently Reading

Imminently reading

Recently read (and ratings out of 5)

Magazines

Blogs

Movies

  • The Squid and the Whale. 5.
  • Match Point. 5.
  • House of Sand and Fog. This movie made me angry.

8 comments | post a comment



Date:2006-01-12 01:26
Subject:Spot the insidious bug.
Security:Public

So I wanted to write map, except that it would silently ignore any exceptions thrown and omit them from the list. Now, in SML I would have written something like this:

fun map_exception f nil = nil
  | map_exception f (x::xs) = ((f x :: map_exception f xs) handle _ => map_exception f xs)

But I needed to do it in OCaml:
let rec map_exception f l = match l with
  | [] -> []
  | x::xs -> try f x :: map_exception f xs
             with _ -> map_exception f xs

But there is this insidious difference between these two functions that really screwed me over. See if you can spot it before reading on...

Read more...Collapse )

12 comments | post a comment



Date:2005-12-14 23:09
Subject:punt
Security:Public

Poll: Are you familiar with these usages of "punt"?

"No way to know what the right form to dump the graph in is - we'll punt that for now."
"It's too hard to get the compiler to do that; let's punt to the run-time system."

Apparently, this usage of "punt" is technical jargon. FOLDOC and the Jargon File have this usage, but no standard English dictionary has it. Not even the Oxford English Dictionary.

It didn't even occur to me that this is jargon. Is that a bad sign?

9 comments | post a comment



Date:2005-12-04 15:46
Subject:Grammatically Incorrect
Security:Public

Does the Department of Veterans Affairs bother anybody else? Surely, it should be Veterans' Affairs (with the possessive apostrophe). Do we really have an entire department of government premised upon a grammatical error?

7 comments | post a comment



Date:2005-11-05 22:14
Subject:chinese food
Security:Public

ladycaterina and I had a 五更腸旺 at Columbia Cottage. Very tasty. Though I think ladycaterina didn't like it as much as I did. Offal doesn't appeal to her quite as much. ;)

五更腸旺

3 comments | post a comment



Date:2005-11-03 15:47
Subject:Why MIT needs a Class A
Security:Public

MIT owns a Class A block of 16777216 IP addresses -- that's a lot of IP addresses! I finally figured out why they need so many. Well, MIT assigns each dorm its own Class B block of 65536 IP addresses. People in the dorms pick their own static IP addresses, and they're on their honor to make sure that they get registered properly. Since there are so few users and so many IP addresses, the chance of conflict is very small.

Wow. When you have an obscene number of IP addresses, I guess this is what you do. No DHCP or anything.

2 comments | post a comment



Date:2005-10-24 02:59
Subject:The World is Flat
Security:Public

I'm reading The World Is Flat now after hearing favorable reviews about it in the context of Freaknomics (which is really good). But it's turning out to be a very different sort of book, and I don't like it as much.

Freakonomics is written by an economist (Levett) and a journalist (Dubner), and Levett's training as an economist really forces him to reach data-driven conclusions supported by hard numbers and analysis. He makes a relatively small number of conclusions, but each one is argued solidly and backed by hard data.

The World Is Flat is written by a journalist (Friedman), and he goes for the sky. He wants to explain the causes, motivations, results, and policy implications of globalization. Oh, boy. The consequence is that his claims are poorly substantiated. He goes through "Ten Forces that Flattened the World," each one backed by anecdotal evidence accumulated from personal testimonials. The incredibly broad scope of his claims just exacerbates the weakness of his evidence. Moreover, he is wrong about certain technical facets of software development and open source development; I understand that he is a journalist, not a programmer, but it still contributes to my skepticism of his broader claims.

I can accept his broad argument that some of these forces contributed to globalization, but that's because these obvious forces are, well, obvious -- the end of the Cold War, the pervasiveness of the internet, outsourcing, and global supply chains. On the other hand, the nonobvious forces, where he might have taught me something new, are just inadequately supported -- open source, portable/wireless technology, and Y2K (specifically, bringing India the initial IT business it needed to establish its credibility). Friedman fails to make a solid case that these forces contributed substantially to globalization.

After Freakonomics, I felt that I had learned some new facts. After reading "Ten Forces that Flattened the World", I felt that I had learned new hypotheses --- but very little that I could actually stand on.

On a positive note, Friedman does have some good stories. Walmart's supply chain, Dell's supply chain, UPS's new "in-sourcing" business, and Aramex (the Arab delivery service). Also, did you know that The Harvard Crimson digitized its archives by having a company in Oklahoma scan them and then having a Cambodian nonprofit type them in?

Friedman also gives some policy recommendations about globalization; I'll write some more about that later.

1 comment | post a comment



Date:2005-10-01 19:21
Subject:Last chapter of Like Water For Chocolate
Security:Public

So I reread Like Water For Chocolate today (which is a gorgeous book in the Spanish tradition of magical realism, if you haven't read it). I've always been a bit puzzled by the last chapter with the wedding and who's getting married to whom; since I had some free time today, I decided to finally figure out what's going on. I reread it a few times and finally figured it out.

SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS SPOILERS.

The setup is that Pedro and Tita have a long-forbidden passionate love, because Pedro is married to Tita's sister Rosaura. John also loves Tita romantically, but in a more calm and peaceful (maybe British) manner --- not platonically, but John doesn't light Tita's matches the way that Pedro does, as the narrator would say. At the end of the last chapter, we are left with a cliffhanger --- Tita has to decide whether she wants to marry John. We also find out that Rosaura dies, so Pedro and Tita can love openly now. Then, at the opening of this chapter, we discover that John's son Alex and Pedro/Tita's daughter Esperanza are engaged.

So whose wedding is this? Pedro and Tita? John and Tita? It turns out that the marriage is between Alex and Esperanza, but the confusion regarding who's marrying whom turns out to have meaning. I didn't appreciate it initially (and attributed the confusion to just poor reading on my part or poor writing on the author's part), but the chapter is structured very subtlely and very cleverly to establish that confusion and make the reader understand all that this wedding represents.

The beginning of the chapter suggests that John and Tita are getting married. "[The wedding] had a special significance for [Tita]. For John too. He was so happy that he had been one of her most enthusiastic helpers..." (230). Most suggestively:

Getting ready for bed, [John] was filled with intense emotion. In a few hours he would be closer to Tita, and that gave him enormous satisfaction.... Pedro, on the other hand, could not get to sleep. A terrible jealousy gnawed at his entrails. He didn't care at all for the idea of going to the wedding and having to endure seeing Tita together with John."
Getting more and more jealous, Pedro is about to go smash John's face in, when he stops at the door, thinking, "he couldn't contribute to any vicious talk about how Tita's brother-in-law had gotten in a fight with John the day before the wedding."

But then the end of the chapter suggests that Pedro and Tita are getting married. Pedro asks the orchestra to play the waltz "The Eyes of Youth," so that Tita and Pedro can dance to the song that first brought them together, so many years ago. As they danced, John "followed them with his eyes, with a look full of affection and just a hint of resignation," seemingly resigned to his fate that Tita loves Pedro --- but just a hint, because he really just wants Tita to be happy, and he knows that Pedro will bring her that happiness.

But then, Pedro asks Tita to marry him, and we know that this cannot be their wedding. (Though the careless reader (like me) takes this to be a last-minute equivocation on the part of the bride, and I expected a last-minute switching of one groom for another.)

It turns out that Alex and Esperanza are getting married. The narrator never says so outright, and lets the reader figure this out, which really contributes to the richness of this chapter. Although only Alex and Esperanza are nominally getting married, this wedding is just as much about Pedro, Tita, and John. Tita and John are now related by marriage and parents-in-law; Pedro and Tita are now free to love as they could not before. The confusion about who is getting married is intentional, because in a sense, they are all getting married: Alex and Esperanza, Tita and John, and Pedro and Tita. The chapter takes us through all the different ways that the marriage brings them together, in a subtle and rich way.

Almost too subtle, perhaps. So subtle it was almost lost on me. ;)

post a comment



Date:2005-05-03 23:03
Subject:Fear-to-Peer: A Debate about File-Sharing on Campus
Security:Public

I'm organizing this debate about filesharing at Princeton on Friday afternoon, and I thought I'd let you all know. It'll be an exciting debate; come out!

PLEASE NOTE NEW EARLIER TIME AND PLACE! FRIEND 101, 3:30 PM.

Fear-to-Peer: A Debate about File-Sharing on Campus

Date: Friday, May 6
Time: 3:30pm (NEW EARLIER TIME! *****)
Venue: Friend 101 (NEW PLACE! *****)
Website: http://www.princeton.edu/~dpeng/

Dean Garfield, Vice President and Director of Legal Affairs of the Motion Picture Association of America (MPAA), and Wendy Seltzer, Intellectual Property Attorney for the Electronic Frontier Foundation (EFF), will square off in a public debate entitled "Fear-to-Peer: A Debate about File-Sharing on Campus," on Friday, May 6 at 3:30pm in Friend 101.

Both the Recording Industry Association of America (RIAA) and the MPAA have recently directed numerous copyright infringement lawsuits against students at universities across the United States, including here at Princeton. The panelists will focus on the efficacy of these lawsuits and examine how universities should address campus file-sharing in this ongoing peer-to-peer controversy.

The debate will be moderated by Professor Edward W. Felten of the Department of Computer Science.

This event is sponsored by the School of Engineering and Applied Science, the Woodrow Wilson School of Public and International Affairs, and the Department of Computer Science. It is free and open to the public.

3 comments | post a comment



Date:2005-04-03 23:24
Subject:
Security:Public



Isn't she cute? Cathy, that is, not the octopus. :)

(Sakura Express, March 29, 2005.)

1 comment | post a comment



Date:2005-03-16 13:50
Subject:Perl, functional programming, and lexical closures
Security:Public

Much to my surprise, Norman Ramsey pointed out to me yesterday that Perl has had higher-order functions and lexical closures since 1994 (Perl5). Inspired by "Perl contains the λ-calculus," I had to try this out. So SML allows you to write code to sum a list of integers like this:

fun fold f v nil = v
  | fold f v (x::xs) = f(x,fold f v xs)

val plus = fn (a,b) => a + b

val sumlist = fold plus 0

val sum = sumlist([5,6,7,8,9])

and I set out to write the same code in Perl. Here it is, in Perl.Collapse )

Observations: My SML code is much longer than it needs to be; it could have been written simply as "foldl op+ 0 [5,6,7,8,9]". Even without the long list of numbers, Perl is much longer. Moreover, it was also significantly more difficult to debug. Without SML's static type checking, Perl would do things like cast a function pointer into an integer and feed it to the plus function.

So even if Perl could technically support functional programming, I highly recommend against it.

9 comments | post a comment



Date:2004-10-28 11:35
Subject:mmm
Security:Public

  1. 380 tons of conventional explosives go missing in Iraq.
  2. Kerry accuses Bush of letting the conventional explosives go missing on his watch.
  3. Bush responds that it is unclear whether conventional explosives disappeared before or after the American invasion.
  4. Bush accuses Kerry: "A political candidate who jumps to conclusions without knowing the facts is not a person you want as your commander in chief."
Oh, the irony. Wouldn't want one of those as our Commander in Chief, eh? So... where are the WMD again?
Iraq explosives kindle attacks by Bush, Kerry.

Oh, Dashboard Confessional put out a really great CD.

Vote Libertarian.

2 comments | post a comment



Date:2004-10-14 02:54
Subject:don't think of an elephant
Security:Public

don't think of an elephant.

Interesting read. Why can't Republicans and Democrats see eye to eye? Why do they always seem to talk past each other? Answer: Republicans and democrats start from fundamentally different concepts of government, either the strict father or the nurturing parent. It is left as an exercise to the reader to determine which is which.

This chapter gives a really lucid conceptual framework for understanding how Republicans on the one hand promote economic freedom and personal fiscal responsibility, while on the other hand heavily regulate moral issues like pornography or marriage. It's because it's all morality. It's the morally right thing to do to pursue your own economic self-interest, to take responsibility for your own financial well-being, and to provide for your family and raise your kids. Just as they say that pornography, drugs, prostitution, and abortion are morally wrong.

Take a look: don't think of an elephant.

4 comments | post a comment



Date:2004-09-10 23:32
Subject:Hands Down -- Dashboard Confessional
Security:Public

Breathe in for luck,
breathe in so deep,
this air is blessed,
you share with me.
This night is wild,
so calm and dull,
these hearts they race,
from self control.
Your legs are smooth,
as they graze mine,
we're doing fine,
we're doing nothing at all.

My hopes are so high,
that your kiss might kill me.
So won't you kill me,
so I die happy.
My heart is yours to fill or burst,
to break or bury,
or wear as jewelry,
which ever you prefer.

The words are hushed lets not get busted;
just lay entwined here, undiscovered.
Safe in here from all the stupid questions.
"hey did you get some?"
Man, that is so dumb.
Stay quiet, stay near, stay close they can't hear...
so we can get some.

My hopes are so high that your kiss might kill me.
So won't you kill me, so I die happy.
My heart is yours to fill or burst,
to break or bury, or wear as jewelery,
which ever you prefer.

Hands down this is the best day I can ever remember,
I'll always remember the sound of the stereo,
the dim of the soft lights,
the scent of your hair that you twirled in your fingers
and the time on the clock when we realized it's so late
and this walk that we shared together.
The streets were wet
and the gate was locked so I jumped it,
and I let you in.
And you stood at your door with your hands on my waist
and you kissed me like you meant it.
And I knew that you meant it,
that you meant it,
that you meant it,
and I knew,
that you meant it,
that you meant it.

1 comment | post a comment



Date:2003-12-27 12:53
Subject:intriguing
Security:Public

Marketing Strategy Splits the Sacred and Secular

3 comments | post a comment


browse
my journal