CS 371p Spring 2020: Week of 4/13
1. What did you do this past week?
This week, I finished the Darwin assignment! I ended up redesigning the code far more times than I expected I would need to, but it was probably worth it, as it allowed me to notice some of my weaknesses regarding object-oriented design. I’d never realized I was so dependent on accessors when writing classes until after this project.
I was also caught off-guard by the way srand() and rand() work. I had believed that srand() was deterministic, and that a call to srand() would allow you to completely predict the results of future calls to rand(). It threw me completely off guard that the results for rand() carried based on the system/compiler I used. I was lucky that I’d set up a good debugger for this project, and luckier that I had easy access to the lab machines, or I would have been in real trouble!
2. What’s in your way?
This week, I really need to catch up on sleep! I stayed up very late for a few nights working on Darwin and now I need to recalibrate my sleep schedule. Besides that, I’m doing pretty well!
3. What will you do next week?
This upcoming week, I plan to recalibrate myself. I’m going to sleep at a good time, set up a schedule that includes exercise and has time for all my classwork, and set up my coding environment for the next project (Life).
I might start planning for the project as well, but I won’t start working on it until the weekend, because I need to take time to prepare so that I make ridiculous mistakes when I’m tired.
4. What was your experience of r-value references and move semantics? (this question will vary, week to week)
They were fascinating! I’d never heard of r-value references before, which is surprising because of how helpful they seem to be. I imagine it would save a lot of time in some large programs to be able to use r-values directly instead of saving a copy when returning them from functions.
5. What made you happy this week?
I was very satisfied when Darwin finally started working! It was also satisfying to be able to debug in Visual Studio instead of running it on the lab machines and using print statements, which is how I’d been debugging for the past few projects.
6. What’s your pick-of-the-week or tip-of-the-week?
My advice for this week is to set up a proper workstation and use it exclusively when working. Setting up a good coding environment makes writing and debugging code much easier. Having a dedicated place for a computer complete with a charger saves the time you’d take to set everything up every day. Keeping the rest of the house free of work allows you to relax more easily when you aren’t working, especially if you make your bedroom a work-free zone.