Wednesday, November 23, 2016

Why I haven't been posting.

dead blog

So I haven't been posting at all this week and you may be wondering why.Well first of all, I'm lazy, and second, I'm starting to learn other programming languages such as C (Not C++), Java, and C# so I can make a series on those later on. On top of that, i started experimenting with an operating system called "ReactOS", and if you don't know what ReactOS is, check out this page. That's all I've got for now.

Tuesday, November 15, 2016

Getting good at: C++ | #8 - while and do-while loops

8 - inception

Hey guys. The next pewdiepie here. Today, I'm going to show you how to make 'while' and 'do-while' loops. So a while loop is a type of loop that occurs when a conditional is true. If we make a variable named 'conditi0nal', and set it equal to 100, then we can write something like:

while(conditi0nal<=200)
{
     cout << "memes" << endl;
     conditi0nal++;
}

So as long as 'conditi0nal' is less than or equal to 200, it will print out "memes" and increase the value of 'conditi0nal' by one until it reaches 200.

A do-while loop is similar to the while loop, except that it does that body of code regardless if the conditional is true or false. So something like this:

do{
     cout << "memes" << endl;
     conditi0nal++;
}while(conditi0nal<=200);

This version of the while loop isn't used very often, so you don't have to worry about it too much.

While loops can also be used for user-defined variables. For example:

int answer;
cout >> "Is Control Alt Defeat best YouTuber?\n1. Yes\n2. No\n";
cin >> input;

while (input!=1)
{
     cout << "wrong answer" << endl;
     cin >> input;
}

cout << "thats right" << endl;

So in this program, we created a variable, and made the user input a value of 1 or 2. If the variable is set to 1 (it better not be), it will keep going until you set it to 2, in which case it will end the program.

That's all for now. 

Tuesday, November 8, 2016

Something seems fishy about this...

rigged

I was growing weary of my daily Study Hall occupations (looking up sub $200 graphics cards on Amazon) and saw my friend taking an online IQ test. I didn't have anything better to do (I couldn't watch YouTube because the network sniffers are like hawks) so i decided to give it a shot...



and here are my results:

Originally it was 142, but I didn't have the screenshot, so I had to redo it. 

Notice the unrealistic IQ score. Keep in mind that the entire test is only 20 questions long. They aren't even hard. How do you get an IQ of 164 from answering 20 questions? 

My theory is that the people who wrote this webpage made a variable (iqscore) and set it equal to zero, and made the user input an answer. The answer input would be linked to a variable, and when they input their answer, it sets this variable to a value, and this value is linked to a switch(){case} statement (Or Javascript/HTML equivalent), and depending on whether or not the user is right, will do something like iqscore = iqscore + 24, and repeats this 20 times. Once you reach the end, it will print iqscore on the screen.

I can see where they were going with this, but at the same time, I can see how this would cause some problems. It's kind of like when nVidia made the Tegra X1 and noticed that it had less power than the average sub $300 PC, so instead of doing it right and calculating the performance in FP32, they covered up their mistake by calculating it in FP16 (those sly dogs). 

Now this is a theory, so don't go after the people who wrote this test. Just know that some online IQ tests can be inaccurate. 

TL;DR: don't believe everything you see.

Website: free-iqtest.net

Picture: "https://www.pcper.com/files/imagecache/article_max_width/news/2015-02-16/Burned_laptop_secumem_11.jpg"; Perspective, PC; 8 November, 1782.