Page 1 of 2

Is C++ good place to start?

PostPosted: Sun May 20, 2012 8:04 pm
by xTractatorix
So yeah, i'm fairly new to hacking(i have already completed all the BASIC missions) but i find the realistic missions to be too challenging as i don't really now much about SQL data bases, and i only have rudimentary knowledge of programming. I most definatly do not want to become a script kiddie, i want to actually understand what i'm doing. So what i'm thinking of doing is learning really well c++, as i'm already familiar with how it works and is very broadly used, and then understanding SQL data-bases. Am i wrong in just dedicating my focus on c++ and SQL, or is there something that i should also learn? Oh yes one last thing i have heard about "hacking games" that are realistic but don't have any legal repercussions, if someone knows any good ones? :D

Re: Is C++ good place to start?

PostPosted: Sun May 20, 2012 9:48 pm
by centip3de
xTractatorix wrote:So yeah, i'm fairly new to hacking(i have already completed all the BASIC missions) but i find the realistic missions to be too challenging as i don't really now much about SQL data bases, and i only have rudimentary knowledge of programming. I most definatly do not want to become a script kiddie, i want to actually understand what i'm doing. So what i'm thinking of doing is learning really well c++, as i'm already familiar with how it works and is very broadly used, and then understanding SQL data-bases. Am i wrong in just dedicating my focus on c++ and SQL, or is there something that i should also learn? Oh yes one last thing i have heard about "hacking games" that are realistic but don't have any legal repercussions, if someone knows any good ones? :D


Eh? Generally you would want to go the other way around and learn SQL before C++ as the syntax is quite a bit easier. But, people who want to learn C++ first (EVERYONE should learn a local, compiled language, but most people here learn these last) are usually not all that interested in web based hacking (such as myself) and would prefer to hack on the local side (Vxing, reverse engineering, fuzzing, etc.) . But really the order isn't all that important.

Also, if you only have a rudimentary knowledge of programming, I would suggest learning an easier language such as Python first. C++ is really finicky and likes to complain a lot, but Python is quite a bit more accommodating. Then after you have your Python-fu up to speed, come back and learn C++.

Re: Is C++ good place to start?

PostPosted: Wed May 23, 2012 7:28 am
by tgoe
C++ is a terrible place to start. You don't teach kids to drive by putting 'em in an 18 wheeler... Start with asm and learn C. Rules of the road come first.

Re: Is C++ good place to start?

PostPosted: Wed May 23, 2012 1:48 pm
by centip3de
tgoe wrote:Start with asm and learn C. Rules of the road come first.


You also don't teach them how to drive without any explanation, or if there is any, by confusing them. Python first.

Re: Is C++ good place to start?

PostPosted: Thu May 24, 2012 10:48 pm
by tgoe

Re: Is C++ good place to start?

PostPosted: Sat May 26, 2012 2:55 am
by pretentious
tgoe wrote:C++ is a terrible place to start. You don't teach kids to drive by putting 'em in an 18 wheeler... Start with asm and learn C. Rules of the road come first.

I think the analogy would go the other way. High level languages are far easier for a beginer to get their head around
Code: Select all
>>> a = 5
>>>b = 2
>>>print a + b
7

from the small amouny of asm that i've managed to figure out, you're dealing with registers and memory addresses and stuff. I wouldn't even utter the work assembly to a newbie.

Re: Is C++ good place to start?

PostPosted: Sun May 27, 2012 5:22 pm
by centip3de
pretentious wrote:I think the analogy would go the other way. High level languages are far easier for a beginer to get their head around
Code: Select all
>>> a = 5
>>>b = 2
>>>print a + b
7

from the small amouny of asm that i've managed to figure out, you're dealing with registers and memory addresses and stuff. I wouldn't even utter the work assembly to a newbie.


I agree with this whole heartedly. But, it would be interesting to see a newbie who does learn ASM first. 10 bucks says that they would never touch a high level language.

Re: Is C++ good place to start?

PostPosted: Sun May 27, 2012 10:48 pm
by pretentious
centip3de wrote:it would be interesting to see a newbie who does learn ASM first. 10 bucks says that they would never touch a high level language.

I did the next best thing. C. Probably the issue i had was i took HTS's anti script kiddie ideology a little bit far and decided i needed to figure all the low level shit out myself and reinvented the wheel, the issue with that is, it's a great deal of work and offeres little return, which wasn't good for holding my interest as a newbie. Anyway to cut a long story short, after probably about 5 years playing with programming, i became comfortable with Java's GUI stuff about the same time as my follow uni mates who had zero experience leading up to the class.

Re: Is C++ good place to start?

PostPosted: Fri Jun 01, 2012 9:33 pm
by tgoe
The motivation is to be a hacker, not a [insert language] programmer. High level languages are indeed easier to start programming in but the flipside of that is a mountain of abstraction. Starting at the bare metal reveals how computers actually work. Getting a basic grasp of asm isn't that difficult and I'm not suggesting that anybody stay at that level for development. C adds fundamental abstractions that carry over to most other languages and C is *tiny*. The standard book on C++ is four times bigger than the standard C book. The idea here is to be able to see through abstraction -- to think about programs in a language-agnostic way. Any decent intro to a high-level language introduces relatively advanced topics that aren't really appropriate or useful for a complete beginner: classes, inheritance, objects, templates, decorators, polymorphism, operator overloading......

@pretentious
You've got to quantify "return" in some way. Low-level exploration probably won't help you learn a GUI kit any faster. It will make you a better programmer though and I'd bet you'd be the first and best guy in your class to exploit a buffer overflow or pick up a new language on your own.

Re: Is C++ good place to start?

PostPosted: Sat Jun 02, 2012 8:30 pm
by centip3de
tgoe wrote:The motivation is to be a hacker, not a [insert language] programmer. High level languages are indeed easier to start programming in but the flipside of that is a mountain of abstraction. Starting at the bare metal reveals how computers actually work. Getting a basic grasp of asm isn't that difficult and I'm not suggesting that anybody stay at that level for development. C adds fundamental abstractions that carry over to most other languages and C is *tiny*. The standard book on C++ is four times bigger than the standard C book. The idea here is to be able to see through abstraction -- to think about programs in a language-agnostic way. Any decent intro to a high-level language introduces relatively advanced topics that aren't really appropriate or useful for a complete beginner: classes, inheritance, objects, templates, decorators, polymorphism, operator overloading......


Personally, I would prefer to teach somebody/learn strings, ints, chars, pointers, and arrays before I learn about bits, bytes, nibbles, words, and double words. I will agree with you that there is a crap load of abstraction in modern programming languages, but in-order to understand some of the concepts, it requires you to look past the abstraction (pointers, allocating memory, binary trees, linked lists, and all that jazz). You don't learn multiplication before you learn addition and you sure as hell don't learn addition before you learn how to count. That is, you don't learn the advanced, more difficult to grasp subjects (such as many low-level ones) before you know the basics and have a firm grasp on them.