Category Archives: Web Design

Design To Website, Blog How To Set Up, Google Update Pagerank, Google Crawl, Free Submit Site

Code Refactoring 13

Replace Conditional with CommandIn this part of my code refactoring tutorial, I’ll show you how to replace conditionals with the command pattern. I’m also going to do more though.

I’ll also review what the command pattern is. I’ll give an example of when you should use it. We’ll look at how to add flexibility with it. I’ll answer your questions based on the refactoring to patterns book. And, we’ll look at how to store commands in an ArrayList. If you need more look at my Command Design Pattern Tutorial and the code below. Continue reading Code Refactoring 13

Code Refactoring 12

Move Accumulation to Collecting ParameterIn this code refactoring tutorial, I’ll show you how to eliminate large Accumulation Methods by Extracting Methods and Using a Collecting Parameter. It sounds complicated but it isn’t!

This tutorial will show you another way to make your code more readable. It will also introduce you to a few jargon terms you will need to know for the future. This video is shorter than normal to focus on topics you need to understand. The code below will help you master this topic.

Continue reading Code Refactoring 12

Code Refactoring 11

Code Refactoring 11One of you guys sent me a request to explain the chapter in Refactoring to Patterns titled Encapsulate Composite with Builder. We will build a table structure (composite) using the Builder design pattern.

I’ll expand the capabilities of the code from this great book to allow us to more easily traverse the tree structure. This will allow us to add children, siblings and item information using a HashMap. This is a beautiful refactoring. All of the code can be found below to help you learn it. Continue reading Code Refactoring 11

Code Refactoring 10

Builder Design PatternIn this part of the code refactoring tutorial I’m going to revisit the Builder Design Pattern for a couple of reasons. First, I receive a bunch of questions about it. Secondly, in the next tutorial I’ll show you how to build composites, which were covered in the last part of the code refactoring tutorial, with the builder pattern.

The builder pattern allows you to build complex objects in a series of steps. In the video and code below, we will build sandwiches. Here is he previous tutorial on the Builder Design Pattern to help as well. Continue reading Code Refactoring 10

Code Refactoring 9

Code Refactoring 9In this part of my code refactoring tutorial I will cover how to turn an implied tree structure into a composite pattern.

What do you do when you want to model a tree structure? You can either list the info as primitives and then search through them for what you want or you can create objects that represent each level of the tree with the composite pattern.

I have an additional composite design pattern tutorial here. The code follows to help you learn. Continue reading Code Refactoring 9

Code Refactoring 8

Code Refactoring 8In this part of my code refactoring tutorial, I’ll show you how to eliminate duplicate code using the template method pattern. If you want to see another example of the template method pattern, I cover it here as well Template Method Design Pattern.

When objects perform similar steps in the same order, that is a sign that a template method is needed. To use it implement the similar code in a template method and allow subclasses to override the behavior that varies.

The video and the code below cover all that you need to know.

Continue reading Code Refactoring 8

Install Eclipse for Java

Install Eclipse for JavaI’ve been asked to show you how to Install Eclipse for Java a few times lately. So in this video I’ll show you how to install Eclipse step-by-step.

Not only will I show you how to install eclipse, but I’ll also cover how to install Java, set up code completion and install java libraries.

If you prefer to read these steps look here Install Java 1.7 Eclipse (For Mac and PC) and How to Install Java LibrariesContinue reading Install Eclipse for Java

Code Refactoring 7

strategy design pattern in javaIn this tutorial we’ll work with the strategy design pattern in java. If you want to learn more, check out my strategy design pattern tutorial after this.

We’ll explore how the strategy pattern can be used to eliminate conditionals during code refactoring. We’ll also see how it can make your code more dynamic and flexible. It is a wonderful pattern!

I also revisit your questions about the guard clause and the code is available below. Continue reading Code Refactoring 7

Code Refactoring 6

Code Refactoring 6In this part of the Code Refactoring tutorial I’ll focus on conditionals. Conditional statements can very often make your code very hard to read.

Here we’ll clean up conditional statements by extracting them into methods. We’ll look at how important naming can be to writing understandable code. We’ll take a look at guard clauses and when to use them. Then we’ll see how polymorphism can eliminate conditionals all together.

The code follows the video, to help you learn. Continue reading Code Refactoring 6

Code Refactoring 5

Replace Constructor with Factory MethodIn this part of the code refactoring tutorial, I will show you how to replace a constructor with a factory method in 2 code examples.

I also received a challenge from one of you guys that I will solve. The challenge involves how to create a singleton factory method. It sounds more complicated than it is, but by watching this you’ll learn a lot. Here are some topics you may want to brush up on: Java Reflection, Factory Design Pattern, and the Singleton Design Pattern. Continue reading Code Refactoring 5

Code Refactoring 4

Code Refactoring 4I 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. All of the code follows the video, to help you learn.

Continue reading Code Refactoring 4

Code Refactoring 3

Code Refactoring Explaining VariablesIn 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.

Continue reading Code Refactoring 3

Code Refactoring 2

Code Refactoring Extracting MethodsIn this part of my code refactoring tutorial I talk about some basic concepts you have to understand. I’ll cover the process of method extraction. This will help you break down many lines of code into understandable blocks. I’ll also cover when not to extract methods and how to handle temporary and local variables.

This tutorial series starts off slow, but by the end many complicated code refactorings will be covered. The code follows the video. Continue reading Code Refactoring 2

Code Refactoring

Code RefactoringWelcome to the beginning of my Code Refactoring tutorial. Code refactoring is used to improve code design to make it easier to understand and extend. Writing understandable code will allow others to easily modify it and in the end you’ll also find you write code faster because of code refactoring.

I explain what it is in the video below as well as cover the refactoring bad smells and 2 code refactorings to get you ready for what is coming. The code used follows the video. Continue reading Code Refactoring

Object Oriented Design Tutorial

Object Oriented Design TutorialHere is my whole Object Oriented Design Tutorial! The goal of this tutorial is to teach you to make beautiful Object Oriented Designs.

I start by creating a Use Case, Object Model, Sequence Diagram and Class Diagram all in the first video. I then turn those diagrams into code and a working program in the second video. I focus on teaching the Object Oriented Design process in numerous ways in this video series.

Links to all of the diagrams and code follow the 11 videos in this series.

Continue reading Object Oriented Design Tutorial

Object Oriented Design 11

Object Oriented Design 11In this tutorial I finish covering the GRASP patterns I covered previously here GRASP Tutorial.

This time talk about Polymorphism, Indirection and Protected Variations. They show how you can create flexibility in your system in different ways by having different classes implement interfaces. I also talk about Pure Fabrication, which shows the importance of separating out code that impedes low coupling. Code follows the video to help you.

Continue reading Object Oriented Design 11

Object Oriented Design 10

Object Oriented Design 10In this tutorial, I cover GRASP, or General Responsibility Assignment Software Patterns. GRASP defines rules you can use to decide which objects should have which responsibilities in your Object design.

Here I cover the following rules: Creator, Expert, Coupling, Controller and High Cohesion. The tutorial includes a presentation, code examples, sequence diagrams and class diagrams to make everything understandable and interesting. The code used follows the video.

Continue reading Object Oriented Design 10

Object Oriented Design 9

Object Oriented DesignWelcome to part 9 of my Object Oriented Design tutorial! This all started back in part 3 in my UML Use Case Tutorial.

Here I’ll finish turning sequence diagrams into code. If you get good at this process you’ll be able to make any program no matter how complicated it may be.

All of the code from this and the last tutorial can be found below to help you learn. In the tutorials that follow I’ll answer all of the design pattern tutorials I’ve been receiving. Continue reading Object Oriented Design 9

Object Oriented Design 8

Convert Sequence Diagram into CodeI showed you how to turn your program idea into a Use Case. Then we turned the Use Case into a Domain Model. Then I showed you how to turn the Use Case into a Sequence Diagram. Then we made the Sequence Diagram into a Class Diagram. Now I’m going to show you how to convert the Sequence Diagram into working code.

I make part of the code in this video. The rest will be made in part 9 of my Object Oriented Design Tutorial. All of the code follows the video to help you learn. To get the other diagrams, just click the associated links above.

Continue reading Object Oriented Design 8

UML Video Tutorial

UML Video TutorialUnified Modeling Language (UML) is a graphical way of describing software systems. In this tutorial series, I cover Use Case, Activity, Class, Object, Sequence and many more UML Diagrams.

I can’t think of anything more important for a good programmer to understand than UML. With it you’ll be able to create first class Object Oriented Designs. Those designs will allow you to create anything you can imagine. But, without UML none of these things are possible. Every video and links to all of the code can be found below.

Continue reading UML Video Tutorial