Wednesday, March 24, 2010

The power of writing

Many people underestimate the power of being a good writer. As the age old adage goes, "the pen is mightier than the sword" and it is just as true now as it was first uttered.

I am now helping a Japanese friend on writing her resume and fortunate for her, she is an incredibly accomplished person (though she doesn't realize it), holder of several scholarships, awards and active in a variety of community projects, I was sent an incredibly sad looking resume saying something to the effect of "I am a hard worker and I would like to apply to this foreign position."

Apparently she also blurred the concept of a resume with a cover letter which weakened things considerably. Participating in the COOP program in university honestly paid off in spades as I am very aware of how resumes are read and what should be highlighted. The first version of the resume was immediately trashed and I've highlighted all of her special achievements and important contributions/results as these are the things that as an interviewer exactly wants to know; what makes you standout compared to everyone.

It's one thing to have good content and it is another to know how to present it well, but having both is very important. I've already managed to get her a 1 year scholarship to France by fixing her cover letter (and her prof's recommendation letter) to make a strong application package and hopefully I'll have have her accepted into some research company abroad if things work out. Knowing that I can pull these things off for other people is kind of fun. I just wonder what kind of value would a good technical writing market for students or Japanese people dealing with foreign relations is out there because having a good editor/writer in their pocket can make a huge difference (and we all know about Japanese "Engrish").

I should be glad that I'm practiced at writing application letters, I guess I did learn something from University after all.

Monday, March 22, 2010

I am terrible at shopping for clothes

I usually do my shopping from a utilitarian + price mizer point of view, if it can get the job done and it's cheap then I'll buy it.

This philisophy when it comes to shopping has probably saved me vast amounts of money as I am either certain about my needs or what I can live without and aim for something that fits in an "acceptable" price target.

I feel that I have made many good decisions in the past where I have decided against buying a car or living with roommates in a shared apartment and saving cash to use for other purposes. When it comes to shopping for things that lie outside of the world of price/performance comparison I might be a total cluts.

The company dorm which I live in, has communal washer and driers that everyone uses. I don't know exactly how, but I have had several pants get tears in them in very conspicuous places, namely in the butt (and no, it isn't me getting fat, really).

With me running out of wearable pants to wear, I've decided to head out to do some clothing shopping today, which is something that I rarely do. I wear most of my clothes until raggedy and then contemplate on buying something new. Generally, the only time I do buy clothes is when I make a visit back to Canada since I don't understand Japanese fashion too much and I like plain looking clothing. I do keep some nice clothing around for special events, however, but I am going on a tangent.

There are at least 2 points of weaknesses for me when it comes to shopping for clothes in Japan. First is that I don't know the brands or the stores out here all that well. I know just maybe just 3 by name and that is about it and the second is that given 2 pairs of pants, one of them being designer and a no-name brand. I generally opt for the no-name brand so long as I like the style and it is comfortable.

As of recent, I have had several of my female friends mention that I would look way better if I bought some nicer/fancier clothing. I have decided that it would be interesting to see what would happen if I did end up trying a few new styles.

In general, the price target for pants for me is in the $20~$30 range and generally the same things for sweaters. Only in rare cases when I do really like something that I will consider going upwards to maybe $45~$60 for a shirt, but that is only in rare cases.

The thing is that given 2 shirts, when the both of them provide for similar functionality (as in keeping me warm/clothes/or from breaking public nudity laws) I don't see a huge difference between them, I might like one style a little more than another but I generally can't justify myself paying close to 2x or even 3~4x in some cases for fabric that has been cut differently. Is it because it's been cut and put together differently that it is say 2x~3x more good looking as the price implies? What about the differences in material, is there that big of a difference?

To be honest, I have nearly no clue when it comes to clothing as my purchasing decisions come down to:

1. Is it the right price?
2. Does it look fashionably acceptable to me?
3. Is it comfortable?

I spent an entire afternoon going around to different shops looking at clothing. After spending 4 hours of looking around, I managed to buy a single pair of pants and that was about it.

I also checked out some designer looking stores and the one thing that struck me was that the clothing sold there is amazingly expensive. I would not fathom myself spending $120 for a pair of pants, $80 for a shirt and maybe $150 for a jacket. That would easily put the price tag of a single set of clothing at about $450 and this is only a single set of clothing we are talking about here! Sure the material looks a little nicer, but to me I just can't justify the price. For that kind of money, I'd rather save it and spend it on traveling or something else.

For the time being though, I am going to try and read up on clothing to try and figure out why there might be such a big price difference. A micro-fiber t-shirt vs a cotton one, sure I might be able to understand that (I love my micro-fiber shirt for sports and outdoor activities) but for other stuff, I haven't a clue.

Momentum

"An object at rest tends to stay at rest and an object in motion tends to stay in motion with the same speed and in the same direction unless acted upon by an unbalanced force." - Newton's first law of motion

As with moving bodies, newton's first law also seems to apply to life in motion; to those that are active, to those in inaction, or to those that need a change in vector.

One thing that I miss is being around creative technologists- people that like to do interesting things with technology. For the work environment I exist in, I just haven't been seeing the level of creativity that I want to see. Maybe it's the maturity level of the project that I've been working on but still, I haven't been able to take part to produce something with some level of personal creative satisfaction.

Some of the most fun projects I've worked on were simple things on my off hours with friends or on my own. More of like a dabbler but I would like to dedicate more time to learning how to do certain things with a professional flare maybe sometimes in the future. But usually, most of the best ideas I've seen have come out from people working in their garage to scratch some kind of itch, whether be it necessary, a nice to have or just a product if interest.

Many of the biggest technological hits, paradigm shifts or "the next big thing" have come from people working in their basement not knowing how things may turn out.

I laugh at news anchors trying to figure out the random video chat site at chatroulette. It is a big hit among young people. The only thing that the "older crowd" has to say is that there are lots of strange people out there and that it could be dangerous. The thing is for the older generation is that whatever they don't understand is usually labled as dangerous by them.

Large corporations and society faces the same problem, in that it is run by old people with old ideas. I'll give credit where it is due: in that they know how things worked and how to keep the status quo. These people are set in their ways and are moving in a certain direction.

The nice thing about being young is that we don't have any preconceptions about how things should be. We just don't know and when it comes to doing something, we generally end up trying to reinvent the wheel and sometimes we walk away with a completely new kind of wheel during the process. I think that is the power of youth that should be cherished instead of beaten out by our "societal system."

I found a musical duo that I really enjoy just because of it's "made at home" yet professional feel. And old piano and anything they have on them to turn into musical instruments. If you have time, check them out and their other songs. I love this kind of youth. More power to them.

Sunday, March 21, 2010

If Japanese thinking could meet Western thinking in the right way

Maybe I was fortunate to have had an interesting group of friends while I lived back in Canada. The kinds of people I knew are pretty much the kind of "make it on their own" people, self starters, in other words.

It doesn't just have to be in business or in the world of money making, but the skills that one does learn in doing things and starting thing on their own, most definitely apply here. And the unfortunate thing over here is that I haven't seen too many of those kinds of people in my age group over here. There are the few, but there aren't many.

I don't know if the generalization is true, but in most hierarchal societies, especially asian ones, most things are handed down from the elders to the younger generations. It's called seniority, I guess. And when people are stuck waiting around for something to be passed along to them, I don't think that many paradigm breaking ideas happen in a system like this. You need the idea and maybe go against mainstream conventional thinking, though I must also add that many controversial/revolutionary ideas were born in the same plight.

That isn't to say that most Asian people are like that. I have met many, especially those that are in music, art or some thing other than working your standard run of the mill company that are exactly like the 2 guys in a garage kind of thing. I just don't think I see or feel it in the technology department. These guys are really good at paying attention to details, even really minute ones that your ordinary westerner might pick up on.

But when it comes to systemic improvement, Japan is pretty hard to beat... Germany might be pretty close up there too from the ones that I know too.

If western "open ended" (ie. try crazy but cool things) thinking met the Japanese "improvement" way of thinking. You'd have a pretty hard combination to beat.

Finding the right people and the idea to make the plunge, however it tough, however.

Wednesday, March 17, 2010

You don't have forever

If I had kids, this is probably one of the lessons I'd like to teach them, you don't have forever because between now and later, this might be the only chance you're going to get and there might be no going back.

Subconsciously, people do know what they want; ask them out right sometimes, it might not pop out, but given a chance it will come out. Anything that you've wished that you wanted to do, is something that you should be doing. If I were to summarize a huge number of life tragedies, it would be that.

Life works in time windows that you don't realize that they are there until they start closing. You generally can be reckless while young, it might even be expected, but don't expect to be able to do the same thing forever.

A big part of life is knowing how to age, gracefully. If there is something that you know that you ought to be doing, then do it until you don't. Because there are things that you can do now that you can't do later... so don't waste time.

And besides, people that make things happen or can do what they want is sexy.

Monday, March 01, 2010

What I miss about having roommates

It's been nearly 2 years since I've moved out to the Tokyo area and one of the things I realized that I am starting to miss is having roommates to chat with. What I noticed is the ability to speak well is as good as your ability to keep it sharp; if you stop, it will fade.

Since moving to Tokyo, I am immersed in the Japanese psyche; gone are the days of having international and bilingual Japanese friends. I could switch into English mode whenever I wanted and through that, I've kept my speaking, writing and thinking skills sharp. Having bilingual Japanese friends was also a big help since we could switch back between languages if things got tricky. Though I am pretty proficient at saying what I need to say in Japanese I consider myself far from eloquent in expression. In other words, don't expect any extraordinary oratories from me in Japanese (yet).

I believe that a person's linguistic skills are related to their ability to describe something logically, the succinctness of communication and the detail at which their thoughts are expressed. As it maybe subtle, many important thoughts and interesting conversations are usually the result of good attention to details, especially interesting details, otherwise communication gets boring (as to what would be considered "interesting" is a whole different problem all together, but I will assume that you know what I mean).

If you were to ask a person a simple question, "what do you do on the weekends?" The boring answer would be something like "oh, stuff" or "hang out with friends," which is dull for an answer. I used to chide students learning English conversation from me, "unless you don't like the person you're talking to, you're going to have to give a better response." The more interesting answer would be "I like the out doors and usually go cycling on sunny days to enjoy the good weather," which gives room for the conversation to go somewhere instead of the previous dead-end answer.

Being a good conversationalist depends on avoiding dead-end responses and finding other directions to take the conversation after reaching the end of a train of thought. Good comprehension and cognitive ability to process and respond to information on the fly is also required to hone a skill such as this. However sadly, there is no silver-bullet to getting that silver-tongue. Becoming a good conversationalist is hard and takes a considerable amount of time to be practiced in a second language because it requires a multitude of different skills. On the right topic and the correct frame of mind, I can usually hold a good conversation in Japanese, but if things head into "foreign territory" when I don't have the vocabulary or the understanding to respond appropriately, it gets tough.

The hardest environments to hold a conversation for me is with a medium to large group of Japanese people. Colloquial phrases and cultural references are usually hard to pick up and when the conversation gets exciting, the pace picks up making it harder to follow. It would be like expecting a foreigner to understand what some one means when "they got one upped" and someone else responds "don't worry, you'll take them down." And a dictionary isn't going to help either.

But if you really want to set the bar high and get in with the locals and have an impressive conversation, either through slang or verbal eloquence, it can be quite frustrating not being able to express complicated and detailed ideas in the manner that you are able to do so in your native tongue, even more so if you are very proficient. There has been many instances where I have faced this problem, to at some point where I've given up in some occasions because it would take too much effort. The deciding point is usually between the time it takes for me to explain something to someone with complete satisfaction vs the time I would lose to do something productive.

When one starts to give up on talking because it is tough, it becomes a self-fulling prophecy: the less you talk the harder it becomes to explain something so the the less you talk and so on. I even find myself losing my English proficiency without people to talk to on a regular basis. The prospect of that is freighting so I've decided to try and keep up with my English through writing and thought, this is the biggest thing I've miss about having roommates; having good communication.

Sunday, February 28, 2010

Mascarpone meat balls

The nice thing about using a bicycle is that it is easier to part in the city compared to a scooter and I've been visiting the nicer grocery stores which are a little ways off from where I live to pick up some better (and cheaper!) ingredients for cooking.

I found a great recipe for meatballs using ricotta cheese. Unfortunately I couldn't find ricotta cheese and substituted it for marscapone cheese instead. The recipe calls for ground beef, parsley (and plenty of it), diced and slightly fried onions with garlic, bread crumbs, an egg and salt and pepper to taste.


The meat balls made at first doesn't look like the most appetizing thing in the world as they look very gooey at first, however the point of the cheese is to keep the meatballs damp and moist after cooking. I can tell you that the cheese did an excellent job of doing that.

After frying the meat balls in olive oil and soaking out the oil with tissue paper, I dumped in 2 chopped tomatoes and added a little tomato sauce for some extra kick which led to the following.


Now those look like great meatballs. The cooking process took about 20~30 minutes and good care is required when flipping these meat balls at first as they seemed a little easy to break. But after being cooked through thoroughly, they hold together quite nicely. After that, I just had to put them over some spaghetti and I was good for dinner.


The image was a little blurry since I was more interested in eating dinner than taking photos. But those were the most juicy meatballs I've ever had. Something I'll make time to do again.

My new cross bike

It's winter and in an effort to get into more shape, I've decided to buy a new bicycle --> a cross bike, which is a hybrid between a road bike and a mountain bike. The easiest way to describe the bike is a road bike (the ones with really thin wheels) with slightly thicker wheels.

I did some shopping around at various stores near by where lived and most of these bikes go for about $500~$700 for a cheap cross bike, but with the advent of the internet, I managed to find one going for about $400 which was a good deal in my books.

The bike I bought is a 11.5 kg, 24 speed, aluminum body cross bike. The thing arrived last month and I am loving the things to bits. The last time I had a bike with any sort of real gearing was when I was in Canada and I am quite certain that the old bike I had was easily in the 20 kg range. The bike I got looks like this:

The new cross bike

This puts out an incredible amount of speed with barely any input in pedaling power. I estimate that I can easily go 30 km/h and pushing it a little, up to about 40 km/h. I am certain that I am a thorn in most driver's sides as I am a pain in the rear to pass in single lane streets-- just going fast enough that it takes more than a few second window to pass me that it's find to find that opening in the on coming lane. As much as I might be a pain for the drivers, I really enjoy riding this bike.

I really never was that interested in long distance cycling before but after taking this bike out for a spin after work and on sunny weekends, I can easily see my self going on 30 km+ adventures. It is much easier to make the decision to stop somewhere and check things out on a bike than compared to driving in a car or riding my scooter; a car being big to park on the side of the road and a scooter goes fast enough making it hard to make the spit second decision to stop somewhere (I usually end up doubling back if I see something interesting). Riding a bike around town is great for photo shoot adventures and below are just a few shots of what I've taken on a ride I did in early February:

A bridge under construction


A rice field after harvest

Though I've have a scooter, this bike gives me new reason to go out exploring again and I am having a great time doing it. My next long ride will be down to Kamakura, which is a wonderful stretch of beach about 15 km from where I live. Plenty of things to see and eat there so I'll be looking forward to touring around during the next sunny weekend. If that goes well, I am looking to trying a weekend tour where I'll push about 150~200 km to go from where I live to Tokyo and then come back home.

For long tours, I am tempted at buying a GPS and playing around with geo-tagging photos, where my photos are automatically tagged to where they were taken. It would be awesome to keep track of all the interesting places I've visited. My friends have recommend that I get an iPhone since it had a built in GPS. It's a very tempting proposition and the costs in Japan are fairly good. Many people use the iPhone for data only and pay about $25/month for it so it's something I'll have to look into.

The goal is to slim down and remove some excess fat for the summer, we'll see how this goes!

Sunday, February 21, 2010

More writing in a bit...

Bought a new cross bike recently and have been riding it to bits lately.

Been quite an active weekend and will have photos up in a bit. It's hard finding time to relax, write, go out and do things and juggle work all at the same time.

I read in a book once, that once you start working, life becomes a process of making sacrifices. As much as I hate the thought of it, it seems kind of true.

Friday, February 12, 2010

Visualizing the Stock Market

I've finally gotten the stock market analysis program up to a point where I can start plotting data again. There has been some issues with robustness of the program vs the data I am using so I've had to lots of debugging and internal checks to get the code base where it is now. I am confident for the time being that I should be able to start ramping up on writing code to analyze general stock market data to understand the stock market better.

This project has been nearly 2~3 years since starting as a pet project while I was in university. The code base was originally developed in Matlab, but had many limitations when it came to running parallel processes and speed issues. After nearly 3~4 rewrites of the code base, I have finally settled down on the data structures and how to interact with the data. There is a saying when it comes to programming in that you should be prepared to throw out the first few versions of your software.

The program I am developing at the moment is mostly educational, to help me look at the stock market in different ways compared to what is presented at most financial webpages. Looking at the stock market through the S&P 500 and the Dow Jones Industrial index gives a very limited look at the entire stock market and there is a lot of information lost when everything is averaged together. Why look at only 100 to 500 stocks when you can look at nearly 3400 all at once to have an idea of what is going on?

Though I have been participating in the stock market in the last 4~5 years, I never did feel that I understood the big picture of the stock market. The most basic question that I desire to understand is to find out the "right price" for a share in some company. I have read a few investment books and most of them give the general idea that companies with good growing net incomes, low debt and risk factors are good companies to invest in. I generally would have to agree, but what price would you pay for a share in that company? If the share was $20 would you buy it? What about if it was $50 instead? Would it still be a good buy?

The problem with the stock market is that there is no canonical analysis technique to determine the price of a stock. Canonical, being a procedural method when applied by any person result in the same answer. Thus there is no way to say "because condition A therefore the result is B." At best, we may only make predictions, in other words "because condition A result is probably B." Because of this mode of thought, I believe that it is helpful to take a statistical approach to looking at the stock market (though I am against technical trading). In this endeavor, it is necessary to look collect and analyze larger amounts of data an apply decision making strategies and determine how often you are "right" (where being "right is still ill defined at the moment...)

The first few phases of this project has finally been completed, where I have been finally able to get stock market data and plot them for the majority of the listed companies. I've made one plot, which is a Share Price vs EPS plot. One would generally expect that the share price is somewhat correlated to the EPS, which is something we see here with a very wide band going upwards and towards the right in this plot.

Share Price vs EPS

What we also notice from this plot is that there is a large scattering of points to the left side of the graph and with few points scattered to the right. Points to the far left represent stocks that are probably over valued and points to the right are stocks that are possibly undervalued. From what we see in the plot here is that there are many companies out there with a very negative EPS but still high stock price. What has yet to be determined is if the market is expecting those stocks to recover or if those stocks are truly over priced.

Sunday, January 31, 2010

The art of seduction

I started reading a book today because I had something interesting happen to me yesterday.

I was at a party hosted by a friend (a wedding/singles after party) for people to mingle and I was there just to meet people. I do what that should come naturally, meet and introduce yourself to the people around you. So it turns out that I met a very pretty Singaporean babe that just recently moved to Japan. Very out doorsy and we had lots to talk about. The conversation was great and we kicked it off really well.

While at the bar, there were some other guys hovering about, I didn't realize it at the time but I was being sized up as a competitor buy some English guys eager for my friend. Over the course of the night, I realized that I had already missed the last train home and casually asked if I could stay over till the morning, with obviously no ulterior motives. I generally don't like to be a "player" as a personal preference. One of the odd things about me is that sometimes I don't realize that I was subconsciously seducing this person since the conversation was going pretty well and some other guys were wanting in on the action. How they played me off was pretty slick but they couldn't separate the girl from me through out the entire evening.

One guy ran cover to try and get me into a conversation with him while the other guy tried to work the girl elsewhere. I caught on near the end and the ironic thing is that they got so completely desperate that after getting the girl's phone number to try and invite her after the party out for drinks. The ending was that I got double teamed by these guys and they confronted me to "get lost" in a subliminal way. I wasn't interested in bedding the girl, though she would have been fun to hang out with. I wasn't looking for a fight and buggered off and after replaying the events through out the evening in my head and everything clicked and I realized my mistake, I should have put up a fight and told them to screw off.

I decided to start reading a book today, called "The art of seduction" since I had a feeling that I might find something interesting about today's event, an analysis of the characters I bumped into today. I've only gotten through the preface and found this gem:

"Finally, seducers are completely amoral in their approach to life. It is all
a game, an arena for play. Knowing that the moralists, the crabbed repressed
types who croak about the evils of the seducer, secretly envy their power,
they do not concern themselves with other people's opinions."
-The Art of Seduction

Immediately the image of the two guys that worked me for the girl came to mind. I plan on reading through this book because it's a fascinating read to help me understand the games these people play and counter them. Feels like politics but it's a game that I am going to have to know how to play.

I might have lost this time around, but it was an interesting eye opener. Also as an aside, the event I went was filled with people in the financial world, all sorts of bankers and etc. The one thing that I felt was that many of them had the "seducer" archetype embedded in them in some manner. Power hungry, commanding, persuasive. As long as you're their friend you're fine, but if you're on the wrong side, all bets are off. It's a cut-throat world.

Wednesday, January 27, 2010

Being paid by the hour = work stays at work

I am paid pretty much by the hour, some fixed rate during the day and hourly for overtime. The one thing I realized is that I've developed a "if I'm not going to be paid for it, then I am not going to do it" type attitude. Meaning that I don't generally take work home to do during my off hours.

It's an interesting contrast compared to my university days when there was no such divide; the objective was to get the best possible grades in class and thus I did what I had to get good grades. It would be like the difference between getting grades for "going to class" versus "doing well on a test." The difference being similar to a salary vs performance based pay.

My time is as such, allocated in such a manner. If I have work to do, I'll be sure to try and to it at work, even though it might be nice to work from the comfort of home from time to time. When I am home and want to study something like the stock market and figure out how to profit on it, then I'd gladly spend my evenings doing research.

I guess, it's about following the incentive, but in this case, it seems to be that the room for personal development is more obvious compared to working a salary based job.

Sunday, January 24, 2010

Having a good software design document is important

I've come to the point in my software project where it's starting to get hard to manage making tweaks to my code and I am starting to realize that it would have been nice to have a software design document to keep track of what is going on in the code. I'm getting to the point where making a tweak in one part of my code requires tweaking of other bits of code to make everything work together properly is starting to consume a lot of time. This is one reason why sometimes rewriting things from the ground up can be faster than incrementally modifying a program.

Writing a program is like writing an essay. In the case of the essay, you are writing to figure out what you want to say. Sometimes after many paragraphs, thesis', topic sentences and self reflecting discussions later, the initial premise of the essay could be completely or partially wrong, resulting in a rewrite of various sections. This is especially so for long or complicated essays and often having a outline of what you want to write can be a huge time saver-- instead of writing 2000 words to and then realizing that the logic was bad, you might have been able to write an outline in 200 words and figured that out earlier. It also helps when it comes to keeping track of what needs to be said.

In the case of a program, you are writing a set of procedures on what to do with data. So instead of having a thesis, topic sentences and discussions you are describing sets of data and the the kinds of operations that must be performed on the data. The difference between the essay and writing a program is the difference between figuring out what you want to say versus what you want to do.

Programming is an organic process

Like writing and essay to figure something out, writing a program is about figuring out what you want to do and how you're going to do it. For my current project with parsing html data from financial webpages and then performing analysis, I didn't have debugging in mind and decided that it would be OK to download data from the web, parse the HTML in memory, save the values in a table and then save it when I was done processing everything. I ran into significant problems when the program choked on bad html data and crashed. Since I wasn't saving the webpage in question, I wasn't able to easily recreate the error and I would have to manually download the webpage and then perform an analysis on my own. After that, I would restart the process and hope that I wouldn't run into another problem (which I usually did!).

What I learned from that experience was that it was important to keep a hard copy of the raw data and write a parsing module that would be able to look at bad data, write a report and continue onwards. When I first designed my program, I expected all available data to be properly formatted, which unfortunately wasn't true. The result of this ordeal resulted in me rewriting my download module from processing data on the fly (and thus saving HD space) to saving the data first and then separating the parsing module and have it access and read the HTML file from the hard drive instead.

Other problems also started to creep up, I was also incorporating data from both yahoo and google and I assumed that I would be able to get complete data from both financial sites. Unfortunately, that wasn't the case and there were many times when my analysis module would break down because I was missing data. I spent plenty of time debating what was the best solution to deal with this problem. Do I have the analysis module detect the missing data? or do I go back into the parsing module and add functionality to prevent data sets with missing data from getting put into the database? While writing code for the analysis module, it's tempting to just add some checking functionality there since it would break my train of thought... I used to build in functionality where ever I needed it without concern for organization. This would balloon into a rat's nest of functions scattered all over in the code that became problematic in figuring out what piece of code was doing what.

Walking the line between a creative and structured process

Writing code is both a creative and structured process, a point that I didn't appreciate until now. There is the design and organization aspect where one needs to decide the kinds of modules and the input-output functionality required for each module which would fall under the creative process. The structured process would be taking the outlined requirements and then translating that in to robust and tested code. It sounds easy when things are properly broken down, but it can turn into a hairy mess when one starts to realize that there were some missing things in the initial design. Without a design document, it becomes tempting to start making design decisions on the fly to get things done or if one start thinking too much it becomes pain to try and visualize the whole program and figure out how things might affect one or another part of the code.

I've been in both situations where I would an hour trying to visualize the entire program and trying to make a decision on what to do. After finally making a decision, the implementation might take only 20 minutes and I'd already be exhausted from all the thinking and still not be confident that I made the right decision. Running into road blocks like these can be a really frustrating experience.

All of this can be avoided by keeping a well maintained design document that describes the functionality of the program in it's current state where it can be used as a reference for further design revisions. Writing a design document, though, doesn't particularly feel like really coding and it is tempting to skip over it, but I realize now that keeping a decent outline of code and it's status is really helpful. I'll probably be spending my next few slots of free time creating a design document.

Saturday, January 23, 2010

You're lucky if it's "garbage in, garbage out"

When it comes to code, you don't usually have control over the data coming in. Usually I write code that I use on my own, when I know what kind of input to expect from myself or other parts of the program. Things don't break quite as easily. But when it comes to dealing with information out of the web, especially parsing data out of an html file, you don't have that luxury. Things can break on a moment's notice when someone decides to change the data format or communication errors resulting in bad data.

I can have some primitive code up and running pretty quick but the program will crash at the first sign of bad input. If you're analyzing large data sets, the last thing that you want is the code crashing when you have bad data. Graceful error handling is important and also a pain in the ass to deal with.

Firstly there are a whole slew of potential errors that could occur that are hard to predict. Download connections could be reset, the available data could be incomplete, there could be an error in the input format. Then if you are cross referencing data from other sources, you have to make sure that the data you want to look at for all sources is available and who knows how things might break in the future.

Having robust code that can detect errors and report back can easily double the effort required to write a program. It's hard to realize what needs to be made more robust until things start breaking. I had a basic version of a stock analysis program working last year but I was continually hacking parts of the program to ignore bad data. I generally resorted to "execute and pray" kind of tactic to see if I would get any results.

And so error handling and data integrity verification has become another important pillar to good programming that I've just realized and will have to spend more time devising a good strategy on dealing with this kind of stuff.

Friday, January 22, 2010

Positive pressure

I came home early tonight, 7 being relatively early for Japan.

My work schedule last year in was just damn busy and I honestly needed a break. I had 2 weeks of during the winter and I cane back to work on the 5th of this month and I still don't really feel like working that hard. Nope, none of those 4 hours over time everyday kind of schedule. I just want to see the clock hit 5:30 and work a little bit more and then head home to rest.

And I have been in this resting mode for the last few weeks. Nothing particularly productive being done, but just doing some occasional studying, programming and watching a hell of a lot of The West Wing, which is a series about really busy people running the White House, which I find is really ironic for a guy like me.

Right now, I don't have any real motivation at the moment. The work just doesn't stop flowing and there is alwys some issue that needs to be dealt with; welcome to the world of R&D. As much as the end result of the project is going to be sexy, the process it self is very far from it, and I hate boring work. I wonder what would be exciting work... then again I might be afraid of the answer.

So with the work being a little on the boring side, I have realized one thing is that I've become complacent with my way of life and that way of life is just "getting by" as in finishing work, coming home, taking a breather and repeating the process till the weekend until I use that to relax.

This life style has turned into a habit, a habit that I am finding hard to break out of. I know that I should be doing something new or at least progressing on some kind of goal, but it's oh so easy to just work, come home, rest and repeat. Creatures of habit as some people might consider us.

So I've looked for change, something to help me break out of this habit and to do something I feel excited about. It's strange to realize that I haven't felt excited about doing something in a long time, not since going backpacking through Asia or another time that I thought it would be so cool to make an equalizer circuit for a presentation on Lapalce transforms for a seminar.

I miss feeling excited about doing something and being with people that I can be excited with. Not just to do something crazy like a dare but excited in a productive way, the desire to push my self beyond boundaries to do something new. So right now, I am looking for something to be excited about, some positive pressure in life to do something enjoyable. Gotta find a way to break the habit.

Monday, January 18, 2010

Insufficient data vs a bad model

I nearly blew a gasket trying to explain to a co-worker the difference between a calculation model being incomplete and having insufficient data. I was trying to do something a little tricky which these guys have never done, calculate the fundamental parameters of a diode using measured current-voltage data.

The problem I was trying to solve was backwards from the problems that most text books give you. The text books give you the diode parameters and maybe a resistor in the circuit and you had to go and calcualate the current flowing through the circuit at some voltage.

I managed to setup the basic diode resistor equation and then startted back solving for the unknown coefficients. For those that are interested the equation is:

V = I*R + n*Vth*Ln(I/I_s + 1)

with the unknown factors being n, Is and R and you are given a set of IV data with some noise.

This problem is impossible to solve algebraically so one does need to use a numerical solver to find the most optimal values of n, Is and R to fit some modeled data to the curve. Obviously there are likely other effects that aren't in the model, such as temperature effects which may cause the resistance to change. I made the simplyifying assumption that the temperature change was insignificant enough to ignore and proceeded to do my calculations through a program I wrote.

The results I got was interesting, that I realized that we were taking insufficient data to for my simulator to make an accurate fit. For those that know diodes, diodes are non-linear devices, where the amount of current that goes through them is exponential in voltage or I = Is*e(V/Vth), resistors on the other hand, are linear devices and the current that goes through resistors is proportional to the voltage or I = I/R.

The interesting thing about having a diode and resistor in series is that the diode starts off as being the current limiting device at really low voltages (because the exponential is really small at first) then the resistor becomes the current limiting component at higher voltages. The problem was that our measurements had the current and voltage too low for us me to calculate a reasonable value for resistance, since resistance measurements becomes far more accurate because the resistor is influencing the circuit the most. For example, I modeled out a 1300 ohm resistance with a limited data set and then a 200 ohm resistance with an expanded data set.

Immediately after, everyone thought that the model was wrong since a different resistance was coming out after using a data say from 0 to 600 uA versus 0 to 2 mA. The biggest argument was that the model was flawed because I was getting different current values using different ranges of data. My head wanted to explode because I was telling them and had verified that we were getting in sufficient data.

The simplest example to illustrate this would be like the following example. Suppose that you had the following function: y = -a*x + b*x^2 + c*x^4 where a, b and c are unknown. You can measure both (x,y) and your objective is to find (a,b,c). There is some measurement noise when you get y and y is > 0

Suppose that you took data with x between 0 and 1, -a*x term is going to be the strongest and you'll probably be able to rig the equation to be always positive for some value of (a,b,c) and look about right for x between 0 and 1. But what if you took the same parameters and measured beyond [0,1] and up to [0,100]? How good would your fit be then? if your c*x^4 term had a lot of error, then the resulting graph is going to be out of whack. The (a,b,c) are going to have to be rejiggled so that the fit works well for both [0,1] and [0,100], the whole range. The values might change drastically!

And that is the problem when people try to fit limited data with higher order polynomic or non-linear functions. You could have many different functions that could describe a line segment very well, but everything falls apart when the line segment is extended, because the higher order terms were not fitted well.

I tried to explain that with all my might in Japanese. But they just didn't get it and they kept going with that the model was probably missing a few things. I even back calculated and showed reversed approximations giving a confidence interval down to 12% on the data, but alas no dice.

This is quite a problem when most people I work with are experimentalists, they just do stuff to see if things work or not. When it comes to simulation, programming or theoretical stuff, they know the basics but the real fruits are hidden in the details. Since we make some of these devices, it is important that they are characterized properly so we might have a good idea on what factors might impact the performance of these devices. Just saying that voltage is up or down isn't sufficient because you want to go after the biggest impact factors when improving things first.

Saturday, January 16, 2010

Update on the Stock Analysis Project

From text editor to IDE

I started learning a language called Python about 2 years ago after coming back from some traveling. The reason for that was because I fell in love with a dynamically typed, compiled on the fly interpretive language called Matlab which I used for a variety of scientific calculations.

The language had some limitations in the sense that it was slow and I hadn't figured out a way to run multi-threaded programs when it came to doing downloading and parsing html data. The bottle neck when dealing with data in this case is not the PC, but the speed at which the online servers can pump data into my computer. To alleviate this problem, I moved onto a different language called python.

In following my pursuit of a language with dynamically typed variables, easy methods to handle arrays of data and a large breath of built in packages, learning to use this language took some time at first but it would only take me a week to make my first real program: a program to download and compare price vs measured performance of a CPU with published CPU data online.

All of this was written without the luxury of an integrated development environment, which meant a text editor, compiler and debugging environment. I spent the better first part of 2 years writing code in the equivalent of notepad. Maintaining code in a plain text editor is a pain but I stuck with it since it was simple and I didn't want to have learning how to use a IDE getting in the way of learning a new programming language.

As of last month, I've finally installed a free IDE called Eclipse and the Python plug-in from pydev. Eclipse is an open software IDE written in Java designed to run on both Windows and Linux. I still remember when Microsoft Visual Studio was the the big software suite costing a few hundred dollars. Now all of this for nearly any language is available for free. I am impressed with how far things have come in the open source community.

It took a few weeks to learn the basics of learning how to program with the IDE and I am getting more comfortable with it; and the benefits are great. Code organization has improved, automatic look up of functions is awesome, a variable spell checker with a real time code parser in the background to highlight bad programming syntax cuts down on development time. The debugger is useful as I can trace how variables are accessed and if the right data is going to the right place while the program is running. I still have many things to learn.

For the past 4 weeks I have been migrating the stock market analysis code into a format that makes it easier to manage with the IDE. I used to keep all my code in a single directory in different importable files, this made things messy and hard to find. I've finally reorganized and divvied out the code into modules which made things easier to manage and track problems. While moving the code over I've also been rewriting significant chunks of code to make things cleaner as I've found some really ugly bits of code.

What are my objectives with this program?

There is a lot about the stock market that I don't know. I blew a lot of cash after the crash last year, I had good predictions about where the economy was going but was terrible on the execution. Being able to make economic predictions doesn't necessarily mean that you are going to make good trades. My biggest mistakes were leveraging myself too much and was negligent in determining a good price and contingencies. In order to correct these mistakes and fill my informational gap, I am developing a stock analysis software to help me in evaluating stocks and help make better decisions.

Comparing against having my own analysis program compared against online stock screeners, the online screeners are limited to the search parameters and conditions provided. The problem with looking at search terms like PE, EPS and asset/debt ratio independently is that you can't combine the information into a more comprehensive analysis function.

For example, what is the true/implied value of a company's share being sold on the market. This is important when determining when a share is expensive or cheap. When a hot tech stock is jumping in price, at what point do you say this share is over-priced or still have more room to grow? The importance of answering these questions is directly related to the success and failure of one's trading strategy. Because if you don't know when to get in and out then you're asking for a lot of trouble.

This is the biggest challenge when it comes to the stock market; knowing how to valuate the price of a stock. When a person says that the stock is expensive or cheap, I want to know in relation to what data and the direct calculations instead of hand wavy analysis you might see on mad money. For those that might be interested in taking a look at success rates of prominent stock gurus, take a look at the continually updated list at CXO. Most of these gurus are close to the 50% range with a few in the 60% and 40% range. I might as well flip a coin and pray, but I'd rather do better.

What I want to be able to do with the software I am developing is come up with a technique to calculate the intrinsic value of a share based on financial data provided from a company to determine a fair value of the share and market expectations of where the company is going in the next quarter or few years. If the intrinsic value of a stock is at price 'x' and the market is trading at 'y' then the market is expecting that the worth of the company to rise in the future to justify price 'y'.

I have found no screener that calculates the intrinsic value of a stock and I have taken it upon myself to develop a program to test different valuation models to find something that works. Of course, no valuation model is perfectly correct and it would be nice to back test against historical data to find something that works most of the time. As a human being, I am limited by the amount of data I look at and perform calculations, I've decided to enlist the help of a computer and hopefully be able to make well informed decisions in the future.

Programming objectives

Most of my programming experience comes from numerical analysis of experimental data sets. In most of these projects, I would just need to write a very simple program to take measurement data and another program to perform analysis. Unfortunately, I've never needed skills to manage complicated data structures, program modules and software architecture. Making good software design decisions is important to easily add new features without requiring a complete rewrite of code. There are still many things that I still need to learn.

In list form here are a few of those programming objectives:
  1. Develop skills in software architecture
  2. Become familiar with dealing with large and complicated data sets
  3. Learn what kind of data structure to use and when
  4. Develop robust code that can automatically handle errors
  5. Learn module unit testing techniques
  6. Improve programming speed
  7. Become more familiar with using IDEs
  8. Learn how to make a distributable software package
  9. Learn how to make a user interface (meaning: also learning event driven programming)
Knowing good software design is a blessing as it means taking a complicated programming problem and making it simpler. I've just managed to decide on the implementation of a simple analysis engine design. Instead of writing a hard coded loop for every analysis run, I can just import functions and requirements to the engine and let it do the work instead. Now I don't have to keep track of what code when where and I am starting to see the beauty of functional programming, which was a topic that used to go over my head.

I still have much coding work to do but hopefully I'll be able to produce some interesting results in the future.

Sunday, January 03, 2010

2009 Yearly Expenditures

It's that time of year again, the annual review of my living expenses. The 2009 expenditure review will be the 4th consecutive year I've been keeping track of all my expenses. For now, I will be posting my 2009 expenditures and be comparing against my 2008 expenditures. For those that are interested my 2008 and 2007 expenditure charts are here.

Firstly let's take a look at 2009's monthly expenditure bar chart:


2009 Monthly Expenditures (click for a larger image)

As usual, my expenses have been broken down into Food, Goods, Transport, Service, Room, Entertainment, Travel and (Salary) Deduction categories.

Food:

Annual Total: 443,727 Yen ($5,014.12 CAD)
Monthly Average: 36,977 Yen/month ($417.84 CAD/month)

At first glance we see that the my food expenditures have been some what varied through out the year. The cheapest being in January for reasons I am not sure about. The monthly average I spent on food was 36,977 Yen and for January where I spent 21,272 yen for food. I highly doubt that I ate 35% less food in January, but it might have been a result of being treated to a few lunches, being on a ski trip and attending plenty of post new year's parties. The fluctuations in monthly food prices is likely a result of me not having time to cook and eating out due to a busy work schedule.

Goods:

Annual Total: 189,725 Yen ($2,143 CAD)
Monthly Average: 15,810 Yen/month ($178.66 CAD/month)

As seen in the graph, there I've made only a few large purchases in August and September, those purchases being a TV capture card + 2x 1 TB hard drives, a few memory cards and the new Asus EEE PC netbook that I now use while on small trips. There was one other item I bought in February which was a $100 project bench for my room. Other then that, most physical good purchases were just small items.

Transport:

Annual Total: 127,714 Yen ($1,443.17 CAD)
Monthly Average: 10,642 Yen/Month ($120.26 CAD/Month)

Transportation costs for this year was quite low. I generally travel by scooter to pick up groceries. I use the trains on the weekends when I have a few events to attend in Tokyo, otherwise I would usually spend the weekend at home doing some reading or relaxing.

Service:

Annual Total: 130,190 Yen ($1,471.15 CAD)
Monthly Average: 10,849 Yen/Month ($122.60 CAD/Month)

In the service category, there were only 2 main expenditures my cell phone monthly fees, my gym subscription and internet service. I find it rather interesting that I spent more money in the services category compared to the total amount of goods I bought.

Room:

Annual Total: 262,162 Yen ($2,962.43 CAD)
Monthly Average: 21,846 Yen/Month ($246.87 CAD/Month)

Nothing too much to say here other than that my room related costs were pretty fixed. I am saving a bundle by living at the company dorm. These monthly costs include water, electricity and rent.

Travel:

Annual Total: 302,437 Yen ($3,417.54 CAD)
Monthly Average: 25,203 Yen/Month ($284.80 CAD/Month)

As noticeable by the bar graph, I go traveling somewhere at a rate of about once every 2 months. This year, most of my adventures has been through domestic travel to the country side. My travels included a trip to Okinawa, 2 trips to Nagano, 1 trip to Sendai and a trip to Yamanashi. For the mount of traveling I've done this year, the numbers look quite reasonable.

Deductions:

Annual Total: 2,852,197 Yen ($11,241.69 CAD)
Monthly Average: 237,683 Yen ($936.81 CAD)

Taxes this year were kicked up a notch for me as salary deductions from municipal income taxes occur 1 year after the start of work. The few blips seen on the bar charts represent taxes paid due to summer and winter bonuses in Japan. There is an additional blip in October as a result of paying a lump sum into a pension plan which I didn't have to pay at first when I came to Japan, but something I had to pay after I started working.

Now for a quick comparison between my 2008 and 2009 expenditures.


2008 vs 2009 Annual Total Expenditure Table

I've removed the pay cheque deductions to take a look at my living expenses directly. According to the data, it seems that purchases are down all across the board except for the food category. I've just been eating out a little more which has driven my food expenses up a little more. For 2009, there were less large purchases which has driven the amount of money spent on goods down. The largest purchase for me last year was a ~$1000 computer and a few misc things after moving which accounts for the $1,500 difference. The service group remains largely unchanged. The rooming costs have decreased. 2008 included 4 months in Sendai where I paid higher rent than I do currently in the company dormitory. Entertainment costs remain largely unchanged. Travel expenses this year are down by about $2,000 which is directly related to a return trip to Canada for a wedding in Toronto plus a stop in Vancouver.

The total difference between 2008 and 2009 expenditures is a total less of $3,797.49, or a 15.32% reduction in spending. This is a number that would probably have most economists in tears. On average, I spent about $1,749 in living expenses, I think that this figure is a quite reasonable number for living in Japan. If I were not living in the company dorm, monthly expenses would probably be up by about $500/month due to rent to about $2,250 for living about 1 hour outside of Tokyo. Living around the Tokyo area isn't all that expensive that most people might make it to be, but if you want to live somewhere pretty posh, then that might be a different story, but that goes the same way for anywhere else.

So, there's 2009 for you and it was a relatively cheap year.

Friday, January 01, 2010

4 Days and 3 nights in Okinawa

This trip was planned as sort of a get away from the Tokyo and to finally do some vacationing after the long hours I've been doing at work as a chance to go somewhere and relax for a few days. At first, I was looking into getting out of the country so somewhere warm like Bali, Indonesia or somewhere but unfortunately to my dismay, most of the tickets were booked up. By a stroke of luck, I managed to find a travel package to Okinawa with a return ticket, 1 days of accommodation and 4 days worth of car rental included for about $320 and so I was hooked. This is even cheaper compared to just directly booking a round ticket from Okinawa as the tickets themselves would have ran me $360.

Okinawa is probably best described as the Hawaii of Japan, though the Okinawan islands aren't as developed as Hawaii. The islands are fairly south of Japan, putting them in the tropics or sub-tropics region of the equator with temperatures for December ranging in the low 20 Celsius range.

A Map of Okinawa ripped of some guy's webpage

The Okinawan islands have an interesting history given that they are the most southern islands in Japan, having been used in trade between Korea, China, Malaysia and other countries in South East Asia. As a result, the Okinawan culture has many Chinese influences, especially from what I saw in the historical buildings and castles I saw.

Shurijo Castle, Center of Government and Religious activities in Okinawa during the 14th Century (source: Wikipedia)

The throne room

The color red is obviously prominent here, red representing good luck and prosperity in Chinese culture. All other castles in Japan generally do not use the red but rather black and white instead.

As a result of close relations with countries in South East Asia, it is often said by the Japanese living in Tokyo and else where that Okinawa is sort of like a different country. From what I have heard, the culture and language can be quite different from standard Japanese as a result from trade with other countries. Older people in Okinawa apparently speak the Okinawan dialect of Japanese, for which most ordinary Japanese people wouldn't be able to understand. However, during my travels in Okinawa, I didn't find that to be the case as most people spoke standard Japanese.

The weather I experienced for the first 2 days was excellent with plenty of sun. I had a chance to explore the outdoors. The beaches in Okinawa were what you would expect from an island in the tropics. Very clear/transparent blue seas.

Left: The first white sandy beach I found, Right: Looking down at the water from the top of a cliff, below are corals

The ocean was great to look at but unfortunately the weather didn't hold out for me to find and book a diving trip. When it comes to weather dependent activities, I don't usually like to book in advance in case the weather goes sour. But it would have been a great experience. From what I am told, Okinawa is in the world's top 5 best diving spots. I will have to make a note to come back again to do some diving.

The fauna found in around the island was very tropical looking with palm, banana and papaya trees accentuating the tropical environment. The island it self also appeared to be formed through a volcanic process as some parts of the island had incredibly jagged rock formations near the coast though I wasn't aware of any dormant volcanoes on the island which might have given the impression that you were on another planet.


Left: Palm tree boulevards, Right: Jagged rock formations by the coast

Onwards from the landscape and onwards to food, Okinawa is well known for both their pork and seafood. Though I still am not sure what is generally considered traditional Okinawan cooking, I did have some Okinawan esque cooking while driving around.


Left: Okinawan Soba, Right: A buffet at a cafe

One of the things that was listed in the tour guides I've read was to try out Okinawan Soba, which after eating, was like a cross between soba and udon. The noodles in the soup were thicker and chewier compared to ordinary soba reminding me of udon noodles. The noodles are topped with stewed pork which were quite good. The image on the upper right was a buffet I had at a rather nice cafe, consisting of an assortment of rice, fried chicken, cooked seaweed and fried bitter melon. Bitter melon is apparently, one of those things that tourists ought to try when coming out to Okinawa. I personally thought that bitter melon was something that you couldn't find in Tokyo, but apparently after going to the grocery store just yesterday, I managed to find it in the produce section. If you are wondering what bitter melon is, the image below should give you a good idea, it is also often used in Chinese soups.


Chinese bitter melon

A place where I had a good time looking around on Okinawa was at one of the large markets on "International Street" in Naha, the largest city in Okinawa. The market sells a variety of goods like clothes, bags and food. The food market stood out the most to me.

Being the city slicker that I am, I've generally bought my produce in shrink wrapped packages and brought them home, as most ordinary people would do. The island being well known for their pork and seafood, sells their meats in large chunks compared to what most ordinary grocery stores do. It was a very fascinating sight to see.


Meat for sale at the meat market

It's probably been a while since I've had the chance to see stacks of pork bellies like these in a long while as I probably bet that there are a few places back home which sells meats like these, just by looking at them, they already look much more delicious compared to the usual store packaged meats.

While walking around the markets, I also managed to run unto a "salt shop," selling a variety of different salts from all over the island and around the world. If there was one thing I noticed about salt used in Japan compared to salt in North America is that Japanese salt is much "saltier." In other words, if you're cooking in Japan and you use the same amount of salt that you would usually use in Canada, you're going to be in for one salty meal. I never did dig into that much more since coming to Japan but the clerk at the store was nice enough to give me a nice explanation of all the different tasting salts.


Left: Snow salt found in Okinawa, Right: A section of different salts found in Japan

Of the salts they had, the the salts were ranked on a "smooth to sharp," sharp being "very salty" and smooth being mild. After sampling a few different salts, they recommended to me that sharp salts are generally good for seasoning seafood, which is predominantly used in Japan. The smoother salts are generally used in western cooking. After tasting a few of the smoother kinds of salts, I'd have to say that you want to use those in foods like pop corn, but would want to steer clear of using the sharper salts in a similar situation.

It was a very educational experience through it is the only place that I have ever gone to that has rated the differences in the salts. In all, they had about 50 different basic salts at the store and also a wide variety of mixed salts with herbs.

The last 2 days of the trip was spent visiting some of the old war museums as Okinawa was a very major battle front before the surrender of Japan. Casualties of this battle was very lopsided with the Japanese losing 110,000 compared to the US losing 12,000 soldiers, nearly a 10:1 ratio. One of the reasons for this lopsided victory was that much of the natively living populations on the islands were conscripted into the war effort, even the Japanese school girls being sent into service by attending to the wounded. I did some see some old relics such as old torpedoes and very rusted war equipment.

In general, Okinawa was a nice place to visit, but not as resort-like as I imagined it to be. Many of the buildings looked a bit past their time and traffic over there is a pain as the train system is not as developed compared to the central parts of Japan. Actually, I find traveling by train to be something pleasant compared to going around by car because I know exactly when I'll be able to make it to some place, though it isn't as liberating as being to take a car anywhere.

As a place to live, though the culture is a little more laid back and rural compared to most parts of Japan, it isn't a place I would want to stay for long periods of time. Other than the touring, there isn't a whole lot to do. It was a good trip and if there is a good travel deal, I may fly out to visit again for some diving.

Thursday, December 31, 2009

The power of IB students?

It's new year's eve and I decided to watch a Japanese sing off show which they have every year (this would be their 60th time), in addition they are running a bunch of boring documentaries which for which I am bored out of mine watching.

The world's fattest female model? Putting a guy in a box of ice for 1.5 hours for a new Guinness record? Top 5 most "astounding" UFO videos?

My brain is exploding from boredom. Interestingly I managed to find a site online where we have a bunch of 16 (17?) year old guys in an IB program somewhere doing a marathon game of nearly all the Zelda games to raise money for charity.

It's apparently their second day and they've raised $2,600 already at the time of this writing. They've made a site with streaming video of them playing live with commentary and a IRC like open forum where everyone can post messages while they play. The dialogue is immature and hilarious at the same time, but I am quite amazed at these guys for setting up the entire website.

Goes to show that intellectual prowess does not necessarily have to go hand in hand with maturity.

If you've got time check them out here, they'll be on for only a few more days.

Tuesday, December 22, 2009

The nice thing about eating at home

Winter holidays started Friday for me and it feels great to be taking a break from work. This Saturday was a hotpot party with some friends, Sunday I had a chance to check out a Capoeira (a type of Brazilian martial / dance art) where there were some very excellent performances and then spent the day doing some errands, then to come home and cook some pork chops.

I got a great deal on these pork chops, 4 slabs for about $5 so not all meat in Japan is that expensive. The only thing that can get pretty pricey over here is the beef. If you want chicken, pork or fish, then you're in for a treat.

It's been a while since I did any real cooking. The limitation being time and I don't have a kitchen in my room, not that I let the lack of a kitchen stop me. A good hot plate, which costs about $50 here does a very good job of cooking meat or even for a hot pot. The other reason is that I'll be going on a trip for the next 4 days and it wouldn't be a good thing if the food in the fridge went bad.

I bought some spices a while back and spiced up the port as such in the image below and let it rest for about 10~15 mins. The dry rub consisted of coarse pepper, salt, chili powder, basil, rosemary and some 5-spice mix.

The seasoned pork chops looked a little something like this

After that, I had the hot pot at about 230C ish and started cooking. The one nice thing about using a hot plate for doing cooking is the temperature control -- I have a good idea of how hot the plate is by the setting. The biggest problem with cooking dry spiced chops is that if you cook them at too high of a temperature, the spices end up getting burnt and you lose flavor.

After cooking for about 10 mins

The one unfortunate thing about the hot plate is that the one I have doesn't go to a high enough temperature to do a good searing on the meat, just for aesthetic purposes but for consumption purposes, the pork was great.

I served the pork with rice boiled with an assortment of beans and a side of smoked salmon salad, which looks like something below.

Pork steak served with rice and smoked salmon salad

The dinner was great and I ended up having 2 pork steaks for dinner which was absolutely stuffing. I am sure I managed to put some weight on from this dinner. I still got 2 steaks left and will be having them for lunch and dinner tomorrow before I head off to Okinawa. More pictures to follow after I get back!

Wednesday, December 16, 2009

3 more days till holidays

The holidays just can't come fast enough. I'll be starting my holidays after this Friday and won't be in the office until next year. Yay. It's going to be a much needed break. Will be heading out to Okinawa for a few days and will be back to chill out in Japan for the winter. Getting some relaxing in is going to be great!

Monday, December 14, 2009

If it says "happy new year" then it's going to cost you extra

I looked up on the Japanese postal service website this weekend that postcards cost about 80 cents to send abroad. In Japan, it is rather customary for people to send out post cards for seasonal greetings. I bought a bunch of then wrote them up and sent out 15 of them just today.

I then go back to the site to take a look around and realize that "greeting cards" cost $1.20 to send abroad. If it says "happy birthday," "congratulations" or "merry Christmas," then instead of the usual post card price the price to send out my cards jumps up to the $1.20 price mark. Instead of "net neutrality," I think we need "postal neutrality!"

Long story short, it means that the cards that I spent a few days writing are apparently going to get trashed. If you get your card late, you'll know why... time to do some re writing....

bah humbug!

Tuesday, December 08, 2009

My outlook on the US economy

Obviously from the last post, I have been busy so I haven't had much time to much in depth research as of late into the economy but my forecasts are still going to be bleak for the US economy. I haven't been doing much research as of late so I'll be talking off the hip today, it's late and I should be in bed.

What I will be watching for in the US is their debt and interest levels for the foreseeable future because that will be effecting the value of the US dollar, tax rates and bank interest rates. Interest rates in the US was at about 5% before the whole housing crash, which brought down the interest rate at 0.25%.

Using a future value of money model with the internal rate of return set at the FED interest rate we can calculate for the present value of a security that provides a perpetual return. The present value is multiplied by the annuity by a constant, dependent on the interest rate. I have no time to write the formula here but for those in the know, you know where to look or how to do the calculation.

At 0.25% the factor is 401 and at the FED rate of 5% at 2007 the factor drops down to 21. This model obviously breaks down for very small values of interest rates because the multiplier starts to become huge. As interest rates drop we should expect stock prices to rise. This was exactly what happened as the FED started cutting interest rates. What they were really doing was masking the real drop in equity prices by lowering the FED rates, thus pushing up stock prices. With the FED rates at 0.25%, they have nowhere to go when it comes to rate cuts and the only direction that the interest rates is up. Unless the US decided to pull a Sweden and go for negative interest rates. This scenario is unlikely.

The multiplier curve for the present value of cash as a function of interest rate is very steep at interest rates rise from a very small interest rate. The US economy is still very weak as it is right now and raising interest rates will cause equity and commodity prices to fall considerably. While interest rates are low, however, money will be pumped into the financial system leading to inflation. The drop in the USD is already is a direct result of this. As long as the FED rates continue to be this low and the US continues to pump out debt, expect further devaluation of the USD.

The only thing that will stop value erosion of the USD is if the US economy becomes productive, producing a financial surplus to pay off their debt and with significant enough profits such that the FED can raise rated without killing the economy. I don't think this will be happening for a while.

We've already seeing speculation on a interest rate hike because the USD is getting hammered. If a rate hike does happen, it will probably be done to stave off fears of inflation in the sort term by temporarily driving down prices of say gold and oil, but I believe that the economy is still going down; I think it's just rumor mongering to temporarily stop the drop in USD and rises in gold. The economy will continue to drop until the full extent of bad investments have been realized. In other words, until when the parties that made the bad investments have taken their losses. Unfortunately, these losses are being mitigated from the private sector to the public by bailouts to banks and other large institutions.

Recovery will happen if these institutions become profitable using public money and paying off their debts. If that doesn't happen then these institutions will likely to continue on a "life support system," until someone pulls the plug on them. It's a matter of accepting the losses or trying to pretend that nothing happened and climbing out of a hole with a weight around your neck.

For US economy to improve, we need to see debt numbers to stabilize and see good investments in the economy. Right now, I don't see it. People don't have money to invest and they have too much debt. The people that can probably make the biggest difference are the ones that don't have debt, either people that are too young to have debt or the very rich with no debt. People without debt are the ones with power.

Got sent home early from work; did too much over time

Looks like there are even limits to the Japanese when it comes to doing crazy overtime hours. I've been busy building a new generation of prototype samples. The schedule is kind of tight so I've been working some long hours to get things done. In addition, I managed to develop a simple simulation model to start evaluating our devices.

The guys I work with are hard core experimental types and there seem to be a lack of theorists in the group. From the measurement data we've been collecting, I've found that I can back solve for some device properties like resistance and semiconductor constants. We've never been able to get hard numbers before and this is a first for the group. I ended up staying in the office till 2 am on a Friday night summarizing data and writing up a presentation for our Monday meetings because I knew I'd be busy with experimental work.

Apparently I hit an internal 16 hour work day limit. Meaning that it is usually mandatory for people to take the next day off. Unfortunately on my experimental schedule, I don't have the luxury of taking the next day off. Since I have booked machine time and the experiments must go on. Instead, I got sent home early, at 5 pm, because HR called in to say that I shouldn't be doing any over time. The call was at 4 pm and I got into the office by 7 am and I was already on overtime.

I spent the weekend chilling out, doing nothing but after getting home and eating dinner, I konked out and slept for 4 hours. It's 1:30 am now and I'm need to get into the office by 7 am again to start taking data. The problem is that I'm not sleepy. Tomorrow is going to be rough.

Looking forward to a vacation and I'll be taking one later this month. But more on that later.

Sunday, December 06, 2009

Do they want a blood sample too?

What does making an online transaction have to be such an intrusive procedure. If I was buying a physical item, I would understand why I would need to provide my address and contact information, but when it comes to buying something like a music subscription to some streaming audio, do they need my address and telephone number?


The payment is done through paypal and this is the amount of detail they want out of people doing transactions through them. When I go in person to make a physical transaction with my card, I am not asked my age, where I live or for any contact information. What next, do they need a blood sample too? I shake my head at this.

Saturday, December 05, 2009

Friday night, at the office till 2 am

I don't know why I did it. I managed to create a crude model of a resistor and a diode and it looks like I can get plenty of data out of some measurement data. I still can't convey complicated thoughts in written Japanese but after finishing experimental work at 11 pm, I was compelled to stay late at the office to finish writing a presentation for a regular Monday meeting.

I gave up writing in Japanese for the first time. I had detailed ideas that I wanted to communicate, that unfortunately are beyond my skills to convey in written Japanese. I find it awkward that I can't think as deeply in a second language and sadly a lot of information does go over my head. Learning to master a second language and being able to communicate in the subtle nuances is tough stuff. There's more to communication than just the words. It's like a good joke; it's about the delivery.

Language is more than just words.