Friday, November 01, 2013

Musings of the Market

Although the economy is picking up and starting to come out of the recession.  I'm predicting a drop in Market Value for the following reasons:

  • The Current market PE of 23.5 seems higher then the long term average: which I think is like 14 or 16  (economist).
  • Government debt is at an all time high, meaning they'll have to spend less in the future to balance the budget which reduces demand.
  • Companies are buying back shares in large numbers to prop up their stock prices.  The percentage of reinvested funds is the lowest it's been for 30 years (economist magazine).  Instead of reinvesting the money businesses are earning, they are buying back stocks.
  • Funds like Hathaway are dumping stocks.
I'm surprised the stock market could rally as high as it has, under the above conditions.  Are we in another period of irrational exuberance.

Adventures in China Part 2

I just had an awesome trip to China.  It's such a fascinating place!

If your looking for a spot to lounge around for a long time, like reading a long novel, just try crossing the street.  The street light will keep you waiting for hours on end, whilst you watch motorcycles, bicycles and cars go by.  But don't get to close to the side of the road, or you could be hit by a motorcycle with a whole family on board.

The next day we drove to hangzhou.  In China rear seat belts are not required.  This shouldn't stop you from trying, but you may find a seatbelt without a socket to plug it in, or seatbelt socket without a seatbelt: both of which occurred to me in two separate cars.  What Chinese cars lack in safety, they make up for in interior decore, featuring numerous seat covers, some of which obstruct the seat belt functioning.  Nevertheless, your much better of in a car, then 1000s of small scooter drivers: almost none of which ever wear helmets.

Direct Advertising on TV is pretty expensive and the highway views have been completely filled up with advertisements.  There's just no place anymore to put advertisements.  The Chinese have a great solution to this problem: Simply Plaster passing cars with Ads!  That's right.  As you wait in parking ... err traffic, at the light, someone will come up to your car and place their business cards in your door jam and if you made the mistake of leaving your window open, they'll toss one into to your window.  And, keep your car moving, if you don't want to be a moving billboard with an ad stuck to back of your licence plate.

Later that day, it was time to go buy a Chipow (red wedding dress), for Vivian.  As fun as that sounded, I decided to go do something a little more interesting.  Luckily, nearby, I found a freshly painted wall to watch Dry.  Aparently they have an entire mini-town dedicated to wedding dresses!

Lunch was towards the country end of the city, where the meals have the same great taste but with twice the oil!  

We spent most of the day in traffic.  Theoretically, it's only a 3 hour trip, but this turned into a  litterally 8 hour trip due to becoming excessively lost: even with over 4 decades of China experience at the Helm.  The roads in Shang-hai are so complex, the GPS can't even find the way and you have to keep driving in cirlces around the city: no one can get to their destination, hence traffic multiplies.  Some have made a business opportunity of helping those eternally lost in traffic.  On the side of the road, you can pick up a LIVE GPS unit: a living human being, who will enter your car and give you directions on which way to go!  This is a must have unit, if you've been lost in the china for the last 3-5 hours.

Guange-Joe has the largest most beautiful park I've ever seen: the Emperor's Garden.  No one is allowed inside the Garden, except the emporer.  I guess we were pretty lucky to get in, since they didn't open it to the public until about 60 years ago ;)  The park consists of miles of trees, beautiful bridges, stone cobbled roads, sidewalks, statues, ferns, flowers, old trees and lots of water from many angles.

Here's a note on surviving in the city.  But first, how are your dodgeball skills?  In China Objects may be smaller but they come at you just as fast when your crossing the street: motorbikes, bicycles, buses, and cars of all sizes.  Better get out of the way fast, because they won't slow down or stop for you!

Adventures in China Part 1.

Off to China we went.

On the Plane, from 2 lunch choices, I chose the beef noodle: This was a "good choice" I was told by the stewardess.  It was surpisingly good, but dinosaurs need not apply as the size of lunch was suitable for a toddler.  On the plate, was some noodles, beef a lonely bread and some grapes on the right.  I ate 2 of my grapes and saved the other 3 for later. 
Airplanes have advanced since I was a child, with a TV display behind every seat headrest.  And, in case the seat headrest directly in front of you is too far for you to get up and reach, the buttons are on a remote control device saving you the trouble of lifting your arms!  On the movie display, they even gave a mandatory tai-chi lesson. wow.

Watching movies back to back, A thirteen hour flight didn't seem so bad, until the nausea inducing turbulence kicked in: at that point water boarding would have been more fun. 

I was quite grateful when the airplane landed.  I waited in the processing line, proudly thinking about my brand new visa which had just been renewed a few weeks earlier, with an expiration date so far in the future: I wouldn't have any trouble getting through.

Vivian's parents kindly carried our luggage all the way back to the car and drove us back to their apartment, as the traffic's casual honking of horns faded into the background.  As we pulled up to the drive way of the apartment complex, another car blocked our path.  The driver of our car, Vivian's Mom, adeptly demonstrated the means to deal with this situation.  The window rolled down, loud words were spoken, with arms gesticulating in tandem, each sentence punctuated by a honking horn.  This proved quite effective, as the large blocking car started zig-zagging back and forth furiously for minutes on end, like a worm trapped in a sandpit.  Eventually, a guard came over and motioned the other car in another direction, allowing us to get past.

We arrived at their apartment, not unlike apartments in the US.  Walls, windows and doors are present, with most furniture resembling their US counterparts.  On the other hand, the beds look like beds, but feel like tables, an extremely firm mattress.  Don't let The switches confuse you, they go from left to right, not up and down.

After a delicious dinner, we were extremely tired.  With the jet lag, it was hard to sleep.  If only I could 'sleep' instantly with the click of a button - like my laptop.

The next morning we visited the local downtown area for breakfast.  If you thought my apartment was small, the restaraunts around here have me beat.  The main dinning area was the size of my kitchen, featuring 4 small benches the width of my hand, 2 tables, and their kitchen was smaller then my closet, featuring no less than 9 crowded Umpa lumpas busyly making Shou-lumpas.  But that's not the only thing sized differently.  Counter-tops were 2 inches lower, clothing sizes actually fitted me, and Vivian's parent's phone was large enough to be a tablet.  The chinese associate large spaces with luxury, and hence Audi actually makes an elongated audi A7, just for China.

The busy sidestreets shared their space with walkers and motorcycles who used morse code as communication with their horns, repeatedly beeping "Get out of the way, I'm coming through!".  Walking through the crowded corridors featured the occassional bump from a passerby, a little like bumper cars.  Countless little stores sold everything from giant cactus blimp like fruits from tai-wan, to shreaded pork burgers, candied carpet, white strings molded into pastries, chicken on a stick, punching chicken sticks, and various items liable to end up at a yard sale also known as yard sale equipment. 

Friday, August 27, 2010

Cross browser Issues

Let's make a short list here:
1) box model
2) float issues (ie7), the order of the elements make a difference as to whether ie7 can properly float them.
3) select boxes bleeding through
4) memory leaks
5) sometimes, even line breaks are treated differently, depending on whether you make them XHTML compatible
6) ie doesn't support rounded corners or even box shadows
7) firefox and gecko based browsers, pass by null references uninterupted vs IE does not (ie often stops in it's tracks)
8) Page layout issues...
9) widths artificially constrained causing things to line break where they shouldn't
10) I could probably cover the whole page with miscellaneous ie issues
11) Did i mention that container divs with scrollbars can't maintain their shape if inside elements are inline elements declared with display: block;
12) Someone could probably write a whole book about the positioning, margins and padding bugs.

Thursday, September 28, 2006

Linking langour

Most basic coding errors will usually result in a compiler error, here and there; like a spell checker in a word document, the compiler points you to the exact source of the problem. Unfortunatly, life isn't always so grand.

Earlier this week, I spent hours debugging a single dynamic linking error. You know, it's the kind of error that doesn't show you what the problem is. Unlike the linker error that tells you cryptic things like "unreferenced blah blah", this "error" happened at run time. This resulted in the program running part of the way, after a point at which it would just crash, making the abominable segmentation fault.

Eventually, by using the "gdb processName PID" method, I was able to localize the error to one library. To make a long story short, it turns out, to my surprise, this library was built on a different computer then the rest of the libraries; this caused the segmentation fault. I switched to the correct, compatible library and wholla, it worked!

Thursday, August 31, 2006

For grep's sake

Just now, I needed to find a line with the phrase 'valid' in it. Unfortunatly, there were thousands of such lines. I narrowed down the list by embedding a one greps output in another. The file list to search is constructed by a grep statement that searches for shell scripts aka "\#\!/bin". I use this file sublist to search for another word like so:

grep "valid" `grep -rIl "\#\!/bin" *`

what fun!

Wednesday, May 10, 2006

Java references

Newbies to C++ and Java often don't realize the relationship between references and pointers. Basically, references are pointers that are always dereferenced. Of course, in C++ you can actually use pointers or references. In Java, pretty much everything is by reference but this doesn't mean you can't have a nullPointerException. If you forget to initialize an object it will be null. Conceptually, C# works the same way as Java though you can actually use pointers using the "unsafe" keywords but you must explicitly declare it as unsafe.

Pascal Aschwanden

Tuesday, May 09, 2006

Linux Process termination

Every so often you'll get a process that refuses end normally. The kill command will usually stop the program; it sends the process the TERM signal. The processes that don't catch this process will terminate. However, some processes do catch this signal because they probably want some exit code to executed before they exit. If they catch it, they are supposed to exit but if they're not running properly it may still refuse to exit. In this case you have to send Kill -9; this signal cannot be caught.

In some cases you may have to kill the parent because some processes replicate new children whenever the children are deleted. You can check the parent id of the process with ps -f. Then just execute a kill on that parent. Once the parent is killed all the children processes should be killed as well.

Saturday, May 06, 2006

The Hottest Software Skills

The following is a statistic of skills that are in demand based on the monster search engine. I had to narrow down the search constraints to reduce the number of hits i got to bring the numbers below their maximum of 1000. I searched the following skills for the 94040 zip code with a 10 mile search radius. These results may not be representative of the world but it probably will give a good idea. Please excuse the tabs; its hard to get them lined up.

I'm not surprised that C++ and Java are at the top of the desired skills but I hadn't expected SQL to be quite so high. HTML, XML and Perl are no surprise; those are pretty much industry standards with HTML being a kind of assembly language for the web. Somehow I had expected C# to be a little more popular, possibly competing with Java but that isn't the case. It seems fewer people are willing to shell out the dollars on the .NET ide.

Windows 516
Linux 443

C++ 451
Java 357
SQL 318
HTML 293
XML 252
Perl 244
TCP 229


javascript 139
shell 130
shell scripting 107
python 86
.NET 86
C 523-451=72
c# 68
SOAP 57
LDAP 50
Active Director 49
CVS 48
TCL 44
xslt 42
php 43
SMTP 42
UML 40
JDBC 37
Assembly language 33
Design 31 (design patterns)
Make scr. 28 (prob more)
OOP 15
Eclipse 15
OSI 13
Cobol 11
Scheme 8
Ruby 8
LISP 1
Haskell 0