Posts

Showing posts from April, 2016

Harvard - CS50x - Week 1 - Notes - Part 1

COMPILER takes the source code (the language in which the humans write code) and transofrms it into object code (the code which the machines understands and executes into).

#include <stdio.h> tells the computer to give the access of standard libraries, already built in the language, for use to the user.
    Eg: printf

"make hello" is basically compiling the program, convering the soruce code in to the object code.

Type of variable declaration is required in C

Semi-Colon just terminates the line, it tells the computer that this is all for the command.

%s is a place-holder.

printf takes two inputs, one of which is a place-holder and other the string.

. (DOT) means the curent directory.
    Eg: ./hello

COMMENTS in C : // add content

EQUALITY ==

ASSIGNMENT =

TIL: In linux, one does not need to write the full name. Typing a partial name and hitting tab, completes the task.

%.10f - means telling the computer give me the float number with upto 10 decimal points.

\n - New Line

Harvard - CS50x - Week 0 - PSET0 - Submitted

Image
PSET 0:

Scratch and implement a project of your choice (be it an animation, a game, interactive
art, or anything else), subject only to the following requirements.

• Your  project  must  have  at  least  two  sprites,  at  least  one  of  which  must  resemble
something other than a cat.

• Your project must have at least three scripts total (i.e., not necessarily three per sprite).

• Your project must use at least one condition, one loop, and one variable.

• Your project must use at least one sound.

• Your project should be more complex than most of those demonstrated in lecture (many
of  which,  though  instructive,  were  quite  short)  but  it  can  be  less  complex  than,  say,
Pikachu’s Pastry Catch and Ivy’s Hardest Game . As such, your project should probably use a few dozen puzzle pieces overall.

SOLUTION:

1. The first step is to figure out what to build, rather imagine what to build.

    Probably a pack of dogs hunting a deer. As soon as the deer gets eaten by any of the do…

Harvard - CS50x - Week 0 - Notes

Computer Science is all about computational thinking. Thinking like a computer.

Computational thinking means to think more methodically and algorithmically.

Thinking computationally boils down to solving problems.

In BINARY system we have powers of two and only two digit 0 and 1. Unlike in the DECIMAL system,where we have ten digits and power of ten.

BITS is Binary Digits.

Taking real world analogies or tool kit with which we are already familiar with and solving problems with the help of them, is Computational Thinking.

A computer program where decisions get made is essentially a bit of maths and "If" statements. - Bill Gates

Source Code is the code which humans right, which computers are able to comprehend after a few steps of interpolation.

The largest value which you can represent with 8 bits or one byte is 256, but not counting from zero.

A VARIABLE stores a piece of information.

ARRAYS are something which allows us to store more than one piece of information.

Base 10 o…

Finished - Udacity Course - How To Use Git and Github

Image
I completed the Udacity Course - How To Use Git and Github yesterday.

Had been working on it for a while, got dis-engaged from the course for a while in between.

This is the first Udacity course that I have finished on Udacity.

So now I have at least one course completed each on Coursera,Edx and Udacity at least.

I love the entire experience of Udacity and my goal is to complete more courses from the platform.

The new designed UI and UX is a treat to work with.

One thing, I wished Udacity would have just sent an email acknowledgement that I completed the course, that would have been enough.

But yes, I would keep on learning at Udacity !

And last but not the least, I would like to Thank from the bottom of my heart to Mr.Sebastian Thrun (we all know who he is, right) and the course instructors Ms.Caroline and Ms.Sarah for providing me this opportunity to learn.

I shall be always indebted !

Thank You So Very Much !!!

Lesson 3 Reflections - How to use Git and Github - Udacity

GITHUB is a website which makes it easier for anyone to share their entire repository.

When interacting with GitHub, the information whcih we send and receive are in the form of Git commits.Hence, the changes must be staged and committed before they can be sent.

If there is only one remote in the repository, then it is standard to name it as ORIGIN.

GIT REMOTE is the command to create a new remote:

    git remote add origin https://github.com/therealmccoy/reflections.git

git remote -v

    -v stands for verbose, which means git would now supply more information about the remote.

In most cases the (fetch) and (push) url of the remote would be the same.

In order to send the changes to remote, the command used is GIT REMOTE. It takes two arguments, the remote where the changes need to be pushed and the name of the local branch which is to be pushed.

    git push origin master

By default the name of the branch pushed to remote on Guthub would also have the same name.

TIL: When creating an …

Lesson 2 Reflections - How to use Git and Github - Udacity

GIT Repositories are different from other repositories that they store a bunch of meta data about the history of repository.

The history is store in the directory called .git, which is hidden.

TIL: Hidden files and directories start with a period, which tells the OS to hide them.

GIT INIT is the command to create a new repository.

When you initialize the repository, Git doesn’t create any commits for you. You’ll have to create the first commit yourself.

GIT STATUS command shows which files have changed since last commit.

QUE 1: What happens when you initialize a repository? Why do you need to do it?

ANS 1: When I initialise a repository, Git creates a snapshot of that repository. We need to do it, so as to proceed with the tracking of files.

Staging Area is the intermediate step before the commit. Git adds all the files to the statging area, before commit is made. All the files added in the staging area are then compiled as a single commit, when the commit is made.

The files are adde…

Lesson 1 Reflections - How to use Git and Github - Udacity

Image
Windows has "FC" utility to compare two files and Unix has "diff".

 I can open the text editor (in my case, sublime-text) via command line. The command for opening sublime-text is "subl".

 I always wondered as in how to create a new file in a directory, via command line. I always used to do the usual way, ie go to the text-editor, create a new file and then go to the present directory and save it. Now I can just locate to the present directory and fire "subl filename" and viola, a new file is created.

 The reason to keep the lines short in a code, is because, while comparing the lines in two separate files of code, it would easier to find the difference.

 QUE 1: How did viewing a diff between two versions of a file help you see the bug that was introduced?

 ANS 1: When we compare the two versions of a file, we are doing it for the obvious reason that something is not right. Something is not working correctly. Mostly so. While seeing the differen…

THE ANDROID DEVELOPMENT ENVIRONMENT - PART 1 - COURSERA (Contined 2)

Programming Mobile Applications for Android Handheld Systems: Part 1
-------------------------------------------------------------
University of Maryland
----------------------

THE ANDROID DEVELOPMENT ENVIRONMENT - PART 1 [CONTD...]

onCreate is the name of the method in the MainActivity class that sets up and displays the application's user interface screen.

Camera support is disabled by default in the AVD. It can be activated by going in to the AdvancedSettings of the AVD.

5554 is the port number to which the emulator is listening to.

The command "telnet localhost 5554" not working. The error is conection refused. Ah !, the emulator was not running only, so how would it connect. Silly !!!

The command via telnet "power status not-charging" does not work, the emulator still shows the device charging, tried the command twice. Rest other commands working.

The google APIs are not running and it is very annoying, could not test the further part.

Apparently, for each…

THE ANDROID DEVELOPMENT ENVIRONMENT - PART 1 - COURSERA

Programming Mobile Applications for Android Handheld Systems: Part 1
---------------------------------------------------------------------------------------------------------------------
University of Maryland
--------------------------------------

THE ANDROID DEVELOPMENT ENVIRONMENT - PART 1
============================================

JAVA DEVELOPMENT KIT download.

     The JDK is a development environment for building applications,applets,and components using the Java Programming Language.

The command file /sbin/init displays the linux operating system architecture, whether it is 32 bit or 64 bit.

Separate download and install of JDK and JRE.

**TIL: All write protected files to be removed bu using sudo.

**TIL: Copying the folder, copies the location of the folder, which can then be used in terminal by copy-paste.

**TIL: Packages still have to be installed from SDK Manager, after the configuration of studio. A lot of tools and packages available. Without them, the studio would not f…