Windows Server Programming and Hacking

I have graduated from school with a Computer Networking degree and have found myself in a small town with little to no use for the degree. I am now wanting to move into putting programming under my belt as well. I have the drive and want, the problem is I don't have the direction. I have no clue where to go and how to learn programming. doing the work is not the problem, I have no objection about that at all, I cant figure out what to learn first, what to read first, what to focus on or how to do it all. Its like wanting to become a great Olympic swimmer and just being thrown in the pool for the first time to splash and thrash with no direction. I don't want any one to do the work for me but I need a mentor i guess you could say. Please let me know your thoughts on this. I am open to hearing anything, constructive preferably.
 
Every serious programmer should know C/C++ because they are used everywhere. On the other hand, they might not be the easiest languages to begin with. Script languages like Python or Ruby are gaining popularity and are supposedly easy and fast to program with. Java is also quite popular and easy. Or you could try something very different. For example, Haskell which is a functional programming language (C, C++, Python, Ruby, Java are all imperative languages).

It really depends on what you want to do. Just choose one language and stick with it (one I mentioned or something else). After you have learned one language it's easier to learn another. The Internet is full of tutorials you can read/watch to learn. Here's one for C++ http://www.cplusplus.com/doc/tutorial/
http://www.cplusplus.com/doc/tutorial/
The best way to learn a programming language is to start programming with it.
 
I have graduated from school with a Computer Networking degree and have found myself in a small town with little to no use for the degree.

I got into web design because it doesn’t matter how far “out in the sticks” you live when making html layouts but you are correct that location plays the main role for example there is little point to opening a computer shop if your town already has 5 of them… even if they are space cadets.

If you want to go down this path I'd start with;
1. Adobe Muse,
2. Then wordpress and Dreamweaver.

3. The next step is taking control of the server... prob hyper-v (free) is a key word when talking to a client about up-dateing their servers.

p.s. Knowing how to set up a business dns for a client’s server is really the main advantage my education gives me.
 
Thank you for the replys. I am interested in C/C++ and am looking into that. I hadn't thought about web designe though. I could do that. I have a few different versions of Visual Studio now and am going to start dabbiling with Basic and C++. Now I guess I need some people to work with. Get ideas for projects that I can work on to get a grasp and learn the languages. One of my part time bosses says that if I learn to take C++ programming and output to HTML/XML, he will give me a full time position. that wold be awesome, cause I would have time to do other things as well.
 
C/C++/C# are all C variants which will give you some sound basis from which to grow. In addition to learning the language you need to learn a lot of programming concepts and good practices. None of these come easily and will take a lot of time, commitment and determination. You will also need an IDE (Integrated Development Environment) in which to develop and test your programs. These are mostly seriously expensive but I use an excellent one called Unity wwhich you can get for free. There have been stacks of tutorials developed for it, many of them linked in with the package. Download Unity here:

http://unity3d.com/

You may use the IDE to develop for a range of platforms such as Android which has two major prerequisies called the Java Development Kit (JDK) and the Android Software Development Kit (SDK). These will need to be downloaded, installed and configured before Inatalling the IDE. Configuring the SDK will need to be done with some guidance as to which component you need to download - see this guide here:

https://developer.android.com/tools/help/sdk-manager.html
 
Sweet, the reception is really awesome. thank you all for your input and constructive insight. I remembered that I got copies of Visual Studio from my teachers at ITT, and I made a little Hello World program. I finished it and it seems to be working as intended. I am includeing the zip of the program VS directory in this post. I would like to see what you think about my first atempt to program 100% on my own and with out any other help, beyond Google. This one was made with Visual Studio 2005.
 

Attachments

  • Hello_World.zip
    93.8 KB · Views: 531
:angry_smile: I don't understand this. :angry_smile:

Code:
#include <iostream>
#include <string>
#include <conio.h>

using namespace std;

/// Prototype functions ///

string playerX();
string playerO();
void  gamePlay();

int main(){
///Start new game ///
  cout << "Welcome to Tic-Tac-Toe" << endl;
  cout << ".Press F0 to continue." << endl;
  _getch();
//  system("cls");

  playerX();
  playerO();

  gamePlay();

return 0;
}

string playerX(){
/// Declare and initialize ///
  string namex = "";

/// Get user names ///
  cout << "Player X: ";
  getline(cin, namex, '\n');

  return namex;
}

string playerO(){
/// Declare and initialize ///
  string nameo = "";

/// Get user names ///
  cout << "Player O: ";
  getline(cin, nameo, '\n');

  return nameo;
}

void gamePlay(){
  cout << playerX() << " and " << playerO();
}

Then when I run it I get this...

 
You will understand it after you've worked through a few C tutorials. It's a bit like declaring that you don't understand something written in German if you've never learned to speak the language. Try googling "C++ tutorial". You'll get masses of hits - find one that seems to suit you and works slowly through it. It is not an overnight process - youwill spend weeks learning the language and techniques needed to write programs.
 
Thank you for the confidence patcooke, but I should have been more clear on what I meant. Sorry been beating my head on the desk for a couple hours on this, kinda made me forget. I am going through a c++ book and doing well at it. I wrote this code as a start for a cmd Tic-Tac-Toe game. Though there is a problem in that I just cant see where it is. For what ever reason the code to get the names of the players runs twice. Also the second time it runs, it runs backwards.
 
playerX();
playerO();
gamePlay();
return 0;

Looks like It doesn't know what playerX and playerO is yet because the two strings are below this step in your code? Try putting the

string playerX(){ /// Declare and initialize /// string namex = "";
/// Get user names /// cout << "Player X: "; getline(cin, namex, '\n'); return namex; }
string playerO(){ /// Declare and initialize /// string nameo = "";
/// Get user names /// cout << "Player O: "; getline(cin, nameo, '\n'); return nameo; }

first so that the string happens BEFORE the gameplay/ return 0 and it should work... also

// system("cls");

perhaps this should be /// not //

p.s. just guessing because I can't see it run however you get an eye for code after years of looking at giberish :oops:... good luck with it mate.
 
As far as I know, this:

Code:
/// Prototype functions ///

string playerX();
string playerO();
void  gamePlay();

should allow me to put the functions after the call. Since being that I prototyped it before

Code:
* main().

With the

Code:
//system("cls");

That was just a comment out. From what I have gathered:

// or /* */ - makes the comment grey
/// or /** **/ - makes the comment an off greyish blue.

If you would like I can send you the source code to look at it yourself. I am using code::blocks. I know its not a huge ultra hacker/programmer IDE. Though it is working and helping me get my start and up and running.Just this one part is confusing the heck out of me.

PS: I commented out the system clear screen {system("cls")} for the screenshot. Hoping it would give a better idea of what was going on and make it easier to follow the code and what it looked like running.
 
Oh, so this:

Code:
void gamePlay(){
cout << playerX() << " and " << playerO();
}

gets and prints the names for playerX() and playerO(). I thought the cout only printed to the screen. Hmmm, looks like I will have to go back over that part again.
 
should allow me to put the functions after the call. Since being that I prototyped it before

It makes a "box" in the memory with a title of [playerX] + [PlayerO] but that is all... at this point there isn't any value in the box.

p.s. If you post a link to the full files or whatever tutorial then I'll take a look but it may take some time.
 
Oh, so this:

Code:
void gamePlay(){
cout << playerX() << " and " << playerO();
}

gets and prints the names for playerX() and playerO(). I thought the cout only printed to the screen. Hmmm, looks like I will have to go back over that part again.
playerX() and playerO() are functions. Every time you write playerX() or playerO() in your code the function is called and executed.

Just remove the lines
playerX();
playerO();
from your main function and you get the functionality you seem to want.
 
Sorry it took so long to reply, been a little busy.

@zirkoni, I see what you are saying. I was under the impression that:

Code:
cout << playerX() << " and " << playerO()

would print out the return from the playerX() and playerO() function with space and space, between them. While beating my head on my desk, another programmer came in and pointed out that I was misunderstanding function calls as opposed to variable calls. After assigning global variables to the functions, then calling those variable, it let me print out the return from the functions any where I wanted to. So now the new code looks like:

Code:
#include "includeFile.h"

using namespace std;

/// Prototype functions ///

string playerX();
string playerO();
void gamePlay(string xPlayer, string oPlayer);

int main(){
///Start new game ///
cout << "Welcome to Tic-Tac-Toe" << endl;
cout << ".Press F0 to continue." << endl;
_getch();
system("cls");

string xPlayer = playerX();
string oPlayer = playerO();

playerX();
playerO();

gamePlay(xPlayer, oPlayer);

return 0;
}

string playerX(){
/// Declare and initialize ///
string name = "";

/// Get user names ///
cout << "Player X: ";
getline(cin, name, '\n');

return name;
}

string playerO(){
/// Declare and initialize ///
string name = "";

/// Get user names ///
cout << "Player O: ";
getline(cin, name, '\n');

return name;
}

void gamePlay(string xPlayer, string oPlayer){
cout << xPlayer << " and " << oPlayerO;
}

I know this is such newbie coding, but this is almost all learned out of just reading a book. Coming from a guy that never completed an assignment in school before getting my degree, that is really good. It is slow going, because my main job closed, and have been looking for a new job since. Even though, I am really enjoying this and hope to make it a permanent part of my career. Though I am so sure you wanted to hear that. Any who, thank you so much for your help. Looking forward to more discussions in the future.
 
assigning global variables to the functions
fyi globals can cause issues on the internet (because a tip web server may have 1000s of sites all useing the same code) and are being fazed out for local variables... its not a big problem with games but you need to be aware of it if your code goes on the networks.

Good luck with the job hunting mate!
 
@ussnorway

(O_O) I am glad you mentioned that. Thank you for the heads up. I am looking at all possible ways to do things and keeping my mind open to all possibilities. So I shouldn't have a problem kicking the global variable habit. lOl Thank you for the good luck. Applied at a place for an IT job. I know a few people that can give me a little bit of a nudge and good word, so I hope I get the job. We will see. (^_^)
 
C/C++/C# are all C variants which will give you some sound basis from which to grow. In addition to learning the language you need to learn a lot of programming concepts and good practices. None of these come easily and will take a lot of time, commitment and determination. You will also need an IDE (Integrated Development Environment) in which to develop and test your programs. These are mostly seriously expensive but I use an excellent one called Unity wwhich you can get for free. There have been stacks of tutorials developed for it, many of them linked in with the package. Download Unity here:

Unity - Game Engine

You may use the IDE to develop for a range of platforms such as Android which has two major prerequisies called the Java Development Kit (JDK) and the Android Software Development Kit (SDK). These will need to be downloaded, installed and configured before Inatalling the IDE. Configuring the SDK will need to be done with some guidance as to which component you need to download - see this guide here:

SDK Manager | Android Developers

C# is not a variant of C. C# is a managed language in which is Microsoft's own version of Java after some dispute about the language. Syntax is similar but C++ branched off of C, and C# branched off of Java. Technically they are all their own lanauges at this point in time as there are discrepancies between C and C++, as well as C# and Java that would reveal conflicts if either of them were to be merged into a single language somehow.

Looks like It doesn't know what playerX and playerO is yet because the two strings are below this step in your code? Try putting the



first so that the string happens BEFORE the gameplay/ return 0 and it should work... also



perhaps this should be /// not //

p.s. just guessing because I can't see it run however you get an eye for code after years of looking at giberish :oops:... good luck with it mate.

A comment in C++ is done with '//' so it was originally correct syntax.

----

As for my personal experience with C++, I have a few recommendations and remarks to make about the latest code.

1. 'using namespace std' is not considered good practice because of a few reasons. First however, it defeats the point of namespaces in terms of isolation. Additionally, it pollutes the global namespace which promotes name conflicts.

2. conio.h is not a standard header, and because of that, I wouldn't recommend that you use it

3. The effects of system() are undefined and platform dependent as well. The input string is not encrypted either, which allows for your program to be easily exploited from the standpoint of anything malicious. Most viruses will use other methods however anyways to achieve things, but that doesn't mean the option is not available to an attacker.

4. PlayerX() and PlayerO() functions return a copy of a temporary std::basic_string<char> object. In the first 2 calls you store the return value, in the 3rd and 4th calls to the functions from main() you don't do anything with them, which makes the function call useless:
Code:
string xPlayer = playerX();
string oPlayer = playerO();

// Here
playerX();
playerO();

Your gameplay function also passes them as copies too just to display them. Once you learn about references and const-correctness you'll see how this can be improved even further.

NOTE: I would highly not recommend that you use strings for player identification though. You may use it as a display variable, but that's all the strings should be used for. For identifying player 1 vs player 2. You might want to use strongly typed enum instead. Additionally, when checking for whether it's player 1 or player 2's turn, you don't have the internal string character comparison happening in the background with the overloaded == operator or comparison functions.
 
Last edited:
Back
Top