Looking Stupid

I’ve been sitting around, trying to determine what I wanted to write for this week. I’ve had a few underwhelming posts over the past month, due to some time constraints and missed deadlines, so I’m really aiming for ideas with a bit more substance.

I try to make note of some ideas I have, whether that is quotes from books I read, ideas from podcasts, little pictures, or just something that pops into my head that I want to save for later. I was going through those notes and determined this is the right time to get to something I heard a high school girl say at a Starbucks a few months ago.

Continue reading “Looking Stupid”

Baseball is Back

Although I missed another Monday deadline (spring break has really gotten me in disarray), it was for good reason. My parents were visiting in San Diego, and it was fun getting to do some of the more “tourist” type places with people who had fresh eyes for the area.

But more importantly, my dad and I went to Petco Park to watch the Padres. Baseball season is finally back, and it makes me incredibly happy.

For most of my life, the start of baseball season has signaled warm weather, and just a certain reawakening for the year. Although this was much more apparent in Minnesota, even in San Diego I feel warmer weather, think of fresh cut grass, and just get this feeling of joy that not much else is able to provide. Baseball has always been magical. It’s a sport that is easy to engage with, easy to find someone to mess around with, and just has a pristine quality to it that no other sport manages to capture in my mind.

Project Euler

As part of my year of focus, I’ve been trying to spend more consistent chunks of time working on programming. In particular, right now I’m focusing on doubling down on my Python knowledge, and exploring some other aspects of computer science that interest me. After checking out a few books and tutorials, I’ve made my way back to a website that I found a number of years ago, which is the most intriguing to me: Project Euler.

The gist of Project Euler is to give a wide range of mathematically-oriented programming puzzles for people to solve. You can always just go on there for ideas of small programs to write, whether it’s to learn some math or to try out a new computer language. In my case, I’m trying to write the most efficient programs possible, making use both of clever algorithms I spend time figuring out or researching, and making use of Python syntax to make particularly elegant solutions. If you make a simple account, you can keep track of your progress and access message boards about each problem.

It has been very engaging so far. They are more bite-sized, but give ideas for more complex programs that can be written which are more general purpose. Rather than writing a script that solves a problem, I can focus on writing broad functions that may be helpful.

A fun problem I worked on today involved triangular numbers. These are just numbers you get from adding together all the positive integers before it. So, the seventh triangular number is just 1+2+3+4+5+6+7=28.

The goal was to find the smallest triangular number with more than 500 divisors. Here’s the Python code I wrote for it. (I apologize, I can’t figure out how to make syntax highlighting work right now.


import math

def getTriangular(n): ## Generates a list of triangular numbers up to n
    triangularList = [sum(i for i in range(1,k+1)) for k in range(1, n+1)]
    return triangularList

def getNumberDivisors(n):  ## Generates number of divisors
    numDivisors = 2  ## We don't care about n=1, so assume it has 1 and n
    for divisor in range(2,int(math.sqrt(n))+1): ## Only check to sqrt(n)
        if n % divisor == 0:  ## Needs to be a divisor
            if divisor * divisor == n: ## If square root
                numDivisors += 1
            else:
                numDivisors += 2  ## Otherwise, divisor has a factor
                                  ## pair larger than n//2

    return numDivisors


def main():
    triangleList = getTriangular(25000) ## Hopefully big enough
    is500 = False
    triangleIndex = 7 ## It's certainly larger than seventh number
    while not is500:
        triangleIndex += 1
        #print(triangleIndex)
        if getNumberDivisors(triangleList[triangleIndex]) > 500:
            is500 = True
            print(triangleList[triangleIndex]) ## Tell me the number

main()

The code runs reasonably quickly, which is always the goal. The standard view on Project Euler problems (and I believe it is their official stance) is that well-optimized solutions should run for no longer than a minute on nearly any computer. The first few problems should take substantially less time than that.

I recommend giving them a try if you have an itch for some challenges, and either want to work on optimizing your code in a certain language, or try out the functions in a new language. For example, the fact that Python supports arbitrarily large integer addition (compared to C or Java) makes some problems pretty trivial. Thinking about how to deal with other languages becomes rather interesting.

Spring Break

I missed my first self-imposed Monday deadline in a while. I’ve actually been on Spring Break, in a sense. My girlfriend is in town visiting, and we’ve been staying pretty busy. Tomorrow we’re on our way to Universal Studios Hollywood. We both went to the Orlando location back in high school, so we’re somewhat familiar with what it has to offer. But it will be an excellent time. I just wanted to write this brief post as a marker of my failed deadline, but to keep the number of posts per week consistent enough.

I’ll have a new, full post this upcoming Monday.

Review: Free Solo

I decided to go watch Free Solo this afternoon. I had seen a snippet of Alex Honnold’s 60 Minutes special while in high school, and remember being impressed. Then I discovered this documentary about him won an Oscar. Even better, it was being shown in some local theaters.

The short version is this: No film has made me feel less competent and driven, yet I don’t envy necessarily envy Alex’s single-mindedness.

Before I get into that, I want to encourage everybody to see this documentary. It’s stress-inducing, beautiful, and everybody in the film has an incredible passion about them. Alex’s focus on climbing El Capitan, his girlfriend’s passion for him and their life together, as well as the camera crew working with Alex all weave an amazing narrative. It’s fantastic. You can also read the National Geographic article about the climb if you’re interested in the details.

Enjoying the filmography, as well as the feat Alex pulled, are both quite easy. It’s no wonder this documentary was so well-received. Yet Alex himself is the more interesting part of this film. He has the personality one might expect from a child prodigy, a narrow focus on specific goals, and that brings him immense joy. It was something that I admired, but could not entirely grasp. It is always inspiring to see someone so fully living their best life in the way that brings them the most joy. He has something to be dedicated to, and as long as he’s able to keep climbing, there’s no doubt he will.

I faced multiple crossroads at the end of high school and throughout college, and each decision took me a bit further away from the drive and narrow focus Alex has in his life. I think this is why Alex himself affected me far more than the anxiety I felt from watching him free solo. At the end of high school, I was incredibly focused on music. I would practice percussion multiple hours a day, and thoroughly enjoyed every minute of it. Then, I chose not to pursue music in any serious way in college. While I’ve found a bit of that passion again, it’s not as focused or intent as it could be.

Baseball was similar, but that decision came earlier when I chose to do pit orchestra my Junior year of high school instead of playing baseball for the school team. I still played in the summer, but did not play at all in college. The passion is there, but since I didn’t pursue it I just don’t have the foundation laid anymore to keep going with it.

The final, and most immediately important, decision was choosing to go into my current job instead of attending grad school. Retrospectively this was a more natural decision, but it was the final nail in the coffin that held intense focus on a narrow field.

I’ve always idolized people who excel at one particular thing, yet always made myself out to be as well-rounded as possible. Naturally this is a conflict that my brain doesn’t accept quite yet, and so I hit some dissonance when I see someone like Alex who is so incredibly focused on something, and has pursued it successfully for 10 years. A part of me wants that sort of focus on every project that intrigues me, yet I know that’s just too much cognitive load and I need to pick and choose on what I can improve on over certain periods of time. It continued to make me think, which was great.

He has an interesting personality and mentality about him that is reflected incredibly well by both his candid comments in the documentary, and what others near him had to say. It makes sense when you learn the camera crew has been working with him for 10 years. It’s not clear to me how others who’ve seen this film view it; to me, while the climb itself was amazing, it’s difficulty was absurd enough as to make me desensitized to it by the end. I was focused on how Alex can mentally do what he does, day in and day out. It’s quite incredible.

A Few Math Games and Puzzles

Up front, here is a link to my math blog that has the meat of this post. Also, there will be a PDF version attached.

I’ve finally gotten around to writing another math post. There’s a mix of reasons why I’ve been writing about a lot of other things. First, there have just been other topics in the front of my mind that I felt like writing about in the moment. Second, there were not any particular pieces of math I felt inspired to write about. And third, preparation of a math post is significantly more work for me, as I care a lot about being accurate, precise, and clear in my presentation.

My goal is always to write posts that are accessible and reflect my thoughts, but in most circumstances it’s simply a matter of opinion. Writing a good math post is a bit more convoluted, as there are definitive wrong ways to go about it. So, I’ve written the post up on my math blog I made through work. Again, that link is above. I’ve also attached a PDF version of the post. It’s about some mathematical games, so if you are someone who teaches or tutors math, knows someone who does, or just wants some easy pencil-and-paper games to play with a friend to pass the time, you can keep this PDF somewhere more accessible.

A New Friend

The other day, I finally finished making my room fairly clean and I tidy. I put together a bookshelf to house some odds and ends, removed the final cardboard boxes still hanging around since I moved in, and sorted my papers. I felt good. But something was still missing.

This week’s Comical Start episode featured me discussing my desire for a Roomba “just to have something that seems like it’s alive in my apartment.” However, a Roomba is not in my future. After a healthy discussion of why an actual pet is not a possibility right now, Grant and I decided I would get a plant. As a result, I went out Saturday morning and got myself a little succulent.

My new pal, Calvin (naturally named after the spiky-haired first-grader Calvin)
Continue reading “A New Friend”