Connect

Monthly Archives: September 2014

I have been thinking about how to make data visualization more fun, although this blog has absolutely nothing to do with data, it is still a very fun experiment with d3. Basically the idea comes from a super simple and ugly wall decoration at GYPSY:

and then I suddenly want to do something fun with it, which leads to the following: here is the live version.

As you can probably tell, the colorful circles will drop to the bottom and get absorbed by those black holes until all the black holes are filled by the colorful ones.

A lot of people ask me about what I use to write my resume, here is a copy, it is obviously LaTeX. The confusion they have is that my resume looks like some popular latex templates combined. Indeed, I did some customization of two popular templates, and added some other stuff, eventually turned it into what my resume looks like now.

Today I am using Jinja environment to turn my static LaTeX resume into a template which will later read a JSON file to fill in the content. I call it XNemo, you can download it here, and apply to your own resume. It requires no knowledge of coding, but a bit of JSON.

Now, I will go into some of the details how I designed this, and how you can use it for your own resume.

After you download the code, you should see the following file structure, pretty simple.

At a high level, how it works is also easy to understand: you run a python script, it will read the content of data.json to templates/template.tex file, and generate the LaTeX source file resume.tex and the final resume.pdf file. What you need to do is simple, just type the following two commands.

Note:Make sure you have Flask installed, otherwise you will get errors.

Now I will explain some of the details.

First, I defined my own template block syntax in generate_pdf.py as the following:

Basically, when I set block_start_string to ‘((*’, and block_end_string to ‘*))’, that means your for loop in the LaTeX template will look like: ((* for <condition> *)) ((* endfor *)), setting variable_start_string will make your variable value retrieval looks like <(( value ))>. From line 57 to line 60, I customized some template tags that later will be used in the template.

Now let’s take a look at data.json file. My resume contains multiple different colors, and timeline, and this block of info simply defines them:

When you set “usecolor” to true, the timeline color and the theme color will be applied to your resume, false will make your resume look pure black and white. Since my resume has timeline, “start_year” will be the earliest year that will appear in your resume, and the default hidden “end_year” is just next year. “theme_color” defines all the other colors besides the timeline colors (including the quote).

For the rest in the data.json file, it defines your skills, working experience, projects, education, and interests, the most common things you will most likely be interested in having them in your resume, and how it works is very self explained.

If you want to add more content to you resume, you can look through data.json and templates/template.tex, and modify them into what fits you, which might require a bit of knowledge of LaTeX and JSON, but it is still not too hard.

If you have any questions, you can always send me a request or comment on this blog. I will respond as soon as possible.

As you work in a team, collaboration becomes essential. At this early stage, I am leading a small team to build our platform. Although I am the one who writes the most code, I realized how important to start doing code review. I know a lot of companies use Review Board as their code review tool, and some other tools for task management, etc. Back to the time I worked at Minted, Review Board did not impress me; therefore, I started looking for something better, and I quickly found out Phabricator.

Phabricator is a collection of open source web application that help software companies build better software, it does not only do one thing, it can do many things, it is a suite of applications including task mangement, code review, etc. It is also free with self hosting.

I started looking at this, and decide to host Phabircator on a EC2 Ubuntu instance for experiments. Before I decide to do so, I had the chance to ask the CTO at Phabricator that how soon their hosting service will become live, and he replied with “At least a few months”, I could not wait.

Just like all the other people who are also using Phabricator, I got super addictive to it. I spent hours playing around with it, trying different configurations and exploring different features. The following is an image of my Phabricator home page, which is also customizable for everyone.

One of the feature that I found that is extremely amazing is that their Arcanist tool provide a command “arc lint” to analyze the source code and raise warnings and errors about it, like a syntax checker that makes sure you are writing clean code. If you are not, it will raise errors and warnings; for example, the following is what happens for a Python code.For more about Phabricator, you can find out on their official website. All you need to believe is that Phabricator is cool.

In terms of the price, at KuKy World, my hosting strategy is that we reserved a t2.micro heavy utilization instance for 3 years with total $109, and hourly rate at $0.002, and a general SSD EBS volume with 1GB data. You can do the math, it is not expensive.

Recently I read a paper about exploring the use of memory colors for image enhancement. Memory colors have been defined as “those colors that are recalled in association with familiar objects”. Several early psychophysical studies support that the majority of people associate and ideal color with an array of everyday objects (skin, grass, sky, plant, sand, and etc).

An interesting fact is that when people use Photoshop to polish their photos, they inadvertently apply a lot of memory colors. Think about some of the modern famous photo apps like Instagram, which also applies memory color to enhance the photos, it has proven that memory color make people more pleasing than the original color.

There are also situations where the association with memory color is less appropriate; for example, the images that convey a certain mood, memory color can make the mood disappear.

The basic idea of using memory color to enhance an image is to shift the original color in some region of that image towards the memory color.

The following is a little experiment I did in Matlab to see how variation goes within an image.

For the common object that people might see every day: grass, brick, sky.