CS371p Project 7: Darwin

November 15th, 2009 by mgb568

Project Darwin went fairly well. Had a couple issues with being forced to use the stack for storage, but we worked our way around them. Other than that it was a very interesting project, actually constructing the framework that we just used in cs315.

Predicted time : 10 hours
Actual time : 7 hours

TestDarwin.out

CS 371p : Week 11

November 11th, 2009 by mgb568

We’re getting fairly close to the end of the semester, and right into the thick of the interesting stuff.

Most of what we covered last week was Pairs and Tuples, which showed us many of the issues that occur as far as typing ends up happening. I.E. using a A<int> and A<double> should be implicitly convertable, but you have to fix a constructor so it actually works like that.
We also delved into the next Project, Darwin! I remember this project from 315, it was quite a fun project at the time, although this time, I think we’re responsible for almost all of the codebase. It should be quite an interesting project.

cout >> CS 371p Week 10

November 6th, 2009 by mgb568

So yeah… Post is late, but it took me until wednesday to figure out why my apartment had seriously ungodly slow internet. (Note : it was an engineer’s fault, go figure >.>)

Last week was really interesting, delving into operator overloading and implicit/explicit conversions, and being forced to re-write constructors if using standard containers. Frankly, its kind of a pain in the ass to keep track of what can be implicitly converted and what can’t. Especially when you’re doing templating. Operator overloading is useful, but you have to be very careful what kind of overloading you’re doing, i.e. is it somebody else’s operators? friend it, while not creating unintentional functionalilty/dysfunctionality.

Got the project done earlier than expected, which was nice.

-Gip

CS371p Project 6 : Sudoku

November 2nd, 2009 by mgb568

Expect Hours: 8
Actual Hours: 6

This project was actually kind of interesting, as I like sudoku, but I’m fairly terrible at solving any of the hard ones. Working with the Arrays class to write all the iterators and such was kind of a pain, but it wasn’t too terrible.

Oddly enough, the brute force algorithim works fairly well on most of the sudoku puzzles.

On Wikipedia, in the sudoku algorithims page, there’s a ‘near-worst case’ puzzle that’s actually a fairly interesting test of how ’smart’ your algorithim is. which, if you’re using pure brute force, it’ll solve it in roughly 30 minutes or so, according to the site.

However, if you reverse the order in which you brute force, instead of going 1..9 for each space, you went 9…1, you can actually outsmart the worst case.

So optimally, if you wanted to do a smart brute force, i’d split the algorithim 50-50, one half going from 1…9, and the other 9…1, and just have run until it finds a solution.

CS371p Week 9: const void Blog() {};

October 27th, 2009 by mgb568

Last week was actually pretty interesting. I’d seen a couple examples of C++ using the ‘friend’ keyword, but I had never quite understood how it worked. I still sometimes forget how C++ calls constructors and try to do it the old Java way, but I realize my error sooner or later. Method overloading is pretty interesting as well, I didn’t realize adding const was enough to be able to overload a function. Good to know that.

Already got started on the next project. I’m not exactly certian how to go about programmatically solving soduku, actually, so that might be an issue. Other than that, the project doesn’t look to complicated.

-Gip

CS371p Week 8 : halfway-done… ish?

October 19th, 2009 by mgb568

Yet another week of OOP is over.  We didn’t cover much material this week, but what we did cover was very interesting as far as Templating goes. It’s interesting to see how general you can make your algorithims without making them ambiguous as far as the compiler uses them.

For the test at least, it was fairly straight forward. The book questions were not quite as quirky as last time, so I didn’t feel like I had to have memorized the readings to get it right. Other than that, I really liked the coding questions. I felt the palindrome question was sufficiently hard. I think Queue might have needed a “assume the queue will  only be used correctly” statement in the header. Overall I think it was a well-timed and well-executed test. No complaints here.

CS 371p Project 4: Allocator

October 19th, 2009 by mgb568

Expected hours (initial) : 6-8
Expected hours (after project was fully described) : 4-6
Actual hours : 6

This project was actually alot of fun… although I felt bad for tricking the compiler into doing what we wanted it to (read: reinterpret_casts are such a pain)

A last minute glitch some of the test cases revealed almost made our project late, but it got fixed.

TestOutput

Partner’s Blog

CS 371p Week 7 : [I give up on creative subtexts]

October 12th, 2009 by mgb568

It was a pretty interesting week in OOP. I actually managed to get started on the allocator project already, which is actually a really fun project. We spent an entire day on the project description, but I think that was well used, since it greatly helped me understand how the project needed to work.

The Vector stuff made lots of sense (due to similarities between it and ArrayList from Java), but there was some weird stuff with the 2d heap arrays that’s slightly confusing. Function Pointers are an extreme oddity that I’ll have to go over some more (and perhaps toy around with them) before I think I fully understand what we were shown in class. It makes sense so far, it just seems…. unwieldy for most practical purposes.

The generic agorithims tell me we’re getting very close to the hardcore Object Oriented material, which is good.
Test Friday. [Did you really have to put it on the Friday of the OU game weekend? Terrible timing, in my opinion. Wednesday would probably have been a better idea, methinks]

Also of note: It would be GREATLY appreciated of the project turnins could get opened up early for this one.

-Gip

Two Weeks of OOPs

October 5th, 2009 by mgb568

I forgot last weeks blog-post, again, so here’s a 2-weeks in one post.

Last-last week (sept 21-26) wasn’t terrible. Going over functions and such in C++ was good since the method headers can completely screw up how you can use arguments in functions. (scope, different types of pointers, etc)

Last week was the week from Hell. Pretty much every class decided SOMETHING needed to be done before Wednesday. I got most of it done on time (the project was the only late thing). Other than that, all the stack-heap stuff was actually very interesting. Thanks Prof. Downing for answering my question on Friday, and it did make sense.

I found the MatLab project to be very interesting (although it made me late for ACL one day). The challenging part of it was making sure you remembered all of the linear algebra correctly. I might have liked to see dot-product or a few more complex things being done, such as row-reductions, but I think that would make the project more suitable for a ‘introduction to recursion’-type project.

ACL’s over. Back to the grind. Sadness.

CS 371p Project 4: MatLab

October 4th, 2009 by mgb568

So this project was fairly simple, I thought. I did enjoy writing it though.

I didn’t feel like it really tested my knowledge on clases/objects though, since the only vector method I used other than the constructor was .size()

I did this project by myself, since my availabilty this week(end) was kind of whacked due to tests during the week and ACL this weekend.

Projected time: 3 hours

Actual time: about 3 hours or so.