Author Topic: Fucking Stupid Coding PDF's  (Read 2524 times)

0 Members and 3 Guests are viewing this topic.

Offline lucid

  • #Underground
  • Titan
  • **
  • Posts: 2683
  • Cookies: 243
  • psychonaut
    • View Profile
Fucking Stupid Coding PDF's
« on: March 09, 2014, 03:31:57 am »
Let me start by saying I hate nothing more in the world then trying to learn a coding language by reading a PDF. It's slow and inefficient and I don't fucking learn anything. All they ever do is just show you a thousand examples for you to copy and see the result, which, they show you in the book. It sucks. I hate it. Goddamnit.

But, you need to learn the very basics somehow and I don't really see another way. People say that you should just start a tiny project and that's the best way to learn. Well, that doesn't exactly work if you know absolutely nothing about the language constructs and data types and whatnot. So, seems you have to learn it from a fucking book. The other thing I hate, is that there seems to be no such fucking thing as a coding book that actually teaches you the up to date language. It's always a book written in the early 2000's which is 10 versions old. Normally it's not a huge problem, but I think I might be having that problem right now. Here's an example. I'm reading the "Learning Ruby" pdf to get the very basic basics down before I start just trying to code something. Now, this little snippet:

Code: [Select]
#!/usr/bin/ruby

lang = :fr

dog = case lang
  when :en: "dog"
  when :es: "perro"
  when :fr: "chien"
  else      "dog"
end

Is taken from the book. I tried making it my own at first but got unexpected errors, so I just copy pasted directly as a test and sure enough, it still didn't work. I get this error:

Code: [Select]
case.rb:6: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n'
  when :en: "dog"
           ^
case.rb:7: syntax error, unexpected keyword_when, expecting end-of-input
  when :es: "perro"
Ruby 2.1 doesn't seem to like :'s. I've gotten the same error when trying to do this:

Code: [Select]

if lang == :en: puts 'dog'
    elsif lang == :es: print 'perro'
....
So how the fuck am I supposed to learn a language, from a pdf, which is incorrect? It's such a fucking unfun and poor/slow learning process. Makes me hate coding.

EDIT: Oh, and as a side note, it really fucking sucks that the vast majority of resources out there for Ruby are strictly Ruby on Rails. That's it. That's the only fucking reason anyone wants to learn Ruby ever. Ruby on Rails. I wanted to learn Ruby because I wanted a fairly simple general purpose scripting language that wasn't Python. I generally dislike web dev. I just want to learn fucking Ruby.
« Last Edit: March 09, 2014, 03:34:56 am by lucid »
"Hacking is at least as much about ideas as about computers and technology. We use our skills to open doors that should never have been shut. We open these doors not only for our own benefit but for the benefit of others, too." - Brian the Hacker

Quote
15:04  @Phage : I'm bored of Python

Offline iTpHo3NiX

  • EZ's Pirate Captain
  • Administrator
  • Titan
  • *
  • Posts: 2920
  • Cookies: 328
    • View Profile
    • EvilZone
[09:27] (+lenoch) iTpHo3NiX can even manipulate me to suck dick
[09:27] (+lenoch) oh no that's voluntary
[09:27] (+lenoch) sorry

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Fucking Stupid Coding PDF's
« Reply #2 on: March 09, 2014, 10:26:17 am »
I feel you man. That's why I never learned programming from books. Only used them once or twice for reference... otherwise those are useless to me.
They don't release new books as often simply because it wouldn't become the best seller, with all the information you can gather just by reading on the internet. They released coding books back in the day when internet wasn't so popular and stuff...

Offline Phage

  • VIP
  • Overlord
  • *
  • Posts: 1280
  • Cookies: 120
    • View Profile
Re: Fucking Stupid Coding PDF's
« Reply #3 on: March 09, 2014, 03:03:52 pm »
I'll have to say that I've never really used a book to learn anything programming related. When you know how functions, classes, arrays/lists, variables etc. works it's pretty easy migrating to a new language; at least on the basic level.

The way I'm learning programming is in fact by doing projects. I usually read the official docs and Google around for answers. If nothing happens I'm lucky enough to have people around me which can help :)
"Ruby devs do, in fact, get all the girls. No girl wants a python, but EVERY girl wants rubies" - connection

"It always takes longer than you expect, even when you take into account Hofstadter’s Law."

Z3R0

  • Guest
Re: Fucking Stupid Coding PDF's
« Reply #4 on: March 09, 2014, 03:40:40 pm »
The way I'm learning programming is in fact by doing projects. I usually read the official docs and Google around for answers. If nothing happens I'm lucky enough to have people around me which can help :)
lucid, THIS!!! I can confirm, this is in fact, how it's done. Before I started coding for w/e the hell I code for these days, I programmed really stupid shit, like virtual slot machines, disabling certain functions of a system, then re-enabling them without any keyboard interaction. Think of really easy tasks that you do while on your computer, and make a program that will do the same thing, so then all you have to do is double-click an icon to get the same action. I think it's safe to say a lot of us started programming in this manner. Don't give up!

Offline vezzy

  • Royal Highness
  • ****
  • Posts: 771
  • Cookies: 172
    • View Profile
Re: Fucking Stupid Coding PDF's
« Reply #5 on: March 09, 2014, 05:48:44 pm »
When you know how functions, classes, arrays/lists, variables etc. works it's pretty easy migrating to a new language; at least on the basic level.

Woe is you, clearly you have never stepped out of the shackles of imperative and procedural languages.
Quote from: Dippy hippy
Just brushing though. I will be semi active mainly came to find a HQ botnet, like THOR or just any p2p botnet

Offline lucid

  • #Underground
  • Titan
  • **
  • Posts: 2683
  • Cookies: 243
  • psychonaut
    • View Profile
Re: Fucking Stupid Coding PDF's
« Reply #6 on: March 09, 2014, 06:26:43 pm »
I know you guys are right. But if I don't even know the very basics of a language then how do I start writing even small little projects in it? You have to learn the very basic basics somewhere right?
"Hacking is at least as much about ideas as about computers and technology. We use our skills to open doors that should never have been shut. We open these doors not only for our own benefit but for the benefit of others, too." - Brian the Hacker

Quote
15:04  @Phage : I'm bored of Python

Offline Uriah

  • Sir
  • ***
  • Posts: 454
  • Cookies: 42
  • άξονας
    • View Profile
Re: Fucking Stupid Coding PDF's
« Reply #7 on: March 09, 2014, 10:50:41 pm »
I totally understand how you feel. When I started on project infinity I pretty much knew nothing, and was getting really irritated at how difficult everything was to learn even when going through a project. Running into error and bug after error and bug, endless research...but it looks like that's just how it is. After a few months of pushing through though, I ended up getting really good. And things just get easier from there.

Not sure if you remember, but when you were helping with project infinity, everytime you left and came back everyone was far better than they had been when we last talked. Same thing keeps happening. Just keep coding :)

And I'm going to be honest with you: maybe you should stop switching languages so much? You keep starting over, it feels like. You need to stay dedicated and push through with one, and then learning new languages afterwards will be easier because you understand how to think like a programmer. Remember, its more about how to think than how to use the language; but if you keep switching around I fear that youll never get past the basic stuff. You've been at this for a while, bro.

Unfortunately I dont know much ruby, so I cant help you out as much as I would like to, but if you ever have any questions or need help on a project or solving a certain problem hit me up on skype. Im sure I can still be helpful.


Lastly, this may not work for you, but my favorite way of learning was just starting a project and constantly googling everything I didnt know. Even the basics. (But im sure you know most of the real basics for imperative languages, right? Creating variables, loops, arrays, and functions? If not, google each of those things for ruby and there you go.)Eventually the stuff just gets into your head. Stack overflow and documentation are always excellent links to follow. Even still I make a ridiculous number of searches each day. It can be irritating to keep running into so many walls, but eventually breaking through them becomes second nature.

I hope that helps a bit....good luck!
« Last Edit: March 09, 2014, 10:52:58 pm by Uriah »

Offline frog

  • Knight
  • **
  • Posts: 232
  • Cookies: 16
    • View Profile
Re: Fucking Stupid Coding PDF's
« Reply #8 on: March 10, 2014, 12:22:05 am »
I know you guys are right. But if I don't even know the very basics of a language then how do I start writing even small little projects in it? You have to learn the very basic basics somewhere right?

I like to start with small ideas, and work my way up to more complex challenges. Example: start with a program that takes a file with nmap output and go through and extract ip addresses. That would be an example of a small program.

Take it a step further and write a program that extracts the IP's from the nmap output and then tries to connect to all the hosts with an open port. If they are telnet servers, have ruby try default user/pass combos on every IP while storing the IP's in a dynamic array.

You get to do Sockets, File reading, data manipulation/regex functions, and you could even be clever and start processes yourself(like an nmap scan) and use IO redirection to get the output to go where you want.

Most languages offer all the same facilities, they are just used differently. File manipulation, IO redirection, Sockets, http and other object-oriented libraries will exist it's just a matter of learning how to use them.

Offline Uriah

  • Sir
  • ***
  • Posts: 454
  • Cookies: 42
  • άξονας
    • View Profile
Re: Fucking Stupid Coding PDF's
« Reply #9 on: March 10, 2014, 12:34:24 am »
Good one Frog.

It also helps to work on projects that your passionate about, because you dont lose motivation.

And I forgot to say in my last post that it's also nice to have someone who you know to ask some questions to here and there. Learning programming all alone can be frustrating for some people, especially when you have aching questions you want answered but cant find the answer anywhere. Forums are nice, but it's also nice to just ask a friend sometimes, and get a quick response. Not sure if you know anyone ruby programmers like that though.

Maybe try starting a small project on EZ so you have other people to work with?


Oh, and another thing you can do is contribute to open source on a site like Github! That's useful in more ways than one, and you get to see how other people do things.
« Last Edit: March 10, 2014, 12:35:28 am by Uriah »

Offline frog

  • Knight
  • **
  • Posts: 232
  • Cookies: 16
    • View Profile
Re: Fucking Stupid Coding PDF's
« Reply #10 on: March 10, 2014, 02:53:44 am »
Maybe try starting a small project on EZ so you have other people to work with?

No doubt. I think with the right idea there would be plenty of opportunity for contribution. Maybe a swiss-army-knife of tools(I know they call netcat the swiss-army-knife butt-fuck it).

As an example: a small-mid sized suite of protocol manipulation tools, modular sniffer, and some recon tools. Arp spoofer, mac changer, sniffer for different protocols, arp request lan scanner, and some stuff for ipv6 as well.

I know all of these tools exist already(THC ftw), but I think it would be fun to pack everything into an all-in-one script or GUI. It would be good practice for all of us; plus there would be opportunity to learn and plenty of different aspects of the project for people to contribute to.

Just a thought.

Offline iTpHo3NiX

  • EZ's Pirate Captain
  • Administrator
  • Titan
  • *
  • Posts: 2920
  • Cookies: 328
    • View Profile
    • EvilZone
Re: Fucking Stupid Coding PDF's
« Reply #11 on: March 10, 2014, 03:22:18 am »
No doubt. I think with the right idea there would be plenty of opportunity for contribution. Maybe a swiss-army-knife of tools(I know they call netcat the swiss-army-knife butt-fuck it).

As an example: a small-mid sized suite of protocol manipulation tools, modular sniffer, and some recon tools. Arp spoofer, mac changer, sniffer for different protocols, arp request lan scanner, and some stuff for ipv6 as well.

I know all of these tools exist already(THC ftw), but I think it would be fun to pack everything into an all-in-one script or GUI. It would be good practice for all of us; plus there would be opportunity to learn and plenty of different aspects of the project for people to contribute to.

Just a thought.

Nettools ( http://users.telenet.be/ahmadi/nettools.htm )

Anyways some good ideas to code your own that's not over bloated lol
[09:27] (+lenoch) iTpHo3NiX can even manipulate me to suck dick
[09:27] (+lenoch) oh no that's voluntary
[09:27] (+lenoch) sorry

Offline frog

  • Knight
  • **
  • Posts: 232
  • Cookies: 16
    • View Profile
Re: Fucking Stupid Coding PDF's
« Reply #12 on: March 10, 2014, 03:34:51 am »
Nettools ( http://users.telenet.be/ahmadi/nettools.htm )

Anyways some good ideas to code your own that's not over bloated lol

Yea, just like that but way more limited and 'general-purpose' with a focus on local area network manipulation/recon with maybe a couple wan protocol packet generators(remember bgp vuln from a ways back?) and definitely some ipv6 stuff. The idea would be to centralize some of the more common tools without going overboard. Goddamn nettools has a lot of stuff.

Offline lucid

  • #Underground
  • Titan
  • **
  • Posts: 2683
  • Cookies: 243
  • psychonaut
    • View Profile
Re: Fucking Stupid Coding PDF's
« Reply #13 on: March 10, 2014, 06:41:07 pm »
And I'm going to be honest with you: maybe you should stop switching languages so much?
I know. It's a disease. For real though, I'm sticking with Ruby. Fortunately you are correct I do understand the basics of imperative programming so that should help. It's just really hard learning by looking at code examples and trying your best not to accidentally copy the code. I find myself inevitably doing that too much, since I don't understand how to do something, and I want to see examples on how it's done. Sure I could type it in myself and adapt it to make it mine, but in the end, if I don't know how to do it already I'm essentially just copying there code and changing some variables and whatnot.

@frog - I love the idea of creating my own swiss-army knife toolkit. It'd be like metasploit(considering that's written in Ruby as well). That gives me a lot of good inspiration.
"Hacking is at least as much about ideas as about computers and technology. We use our skills to open doors that should never have been shut. We open these doors not only for our own benefit but for the benefit of others, too." - Brian the Hacker

Quote
15:04  @Phage : I'm bored of Python

Offline frog

  • Knight
  • **
  • Posts: 232
  • Cookies: 16
    • View Profile
Re: Fucking Stupid Coding PDF's
« Reply #14 on: March 12, 2014, 04:01:46 am »
@frog - I love the idea of creating my own swiss-army knife toolkit. It'd be like metasploit(considering that's written in Ruby as well). That gives me a lot of good inspiration.

Hell yea. Hopefully I'll be seeing more Ruby scripts popping up with your name on it. I might start learning Ruby and using Packetfu.