Feeds:
Posts
Comments

Archive for December, 2011

Hey everyone,

Let me introduce you to a couple of projects that I began working on over the last week – a memory bank written in LaTeX and a Linux server hosting RStudio for my predictive modeling projects. I started working on these tasks in order to give myself challenges that would develop my skills, because I had noticed that after I graduated college, the sudden scarcity of drilling, testing, and intellectually stimulating tasks other than actuarial exams or projects at work led to what I felt was a lack of cognitive development, creative activity, and perhaps even a decline in my working memory. This doesn’t mean that I hadn’t done anything in the meantime, however. Over the past year I’ve continued my studies at a pace of around 14-20 hours per week reading things that I found interesting. For instance, I’ve been reading a book on European History because I never got the chance to take a course on it in high school or college. I think over the past year I may have studied more hours than I had in any year of my life. During exam time, I studied a year’s worth of material on Life Contingencies in a span of 3 months. However, I’ve realized that studying can only get you so far. I’ve heard countless times that you have to put down the books if you want to get good at something – you cannot, for instance, learn to ride a bike by reading a book on riding a bike – you actually have to get yourself on a bicycle, ride, fall down, learn from your mistakes, and try again. Thus, I decided to begin a series of projects in order to actively learn by creating. In this way, I hope to keep myself sharp, motivated, and most importantly, intellectually fulfilled.

Project 1: Eternal Memory Bank

I haven’t forgotten about \LaTeX, the markup language that I set about learning around this time last year, though I have forgotten much of the syntax I need to typeset mathematical notation. Unfortunately, using LaTeX via WordPress, as I had done last year, presents some significant drawbacks due to syntactical differences and the fact that I can’t develop my typesetting skills further if I only use LaTeX within my blog. Thus, I’ve decided to construct a memory bank as a complete LaTeX document that you can print out as a book. I first had to start out by learning all the things I forgot over the last year by reading Kopka and Daly’s Guide to LaTeX, at an extremely slow pace – sometimes as slow as 5 pages per minute – though fortunately, it does has some very good exercises. For instance, the following table took me more than an hour to produce:

An excercise in constructing arrays and adjusting formulas

By means of the following input:

\documentclass{article}
\newcommand{\D}{\displaystyle}
\newcommand{\bm}{\boldmath}
\newcommand{\ba}{\begin{array}}
\newcommand{\ea}{\end{array}}
\begin{document}
\[ \ba{|c|c|c|} \hline
\multicolumn{3}{|c|}{\rule[-2mm]{0mm}{6mm}\mbox{Equations for the tangential plane and surface normal}} \\ \hline
\mbox{Equation} & & \\
\mbox{for the} & \mbox{ Tangential plane} & \mbox{Surface normal} \\
\mbox{surface} & & \\ \hline
F(x,y,z)=0 &\ba[t]{r@{{}+{}}l}
\D{\frac{\partial F}{\partial x}}(X-x) & \rule[0mm]{0mm}{8mm} \D{\frac{\partial F}{\partial y}}(Y-y) \\[4mm]
& \D{\frac{\partial F}{\partial z}}(Z-z)=0
\ea & \ba[t]{r@{{}={}}c@{{}={}}l}
\D{\frac{X-x}{\D{\frac{\partial F}{\partial x}}}} & \D{\frac{Y-y}{\D{\frac{\partial F}{\partial y}}}} & \D{\frac{Z-z}{\D{\frac{\partial F}{\partial z}}}}
\ea \\[13mm]
z=f(x,y) & Z-z =p(X-x)+q(Y-y) &\D{\frac{X-x}{p}=\frac{Y-y}{q} = \frac{Z-z}{-1}} \\[4mm]
\ba{c}
x=x(u,v)\\
y=y(u,v)\\
z=z(u,v)\\ \ea &
\left|\ba{ccc}
X-x & Y-y & Z-z\\
\D{\frac{\partial x}{\partial u}} & \D{\frac{\partial y}{\partial u}} & \D{\frac{\partial z}{\partial u}}\\[3mm]
\D{\frac{\partial x}{\partial v}} & \D{\frac{\partial y}{\partial v}} & \D{\frac{\partial z}{\partial v}}\\ \ea \right| = 0 &
\ba{r@{{}={}}l}
\D{\frac{X-x}{\left|\ba{cc}
\frac{\partial y}{\partial z} & \frac{\partial z}{\partial u}\\[1mm]
\frac{\partial y}{\partial v} & \frac{\partial z}{\partial v} \ea \right|}} &
\D{\frac{Y-y}{\left|\ba{cc}
\frac{\partial z}{\partial u} & \frac{\partial x}{\partial u}\\[1mm]
\frac{\partial z}{\partial v} & \frac{\partial x}{\partial v} \ea \right|}}\\[10mm]
& \D{\frac{Z-z}{\left|\ba{cc}
\frac{\partial x}{\partial u} & \frac{\partial y}{\partial u}\\[1mm]
\frac{\partial x}{\partial v} & \frac{\partial y}{\partial v} \\ \ea \right|}} \ea \\[15mm]
\rule[-5mm]{0mm}{0mm}\mbox{\boldmath{$r=r$}}(u,v) & \ba{r@{{}={}}l}
\mbox{\boldmath{$(R-r)(r_1\times r_2)$}} & 0\\
\mbox{or} \hfill \mbox{\boldmath{$(R-r)N$}} & 0\\ \ea & \ba{r@{{}+{}}l}
\mbox{\boldmath{$R=r$}} & \mbox{\boldmath{$\lambda(r_1\times r_2)$}} \\
\mbox{or \boldmath{$R=r$}} & \mbox{\boldmath{$\lambda N$}}\ea \\ \hline
\multicolumn{3}{|c|}{\rule[0mm]{0mm}{10mm}\parbox{116mm}{In this table, $x,y,z$ and $\mathbf{r}$ are the coordinates and the radius vector of a fixed point $M$ on the curve; $X,Y,Z,$ and $\mathbf{R}$ are the coordinates and radius vector of a point on the tangential plane or surface normal with reference to $M$; furthermore, $p =\frac{\partial z}{\partial x}, q=\frac{\partial z}{\partial y}$ and $\mathbf{r_1}=\mathbf{\frac{\partial r}{\partial \mathnormal{u}}, r_2=\frac{\partial r}{\partial \mathnormal{v}}}$.}}\\ \hline
\ea \]
\end{document}

As you can see, the code does not look pretty. Fortunately, on another go I believe I can reproduce the above table in about 15 minutes, and perhaps even faster on the third try.

Anyway, I began putting the pieces of my Eternal Memory Bank a couple weeks ago and spent the last couple of weeks putting what little I had together for this post. If you’ve taken a look at my Projects page, you can see that I’ve been learning College Algebra over the last few months – not because I don’t know algebra but because I felt that I needed to fill in a few gaps left behind by my inadequate high school education, and because I’ve forgotten a lot since then and I thought perhaps that I could get some new insight by revisiting an old subject. I decided to extract a few pieces of information that I really ought not to forget – and put them into this memory bank to commit to memory, forever. You can download the pdf from my SkyDrive here and the TeX file here.

An excerpt from the Preface:

“Hey everyone,

I’ve decided to construct an eternal memory bank, within which I’ve placed
select pieces of information that I’ve deemed important enough to commit to
memory, forever. This document serves as a visual representation of these
pieces in written form. I’ve undertaken this seemingly somewhat tedious and
arbitrary project to keep my memory in shape and because I’m sick and tired
of forgetting the formula to (a+b)^3 and having to either work out the expan-
sion every time it shows up (usally once in a blue moon for me) or look it up (I
usually work out the expansion out of pride, or just use the bionomial theorem).
In other words, these things take up precious time and I would much rather be
able to pull them immediately from memory than to rely on something that
may be in another book in some distant library or buried underneath mounds
of links in a website like Wikipedia.

Let me stress that I am not relying on memory for all of my tasks – that would
be ridiculously insane. You cannot solve complex problems on rote memory
alone becuase they require creativity and higher-level analytical skills. On the
other hand, there are some things you absolutely must memorize – for instance
as I write I am pulling out every single word on this page by memory. You can
gure out some words with context clues and associations, but if you have to
do that with every word during a conversation that is also absolutely, insanely
ridiculous.

So, welcome to my Eternal Memory Bank. Everything you see here, including
the fonts, document structure, Table of Contents – I guarantee you I’ve memo-
rized it. So, take a look, give me feedback if you wish, and enjoy.”

Project 2: RStudio via Linux Server

My second project began as a side project to my real job when my boss recommended that I check out Kaggle and sign up for their predictive modeling competitions. For those of you who don’t know, the website Kaggle hosts a series of predictive modelling competitions and awards cash prizes to the winners. The competitors include PhD-level academics, statisticians, mathematicians, hobbyists, and actuaries like me. I think of this as an excellent opportunity to see how the experts operate – the cash prize merely serves as icing on the cake, and I don’t really have the ambition to go for the top prize as of now.

To set up a base for myself and the rest of my team members, I decided to construct a Linux server out of an old computer I had laying around – it has some new components though, like an Athlon II x4 processor and plenty of RAM – 8GB. The server currently operates on ubuntu 11.10 “Oneric Ocelot,”  though I may change my mind and set up an ssh server using Ubuntu Server instead. In addition to the Ubuntu, I set up my Windows machine in a way that lets me control the Ubuntu Server remotely – including shutting down, turning on, logging in etc.

Logging into the server remotely with Tight VNC

After installing the server I downloaded RStudio server, a GUI developed by a group of volunteer programmers that allows people to connect to R remotely through their own Windows machines. In this manner I hope that my teammates and I can collaborate on our projects. I first asked some of my friends to try logging in but they couldn’t do it – so I asked my more technically savvy friends what to do and they suggested that I set up a static IP and forward port 8787 on my router. After doing so, they successfully logged in! Now I, or anyone on my team can access the server anywhere with an internet connection – hotels, coffee shops, etc.

Connecting to the RStudio GUI though Firefox on my Windows machine

Well that’s pretty much it, I have to say I’m happy that I posted this week as promised. I used to have trouble with these things as a kid but I feel that I’ve stayed on task much better as an adult. One study claims that it’s because kids have too much grey matter. My dad once said that “smart people just explain things away” when I tried giving him excuse one time as to why I forgot to replace the window stickers inside my car last year. I had trouble understanding what he meant but I think he meant that when scientists come up with explanations for these phenomena (in this case, why kids can’t stay on task), people use these explanations as excuses for their bad behavior. Thanks, Dad. Stay tuned for next week’s posting!

Read Full Post »

Hey everyone,

The Texas Bicycle Racing Association (TXBRA) road season actually ended two months ago in October, but I spent most of my free time studying for exam MLC. I think I spent about 300-400 hours in total, so as you can see the exam represents a more challenging hurdle than your typical college-level test. I took the exam about a month ago in early November and I won’t receive my results until the 6th of January. Overall, I think I did well on the exam – I paced myself correctly and I only struggled with a handful of questions. Then again, you never know how these tests turn out until you get your result, so in the meantime I’ve been focusing on work, study, and cycling to ease the anxiety of waiting.

Anyway, I don’t have to worry about taking another test until May so I’ve decided to update this blog every weekend starting now. I have two and a half months until my first race, so you won’t be getting any more race reports until March – but I’ve decided to devote my time each week to work on a project of my choosing – for example, next week I’ll post about a LaTeX project that I spent the last two weeks setting up. I imagine that most of the updates will focus on Mathematics, Computers, or Statistics, or maybe just whatever happens to excite me at the time. Today’s entry covers the events from the last important road race of the season – the Fort Hood State Championships – along with some minor and major events that occurred between then and now.

I don’t have much to say about Fort Hood – the nasty climb at the beginning of the race, over which I struggled last year, surprisingly didn’t pose much of a problem on the first ascent. Unfortunately, as a category 4 racer this year I would have to ascend the climb twice. After the first climb I still felt fresh, but a series of nasty attacks, accelerations, and a brutal crosswind on top of that left me gasping for breath after an hour of hard racing. I spent the next 10 minutes alone until Doug Baysinger and Tom Warnement caught up with me, and together we closed out the first lap. Doug ended up having a pinched nerve in his neck and had to pull out, and Noe Espinosa, another Shama racer, vanished from the pack after the first climb and had to abandon as well. This left Bill Krause as the only team member in the pack and he finished a respectable 26th. I finished way down, in 78th place. Said Assali, a Shama category 5 racer, finished 8th in his race. Bill Fiser, a category 3 racer, ended his season as the State Champion – and has now upgraded to category 2.

Overall, in terms of results, I had a mediocre season. Last year, I had four top-10 finishes whereas this year I only had one. On the other hand, I view this season as a better one developmentally – as I had bigger improvements in strength and racing knowledge. Sometime after Fort Hood, I upgraded my bike with two important training tools – a heart rate monitor and a Quarq power meter, coupled with a Garmin Edge 500 – which allow me to monitor my data with greater breadth, depth, and precision.

Quarq Power Meter with Rotor Crank

To help me with my training, Ken Day recommended that I read Training and Racing with a Power Meter by Hunter Allen and Andrew Coggan. I also plan to read Friel’s The Cyclist’s Training Bible, which serves as an essential reference to any competitive cyclist.

Profile from Last Thursday

Other than Fort Hood and exam MLC, not much has happened since then, although one event does stick out as something that I’ll remember for the rest of my life. After my exam, I hadn’t trained for about a month and lost a lot of my fitness, and since then I’ve gradually built it back up by returning to the early morning group rides. On one particular Friday morning I decided to go out with the group even though I normally don’t ride on Fridays, because these rides tend to be easier than the Tuesday rides. For the first hour everything went smoothly until we hit Eldridge Parkway at Memorial. I remember talking to Trent about a Mac Book Air that he wanted to buy and as we set off after the light we continued for a few hundred yards until we found another Shama rider lying on the ground on the other side of the street. At first I thought we had a typical crash within the group but it seemed strange as there weren’t any typical “crash noises” (tires streaking, yelling, bikes hitting the ground, etc.) that I would have heard ahead of time. When we stopped to assist the rider, it was clear that the accident had occured on the other side of the street, away from the group. On closer inspection we realized the rider was Philip Shama, and after seeing a Mustang with a broken windshield stopped a few meters ahead we knew that Philip was in serious trouble. John Neese called 911 and the others tried to keep Philip still although he kept trying to move around in a state of semi-consciousness, muttering incoherently and wiggling his fingers. The ambulance and fire truck arrived in minutes and got Philip to the hospital.

Early Morning Ride, 30 minutes before we found Philip.

Apparently, the driver, who was moving in the opposite direction to the group, saw all of our lights and became distracted. Philip, who sometimes rides opposite to the group to catch us midway during the ride, rode in front of the driver. The driver failed to see Philip and rear-ended him, shattering the rear triangle of his bike. Philip went over the trunk and broke the windshield of the car, and hit his head. He ended up with a broken leg, arm, and collarbone, and had a severe concussion with some brain bleeding. We were all in a state of shock as we rode back and we didn’t get to hear about his condition until noon. I was very uneasy until then, and after a day or two we realized that he was okay.

It’s times like this that stress the importance of bike safety, especially when riding in the dark. Had it not been for his helmet, Philip would have died that day. Just last week a very promising Texas racer Megan Baab was killed during a training ride. The sport is not without its risks, but we have to take the necessary precautions to be safe if we want to do the things we enjoy. I’m just glad that Philip’s alright. The cycling community wouldn’t be the same without him.

Sometimes I have difficulty expressing my gratitude to people but I assure you that I’m very thankful to have met all the Shama racers and people in the Houston cycling community this year, as you’ve done so much for me, as sometimes I find it hard to make friends with people or find people who like to do the same things I like to do, but you’ve all made the processes easier for me.

I’m very excited for next year. We’ve got some strong guys like Said Assali and Phil Trinder moving up to Category 4 next year and I’ll be happy to help them out. Over all, the last year has been very enjoyable, and I’m looking forward to having a great season in 2012.

Read Full Post »