CS371P #6

More git notes: Noticed a couple things about git. For one, I found that in order to get branches pushed up to your repo you’ve got to add an extra option “git push –all”. I was assuming that doing a “git push” would push everything, but it doesn’t.

As I’m turning in each project I like to make sure I have everything checked into git including the .log, the .out the .zip etc… everything that gets turned in and even a few more things. I like to use the makefile to actually create the files that are turned in. This way there’s a complete audit record of what got turned in. This is something I learned in the work place and it’s an obvious choice here, even if it is a little overkill. It’s free so why not. So anyway, I make sure I have all of those things checked into git and then I do a “git tag” to mark the repo as “v1.0” or the like. Again this is from product release management chores but makes good sense here. Well turns out that git tags don’t get pushed up by default either. Have to add the “git push … –all –tags”. At this point I’m not confident that there aren’t other things not getting pushed. You’d think “–all” would be all. Seems a little unpolished.

So this Allocator project was my first experience with pair programming. Kinda fun. Enjoyed working with my partner.

I never really learned C++ formally. I just kinda picked it up. Interestingly many of the C++ topics we’re drilling on in class are areas that I have not been strong in, like refs to pointers with const thrown in. I don’t think I’ve ever seen ’em used but, it’s cool to learn it. And of course learning these things gives a greater understanding of what’s going on. And I know that with this type of thing, if I don’t see it again for 5 years then when I do see it it’ll jog my memory and I’ll either know it or be able to quickly figure it out. Some of the other things I appreciate learning are; I’m seeing the “C++ way” of doing things as opposed to the “C way”. I’ve never seen formatted output with “cout < <", I've never learned all the C++ replacements for all the C apis like <stdio.h> becomes <iostream> etc. etc. There are a lot of things for which I'm still using the C api, for better or worse. It's amazing how big and complicated at times C++ is. I found this gem a few weeks ago;
int a[] = {0,1,2};
assert (a[1] == 1); // and also
assert (1[a] == 1); // not a typo!

For what ever reason there’s a commutative property for the subscript operator []. Perhaps because it gets compiled to “*(1 + a)” or something like that.

Semester is about half over. Time flies when you’re having fun.