Week 10

Topics in wk1

Knowing how to write unit tests can help you fix issues with your code early on (before stuff gets crazy and you end up rewriting your entire codebase just to fix one bug). For each reasonable method in your classes, you should write a unit test. While you are adding functionality/features to your program, you can run your unit tests to see if whatever you added broke some method in your class, making the process of fixing issues easier. Git is a pretty useful tool for version control. It allows you to create separate branches for features you intend to add to your program and a safe way to revert any devasting changes you make to your code (e.g. your code produces 1500 compile time errors, and you don't why, so you checkout your main branch and destroy your feature branch. Just make sure you are NOT committing to main...) Interfaces serve as a blueprint to your code, they make your code more readable, and they are used all of the time in Android development.

During week 1, I learned about encapsulation in Java. These include the visibility modifiers: private, public, etc. These are useful as it gives you the ability to control what can call or read values/methods from your classes. I then went over Java's generics. These were almost identical to generics in C++, so they were not very hard to learn. I also went over Java's Scanner class to read input from the keyboard. It is also much easier to use compared to cin in C++.

Comments

Popular posts from this blog

Week 5

Week 4

Week 2