Thứ Ba, 2 tháng 10, 2018

Waching daily Oct 3 2018

We continue, now let's talk about what is the temperature, the scales and the conversion formulas.

What is the temperature? The temperature is a scalar magnitude referred

to the common notions of heat measurable by a thermometer. It is directly related

to the part of the internal energy known as "kinetic energy", which is the energy

associated with the movements of the particles of the system, either in a translational,

rotational, or in the form of vibrations. As the kinetic energy of a

system increases, it is observed that it is "hotter"; that is to say, that its temperature is higher.

TEMPERATURE SCALES.

Among the main scales is the Celsius, Fahrenheit, Kelvin and Ranking scale.

The temperature measurement scales are basically divided into two types,

relative and absolute. The values ​​that the temperature can adopt in any

scale of measurement do not have a maximum level, but a minimum level: the absolute zero.

The temperature according to the international system is measured in Kelvin, capital K symbol.

The formula that allows me to change from one scale to another scale is the following:

From the Celsius scale to the Fahrenheit scale, from the Fahrenheit scale to the Kelvin scale,

and from the Kelvin scale to the Ranking scale.The formula would be:

Number of degrees Celsius over 5, is equal to the number of degrees Fahrenheit minus 32 over 9,

which is equal to number of degrees Kelvin minus 273 over 5, which is equal to the number

of degrees Ranking minus 492 over 9. Now, if you ask for the temperature variation,

this can be: Variation in Celsius over 5, is equivalent

to the variation in Fahrenheit over 9, which is equivalent to the variation in Kelvin over 5,

which is equivalent to the variation in Ranking over nine.

Subscribe

For more infomation >> Definición, escalas y formulas de conversión de la Temperatura | SSM - Duration: 2:05.

-------------------------------------------

De weg vooruit naar meer veiligheid & respect - Duration: 1:06.

For more infomation >> De weg vooruit naar meer veiligheid & respect - Duration: 1:06.

-------------------------------------------

Cleaning source code - Duration: 4:09.

Hello everyone,

Mi name is Christophe and today I want to talk to you

as a programmer.

Sometimes I am asked to have a look at the source code of some program.

Then, I note that the source code could be easier to understand.

In this video I want to share with you a simple trick.

When writing source code while thinking about algorithms

here is what may happen.

First, one prepares the function according to the requirements.

In this example I suppose

that we want to change some elements of a list.

Actually, this is not real source code

and even the programming language does not exist,

but I guess every programmer will understand nevertheless.

In this example, one writes the source code,

and a loop and tests become necessary.

One has a closer look at the code and remarks

that the line compiling the regular expression could fail.

So, one adds a test to go into the loop.

Finally, the programmer remarks that the part that updates the screen

is not always necessary.

To make the program faster, a test is added.

I assume that this code works as expected.

However, I believe it could be improved.

For me, the main issue is that the main part of the code

is not easy enough to read.

When writing code, one understands its own well.

However, code from some somebody else,

or even one's own code after some some time,

may require more cognitive load than really necessary.

In this example, when reading the main part,

one must at the same time remember the context:

two tests and one loop.

This is unnecessary cognitive load.

To make code easier to understand, I suggest first

quickly exiting a function when it is not about its main goal.

For instance, when an error occurs.

In this example, the compilation of the regular expression could fail,

there I would recommend exiting the function.

In this example I am uzing the instruction "return";

in real life it would depend on the programming language.

For instance, one may use exceptions

or, if programming in C, "goto" is also an option.

Here is the code in the the Linux kernel style.

Inside the loop it is the same thing.

If one item is not appropriate, it is better

to go to the next one through the use of the keyword "continue".

It is also possible to do that again for the other test inside the loop,

even though that one is more debatable.

I like that way of writing source code because

when I am reading the interesting part

the context inducing cognitive load is minimal;

in this example, only the loop.

Another advantage is that all errors and their handling

are easy to spot.

Here the difference between before and after.

If you are not a programmer, maybe both look similar.

However, I can ascertain that it is much more comfortable

and effective to work the code on the right.

If you are a programmer, I believe you will have a similar opinion.

And if you are a professionnal programmer

you certainly thought that writing unit tests

would lead to a similar result.

I do agree with you

but I will talk about unit tests in another video.

I hope to see you then.

Good bye.

Không có nhận xét nào:

Đăng nhận xét