Day 4, Another Productive Morning

This morning, I hacked together another bare-bones django app that does the same thing as the evernote one I wrote on Monday, except it integrates with google docs, where most of our existing word studies are. And yes, I created yet another github repo to share the oauth process involved.

Another nice thing about free mornings is I can take my time in praying and reading the Bible. It doesn’t mean I get epiphanies, but at least I can read a chapter slowly and multiple times.

On another note, one of the courses I’m taking is called Design Thinking Bootcamp (yay! I got into it!). We were assigned an interesting design challenge today that is due next week. I won’t say what it is since it’s possible I may interview you about it (“secretly” or explicitly), but I think it’s good that I’m being pushed out of my comfort zone to try to talk to people and find insight in uncovering a particular need.

Day 3, Window Fans

It’s still quite warm around this time of year, and since Stanford’s not exceptionally close to the bay, the heat from the day sort of lingers inside through the night. Thanks to my sister and brother-in-law, I have a window fan that can circulate the cooler night air into my studio. Without this, I’d be sweating in my sleep. Lovely, eh?

A more elaborate post is called for to express my thanksgiving to my older sisters and brother-in-law in general. Without them, adjusting to the bay area and growing more mature as a person would have been much slower. People have told me that I act more mature than the average person my age – I owe it to having such wonderful and down-to-earth sisters. But again, this warrants a dedicated post.

Day 2, Light Mondays (and Wednesdays)

This quarter I’m taking 6 classes and 14 units. Somehow, my class schedule looks quite sparse compared to my Cornell schedules as an undergrad. Maybe it’s because a few classes only meet once a week. Anyways, my Monday and Wednesday mornings are completely open, and thank God I was able to do something productive.

I quickly implemented a very bare-bones django app that can authenticate with Evernote, and retrieve private or public notes and display them. Why bother doing this? Well for Greek class we started working on word studies and “categorizing” usages of a word throughout the Bible, which means there’s lots of verse references. Instead of copying the text of every verse, we wanted a way to leverage reftagger. So with this django app, now we can view word studies (if they are stored on Evernote) with hover-over Bible references!

I also created another github repo for sharing the oauth process  I used to integrate django and evernote. Another +1 geek points!


30 Days of Thanksgiving, Day 1

A couple friends of mine have completed a “30 days of thanksgiving” blog thingy. I thought it would be good for me to do as well, to challenge me not only to be more aware of God’s blessings in everyday, but to post more regularly on this thing and practice writing…sort of.

So, what is blessing number 1?

Being at Stanford

This is more of a summary of my transition from work back to school, from employee to grad student. After spending a week here, all I can say that it’s been great and I’m really looking forward to this year. Lists are more digestible than copious amounts of texts and paragraphs, so here are some reasons why I’m thankful for being here:

  1. I got assigned a single studio in a nice community. It’s relatively quiet/peaceful (none of that downtown noise), the studio came furnished, has a kitchen, and a spacious bathroom. Laundry is on site and, as I discovered today, FREE! Well, guess technically it’s coming out of my rent, but nice that it’s not additional.
  2. Stanford is pretty. In particular I am comparing to Berkeley because that was the other school I was deciding between. There may be some parts of Berkeley campus that are nice, but there’s simply no contest when comparing with Stanford. Given by upbringing in rural/suburban Plainsboro and my dislike for urban/city environments, Stanford definitely fits me better than Berkeley does, in terms of general environment. And dood, the engineering quad at Stanford is super baller man! Engineering is well-funded here for sure.
  3. My cohort. One of the things that I like about my program (and I guess graduate programs in general) is that the class size is smaller, which lends to a greater sense of community and camaraderie (hooray for auto-spelling!). There are 27 people in the LDT program, and I’m glad to say they are all super friendly and chill (and from what I can tell, they think I’m pretty cool too). Actually one of the main reasons I chose Stanford was because of these people – they seemed a lot more passionate and purpose-driven, and I thought that these are the kinds of people I would want to work with on projects.
  4.  There are church members. There are currently two other students who are TJC on campus, and a handful of others who work nearby. I even got a dedicated homemade cookie delivery from Sarah-Mei! At Cornell, there was only 1 church member during the last two years, and we seldom met up.
  5. Stanford is longboard friendly. I had some reservations about longboarding around campus, but turns out it’s pretty awesome! I guess since Stanford is so bike-friendly, the roads are much smoother and there are designated bike lanes everywhere. The campus is large and the distance is just about right for a longboard commute. It is a bit of a hassle carrying around safety gear, but I guess that’s something I’ll just have to get used to. So far I’ve mainly been only wearing wrist-guards. I should wear a helmet too, but it’s so bulky to carry when I’m not riding, and I’m usually not going very fast anyways…but I probably should still have it.
  6. Actually being excited about school. This is a stark contrast with much of my undergrad days (and high school). Most people don’t really enjoy school when it’s regimental and required, but the nice thing about grad school is that everything is totally your choice! Undergraduate education is becoming increasingly more expected/standard (which is a good thing), but graduate school is completely up to you if you want to go or not. And if you do go, you can pick a program that is specialized for what you’d be interested in. Hence, I am excited about classes that I’ll be taking and the projects I’ll be working on.

That being said, graduate school will also be a challenge spiritually. I’ll have to balance school and church work (and possibly part-time work on campus), which I fully expect to be more difficult than balancing church work and my previous full-time job (having no homework was awesome). There will be a lot more temptation on campus than at my office so I will need to be more watchful and self-disciplined. Consistent prayer and Bible reading are a must, and hopefully having a prayer group with some SSC J1 brothers will help keep me accountable.

I guess that was still copious amounts of text. But at least it was in a list!

Beginnings of LDT

This week was my orientation at Stanford’s School of Education. On Monday and Tuesday there was a workshop for my program (LDT) that introduced us to the “design thinking” process. Essentially it is a wildly collaborative and creative approach to problem-solving. I thought our facilitator gave a really nice graphical sketch of what design thinking is like compared to the “conventional approach.”

In a conventional approach, generally speaking, you identify a question or problem. From the question/problem, you try to find an immediate answer or solution that will work. Graphically, it might look something as simple as this:

The conventional approach to problem solving.

There’s nothing wrong with this approach, and it works fine. Design thinking is in a sense a less direct approach to problem solving, with the hope that the solution is highly innovative and well-informed. Graphically it might look something like this:

The design thinking approach.

Instead of going from the problem directly to an answer, design thinking explores a variety of possibilities. Possibilities don’t have to be feasible or practical – they are like “what-if” or “I wonder if this would work” kind of solutions. This allows for copious amounts of creativity to come into the process, even if most of the ideas are lucrative. But the idea behind exploring potentially lucrative solutions is that an extraordinary solution can be found by “backing off” a little bit. With this approach, the solution is most likely pushing the boundary of what’s possible and is a product that most wouldn’t have expected, yet works really well. Neat concept, huh?

Broadly, there are 4 phases:

  1. Research
  2. Design
  3. Prototype
  4. Scale and Spread

The first two days of orientation was an exercise in the design thinking process, sprinkled with icebreakers and short improv games. We broke up into groups of maybe about 15-20 people, and each group practiced applying design thinking to solve the following question: How can we increase low-performing middle school students’ engagement in learning?

For the research phase, each group interviewed 2 people in the education/teaching industry, asking questions we thought would be helpful in designing a solution. We took notes on post-it notes and later posted all of our findings on a wall and clustered them into categories.

From there, we started the design phase by throwing out ideas on what the solution might look like or might involve. Because of the collaborative nature, there were a ton of ideas ranging from curriculum development, use of media/technology, classroom space, techniques, policy changes, community outreach/involvement, etc. These were also written on post-it notes and clustered into categories. At this point we tried to refine our findings by focusing on one or two clusters for prototyping. One of the funnier ideas was “Get Justin Bieber to teach math.” There were a number of interesting ideas, but I can’t recall them right now.

Prototyping was an interesting phase because it was still very much like a design/conceptual stage, at least for the purposes of our exercise. We were given pipe-cleaners and styrofoam and other random crafts materials to help us form our ideas in some abstract way, but a lot of us ended up just playing with them while talking/fleshing out details of a potential solution. My mini-group decided to tackle the issue of curriculum material not being relevant to students’ interests or not having a connection to what the student perceives as the real world.

Scale and spread then looks at how our solution can “get legs” to become real. We investigate what needs to happen to make the solution realized, e.g. from who do we need buy-in, where could funding come from, how the solution will be deployed, what the business model might look like, etc.

Finally, at the end each group of 15-20 had to pick one idea and prepare a presentation for it. Our group ended up picking the idea that my mini-group thought of (woot!) and our presentation revolved around a skit of our solution in action. Our solution turned out to be a really ambitious digital content platform that connects topics at school (“What did you learn today?” prompt) with an individual students’ interests, which could also serve as data collection for teachers and schools to further inform their lessons and policies. Our skit demonstrated a disengaged student in class where the teacher was talking about Mayan culture, but the student doesn’t really care about anything except basketball, jazz, video games, and erm…women. When the student opens the mobile app and enters “Mayan culture”, the app would fetch rich content that relates Mayan culture to his particular interests. For example, it might tell him about Mayan sports and how the losers of said sport competitions were subsequently sacrificed. The app also feeds into a type of social network that suggests local experts that students can communicate with on said topic. All of this data (student’s interests, what topics the students looked up, and what content they viewed) can be fed into a “teacher dashboard view” which would compile and distill all of it to gauge the interests and activity of say, one’s class. This information would be valuable in making lessons more relevant to students’, and for inviting guest speakers to come to the school, based on what a large number of students might be commonly interested in.

Anyways, I am really excited about this program and working with the people in my “cohort.” There are 27 people in our program and they are all so intelligent, fun, passionate, and purpose-driven. I’ve never felt this eager about school before, so hopefully that means I made the right choice.

Thank God for this wonderful opportunity, and I hope I can take advantage of it to its fullest so that ultimately, the things I learn can also be applied to church work, especially RE.

Django Documentation on Writing a Custom Backend


Today is a special day, because I forked my first github repo! +1 geek points.


Another nerdy post which may be of some use to a random novice django developer like myself. Feel free to ignore unless you get a kick out of my programming frustrations.

One of the reasons why I love developing with django is because the documentation is excellent. I’ve almost never had trouble using it both as a reference and as a “how to do ____”. Almost, because of what happened today.

I was determined to implement sign-in using the Janrain Engage service for my django apps and after reading the documentation on it from both the Janrain side and the django side, it seemed pretty straightforward. Sample code is also a big help.

After a few hours of coding/testing/debugging (committing other stupid typos and errors), I had everything pretty much working in terms of interfacing with the Janrain API service, mapping django users to external accounts, and authenticating/logging in through django. The only problem was even after I was allegedly authenticated, every time I tried to access a page limited to “logged in users” it would still redirect me to the login page. WHY? I was using the development version of Django so I thought maybe it was a bug and I even tried downloading the latest stable release and testing again; still not working.

Turns out, this is what killed me. When writing an authentication backend, you only need to implement two methods: an authenticate(self, **kwargs credentials) method and a get_user(self, user_id) method. This is the line in the django documentation that killed me:

The get_user method takes a user_id — which could be a username, database ID or whatever — and returns a User object.

“Oh, okay. In that case I’ll just make the user_id parameter be the unique identifier that’s provided by the external service.” So I implemented that method treating user_id as such, and then moved on to the authenticate() method, which required more logic. In practice, I only ever saw the authenticate() method being invoked from the custom code I was writing so I thoughtlessly assumed that my get_user method was only needed for compatibility purposes or for implementing more advanced backend features. And of course, my thoughtless assumption was wrong.

The fix for my problem turned out to be that the get_user method was being invoked somewhere in the framework and it was supplying a user_id corresponding to the primary key of a django User object. After spending hours trying to pick out problems with my authenticate method and view logic, it turned out to be a problem with the 4 lines of code I wrote and never looked back on. Boohoo. Partially my fault for treating the user_id arbitrarily, and partially the documentation’s fault for not describing how the get_user method is used and how to know what the user_id corresponds to (since the documentation stated that it could be “whatever”!).

Evaluating Lightroom 3 vs. Aperture 3

Today I spent pretty much the whole day trying to figure out whether I should use Adobe Lightroom 3 or Apple’s Aperture 3.

Here’s what I want to ultimately accomplish:

  • store my photos on an external drive
  • be able to edit/retouch non-destructively select photos without being tethered to my external drive
  • localized adjustments
I downloaded the trials of both applications and discovered that both can achieve the above. Both allow maintaining multiple libraries (or catalogs in Lightroom terms), have adjustment brushes, stacking, keyword and metadata tagging, and so forth. So in no particular order, here are my observations. (I should note that none of these were really deal-makers or breakers because as I said before, both can accomplish my main goals)
What Aperture Has that Lightroom Doesn’t
  • adjustment brushes for every type of adjustment, including curves (lightroom adjustment brushes “only” let you adjust exposure, brightness, contrast, saturation, clarity, sharpness, and color overlay; not that these options are limiting in any way)
  • Faces detection and tagging
  • Native GPS and location tagging (lightroom can achieve this with a 3rd party plug-in)
  • More advanced slideshow options (e.g. multiple audio tracks which can be interspersed with arbitrary durations)
What Lightroom Has that Aperture Doesn’t
  • Some superior editing features like noise reduction (very impressive) and lens distortion correction
  • Physical folder management with the ability to synchronize to the contents of the physical folder (plays nice with manual copy/move operations you do in the file system)
  • side-by-side comparisons with synchronized panning and zooming
  • cross platform compatibility (but legally, you need 2 separate licenses to install on both mac and windows)
These are by no means a comprehensive list of things which one has that the other doesn’t, but those are just the ones I noticed.
Licensing/Pricing notes
  • Aperture is $79.99 from the Mac App Store vs. $99.00 for Lightroom (Education price; there is also a Student/Teacher edition which is $89.99)
  • Aperture can be installed on numerous mac computers linked to your iTunes account (possibly more than 2)
  • Lightroom can be installed on up to 2 computers with a single license (but again, must be the same platform)
  • both are for personal/non-commercial use at the prices and licensing options listed
So what did I end up choosing? Aperture 3.
But this decision was far from easy and definitive. The main deciding factor was that I have Mac Appstore credit from purchasing my macbook air. If it were not for that, I would’ve chosen Lightroom 3 and paid the extra 20 dollars. Money/cost aside, I actually like Lightroom a little better for the following reasons:
  • One click for applying a previous photo’s adjustments to the current photo
  • when performing undo, an overlay shows you what operation was undone – this is a very nice touch
  • writing metadata changes directly to the master files (this is possible in Aperture supposedly, but seems like there’s a bug and you get an error if you try to write metadata changes to master jpg files)
  • the keyword tagging interface
  • a significantly smaller memory footprint (no rigorous tests performed, but when I had both Aperture 3 and Lightroom 3 open, Aperture 3 consistently took up much more memory). This is a pretty major bummer for me in choosing Aperture 3 instead of Lightroom. In practice, both ran smoothly on the macbook air, so hopefully it says that way after time.
  • smaller catalog size vs. Aperture’s library size (this is mostly because Aperture generates more preview files, which can be turned off).
  • a friend pointed out a rather good point: adobe is more trustworthy and more mature in this area than Apple
In summary, I think they’re both good in terms of functionality and capability. From an interface perspective, both are pretty easy to navigate, but as noted above I like certain things in Lightroom more than Aperture. Memory-wise, it seems Lightroom is definitely more streamlined. Cost-wise, Aperture 3 is cheaper if you purchase through the Mac Appstore.