Beginner needing advice?
My PC Hell Forum
November 21, 2008, 10:03:51 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Moving to New Location Soon! Watch out for notification. 14th Dec 2007.
 
   Home   Help Search Calendar Login Register  
Pages: [1] 2
  Print  
Author Topic: Beginner needing advice?  (Read 4868 times)
Drummerboy
New FixmyXP Member
*
Posts: 4


View Profile
« on: March 03, 2006, 08:19:33 PM »

Hello, this site is great and I have already found all sorts of good information that I can use.  I do have a question about getting into programming and using code etc.  I have tried some of the links listed in other parts of the forum, but I can't seem to find exactly what I need.  What I'm looking for is a website, or even a book that will help me in learning this type of stuff.  Please though, I need something that starts at step one i.e.  Also, are there any programs that I may need such as visual basic? (I've seen this related to programming, not sure what it does) I don't know anything about this area of computers.  I know a lot about other topics, but I've gotten to where code and what not is my next step.  Any help you could provide me would be greatly appreciated.
Logged
Squeezebox
Administrator
******
Posts: 2756



View Profile
« Reply #1 on: March 04, 2006, 02:02:31 AM »

It will depend on what it is you want to do with programming, there are many programming languages. Such as:
ASP 3.0    
Assembly    
C    
C++    
Cobol    
ColdFusion    
Delphi    
HTML    
J2EE    
Java    
JavaScript    
Perl    
PHP    
Python    
QBasic    
SQL    
Visual Basic 6    
XML

Use Google to search for tutorials on any one of the above and you will find several to choose from. You could also start by looking here:

http://www.programmingtutorials.com/  

Dave
Logged

Cache
Rising Star
***
Posts: 380



View Profile
« Reply #2 on: March 04, 2006, 03:31:42 PM »

Technically, some of the above list are actually scripting languages, not programming languages.

I can link you to most resources you will need if you choose C++, which I highly recommend. For C++ all you need is a compiler and a brain. If you do choose C++ then post back with any questions you might have and I'll see what I can do.
Logged
Squeezebox
Administrator
******
Posts: 2756



View Profile
« Reply #3 on: March 04, 2006, 05:38:59 PM »

Cache,

I realised the list embraced more than programming, it was the list taken from the programing tutorials site that provided the link to.

It was also recommended to get to grips with C before learning C++
What do you think of that?

Dave
Logged

Strum
Royal Advisor
*****
Posts: 1791


Gabba Gabba Hey!


View Profile WWW
« Reply #4 on: March 04, 2006, 06:05:16 PM »

Umm, this is interesting. I would aslo like to learn some scripting/programming to tweak a few windows applications if thats possible. I downloaded a progrem called Dev-c++4, but I'm really staring into a hole with it. I managed to make a blank box so far. I'll check out some of the links to tutorials above and see if I can figure anything out. Cheers.

Drummerboy  

If its website building, heres a free site builder with a good help page,
http://www.nvu.com/download.html
and scroll down to...

nvu-1.0-win32-installer-full.exe - Windows full installer

You can drag and drop pictures etc into it, type your text, add tables etc and then view the source code which will give you an idea of how the page is being put together in the background. It is tabbed which is handy for toggling between the source and the webpage...
I also bought a book by Mike McGrath (HTML in easy steps, in full colour) £11:00 and found it invaluable. Its full of screenshots which was very handy. Hope this helps.
Logged

  This is my shadows shadow...
Strum
Royal Advisor
*****
Posts: 1791


Gabba Gabba Hey!


View Profile WWW
« Reply #5 on: March 04, 2006, 07:18:14 PM »

RE: It was also recommended to get to grips with C before learning C++

What I can't seem to find out is if I need a C compiler or just notepad? and can you recommend one if so, or are programs etc exclusively made in DOS?
Also I made something simple in notepad and was told to save it as a .c file but when I try to open it, it just opens in the  dev-c++ program. Should it not be saved as an .exe file? I know these are probably inane questions but I'm trying to understand a couple of things before I even get to the very basics. Appreciate any help thanks.  
Logged

  This is my shadows shadow...
Cache
Rising Star
***
Posts: 380



View Profile
« Reply #6 on: March 04, 2006, 07:59:43 PM »

Quote from: Squeezebox
It was also recommended to get to grips with C before learning C++
What do you think of that?

Dave

This was almost certainly the advice of someone who uses C++ as an extended C, rather than a language unto it's self (which it is). You absolutely do not need to learn C before C++.

See the following link for "Bjarne Stroustrup"'s (the creator of C++) somewhat involved view on the matter. Particularly the "I don't know C or C++, should I learn C first?" section:

http://public.research.att.com/~bs/learn.html

Quote from: Strum
I downloaded a progrem called Dev-c++4

An excellent choice there, Strum. That's the IDE I use too.

Quote from: Strum
What I can't seem to find out is if I need a C compiler or just notepad? and can you recommend one if so, or are programs etc exclusively made in DOS?
Also I made something simple in notepad and was told to save it as a .c file but when I try to open it, it just opens in the dev-c++ program. Should it not be saved as an .exe file?


What are you trying to code with, C or C++?
EDIT: And could you post the code too, please.
Logged
Strum
Royal Advisor
*****
Posts: 1791


Gabba Gabba Hey!


View Profile WWW
« Reply #7 on: March 04, 2006, 09:19:55 PM »

ok I read that...none the wiser to be truthful. I have now learned that this is way over my head but I am still interested. I read that tweaking programs was possible and thats what got me into it. For instance, I work with a lot of images and the search box is just way too small and I reckon when somebody wants to open a file they should have the option of a full page rather then the small box we get now to browse through. I would like that search box to be like a folder choice.

Another one is that if I export a file from photoshop or whatever program I have to go through the save options and select, say, .jpg...and then go to save the next image but I have to go and scroll looking for .jpg again. It should stay at my .jpg selection until I change it myself instead of always defaulting back to the programs file extension.

Think I'll ever get a job with the big BGates?

Cache the code is either a sample file in the dev-c++ program or I copied/pasted it from a tutorial somewhere off the net...
I'm quite sure its the most basic code and I just wanted to see if I could do anything with it but that was when I started to look into the outer limits...
-------------------------------------------------------------

The code...

#include <windows.h>

/* Declare Windows procedure */
LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM);
/* Make the class name into a global variable */
char szClassName[ ] = "WindowsApp";
int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil)

{
    HWND hwnd;               /* This is the handle for our window */
    MSG messages;            /* Here messages to the application are saved */
    WNDCLASSEX wincl;        /* Data structure for the windowclass */

    /* The Window structure */
    wincl.hInstance = hThisInstance;
    wincl.lpszClassName = szClassName;
    wincl.lpfnWndProc = WindowProcedure;      /* This function is called by windows */
    wincl.style = CS_DBLCLKS;                 /* Catch double-clicks */
    wincl.cbSize = sizeof(WNDCLASSEX);

    /* Use default icon and mouse-pointer */
    wincl.hIcon = LoadIcon(NULL, IDI_APPLICATION);
    wincl.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
    wincl.hCursor = LoadCursor(NULL, IDC_ARROW);
    wincl.lpszMenuName = NULL; /* No menu */
    wincl.cbClsExtra = 0;                      /* No extra bytes after the window class */
    wincl.cbWndExtra = 0;                      /* structure or the window instance */
    /* Use light-gray as the background of the window */
    wincl.hbrBackground = (HBRUSH) GetStockObject(LTGRAY_BRUSH);

    /* Register the window class, if fail quit the program */
    if(!RegisterClassEx(&wincl)) return 0;

    /* The class is registered, let's create the program*/
    hwnd = CreateWindowEx(
           0,                   /* Extended possibilites for variation */
           szClassName,         /* Classname */
           "Windows App",         /* New Project */
           WS_OVERLAPPEDWINDOW, /* default window */
           CW_USEDEFAULT,       /* Windows decides the position */
           CW_USEDEFAULT,       /* center */
           544,                 /* The programs width */
           375,                 /* and height in pixels */
           HWND_DESKTOP,        /* The window is a child-window to desktop */
      /*
   Name:
   Author:
   Description: First application
   Date: 02/02/2006

*/
02/02/06 01:42int main()
{

   return 0;
}
#include <windows.h>

int STDCALL
WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
{

}
MessageBox (NULL, "Hi?" , "How are you!", 0 + MB_ICONEXCLAMATION + MB_HELP);     NULL,                /* No menu */
           hThisInstance,       /* Program Instance handler */
           NULL                 /* No Window Creation data */
           );

    /* Make the window visible on the screen */
    ShowWindow(hwnd, nFunsterStil);
    /* Run the message loop. It will run until GetMessage( ) returns 0 */
    while(GetMessage(&messages, NULL, 0, 0))
    {
           /* Translate virtual-key messages into character messages */
           TranslateMessage(&messages);
           /* Send message to WindowProcedure */
           DispatchMessage(&messages);
    }

    /* The program return-value is 0 - The value that PostQuitMessage( ) gave */
    return messages.wParam;
}

/* This function is called by the Windows function DispatchMessage( ) */
LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)                  /* handle the messages */
    {
           case WM_DESTROY:
           PostQuitMessage(0);        /* send a WM_QUIT to the message queue */
           break;
           default:                   /* for messages that we don't deal with */
           return DefWindowProc(hwnd, message, wParam, lParam);
    }
    return 0;
}
Logged

  This is my shadows shadow...
Cache
Rising Star
***
Posts: 380



View Profile
« Reply #8 on: March 04, 2006, 10:03:52 PM »

Looks like you've jumped in at the deep end. The code you posted above is at the more advanced end of the scale -- it uses the Win32 API. Actually, for some reason it's three programs in one, and has plain text dates in without being in comment blocks.

You should be starting off with console applications. For Dev-C++ go to File-->New-->Project-->Console Application-->Save to it's own folder--> then you get the basic template needed to start coding. Once you've coded somthing: click on the 'Compile & Run' button near the top left (looks like coloured squares). That will compile the code into an .exe file and run it for you.

Here is an example of the kind of code you should be starting with:

Code:
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    cout << "Hello World!" << endl;
   
    system("PAUSE");
    return 0;
}


As for being able to tweak other peoples programs: that would probably be done with a resource hacker and require knowledge of the Win32 API. Plus it would be illegal unless the program is open-source, in which case you could just modify the actual source code and re-compile it.

If you want to get into C++ then I suggest the following tutorial. It starts you from the bottom up and assumes no previous programming knowledge on your part -- very, very good tutorial IMHO:

http://www.cplusplus.com/doc/tutorial/
Logged
Strum
Royal Advisor
*****
Posts: 1791


Gabba Gabba Hey!


View Profile WWW
« Reply #9 on: March 04, 2006, 10:34:51 PM »

Quote from: Cache
Looks like you've jumped in at the deep end.

As for being able to tweak other peoples programs:


Thats great stuff for a starter like myself Cache. I'm crap at teaching myself but take it in when taught, if you know what I mean...
I'll read a bit more first and try to re-surface from the deep end...

Tweak other peoples programs was not what I meant. I thought, (must have mis-read)  that it was possible to tweak windows programs from within to suit ones own needs? no?

Thanks for all of that.
Logged

  This is my shadows shadow...
Drummerboy
New FixmyXP Member
*
Posts: 4


View Profile
« Reply #10 on: March 05, 2006, 10:48:36 PM »

thanks cache for all the info, and yes.  It seems like C++ is what I would like to learn for a start.  What do you mean when you say a compiler?  Also, do you think you could give some tutorials that are rather easy, and allow me to get a little experience before tackling anything "in the deep end".  

Thanks for all the info.
Logged
Cache
Rising Star
***
Posts: 380



View Profile
« Reply #11 on: March 06, 2006, 08:24:03 PM »

Quote from: Strum
I thought, (must have mis-read)  that it was possible to tweak windows programs from within to suit ones own needs? no?


Well yes and no. You can change a lot of things in Windows, but not just anything anyway you choose. If you can find a link where you got that info I could probably give you a more appropriate answer.
Logged
Cache
Rising Star
***
Posts: 380



View Profile
« Reply #12 on: March 06, 2006, 08:43:14 PM »

Quote from: Drummerboy
thanks cache for all the info, and yes.  It seems like C++ is what I would like to learn for a start.  What do you mean when you say a compiler?  Also, do you think you could give some tutorials that are rather easy, and allow me to get a little experience before tackling anything "in the deep end".  

Thanks for all the info.


A compiler is software that takes your code and (basically) turns it into executable binary data: an .exe file. You will need one for programming with C++. My suggestion for a compiler would be Dev-C++. It's actually an IDE (Integrated Development Environment) that comes with a compiler.

You can download it form this link:
http://www.bloodshed.net/devcpp.html


As for tutorials, the link in Squeezebox' post above has plenty. I personally suggest this:
http://www.cplusplus.com/doc/tutorial/

There is also a free an online version of the book "Teach Yourself C++ in 21 Days, Second Edition" at the link below. I haven't read it though, so I can't say if it's any good or not:

http://newdata.box.sk/bx/c/
Logged
Drummerboy
New FixmyXP Member
*
Posts: 4


View Profile
« Reply #13 on: March 07, 2006, 08:48:23 PM »

Thanks again cache for all the info.  Man this site is great.
Logged
Strum
Royal Advisor
*****
Posts: 1791


Gabba Gabba Hey!


View Profile WWW
« Reply #14 on: March 07, 2006, 09:29:08 PM »

Quote from: Cache
Quote from: Strum
I thought, (must have mis-read)  that it was possible to tweak windows programs from within to suit ones own needs? no?


Well yes and no. You can change a lot of things in Windows, but not just anything anyway you choose. If you can find a link where you got that info I could probably give you a more appropriate answer.


I have no idea Cache where I read that. I have a sneaking suspicion that it may have been your good self in a thread or post somewhere?
I was niáve enough to think that one could change something like windows that has no maximise or stretch function. In my case the open in / save in boxes, would be a bit more help when searching for files.
Thanks.
Logged

  This is my shadows shadow...
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!