![]() |
||||||
|
Welcome to Deadbeef.com
SearchLinksOpen SourceOtherFavoritesWho's Online?
Misc |
|
Archives for: 200812/02/08The economy entered a recession, so what should I do?The NEBR Business Cycle Dating Committee determined that December 2007 was the peak of the last expansion, and a recession began following that. So now what? That seems to be a question I keep hearing, for example on the WSJ morning radio show, they keep asking people how they are changing their behavior as a result of the recession. Why? The recession is an average of the economy as a whole. Asking how individuals how they are going to change in response would be like asking students how they are going to react to average test scores going down. Oooo average test scores are down in my school, should I study more or less? That would be stupid to even talk about. Likewise how will I change my behavior? Not at all! I have been very frugal for the last 3 years, and I will continue to save money just the same. Will that pull down the average spending? Perhaps, perhaps not. Do I care? Nope. It's just an average. 08/08/08Using MPC to generate CxxTest test casesThere are a few tools that I love for C++ development, and one of them is CxxTest. One of my other favorite tools is the Make Project Creator or MPC. It allows you to generate makefiles or visual studio projects from some simple configuration files. MPC lets you create templates for various projects that can be used again and again. Here is my template for CxxTest projects: project {
Header_Files {
*.h
*.hpp
^Test*.hpp
CxxTest {
../cxxtest/cxxtest/*.h
}
}
Define_Custom(CxxTest) {
automatic = 1
command = $(PERL_BIN)/perl ../cxxtest/cxxtestgen.pl
output_option = -o
inputext = .hpp
source_outputext = .cpp
commandflags = --abort-on-fail --have-eh --have-std --part
}
CxxTest_Files {
Test*.hpp
}
includes += ../cxxtest ..
}
Then in the folder where your test cases live: project : CxxTest {
exename=*
Source_Files {
main.cpp
}
specific(vc71,vc8) {
postbuild = $(TargetPath) $(CXX_RUNNER_ARGS)
}
}
You will have to create the main.cpp file manually, normally it is created with 07/03/08Boost::regex tip of the dayIf you use boost::regex, don't do what I just did.
I didn't realize that match_results kept references to the string, and so you can't edit the string. Perhaps that will save someone from hitting an assert(). 06/24/08Thank goodness for WiFiIt seems like wireless networking has been around forever, but it was not so long ago really. I had a laptop with no wireless:
Now, what is that strange posture, and why am I holding the Ethernet cable with my foot? Oh yes, here is the reason:
Now, she doesn't do that anymore, but there aren't wires stretched across the room either. 06/05/08One year of debt freedomSo it has now been one year since we became debt free! How has life changed? I must say as good as it felt to be debt free, it felt much better when we had 3 months of expenses saved as an emergency fund. In the last year we have:
Thanks Dave Converting RGB to HSV in C++I don't know why this is so hard to find, but it is. I ended up following the suggestion of a google answers question and converting the javascript formula at http://www.csgnetwork.com/csgcolorsel4.html to C++. (Ok, it is just plain C).
// RGB are from 0..1, H is from 0..360, SV from 0..1
double maxC = b;
if (maxC < g) maxC = g;
if (maxC < r) maxC = r;
double minC = b;
if (minC > g) minC = g;
if (minC > r) minC = r;
double delta = maxC - minC;
double V = maxC;
double S = 0;
double H = 0;
if (delta == 0)
{
H = 0;
S = 0;
}
else
{
S = delta / maxC;
double dR = 60*(maxC - r)/delta + 180;
double dG = 60*(maxC - g)/delta + 180;
double dB = 60*(maxC - b)/delta + 180;
if (r == maxC)
H = dB - dG;
else if (g == maxC)
H = 120 + dR - dB;
else
H = 240 + dG - dR;
}
if (H<0)
H+=360;
if (H>=360)
H-=360;
04/08/08Followup to replacement cost insuranceThanks to an article on Kiplinger.com I found a few companies that do offer full replacement cost insurance. About a year ago I wrote about how I could not find anyone who would pay for a full replacement on your house. So here are two companies I am going to ask for a quote from. http://www.chubb.com/ http://www.firemansfund.com/ 03/26/08How do I compare a Roth IRA to a Traditional IRAI am about to open a Roth IRA for myself and my wife, and at first there won't be much diversification, since I won't have enough to meet the minimums on several funds at once. But that is ok, because you don't need to be diversified in every account, as long as the total of all of your investments matches your asset allocation right? So I was calculating what my asset allocation would be after opening the Roth IRAs and I had a problem. It's not really fair to compare $3000 in a Roth to $3000 in a traditional IRA, since I will owe taxes on the traditional when I withdraw the money, but I will not on the Roth. Here is what I did. I assumed that my average tax rate on the IRA withdraws would be 20%. I have no idea if that is correct or not, but here is my thinking. I probably will have a marginal tax rate of 25%. (2007 25% bracket is 63,700 - 128,500) I probably won't have enough earned income + social security (only partly taxed) for all of my IRA withdraws to be taxed at 25%, so I took off 5% and came up with 20%. So for my asset allocation I took the present value of my IRA - 20% and then added the full present value of my Roth IRA. Then I am trying to hit an allocation of 10% Vanguard Total Bond Mkt Index, 67.5% Vanguard Total Stock Mkt Index, 22.5% Vanguard Total Int'l Stock Index. So if I had $2250 in international in my Roth, and $8437.50 in Total Stock Market ($8437.50 - 20% = $6750) and $1250 in bonds ($1250 - 20% = $1000) both in a Traditional IRA; then if you combined the after-tax values of both accounts then I have achieved my desired asset allocation. I hope that 20% is a good assumption for a retirement tax rate, or else everything else is wrong. "Upped" is evil and must dieOk, perhaps I should just calm down, but I have heard more and more people using "upped" as a verb. Even in newspaper stories! Now, I don't know about you, but I always thought that prices were "raised" not "upped". Up is a preposition, not a verb. Prices can go up, they can follow an upward trend, they rise, but they do not "up". I looked on m-w.com and they do have an entry for up as a verb, but I still think it is wrong and should be struck from the English language. Let's take this sentence and play with it a little: "The builder upped the price for the house." Very much like something you have heard before. Now let's change one word. "The builder upped the walls for the house." Sounds stupid doesn't it. You don't "up" walls, you raise them. Well, you don't "up" prices either. See also "as per is evil".
|
|
Sponsored LinksTop Articles
Categories
Archives
|
|
|
|
|
||||||