Coding Presenting Notes
What is code?
Coding is instructing a computer how to do a specific task.
Can a computer ever become smarter than the person that coded it?
Who should learn to code?
Everyone. It will benefit everyone to better understand how a computer learns and to be able to code some basic tasks or create a website
If you like problem solving, being creative and always learning then coding may be good career choice.
What does a coding career look like?
Almost anything you want it to.
Could work by yourself or for a small to large team
You could work in an office or work from home or a combination
You would work in any industry… banking, travel, software, government, construction, manufacturing, medical.
Computer Science graduates have a starting salary 40% higher than other degrees.
OK enough lecture… lets sort!
Activity: Quick sort the class
Assign each a number (day born) and have them get in a line as random as possible
Demonstrate quick sort:
Decide on a pivot point
Sort all smaller on one side all larger on the other
Repeat each sub array until entire group is sorted
See what that would look like in several different languages
JavaScript
Uses recursion to sort sub arrays
Use of brackets to separate functions
Python
Again uses recursion
Notice no brackets. Instead white space is important here
Java
There is a lot more code here
Uses generics to sort any type not just numbers
Has to provide a comparable function to know how to compare types
For instance would need to know how to compare cars
More examples
Some interesting to note:
F# is a functional language is very concise
Ruby uses a random pivot point
Assembly is very low level and is the closest we get to machine code anymore.
After reviewing several languages you begin to see the similarities between them and perhaps the pros and cons
Top Programming Languages
Determined by questions asked on internet and number of projects on github
JavaScript
Created in 1995 and used throughout the world to create interactive web pages. Node.js created in 2009 made it possible to run server side not just in a browser. Beginner friendly syntax that can run anywhere but it doesn't have type checking
Python
Created in 1991 is considered very easy to learn. This is the first language taught in college to most CS students. Doesn't run as quickly as it is interpreted at runtime instead of being compiled. But NASA, IBM, Intel and many other companies use Python.
Java
Created in 1995 is considered one of the top desired languages. Google, Amazon, Netflix use Java for most of their systems. This is the second language my son is learning to use in college. It is a bit heaver and has a steeper learning curve.
PHP
Created in 1994 and is in decline in popularity but Facebook and Yahoo are built using it. Mainly used for server side scripts. Easy to learn but security and error management is poor.
C++
Created in 1985 and is an improved version of C. Steep learning curve but very high performing language that allows for low-level access to computer hardware. Firefox, Adobe, and many video games use this language.
C#
Created by Microsoft in 2000 to go with the .NET framework. Used to program windows apps, web sites, and video games. Recently extended to work on all platforms and is now open source. Also this is what I use every day at work.
Ruby
Created in 1995 as a flexible and dynamic language. Easy to learn and quick to prototype with. Considered a favorite for tech startups but it does scale easily and is considered slow to run, which is why Twitter switched to Java.
TypeScript
Created in 2012 is one of the fastest growing languages in popularity. TypeScript really replaces JavaScript as it was based on it, extends it and ultimately compiles to JavaScript to be uses by anything that already can run that. It adds type checking and much richer tooling. If you are interested in JavaScript you would be wise to consider learning this too.
C
Created in 1972, so it is older than me. Used to build operating systems and embedded systems. It’s is not easy to learn but is the foundation for many other languages with "C" in the name and also Java. In Fact the first version of Java was written in C. Today Java is written in Java but the Java Runtime Environment is still written in C.
Swift
Created in 2014 by Apple for development of iOS and macOS applications. Only compatible with iOS7 and newer apps. Easy to learn and is clean and fast code. The official language of Apple development.
Objective-C
Created in 1984 but wasn't popular until 2001 when Apple made it the foundation for Mac OS X. It is now on the decline since Apple switched to using Swift. However there are still plenty of applications that still need support that where based on this language.
Scala
Created in 2004 to create a hybrid language that is both object-oriented and functional. This can be compiled to run as a Java app or JavaScript.
Go
Was designed at Google in 2007 and released publicly in 2012. It was created to process massive amounts of data quickly and efficiently. It takes advantage of having hardware that is distributed across many systems and various locations. Ideal for cloud systems. This language also combines functional and object-oriented concepts.
Code example -- simple yes no console app
https://github.com/mikeleejr2/QuestionApp
Testing
There is almost aways more testing needed when you write software.
Test your code!
Unit testing, Automated testing
Fix issues
Never trust that people will use the thing you wrote in the way you intended.
Try to break it and then prevent that from being an option
What can you do?
Hardware controllers
Web pages
Mobil apps
Video games
Augmented or Virtual Reality
Cyber Security
Questions?