Thursday, February 29, 2024

Newbie to Another Newbie

Applying Algorithmic Design and Data Structure Techniques 

in Developing Structured Programs (in Java)


In the introductory phases of programming and coding, algorithms and data structures will rarely be used. However, once you begin storing, collecting, altering and sorting data, knowing the best way to do so for the situation at hand will make your code more readable and easily alterable, not just for yourself but for others you may be collaborating on a project with. 

The size and intensity of a project, the speed that the calculations must be performed, and how much space (memory) is available will help you determine which data structure is best for the situation at hand.

Another important factor to consider is whether or not the data will be sorted or not. If you're designing a new program to collect or organize data, you can code your program to sort it for you. If you'll be working with preexisting sorted data, you can code it to work with the data at hand. If the preexisting data is unsorted, there are still plenty of efficient ways to track down the exact data you want.

In Java, some popular techniques for organizing data are arrays, linked lists, graphs, stacks, and queues. You can use one or more of these to create the storage and alteration method that will fit the project. Java actually provides built-in libraries for most of these basic techniques. 

Arrays might be perfect for when the amount of data is already known and won't change.

Array Lists might be perfect for when the amount of data is subject to change and needs to be accessed quickly.

Stacks are useful for quick operations using the last-in, first-out method. This is common in undo and redo operations, and works similarly to a visual short-term memory. 

Trees are useful for when most of the data is already known, needs to be accessed quickly, and the data needs to connect or be relatable to other data.

Queues can be useful for exactly what their name is. Like an order management program for an online service, a doctors office waiting room, or a to-do list. This follows the first-in, first-out method.

Some more complex data structures like Priority Queues can be useful for backlogs, email sorting, or tackling tasks that may be easier to complete or affect more people.

This blog post will only cover a few of these techniques, and only scratching the surface on each. Combining techniques and methods will allow you to tackle any project, for almost any situation. This can help to perform operations more efficiently, keep large amounts of data sorted and updated, or where large amounts of information need to be bound to a single key, string, phrase, or code.

Understanding the characteristics and performance of every data structure is necessary for working with Java, and understanding how the structures interact with each other will allow you to tailor the program to best fit your project's needs.

Thursday, February 1, 2024

Newbie to Newbie

First off, what is Java? Java is an OOP language, or Object Oriented Programming language. Developers usually choose Java due to its implementation across many various platforms, coining the phrase "write once, run anywhere" or WORA, meaning that any platform with the Java framework built in can easily run any Java application, without having to design one for Linux, one for Windows, one for Mac, etc. Java is mainly used for "enterprise" or large-scale applications that can be used over a variety of devices and platforms and connect together seamlessly.

If its your first time using Java (not to be confused with JavaScript) setting things up can seem quite daunting, but there are a few useful things you can do. 

First, you'll need an IDE, or Integrated Development Environment. This is where the coding will actually take place. You can use anything from Command Prompt to Visual Studio Code, and there are tons of options. 

A List of Popular IDE's

Next, you'll need to install a JDK, or Java Development Kit, also referred to as a JRE, or Java Runtime Environment. You won't need to interact with this beyond installing it, as any JDK will be the resources you need to run the Java applications you create.

A List of Popular JDK's

After you have both of these installed, you'll need to create folders and files that coordinate to your project's name. The best way to do this is by following the tutorials located directly on Java's website.

Java's Tutorials

After, that you're done! You're ready to start learning how to code with Java, which is best done with some kind of online class, course, or a follow-along tutorial. Udemy can be a great place to start, as they will guide you through the entire process. 

Best of Luck!

Newbie to Another Newbie

Applying Algorithmic Design and Data Structure Techniques  in Developing Structured Programs (in Java) In the introductory phases of program...