Final Entry

What did you like the least about the class?

I don’t like all of the non-code stuff that we need to do for each project, like making GitLab issues and creating the html documentation. I guess it’s what we would be doing for a professional development project, but that doesn’t mean I can’t dislike it.

What did you like the most about the class?

I like the project ideas. Especially the Darwin project. I once had an idea for a Spore-like ecology game, and I kinda want to revisit that based on Darwin. If you don’t know what the Darwin project is, look it up. It’s pretty cool, and it’ll at least give you a head start on the project.

What’s the most significant thing you learned?

Lots of small aspects of C++, like how having && in a parameter means that it must be an r-value, or what methods are given by default when you define a class, or how const works, yada yada. I don’t remember all of it, but there’s a lot, and it’s pretty good stuff.

How many hours a week did you spend coding/debugging/testing for this class?

My total recorded time for the projects is 114 hours, and the course is about 15 weeks long, so let’s say its an average of about 7 to 8 hours a week.

How many hours a week did you spend reading/studying for this class?

Ha, reading.

I might have spent a day or two before each test studying, but I also attended every class and did all the assignments, so… idk, 4 to 6 hours studying for each test?

How many lines of code do you think you wrote?

cloc is saying that for all 5 projects, there was a total of 3301 lines of code in the .c++ files and 448 lines of code in the .h files, not including blank lines and comments. Also there was 949 lines of makefile code, but most of that is provided to you, or you can just copy it over and change some names around.

What required tool did you not know and now find very useful?

I guess the tools we used to make the UML diagram. I’m not over the moon about it, but I guess it’s a good way to see the big-picture design of your project.

How did you feel about the cold calling, in the end?

I like cold calling. I think some people don’t like it because it makes them feel pressured, but I like the challenge, especially since Downing likes to direct you and talk over you (not in a rude way. It’s just that there is a limited amount of class time, so you kinda have to push towards the answer), so it kinda becomes a battle of who is directing the conversation. The trick: explain your thought process as you think it. It helps you direct the general flow of the discussion, and avoid misunderstandings. If there is something about the code that confuses you, or a piece of information that you don’t know, then say it and he’ll give you the answer, or at least guide you to it.

If you could change one thing about the course, what would it be?

How the first test was structured. I know that we were the guinea pig group, and that the test will be structured differently in the future (from 45 min no-discussion and 45 min discussion, to 60 min no discussion and 30 min discussion), but that still doesn’t change the fact that I want the test structure changed.

18 Nov – 24 Nov

What did you do this past week?

This week me and my partner tore down our wall of compilation errors and passed the Conway, Fredkin, and Cell HackerRank tests.

What’s in your way?

Now we have to do all the no-good-very-bad good-practice things, like the UML diagram. Speaking of which, I’m a little confused about associations. Associations were described to me as one class “knowing” that the other class exists, but in lecture it was described as one class containing another class. So, like, if you have a global static variable of class A, does that mean that all classes have an association with class A, since all classes are aware that class A exists and can call methods from class A? Or is there no association, since the classes don’t contain A within them? I’ll assume the latter, since containment seems like a more concrete concept.

What will you do next week?

Like I said, we just need to add all the miscellaneous goodies. It feels nice that this is the last project. I have another project for mobile development that I’ve been slacking on. Now, with this project out of the way, I’ll finally have some time available (for more slacking, of course).

What was your experience of method overriding, pure virtual methods, and clone()?

Why can’t you implement pure-virtual methods on declaration? Can’t you, just, add a keyword? Like: pure virtual void foo() {…}, or virtual void foo() = 0 {…}, or something like that? I mean, I know that its best-practice to declare in the h-file and implement in the c++ file, but can’t we at least have the option.

But other than that, the general idea of inheritance and overriding gives me a strange sense of satisfaction. I’m not completely sure why. I think it might be how it reduces redundant code. Really tightens everything up.

What’s your pick-of-the-week or tip-of-the-week?

I’m not sure if this is an obscure thing or if I’m just way out of the loop, but I was recently told of this UT program called HireUTexas. It’s a program where a bunch of companies post available positions and you can send them resumes and transcripts via a connected Handshake account. It’s pretty convenient. You can filter by type of job, location, whether or not you match their requirements, etc. I’ve been procrastinating on the internship hunt, so this tool has been a good way to at least dip my toe in the job pool.

11 Nov – 17 Nov

What did you do this past week?

Thank you for asking. That’s really sweet.

Well, this week, me and my partner started coding the Conway portion of this project. So far, we’ve implemented all of the code and have compiled it…

What’s in your way?

… but we’re getting a lot of errors. There was this one where it wouldn’t recognize AbstractCell as a class name. Did you know that if you have a template argument T for AbstractCell and for Child, then you have to declare it’s children as “class Child : public AbstractCell<T>”, not “class Child : public AbstractCell”? Right now the error we’re on is… *checking* … template argument 1 invalid, for vector<AbstractCell*>… OH WAIT it should be vector<AbstractCell<T>*> shouldn’t it? Wow, It actually looks like template arguments are the cause of a lot of our errors. huh.

What will you do next week?

Well, I guess we need to fix those errors by putting in those template arguments. Then, start implementing the code of the Fredkin cells, which shouldn’t be too hard since already went deep with the future-proofing. Then we’ll start Cell. Then do all the stuff. You know the stuff? Yeah, you know the stuff.

What was your experience of inheritance?

Every time I get to this question I have no memory of what we discussed. Ok, time to consult the notes…

Oh yeah, I didn’t know that child constructors always called the parent’s default constructor. I also had no idea how to call the super constructor, until now. But can you call one of your own constructors from another constructor?… Ok I looked it up. You just call the constructor after the colon, just as you do with parent constructors.

I’m still not entirely sure how overriding works. It doesn’t auto-do polymorphism, so that sucks. But what if you have a child and call a parent-implemented method? Does it do polymorphism then? I don’t know, and I’m tired of looking things up, so I’ll just leave it a mystery.

What’s your pick-of-the-week or tip-of-the-week?

In school, you may often find yourself bored during a lecture. And you could stay bored. Or, you could learn some pen tricks. They feel cool to do and they help to pass the time. And you have plenty of time to practice in class (though you’ll probably drop your pen a lot, so try not to annoy people). I watched some videos by 52Kards, but there are a lot of other channels out there you can use. For beginners I recommend the ThumbAround (or as Day9 calls it, “Captain of the Debate Team”). It has the perfect balance of cool to do and quick to learn (relatively. It took me 2 days). Have fun.

4 Nov – 10 Nov

What did you do this past week?

We fixed that one error (we made the row and column labels use only the most significant digit), then did all the stuff. You know the stuff. That stuff.

What’s in your way?

Nothing for this class. Or any class really. Had a lull in my schedule yesterday. Went to a café. Ate a mozzarella and veggie sandwich. It was good.

What will you do next week?

Melted mozzarella, fresh pesto, mushrooms, caramelized onions, all on fluffy, buttery sourdough bread. With a side of chips and salsa.

What was your experience of move semantics and allocators in the context of the vector implementation?

Isn’t it a bit confusing to have the r-value cast called “move”? I know that it’s most common use case is to move values, but that’s not really what it’s doing. And what if you have a method called move, but then also want to cast a variable to an r-value? That’s gonna lead to a collision. Why didn’t they just do something like reinterpret_cast<&&>, or call it to_r_val, or something like that? Just some small complaints.

Other than that, moves and allocators don’t ellicit any emotional responsed from my. They are just tools you might want to use sometimes.

What’s your pick-of-the-week or tip-of-the-week?

Here’s a tip: when people ask you for your information, like when websites ask for your email, or when hotels ask for your address, you can usually give them fake info. Give them the address of the white house, or some road in the middle of Idaho or something. When I was making the UML diagram for the project, Gliffy asked for my email. So naturally I typed in fake@email.com. Funny enough, the address was already in use. Guess I wasn’t the first person to think of that. I should try to register that email. I wonder what kind of spam it receives.

Well, I haven’t reached the word limit, so as promised in a previous post, here’s that philosophical thought experiment.

Ok, so, imagine that a scientist invites you to his lab. In this lab, there is a supercomputer that runs a simulated copy of everything in the lab (except for simulation itself. No recurrsion allowed here). When you enter the lab, your brain is scanned and copy-pasted into the simulation.

So there are two you’s: the real you in the real lab, and the virtual, fake you in the lab simulation (I’ll call this version of you “robot-you”). Since you are identical copies in identical settings (and since the universe is, for the most part, deterministic), you and the copy perform the same actions and perceive identical experiences, even though you act independently. It’s like how two coins that are flipped in exactly the same manner and under the same conditions will land on the same side. So whatever you think, robot-you also thinks, and, as you see on the lab monitor, whatever you see, robot-you also sees.

Ok, so where is this going? Well, if you and robot-you are experiencing the same thoughts and sensations, how do you know that you are not the robot? If you were to, say, press the END SIMULATION button, would nothing happen, or would you, upon pressing the button, experience instant anihilation as the “real” you presses the “real” button?

What is the moral to this story? Consciousness is a pattern, not an object (or, to put it a programmery way, consciousness is a type, not an instance). Just as head-heads-tails here is the same as heads-heads-tails there, and how an ordering of playing cards here is identical the the ordering of playing cards half-was across the world, any two consciousnesses that experience the exact same thoughts are actually one consciousness. So you could be a human experiencing life on Earth, or a copy of a human on an identical version of the real Earth, or just a brain in a vat experiencing a simulated reality. It doesn’t matter. All of those consciousnesses are one and the same. There must be difference in the pattern (like turning off the simulation) before the two consciousnesses can be considered separate.

But wait, if patterns aren’t localized to any place in space, and consciousness is a pattern, then why does consciousness feel so localized? Why can’t I experience the consciousness of others? Why can I only see through these eyes and only feel what is in this brain? Well, either external reality isn’t real and you are just imagining all this, or you do actually experience everything, as explained in the end of a previous post.

Hope this was interesting for you.

28 Oct – 3 Nov

What did you do this past week?

This week me and my partner worked on the Darwin project. This consisted of making the Darwin, Species, and Creature classes, implementing their methods, making the run method (which includes reading in and parsing the input, setting up the turn-taking mechanics, and creating the output of the game (which, unusually we decided to implement in the Darwin class, since it had easier access to the creature grid and we couldn’t pass the grid via getters or setters (which was a bit of a challenge since the classes depend so much each other, like how the Species class has the instructions and the Creature class needed to use those instructions to update itself. We eventually got around this by having the Darwin class hold pointers to many Creature instances, and having creatures point to their species. In the end, our entire class configuration looks like one big Russian nesting doll (or Matryoshka doll, as is its official name)))).

What’s in your way?

We aren’t passing a lot of the tests. I’m not entirely sure why, but I recently found out that we have to make the row and column labels display only the most significant digit. Hopefully that fixes it.

What will you do next week?

Probably fix our code and then do all the extra hooha.

What was your experience of the vector implementation?

I’m a little confused on what the moral of the last Friday’s vector lesson was. And by confused I mean I don’t remember any of it.

What’s your pick-of-the-week or tip-of-the-week?

So apparently you can separate different pitches in sound using Fourier transforms. This is one way that they implement autotune. So if you’re feeling bored and/or up for a challenge, try making a program that can separate music into their different tones. Specifically, separate this song. It’s been driving me crazy. Like, it just keeps going up, but then you go to the beginning and it turns out the end is lower than the beginning? And I can’t seem to find the seam. I’ve even tracked the peak notes on a piano, but I still can’t figure it out. And this isn’t Shepard’s scale stuff, I can hear how that works; that’s just a rising tone followed by a sneaky tone coming in from underneath. But this one, this one’s baffling.

20 Oct – 27 Oct

What did you do this past week?

Me and my partner fixed that bug in our code, which let us pass all the HackerRank tests. Then we did all of the other stuff that we’re supposed to do for projects.

What’s in your way?

Not a thing. The next project hasn’t been announced.

What will you do next week?

Not the project that hasn’t been announced, that’s for sure.

What was your experience of the allocator project?

I have some small criticisms, but in general I thought it was an average quality project.

At the beginning of the project, there was a little confusion over what exactly the methods and iterators were supposed to do. What does valid() do? Does the iterator iterate through bytes or blocks or what? These questions were later answered, but I think it would have been helpful to have that in the given documentation, just so we know what the classes and methods we’re implementing are supposed to do.

Also, I’m not sure why we needed to implement the iterator classes. I think we were supposed to use them for our allocate and deallocate methods, but those needed to set both the start and end sentinels, and accessing the end sentinel via the iterator was a little clunky. Using the [] operator on the allocator object seemed like the cleaner option. Also, I didn’t like how end() gave an iterator that pointed to the end of the array, since iterators are supposed to point at the start sentinels, not end sentinels. As a result, we only used the iterator for a small portion of our read method, and not much else, so the class just seems extraneous.

But overall, it was an average project.

What’s your pick-of-the-week or tip-of-the-week?

Here’s a video for attaching a macro keyboard. Currently it’s a sad state of affairs for keyboard aficionados. Might make that a project, since the luaMacro and autoHotKey code is opensource. I’m sure automation maniacs across the realm would be pleased.

I haven’t reached the word limit yet, so I’m gonna ramble about collective consciousness.

OK, so you know how the left and right hemispheres of the brain can send each other information via the corpus collosum? So, we have a real world example of moving thoughts from one entity to another (if you wouldn’t consider the right and left brain two separate entities, check out split-brain syndrome).

So imagine Alice, Bob and Chuck. Now imagine that Chuck is able to read the minds of Alice and Bob (like I said, we have a real world example of moving thoughts from one entity to another). Like a normal person, Alice thinks and feels like she is herself and only herself, and not Bob or Chuck. The same applies to Bob. But Chuck can experience the thoughts of both Alice and Bob, and thus has the feeling of being Alice and not Bob, and being Bob and not Alice, simultaneously.

So, taking this reasoning further, what if we are all one single conscious entity that simultaneously feels like me and only me, you and only you, Benedict Cumberbatch and only Cumberbatch, etc., and any transference of information between brains is like the transfer of information within a brain?

It might seem like a stretch, but it does solve the whole locality of consciousness problem (why I feel the things in my brain, but not anything even a millimeter outside of it). Oh wait, that might not might not seem like a problem unless you think of consciousness as a pattern and not as an instance, a view which I haven’t explained yet. Oh well, I’ll save that idea for another ramble. It’s a doozy, I have a whole thought experiment and everything.

14 Oct – 20 Oct

What did you do this past week?

Oh good, they fixed the WordPress lag. So, this week me and my partner made the deallocate method, the io method, touched up a few things and made some unit tests.

What’s in your way?

Originally I was worried that we would have a hard time getting our code to work, but one HackerRank submission later and we’re already passing most of the tests. There’s still that one test we aren’t passing, but I talked to another student and found out we were interpreting the input erroneously. Thanks Ameya, you get mad props.

Other than that, it’s just the tests, checkdata, ci file, sprucing things up (our allocate and deallocate methods are ugly as sin), running doxy, yada yada.

What will you do next week?

Do the project, turn in the project, then sleep. Then stop sleeping, and work for other classes.

What was your experience of the peer-instruction exam?

Hmm…

Why did we have a peer-instruction exam? Why did the professor think that giving half the time for individual work, then half the time for collaboration, instead of giving the full exam for individual work, would be a good idea? Well…

Programming is rarely an individual endeavor. In the professional setting, there is usually a group of programmers collaborating on one project. So, to be a good professional programmer, you need well-developed group skills: good communication, scheduling, task allocation, etc. So, in a class that aims to teach students how to be professional programmers, it makes sense to put them in a group and have them work together.

And, it just so happens that on exams, some people get the solution in a few minutes, while others spend the whole time fruitless staring at a problem. So, why not have group exam experience? That way, those who got the answers can teach others and bump up their explanation skills, while those who didn’t can learn not only what the answer is, but why it works. And group work acts as its own grading curve. Win-win.

This is how it would work in an ideal world. In reality, there becomes an answer economy, with students peddling the solutions they have for those they don’t. The time restraint makes explanation risky, leading students to mindlessly copying text, without soaking in what exactly their writing. In the end, nobody really works together, nobody learns, and everybody gets less time.

Overall, I do think this class does a good job in building group skills, with the group projects and in-class exercises and such. But as for these exams, I think I would prefer to spend the whole time working on the problems individually.

What’s your pick-of-the-week or tip-of-the-week?

Today, while I was working on the project, I showed someone how you can easily switch between files in nano. They were pretty impressed, since they use vim (the clearly inferior choice). However, if you do use vim and want that nice tab-switching capability, here’s some advice on how to set the key bindings.

7 Oct – 13 Oct

What did you do this past week?

This week me and my partner set up the GitLab repo (though she doesn’t have permission to push into the master branch. I’ll need to figure out why.), implemented the methods of the two iterator classes (which, by the way, person reading this, did he ever say why we need an iterator for an allocator? You don’t use it internally, since it has to skip ahead to the sentinel positions, and the iterator doesn’t have an operation to do that. And we would never want to encourage a user to just iterate through your heap memory. I mean, maybe you want them to be able to iterate through a data structure that they put into your heap, but they should just use the iterator given by the data structure, like how vector has vector::iterator. Leave your thoughts in your comment. Or don’t. You do you.), and implemented the allocate method. We also made some unit tests to make sure that our allocate method at least partially works.

What’s in your way?

We still need to implement the deallocate method, then do all the unit tests and acceptance tests, the issues, the doxy rigmarole. We are prairie nomads traveling West. The only thing standing in our way is distance.

What will you do next week?

First we’ll implement the deallocate method, then push our code through HackerRank. Then we’ll do all the… wait. How will we input the data into the program? Was that code provided?… Oh God it wasn’t. Hmm… Maybe we can modify the read method from our voting code. Are we allowed to do that? I think we’re allowed to do that. That’s probably what we’ll do.

What was your experience of peer-instruction quizzes? (this question will vary, week to week)

I wonder when we’ll figure out that one person can go up to the chalk board, ask what the popular answer is, write it on the chalk board, and then maybe ask for an explanation if time allows. Make the thing into an organized forum, rather than just a bunch of people talking and potentially not hearing the right answer. I wonder if that’s still in the spirit of the quiz format.

What’s your pick-of-the-week or tip-of-the-week?

Over the summer I spent some time trying to make a reinforcement neural network. I used this paper to learn how to do it (you probably only need to read the methods section, especially the algorithm outline, and maybe some of the hyper-parameter table). I also used this python tutorial for some insight into the implementation, and this extremely awesome webpage to understand how RMSProp worked, as well as some other ML optimizations like Momentum. Be warned, this is a little more advanced than your basic neural network, so if you don’t know much about ML, I’d start off with these videos by the amazing 3Blue1Brown.

30 Sep – 6 Oct

What did you do this past week?

Well, me and my partner built the working project code, passed HackerRank with said code, created unit tests and acceptance tests for the code (I know we’re supposed to make the tests before we start coding, but making unit tests when you don’t know what your API will look like makes the whole process a little inflexible. Maybe it would be a good idea to create unit tests either immediately before or immediately after you create the method, since the code’s still fresh in your mind and at least you can be more confident in your method as you go forward. Also, how do you make good acceptance tests when you don’t know what the output should look like? If you use the output of your code as the assumed “correct” output, how do you know if the program is malfunctioning or not? Do you compare it with the output of others? What if their code is wrong? Is it even possible to know what is correct and what is not? …Food for thought.), documented, commented and asserted our code, opened and closed the issues, filled out the readme, ran cppcheck, checktestdata, valgrind, gcov, astyle, doxygen, git log, *inhale*, and submitted the goshdarn thing to Canvas (twice).

What’s in your way?

NOTHING!

What will you do next week?

PROBABLY SOMETHING I DON’T KNOW YET!

What was your experience in learning about equal(), copy(), fill(), and the different STL containers?

It was fine. Nice to know how those data structures are implemented. Might be useful if I need to make data structures similar to them. Those three methods might prove to be useful. Also, I’m not sure why we had to give specific names for the different kinds of iterators. Usually you only give names to things that you often reference, and I don’t know how many times in conversation I need a word for a read-write iterator that may iterate forwards and backwards, but is not necessarily indexable. Though I guess it might be good to have some official name for it, somewhere. I don’t know. In general I have no strong feelings about this.

What’s your pick-of-the-week or tip-of-the-week?

Do you use vim? Do you hate how you have to press ‘i’ in order to actually edit the text in this text editor? Here. Do you hate how you have to type ‘:’ to do anything, instead of using ctrl or command like a normal person? Here. Do these suggestions actually work? No clue, I don’t use vim #NanoNotThatBad

23 Sep – 29 Sep

What did you do this past week?

This week, scheduled some meetings to work on the latest project. So far we’ve handled the read methods (which I guess means we’re halfway done), and outlined how we intend to implement the voting results computation.

What’s in your way?

Well, right now it’s the fact that WordPress is lagging like a brother hugger. How hard is it to put text into HTML? But as for the assignment, not much is in our way. We got things planned, and now we just need to implement them, and hope that we don’t run into any problems. Sorry, this WordPress thing is really making me low-energy. Usually I try to make these blogs a little more entertaining. But I just don’t feel like it right now. This a phoned-in post. Enjoy.

What will you do next week?

Hello from Notepad. WordPress keeps jumping to the top of the page whenever I write anything down, so I’m gonna have to MacGyver this mess. Anyway, what was the question? Oh yeah, um, we’ll probably implement the actual voting computation process, do some debugging, then add in some unit and acceptance tests, *checks rubric*, add those tests to the public test repo, then do all the miscellaneous things we have to do, like doxygen and astyle.

What was your experience in learning about stack-allocated arrays, heap-allocated arrays, and equal()?

I usually prefer languages like C++ and Java over things like Python, mainly because I like having a small set of fundamental rules (pointers, inheritance, lambdas) rather than a bunch of tools that someone else made that you could possible replicate yourself (tuples, those weird parameter things python does, like unpacking and named parameters). That stuff feels so toy-box-y. But the fact that using int[] is slightly different from int*, and that there are already-built methods like equal and fill, which you could somewhat easily implement yourself, kinda skews C++ over into toy box territory. I mean, it’s not that bad. Might even be a bit helpful. But I still feel like some of that good ol’ C++ No Nonsense spirit is a little tainted.

What’s your pick-of-the-week or tip-of-the-week?

Here is a talk given by Mark Rosewater, head designer of Magic: The Gathering. It mostly intended as advice for videogame design, but it can also apply to software development, especially when it comes to user experience. Give it a watch, it’s pretty good.