In this part of the code refactoring tutorial, I show you examples of how you can make your code more understandable using something called an Explaining Variable.
We also explore many short cuts people take when writing code that will cause many problems later. I want to get these basic rules out of the way so we can concentrate on refactoring to design patterns very soon in this tutorial series.
The code is available below to help you learn.
If you like videos like this, it helps to tell Google [googleplusone]
Code From the Video
Product.java
Store.java
How different would PHP be from your Java examples, Derek?
PHP and Java are considerably different from each other. PHP is a scripting language. It is best at pulling data from the server and providing it to web pages. For that purpose it is fabulous.
Java is a general purpose language that can be used to create just about anything. The major problem with Java is that it is slow, but if you combine it with C, which I’ll do soon, it can do even more.
Both are great languages, but php is a highly specialized language. I hope that helps
Awesome!!
Thank you 🙂
Good work. Thanks
Thank you very much 🙂