Category Archives: Web Design

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

Binary Tree in Java

Binary Tree in JavaWelcome to my tutorial on the Binary Tree in Java. On average a tree is more efficient then other data structures if you need to perform many different types of operations.

In this tutorial I’ll show you what a binary tree is, and how to create, add, traverse and find nodes. I’ll also explain all the terminology used when describing tree structures. We’ll cover nodes, paths (edges), traversing and much more. Continue reading Binary Tree in Java

Java Hash Tables 3

Java Hash Tables 3Welcome to the 3rd part of my Java Hash Tables Tutorial. If you missed the previous parts you should watch them Java Hash Table & Java Hash Tables 2.

I will review linked lists because I’ve received many requests on them. I’ll also show you how to hash strings, so that we can make a tool that can be used as a dictionary, spell checker, or something like Google Instant. I also show how to use lists in hash tables to demonstrate something called Separate Chaining. Continue reading Java Hash Tables 3

Java Hash Table 2

Java Hash Tables 2Welcome to the 2nd part of my Java Hash Tables tutorial. If you missed part 1, definitely watch it first here Java Hash Table.

In this tutorial, I will cover all of the following and more: 1. Why We Use Prime sized hash tables 2. How to Increase Hash Table Size 3. How to Avoid Clustering 4. How Double Hashing Works 5. How to Find Values in a Double Hashed Hash Table

This video provides many useful algorithms aside from the info on hash tables. Continue reading Java Hash Table 2

Java Hash Table

Java Hash TableWelcome to my Java Hash Table tutorial. A Hash Table is a data structure offers fast insertion and searching capabilities. The negative is that they are limited in size because they are based on arrays. They are also hard to order.

People get confused about them because of the Hash Function. A hash function is used to generate a unique key for every item in the array. Since every item is entered using a calculation, this allows you to reverse the calculation to immediately find the proper index. This way you can find items without the need to search through the whole array. Continue reading Java Hash Table

Big O Notations

Big O NotationsWelcome to my Big O Notations tutorial. Big O notations are used to measure how well a computer algorithm scales as the amount of data involved increases. It isn’t however always a measure of speed as you’ll see.

This is a rough overview of Big O and I hope to simplify it rather than get into all of the complexity. I’ll specifically cover the following O(1), O(N), O(N^2), O(log N) and O(N log N). Between the video and code below I hope everything is completely understandable. Continue reading Big O Notations

Java Quick Sort

Java Quick SortWelcome to my Java Quick Sort tutorial! In most situations the Quick Sort is the fastest sorting algorithm.

In essence, the quick sort works by partitioning arrays so that the smaller numbers are on the left and the larger are on the right. I’ll cover what partitioning is in this video.

The Quick Sort then recursively sends small parts of larger arrays to itself and partitions again. Between the code and the video below you will completely get it in the end. Continue reading Java Quick Sort

Java Shell Sort

Java Shell SortWelcome to my Java Shell Sort tutorial! I really tried to have fun explaining how the Shell Sort works in this tutorial. I show how it works in 4 different ways. We see it graphically, in a presentation format, explained during execution and again in the code itself. Everything can be found after the video.

The Shell Sort is one of the fastest of the easier to understand sorting algorithms. It is similar to the insertion sort, but it has an added feature in which it partially sorts the array before the insertion sort is used. The video and code below will explain everything. Continue reading Java Shell Sort

Java Recursion

Java RecursionWelcome to my Java Recursion tutorial. In the video below, I’m going to cover java recursion in 5 different ways. I figured if I show it using many different diagrams that it will make complete sense.

A recursive method is just a method that calls itself. As these calls are made the problem gets simpler until you reach a condition that leads to the method no longer making calls upon itself. This is known as the base case. The video and code below will make recursion easy to understand. I also cover the Merge Sort. Continue reading Java Recursion

Linked List in Java 2

Linked List in Java 2In my previous Linked List in Java tutorial, I showed you how to create Linked Lists and how to manipulate them.

In this tutorial, I will cover Double Ended Linked Lists which have a reference to the first and last link. I cover how a Doubly Linked List allows you to go backwards and forwards in a list. Then we take a look at Iterators.

Numerous other topics are covered and the code and video below will help you learn. Continue reading Linked List in Java 2

Linked List in Java

linked list in javaIn this video, I’ll cover how work with a linked list in java. I’ll show you how they work in 4 different ways.

We’ll cover how to create them, what a link is, how to add and delete links, how to search through them and a whole bunch more. The basics you need to understand at the end are that: 1) A Link is an Object 2) Each Link has a reference to another Link in the List 3) The LinkedList has only a reference to the last Link added to it. Continue reading Linked List in Java

Stacks and Queues

Stacks and QueuesWelcome to my tutorial on Java Stacks and Queues. The data structures most are used to such as Arrays, linked lists, trees, etc. are best for data that represents real objects. Stacks and Queues are instead used to complete a task and are soon after discarded.

A major difference is that stacks and queues allow only a single item to be added or removed at a time. Stacks then provide access to the last item in, while queues provide access to the first item in. The video and code below will cover everything. Continue reading Stacks and Queues

Java Sort Algorithm

java sort algorithmWelcome to my Java sort algorithm tutorial. Here I will cover all of the elementary sorting algorithms : Bubble, Selection and Insertion sort.

I also created a new method we can use to analyze the arrays so we can learn how the sorts work. I want this video to be very interactive so that you really understand the sort algorithms.

I also cover the linear and binary search algorithms. The code below will help you learn these algorithms perfectly. Continue reading Java Sort Algorithm

Java Algorithms

Java AlgorithmsWelcome to my Java Algorithms tutorial. In this series I will cover everything there is to know about Java algorithms and data structures.

An algorithm is just the steps you take to manipulate data. A data structure is the way data is arranged in memory. There are 3 main data structure operations I will focus on first being inserting, deleting and searching for data.

Like all of my tutorials, everything is simple at first and then I cover more complex topics. The code below should help. Continue reading Java Algorithms

MVC Java Tutorial

MVC Java TutorialWelcome to my MVC Java Tutorial. I have been asked for this tutorial many times in the last few weeks.

To understand the Model View Controller you just need to know that it separates the Calculations and Data from the interface. The Model is the class that contains the data and the methods needed to use the data. The View is the interface. The Controller coordinates interactions between the Model and View.

The video and code below will make it very easy to understand. Continue reading MVC Java Tutorial

Refactoring Video Tutorial

Code Refactoring Video TutorialAfter you learn the core syntax of a language many programmers are lost on what to learn next. What do you need to know to create large flexible and extendable applications?

I did my best to teach you how to structure your programs in my Object Oriented Design Tutorial. And, to understand OOD you have to understand UML. Then we walked down the path laid by the programming masters when we looked at Design Patterns. That left me with the final part of writing great code, which is my refactoring video tutorial. Continue reading Refactoring Video Tutorial

Code Refactoring 18

Abstract Factory PatternIn this tutorial I end my Code Refactoring Tutorial. It was a big one and between it and my Design Patterns Video Tutorial you should be able to do most anything.

To end this tutorial, I’ll cover the Abstract Factory Pattern again to make sure you understand it. It is often considered a hard to understand pattern, but I’m sure you’ll get it after this video. The code that follows will help explain anything you miss in the video. Continue reading Code Refactoring 18

Code Refactoring 17

Visitor Design PatternIn this part of the code refactoring tutorial I will answer another challenge I recently received. This tutorial is all about the Visitor Design Pattern.

You use the visitor design pattern when you want to perform a similar calculation on many different objects. It seems to confuse people, but I hope to solve that here. If you understand the concept of method overloading and the passing of objects back and forth for data access I don’t think you’ll have a problem. The code that follows should answer any questions you have. Continue reading Code Refactoring 17

Code Refactoring 16

Replace Embellishment to DecoratorIn this tutorial, I’ll answer a question that was sent to me. The question pertains to how can we add additional features to code the right way.

When new features are needed it is a bad idea to add new code to older classes. This makes compact easy to understand classes complicated because they break the Single responsibility principle. I’ll show you here how the decorator design pattern instead places each special case behavior (Embellishment) into its own class.

This is a fabulous pattern. The code below will help you learn from the video. Continue reading Code Refactoring 16

Code Refactoring 15

Replace Primitive Type with a ClassIn this part of my code refactoring tutorial, we’ll look at how to replace a primitive type with a class.

Type safety is very important! So, what we want to do is to eliminate all operations on values that are not of the appropriate data type by protecting the program from bad input. One way we can do this is by replacing primitive types with classes. I’ll walk you step-by-step through the process. The code below will help you along. Continue reading Code Refactoring 15

Code Refactoring 14

Code Refactoring Adapter PatternIn this part of the code refactoring tutorial, I’ll show you how and when to use the Adapter Design Pattern.

With the adapter pattern we can create a new class without disturbing any other code. On top of that adapters make it easier to swap in code at runtime. They also allow you to communicate with code using method names that make sense to you.

I refactor code sent in by one of you and show you how to add a ton of flexibility. The code is below to help you learn. Continue reading Code Refactoring 14