Thursday, August 17, 2023

Data Structures & Algorithms

 Algorithmic Design

When developing a program, having a clear idea of how you want it to perform is crucial; that is where algorithmic design comes into play. "An algorithm is a method or a process followed to solve a problem" (Shaffer, 2013). There are many different algorithms to choose from, to search and sort, but the complexity of the design will depend on what you want to accomplish. However, no matter which algorithm you choose, it must perform as intended, have concise steps to perform without ambiguity, and be limited to the least number of steps possible to allow proper execution. You must always keep in mind that the computer running your program will not have an unlimited amount of memory. Time Complexity and Space Complexity are two key concepts to remember. "The time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the length of the input" (Time Complexity and Space Complexity, 2021). Although it is not the same as how quickly a computer may execute the task. Space Complexity is the "amount of memory required by the algorithm to solve given problem" (Time Complexity and Space Complexity, 2021). To get more information about these concepts, click here. Two standard search algorithms are linear search and binary search. A linear search algorithm is a good option for smaller datasets, requiring iteration through the entire dataset until the designated value is found. However, a binary search algorithm is a better option for larger datasets. A binary search will break the dataset into sections by locating the middle value, then shifting left or right depending on where the designated value would fall. The process continues until the value is found while also cutting down on time to complete the task by not iterating through unnecessary values.

Data Structure

Data structures are essential to program performance and can make or break a program. A “data structure is any data representation and its associated operations (Shaffer, 2013). Data structure examples are linked lists, queues, trees, arrays, and stacks. Like algorithmic design, the type of data structure used depends on the task at hand. Linked lists and stacks are two data structures I have had the most success with. Each class allows for adding or removing elements easily with simple methods like add() and remove(). Queues I found a bit confusing using the poll(), peek(), and element() methods. However, practice and repetition will help the concepts stick as with anything new. One thing to note is if you have data likely to change, use a linked list and not an array. Data within an array is fixed, and linked list data is not. 

Going Beyond

When the time comes for me to develop a structured program, I’ll start by figuring out what problem needs solving. From there, I will compare algorithmic design methods while keeping time complexity and space complexity in mind to ensure the program I create suits the task. Lastly, I will determine the best data structure to make my program efficient.


References:

Shaffer, C. A. (2013). Data structures and algorithm analysisLinks to an external site. (Edition 3.2). Retrieved from http://people.cs.vt.edu/~shaffer/Book/JAVA3elatest.pdf

Time Complexity and Space Complexity. (2021, July 11). GeeksforGeeks. https://www.geeksforgeeks.org/time-complexity-and-space-complexity/





Thursday, July 20, 2023

Installing Java and Object-Oriented Programming

Getting Started

Learning a new programming language can seem intimidating if you are anything like me. However, as with anything new, it is vital to keep an open mind, take your time, and, most importantly, ask questions and research to find the necessary information. To start your journey with Java, you will need to install it on your computer or laptop, along with an IDE (Integrated Development Environment) to write your code or a code editor. A simple internet search will provide information about many options available. I use a code editor called Visual Studio Code. I chose VSCode because I found it easy to use while learning another programming language, as it provides tips and alerts you of code errors. Below are links to resources that helped me get started with Java. The third link provides information on writing and running a “HelloWorld” program. The program is simple and allows visibility to basic Java syntax to ensure you are on the right track. Hopefully, the below resources will be of help to you as well.

Object-Oriented Programming

Object-Oriented Programming, also called OOP, differs from procedural programming as the code contains both a method and data. Procedural programming is a list of step-by-step instructions telling the code what to do. Of course, OOP is a concept with many moving parts; however, let’s focus on four major components for now. The four parts we will discuss are encapsulation, abstraction, inheritance, and polymorphism.

Encapsulation can be thought of as a way to protect or hide the primary data within a program from specific methods. Two methods will attempt to gain program data; accessors and mutators. Accessors try to gather information related to objects, and mutators attempt to change data.

Abstraction is a way of setting up code so that only its relevance will show up in the software. In other words, abstraction keeps the inner workings or minute details away from view. 

Inheritance, in simplest terms, is a way for objects to share data. Although there may be many data classes, inheritance makes data relatable in a hierarchy so it can be shared.

Polymorphism allows for parameters to be set but not set in stone. For example, a set of functions can be named the same, but each plays a different role in how a task executes.



Monday, July 17, 2023

OS Theory Concept Map

    Contemporary operating systems play a crucial role in how individuals interact with computers. One way to simplify the interaction is to view an operating system (OS) as a liaison between the user and computer hardware. Means of communication can be achieved by different user interfaces (UIs), such as a graphical user interface (GUI), a command line, or a command line. The "operating system is the one program running at all times on the computer" (Silberschatz et al., 2014, p.6). Operating systems seamlessly perform multiple jobs in the background, making the usability of computers more manageable for the user. An operating system has many vital responsibilities, making it possible for computers to operate efficiently. 

Features of Contemporary Operating Systems and Their Structures

Process Management ensures processes sent to the CPU are executed efficiently, including how and when a process is sent. Often, multiple processes are running at once, and it is process management regulating the actions. Successful process management entails the operating system allocating and controlling how much time is utilized per process to ensure effective execution. Another responsibility of the OS is Memory Management. Memory Management keeps track of data storage, loading, and allocation. A series of reads or writes to a specific memory address enables interaction, allocates which processes require memory, and determines how much and how long it is needed. Next, there is Storage Management in the list of vital OS responsibilities. "The operating system abstracts from the physical properties of its storage devices to define a logical storage unit"(Silberschatz et al., 2014, p.6). Storage management is the means an OS uses to store and arrange data in a way that a user can access and understand. An example of storage management many users are familiar with is the user of saved files within folders on a desktop. Protection and Security are the gatekeepers of data and resources within a computer. Although representing two separate functions, they are often linked together as they work hand and hand to regulate resources. For multiple users sharing a computer, "mechanisms ensure that files, memory segments, CPU, and other resources can be operated on by only those processes that have gained proper authorization from the operating system." (Silberschatz et al., 2014, p.6). Last on the list is Device Management, which tracks each device within the system and utilizes device drivers to communicate between the devices and the operating system. 

How Operating Systems Enable Processes to Share and Exchange Information

A process contains a process number, process state, counter, registers, file lists, and memory constraints. Stages encountered during process execution are referred to as the process state, and the status describes what occurs. An OS determines how and when a process should be executed by determining its state within the process control block. Process states referenced within the process control block are new, ready, waiting, running, and terminated. The rate at which processes are executed also depends on the threading model. With a single CPU, single-threaded processes execute instructions one at a time. A device with a single processor can simulate running many processes by quickly switching between threads in different processes. Multi-threaded processes can process multiple tasks simultaneously. Multithreading can be accomplished using three models. A many-to-many model allows for several threads to the multiplexed to the same number of kernels or smaller. A many-to-one model makes it possible to take threads from multiple users and map them to a single kernel thread. Lastly, a one-to-one model performs as the name dictates in a one-to-one type of relationship. Often multiple threads need to access a single variable, referred to as a critical-section. A problem arises when many threads attempt to access a critical section simultaneously and when one thread modifies a variable while another thread tries to access it. When such circumstances occur, a software solution called Peterson’s Solution can be used as it “is restricted to two processes that alternate execution between their critical sections and remainder sections” (Silberschatz et al., 2014, p.208). However, to resolve the critical-section problem, mutual exclusion, progress, and bonded waiting must be met.


How Main Memory and Virtual Memory Can Solve Memory Management Issues

    Effective memory management is critical to how an OS performs. An OS shares space within memory; therefore, proper memory management is vital. Memory management aims to handle allocation, deallocation, process tracking, utilization maintenance, and data integrity and ensure appropriate main memory utilization (GeeksforGeeks, 2021). Main memory utilizes a physical address, while virtual memory addresses are logical. When a program executes, the memory management unit (MMU) must map the CPU's logical address spaces into physical address spaces. Address binding can take place during compilation, loading, or execution. If finished while compiling, absolute code is produced, and it might be necessary to recompile the code before running. If completed at load time, the compiler generates relocatable code because final binding does not take place until load time, as the physical address was unknown when first compiled.

How Files, Mass Storage, and I/O are Handled In a Modern Computer System

File systems management is responsible for collecting and storing data in a manageable way for a user to access. Secondary storage houses the file system, separated into sections, and acts as a user interface to access disk data. How extensive the sections within a file system are will depend on the size of the disk; however, it is essential to note the section belonging to the disk is usually fixed. Multiple directory structures can be utilized in file management. All files stored in one directory is referred to as a single directory. If there are multiple users, a single directory will be challenging as there are tracking limitations for multiple user files. More suitable for multiple users is a two-level directory system. A master file directory keeps track of user jobs; logins and files are separated by each username. Tree-structure directories are an option to allow users to create and manage subdirectories if needed. Acyclic-graph directories enable files to be located in multiple locations and shared by users, allowing each user to view the file in a subdirectory. General-graph directories are used to prevent redundant file searches.

    Input devices send information to the operating system to be processed, whereas output devices display the processed information. Keyboards, microphones, and a mouse are input devices as they send data to the operating system to be processed; however, monitors, speakers, and printers are output devices as they relay the information processed. The CPU and OS are tasked with determining input and how output transmits to the user.


Necessary Mechanisms to Control Access of Programs and Users

    Domain- and language-based protection in a modern computer system primarily aims to safeguard data and processes. Another goal is “to prevent the mischievous, intentional violation of an access restriction by a user” (Silberschatz et al., 2014, p. 602). The concept of least privilege is used to ensure users only have access to the area they need. Setting up user rights in this manner ensures users cannot mistakenly access files they should not access and protects against malicious behaviors. Programmers write within the code language-based protection and dictate whatever rules are needed within a program. Ultimately, “the specification of protection in a programming language allows the high-level description of policies for the allocation and use of resources” (Silberschatz et al., 2014, p. 622). Domain-based protection allows access rights to be granted to processes running within the domain on various objects. An access matrix is visibly represented as a chart of rows and columns. All entries within the matrix have their own set of corresponding rights. An “access matrix provides an appropriate mechanism for defining and implementing strict control for both static and dynamic association between processes and domains” (Silberschatz et al., 2014, p. 609). Securing networks, systems, and programs is achieved by utilizing passwords, virus protection, encryption, firewalls, and multifactor authentication. To further protect against system vulnerabilities, software patches, along with frequent security testing, can be performed.




References

GeeksforGeeks. (2021, August 18). Memory Management in Operating System. GeeksforGeeks. https://www.geeksforgeeks.org/memory-management-in-operating-system/

Silberschatz, A., Galvin, P. B., & Gagne, G. (2014). Operating system concepts essentials (2nd ed.). Retrieved from https://redshelf.com/





Monday, April 3, 2023

Tech Topic Connection

        The selection of IT careers is vast, and the possibilities are endless for those considering traveling down the IT path. One must first determine where in the IT process they want to land. A person may look into developing if they want to impact the beginning of the IT process; however, those wanting to ensure established networks are secure may look into security. Today’s computer careers have evolved tremendously since the early 1900s when computers derived from telephone switches. (Vahid & Lysecky, 2019). While living our lives today, it is almost hard to fathom that computing started in the 1700s. Many historical individuals had a massive impact on technology and set the groundwork for the technological evolution we are witnessing firsthand today.

Thursday, March 30, 2023

Network Security

Network security is an essential factor for both home and business networks. Security measures are needed to protect user information and not be vulnerable to bad online actors. Unfortunately, some individuals purposefully steal user information or infect devices with viruses and malware, which can be costly to repair. Most people are familiar with password protection as a form of network security. However, passwords are only the beginning of securing a network. Other forms of network protection may include firewalls, encryption, antivirus software, VPNs (virtual private networks), and two-factor authentication, which has become more popular over the last few years.

Computers in the Workplace

Computers are everywhere these days. I cannot think of an industry where computers do not play a role in some shape or form in today’s workplace. Although the choices are endless, I have chosen to focus on the healthcare industry. I have worked in healthcare in both hospital and long-term care environments; information technology has come a long way in years past. Years ago, medical records and charting information were handwritten, placed in folders, and stored in rows of color-coded file systems. Today things are much more convenient and orderly as computers make entering and organizing patient information more efficient.

In hospital settings, it is now possible to perform many tests and scans at the bedside, with results sent directly to a patient's chart electronically.  Minimally evasive laparoscopic surgeries are now possible, eliminating the need for extended recovery periods with almost no scaring for the patient, unlike years past when surgeries often resulted in doctors needing to make large incisions to find and correct a problem. If we think about our lives during the pandemic, many of us were able to attend doctor’s visits from the comfort of our homes via Telehealth visits. Let us also not forget how easy computers have made it to send and receive medical information when needed.

Traveling Through a Network

Ping & Traceroute Commands

Ping and traceroute are both excellent methods to test network connectivity. Ping is used for testing connectivity to a remote host. When the ping command is initiated, packets are sent over to the remote host, and if it is reachable, the host sends packets back in a reply. The ping results will show how many packets were sent and received, if any are lost, and the roundtrip time.   Traceroute is similar; however, it shows the path packets take to reach a destination. When packets attempt to travel from source to destination, they make a series of hops between multiple routers. If packets encounter a router with connectivity issues or one that does not recognize where the packets need to go, the packet will be ignored, and the request will time out. Let's take a look at a few examples, shall we? 

The Role of Applications for Documenting a Day

 My Experience Documenting a Day

The Documenting a Day assignment using a Word Processor, Excel Spreadsheet, and PowerPoint Presentation was interesting. At first glance, the task was easy as I have a basic skillset in each. However, upon getting started, I realized the assignment would be more challenging than I thought. The main issue I encountered was mapping out which day in my life entailed multiple tasks worthy of including in the assignment. Working from home since the pandemic began has resulted in dull weekdays with minimal movement away from my desk. After some thought, I settled on using a Saturday as they require me to move about the city where I reside. Ultimately using different software applications to document a day in my life was eye-opening as I noticed Saturdays for me, are much more hectic than I realized. Each application, although different, can be used successfully to relay information, it just depends on how a user wants the information displayed.

Wednesday, March 29, 2023

Web/Mobile App Critique

 


Carb Manager is a meal planning and tracking application used by individuals following a low-carb or Ketogenic diet plan to monitor the number of carbohydrates consumed throughout the day.  Users can choose between a Free or Premium version paid annually, unlocking additional site features.  Some Premium features include access to an extensive recipe database, in-depth goal-setting and macronutrient calculators, shopping lists, and members-only site areas and articles.  The application is available on iPhone and Android and receives regular updates



Planning meals using Carb Manager is done with ease. Pertinent areas within the application are readily assessable, and navigation is simple. If the user has food or meals they eat often, the entry can be saved in the My Favorites section of the application for easy access. Users can scan barcodes and take pictures of items for logging, or manual entry is also available for those wanting a hands-on approach. Premium users have the option to select meals for an entire week, which also includes recipes and shopping lists for needed ingredients.

Programming Languages

Each language type has a purpose. For instance, when two computers need to communicate, machine learning is used as computers can only understand 0’s and 1’s. Assembly language is practical to use when a programmer wants to have control of the hardware within a computer as it “provides a richer understanding of the underlying computer architecture” (1.3: Why Learn Assembly Language, 2020). High-level languages are most effective for new programmers as they use statements within the instructions that are easier to understand. Of the languages introduced thus far, high-level languages like Python are the most popular. Programmers prefer such languages due to their ease of use and learnability. Well-known platforms such as Google Search and YouTube were developed using Python (Berkeley, 2020). High-level languages will be beneficial to both new and skilled programmers.

Building a Program Using Scratch

My experience building a program using scratch was enjoyable yet challenging.  The Scratch platform has many tutorials to assist users throughout different project phases.  At first glance, the platform was intimidating as code is new to me. The different colors and oddly shaped blocks were confusing at the start.  However, after browsing various tutorials, I became more confident in creating a simple program.

Data Structures & Algorithms

 Algorithmic Design When developing a program, having a clear idea of how you want it to perform is crucial; that is where algorithmic desig...