My first blog about my first week at Seneca CDOT.

On May 6  2013 I began working at Seneca’s CDOT. Some of the new things I am learning:

  1. IRC (xChat),
  2. JavaScript on Node.js,
  3. Python,
  4. Sublime Text.

I am also deepening my knowledge and continuing developing my skills in:

  1. Linux
  2. Git

* * *

The following are problems and solutions I had this week:

Question:

How do I check who is set as the user on Git?

Answer:

$ git config user.name

Similarly, to check the value of  the user.email key:

$ git config user.email

* * *

Problem:

When I clone a project, the file does not have write-permission, it’s read-only and I can’t save any changes.

Solution 01:

use the umask utility.

Solution 02:

check if you are added to the root group:

# vi /etc/group

if you are not, add yourself like this:

# usermod -a -G root cdot_igor

usemod: user(account) modify

-a: append user to the supplementary group

-G: group

root: root group

cdot_igor: the user’s name

# yum update

to download and install all updates

Loaded plugins: langpacks, presto, refresh-packagekit
You need to be root to perform this command.
$ git clone https://github.com/igoryen/Test.git testing2

    cloning project Test down to directory “testing2”

Cloning into 'testing2'...
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (6/6), done.

* * *

Question:

How do I install IRC on Windows?

Answer:

xChat -> Network List -> Networks: Mozilla -> Edit -> Servers for Mozilla: irc.mozilla.org

Your details: Use global user information

Connecting: Auto connect to this network at Startup

Character set: UTF-8

* * *

Question:

What is Heroku?

Answer:

Heroku is a cloud platform as a service (PaaS) supporting several programming languages. Heroku is owned by Salesforce.com.[1] Heroku, one of the first cloud platforms, has been in development since June 2007, when it supported only the Ruby programming language, but has since added support for Java, Node.js, Scala, Clojure and Python and (undocumented) PHP. The base operating system is Debian or, in the newest stack, the Debian-based Ubuntu.[2]

Source: http://en.wikipedia.org/wiki/Heroku

* * *

Question:

What is VNC?

Answer:

In computing, Virtual Network Computing (VNC) is a graphical desktop sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the keyboard and mouse events from one computer to another, relaying the graphical screen updates back in the other direction, over a network.[1]

VNC is platform-independent – a VNC viewer on one operating system may connect to a VNC server on the same or any other operating system. There are clients and servers for many GUI-based operating systems and for Java. Multiple clients may connect to a VNC server at the same time. Popular uses for this technology include remote technical support and accessing files on one’s work computer from one’s home computer, or vice versa.

Source: http://en.wikipedia.org/wiki/Virtual_Network_Computing

* * *

A refresher on Linux permissions:

2^2   2^1    2^0
4      2      1
r      w      x
----------------
0      0      0    0 + 0 + 0 = 0  ---
----------------
0      0      1    0 + 0 + 1 = 1  --x
----------------
0      1      0    0 + 2 + 0 = 2  -w-
----------------
0      1      1    0 + 2 + 1 = 3  -wx
----------------
1      0      0    4 + 0 + 0 = 4  r--
----------------
1      0      1    4 + 0 + 1 = 5  r-x
----------------
1      1      0    4 + 2 + 0 = 6  rw-
----------------
1      1      1    4 + 2 + 1 = 7  rwx

Umask

If your umask is 022, then the system does the following subtractions:

 7   7   7    
-   -   -  
 0   2   2
__________

if it’s a directory, then the permissions of the new directory will be:

 7   5   5
Else, if it's a file, then subtract an additional decimal 1, and the resultant permissions of the new file will be:  
 6   4   4

* * *

Question:

Do I need to install an antivirus on the Windows in the Virtual Machine on my Fedora?

Answer:

Not really, because Fedora and Windows are like two separate computers, two separate hard drives, so if one gets infected it the other will not unless the two are on a network.

* * *

Question:

How do I change the size of the buffer in the terminal?

Asnwer:

Edit > Profile References > Scrolling > Scrollback: Unlimited.

* * *

Question:

What is the difference between synchronous code and asynchronous code in Java Script?

Answer:

An example of synchronous code:

var result = database.query("SELECT * FROM hugetable");
console.log("Hello World");

The disadvantage of synchronous code is that we it makes you first wait for  database.query() to directly return a result to you (which could take a long time), and only THEN to call console.log().

On the other hand, the asynchronous code exemplified below —

database.query("SELECT * FROM hugetable", function(rows) {
  var result = rows;
});
console.log("Hello World");

— does not make you wait for a result from database.query(). This code arranges for the result to be passed to a second parameter – an anonymous function. Thus console.log() is executed immediately. After that Node.js enters the event loop, which allows for event-driven, asynchronous callbacks.

One of the limitations of this execution model:

Here Node.js is just one single process. It can run on only one single CPU core.

Advertisements

One thought on “My first blog about my first week at Seneca CDOT.

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