For my second entry on my "Uninformed Investor" thread I have decided to buy a $1000 of Western Digital. So that would be 37.7786 shares of NYSE:WDC (I wonder if I should add in the Canadian exchange rate on this of 0.8682).
So at this point I should maybe mention why I am buying this stock over all the other companies that I could buy, well simply because I think (remember the title "uninformed") that whoever makes the best products will win. I have recently bought a WD TV HD Media Player and am loving it (it even works with linux filesystems, ext3 works perfectly), as well as I have for years purchased WD external and internal hard drives and have always been very happy. The stock price looks reasonable and so here I am $1000 of the stock sounds good to me.
Nathan Bullock
Monday, July 13, 2009
Friday, July 3, 2009
Testing the Investment Waters
I have always figured that it was a bad idea to put too much risk in my retirement investments, as a result I have a nice boring blend of mutual funds and indexed funds for my retirement investments. And this is probably how I will continue to deal with retirement.
Now lets say I have a couple of extra thousand dollars sitting around, which is not strictly needed for my retirement, what do I do with that? Invest in more of that boring but relatively safe balanced portfolio, buy a new big screen TV, stuff it under my mattress? I think that I might start investing it in a small portfolio of stocks/bonds/etc.
Before I do this though I thought I would give my investing prowess a trial run with fake money and to keep myself honest I will do that through my blog. So here are the rules: $5000, maximum of 5 separate investments, I will make my trades in the evening once the markets are closed, and there is no cost to making a trade. I have no clue how these rules line up with reality but hey this is my make believe world.
So this is the start of what I will call the "Uninformed Investor".
Short list of possible companies to invest in (this list will grow over time):
Shaw communications
Rogers communications
Google
Yahoo
Microsoft
Western Digital
Palm Inc.
Apple
Dell
Future shop (is this publicly traded?)
My first purchase Shaw Communications (SJR.B) for $1000.
Share Price: $19.00, shares purchased: 52.63157.
Now lets say I have a couple of extra thousand dollars sitting around, which is not strictly needed for my retirement, what do I do with that? Invest in more of that boring but relatively safe balanced portfolio, buy a new big screen TV, stuff it under my mattress? I think that I might start investing it in a small portfolio of stocks/bonds/etc.
Before I do this though I thought I would give my investing prowess a trial run with fake money and to keep myself honest I will do that through my blog. So here are the rules: $5000, maximum of 5 separate investments, I will make my trades in the evening once the markets are closed, and there is no cost to making a trade. I have no clue how these rules line up with reality but hey this is my make believe world.
So this is the start of what I will call the "Uninformed Investor".
Short list of possible companies to invest in (this list will grow over time):
Shaw communications
Rogers communications
Yahoo
Microsoft
Western Digital
Palm Inc.
Apple
Dell
Future shop (is this publicly traded?)
My first purchase Shaw Communications (SJR.B) for $1000.
Share Price: $19.00, shares purchased: 52.63157.
Monday, June 29, 2009
Formatting Storage Devices
Every once in a while I need to reformat one of my storage devices either a hard drive, usb key, or a memory card. Every time I do this it seems that I have to remember what tools to use.
The first links I always come across are for fdisk and mkfs. I have even used these tools directly before but there is at least one nice graphical interface that makes these tools a little nicer to use. That graphical interface is called gparted, you can find a nice little tutorial for this tool on the Ubuntu community wiki.
The first links I always come across are for fdisk and mkfs. I have even used these tools directly before but there is at least one nice graphical interface that makes these tools a little nicer to use. That graphical interface is called gparted, you can find a nice little tutorial for this tool on the Ubuntu community wiki.
Wednesday, June 10, 2009
C++ make_vector function (with variadic templates)
I have recently been playing with C++0x features that g++ has in it and have been very impressed with the new variadic templates feature. I quite often want functions that I can pass a list of values to and have the function create a vector with those elements in it. So for example something like:
This example though would have to use varargs to build up the vector with the list of values that you passed in, and the compiler won't be able to verify the type safety of what is happening.
But with the new variadic templates feature I can declare a function something like:
Which does exactly what I want with the improvement over the previous function that it is type safe and I don't have to explicitly tell it how many elements I am going to list. It will even automatically do casting for me in situations like:
The only thing you may need to be a little careful of is if you do something like:
It will return a vector<int> where you may have wanted a vector<double>, so I find that it is normally best to explicitly mention the type as I did in the first example. Full source code of my implementation is below. I am sure it can be improved but it works and does exactly what I want.
template <typename T>
vector<T> make_vector(int count, ...);
This example though would have to use varargs to build up the vector with the list of values that you passed in, and the compiler won't be able to verify the type safety of what is happening.
But with the new variadic templates feature I can declare a function something like:
template<typename T, typename... Args>
vector<T> make_vector(T v, Args... args)
Which does exactly what I want with the improvement over the previous function that it is type safe and I don't have to explicitly tell it how many elements I am going to list. It will even automatically do casting for me in situations like:
make_vector<int>(1.5, 1.2, 3);
The only thing you may need to be a little careful of is if you do something like:
make_vector(1, 1.2, 1.4, 1.6);
It will return a vector<int> where you may have wanted a vector<double>, so I find that it is normally best to explicitly mention the type as I did in the first example. Full source code of my implementation is below. I am sure it can be improved but it works and does exactly what I want.
template<typename T>
vector<T> add_to_vector(vector<T> &z, T v)
{
z.push_back(v);
return z;
}
template<typename T, typename... Args>
vector<T> add_to_vector(vector<T> &z, T v, Args... args)
{
z.push_back(v);
add_to_vector<T>(z, args...);
return z;
}
template<typename T>
vector<T> make_vector(T v)
{
vector<T> z;
z.push_back(v);
return z;
}
template<typename T, typename... Args>
vector<T> make_vector(T v, Args... args)
{
vector<T> z;
z.push_back(v);
add_to_vector<T>(z, args...);
return z;
}
Tuesday, December 2, 2008
MP3 Players - The Rating Of Music Isn't Good Enough
As I have looked at mp3 players I have come to the conclusion that they could be better than they are.
First off mp3 players seem to only be able to create playlists, or even add and remove songs from playlists, on the computer that they sync with. This may have been acceptable 5 to 10 years ago, but not today. Possibly instead of playlist we should just be labeling (or tagging) songs, I suppose it works out to the same thing.
Second the rating system is too simplistic, it forces the user to put too much thought into it and it doesn't synchronize effectively. Instead of just a number from 0 to 5 that the user has to explicitly choose it should just keep a history of how the user has reacted to this song. My guess is that the users last 10 to 50 interactions with the song would be good enough. The mp3 player itself, and the music player on the computer(s) that you sync with should allow you to interact with the song in something like the following manner: do nothing just listen to the song, press thumbs down (which also skips the song), or press thumbs up. Over time these recorded interactions with a song can be used to get a much more accurate picture of how much a user likes or dislikes a song, and these ratings will go up and down over time. This also synchronizes very nicely, it is just a merging of timestamps and a small amount of extra data along with the timestamps.
Finally the randomize function should make use of this extra history, a smart randomize function.
Anyway if there is some MP3 company that makes use of this, thank Amarok, it really already does something very close to this.
First off mp3 players seem to only be able to create playlists, or even add and remove songs from playlists, on the computer that they sync with. This may have been acceptable 5 to 10 years ago, but not today. Possibly instead of playlist we should just be labeling (or tagging) songs, I suppose it works out to the same thing.
Second the rating system is too simplistic, it forces the user to put too much thought into it and it doesn't synchronize effectively. Instead of just a number from 0 to 5 that the user has to explicitly choose it should just keep a history of how the user has reacted to this song. My guess is that the users last 10 to 50 interactions with the song would be good enough. The mp3 player itself, and the music player on the computer(s) that you sync with should allow you to interact with the song in something like the following manner: do nothing just listen to the song, press thumbs down (which also skips the song), or press thumbs up. Over time these recorded interactions with a song can be used to get a much more accurate picture of how much a user likes or dislikes a song, and these ratings will go up and down over time. This also synchronizes very nicely, it is just a merging of timestamps and a small amount of extra data along with the timestamps.
Finally the randomize function should make use of this extra history, a smart randomize function.
Anyway if there is some MP3 company that makes use of this, thank Amarok, it really already does something very close to this.
Sansa Fuze - Nice Little MP3 Player
As mentioned in my previous post I was in the market for a new mp3 player and the Creative Zen just didn't work out. So my second choice was the SanDisk Sansa Fuze. I wasn't a big fan of the wheel interface, but it is growing on me. I like that it has a expansion card slot but I haven't tried it out yet. I was also impressed that it just seems more complete than the previous mp3 player that I tried.
I like that it supports both msc and mtp connections to the computer. (msc means that it connects to your computer just like a USB drive, mtp is a special Media Transfer Protocol it allows you to do things like sync playlists from your media player.) I thought that I would mostly use msc but I am starting to really like mtp, especially since it works pretty well with Amarok and Linux.
I like that it has a FM radio, that it hasn't froze up yet (the lack of a reset button makes me think that they didn't have a need for a reset button), I like that they explicitly mention linux support (even if I don't really think they support linux better than any other mp3 player, except maybe the iPod), and I like how it looks and feels. I think this one is a keeper.
I like that it supports both msc and mtp connections to the computer. (msc means that it connects to your computer just like a USB drive, mtp is a special Media Transfer Protocol it allows you to do things like sync playlists from your media player.) I thought that I would mostly use msc but I am starting to really like mtp, especially since it works pretty well with Amarok and Linux.
I like that it has a FM radio, that it hasn't froze up yet (the lack of a reset button makes me think that they didn't have a need for a reset button), I like that they explicitly mention linux support (even if I don't really think they support linux better than any other mp3 player, except maybe the iPod), and I like how it looks and feels. I think this one is a keeper.
Creative Zen, Bye Bye
A couple of days I purchased a Creative Zen Mp3 player. Put a couple of songs on it, that seemed okay. Plugged in an SD card that had some other songs on it, tried to play them, and found out that they don't show up where your other songs are. How stupid. So songs you put on a SD card don't show up with the rest of your songs. Strike one creative. I figured out where to find them on the Zen but when I tried to play one of these songs from the SD card the Creative Zen locked up, go find a pin to reset it. Try to play another song, the Zen locked up again. Third try and it worked. Strike two. A day or two later I was playing some other song that was in one of the normal playlists, not off a SD card this time, the Creative Zen locked up again, this time I am not at home so I can't easily reset it. Strike three, this Creative Zen is going back to the store.
So obviously the stability concerns are tremendously annoying.
Secondly what is up with advertising an SD card slot that will expand the storage capacity of the mp3 player and then make it a second class citizen. The songs on the SD card don't show up in any of the lists of artists, albums, playlists, etc.
Probably the last Creative mp3 player I will ever own.
So obviously the stability concerns are tremendously annoying.
Secondly what is up with advertising an SD card slot that will expand the storage capacity of the mp3 player and then make it a second class citizen. The songs on the SD card don't show up in any of the lists of artists, albums, playlists, etc.
Probably the last Creative mp3 player I will ever own.
Subscribe to:
Posts (Atom)