Lectures 3 & 4

Lecture 3:

still on Karel…

1:34 how do you stop a java program?
just go on the little stuff on the right of the window that allows you to close the window

2:00 Common errors … in Java: infinite loops ans how to avoid such bug in which you unintentionally make your program loop forever

4:15 our program is so fast that it can execute an infinite loop in 2.5 s :))

5:27 OBOB ! off by one bug – it is also a common mistake encountered among beginner programmers: when you write your program to make some iterations and it omits to execute one iteration, either you start counting from 0 instead of 1, or you mistakenly use > instead of >=

8:12 not commenting accordingly a program is also a big programming mistake

another software engineering concept explained is about breaking down a program into basic operations called: primitives

Stepwise refinement – when the program keeps being refined, or decomposed, into steps that are primitives

Top-down design – “you start at the highest level and you go down”
this contrasts with bottom-up programming design

usually the programmers have a bottom-up design approach

18:07 “it takes about a hundred hours of programming proficiency in the average case to go from thinking bottom-up to thinking top-down”

20:46 Algorithm: a recipe for doing something

36:25 “that’s why software engineering is important” .. because modifications, that will be done far more often to when writing the code from scratch, can be well integrated in the program

38:36 CamelCase… so often met in Java

40:00 how do I know how much to decompose?

40:23 everyone of your methods should solve one problem – I remember that I read something similar about UNIX philosophy, it was like this “tasks were designed to do very basic things, but they have to do them well”

41:13 second guideline: “most of your methods will have between 1 and 15 lines ”

42:03 third rule: “methods should have good names”
42:45 fourth rule – comment your code! (consequences of this I experienced on my own)

Lecture 4:

it seems that it is time to say good-bye to Karel.

1:06 History of computing …
3:00 the first program was done by Ada Byron (YES! daughter of lord Byron)
1946 – ENIAC first electromechanical computer (Electronic Numerical Integrator And Calculator)

5:34 1971 – the event of first microprocessor – Intel 4040

6:51 What is computer science? Why do we need computer science?

7:20 the difference between computer science and computer programming: computer science – is the study of problem solving with computational methods
computer programming is just an artifact, is something part of the entire process

9:50 introductory stuff: “computers understand only 0’s and 1’s” … “machine language” … “high level language” … “compilation” … “source code” … “object file” … “executable code”

13:25 here’s were things get funky in Java compilation process in Java, Java compiler, Java archiver, Java Interpreter and … Java Virtual Machine, those all things bring into the play the strongest Java feature: “compile once run everywhere

17:30 Java is an Object Oriented language … but “what is all this thing about object-oriented” …. “a set of classes

18:50 a Class is encapsulation of some behavior (+ data)

20:50 superclass, subclass … basic notion of any object oriented language

the notorious Animals inheritance tree is presented (I think this is given as an example of inheritance at almost every programming course, well object oriented programming)

25:17 instance of a class … the other name for objects

28:50 acm (Association Computing Machinery) program inheritance tree: a program can be a console program, a dialog or a graphics program.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: