New Super Power

I wish my school had programming classes. In "computers" class we just do absolutely nothing. I fucking hate it.

Super power eh? I agree, creating whatever you want.
 
Daniel said:
I wish my school had programming classes. In "computers" class we just do absolutely nothing. I fucking hate it.

Super power eh? I agree, creating whatever you want.

I love programming, it is extremely cool and the possibilities seem endless.

By the way, check out your points. Doing tests with it now. :)
 
Deathcrow said:
Daniel said:
I wish my school had programming classes. In "computers" class we just do absolutely nothing. I fucking hate it.

Super power eh? I agree, creating whatever you want.

I love programming, it is extremely cool and the possibilities seem endless.

By the way, check out your points. Doing tests with it now. :)

Me too, and I would love to truly learn how to be such a boss as @"Chewbaka". But I'm just a beginner and can't do many things.
My school had a survey about what classes should be added, it had french, italian, programming, and a few other things, and I was like "just fucking add them all, the more you know the better"


By the way, just sent this video to the principle, hopefully he says something positive.
 
I don't know my multiplication tables.
Code:
$factor1 = 0;
$factor2 = 0;
for($factor1<11) {
for($factor2<11) {
$factor1*$factor2=$product;
And now I'm stuck. Not really, just don't want to finish it.
 
Just watched this in one of my lectures today and it was actually pretty good to listen to.
They're not wrong either. Without programmers, we wouldn't have the world that we have today.

Puck ftw @ 3:12.
 
Storm said:
Just watched this in one of my lectures today and it was actually pretty good to listen to.
They're not wrong either. Without programmers, we wouldn't have the world that we have today.

Puck ftw @ 3:12.

What lecture was this? I think it is great that programming is becoming more popular. It is extremely important in today's world and really the possibilities are endless.
 
Deathcrow said:
Storm said:
Just watched this in one of my lectures today and it was actually pretty good to listen to.
They're not wrong either. Without programmers, we wouldn't have the world that we have today.

Puck ftw @ 3:12.

What lecture was this? I think it is great that programming is becoming more popular. It is extremely important in today's world and really the possibilities are endless.

Introduction to Artifical intelligence :sunglasses_1:
 
Storm said:
Deathcrow said:
Storm said:
Just watched this in one of my lectures today and it was actually pretty good to listen to.
They're not wrong either. Without programmers, we wouldn't have the world that we have today.

Puck ftw @ 3:12.

What lecture was this? I think it is great that programming is becoming more popular. It is extremely important in today's world and really the possibilities are endless.

Introduction to Artifical intelligence :sunglasses_1:

That sounds kind of cool. o_O

Is it a interesting class? The professor keeps it from being boring hopefully?
 
Deathcrow said:
Storm said:
Deathcrow said:
What lecture was this? I think it is great that programming is becoming more popular. It is extremely important in today's world and really the possibilities are endless.

Introduction to Artifical intelligence :sunglasses_1:

That sounds kind of cool. o_O

Is it a interesting class? The professor keeps it from being boring hopefully?
Ha, the lecturer's asian so uh, being able to comprehend what he's saying sometimes can be a bit of a task in itself. I've got worse though, so compared to them he's pretty good.

I've only just started but it is a pretty cool unit to take. Later on in the unit we'll be making our own programs in a language of our choice that displays advanced AI techniques of some form or another.
 
Storm said:
Deathcrow said:
Storm said:
Introduction to Artifical intelligence :sunglasses_1:

That sounds kind of cool. o_O

Is it a interesting class? The professor keeps it from being boring hopefully?
Ha, the lecturer's asian so uh, being able to comprehend what he's saying sometimes can be a bit of a task in itself. I've got worse though, so compared to them he's pretty good.

I've only just started but it is a pretty cool unit to take. Later on in the unit we'll be making our own programs in a language of our choice that displays advanced AI techniques of some form or another.

I have had similar complications with one of my professors I had for circuit analysis. She is from China and was actually in China during the first week of class so we had another professor taking her place for the first week. I could hardly understand her and many of the terms we use she couldn't say. For example, when she said "Volt" is sounded just like "Watt".

Good luck with your programming though. Maybe once you start doing that you could share some of what you have done with us. I would be interested in seeing what kind of programs you make and what they are capable of doing.
 
The problem with our generation is laziness. There are many people who take an interest in software/game development, but think they can skip everything in between. This is a lot more common in high school students. They expect that they can go and create the next big game, but they don't realize how much learning and preparation it takes. But in a way, I blame the schools a little bit. They care most of about attendance because if no one is attending classes then they are essentially wasting money. Then the whole "you can do anything" speech comes out to lure in students and leaves these kids in the dark. The point is you have to want it. Spend your free time learning rather than gaming. Don't expect to take classes and become a genius. Don't get me wrong though, taking a class on the basics is the best decision you can make when you are learning, just don't rely on it to teach you everything. And also, for the love of god, don't be one of those kids you see over on HF that make shit to try to make a quick buck.
 
Chewbaka said:
The problem with our generation is laziness. There are many people who take an interest in software/game development, but think they can skip everything in between. This is a lot more common in high school students. They expect that they can go and create the next big game, but they don't realize how much learning and preparation it takes. But in a way, I blame the schools a little bit. They care most of about attendance because if no one is attending classes then they are essentially wasting money. Then the whole "you can do anything" speech comes out to lure in students and leaves these kids in the dark. The point is you have to want it. Spend your free time learning rather than gaming. Don't expect to take classes and become a genius. Don't get me wrong though, taking a class on the basics is the best decision you can make when you are learning, just don't rely on it to teach you everything. And also, for the love of god, don't be one of those kids you see over on HF that make shit to try to make a quick buck.

That is extremely true, Chewbaka. If you take a programming class you actually need to do all the assignments and maybe even read the book. There is a lot to programming and it takes time & effort to get a hang of it. And if a person wants to actually become good at programming they need to start making their own programs during their free time. The more you do it and experiment with it, the better you get. Like they said in the video, start with something small and build onto it.

Here is the main part of a simple animation program that makes a ball bounce around a window on your computer screen. It is in C++:


PHP:
/* 
   Name: WinAnim
   Author: Brook Miles
   Description: Making an animation in windows
*/

#include <windows.h>

static char g_szClassName[] = "MyWindowClass";
static HINSTANCE g_hInst = NULL;

const UINT idTimer1 = 1;
UINT nTimerDelay = 10;

HBITMAP hbmBall, hbmMask;
BITMAP bm;

int ballX, ballY;
int deltaX, deltaY;

int deltaValue = 4;

void EraseBall(HDC hdc)
{
   RECT rc;
   rc.left = ballX;
   rc.top = ballY;
   rc.right = ballX + bm.bmWidth;
   rc.bottom = ballY + bm.bmHeight;
   FillRect(hdc, &rc, (HBRUSH)(COLOR_BTNFACE+1));
}

void DrawBall(HDC hdc)
{
   HDC hdcMemory;
   hdcMemory = CreateCompatibleDC(hdc);

   SelectObject(hdcMemory, hbmMask);
   BitBlt(hdc, ballX, ballY, bm.bmWidth, bm.bmHeight, hdcMemory, 0, 0, SRCAND);

   SelectObject(hdcMemory, hbmBall);
   BitBlt(hdc, ballX, ballY, bm.bmWidth, bm.bmHeight, hdcMemory, 0, 0, SRCPAINT);

   DeleteDC(hdcMemory);
}

void UpdateBall(HWND hwnd)
{
   RECT rc;
   GetClientRect(hwnd, &rc);

   ballX += deltaX;
   ballY += deltaY;

   if(ballX < 0){
      ballX = 0;
      deltaX = deltaValue;
   }
   else if(ballX + bm.bmWidth > rc.right){
      ballX = rc.right - bm.bmWidth;
      deltaX = -deltaValue;
   }
   if(ballY < 0){
      ballY = 0;
      deltaY = deltaValue;
   }
   else if(ballY + bm.bmHeight > rc.bottom){
      ballY = rc.bottom - bm.bmHeight;
      deltaY = -deltaValue;
   }
}

LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
   switch(Message)
   {
      case WM_CREATE:
         hbmBall = LoadBitmap(g_hInst, "BALLBMP");
         hbmMask = LoadBitmap(g_hInst, "MASKBMP");
         if(!hbmBall || !hbmMask){
            MessageBox(hwnd, "Load of resources failed.", "Error",
               MB_OK | MB_ICONEXCLAMATION);
            return -1;
         }

         GetObject(hbmBall, sizeof(bm), &bm);
         SetTimer(hwnd, idTimer1, nTimerDelay, NULL);

         ballX = 0;
         ballY = 0;
         deltaX = deltaValue;
         deltaY = deltaValue;

      break;
      case WM_TIMER:
         if(hbmBall && hbmMask)
         {
            HDC hdcWindow;
            hdcWindow = GetDC(hwnd);

            EraseBall(hdcWindow);
            UpdateBall(hwnd);
            DrawBall(hdcWindow);

            ReleaseDC(hwnd, hdcWindow);
         }
      break;
      case WM_PAINT:
         if(hbmBall && hbmMask)
         {
            PAINTSTRUCT ps;
            HDC hdcWindow;
            hdcWindow = BeginPaint(hwnd, &ps);

            DrawBall(hdcWindow);
            
            EndPaint(hwnd, &ps);
         }
      break;
      case WM_CLOSE:
         DestroyWindow(hwnd);
      break;
      case WM_DESTROY:
         KillTimer(hwnd, idTimer1);
         
         DeleteObject(hbmBall);
         DeleteObject(hbmMask);
         PostQuitMessage(0);
      break;
      default:
         return DefWindowProc(hwnd, Message, wParam, lParam);
   }
   return 0;
}


int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
   LPSTR lpCmdLine, int nCmdShow)
{
   WNDCLASSEX WndClass;
   HWND hwnd;
   MSG Msg;

   g_hInst = hInstance;

   WndClass.cbSize        = sizeof(WNDCLASSEX);
   WndClass.style         = 0;
   WndClass.lpfnWndProc   = WndProc;
   WndClass.cbClsExtra    = 0;
   WndClass.cbWndExtra    = 0;
   WndClass.hInstance     = g_hInst;
   WndClass.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
   WndClass.hCursor       = LoadCursor(NULL, IDC_ARROW);
   WndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1);
   WndClass.lpszMenuName  = NULL;
   WndClass.lpszClassName = g_szClassName;
   WndClass.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);

   if(!RegisterClassEx(&WndClass))
   {
      MessageBox(0, "Window Registration Failed!", "Error!",
         MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
      return 0;
   }

   hwnd = CreateWindowEx(
      WS_EX_CLIENTEDGE,
      g_szClassName,
      "A Bitmap Program",
      WS_OVERLAPPEDWINDOW,
      CW_USEDEFAULT, CW_USEDEFAULT, 320, 240,
      NULL, NULL, g_hInst, NULL);

   if(hwnd == NULL)
   {
      MessageBox(0, "Window Creation Failed!", "Error!",
         MB_ICONEXCLAMATION | MB_OK | MB_SYSTEMMODAL);
      return 0;
   }

   ShowWindow(hwnd, nCmdShow);
   UpdateWindow(hwnd);

   while(GetMessage(&Msg, NULL, 0, 0))
   {
      TranslateMessage(&Msg);
      DispatchMessage(&Msg);
   }
   return Msg.wParam;
}
 
Back
Top