Title: Lecture 24: What is computer science
1Lecture 24What is computer science?
2What have we covered
- Superficially
- The basics of programming in Java
- More deeply
- Basics of programming are the same in any
language - Youve learnd how to think logically about
problems - How to break down tasks into steps
- How to model problems with objects
3Whats next?
- COMP 114 Advanced Programming
- Youve learned how to program
- This will teach you how to program well
- More Java
- Lots of Object Oriented design
- Larger projects, and how to deal with large
programs - COMP 121 Data Structures
- How to organize data for efficiency
- Lists, Arrays, Trees, Stacks, Queues, etc.
- COMP 122 Algorithms
- How to do things efficiently
- How fast do programs run?
- Sorting, Searching, Finding shortest paths
- Mathematical proofs
4What else is there?
Yeah right, Im taking all that. You couldnt
pay me, jackass.
- What is computer science?
- Programming Languages
- Graphics
- Algorithms
- Theory of computation
- Compilers
- Operating Systems
- Networking
- Artificial Intelligence
- Enterprise Applications
- Simulation
- Numerical Analysis
- Parallel Computing
5Ok, lets pick a few
- These might matter to you in the future
- Programming Languages
- Different tools for different jobs
- Parallel Scientific Computing
- One processor isnt enough!
- Enterprise computing
- If you work in business, youll need to know
6Programming Languages
- Java is just one of many!
- Youve learned in Java
- But most languages are pretty similar
- Some examples
- Python
- Perl
- C
- C
- MATLAB
Duke, the Java mascot
7Python, Java, Perl, C
for i in range(10) print Hello world, i
public class HelloWorld public static void
main(String args) for(int i 0 i lt 10
i) System.out.println(Hello world
i)
foreach i (0..9) print Hello World i
include ltstdio.hgt int main(int argc, char
argv) int i for(i 0 i lt 10 i)
printf(Hello world d, i)
8Think of languages as tools
- Different tools are for different jobs
- Pick the right one!
- C
- Good for writing operating systems
- very fast
- C
- Slightly higher-level than C
- Used for lots of Windows programs
- Also a systems language
- Java
- Easy to debug, easy to write applications fast
- Slightly slower than the above
9Think of languages as tools
- Different tools are for different jobs
- Pick the right one!
- Python
- Very fast to develop python programs
- Sometimes slow, cant do really low-level stuff
- Perl
- Created as a glue language
- Great for processing text
- Great for taking some programs output and
passing it to others - MATLAB
- Good for doing matrix math
- Good for prototyping scientific applications
10Simulation
- Scientists are increasingly in need of
computational simulation for - Weather
- Molecular Biology
- Bombs
- Physics
- Social networks?
- These are big problems
- You cant do this on your laptop
11Parallel Computing
- Sometimes one processor isnt enough
- You might need to program for 130,000 or so.
- Enter BlueGene/L, pictured at left
- Weve got one rack (2048 processors)
- The unit at left is 64 racks
- Its at LLNL, in California
12Parallel Computing
13Moores Law
- Gordon Moore
- Founder of Intel
- Number of transistors on a chip doubles every
18-24 months - exponential growth for processor speed
- Held true for a while, but slowing down
- To keep it going, well need to go parallel
14Moores Law
- Graph at left is extrapolated
- includes earlier technologies
- Not just microprocessors
- All paradigm shifts in computation
15Parallel Computingon your Laptop
- Intels new chips contain more than one physical
processor - Youll be able to run parallel applications on
your laptop - Multithreaded applications will become more and
more necessary - Youve learned about threads
- Future programs arent just going to use these,
theyll need them - Programs without wont get the most out of the
hardware
16Enterprise computing
- If you go into business, computer science will
probably matter to you - IT is one of the biggest costs for businesses
- Growing number of companies have in-house
programmers - If youre not writing the code, youll work with
the programmers! - You can feel their pain
17Enterprise computing
- Hopefully this course gave you an idea of
- what it takes to write these programs
- Whats feasible and whats not
- Businesses deal with these problems every day
- Time to write program vs cost
- Its only going to be more relevant as more
things get automated.