Saturday, March 03, 2012
Diversification out of the Yen
In other news, since approximately November, I've been diversifying myself out of the yen since the yen has skyrocketed after financial crisis and the earthquake last year. The elder Japanese were great savers and have a lot of forex based assets and which may have returned among other things. Personally, I had a feeling that with the YEN-USD trading at about 75 at one point, I thought it would be prudent to start converting yen into other currencies, mainly AUD and CAD. I sold yen about 78 to the AUD and about 79 to CAD. The AUD has rocketed upwards recently which has been a nice upside.
Economically wise, I am not sure at all where the market will be in the next 2~3 months. The Greek debt payment is coming up on a few weeks and the economic conditions in Europe doesn't look really good. There is also a lot of money printing going on driving up the price of the stock market
Semiconductor consumption in China is growing like crazy right now and I think that domestic consumption will increase as affluence increases. Labor in China is still fairly cheap but they are growing fast in terms of technology. Both China and Korea are putting a lot of pressure on Japan since the expensive yen is hampering exports from here.
Japan will have to diversify out their manufacturing, but I think their biggest weakness is that they're not very good at dealing with international business. LG and Samsung are growing like crazy right now and their investment into R&D is huge (easily in the billion dollar range). I think that both China and Korea are going to have some pretty huge growth potential in the future.
As for the US, I think the only thing they really have going for them right now is Silicon Valley as their manufacturing is pretty weak compared to the capacity in Asia. Once Asia has figured out to climb the value chain and get into software, the US is pretty much doomed.
Wednesday, February 15, 2012
Learning how to programmatically generate webpages
The difference between generating scripts and html
Generating dynamic html pages is a very old problem on the internet, one that was first tacked by CGI scrips by the likes of PHP. I never got into the world of PHP scripts because I've always felt that the languages were so limited and ugly looking that I abhorred looking html code. Even the html code for many modern websites can look pretty nasty. The number of attributes per tag and more and the incredible amount of parameters that ones needs to jiggle about is a pain in the rear. Many of those problems have been solved with the advent of Cascading Style Sheets (CSS) which are used to maintain style and formatting through out a website.
I've started looking at templating engines online to learn the frameworks people use to generate html pages and have been pouring through lots and lots of documentation. Most documentation will describe basic syntax and provide a few examples to get you on your way. The biggest thing I generally think about is if doing something a certain way is the most efficient way of doing it.
Since Python has become my mainstay language, I've been looking into templating libraries for Python (for which there are many) and have seen that many of these languages like to embed Python code into content, which is a similar track to what PHP does by embedding PHP code using commented out html and writing code into content. The biggest difference between writing script generating code is different because one generally does needs not worry about "content" and simply needs to worry about generating sequential commands with different parameters. The highly structured nature of writing scripts makes code to generate scripts very easy, where as html content follows no such rule.
To give an example, perhaps I might define commands to generate a 3D object using the following commands:
def boat(width, length, height, location):
hull(width, length, height)
anchor()
motor()
mast()
shift(location)
and then I would simply call the boat function a few times to create a fleet of boats at different locations with varying sizes.
Using code in this manner is great to generate results with small permutations with respect to a general form. The same thing, unfortunately, does not transfer well to text content because text content is not easily generalized to a simple form with small permutations. Most text content is unique and writing a function to generate each and every paragraph is rather meaningless since the main purpose of writing functions is to shrink repetitious tasks into short commands to make life easier.
Since using code to generate text is unfeasible, the best place to use code in a website is to aim for the most structured portions of a website, which are the database components and formatting of content where the application of code is most likely to shine. There still is the ugly part of dealing with html. Should html be 1) completely generated by external functions or 2) should code be embedded into html to generate content? I still haven't figured which is the best way of tackling this problem just yet, but I think embedding python code into websites is ugly and I would much rather have structured data generated outside of an html template and injected later on.
It just means that I have some experimenting to do before adopting a templating framework.
When cash stops being your limiting factor
I still have the blood of a scrappy university student in me, but it bugs me that despite being surrounded by researchers and engineers, no one here really knows how to build their own stuff. And then it dawned upon me, the limiting factor to my success isn't funding, but time because eventually I'll just be able to find the resources I need to put whatever I need together. After that, many things about what makes a successful business, a booming economy or knowing how to become rich started to make sense.
Creating Value (and knowing where to find it)
It sounds obvious, but it's a subtle problem. Hell, I work for a megacorp and despite being surrounded with smart engineers, the company has been posting losses for years. If it were an easy problem to tackle, then every business out there would be profitable. But if you do investing, then you'd learn fairly quickly that many companies do lose money. Being able to create value and knowing how to find it is hard enough, then there is also the funding, timing and competition challenges too.
Creating a successful business requires many successful factors; should any one component be deficient, the business will either be impossible to start or will eventually fail. A successful business requires the logical "and" of all important factors, meaning that running a successful business is an exponentially hard problem.
When exponentially hard problems work in your favor
Suppose every business requires a set of factors to pass. A business will need a market, a product, a talented team, the financial resources, a supply chain and more to pull things off. I've already listed 5 different factors that all must pass before succeeding. But dealing with a hard business problem is a good thing because competitors have to have to deal with similar issues, meaning that it is just as likely for them to fail. The difference is that the more pieces of the business puzzle that you're able to understand and solve, it's one less step to getting a successful business online and creating value for your customers and yourself.
My limiting factor isn't funding
I've got a scrappy side as a result of being a born optimizer and generally frugal. I never had an allowance until after my younger brother started getting one before I did. I used to save up money through money packets at Chinese new years and visits with relatives. With a very uneven lump sum cash flows as a kid, I've been able to stretch those funds far enough that I'd be able to save money from year to year. Despite being adverse to spending money, I still was able to have a good time and learned a lot of about doing thing without the need for spending exuberant amounts of money.
That trait would carry me through university; looking for parts through dumpster diving and building parts through scrap metal at the machine shop turned out to be great skills. I've also seen small businesses put together by students that weren't capital intensive and produced significant returns. It just became apparent to me that huge amounts of capital isn't necessary to create successful businesses or to get things done. I would eventually do the same as well and I once had the Engineering Physics Student Society president come at me a little worried that "we were supposed to be a non-profit organization." I made good money for those guys :)
I remember a time after graduating where my main laptop broke down and the cost to repair one was about 70% of a new one and would take over a month to get back. After being fed up with high repair prices and the risk of being without a computer for a long period of time, I would eventually buy a cheap EEE pc and put together a 1 GHz computer from salvaged parts from the university junk yard. I started learning how to code in Python because it was 1) free and 2) the computer didn't have enough memory to handle a full out install of Windows XP and Matlab running on top of it.
After starting work, I didn't need to ask for permission to buy expensive software like Matlab or Labview to do number crunching and managed to run under the radar, getting things done for nearly nothing. 4 years later, I managed to automate 2 of their machines and slashed a 7 day process down to 2 with my programming experience. The guys at work were floored and started ramping up prototype production thanks to the work I did. It became easy for me to talk my supervisors into buying me a new laptop and nice monitors to work on.
My limiting factor isn't funding; given time, I'll pretty much make it work. And then it hit me-- once you're not cash bound, you're just time bound.
The Time Constraint Problem
Time constraint problem is under appreciated because time as a resource is often taken for granted. Unfortunately time isn't plentiful and opportunities are moving targets-- what might have been a business chance today, may have been filled/saturated by the time you've made preparations to do something about it and then the process repeats. Time over time lost is a terrible situation to be in. Time constraints for smart people is poorly understood and I've found that I don't tackle this problem well because 1) Given time, I am smart enough to learn new things on my own and 2) finding people with the exact knowledge I need is sometimes hard.
The knowledge surface area to solving problems is broad and requires expertise in different areas which is hard for an individual to do alone. The process of discovering important things to know in each field of knowledge is also time expensive. In short, it's hard to be very successful as a lone wolf because you can do only so much within finite time. With smart people however, the price of learning and creating a function immediately drops and a team can get more done in less time making it easier to strike time sensitive opportunities. The challenge is to then bring together smart people, build quickly and leverage knowledge to create profitable business units.
This is exactly what I feel is happening in places like Silicon Valley, where serendipitous meetings of smart people and resources are bumping and reacting to create all sorts of interesting and profitable startups. There aren't a lot of places in the world that has the environment that makes silicon valley unique.
The first part of the question to first solve is to create a critical mass of smart, scrappy people together, where the exchange of skills and knowledge can occur to allow startups to be created. I think there needs to be tool for people to meet and exchange skills or share resources and form partnerships into great business ventures.
All I want right now is a bunch of scrappy but brilliant people to work with to churn out crazy projects lightening fast.
Tuesday, February 14, 2012
Saying goodbye to iPage
My webhosting service finally expired today, I paid about $50 for a year's subscription at www.ipage.com. It was fun to start off with, but in the end, the server that I would eventually try out putting on wordpress installations onto were way too slow for my liking. Considering that my renewal fees would jump to $100 after the first year, I decided against renewing my account.
In addition, I thought that iPage's renewal e-mail messages were sleazy, warning that my payments were "overdue" and warned that my account would be shut down; you guys have it wrong, I didn't like your slow servers and decided not to renew. As a saving grace, your customer support was decent. That's all that I could day.
I've since moved the one domain I had to a different registrar which I am happy with and have switched to using a headless computer that I bought for my serving needs. The computer is equipped with a i5 Core CPU from Intel and 8GB of ram. I had the whole thing put together for about $500. Compared to running a cloud server setup, having my own server is far more cheaper and easier to learn on.
I have since migrated some test installations of wordpress to the new server and playing around with mapping the domain name to my home computer, in addition to having scripts to automatically update my home address since I've got a dynamic IP. I've also finally figured out how to get the webserver to speak with back end code, meaning that I will be able to start putting together server side code to generate websites, which I am looking forward to doing.
There are some back end stacks that I'll be needing to learn, but with the advent of html5, there are a lot of cool things that I can do programatically do instead of doing things in a graphics editor, one of which is automatically generating beautiful buttons, tables and themes for websites. With the advent of webGL as well, making interesting web based interactive applications would be quite interesting as well.
One other thing, I've noticed how important learning good terminal based text editors since I've found myself interacting with code on the server while on the go. I've been picking up emacs recently and though learning new keybindings and how things work was a little annoying at first, I am starting to get a hang of it. Eventually, I'll have some applications out for the web in the coming months and if I have enough traffic to warrant it, I may consider moving to a cloud solution.
Wednesday, February 01, 2012
Some web hosts aren't all that good
I have since started playing around with running my own little box as a host. It's rather cheap and fast on the local net. Still working with pointing domain names around and learning how to access the site from outside my LAN as I am playing around with nginx instead of the standard Apache.
Learning Linux administration stuff is kind of fun too.. couple that with some web programming it could possibly be an interesting adventure. Perhaps I could launch a service in the future? We shall see.
Monday, December 26, 2011
Optimize for investments or salary
There is just so much on my own that I will be able to figure out on my own... then I thought about buying some advanced books to read. Then it hit me, I've got a lot of learning to do and I started to wonder if my efforts in this field would be worthwhile.
It is now also the end of 2011, meaning that my expenses spreadsheet for the year is nearly complete and I have a good idea of how much I've spent and saved for the year. Since moving out of the company dorms and into my own apartment, housing costs for me have skyrocketed and the amount saved dropped by about 33% compared to last year. This is even accounting for increases in salary. But the thing is that doing more research in stock picking may increase my investment returns by a few more percentage points. This begs the question, would I be better off investing that time in developing better skills to raise my salary?
Thus, I've started doing more research into engineering salaries and pay for jobs that I could possibly do and for jobs around the world. Thanks to the exchange rate between the yen and the dollar, the numbers look pretty good, but this is after a lot of overtime pay and travel pay that I got this year. On a dollars/hour basis, I don't think that the hourly salary was all that good.
Tuesday, December 20, 2011
Been Busy
Been really busy the last month and a bit to do any real writing, but a lot has been going on and I haven't had much of a chance to do much writing as of late. I've been flying between Tokyo and Kagoshima nearly weekly to help out with setting up an inspection machine and writing code to speed up the processes. Also, getting paid travel expenses and a small stipend is marginally nice.
On another note, I got a better than usual work review...after all was said and done, however, the better review led to only about a $600 increase in my winter bonus. The software I wrote cut down processing time by about 5 days and gave us more time to analyze data to improve the success rate of the process. If ouput and pay were plotted, the graph would be very sub-linear for the place where I work.
More notes to follow at a later time.
Tuesday, November 15, 2011
Defining the problem actually takes up a lot of time
By the time I got to Kagoshima, some of the engineers have been working on figuring out how to get the process to work and determine an algorithm for sample inspection. Armed with the basic information from these guys, I started writing software through the night shift and my work spawned into a project of it's own.
I've already finished writing an application and trained a technician to take over the job. I've started working on the next version of the program to try and have the entire process automated since my program doesn't work in some special cases. Classic example of the 20-80 rule, where 20% of the effort gets 80% of the output.
I am treading into territory where other people haven't gone into with the data analysis and I've noticed that I am spending less and less time writing code and more time trying to better define the problem and the exceptions that my code needs to deal with before writing any code. It's somewhat frustrating to not be writing code to get things done but I guess it's part of the process.
It's odd how the motion of "doing" something is so closely related to progress, though planning and preparation is also a very important part of solving any sort of problem. Being busy for the sake of being busy is detrimental. I generally like disappearing from the office when working on a tough problem that I haven't managed to wrap my head around and go for a coffee. I find that I understand a problem well, I work infinitely faster because everything is in my head and laid out.
There is something called the "drunken sailor's walk" which is a classic problem that nearly all probability courses covers at some point. After n random steps, the furthest you've traveled away from the origin is related to the root on n. If you walk with direction, the distance traveled is n.
In other words, if you plan things out properly and minimize mistakes, you'd be better off by the factor of a square. If you wonder why there can be such a gap in skill or level in the world sometimes, I think that it is the expression of this phenomenon.
For those that have the time, I suggest reading Richard Hamming's book The Art of Doing Science and Engineering: Learning to Learn, which is a fairly ok read. There are some interesting notes from a well known researcher, from which I gleaned this idea from.
Monday, November 14, 2011
A disappointing experience at a computer store
I put down the cash for server parts last Friday and so far, the CPU, motherboard, case and memory arrived. Since I was going for a server system, I didn't need a monitor or a fancy video card for the system which brought the price of the computer down considerably. When going for the slim computer case, I made the mistake of purchasing one without a built in power supply. Thinking that getting a power supply wouldn't be hard enough, I dropped by the closest physical computer store I could find online only to be incredibly disappointed-- all the power supplies were really expensive and the cheap ones that they were selling were "sold out".
Obviously, I wasn't happy with spending the 20 minute (one way) commute on my scooter to get to the store, spend time looking around to find out that they didn't have what I wanted at a more expensive price.
After getting home, the first thing I did was go online to the Japanese equivalent of "pricegrabber.com" to source a part and I was done with making the order in about 10 minutes. The only difference is that the part will probably arrive in 2 days instead of me having it immediately, but when it comes to being busy, waiting isn't a terrible thing.
Over the past few years, I have been doing more and more online shopping instead of going to stores to buy things instead. It's simply more convenient. I really wonder how much has internet shopping had impacted the retail business and the number of old school stores that have gone out of business as a result of it.
I also move around every 2~3 years making finding new places to buy things fairly important to me somewhat time consuming. Ordering online never ceases to fail me since I get what I want delivered to me quick enough. But back to the computer stores, I really don't understand how they can keep up a business where people have to spend time to go to a place to buy over priced product. The only one possible answer that I can think of is for people that aren't as computer literate to talk to people to get what they need. If that information, too, can be accessed in a manner easy enough online, I think we can kiss the big box computer retail stores goodbye.
Thursday, November 10, 2011
If this then that
An interesting automation site, I thought that the idea was interesting when they went into open beta after Sept. I checked after 2 months to see how they were doing and found that they hadn't updated the blog in 2 months. I think they're dead in the water right now and the people that worked on the site are off working on other things.
From the stock market, business and life. Things take time to happen and you should make it a habit of checking old news. So many thing that were at the front of our mind one day become totally forgotten later. I don't know why the time span for ideas is so short, but it would be wise to periodically check old news from time to time instead of just watching the latest headlines; because just tracking the new and not tracking how things go is meaningless.
Tuesday, November 08, 2011
The Autobiography of Steve Jobs
After about 3.5 days of reading on both the computer and mainly on my iPhone, I've finished the book. I read of the life of a great man. For once history will have something positive to put among heroes because there just haven't all that many in recent history.
As a person to emulate, I doubt that many people would want to be like him; but to every great man, there are key ingredients. I've turned 30 this year and work life practically ends at about 65. If you really want to make a bang at something, have kids and do everything else, there really isn't a whole lot of time. Every moment is precious and I am reminded of that after reading this book.
Never have I been so consumed with putting my mind to doing something in a long while. After reading the autobiography, you can tell it was put together with care, with countless interviews and decent writing. After finding myself so consumed with reading for the past few days, I just came to the realization at how much the internet sucks; as in "holy shit, it really sucks," because there is so much garbage out there.
Maybe I haven't been going to the right places for content but, I've gotten tired of fishing through the needles in the hay stacks of social sites looking for something good; just simply having a good read was so amazingly refreshing. Yes, I will admit there are some good reads on the internet. Some great essays out there even, but nothing as cohesive as a good book. I missed that, I really did.
The other great thing about reading about Steve Jobs is that he was incredibly intolerant of things that bothered him. I found myself to be quite the opposite recently, being as accommodating and accepting as possible that I noticed that I lost a bit of an edge to life. When you get to the point of accommodating to the sub optimal it just turns into a slippery slope of accepting worse and worse. Sometimes you just need to draw the line even if it means you might have to be an ass.
There is a lot about the book that I really enjoyed, but I feel that I would do no justice to even talk about the story because what really is the point about just saying if something was interesting or not? The act of simply talking about something just feels like it has no value to me and in it's own way is what was the story of Steve Jobs about-- making things happen.
Tuesday, November 01, 2011
To get good at the stock market, spend time away from it
Gone are those days and I've gotten better. To be honest, I think the market in general is on tilt, to use a poker term and it is probably best to leave the table as it is and take a drink while the players sort themselves out. Because really, when everyone is playing weird, you just simply can't control risk (even if you are making logical plays).
I'll admit that I had a few of the equities that I held before the crash over the summer drop by 50% percent. There were people out there talking about being glad that they got out and them going on about how much better it was for them to get out early. Some of those tragically massacred equities I held came back to nearly their original prices and I somewhat regretted not putting some more cash into the market. I can't expect to trade with 20/20 foresight and I'll take the bad with the good.
Sure I am a bit down from the market haywire but I am happy to bide my time, earn money from work and wait. More importantly, instead of waiting, have other things to do :)
Sunday, October 30, 2011
Went Jogging for the Halloween Weekend
I woke up, spent the morning doing some research, went out for a jog, came back, had a steak dinner and had the best sleep ever. I naturally woke up at 8 am today feeling particularly great. This is something that I need to repeat more often.
Spend time, doing productive things, go to bed tired from hard work and wake up great. This is how life ought to be lived.
Saturday, October 29, 2011
Deploying to AWS doesn't make sense (not just yet)
I've been mulling the thought of deploying a webserver to Amazon's AWS service as of recently and I've been running the idea through my head multiple times and something just didn't sit right. I've been playing around with a webhosting service for the past year to see what it is like to work with a webhosting service and came to the conclusion that the lack of control is a killer data portability; it is easy to create a blog and write on it, but it is a real pain in the rear to back it up and be able to move it elsewhere should I want to. The other problem is the limited control of software installation I can do, meaning that I would be completely limited to whatever the service provider has installed. This is where Amazon's AWS service comes in.
Amazon's AWS is basically a server instance that you can use, it is very much like having your own computer to play with, install an operating system and then do whatever you want with. I've been doing calculations on price for such a service and the numbers don't look favorable for a single "Small PC" instance which runs for about $744/year. At that price, I could buy a stripped down computer for far less and turn that into a usable server for at least a few years. Transitioning to AWS only would make sense if I needed signifcant computing power beyone what I would provide from home.
I'll be looking into buying a new computer to play with at home.
Saturday, October 15, 2011
Rusty Debating Skills
I, unfortunately, have not developed my Japanese debating skills and for the lack time spend among English speaking peers in Japan, I have found that my debating skills gone rusty and the "thick skin" that one needs to survive a debate has also gone thin. In effect, I believe that I've lost some mental agility and stopped keeping a pool of readily accessible information in my head to make arguments because I've had no need to before. Information retention is terrible at the moment, though some might attribute this to the aging effect, I refuse to accept that as an excuse.
Especially when it comes to dealing with upper management, when making persuasive arguments is especially important for these people to sway executives and push their career upwards. If you want to do well in a career, having good debating/persuasive skills (balanced with it not being aggressive) is absolutely important.
To be honest, I miss my old philosophy class in high school where we used to debate on a variety of topics at 7 am. Sure we would be sleepy as hell, but it was a lot of fun back then.
Playing with some new styles
Wednesday, October 12, 2011
Kick ass and then become a consultant?
Into the second week of October and already cranked out more than 20+ hours of over time. If this was Canadian style flex time, I'd have 3 vacation days stocked up. But this is Japan, so I'll be taking overtime pay instead.
Been working on putting together some software for a project for wafer level analysis. I use a newer language compared to the older guy I work with, Visual Basic vs Python. Programming lightening fast while I have most of the base engine of my detection engine up.
The problem here is that by the end of this year, my stint in Kagoshima will probably be over and my work will need to be passed off to the guys here to continue. The problem is that no one can program in the language that I use. They'll have one of the guys eventually translate the algorithms into their native language.
Interestingly, I really do wonder how often do cases such as these occur, where one guy is able to do a good job that the other guys that follow after can't keep up. I best that this is how a lot of people start their contracting gigs.
Thursday, October 06, 2011
Steve Jobs has Passed
Some links to postings about Steve Jobs from notable people:
Outpouring from the internet is simply massive right now.
Is a crash on the way?
Of an interesting note, the venture business in the US could be looking to take a hit in the slowing economy and this is something that I'd like to keep an eye on.
As for now, the yen is sky rocketing like crazy. What that means to me is that I'll be looking in ways of putting in more over time to make more cash and sell yen for other currencies because I think the yen is over values.
Monday, October 03, 2011
From Kagoshima to Tokyo and back again
I eventually made it back to my apartment and found that I had left a light bulb on for the entire 2 months. An interesting experience but when I did power calculation, having that light bulb on for 24/7 over a month it cost about $24. It's pretty amazing how much power a light bulb draws over the course of a month, more than the fridge I have.
But to be honest, most people don't have their lights running at home for 24/7. Interesting lesson.
The mail box at home was stuffed to the brim with fliers for all sorts of things, especially girly stuff like manicures, hair salons and frilly clothing- nothing that a man would need. Sexist marketing at it's finest? Quite possibly so.
I also dropped by the office today and saw one of my old managers and his greeting to me was:
Manager: "Welcome back. You look thinner. You okay? Maybe you should see a doctor"
Apparently I have a rather interesting work place.
I got back and picked up a $800 LCD monitor and had it shipped off to Kagoshima for me to use for programming. I even had it shipped by air. One of those perks about working in a large corporation.