JavaScript is not the most popular language

 

JavaScript is not the most popular programming language. There are, however, a great number of frameworks available to create WebGL content without building from the ground up. BabylonJS is a complete JavaScript framework for building 3D games.

With Microsoft’s C# it’s easier for independent developers to publish to console platforms. At the end of the day, choosing the Windows ecosystem is likely to cost less than choosing an open source platform.

 

Top 10 Programming Languages to Learn in 2016

  1. JavaScript
  2. Java
  3. Python
  4. C++
  5. C#
  6. Swift
  7. Ruby
  8. PHP
  9. Go
  10. C

I’ve been trying to learn C++

A math problem can often look super simple before you actually try it and find you have no clue how to solve it. What we really need is more understanding of math, and implementing the algorithms yourself is the best way to do that.

33 = a3 + b3 + c3

The solution to this equation could not be determined.

Here’s my “solution” to the problem. Of course there are massive pitfalls and very few people actually need this : )

/*
The Uncracked Problem with 33
author: Jussi Konttinen
website: un3d.eu
last edited: June 2016
*/

#include <math.h>       /* pow */
#include <iostream>     /* Input/output stream  */
#include <stdlib.h>     /* srand, rand */
#include <time.h>
#include <limits>

using namespace std;

void PressEnterToContinue()
  {
  std::cout << "\nPress ENTER to continue... " << flush;
  std::cin.ignore( std::numeric_limits <std::streamsize> ::max(), '\n' );
  }

// result = a³ + b³ + c³
long cubesum(long a, long b, long c){
  long result;
  result = pow (a,3) + pow (b,3) + pow (c,3);
  return (result);
}

void show_results(long cubesum, long x, long y, long z){
  std::cout << "a^3 + b^3 + c^3 is: " << cubesum << std::endl;
  cout << "Value of a is: " << x << endl;
  cout << "Value of b is: " << y << endl;
  cout << "Value of c is: " << z << endl;
}

int main ()
{

   // local variable declaration:
   int loop = 0;
   long random_a, random_b, random_c;

   // initialize random seed:
   srand (time(NULL));

   // generate random numbers
   long a = rand();
   long b = rand();
   long c = rand();
   long result;

   // do loop execution
   do
   {
       // counting loops
       loop = loop + 1;
       // calling a function to add the values.
       result = cubesum(a, b, c);
       //result = 33; //unit test part 1

   // counting every 10 million iterations
   if (loop % 10000000 == 0 && loop != 0)
   {
       cout << "Solving the equation. Loop No. :" << loop << endl;
   }

   // check the condition
   if( result != 33 )
   {
       // if condition is not true
       a++;
       b = b - 2;
       c = c - 3;
   }
   else //( result == 33 )
   {
       // if condition is true then print the following
       show_results(result, a, b, c);
       cout << "Hip, hip, hurrah!";
       //cout << "Cubesum is " << cubesum(a, b, c) << endl; //unit test part 2
       break;
   }
   // 100 million loops
   }while( loop < 100000000 );

   if( result != 33 ){
       show_results(result, a, b, c);
       cout << "Better luck next time.";
   }

   PressEnterToContinue();
   return 0;
}

Ok, now that you’re already up and running, let’s run the program from within Code::Blocks.

Solving the equation. Loop No. :10000000
Solving the equation. Loop No. :20000000
Solving the equation. Loop No. :30000000
Solving the equation. Loop No. :40000000
Solving the equation. Loop No. :50000000
Solving the equation. Loop No. :60000000
Solving the equation. Loop No. :70000000
Solving the equation. Loop No. :80000000
Solving the equation. Loop No. :90000000
Solving the equation. Loop No. :100000000
a^3 + b^3 + c^3 is: -2147483648
Value of a is: 100005516
Value of b is: -199980621
Value of c is: -299999768
Better luck next time.
Press ENTER to continue...