Posts tagged life
By grace, I ended up find a job much more quickly than I expected. While staring into the emptiness of my summer, I received an email from the math department recruiting instructors and teaching assistants for the Center for Talented Youth (CTY). I had some reservations about applying for a position that would require me to pack my bags and travel 7 hours the very next day, but besides the burden of making last minute travel plans, I didn't have any other conflicts. Luckily, I'm that guy that never has any plans, so disappearing for 3 weeks posed no problems for me at all. Thus, I went ahead and applied. I got the job as a teaching assistant for a cryptology course. I accepted the offer, which turned out to be a great decision.
Traveling to Saratoga by Amtrak proved to be rather uneventful. Besides some trouble with my ID card, orientation went off without a hitch. I really ended up falling in love with the town of Saratoga and Skidmore College. I have no idea about the academics at Skidmore, but let's talk about the gym. For a small college of less than 3,000 students, they have 4 platforms. That's double the number that the University of Pennsylvania has despite having nearly 25,000 students. Moreover, while the dining hall wasn't great, it was more than adequate for my needs. With an all-you-can-eat buffet 3 times per day, gains were made. In Saratoga, I finally achieved my goal of cleaning 2 plates (225 pounds). It did come at the cost of gaining 6 pounds, so I probably need to cut a bit now that I'm back in Philly.
Lake George at then end of our hike
Now, on the instructional side, being a teaching assistant wasn't too much work. There were 7 hours of class per day, 5 days per week. I had to attend all those hours except for 2 per week, so it ended up being 33 hours per week in the classroom. For a teaching assistant, most of that time is spent taking notes on classroom activity and assisting students with worksheets and projects. For 8 of the hours in the evening, I had to manage the classroom by myself, but most of that time was monitoring activities. I did end up giving two lectures, which provided a nice change of pace.
Now, the students in my class ranged in age from 12 to 16. Classroom management and discipline was easily the most difficult part. Eventually, I just learned to tolerate some amount of noise and distraction as long as the students got their work done. Another difficulty was scaling lectures to the wide range of abilities. I usually try to present the math in a pretty general manner, which means a lot of variables and symbols. In this way, once you solve a problem once, you've solved them all. This made some of the younger students uncomfortable, however. I suppose from their perspective math is all about numbers. I did provide numerical examples, but I guess that I could have focused more on this.
In the end, I actually learned a lot, too. I've already mentioned a couple things about classroom management and pedagogy, but some of the material was actually new to me. In particular, I found it especially cool that the cracking of the Enigma involves a clever application of the symmetric group from abstract algebra.
Another view of Lake George
Of course, the best part of this little adventure was the people. Everyone that I met was really interesting. People came from a variety of backgrounds, but we were all united by the camaraderie of teaching together. I had a ton of fun going to bars, hiking, playing tennis and soccer, and sharing meals with everyone. Thanks to all the staff for making it a great time.
Finally, the location of the camp made it ideal for stopping by and seeing some old friends in NYC on the way back. We were able to hike the Kaaterskill Falls and go for a little swim. NYC ended up just being one long Pokéwalk thanks to Pokémon Go.
By the way, my days in Philly are numbered, and it's likely I won't be making too many trips back here from Seattle. Therefore, you should reach out to me if you want to get together before I leave.
After a long break from reading, I started with something easy and fun: Alice in Wonderland and Alice Through the Looking Glass by Lewis Carroll. I can't say the book has much purpose or forces one to ponder the human condition, but it is beautifully written. Through the reading, one really does feel the sense of wonder that a child feels as he or she is exploring the world around them. I highly recommend this book for anyone who feels like life is losing its luster. Despite my apathy about a lot of life, adventuring with Alice always made me smile.
Alice's willingness to accept the impossible leads her to the most interesting situations. Talking animals and flowers or constantly growing and shrinking confuses her, but she sees life as a puzzle and figures out how to control the growing and shrinking. The other playful part about the novel are all the puns. Here are some of my favorite are
When talking about school lessons:
'And how many hours a day did you do lessons?' said Alice, in a hurry to change the subject.
'Ten hours the first day,' said the Mock Turtle: 'nine the next, and so on.'
'What a curious plan!' exclaimed Alice.
'That's the reason they're called lessons,' the Gryphon remarked: 'because they lessen from day to day.'
This was quite a new idea to Alice, and she thought it over a little before she made her next remark. 'Then the eleventh day must have been a holiday?'
'Of course it was,' said the Mock Turtle.
'And how did you manage on the twelfth?' Alice went on eagerly.
'That's enough about lessons,' the Gryphon interrupted in a very decided tone: 'tell her something about the games now.'
I especially like how the reader is left to figure out the twelfth day.
- On time in music:
'Of course you don't!' the Hatter said, tossing his head contemptuously. 'I dare say you never even spoke to Time!'
'Perhaps not,' Alice cautiously replied: 'but I know I have to beat time when I learn music.'
'Ah! that accounts for it,' said the Hatter. 'He won't stand beating. Now, if you only kept on good terms with him, he'd do almost anything you liked with the clock. For instance, suppose it were nine o'clock in the morning, just time to begin lessons: you'd only have to whisper a hint to Time, and round goes the clock in a twinkling! Half-past one, time for dinner!'
On flower beds in Alice Through the Looking Glass:
'That's right!' said the Tiger-lily. 'The daisies are worst of all. When one speaks, they all begin together, and it's enough to make one wither to hear the way they go on!'
'How is it you can all talk so nicely?' Alice said, hoping to get it into a better temper by a compliment. 'I've been in many gardens before, but none of the flowers could talk.'
'Put your hand down, and feel the ground,' said the Tiger-lily. 'Then you'll know why.' Alice did so. 'It's very hard,' she said, 'but I don't see what that has to do with it.'
'In most gardens,' the Tiger-lily said, 'they make the beds too soft—so that the flowers are always asleep.'
This sounded a very good reason, and Alice was quite pleased to know it. 'I never thought of that before!' she said.
I love this type of silly reasoning.
All in all, I had a lot of fun reading Alice if for nothing else to rekindle that sense of child-like wonder and faith in me.
After a long hiatus from baking, I made these Lemon Bars with Mindy Au.
They turned out really well. You actually need all 6 lemons that the recipe calls for. Moreover, 300 grams of sugar is excessive. We found that around 200 grams produced a very tart lemon bar that I personally prefer. Mindy handled the shortbread crust that came out very well. Making the curd and watching it thicken was quite magical. Some things in this world still inspire wonder within me after all. It's definitely something that I would make again.
As for life, I've finished up my degree at Penn. Now, I'm unemployed and looking for work. Everything is up in the air at this point. Who knows where I'll end up? Lately, I've felt that I don't have too much control over my life, and it call comes down to chance.
I am 27 today. Since my birthday falls at the end of the semester after everyone goes home, I hardly ever celebrate it. But even if I were to celebrate it, just what would I be celebrating?
Obstensibly, my 20s have been an unrelenting string of failures of unmet expectations. Just as the road to success zigs and zags, on the fall down, one catches glimmers of hope and leaves opportunities uncapitalized. It's hard to not let all the rejections from jobs, graduate schools, and girls get to you. People say, "it's not you, it's them," but then, is it everybody? Or some say, just be confident and optimistic, but surely, that confidence and optimism must have some basis in reality. I've mostly put all these rejections behind me, but I would be lying if I don't sometimes wake up in the middle of a night in a panic and reflect on these things.
If someone told my college or high school self, that this paradise was awaiting me in my 20s, I'm not sure if I would have kept on living. The promise of things getting better was often what kept me going. Now, I know that I sound like an entitled millenial, dare I say, a Bernie Sanders supporter (I donated \$5 to his campaign), griping, but this post ends in a happy note.
Despite the disappointment and the unfulfilled promise of something better, I actually find myself happier and more full of joy than I've ever been. While I'm not exactly the most social person, I have managed to cultivate a few strong friendships. Through their love and my family's, I've caught a glimpse of God's love, and that has been enough to sustain me. In light of recent tragedies, I've realized that these relationships are so much more meaningful than my desire for an interesting career and a beautiful marriage. And if this is what it has taken to come to this realization, I'm grateful to have suffered. And yes, I understand that calling my experiences suffering is a gross exaggeration to what real suffering is, but I hope that the reader can understand how one can become enveloped in his or her own thoughts and lose perspective.
Perhaps, some might say that this all just a euphemism for settling for less or an act of post hoc rationalization. Again, I would be lying if I don't acknowledge that at times, I still lapse into states of utter despair. I expect my 30s will be even more difficult, and that's okay if I never achieve that sense of worldly security that I desire. Knowing that I am loved, I can not only manage and scrape by but also find joy.
In any case, in the title picture, you can see some homemade oreos that I made a while back. They don't really have to do with anything that I just wrote. However, Michael Vo made them into my brother's initials. Without his and God's love, I just don't know where I would be now.
I just finished Lolita by Vladimir Nabokov. I'm not too sure what to make of it. Given the subject matter, I was expecting something much more pornographic. In the novel, Humbert Humbert (H.H.) marries a widow and seduces her 12 year old daughter Lo, short for Lolita (well, he claims that she seduced him in that hotel). However, while the novel starts with some graphic details, the relations between Lo and H.H. aren't made too explicit.
The novel is rather artfully constructed with many literary allusions that went over my head. I say constructed because while it's not a fantasy novel, there are way too many coincidences with numbers and names and other impossible happenings for plot to resemble reality. For instance, throughout the novel, the spectre of Clare Quilty haunts the two at every turn and creates a sort of game between Quilty and H.H. Although it may be that the narrator H.H. is just crazy as he loses touch with reality several times and checks himself into a sanitarium. Perhaps, the biggest break from reality is when a character briefly rises from the dead at the end.
The novel can be read in many different ways and struggles for any clear interpretation or moral. One can see it a satirizing American culture as H.H. and Lolita commit debaucheries across the country on their road trip. What spoke most to me was how H.H. objectifies Lolita, yet he really does come to truly love her despite the large age gap. At first, it's clear that she is his sex toy, for recently after her mother dies, he ignores her crying every night as she falls asleep. While in some sense she did seduce him, he realizes that he's taking advantage of how young girls are bombarded with images of romance, and Lo is acting out a some "simulacron" of romance. During the time in Beardsley, the relationship becomes more prostitute-like as he often pays her in some way for her services.
But he does genuinely love her in the end, as seen in their last meeting between the two. In this love comes the understand of why she despises him more than Quilty in way, for Quilty "broke [her] heart," where as H.H. "merely broke [her] life." I'm not too sure yet why this quote struck me so much. There's some sense that my own ideas of love are somewhat warped, and I may have broken someone elses life given the chance. And so, true love is taking a step back and knowing your "love" isn't the best thing for other person.
My good roommate Masato made donuts and left behind a bunch of dough (recipe). Clearly, I decided to turn the dough into cinnamon rolls!
It's pretty easy. Just roll out the dough and cover it with a cinnamon sugar-butter paste. The recipe for my paste is:
- 1/2 cup granulated sugar
- 1/2 cup brown sugar
- 3 tablespoons ground cinnamon
- 1/2 heaping teaspoon of nutmeg
- 1/2 heaping teaspoon of cloves
- 1/2 cup (1 stick) of unsalted butter
Just cream the butter and sugar together. Roll the dough so it's about 9 inches in height and 18 inches in width. Cover the dough with the paste. Cut into 2 inch vertical strips to give you 9 rolls. Roll them up and dip them in the remaining paste. Bake at 350 degrees Fahrenheit for 20 minutes. Serve with icing. I used this Ermine Icing. Yay!
In other news, life is okay. I just got back from visiting Duke, where I interviewed for the their Statistics PhD program. I thought it went well, but I'm often wrong about these things. In any case, it was great catching up with some old Duke friends. It was a particularly nice surprise to run into a friend from Boston.
The fact that I've been rejected at 2 schools so far gives me some anxiety, but I trust that things will turn all right no matter what happens.
When stuck inside because of the snow, what else is there to do but bake and code? I made these brownies here. They are amazingly moist, but I'll probably cut down on the sugar next time I make them.
On the algorithms side, I finally got to the Platinum Division on the USA Computing Olympiad. It's primarily for high school students, but I find it fun to participate anyway.
One of the competition's problems employs clever usage of binary search that I want to write about. Basically, there are times when the solution is very hard to compute, but it is not too costly to verify. If the solution is numerical and bounded, we can guess solutions with binary search. I've actually been quite familiar with this strategy for a year now, but somehow I missed it in this particular problem. Here, we use a two-dimensional binary search. Thankfully, I got enough points to get promoted to the next division anyway, anyway.
Angry Cows
Here's the problem statement:
Bessie the cow has designed what she thinks will be the next big hit video game: "Angry Cows". The premise, which she believes is completely original, is that the player shoots a cow with a slingshot into a one-dimensional scene consisting of a set of hay bales located at various points on a number line; the cow lands with sufficient force to detonate the hay bales in close proximity to her landing site, which in turn might set of a chain reaction that causes additional hay bales to explode. The goal is to use a single cow to start a chain reaction that detonates all the hay bales. There are $N$ hay bales located at distinct integer positions $x_1,x_2,\ldots,x_N$ on the number line. If a cow is launched with power $R$ landing at position $x$, this will causes a blast of "radius $R$", engulfing all hay bales within the range $x−R \ldots x+R$. These hay bales then themselves explode (all simultaneously), each with a blast radius of $R−1$. Any not-yet-exploded bales caught in these blasts then all explode (all simultaneously) with blast radius $R−2$, and so on.
Please determine the minimum amount of power $R$ with which a single cow may be launched so that, if it lands at an appropriate location, it will cause subsequent detonation of every single hay bale in the scene.
INPUT FORMAT (file angry.in):
The first line of input contains $R$ ($2 \leq N \leq 50,000$). The remaining $N$ lines all contain integers $x_1 \ldots x_N$ (each in the range $0 \ldots 1,000,000,000$).
OUTPUT FORMAT (file angry.out):
Please output the minimum power $R$ with which a cow must be launched in order to detonate all the hay bales. Answers should be rounded and printed to exactly $1$ decimal point.
So, if we assume the hay bales are sorted $x_1 \leq \cdots \leq x_N$. The minimum blast radius must be at most $(x_N - x_1)/2$ since we can just launch such a cow at the midpoint and destroy all the hay bales without the chain reaction. It's also worth noting that if the optimal blast radius is $R^*,$ then $2R^* \in \mathbb{Z}$, that is, twice the optimal blast radius is an integer. Since all the hay bales are located at integer coordinates, adding less than $0.5$ to the radius will never encompass another hay bale. Finally, the last observation is that we should fire the cow so that the very left of the blast lines up exactly with a hay bale since we would not gain anything by having the hay bale strictly inside the blast radius.
Let $L$ be the index of the leftmost hay bale hit by the initial blast. Thus, we could brute force by trying all $2R^* \in \{0,1,\ldots,x_N-x_1\}$ and $L \in \{1,2,\ldots,N\}$. To check if such values work, we can simulate the chain reaction which takes $O(N)$ time. Thus, brute force would take $O\left(N^2(x_N - x_1)\right)$ time. This is where binary search comes in.
During the contest, it was obvious to me that we should do a binary search to find $2R^*$ considering that $x_N - x_1$ could be as large as $10^9$. However, this is not fast enough, as that only gets us $O\left(N^2\log(x_N-x_1)\right)$ time, and $N^2$ can be as large as $2.5 \times 10^9$. After sleeping on it, I made the key insight that we can binary search on the index of the leftmost hay bale, too, so now we have $O\left(N\log(N)\log(x_N-x_1)\right)$ time, which is adequate.
To make this explicit, here's the code:
import java.io.*;
import java.util.*;
public class angry {
/* check that all the hay bales to the left of idx explode
* if we throw cow of power T/2 at hayBales[idx] + T/2
*/
public static boolean leftExplodes(int idx, int T, int[] hayBales) {
double currentFloor = hayBales[idx];
double currentR = T/2.0;
int left; // leftmost exploded bale
for (left = idx; left >= 0 && hayBales[left] >= currentFloor; --left) {
if (left == 0 || hayBales[left - 1] >= currentFloor) continue;
currentR -= 1.0;
currentFloor = hayBales[left] - currentR;
}
return left == -1;
}
public static boolean isDiameterPossible(int T, int[] hayBales) {
int N = hayBales.length;
int leftMin = 0; // inclusive
int leftMax = N; // exclusive
int leftIdx = leftMin + (leftMax - leftMin)/2;
while (leftMin < leftMax) { // find smallest left such that this doesn't work
if (leftExplodes(leftIdx, T, hayBales)) {
leftMin = leftIdx + 1;
} else {
leftMax = leftIdx;
}
leftIdx = leftMin + (leftMax - leftMin)/2;
}
--leftIdx; // this works
// now check that the right explodes
double currentCeiling = hayBales[leftIdx] + T;
double currentR = T/2.0;
int right;
for (right = leftIdx; right < N && hayBales[right] <= currentCeiling; ++right) {
if (right == N - 1 || hayBales[right + 1] <= currentCeiling) continue;
currentR -= 1.0;
currentCeiling = hayBales[right] + currentR;
}
return right == N;
}
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new FileReader("angry.in"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("angry.out")));
int N = Integer.parseInt(in.readLine());
int[] hayBales = new int[N];
for (int n = 0; n < N; ++n) hayBales[n] = Integer.parseInt(in.readLine());
Arrays.sort(hayBales);
// search for T = 2R
int minT = 0; int maxT = hayBales[N - 1] - hayBales[0];
int T = minT + (maxT - minT)/2;
while (minT < maxT) { // find smallest T that works
if (isDiameterPossible(T, hayBales)) {
maxT = T;
} else {
minT = T + 1;
}
T = minT + (maxT - minT)/2;
}
out.printf("%.1f\n", T/2.0);
in.close();
out.close();
}
}
After finishing Far From the Madding Crowd, I started reading Middlemarch by George Eliot. This is one of the first books that I've read by a female author. Despite its length at over 800 pages, I found taking nearly 6 months to finish worthwhile.
Middlemarch details the happenings of a small provincial town, primarily focusing on the lives of Dorthea, a serious young woman committed to devoting her life to a higher cause, and Dr. Lydgate, a French-educated doctor with grand ambitions of making a profound medical discovery.
Clearly, both Dorthea and Dr. Lydgate have noble intentions. Throughout the novel, they are proven to be of good character, too. One of the novel's themes is how the "imperfect social state" can make carrying out such noble intentions impossible. For Dorthea, the imperfect social state is the second-class role of women in society along with her naive marriage to the older Mr. Casubon. Dr. Lydgate confronts a town in upheaval, mistrusting of change and his new medical ideas. His somewhat hidebound view of marriage traps him in a marriage with the spendthrift Rosamond.
One very interesting aspect of this novel is that both Dorthea and Rosamond are married without children. Having acquired husbands, being a memeber of the gentry, and not having children to raise, both characters struggle with ennui and what exactly can a women do. Many of the male characters are dismissive of women's capacity for serious intellectual endeavors and see them only as entertainment. In the end, I find the novel to be ambivalent on a woman's role.
On one hand, Dorthea's impulsive, self-sacrificing nature leads to her disastrous first marriage with Mr. Casubon, but Dorthea's second self-sacrifice ends in happiness. Dorthea gives up her grand ideas of improving the lot of the poor with her fortune, yet the narrator notes that the "growing good of the world is partly dependent on unhistoric acts" such as simply being a wife and mother. As for Rosamond, we should despise her for secretly disobeying her husband's wishes and using her beauty to manipulate, but yet we are made to pity her because we realize these are the only mechanisms of agency that she has. Perhaps, the message here is simply that women should have more freedom to choose their life, whether it be as a wife or fighting for social reform.
Given my perpetual loneliness, I found the romance and marriages of the novel most interesting. Mr. Farebrother's advice to Fred Vincy, "Men outlive their love, but they don't outlive the consequences of their recklessness," I found all too humorous as I'm still living with the consequences of my recklessness. While I often yearn for the seemingly simple, intentional nature of Victorian courtship, both Dorthea's first marriage and Dr. Lydgate's marriage to Rosamond lead to unhappiness. Caleb Garth perhaps says it best:
Young folks may get fond of each other before they know what life is, and they may think it all holiday if they can only get together; but it soon turns into working day,
which alludes to same idea that occurred in Far from the Madding Crowd. Dates are often rather artificial environments where we only see one side of the person. We associate in pleasure away from the true hardships of life. I have often thought that this is why couples from The Bachelor and The Bachelorette never last.
I suppose that there is something to be said for these so-called "organic" relationships that spring up by chance because you and the other person just naturally have similar interests or friends. When I was watching Master of None, I think about how Rachel and Dev get into a relationship. It's a near year long process of chance encounters: one night stand, run into each other somewhere, go on a date, hook up, run into each other again, etc. Because I never could stand the ambiguity of intentions in this type of relationship, I often envied how simple the process was in Victorian novels, where a guy would simply visit her house a few times, maybe talk to her father, and then propose. I have to admit, though, that perhaps these "organic" type of relationships may lead to more "similarity of pursuits" that binds a couple more strongly since if you're spending more time together by chance it's very likely that you're similar people. Perhaps this is why online dating fails for so many.
Anyway, I'm just rambling now. The best is probably a compromise between the two. Relationships can't be forced, so there needs to be certain amount of chemistry. But in my limited experience, I do think people are putting a little too much faith in chance, for they don't want to be seen as trying too hard. Both men and women being more honest and intentional would probably save a lot of lonely souls out there.
Over Halloween weekend, my roommate Masato and I decided to have another one of our cook offs and made donuts together. He made these Fluffy Yeasted Donuts, and I made these Apple Cider Doughnuts. I thought mine came out pretty well, but it was pretty much universally agreed upon that Masato's came out better.
I usually eat mostly Paleo, so working with flour and dough was a very novel experience. In this particular recipe, the dough was very sticky, so it required sprinkling a lot of extra flour when rolling and cutting the dough (thanks Masato for the pro tip!). In the end, I thought that the flavor was great, but the donuts were pretty dense. I really enjoyed the fluffiness of Masato's donuts more. Some future diabetics said that it could be sweeter, but that's just their opinion.
As for life, things are going pretty well. I'm finally no longer sick, so I've gotten some good workouts in. Sprinting this morning with Michael Vo was death. I lost every set except the first, and I only won probably because he got confused. Reapplying to graduate school is definitely stressful, but I'm learning to cope. Lately, I haven't had time to code too much, but hopefully I'll get back into that soon.
On a suggestion, I decided to procrastinate and make fried macaroni and cheese balls. There'e pretty easy to make. Make some macaroni and cheese. Refrigerate it. Pack them into balls, triple bread them, and then, fry them in a wok. Serve with marinara sauce.
Some suggestions from my brother:
- Make the cheese more liquid so it oozes cheese
- Use more seasoning in the breading
As for life, I'm currently a little sick and getting lots of nose bleeds. I probably don't sleep enough and don't wear enough clothing for this cold October weather. Other than these physical ailments, I'm learning to enjoy life despite the anxiety of not having the faintest idea of where I will be next year. I find my classes pretty interesting for one. I'm either becoming more apathetic or learning to let things happen.
One of my favorite characters in literature is Sydney Carton from Charles Dickens' A Tale of Two Cities because his self-sacrificing, unselfish love for Lucie indulges my romantic and idealistic nature. There's always the danger of become too like him, though. This quote best describes his predicament:
Sadly, sadly, the sun rose; it rose upon no sadder sight than the man of good abilities and good emotions, incapable of their directed exercise, incapable of his own help and his own happiness, sensible of the blight on him, and resigning himself to let it eat him away.