In this Tech Talk Jason shares his journey into the software industry, how he achieved success, and what it's like working at Google.
Algorithms are an important fundamental in understanding Computer Science as a subject. The purpose of this article is to thoroughly define what an algorithm is and how it relates to computer.
An algorithm is a mathematical term that means a plan for solving a problem. Algorithms consist of a sequence of steps. Computers use algorithms. An algorithm is a set of instructions that is used to get something done.
EXAMPLE: An algorithm for selecting the right kind of shirt might have the following steps:
1. Pick a shirt from your closet.
2. Put the shirt on.
3. Look at yourself in the mirror.
4. Decide whether you like the way you look in that shirt. If you like how you look, leave the shirt on and go to step 6. If you do not like how you look, take the shirt off and put it back in the closet where you got it from.
5. Repeat steps 1.-5.
6. End this procedure.
Computers perform functions by processing algorithms. You can create algorithms for computers to follow, that other people can then use in the future without having to repeat the creation process you did. For example: When your computer prints something, there are many massive algorithms it uses to figure out which type of printer you have, how to communicate the document to the printer in such a way it understands, etc., all done behind the scenes for you so all you need to do is click “print”. These algorithms were written by others to get the computer and printer to comply with your wishes.
An example of an algorithm could be a simple recipe, such as:
1. Crack three eggs and pour their contents into a small bowl – attempt to avoid getting eggshell in the bowl.
2. In the case of eggshells, remove any eggshell from the bowl.
3. Beat the 3 eggs for 30 seconds in the small bowl until they are well mixed.
4. Put a small frying pan on the stove and turn the burner on to medium temperature.
5. Pour the eggs in a small frying pan and cook until very little to no wetness remains.
6. Serve the eggs
While there are similarities, computers and people do not use algorithms in the same way. There are similar features in real life algorithms and computer algorithms but they are not identical. Computers can’t think – they are completely literal – so when writing an algorithm for computers there are certain characteristics that must be present for a computer to use the algorithm. People can deduce things and extrapolate data; people have imagination. Computers can only do what they’ve been told to do.
To fully understand what an algorithm is for computers, some terms and concepts must be cleared up first. Algorithms are composed of five separate characteristics:
The outcome of something. In computers, a response could be considered the result. You type in: “Tell me the date”, the computer replies: “Jan 3, 2017”. “Jan 3, 2017” would be the result. Answers to problems are also considered a result.
Algorithms always have a result. If there is no result, it cannot be considered a valid algorithm.
EXAMPLE: Print the number “2”, Result: 2.
2) Finite amount of time:
This is an exact amount of time for something.
Algorithms should have an exact amount of operations included in them and should execute these operations in a set period of time. Algorithms should never be open-ended or infinite.
An incorrect algorithm would be:
1. Start at an amount of 1
2. Add 1 to that amount
3. Go to step 2
The computer would then count 0, 1, 2, 3, 4, etc. forever.
EXAMPLE: “Count from 1 to 10 and then print a message that says, ‘I counted from 1-10’,” would be a correct algorithm because it contains a finite amount of time.
If something is well-ordered, it means it is listed out in the correct sequence and in an organized fashion. Computers can only execute an algorithm if it is well-ordered. If it is put out of sequence or no sequence is specified, etc., the computer cannot process the algorithm.
EXAMPLE: This is an incorrect algorithm because it is not well-ordered:
1. Close the program
2. Print “I am here” inside the program.
3. Save the program
4. Open the program
You would get an error message because this is the incorrect sequence.
4) Effectively computable operations:
This means a command that can be processed successfully by a computer. The phrase literally means an operation that can be computed in an effective way.
In algorithms, all of the parts of the algorithm must be possible to execute.
EXAMPLE: A non-effectively computable operation could be: Multiply green by red – the computer can’t process this because it isn’t computable. Operations contained in algorithms must be effectively computable operations. Such as, “2 + 2 =”.
Ambiguous means unclear, confusing, not specified. Un = not. Something that is unambiguous means that it is clear and defined.
In computers, your algorithms must be unambiguous. You have to be extremely specific about each step/part of an algorithm or the algorithms cannot be processed by the computer.
EXAMPLE: If you have an algorithm that is processing a list of ten numbers and then a step of your algorithm is “delete the number”, the computer cannot process this because you did not clearly specify which number you wanted deleted.
Now that you know the above terms and concepts, we have the full definition of “algorithm” as defined in the book “Invitation to Computer Science” by Schneider and Gersting:
Algorithm: A well-ordered collection of unambiguous and effectively computable operations that when executed produces a result and halts in a finite amount of time.
Sorting means to put something in an exact sequence or order. Computers sort things often. On your computer, you can sort files by things like when they were created, their name, etc. Algorithms can be used by computers to organize data. For example: You can sort files on your computer by name or date. This is done by a sorting algorithm within the computer. There are several different ways algorithms can be written to sort data.
In learning how to program, you will be writing algorithms to perform various functions. Computers have many algorithms programmed into them already that cause them to do a lot of the things you use computers for. E.g. Your computer performs many complicated steps save a document on your computer and these steps are taken care of because programmers entered in algorithms to handle it for you.
CODING 101: BUILDING A FOUNDATION OF PROGRAMMING FUNDAMENTALS
Posted By: Lindsey Young, Marketing Director
Learning a new skill or subject is like building a house — if you build a strong foundation, the sturdier and more resilient the structure becomes. I’m sure you’ve heard this metaphor before, and that’s because it’s been tried, tested, and proven true. (If it ain’t broke don’t fix it, right?) Taking the time to build a solid understanding of the basics and fundamentals of any subject is the best way to set yourself up for success, especially in software development.
Having this foundation will lead to greater comprehension of any computer programming language you will learn in the future, improve your problem solving skills, and generally make you a more well-rounded programmer.
At The Tech Academy we begin our curriculum by laying this foundation through two courses: Computer Basics and Overview of Software Development. The first course, Computer Basics defines hundreds of technology terms, explains basic machine architecture, computer network principals, internet design and operation, and much more.
In the Overview of Software Development course students learn the basic elements that are fundamental to every computer program and what to expect as a software developer. This course teaches you the tools available to you, the best tool for a specific task, how to think like a developer, and shines a light on what it actually looks like to work as a programmer. (Spoiler: You won’t be working alone in your basement.)
Don’t just take my word for it — read what a few of our students had to say about our intro courses:
“All roadblocks in coding are solvable. The first step should be to assume that someone probably already knows how to solve whatever problem you're tackling. Attempt to fill this knowledge gap, first by researching on your own, and then, by pursuing others who you might be working with to see if they have the knowledge you need in order to overcome the obstacle. If either of these doesn't work or isn't available, then you can try to regain focus and perspective, either by taking a break if you need to relax, or finding something else to work on if you need to stay productive.
So far I've learned that software development is a team-based collaborative process. No one person is going to have all of the skills required for an entire project, and more than anything the ability to learn and adapt quickly to new technology as well as communicate clearly with team members are the most important skills to develop.
The information contained in this course assists in both preparing me for what areas of life and skills development I'll really need to focus on fully developing me, while also putting me in the right mind-state about the abilities I'll need to show, both for the job I'll be doing once hired, as well as during the job search. — Jackson M., Overview of Software Development Course
“To handle barriers I run into while coding, I can consult online and other written resources, make flowcharts, and ask other people for help. The main way to work through a coding problem is to split it into chunks, dividing up the program into smaller digestible parts, to find where an issue is coming from or to understand exactly how the program is running; since the computer follows an exact path of execution, it's always possible to get to the root of the problem systematically. Combining this with consulting any outside resources (code forums, books, libraries, documentation etc.) for syntax you're not sure of, you should be able to figure out exactly how each step of a program works. In terms of creating a program and being stuck, you can create a flowchart that shows each individual step in the desired path of execution to visualize exactly what you need to code.
As far as knowledge gained about software development, I've learned about the different types of languages and their uses, the vocabulary associated with different parts of programs and programming languages, how to approach coding problems, ways to control path of execution in a program, and the surprising stats about networking and how to optimize chances for finding a job.
I can use the information herein to choose how to approach a problem when programming; for example what type of data structure to use, and how to organize the program; and keeping in mind that since there are always multiple ways to solve a problem, an important part of software development is learning and improving upon how to choose an optimal way to approach a problem or task. Also, as languages shift in and out of popular use over the years, I can use the information herein as a base knowledge to help when learning a new language. I can also use all of the networking and job-seeking tips to help advance my career.” — Chloe B., Overview of Software Development Course
“I have really enjoyed what I have learned so far just in this course. I now feel more confident in all aspects of how a computer operates, and can apply this to my future because now I have a better understanding of overall computers rather than going straight into software development.
I think that is great for me because I want to learn everything I can about computers and programming but I was afraid I would be overwhelmed, but this course has been going at a great pace for me to learn as much as I can. I used to think I knew a lot about computers, but there was so much that I had no idea about. I was beginning to think I would never understand all the parts of a computer or how it actually even works, but after this I feel much more confident in how computers operate. I also have a better understanding of things that I was aware of, but didn't know that much about - like certain hardware in a computer, or how to read binary confidently, and how computers read data.
I got a lot of things out of this course from knowing the fundamentals of computers, to even knowing more about viruses and how to keep my computer safe. I have learned so much from this first basic course alone and I can't wait to learn more about computers and start programming them.” — Austin P., Computer Basics Course
A Closer Look at the Overview of Software Development Course
Posted By: Lindsey Young, Marketing Director
The second course in our program is ‘Overview of Software Development’. In this section students learn fundamentals that are common to any computer program. The goal of this course is to create a foundation that sets students up for greater comprehension of any programming language they learn. In addition, students also learn what it’s like to work as a software developer, additional skills that successful devs should know, and how to think like a developer.
Some of the topics covered in this course include:
- Object-oriented programming basics
- Web application basics
- Number Systems
- Data Structures
- Flowcharting, and how it helps you develop
- And more!
For a first hand look at what students learn during the course, here's what one of our students, Rembrandt E., had to say after recently completing the Overview of Software Development course:
Q: How can you handle barriers you run into while coding?
A: "When programming, you will inevitably run into something you don’t know the answer of off the top of your head, or when you believe you’ve coded something perfectly but for some reason, it doesn’t work the way it should. During these times, there are various ways of overcoming these obstacles. The first of which is to search the Internet for any related articles for what you want to do – during this course, I was looking up supplemental documentation and videos on how to use buttons, how to use features in Small Basic that were not explained in the text but required in the section-end challenges. Another option is to take a short walk away from your work to do something else – get coffee, smoke, do something and think about the problem from a distance. If that doesn’t work, give it some time. And finally, another option is to go back to the Internet to ask for help in specialized forums or from your mentors (locally too, if you have them.)"
Q: What knowledge have you gained so far about software development?
A: "Aside from getting practice on the concrete tools, I feel like the most important piece of knowledge came from the video lectures, where Erik mentioned that you program in pieces, and a program is very rarely, if ever, made from top to bottom in one go. It seems so elementary, but at my work, given no guidance, I had no idea that this is the way it was done. I was given a fully-fleshed program to “study”, one written by professionals that was written in C#, utilized SQL databases, .NET Framework and utilized a handful of other peripheral devices/programs. I stared at that for days and felt so helpless, as it was hundreds to thousands of lines of code that I thought someone just “came up with” like writing up a report or something – start from the top, grind out details, then send it out when completed. I had no idea to think that this was built in parts – and long before those parts came into being, they were abstract ideas of how the program would flow, what peripherals it would call out to, what sort of things would be necessary to program. I think this might be one of the major stumbling blocks and intimidators for people approaching code or those saying “it’s not for me” because “it’s too technical/difficult”. Yes, it is technical, and yes, it is difficult, but you aren’t being asked to build a perfect/complete product in one go – it starts with planning, then it piece by piece until you come up with something that works."
Q: How can you use the information from the Overview of Software Development Course in your career as a software developer?
A: "As mentioned earlier, in addition to the tools/languages I’ll practice to use here, I’ve earned a whole new perspective. When trying to self-study earlier on, I wasn’t able to create perfect products, and had no one to ask for advice… or poor sources (eg. too advanced, too technical, little/no investment, etc.). At that time, programming seemed like an impossibility. But now knowing that programming is done in pieces, that problems should be broken into constituent parts before being operated on makes programming a lot more approachable for me. As I move into new projects, I’ll be approaching them in a whole new way looking at them through a developer’s eyes.
- What does the program need to do?
- What steps do I need to take to get my given input to that end-point?
- What sort of processes will be necessary for those steps?
- To program those processes, what kinds of data structures could I use?"