Code Refactoring 4

Get the Code:

I wanted to cover in this video a bunch of questions I’ve received lately. Everything after this code refactoring tutorial will be more complex.

In this video, we’ll cover converting simple types into class objects. We’ll also look at how to move fields and methods into other classes and a bunch of tricks to get the most out of that. I also show a few of the many ways Eclipse can help you write code quicker. More tips on Eclipse are planned later in the tutorial.






35 responses to “Code Refactoring 4”

  1. arthurmee Avatar

    Just went to get your code Derek and the message appeared "This page could not be found etc etc ". Not sure whether it's a temporary blip?

  2. Derek Banas Avatar

    I normally use derekbanas for everything

  3. Hecatus Avatar

    Derek whats your minecraft username?

  4. Derek Banas Avatar

    I get into crazy stuff as the tutorial continues. It eventually turns into me answering challenge questions from college professors. That was a tutorial that I had a ton of fun making πŸ™‚

  5. rockYhre Avatar

    Last of the simple videos, I'm hyped to see more interesting stuff.

  6. Derek Banas Avatar

    Yes like many things there are positives and negatives to these techniques

  7. megarocky Avatar

    Separating the date field on its own class is neat, however things get complicated when you use them as Persistence objects.

  8. Derek Banas Avatar

    That's funny πŸ™‚ My birthday is on December 21st

  9. Derek Banas Avatar

    I'm surprised your head hasn't exploded πŸ™‚ That is a ton of information! I'm very happy that you are enjoying them

  10. jimish shah Avatar

    I have watched all the videos of Design Patterns, Object Oriented Design and now intend to watch this whole series on Code Refactoring. Want to thanks alot for these videos. It has been great help to me. Man I am your big fan now πŸ™‚

  11. Derek Banas Avatar

    You're very welcome πŸ™‚ You have no idea how gratifying it is for me to know I'm helping people and sometimes groups of people. That is why I keep making these videos

  12. Mahesh M Avatar

    Yeah thanks for this.
    Actually I have started using the concepts(your Concepts) in my work.
    Everyone was happy with it, except one who asked the above question.
    Yeah i agree that refactoring makes code more understandable.


  13. Derek Banas Avatar

    Code refactoring can slow code versus non-refactored code when a program is first created. But, as additional features are added refactored code will get faster and faster in comparison. Also if you write refactored code it will be understandable and will lend itself to performance tuning that is almost impossible with non-refactored code. Eventually refactored code will be faster. Does that make sense?

  14. Mahesh M Avatar

    Hi Derek,
    Hope you doing good πŸ™‚ I have millions of questions.
    Hope I will get answers for all those.
    Here i go, Does the speed of execution matters when the class thousand lines of code..
    I mean if i have unnecessary code in my class is it going to cause memory problems.
    Basically i want to know how exactly class loader and jvm treats the classes..

  15. Derek Banas Avatar

    I don't have to do it because java assigns default values. I normally do it only to show what default value is already defined.

  16. cz4d4m Avatar

    Hi Derek, thanks for doing these great tutorials. I have one question. Everytime when you define variable you assign empty value to it. Like "" or null. What is reason to do this?

  17. Derek Banas Avatar

    I'm sure the reviewer people get free stuff all of the time. I have never been offered anything for free, but I'm not exactly a big YouTuber πŸ™‚

  18. Alvaro Bernal Avatar

    Hey Derek , is it true that Apple sponsor some youtubers with free computers?

  19. Derek Banas Avatar

    It has no significant effect. This is especially true over the life of the program. As code that isn't understandable is extended it becomes very inefficient

  20. SynforgeGames Avatar

    Is memory something to be considered when your adding all kinds of new classes and variables or is the difference not significant enough to matter?

  21. Derek Banas Avatar

    Yes I do a ton of things with eclipse that i don't do in videos. Typing out everything seems to help people so that is why I do that. Thank you for the tips πŸ™‚

  22. Mladen Uzelac Avatar

    I am glad that you started to show Eclipse tips 'n' tricks πŸ˜€

    I use these for getter/setters and constructors:
    Alt + Shift + S, R (Getters and setter menu)
    Alt + Shift + S, O (Construtor using fields menu)

    And inside menu, I use Alt + Letter for various speed improvements. πŸ™‚

    Customizing KeyBinding in Eclipse can speed up work also. B-)

  23. Derek Banas Avatar

    Thank you πŸ™‚

  24. hussainv1 Avatar

    Derek, your just great buddy. Doing an awesome job!!! πŸ™‚

  25. Derek Banas Avatar

    It is kind of a feel thing. I use the same feeling I use when I'm breaking apart data in a database. If data can be put in another class and make sense, then I put it in another class.

  26. Tadeu Avatar

    Hey Derek,
    You have created the Address and Birthday classes inside the Customer. When to know if is better to create outside like a and ?

  27. Derek Banas Avatar

    Thank you πŸ™‚ I'm going to try to get a new one out ASAP

  28. Imamu Hunter Avatar

    thanks man. although I don't what you meant by speed everything up with C do you mean the database connections?

  29. Derek Banas Avatar

    The front end would definitely be javascript. The backend would either be php or java. I'd speed up everything with C

  30. Imamu Hunter Avatar

    Love the series man. I have a question if you were going to create dating site with tons of features. What would you build it in PHP, JAVA, ASP.Net just wanted an expert opinion.

  31. Derek Banas Avatar

    Thank you πŸ™‚ I'm going to slowly get in to the more complicated topics

  32. Derek Banas Avatar

    I've always aimed to cover topics in original ways, or to cover subjects nobody else does. I'm glad I have some people watching them now πŸ™‚

  33. Anderson Neo Avatar

    Thanks Derek, I wish that you keep us enlightening about new unique things always! πŸ™‚

  34. Derek Banas Avatar

    My videos are too big. They are all recorded in 1080p. YouTube is the only option I have. Other video sites cancelled my accounts because my tutorials are too niche

  35. Derek Banas Avatar

    I'm sorry, but I don't know. I'm just one guy and I can't afford a hosting plan that would allow me to host my own videos. Sorry πŸ™

Leave a Reply

Your email address will not be published. Required fields are marked *