Posts Tagged ‘CPP’

Sweet sweet success

Wednesday, September 17th, 2008

Today was an interesting sort of day. I fixed the last remaining issue from the implementation yesterday of a Python script to configure printer settings and demoed a project to regulate volume levels for public access systems.

I almost couldn’t believe that I finally got the project working; albeit the code is ugly and error checking is scarce but I’m impressed that I finally managed to build something useful with C++. You can only get so far with Hello World. It was also great to see people nod in appreciation when I demonstrated it.

It’s nice to feel useful every now and then. ;)

Oh yeah, I also ruined a batch of Cream of Wheat. It turns out I didn’t burn it – I just didn’t add enough Cream of Wheat. When it failed to thicken after 2.5 minutes I chalked it up to the lack of salt (a bonehead conclusion on my part). I didn’t realize that I grabbed a 1/4 cup instead of 3/4 cup. Oh well.

I also received a very thought provoking email reply from my brother. I’ll have to mention that again when I feel like writing more.

C++ Standard update

Thursday, September 4th, 2008

Overview: C++ Gets an Overhaul

As I’m new, most of that is right over my head. What I do get out of it is they’re going to be adopting a lot of the Boost libraries. Little surprise there as I read a lot about the Boost libraries.

Here is one part that show how new I am to C++:

C++0x also removes some embarrassments from the language. For example, C++03 has at least three different forms of initialization:

1
2
3
int x=0;
int x(0);
int y[2]={1,2};

C++0x defines a unified initialization notation which can even be used in the declaration of dynamically allocated arrays:

1
2
3
4
5
6
7
8
int* a = new int[4] {1, 10, 20,95 };
vector<string> vs={"ab","cd","ef"};
 
class S {
 int arr[3];
public:
  S() : arr{ 1, 2, 3 } {}
};

I knew about the syntax for the first two in the list but had not seen the third or had seen it described differently. The last code block looks a little alien to me. Perhaps that’s just because my exposure to C++ classes is so limited.

Either way, this is definitely a month for change in the C++ world:

The vast number of new features forces the committee to work at an incredible speed. A clear statement of intent was made to complete work on the new standard at the San Francisco meeting of September 2008 in order to achieve publication in 2009.

Moving along

Monday, September 1st, 2008

Today I’ve fleshed out the Wiki a bit more and verified that it’s now accessible to the world. I had locked it down during setup and forgot this until I attempted to validate the feed to find out why the RSS widget wasn’t working. Nothing quite like looking at the problem from the outside. Literally. ;)

I’m going to concentrate on the C++ portion first as I’m attempting to learn that language now. I’m hoping by the end of the year to be able to do something useful with it. If nothing else I’d like to have a solid understanding of References, Pointers and Classes. I plan on adding my notes on the first two pretty soon.

Impulse Power, Ensign

Sunday, August 31st, 2008

Another day and some progress. A Wiki has been started, groceries purchased and a Cordon Bleu lunch a week ahead of my birthday. Not a bad way for the day to go.

I think I’ve managed to read another page of a C++ book I borrowed from the library but I still feel pretty good about my progress. I can see how I could overuse that word, but it’s really been a concern of mine lately. I’ve read C++ books in the past but felt pretty overwhelmed. I also got distracted a bit by other things, namely video games.

Of course with me being ‘me’, I don’t tend to stay on one topic for too long. Something usually comes along and grabs my attention and I’ll be derailed by it for a while. I suppose that could be called fickle, but I like to think I’ll get back to it eventually.

(more…)