Sunday, January 15, 2017

Youtube daily report Jan 15 2017

C++ templates are really useful.

For example, when you design an algorithm, with templates,

you can make it work -

with all possible data containers and data types,

yet you only need to write the function once.

But there is a price to pay:

The program size.

Even if you tell the compiler to optimize a program for size,

you may still be looking at a pretty hefty binary,

which may be a problem

especially if you are developing for an embedded platform.

Luckily C++ also offers a solution to this problem.

Instead of templatizing the whole algorithm,

you might only template the parts -

that depend on your data and your parameters.

To do that, we use virtual functions.

We use a purely abstract baseclass.

The purpose of the baseclass is to define the interface -

that our function will be using.

This interface can then be implemented by derived classes.

The same template will generate a new inherited class -

for each and every datatype that might come acrosss.

As you can see from this chart,

the executable file size does still increase -

every time you add a new type,

but much, much less, than it did -

when the entire algorithm was a template.

Now I am not going to lie to you: This is a tradeoff.

While this trick does make the program smaller,

it also makes it somewhat slower.

But the speed difference seems to be a constant,

and does not depend on the number of types -

that the algorithm is specialized for.

The bottom line is this:

There is never a solution -

that is the best tool for every possible situation.

Part of being an experienced programmer is being well educated -

in a wide variety of techniques and knowing when to use them.

If you are a beginning programmer,

you are probably better off with a small toolbelt -

and learning to use those efficiently.

If you have too many tools as a beginner,

you may get overwhelmed by the number of choices.

But when you gain more experience,

your toolbelt will get larger and larger,

and you'll be making more and more refined programs.

Many people ask me how to keep motivated as a programmer.

How to keep improving?

How to become good?

And my answer is always this:

Always keep being interested to learn how things work.

Never be afraid to experiment.

Aim for just very slightly higher -

than what you are currently able to do,

and you will keep climbing.

There is no cap, other than your imagination.

If you make something interesting, or have a story to share,

post a comment on this video!

I enjoy reading your stories, questions and comments,

and I'm sure others will too.

Thank you for watching,

have a fantastic day, and see you next time.

For more infomation >> C++ templates and optimizing for size - Duration: 2:55.

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

[HD][VOSTFR] Uhm Jung Hwa- Watch Me Move - Duration: 3:31.

For more infomation >> [HD][VOSTFR] Uhm Jung Hwa- Watch Me Move - Duration: 3:31.

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

PREPARATION FOR THE BREEDING OF CANARIES: FOOD - Duration: 9:48.

For more infomation >> PREPARATION FOR THE BREEDING OF CANARIES: FOOD - Duration: 9:48.

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

The Space Between Us

For more infomation >> The Space Between Us

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

Rings - In Theatres February 3

For more infomation >> Rings - In Theatres February 3

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

Čo je kyselina močová? Dna bolesť, za ktorou sa skrýva kyselina močová_ SLOV - Duration: 2:37.

Hi, This is Sami, from Fawzi academy, In this video, I will talk about,

What is uric acid?, Uric acid is, a heterocyclic compound of carbon, Nitrogen, oxygen, and hydrogen,

Uric acid is, a Chemical Compound, Created, when the body breaks down, Substances, called purines.

Purines, are found in, liver, anchovies, mackerel, dried Beans, and peas, and beer.

Most uric acid, dissolves in blood, And travels, to the kidneys. From there, it passes out in urine. If your body

Produces, too much uric acid, or doesn't remove Enough from it, you can get sick. Blood Test must Performed, to check how much

Uric acid, you have in your blood. Another test Can be used, to check the level of uric acid in Your urine.

The reference range of uric acid is typically 3.4 to7.2 mg/dL for men, and 2.4 to 6.1 mg/dL for women,

Uric acid concentrations, above and below the Normal range, are known, respectively, as Hyperuricemia, and Hyporuricemia.

Causes of high uric acid, People may have elevated uric Acid levels, for hereditary reasons,

Diet may be a factor. Purine, high-fructose corn syrup, and table sugar,

Can cause increased levels of uric acid, Serum uric acid, can be elevated due to reduced Excretion, by the kidneys

Fasting, or rapid weight loss, can temporarily Elevate uric acid levels, and certain drugs, such as diuretics,

Saturation levels of uric acid, in blood, may result In one form of kidney stones,

And can lead to Gout. This painful condition, is the result of Needle-like crystals of uric acid precipitating in,

Joints, capillaries, skin, and other tissues, Hope this information, is helpful, Thank you for watching, Fawzi academy,

please, Subscribe, share this video, Favorite, like, and visit our Website, fawziacademy.com

No comments:

Post a Comment