Sunday, April 19, 2015

edX: - HarvardX: CS50x3 Introduction to Computer Science - week 1 Continue

Right at the end is the touching story of Saroo Brierly which  is going to be made into a film soon.





Some short notes here on the lecture:-

make - make object code
./hello
printf is in stdio.h
main - default entry point
paranthesis - holds what is used in printf
double quotes - surround phrase
\n- newline
;   -   finishing a statement
make - finding the file and convert to object code
clang - compiler
clang hello.c - ls to list contents of directory - a.out
mv a.out hello  and then -lcs50
in stdio.h   more to printf
escape sequences
%i is a placeholder for integer
types of variables - float, int , char
in cs50 library - string and bool - Getstring etc
condition  - if condition   { do this }
boolean expression   -  if condtion  and/or another condtion is true needs && and ||
switches - like if else but use cases
loops  -  for, do while
variables need to be defined
functions
a program to do addition with  int x=Getint();
condition-0.c  -  if, else  at first but could not detect zero so if , else if and else used

Sunday, April 12, 2015

edX: - HarvardX: CS50x3 Introduction to Computer Science - week 1

A  history of Paul Allen and Bill Gates and their path to programming the Altair 8800 is read out by two students.  String variable is introduced in this lecture.







Some short notes here on the lecture:-

source code
compiler
object code  0 and 1

while (true) - can run forever
for loop - iterate from 0 to 10
variable - store something
counter - counts forever
boolean expressions  eg    if x>y
condition - compares

compiler - eg gcc
standard environment linux  - a hypervisor
cs50 appliance - gedit

make - triggers the compiler - saves 0 1and1 in a file called hello
./hello runs 
\n is actually new line
string s   %s
printf is part of stdio.h
cs50.h library has functions
GetString

CornellX: ENGRI1210x The Computing Technology Inside Your Smartphone

This is another digital course I have been trying out. Seems  interesting so far.  Topics are:-



  • Describe how a smartphone processor works
  • Explain computer system design from binary information to programming
  • Design a small working computer
  • Describe common techniques used to make computers fast

Saturday, April 4, 2015

edX: - HarvardX: CS50x3 Introduction to Computer Science - week 0 continued


There is an amusing example of how programs work with peanut butter jelly sandwich in this lecture.



Some short notes here on the lecture:-

variable - container
loop   - for
condition  - if else

scratch program
statement - eg say hello world,  wait for one second, play sound
boolean expression - eg.  >,  true or false, touching mouse pointer
condition block - if else if else
loops - repeat
variable n
mltithreading
multicolored bulb and binary bulbs

Saturday, March 28, 2015

edX: - HarvardX: CS50x3 Introduction to Computer Science - week 0



  • Computers only understand zeroes and ones, an alphabet called binary. While humans use decimal, which has 10 digits 0-9, computers only understand binary, which has two digits, 0 and 1.
  • Now we can do more, by using ASCII, a standard that maps numbers to letters. For example, A is mapped to 65B is 66, etc. Though bits can only store numbers, programs can translate those bits to letters for humans to easily read.

Algorithms


  • Algorithms are sets of instructions to solve particular problems, taking inputs and producing outputs that are hopefully correct, but also efficient.
The famous phone book example:
  • We can open to the first page, and look for someone, say, Mike Smith. Then we continue to the second, third, and so on until we find Mike Smith. That algorithm is correct because we will find him eventually, but isn’t very fast.
  • Humans reasonably open to the middle, and since the phone book is alphabetical and the middle is the M section, we can literally tear this problem in half by ripping the phone book in half and keeping only the half that we think Mike Smith is in. 
efficiency

  • The green line will have a logarithmic slope that doesn’t increase in height as much as the other lines. With the phone book, even if the size of the phone book doubled, it would only take one more step to solve the problem.

Pseudocode is describing code for a problem in English:


1pick up phone book 2open to middle of phone book 3look at names 4if "Smith" is among names 5 call Mike 6else if "Smith" is earlier in book 7 open to middle of left half of book 8 go to line 3 9else if "Smith" is later in book 10 open to middle of right half of book 11 go to line 3 12else 13 give up


Saturday, March 21, 2015

Roberta Flack- "One Thing Leads to Another"

This is one of the most underrated songs of the eighties. It was featured  in the movie "Body Rock" which I did not think was that bad either.

Saturday, March 14, 2015

Coursera:- Learning How to Learn: Powerful mental tools to help you master tough subjects

This is a more self paced course at Coursera. I have only watched the first video  and it seems ok so far. I don't really know what the rest is like  but I presume it will give more ideas on how to be a better learner.

https://www.coursera.org/learn/learning-how-to-learn