Perl: use feature ‘say’;

More self-tutoring about Perl: the tutor mentions another way to enable ‘say’ in Perl.

In my post from Aug 15 I mention the Perl feature say and that, to enable it, a user might key

use v5.10;

below the she-bang line. (Apparently, a version past 5.10 may also suffice.)

I’ve read since that the line

use feature ‘say’;

also enables the use of say.

Source:

perldoc.perl.org

www.sthomas.net

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Using say in Perl

Tutoring computer science, new language ideas will always be noticed. The tutor mentions the Perl construct say.

use v5.10; #Apparently you need this to use say.
$var1=”Hey there:)”;
say $var1; #same effect as print “$var1\n”;

I’ve never known of say, but I tried it on a console and indeed, it works. I needed to include use v5.10; for say to work. I understand, however, that the version can be higher.

Source:

perldoc.perl.org

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

What is port forwarding?

More self-tutoring about computer networks: the tutor examines the idea of port forwarding.

From a practical point of view, port forwarding is a way to set up a router so that outside inquiries can reach a resource behind it, in the internal network.

Port forwarding relies on a two-part construct:

  1. The application the outside users want dwells on a dedicated device in the internal network;
  2. Said application is reached via a specific port on that specific device.

(See yesterday’s post for an explanation of what a port is.)

Typically, a router will block unsolicited traffic from accessing computers behind it, which is its firewall function.

Let’s imagine the application you want to enable outside users to access is reached via port x0y0 on local device D0. The port forward that will enable such access:

Router, when a request for port x0y0 arrives, send it along to D0, port x0y0.

Now, outside clients can reach that inner device D0, through the firewall and past the router, by virtue of their request for port x0y0. The setup is called port forwarding.

Source:

CCTV Camera Pros

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

What is a port in computer networking?

Self-tutoring about computer networks: the tutor offers a definition of the common networking term port.

A port can be physical or logical. A physical port is a plug-in socket at which to attach a device to the computer, such as a printer. USB ports comprise an example.

A logical port, such as port 80, designates the program a request desires to connect through. Port 80 means http activity. The logical ports on a computer are 0 to 65535.

Source:

searchnetworking.techtarget.com

SimplifiedTechExplanations

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

English, Web Design: what does deprecated mean?

Tutoring English, fresh vocabulary keeps writing interesting. The tutor brings up a term he reads in connection with computer science.

deprecated (adj)

viewed unfavourably, viewed with disapproval.

In computer science, certain ways of writing code can become deprecated after newer, preferred ways supplant them. The deprecated code may continue to be supported for a time, but after being labelled “deprecated”, it’s vulnerable to sudden dysfunction.

Source:

developer.mozilla.org

Gilmour, Lorna (ed). Collins Essential Canadian English Dictionary & Thesaurus. Glasgow: HarperCollins, 2006.

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Computer networks: what is a switch?

More technology self-tutoring: the tutor explains his understanding of switch, a term he’s found tricky to define.

For background, my post from April 2, as well as my post from yesterday, connect with today’s topic.

Switches can be used in a variety of ways, so a simple conception only explains one application. However, I find this idea helpful:

Imagine a self-contained local network of computers physically connected. A given member can send a message to a specific other, or to all others at once. Then, the simplest central connection among these computers is a switch.

A switch is different from a hub (once again, my post from yesterday) in that the switch can forward a message to a specific intended recipient, whereas the hub just forwards it to everyone.

Source:

askleo.com

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Computer science, networks: what is a hub?

More technology self-tutoring: the tutor investigates the term hub in networking.

hub (in computer network):
a central device to which computers can be connected to form a local network. Data the hub receives from one computer will be forwarded to all the others to which it’s connected.

Source:

askleo.com

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Computer science, networks: what is a Peer-to-peer (P2P) network?

More self-tutoring about computer networks: the tutor shares the definition of peer-to-peer network.

Peer-to-Peer (P2P) network:

A network in which any computer is directly connected to any other, rather than through a server. The premise of P2P seems to be that the members are physically connected by wire.

The arrangement could be two computers connected, for example, by USB. It could also be a larger set of computers all connected along one main rail.

Source:

www.computerworld.com

www.w3schools.com

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Networking, OSI model: Layer 2 vs Layer 3

Reading about networks leads to self-tutoring: the tutor mentions some ideas about Layer 2 vs Layer 3 in computer networks.

As I understand, Layer 2, aka the link layer, is associated with data transmission in the context of frames. A simplified point of view about it imagines physically connected devices communicating. In broadcast mode, every member forwards all its output to every other member. However, output can be sent to only a specific member. Connected members have no nodes between them; each member is directly connected to any other. The Layer 2 network is self-contained.

Layer 3 uses packets, rather than frames, to organize data. It’s populated by routers. In Layer 3, a given data packet has one intended recipient; the others on the network will not see it. The router conducts each packet to its appropriate destination. Layer 3 is needed when there are intervening nodes between ones that want to communicate – hence, the need for routing the packets of information to their specific destinations. Layer 3 is the context for communication to happen between different networks.

Source:

www.wideband.net.au

stackoverflow.com

www.networkworld.com

networkengineering.stackexchange.com

askleo.com

www.computerworld.com

documentation.meraki.com

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Video games, graphics: what is ambient occlusion?

More self-tutoring about modern terms: the tutor shares what he learned about ambient occlusion.

ambient occlusion

a way of depicting a scene that shows features darker or lighter based on their exposure to ambient light, rather than a directed light source.

In many settings, such as within a dungeon or room in a deserted building, we often don’t imagine a light source. Therefore, the ambient lighting model makes sense.

Example: With ambient occlusion, a surface that crosses line of sight will be lighter than one running parallel to line of sight.

Source: Techquickie, on youTube

www.w3schools.com

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.