• Forum
  • Lounge
  • I've been asking about a second language

 
I've been asking about a second language for a while now , still looking

Hey guys ,

I've been searching and trying to find some answers for this , I'm on my second semester in cs and we took c++ as the first language , Until now I've leared conditions/loops/structures and classes"basics of classes"/pointers/arrays and vectors , also functions and some other things. I'm still learning , since this is the last semester that involves c++.

I've been thinking about learning php and html , to be honest for now php and html won't help me in my studies and i said why not leave it for maybe next year.

I've searched for a subject that I love " when I was little I loved reading about hacking and stuff but since it's not supported " security " and there isn't posts on my main language before , so learning it was hard for me , but now since I learned English and at least I can understand English books I thought " hey , why not give it a second chance " , so I searched for topics and books , and some of them said that python language is good when it comes to hacking , I even found a book called " Hacking Secret Ciphers With Python " which teach you hacking with python.

So what do you guys think , should I learn python and then learn hacking and security ? or you guys have better ideas than this.

Also on my 3rd semester they will teach me assembly language is it easy ? to learn it aside with what I want to learn for now ? or should I give it more time and focus on it ?
What do you guys think ?
python is great for small little projects and is a great ummm... preview i guess into a subject. for example you can learn the basics of socket programming with the socket module. it also has great documentation, is easy to learn, and seems to have a module for everything
So python is a great start if I wanted to learn hacking and security ?
"Learn hacking"

*facepalm"
It might be a good idea if you share your thoughts instead of making fun of others.

Anyways thanks for your post.
Sorry, but I just hate when people say that. It seems to be the mantra of young programmers. All skills seem to have one re-occurring and annoying mantra and this is the one for programming unfortunately.

As for a second language, you can't really go wrong with python. It's used fairly widely, it's relatively easy to pick up and a powerful general purpose programming language.

I thought programming's mantra was "the right tool for the job, even though 90% of commonly used languages are general-purpose and therefore equally applicable to more-or-less every job and thus simply a matter of preference".
I thought programming's mantra was "the right tool for the job, even though 90% of commonly used languages are general-purpose and therefore equally applicable to more-or-less every job and thus simply a matter of preference".


It's true that 90% of the languages can handle most tasks, though each of them have niche aspects that they usually specialize in. Some things much better then others some do things much worse.


As for the original question I would agree you can't really go wrong with Python and it is quite widely used in security (Specifically pen testing or offense security). It is invaluable to be able to write your own scripts for your particular situation instead of using premade tools. Also you can be pretty sure that it will be preinstalled on almost every *nix platform and mac platform (Why are you behind on this MS ;p).

A decent book about pen testing and python is "Gray Hat Python". If you are looking for a book to teach you python it isn't for you and it doesn't do a good job at that. Also if you are looking for a book that teaches you about pen testing and offensive security in general the book also isn't for you.

But if you want to see some decent scripts built around pen testing with python it might be worth your time. It's not a A class book by any means but there really isn't much else out there in regards to security script writing with python.
some other great languages: php + html5, cgi (which isnt a language. but the theories of it is cool to learn), brainf*ck (for keeping your mind sharp), tbf (for when brainf*ck doesnt feel like c), julia (havent tested it but it looks useful), c, basics of assembly, java, and javascript
Thanks guys for your posts:

@CodeGazer thanks for posting first , I've searched for that book that you gave me but the reviews weren't that good , but I think I should pick a book that teaches you python first , before getting into such books.

@Little Bobby Tables I'm already learning c++ and c isn't that different , and about php/html and css I think I'll learn it later , because I won't use such languages very often " for now " , also java I think I'll take a class about it maybe in 6th semester.

So what do you guys think is the best book for learning python ? I searched for some and found that the books were even heavier than c++ books , is python really takes that long to learn ? most c++ books that I've read is no more than 1500 pages which is heavy , but I think it's worth it since c++ teaches you lots of things.
python is very easy to learn. i recommend just googling python tutorial. also, c and c++ are not the same at all. for the longest time i wrote nothing but c++, then i wrote some c, and it went horribly because i treated it like c++
@ Little Bobby Tables , thanks for your post , I don't think that I need to learn c over c++ , or learning c would be easy after learning c++ I think..

anyways if you know a good book that is up-to-date for learning python please post the name.
Last edited on
Personally if you already know C++, Python will be very easy to pick up and most likely any beginner book will move far to slowly for you. It will teach you basically the same exact things you learned with C++. Stuff like Variables, functions, classes, OOP, loops, conditionals, ect.

I would say your best bet is to go to http://www.codecademy.com/tracks/python and do the Python track. It should be more then enough to get yourself a grounding in Python and you should be able to pick up the rest by yourself after that.

You mainly just have to concentrate on the differences in Python and C++. Stuff like Dynamic Variables, First Class Functions, Functional Programming concepts like List Comprehension, syntax differences (You will need to get used to the whitespace delimitation and it's explicit use of the self keyword), and of course doing things the "Python Way" instead of the "C++ Way".

Python is a very easy language to pick up specially if you have previous experience with another language. So in my opinion it would be money wasted to buy a book to teach you the basics of python. Though if you want to dig into the more advance subjects of python there are plenty of good books out there would just need to know what you are interested in.
Topic archived. No new replies allowed.