As announced today on the company internal 'The OCI/Advantage Business Summary':
Kevin Heifner is planning on moving his family to Pensacola, Florida in the third quarter of this year. The move was promoted by family desires related to his children attending a specialized school. Kevin will continue to support OCI from Florida.
Thursday, April 19, 2007
Sunday, April 08, 2007
5 Things About Myself
I was blog tagged by Weiqi Gao. I'm not really sure what that means, but I will follow the lead of others and tell 5 things that you probably don't know about me.
1. I think I was a freshman in high school when I built a bomb that almost killed me. Actually it was suppose to be a rocket, but it didn't quite go as planned. I took an empty CO2 cartridge (the kind used for beebee guns) and stuffed it full of match heads. I put the CO2 cartridge in a PVC pipe and lit it. I'm fortunate that it was a very cold day and I had many layers of clothes on. My clothes were full of holes and it is only the grace of God that kept me from killing myself. Only one piece of PVC pipe made it into my right arm. I still have the scar from where they cut it out. Also the side of my folks garage siding is still perforated with holes.
2. In my small high school (graduating class of 50) I was the school high jumper in track-n-field. My personal best was 5'10" which was over my height of 5'8". I also participated in a school record in the 440 yard relay.
3. I wouldn't say I'm a big music fan. I own very few CDs. Normally I listen to classical while driving. However, I do like the band Third Day.
4. My first computer was an Apple II+ my dad bought when I was in grade school. I thaught myself to program Apple Basic by listening to tapes that came with the computer.
5. Many of you know that I'm a 'born again Christian'. I align myself with the Reformed Christian faith. One of my favorite books is: The Reformed Doctrine of Predestination by Loraine Boettner.
1. I think I was a freshman in high school when I built a bomb that almost killed me. Actually it was suppose to be a rocket, but it didn't quite go as planned. I took an empty CO2 cartridge (the kind used for beebee guns) and stuffed it full of match heads. I put the CO2 cartridge in a PVC pipe and lit it. I'm fortunate that it was a very cold day and I had many layers of clothes on. My clothes were full of holes and it is only the grace of God that kept me from killing myself. Only one piece of PVC pipe made it into my right arm. I still have the scar from where they cut it out. Also the side of my folks garage siding is still perforated with holes.
2. In my small high school (graduating class of 50) I was the school high jumper in track-n-field. My personal best was 5'10" which was over my height of 5'8". I also participated in a school record in the 440 yard relay.
3. I wouldn't say I'm a big music fan. I own very few CDs. Normally I listen to classical while driving. However, I do like the band Third Day.
4. My first computer was an Apple II+ my dad bought when I was in grade school. I thaught myself to program Apple Basic by listening to tapes that came with the computer.
5. Many of you know that I'm a 'born again Christian'. I align myself with the Reformed Christian faith. One of my favorite books is: The Reformed Doctrine of Predestination by Loraine Boettner.
Friday, April 06, 2007
Iridium One of 21 Biggest Technology Flops
For those who worked on the Iridium project, you may find it interesting that Iridium made ComputerWorld's list of 21 Biggest Technology Flops.
Wednesday, February 28, 2007
int to String under Managed C++
I have been doing a little managed C++ at work the last couple of days. Did you know you could do this:
System::String^ str = gcnew System::String("");
str += 5;
System::Console::WriteLine(str); // prints: 5
or simply:
System::String^ str = "";
str += 5;
System::Console::WriteLine(str); // prints: 5
or even:
System::String^ str;
str += 5;
System::Console::WriteLine(str); // prints: 5
The 5 is converted to a String for you. After working with C++ for so many years without a simple way to convert an int to a string this is nice. Might not seem like that big a deal, but these little things add up.
System::String^ str = gcnew System::String("");
str += 5;
System::Console::WriteLine(str); // prints: 5
or simply:
System::String^ str = "";
str += 5;
System::Console::WriteLine(str); // prints: 5
or even:
System::String^ str;
str += 5;
System::Console::WriteLine(str); // prints: 5
The 5 is converted to a String for you. After working with C++ for so many years without a simple way to convert an int to a string this is nice. Might not seem like that big a deal, but these little things add up.
CityDesk on Vista
I use CityDesk to maintain my kid's school website: Providence Christian Academy. It would not run under Vista because it needed the DHTML Editing Control. However, a quick download and install and I was up and running again.
Firefox on Vista
As some of you know, I have started using Windows Vista Business on my work laptop. I received a free version for participating in Power Together campaign. I prefer Firefox to IE, even IE7, so I wanted to make it the default browser on Vista. I looked around and it appears that many people are having problems getting this to work. Here is what I did:
- Run Firefox as Administrator by right-clicking on the icon in the Quick Launch Toolbar.
- Select Tools->Options->MainTab
- Click "Check Now" button under System Defaults.
- Indicate you want Firefox as the default browser.
- Close Firefox (remember you are running as Administrator.
Works great.
- Run Firefox as Administrator by right-clicking on the icon in the Quick Launch Toolbar.
- Select Tools->Options->MainTab
- Click "Check Now" button under System Defaults.
- Indicate you want Firefox as the default browser.
- Close Firefox (remember you are running as Administrator.
Works great.
Friday, December 22, 2006
Logging Method Name in C#
logMessage("functionName", "something bad happened");
Yes the above works if IF *if* you remember to update "functionName". However, remembering to update the parameter after copying from another method is often not done. It is also a pain and not necessary. A little reflection easily solves this problem:
// start one up so that we don't get the current
// method but the one that called this one
StackFrame sf = new StackFrame(1, true);
System.Reflection.MethodBase mb = sf.GetMethod();
string methodName = mb != null ? mb.Name : "";
// fileName can be null, if unable to determine
string fileName = sf.GetFileName();
// we only want the filename not the complete path
if (fileName != null) fileName = fileName.Substring(fileName.LastIndexOf('\\') + 1);
int lineNumber = sf.GetFileLineNumber();
However the above does not work if you are using RichException or other proxies. So something a bit more complicated is needed:
private StackFrame GetCallingStackFrame()
{
// Determine the method that called the one that is calling this one.
// This is not just two up the Stack because of RichException support.
StackFrame sf = null;
// Start at 2. 1 for this one and another for the one above that.
StackTrace st = new StackTrace(2, true);
Type thisType = GetType();
foreach (StackFrame sfi in st.GetFrames())
{
// Find a calling method that is not part of this log class but is part
// of the same Namespace.
Type callType = sfi.GetMethod().DeclaringType;
if (callType != thisType &&
callType.Namespace == thisType.Namespace &&
!callType.IsInterface)
{
sf = sfi;
break;
}
}
return sf;
}
This can then be used like so:
StackFrame sf = GetCallingStackFrame();
if (sf != null) // if found add info to log message
{
System.Reflection.MethodBase mb = sf.GetMethod();
string methodName = mb != null ? mb.Name : "";
string fileName = sf.GetFileName();
if (fileName != null) fileName = fileName.Substring(fileName.LastIndexOf('\\') + 1);
int lineNumber = sf.GetFileLineNumber();
if (fileName != null)
{
strMsg = fileName + "(" + lineNumber + ") - " + methodName + " - " + strMsg;
}
else
{
strMsg = "unknown - " + methodName + " - " + strMsg;
}
}
Subscribe to:
Posts (Atom)