SlideShare uma empresa Scribd logo
1 de 35
Baixar para ler offline
Learning to Code in 2020
Considerations for high school and college students
(Rust stuff begins on slide 15)
Intro
● why learn to code
● what coding, and software development, mean
● thoughts for high school and college students
about how to learn to code, and language choice
Why learn to code
Even if you don't choose a career in software development:
● ability to do things you couldn't otherwise
○ Mathematicians increasingly write software to prove theorems.
○ Simulations play an important role in science.
○ Sophisticated data analyses increasingly guide businesses.
● better collaboration with software teams
● better understanding of some research
● better insight into software you use
● improved ability to think logically / systematically
Software development as a career
● LOTS of high-paying jobs
● projected to continue well into the future
● entrepreneurial opportunities
● possibility of remote work
● creative work that can feel like art
● constant learning
● ability to have a big impact on society
What it means to code
a rendering of that in
some programming
language
some problem
out in the real
world
an algorithm
that solves it
What it means to code, continued
computer(s)
running
the program
the real
world
data output
sensors actuators (often just humans)
Learning to code is just the start
Computer Science:
● algorithms and data structures (fascinating!)
● paradigms (imperative / OOP / functional / logic programming)
● operating systems
● networking
● programming language design/implementation
● machine learning
● artificial intelligence
● computer architecture
● more
Learning to code is just the start, continued
Software Engineering:
● how to make software easy to use
● how to write software that is understandable to other coders
● how to structure software so that it is testable, adaptable, maintainable
● how to communicate software structure/operation in diagrams
● how to architect a system of interacting software components
● how to ensure that software works (quality assurance)
● how to automate the mechanics of software development (dev ops)
● more
Kinds of software
web sites
phone apps
("front end")
Infrastructure (operating systems, libraries, networking, cloud service providers, ...)
"back end"
software
browser
apps
desktop
apps
embedded
software
(in devices)
command-line
utilities
business data
processing
more ...
users
Programming languages
● There are many hundreds (!), but most are of little interest.
● Certain kinds of software have special language needs;
e.g. for embedded software you need the code to
○ run fast
○ use little battery power
○ take little memory
○ reliably respond without latency (no JIT, no GC)
○ sense and manipulate the real world
● Some popular languages are really not very good.
● Some languages have more cachet, e.g. Haskell. This matters to
○ recruiting companies
○ university admissions
● Some languages are easier to use than others.
Evidence
You could probably learn to code from a book + YouTube videos,
but it would be better on that university application to have evidence.
● A MOOC from Coursera or EdX with a certificate ($) would carry some weight.
● You could have a GitHub repo or two with some of your work, but
○ Did you really do the work, or is that someone else's code?
○ Is what you did any good?
○ Universities probably can't evaluate your work, but it still might count for a little.
○ Better if you blog about what is in the repo and have a good README.
● An interviewing company probably will have an engineer look at your repo
○ How substantial is the work?
○ Does the code look well written?
○ Questions about it in the interview, so don't fake it!
○ Don't put your early code out there if you code much better now.
● StackOverflow answers, blog, ....
● Vetted contributions to open source projects are probably the best evidence!
Option 1: "I mostly just want the credential and a handy tool"
Learn Python. Here is a Coursera MOOC (edX) that will earn you a certificate.
● It's immediately useful; many environments are written around it.
● It has a huge ecosystem (users, employers, libraries, tutorials, tools, etc.).
● It's easy to learn, at least the basics.
But
● It's relatively slow.
● It's ok, but not really a good language (though Pythonistas will complain!).
● It's not a language for writing complex software in a maintainable way.
Consider this route if you don't really care about software as a discipline, if learning
to code is more of a checklist item you want to tick off. Python can be a very useful
tool, but I wouldn't choose it to write really important software.
Option 2: "I want to learn to write good software"
Learn a good functional programming language first. My first choice would be
Clojure or Scheme, but (surprisingly) those MOOCs assume prior coding experience.
But here is a beginner MOOC in ML, a functional language, offered by a good school
(U of Washington), and there is a follow-on MOOC in Scheme if you're interested.
● ML and Scheme are simple and well-suited to teaching programming.
● Learning a FP language is a better start on writing good software.
● FP languages have cachet on that college application.
BUT -- you're probably not going to get a job in these languages (and that's OK!).
Consider this route if you do care about software as a discipline, and to show
people that you have taken a good first step on that path. It's the better start
unless you need to try to land a software job after a couple of courses.
Why learn to code using a functional language?
● Four types of languages, "programming paradigms":
○ Imperative, e.g. C, Fortran
○ Object-oriented (OOP), e.g. Smalltalk, Ruby (Java is not "pure" OOP)
○ Logical, e.g. Prolog
○ Functional, e.g. Haskell
● Imperative and OOP paradigms are dominant, but functional is on the rise.
● Functional programming is a bit like math, and has nice properties:
○ easier to reason about code
○ better for composing abstractions
○ easier to test
○ easier to parallelize for multi-core CPUs, allowing us to continue to improve performance now that
we can no longer increase clock rate much on silicon!
● Jobs using FP languages tend to pay well.
● Even non-FP languages are getting some FP features these days.
● Even with non-FP languages, coding in FP style is often useful.
OK, I learned ML or Scheme or something. Now what?
If Math is your thing, consider Haskell, or even Idris or Agda 2 if you don't need a MOOC.
The Haskell Road to Logic, Maths and Programming
Haskell MOOC with certification
If a job creating great software -- particularly infrastructure software -- appeals to you,
consider Rust.
Or hey, both. :)
Uh, why Rust? I see things like this on the web.
from stackoverflow.com
And this. Shouldn't I pick a widely used language (lots of jobs)?
from freecodecamp.org
But wait a minute ...
If # of available jobs
were really the key concern
in career direction,
then learn to wait tables
would be great career advice.
LOTS of jobs!
You already know what really matters...
SUPPLY
vs.
DEMAND
(btw, please take some Econ courses!)
utility(num_jobs) is a sigmoid function
# of jobs in that language
enough
value
to you
not enough
After a point, more jobs don't
help much.
You really only need
one good job
in your area
if there is nobody else to fill it.
Demand only needs to be high
relative to supply!
0 jobs a few many
What you want from the job market
In a software job, you probably want
● a good salary, a good work environment, etc.
● greenfield work (building new things rather than maintaining old things)
● meaningful work
... at the time you enter the job market!
Programming languages come and go;
what's true now may not be true in 5+ years.
Think supply vs. demand
We have to predict the future.
What will be important in 5+ years?
We want to know for which languages, at that time, demand (employers
wanting developers) will be high relative to supply (available developers).
That will determine salaries!
Ideally we would also like the demand to be for greenfield work.
On predicting the future
"Prediction is very difficult, especially if it's about the future."
-- Neils Bohr
But that doesn't mean you shouldn't try.
And we are in special circumstances at the moment; they give us clues.
Some key things happening now
● A huge wave of devices (IoT = Internet of Things, robots, etc.) will need code;
even more true in the future because of developments like these:
○ RISC-V: open-source instruction set architecture will make smart devices
■ cheaper
■ use less memory
■ use less power
■ generate less heat
○ Improvements in battery technology will make new device applications feasible.
○ Developments in robotics (walking, swimming, climbing, soft) = new application areas.
○ Longer-flying, more agile drones = new applications.
○ Developments in AI, and TPUs, will permit greater "intelligence" in devices.
● Web Assembly: browsers can finally run code other than Javascript
○ Javascript, a mediocre language, is huge primarily because it was the only language that
browsers directly supported. That is (finally!) no longer true.
○ Will be used to improve performance and maintainability of complex software.
○ Allow programs to run in the user's browser rather than on servers.
Language needs for embedded systems
● CPU efficiency (speed, long battery life, low heat)
● memory efficiency
● low latency (no pauses for "garbage collection" or on-the-fly compilation)
● no associated runtime (code that manages the language environment)
● precise control over the use of memory
There are only really three acceptable choices in this space!
C, C++, and Rust.
But C and C++ are inherently unsafe, requiring very careful coding and making later
maintenance tricky (especially when working with someone else's code).
Rust
● Rust 2018 Edition was released in December 2018
○ provided needed usability improvements
○ simplified use in embedded systems
● Novel features eliminate entire classes of nasty bugs that plague C/C++ code
○ memory deallocation problems: use after free, free twice, fail to free (memory leak)
○ "null pointer" problems, stale pointers
○ data races (nasty concurrency problems) and more!
○ buffer overruns (often the cause of security problems)
● Much more modern language, enabling higher-quality code, e.g.
○ very good type system
○ powerful+safe macro system
● Yet still as fast and suitable for embedded applications as C/C++
○ and better at concurrency -- easier and safer to make use of multiple cores
● Already a popular choice for Web Assembly applications
○ fast
○ no runtime to be downloaded
what C and C++ let you do
what most languages
let you do
what is safe
Program safety (roughly)
what Rust lets
you do
i.e. what Rust
considers safe
Bad bugs in embedded devices
risk substantial financial liability.
Consider medical devices, robots,
cars, ....
Rust code can still have bugs,
but major classes of really
hard-to-find bugs are simply
not possible in ordinary Rust code.
A Terrible Property of Memory Safety Errors
"Normal" bugs in software are generally easy to reproduce, their causes easy to find.
NOT SO with memory safety errors, like memory corruption -- they can be hard to find!
Memory corruption can cause your program to die anywhere, far from the cause.
WORSE: Larger code bases, larger datasets, more concurrent code -- all make it that
much harder to find the cause of such elusive problems.
If your simple 500-line C program corrupts memory, finding the cause can be a pain.
But it would generally be far harder to find the same problem in a highly concurrent,
50,000-line C program that consumes lots of data.
The software we are writing today is much more complex and concurrent
than the software we wrote in the '70s, '80s, and '90s.
"But there are many more C/C++ libraries!"
0 libraries thousands millions
enough
value to you
not enough
After a point, more libraries don't
help much (don't much change
the probability that you'll find
most of what you need).
Yes, there are many more C/C++
libraries than Rust "crates."
But there are already over 25,000
Rust crates. There are crates for
most things you might need, and
that number is growing.
You can always write the glue to
call out to a C library if needed
(and some C++ libs, depending on
the features they use).
# of libraries for that language
A unique situation
Consider the uniqueness of the current situation:
● We are starting to build a growing avalanche of smart devices.
● These devices will live in the real world, alongside people.
● Significant failures in many of these devices will be very bad news,
perhaps even ending product lines and startups.
● Only three languages are suitable for much of the code on those devices.
○ Two of those languages (C and C++) are the most unsafe languages in common use!
○ The third (Rust) is the safest language in common use!
● That third language also has many other improvements over the other two.
● Few people know the third language.
This is a very interesting, almost weird, confluence of circumstances.
It is extremely relevant to anyone planning to enter the job market in a few years.
A prediction (waves hands mysteriously)
Rust was already on the rise.
But Rust 2018 Edition, with key improvements addressing prior usability problems,
and competing only against wildly unsafe C and C++ in huge software segments
requiring lots of new code, will have accelerating uptake over the next few years.
In a few years, Rust will be a top choice for a significant portion of greenfield
development in embedded and Web Assembly apps, of which there will be a lot.
Companies will want Rust's advantages in safety and code quality.
so there will be a substantial increase in demand
But there are relatively few Rust coders, and Rust is relatively hard to learn.
And many still think that # of jobs, rather than supply/demand, is what matters.
so there will be relatively low supply
NOT predicting Rustworld
NOT predicting that Rust is going to take over the world.
It is not going to replace C/C++.
Lots of old C/C++ code exists and will need maintainers.
Will even continue to be used for much new development.
NOT predicting that Rust is going to displace Javascript in the browser.
NOT predicting that Rust is going to displace Java in server applications.
etc.
But if even 5% of new development, in application areas for which C / C++ / Rust
are the only reasonable language options, is done in Rust, that's a lot of Rust!
Rust uptake is likely to be throttled by the supply of coders.
So check on Rust's trajectory -- after learning to code using some other language.
Why not just start with Rust?
Rust is harder to learn, probably making it a poor choice for a first language.
And it is not a functional programming language (although it has some FP features).
Ideally, divide the journey into two parts:
1. Without any consideration at all for the job market, learn the concepts using a
really good functional language that has a minimum of syntax and "warts."
Ideally (IMHO) this would be a homoiconic language with no static type system
(to make it simple yet expressive) that strongly deemphasizes mutation
(to keep you from falling back to less good solutions). Clojure would be
a great choice, but unfortunately I couldn't find a good MOOC for it with
a certification option. The best beginner FP MOOC I could find uses ML.
2. Then, knowing the basics, learn a practical language with a good type system
that will get you the kind of job you want. No need to choose this language now,
but I suspect Rust will be a strong option.
A plea to high schools and colleges
If you (like my local high school) teach kids to program using C/C++, please stop!
You are unnecessarily frustrating students, and some will never come back.
Choose a first language that is easy and clean and encourages good habits.
Consider using a functional programming language, or at the very least a
functional subset of a language that supports FP well, and not allowing mutation.
Your goal should simply be to make it straightforward to learn the concepts.
Don't worry about whether there is a market for that first language;
that is a concern for their second (or maybe third or fourth) language.
BTW, here is a letter from Edsger Dijkstra, a great name in computer science,
making a similar plea (in his case for teaching introductory programming using
Haskell rather than Java at UT). Definitely worth a read!
Questions?
Any questions?

Mais conteúdo relacionado

Mais procurados

Programming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharProgramming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharVivek Parihar
 
So you want to be a programmer
So you want to be a programmerSo you want to be a programmer
So you want to be a programmerBusayo Oyebisi
 
12 best programming languages for web & app development
12 best programming languages for web & app development12 best programming languages for web & app development
12 best programming languages for web & app developmentBiztech Consulting & Solutions
 
Difference between python and c++
Difference between python and c++Difference between python and c++
Difference between python and c++Ibrahimsumidi
 
IRJET- Python: Simple though an Important Programming Language
IRJET- Python: Simple though an Important Programming LanguageIRJET- Python: Simple though an Important Programming Language
IRJET- Python: Simple though an Important Programming LanguageIRJET Journal
 
Generations of programming_language.kum_ari11-1-1-1
Generations of programming_language.kum_ari11-1-1-1Generations of programming_language.kum_ari11-1-1-1
Generations of programming_language.kum_ari11-1-1-1lakshmi kumari neelapu
 
Introduction to Python Programming - I
Introduction to Python Programming  - IIntroduction to Python Programming  - I
Introduction to Python Programming - IArnab Chakraborty
 
Computer Programming Overview
Computer Programming OverviewComputer Programming Overview
Computer Programming Overviewagorolabs
 
Presentation on java
Presentation on javaPresentation on java
Presentation on javawilliam john
 
Evolution of Programming Languages
Evolution of Programming LanguagesEvolution of Programming Languages
Evolution of Programming LanguagesSayanee Basu
 
Benefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of pythonBenefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of pythonparadisetechsoftsolutions
 
Which programming language should you learn next?
Which programming language should you learn next? Which programming language should you learn next?
Which programming language should you learn next? Ganesh Samarthyam
 
20120314 changa-python-workshop
20120314 changa-python-workshop20120314 changa-python-workshop
20120314 changa-python-workshopamptiny
 
Programming language (JGMNHS)
Programming language (JGMNHS)Programming language (JGMNHS)
Programming language (JGMNHS)Katherine Gamboa
 

Mais procurados (20)

Programming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharProgramming languages and concepts by vivek parihar
Programming languages and concepts by vivek parihar
 
So you want to be a programmer
So you want to be a programmerSo you want to be a programmer
So you want to be a programmer
 
12 best programming languages for web & app development
12 best programming languages for web & app development12 best programming languages for web & app development
12 best programming languages for web & app development
 
Program Logic and Design
Program Logic and DesignProgram Logic and Design
Program Logic and Design
 
Difference between python and c++
Difference between python and c++Difference between python and c++
Difference between python and c++
 
IRJET- Python: Simple though an Important Programming Language
IRJET- Python: Simple though an Important Programming LanguageIRJET- Python: Simple though an Important Programming Language
IRJET- Python: Simple though an Important Programming Language
 
Generations of programming_language.kum_ari11-1-1-1
Generations of programming_language.kum_ari11-1-1-1Generations of programming_language.kum_ari11-1-1-1
Generations of programming_language.kum_ari11-1-1-1
 
Plc part 1
Plc part 1Plc part 1
Plc part 1
 
Introduction to Python Programming - I
Introduction to Python Programming  - IIntroduction to Python Programming  - I
Introduction to Python Programming - I
 
Computer Programming Overview
Computer Programming OverviewComputer Programming Overview
Computer Programming Overview
 
Presentation on java
Presentation on javaPresentation on java
Presentation on java
 
Evolution of Programming Languages
Evolution of Programming LanguagesEvolution of Programming Languages
Evolution of Programming Languages
 
Python lec 1002_for_biologists
Python lec 1002_for_biologistsPython lec 1002_for_biologists
Python lec 1002_for_biologists
 
Benefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of pythonBenefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of python
 
Which programming language should you learn next?
Which programming language should you learn next? Which programming language should you learn next?
Which programming language should you learn next?
 
20120314 changa-python-workshop
20120314 changa-python-workshop20120314 changa-python-workshop
20120314 changa-python-workshop
 
Computer programming languages
Computer programming languagesComputer programming languages
Computer programming languages
 
Programming language (JGMNHS)
Programming language (JGMNHS)Programming language (JGMNHS)
Programming language (JGMNHS)
 
Python lec 1001_for_biologists
Python lec 1001_for_biologistsPython lec 1001_for_biologists
Python lec 1001_for_biologists
 
Evolution of Computer Languages
Evolution of Computer LanguagesEvolution of Computer Languages
Evolution of Computer Languages
 

Semelhante a Learning to code in 2020

Computer Science Is The Study Of Principals And How The...
Computer Science Is The Study Of Principals And How The...Computer Science Is The Study Of Principals And How The...
Computer Science Is The Study Of Principals And How The...Laura Martin
 
What Is Coding And Why Should You Learn It?
What Is Coding And Why Should You Learn It?What Is Coding And Why Should You Learn It?
What Is Coding And Why Should You Learn It?Syed Hassan Raza
 
Specification Of The Programming Language Of Java
Specification Of The Programming Language Of JavaSpecification Of The Programming Language Of Java
Specification Of The Programming Language Of JavaKim Moore
 
Java And Community Support
Java And Community SupportJava And Community Support
Java And Community SupportWilliam Grosso
 
Introduction to the Software Development world
Introduction to the Software Development worldIntroduction to the Software Development world
Introduction to the Software Development worldTutti Quintella
 
Creating a compiler for your own language
Creating a compiler for your own languageCreating a compiler for your own language
Creating a compiler for your own languageAndrea Tino
 
Why Python in required in Civil Engineering
Why Python in required in Civil EngineeringWhy Python in required in Civil Engineering
Why Python in required in Civil EngineeringRushikesh Kolhe
 
The Ring programming language version 1.3 book - Part 81 of 88
The Ring programming language version 1.3 book - Part 81 of 88The Ring programming language version 1.3 book - Part 81 of 88
The Ring programming language version 1.3 book - Part 81 of 88Mahmoud Samir Fayed
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfOrtus Solutions, Corp
 
How to code in the XXI century without losing your head
How to code in the XXI century without losing your headHow to code in the XXI century without losing your head
How to code in the XXI century without losing your headRené Olivo
 
Is Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdfIs Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdfKajal Digital
 
GDSC career guide presentation.pptx
GDSC career guide presentation.pptxGDSC career guide presentation.pptx
GDSC career guide presentation.pptxDishaSharma737984
 
GDSC career guide presentation.pptx
GDSC career guide presentation.pptxGDSC career guide presentation.pptx
GDSC career guide presentation.pptxAryanSharma853911
 
LAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLinaro
 
Procedural Programming Of Programming Languages
Procedural Programming Of Programming LanguagesProcedural Programming Of Programming Languages
Procedural Programming Of Programming LanguagesTammy Moncrief
 
Programming using C++ - slides.pptx
Programming using C++ - slides.pptxProgramming using C++ - slides.pptx
Programming using C++ - slides.pptxHeadoftheDepartment
 
Is Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdfIs Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdfKajal Digital
 

Semelhante a Learning to code in 2020 (20)

Computer Science Is The Study Of Principals And How The...
Computer Science Is The Study Of Principals And How The...Computer Science Is The Study Of Principals And How The...
Computer Science Is The Study Of Principals And How The...
 
What Is Coding And Why Should You Learn It?
What Is Coding And Why Should You Learn It?What Is Coding And Why Should You Learn It?
What Is Coding And Why Should You Learn It?
 
Specification Of The Programming Language Of Java
Specification Of The Programming Language Of JavaSpecification Of The Programming Language Of Java
Specification Of The Programming Language Of Java
 
Java And Community Support
Java And Community SupportJava And Community Support
Java And Community Support
 
Introduction to the Software Development world
Introduction to the Software Development worldIntroduction to the Software Development world
Introduction to the Software Development world
 
History Of C Essay
History Of C EssayHistory Of C Essay
History Of C Essay
 
Java
JavaJava
Java
 
Creating a compiler for your own language
Creating a compiler for your own languageCreating a compiler for your own language
Creating a compiler for your own language
 
Why Python in required in Civil Engineering
Why Python in required in Civil EngineeringWhy Python in required in Civil Engineering
Why Python in required in Civil Engineering
 
The Ring programming language version 1.3 book - Part 81 of 88
The Ring programming language version 1.3 book - Part 81 of 88The Ring programming language version 1.3 book - Part 81 of 88
The Ring programming language version 1.3 book - Part 81 of 88
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
 
How to code in the XXI century without losing your head
How to code in the XXI century without losing your headHow to code in the XXI century without losing your head
How to code in the XXI century without losing your head
 
Is Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdfIs Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdf
 
GDSC career guide presentation.pptx
GDSC career guide presentation.pptxGDSC career guide presentation.pptx
GDSC career guide presentation.pptx
 
GDSC career guide presentation.pptx
GDSC career guide presentation.pptxGDSC career guide presentation.pptx
GDSC career guide presentation.pptx
 
LAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoT
 
Procedural Programming Of Programming Languages
Procedural Programming Of Programming LanguagesProcedural Programming Of Programming Languages
Procedural Programming Of Programming Languages
 
Programming using C++ - slides.pptx
Programming using C++ - slides.pptxProgramming using C++ - slides.pptx
Programming using C++ - slides.pptx
 
Is Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdfIs Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdf
 
Oop
OopOop
Oop
 

Último

Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Anthony Dahanne
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 

Último (20)

Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 

Learning to code in 2020

  • 1. Learning to Code in 2020 Considerations for high school and college students (Rust stuff begins on slide 15)
  • 2. Intro ● why learn to code ● what coding, and software development, mean ● thoughts for high school and college students about how to learn to code, and language choice
  • 3. Why learn to code Even if you don't choose a career in software development: ● ability to do things you couldn't otherwise ○ Mathematicians increasingly write software to prove theorems. ○ Simulations play an important role in science. ○ Sophisticated data analyses increasingly guide businesses. ● better collaboration with software teams ● better understanding of some research ● better insight into software you use ● improved ability to think logically / systematically
  • 4. Software development as a career ● LOTS of high-paying jobs ● projected to continue well into the future ● entrepreneurial opportunities ● possibility of remote work ● creative work that can feel like art ● constant learning ● ability to have a big impact on society
  • 5. What it means to code a rendering of that in some programming language some problem out in the real world an algorithm that solves it
  • 6. What it means to code, continued computer(s) running the program the real world data output sensors actuators (often just humans)
  • 7. Learning to code is just the start Computer Science: ● algorithms and data structures (fascinating!) ● paradigms (imperative / OOP / functional / logic programming) ● operating systems ● networking ● programming language design/implementation ● machine learning ● artificial intelligence ● computer architecture ● more
  • 8. Learning to code is just the start, continued Software Engineering: ● how to make software easy to use ● how to write software that is understandable to other coders ● how to structure software so that it is testable, adaptable, maintainable ● how to communicate software structure/operation in diagrams ● how to architect a system of interacting software components ● how to ensure that software works (quality assurance) ● how to automate the mechanics of software development (dev ops) ● more
  • 9. Kinds of software web sites phone apps ("front end") Infrastructure (operating systems, libraries, networking, cloud service providers, ...) "back end" software browser apps desktop apps embedded software (in devices) command-line utilities business data processing more ... users
  • 10. Programming languages ● There are many hundreds (!), but most are of little interest. ● Certain kinds of software have special language needs; e.g. for embedded software you need the code to ○ run fast ○ use little battery power ○ take little memory ○ reliably respond without latency (no JIT, no GC) ○ sense and manipulate the real world ● Some popular languages are really not very good. ● Some languages have more cachet, e.g. Haskell. This matters to ○ recruiting companies ○ university admissions ● Some languages are easier to use than others.
  • 11. Evidence You could probably learn to code from a book + YouTube videos, but it would be better on that university application to have evidence. ● A MOOC from Coursera or EdX with a certificate ($) would carry some weight. ● You could have a GitHub repo or two with some of your work, but ○ Did you really do the work, or is that someone else's code? ○ Is what you did any good? ○ Universities probably can't evaluate your work, but it still might count for a little. ○ Better if you blog about what is in the repo and have a good README. ● An interviewing company probably will have an engineer look at your repo ○ How substantial is the work? ○ Does the code look well written? ○ Questions about it in the interview, so don't fake it! ○ Don't put your early code out there if you code much better now. ● StackOverflow answers, blog, .... ● Vetted contributions to open source projects are probably the best evidence!
  • 12. Option 1: "I mostly just want the credential and a handy tool" Learn Python. Here is a Coursera MOOC (edX) that will earn you a certificate. ● It's immediately useful; many environments are written around it. ● It has a huge ecosystem (users, employers, libraries, tutorials, tools, etc.). ● It's easy to learn, at least the basics. But ● It's relatively slow. ● It's ok, but not really a good language (though Pythonistas will complain!). ● It's not a language for writing complex software in a maintainable way. Consider this route if you don't really care about software as a discipline, if learning to code is more of a checklist item you want to tick off. Python can be a very useful tool, but I wouldn't choose it to write really important software.
  • 13. Option 2: "I want to learn to write good software" Learn a good functional programming language first. My first choice would be Clojure or Scheme, but (surprisingly) those MOOCs assume prior coding experience. But here is a beginner MOOC in ML, a functional language, offered by a good school (U of Washington), and there is a follow-on MOOC in Scheme if you're interested. ● ML and Scheme are simple and well-suited to teaching programming. ● Learning a FP language is a better start on writing good software. ● FP languages have cachet on that college application. BUT -- you're probably not going to get a job in these languages (and that's OK!). Consider this route if you do care about software as a discipline, and to show people that you have taken a good first step on that path. It's the better start unless you need to try to land a software job after a couple of courses.
  • 14. Why learn to code using a functional language? ● Four types of languages, "programming paradigms": ○ Imperative, e.g. C, Fortran ○ Object-oriented (OOP), e.g. Smalltalk, Ruby (Java is not "pure" OOP) ○ Logical, e.g. Prolog ○ Functional, e.g. Haskell ● Imperative and OOP paradigms are dominant, but functional is on the rise. ● Functional programming is a bit like math, and has nice properties: ○ easier to reason about code ○ better for composing abstractions ○ easier to test ○ easier to parallelize for multi-core CPUs, allowing us to continue to improve performance now that we can no longer increase clock rate much on silicon! ● Jobs using FP languages tend to pay well. ● Even non-FP languages are getting some FP features these days. ● Even with non-FP languages, coding in FP style is often useful.
  • 15. OK, I learned ML or Scheme or something. Now what? If Math is your thing, consider Haskell, or even Idris or Agda 2 if you don't need a MOOC. The Haskell Road to Logic, Maths and Programming Haskell MOOC with certification If a job creating great software -- particularly infrastructure software -- appeals to you, consider Rust. Or hey, both. :)
  • 16. Uh, why Rust? I see things like this on the web. from stackoverflow.com
  • 17. And this. Shouldn't I pick a widely used language (lots of jobs)? from freecodecamp.org
  • 18. But wait a minute ... If # of available jobs were really the key concern in career direction, then learn to wait tables would be great career advice. LOTS of jobs!
  • 19. You already know what really matters... SUPPLY vs. DEMAND (btw, please take some Econ courses!)
  • 20. utility(num_jobs) is a sigmoid function # of jobs in that language enough value to you not enough After a point, more jobs don't help much. You really only need one good job in your area if there is nobody else to fill it. Demand only needs to be high relative to supply! 0 jobs a few many
  • 21. What you want from the job market In a software job, you probably want ● a good salary, a good work environment, etc. ● greenfield work (building new things rather than maintaining old things) ● meaningful work ... at the time you enter the job market! Programming languages come and go; what's true now may not be true in 5+ years.
  • 22. Think supply vs. demand We have to predict the future. What will be important in 5+ years? We want to know for which languages, at that time, demand (employers wanting developers) will be high relative to supply (available developers). That will determine salaries! Ideally we would also like the demand to be for greenfield work.
  • 23. On predicting the future "Prediction is very difficult, especially if it's about the future." -- Neils Bohr But that doesn't mean you shouldn't try. And we are in special circumstances at the moment; they give us clues.
  • 24. Some key things happening now ● A huge wave of devices (IoT = Internet of Things, robots, etc.) will need code; even more true in the future because of developments like these: ○ RISC-V: open-source instruction set architecture will make smart devices ■ cheaper ■ use less memory ■ use less power ■ generate less heat ○ Improvements in battery technology will make new device applications feasible. ○ Developments in robotics (walking, swimming, climbing, soft) = new application areas. ○ Longer-flying, more agile drones = new applications. ○ Developments in AI, and TPUs, will permit greater "intelligence" in devices. ● Web Assembly: browsers can finally run code other than Javascript ○ Javascript, a mediocre language, is huge primarily because it was the only language that browsers directly supported. That is (finally!) no longer true. ○ Will be used to improve performance and maintainability of complex software. ○ Allow programs to run in the user's browser rather than on servers.
  • 25. Language needs for embedded systems ● CPU efficiency (speed, long battery life, low heat) ● memory efficiency ● low latency (no pauses for "garbage collection" or on-the-fly compilation) ● no associated runtime (code that manages the language environment) ● precise control over the use of memory There are only really three acceptable choices in this space! C, C++, and Rust. But C and C++ are inherently unsafe, requiring very careful coding and making later maintenance tricky (especially when working with someone else's code).
  • 26. Rust ● Rust 2018 Edition was released in December 2018 ○ provided needed usability improvements ○ simplified use in embedded systems ● Novel features eliminate entire classes of nasty bugs that plague C/C++ code ○ memory deallocation problems: use after free, free twice, fail to free (memory leak) ○ "null pointer" problems, stale pointers ○ data races (nasty concurrency problems) and more! ○ buffer overruns (often the cause of security problems) ● Much more modern language, enabling higher-quality code, e.g. ○ very good type system ○ powerful+safe macro system ● Yet still as fast and suitable for embedded applications as C/C++ ○ and better at concurrency -- easier and safer to make use of multiple cores ● Already a popular choice for Web Assembly applications ○ fast ○ no runtime to be downloaded
  • 27. what C and C++ let you do what most languages let you do what is safe Program safety (roughly) what Rust lets you do i.e. what Rust considers safe Bad bugs in embedded devices risk substantial financial liability. Consider medical devices, robots, cars, .... Rust code can still have bugs, but major classes of really hard-to-find bugs are simply not possible in ordinary Rust code.
  • 28. A Terrible Property of Memory Safety Errors "Normal" bugs in software are generally easy to reproduce, their causes easy to find. NOT SO with memory safety errors, like memory corruption -- they can be hard to find! Memory corruption can cause your program to die anywhere, far from the cause. WORSE: Larger code bases, larger datasets, more concurrent code -- all make it that much harder to find the cause of such elusive problems. If your simple 500-line C program corrupts memory, finding the cause can be a pain. But it would generally be far harder to find the same problem in a highly concurrent, 50,000-line C program that consumes lots of data. The software we are writing today is much more complex and concurrent than the software we wrote in the '70s, '80s, and '90s.
  • 29. "But there are many more C/C++ libraries!" 0 libraries thousands millions enough value to you not enough After a point, more libraries don't help much (don't much change the probability that you'll find most of what you need). Yes, there are many more C/C++ libraries than Rust "crates." But there are already over 25,000 Rust crates. There are crates for most things you might need, and that number is growing. You can always write the glue to call out to a C library if needed (and some C++ libs, depending on the features they use). # of libraries for that language
  • 30. A unique situation Consider the uniqueness of the current situation: ● We are starting to build a growing avalanche of smart devices. ● These devices will live in the real world, alongside people. ● Significant failures in many of these devices will be very bad news, perhaps even ending product lines and startups. ● Only three languages are suitable for much of the code on those devices. ○ Two of those languages (C and C++) are the most unsafe languages in common use! ○ The third (Rust) is the safest language in common use! ● That third language also has many other improvements over the other two. ● Few people know the third language. This is a very interesting, almost weird, confluence of circumstances. It is extremely relevant to anyone planning to enter the job market in a few years.
  • 31. A prediction (waves hands mysteriously) Rust was already on the rise. But Rust 2018 Edition, with key improvements addressing prior usability problems, and competing only against wildly unsafe C and C++ in huge software segments requiring lots of new code, will have accelerating uptake over the next few years. In a few years, Rust will be a top choice for a significant portion of greenfield development in embedded and Web Assembly apps, of which there will be a lot. Companies will want Rust's advantages in safety and code quality. so there will be a substantial increase in demand But there are relatively few Rust coders, and Rust is relatively hard to learn. And many still think that # of jobs, rather than supply/demand, is what matters. so there will be relatively low supply
  • 32. NOT predicting Rustworld NOT predicting that Rust is going to take over the world. It is not going to replace C/C++. Lots of old C/C++ code exists and will need maintainers. Will even continue to be used for much new development. NOT predicting that Rust is going to displace Javascript in the browser. NOT predicting that Rust is going to displace Java in server applications. etc. But if even 5% of new development, in application areas for which C / C++ / Rust are the only reasonable language options, is done in Rust, that's a lot of Rust! Rust uptake is likely to be throttled by the supply of coders. So check on Rust's trajectory -- after learning to code using some other language.
  • 33. Why not just start with Rust? Rust is harder to learn, probably making it a poor choice for a first language. And it is not a functional programming language (although it has some FP features). Ideally, divide the journey into two parts: 1. Without any consideration at all for the job market, learn the concepts using a really good functional language that has a minimum of syntax and "warts." Ideally (IMHO) this would be a homoiconic language with no static type system (to make it simple yet expressive) that strongly deemphasizes mutation (to keep you from falling back to less good solutions). Clojure would be a great choice, but unfortunately I couldn't find a good MOOC for it with a certification option. The best beginner FP MOOC I could find uses ML. 2. Then, knowing the basics, learn a practical language with a good type system that will get you the kind of job you want. No need to choose this language now, but I suspect Rust will be a strong option.
  • 34. A plea to high schools and colleges If you (like my local high school) teach kids to program using C/C++, please stop! You are unnecessarily frustrating students, and some will never come back. Choose a first language that is easy and clean and encourages good habits. Consider using a functional programming language, or at the very least a functional subset of a language that supports FP well, and not allowing mutation. Your goal should simply be to make it straightforward to learn the concepts. Don't worry about whether there is a market for that first language; that is a concern for their second (or maybe third or fourth) language. BTW, here is a letter from Edsger Dijkstra, a great name in computer science, making a similar plea (in his case for teaching introductory programming using Haskell rather than Java at UT). Definitely worth a read!