Follow us on Twitter!
One mans freedom fighter, another's terrorist.
Sunday, April 20, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 33
Guests Online: 32
Members Online: 1

Registered Members: 82843
Newest Member: hx47
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

Learning to program in C.

Night_Stalker
Member

Your avatar

Posts: 329
Location:
Joined: 01.02.07
Rank:
Apprentice
Warn Level: 10
Posted on 30-12-11 21:50
I've been telling myself I'm going to start learning C for a while now.
I finally got around to reading some e-books I downloaded the other day. (K&R, and some other one called Learning GNU C.)

I have a question for those programmers out there, not just people who program in C, but others as well.

I'm not sure how to explain it, but I'll try my best.
When I started reading the books, and doing tutorials in them, I soon realised that these books are going to teach me "how" to program, but not necessarily how to program well, and efficiently, if you know what I mean. Just teaching the bare minimum and the basics.

What have the programmers here done to become as good as you are, after reading these books?

I know that in addition to reading them, looking and playing around with other programmers' codes helps much when you're still learning.

What else have you all done to help yourselves become better programmers?

I hope my question and problem made sense, I wasn't exactly sure how to explain it. :angry:


Author

RE: Learning to program in C.

cpu-junkie
Member

Your avatar

Posts: 1
Location:
Joined: 22.11.11
Rank:
Guest
Posted on 30-12-11 21:59
You won't become a good programmer by just reading and doing tutorials, although it's a good way to start. Later on you will learn by trial and errors.

A tip is that you not just read a specific language but also read code structuring and read others code. I wrote code and then looked up others that gave similar results, that made me think more and widened my perspective.
Author

RE: Learning to program in C.

Night_Stalker
Member

Your avatar

Posts: 329
Location:
Joined: 01.02.07
Rank:
Apprentice
Warn Level: 10
Posted on 30-12-11 22:11
cpu-junkie wrote:
You won't become a good programmer by just reading and doing tutorials, although it's a good way to start. Later on you will learn by trial and errors.

A tip is that you not just read a specific language but also read code structuring and read others code. I wrote code and then looked up others that gave similar results, that made me think more and widened my perspective.


Structuring code, that's when you split up your code into several different files, right?
The Learning GNU C books said stuff about that, where they broke up the program and had a few files which called upon functions from another file, and it was compiled into one program.

I've read some other peoples' codes, and found them quite helpful in giving me ideas on how to do things, and how to improve my own code.


Author

RE: Learning to program in C.

Arabian
Banned



Posts: 332
Location: inside you.
Joined: 22.09.10
Rank:
Apprentice
Posted on 30-12-11 22:23
A common misconception is that learning a programming language will teach you how to program. A book about programming in C will only teach you how to program in C, not how the logic and functionality behind programming operates itself. It may seem contradictory, but the logic behind data manipulation and structured programming languages is completely up to the intelligence level of the user. A good way to speed up the pace of comprehension until that point of enlightenment is to learn how a computer works in its entirety - not just how it intereprets a language, but how it stores and operates memory, how it interacts with the real world, and how it may be manipulated.

A good way to do this is learning Unix. Another may be to take classes. Alternatively, hack.


G'bye y'all! I was an asshole, So korg banned me.

Edited by Arabian on 30-12-11 22:24
Author

RE: Learning to program in C.

Futility
Member



Posts: 725
Location: USA
Joined: 17.12.07
Rank:
God
Posted on 31-12-11 00:00
Night_Stalker wrote:
Structuring code, that's when you split up your code into several different files, right?

Encapsulating parts of your program into separate files that can, in turn, be called by other programs won't really make learning to program any easier. It will, however, make your code cleaner and easier to read/use which will, in the long run, make you a thousand times more proficient. Not to mention a godsend when you start working on larger projects with other people.

Comments, too, tend to be extremely useful while often wholly overlooked. When you come back to your program later to try and figure out what the hell you were thinking. (And trust me- if you continue learning your language of choice for a while before returning to your first(ish) programs, you will wonder what the hell you were thinking)


I've read some other peoples' codes, and found them quite helpful in giving me ideas on how to do things, and how to improve my own code.

This is always a good idea, however you must do so in moderation and only if you're absolutely sure you want to ruin the fun. When I learned Python, I spent a lot of time reading other code and then easily replicating it- making me feel like a professional. However, when I went to actually do anything on my own, I felt lost and ended up floundering around for hours feeling like an idiot.

But here's the deal- that floundering around taught me way more than reading other people's stuff (at first). You need that initial "what the fuck am I doing?" to push you to start thinking like a programmer would. Once your in that mindset, there's nothing wrong with looking over other stuff to see how to improve what you have. But make sure you have something first. And, if you do look over someone else's work, make sure you understand exactly what they're doing and why they're doing it.

Moral of the story? Reading code is easy. Writing code is easy. Actually figuring out what you want your code to do, though? That shit is rough. And rough is good.

Good luck.

(Note: Neither reading nor writing code is easy. I'm a liar.)


i252.photobucket.com/albums/hh11/zanimabean/Zim.png
Futility91@hotmail.com Futility91
Author

RE: Learning to program in C.

stealth-
Member



Posts: 1003
Location: Eh?
Joined: 10.04.09
Rank:
Mad User
Posted on 02-01-12 20:36
Futility wrote:
But here's the deal- that floundering around taught me way more than reading other people's stuff (at first). You need that initial "what the fuck am I doing?" to push you to start thinking like a programmer would. Once your in that mindset, there's nothing wrong with looking over other stuff to see how to improve what you have. But make sure you have something first. And, if you do look over someone else's work, make sure you understand exactly what they're doing and why they're doing it.


Futility has a great point. OP, you are exactly right, the book does seem to just teach you the basics of the language. It gives you enough to get started, and once you have that all you need to do is code what you can and learn from it. You'll have a rough start, but you'll quickly get better as you code more and more. The things the book doesn't teach you can be taught to you by google when you hit a dead end (and you certainly will), and the techniques it doesn't cover you will learn from your own mistakes.

All you have to do is just code.
You'll suck at first, but you'll learn from it Wink


The irony of man's condition is that the deepest need is to be free of the anxiety of death and annihilation; but it is life itself which awakens it, and so we must shrink from being fully alive.
http://www.stealt. . .
http://www.stealth-x.com
Author

RE: Learning to program in C.

just a panda
Member

Your avatar

Posts: 15
Location:
Joined: 22.07.09
Rank:
Newbie
Posted on 05-01-12 08:31
Futility wrote:
Comments, too, tend to be extremely useful while often wholly overlooked

but dont overdo it lol ive seen people who comment evry line in their code
and dont just look at others codes after writing your own
talk to others and share code
ask what people better than you think of what youve written and what they would change and why
dont be afraid to learn from those who have the nowledge to give. dont be afraid to ask and disguss
hope this helps :3
Author

RE: Learning to program in C.

Night_Stalker
Member

Your avatar

Posts: 329
Location:
Joined: 01.02.07
Rank:
Apprentice
Warn Level: 10
Posted on 07-01-12 09:05
Thanks for all of the replies and advice, everyone.
I think it'll all help me out with learning to program lots. :3

Now I just have to find a solution my biggest problem with learning to program, and with much else I'm interested in learning: staying focused on just one thing at a time, so I can be more productive when it comes to learning it. >_<


Author

RE: Learning to program in C.

tuere816
Member

Your avatar

Posts: 41
Location: In your closet, in your head
Joined: 27.11.11
Rank:
Apprentice
Posted on 08-03-12 13:59
this might go down as hijacking this thread ...


but, just for arguments sake, suppose that I use a GOTO command to go to a certain line, in the code , is their an method which can help me determine the place from where i jumped...
e.g.
Code

#include<iostream.h>
void main()
{
int a=1;
cde: cout<<"meow";
//ohshumaka
abc: cout<<"grrrr";
cout<<"boo..";
if(a==0)
{
goto abc;
}
else
{
goto cde;
}
}





so , here i will land up in the else block , so after i go to cde, i will be at ohshumaka, so is there many method by which at this step i will be able to determine which goto was used....



very similar to functions i would say :)


www.hellboundhackers.org/sig/hbh2.png

THE SWEETEST KID ALIVE ..... in Virtual world
img255.imageshack.us/img255/5292/2566.png
kulkarniabhishek94@yahoo.co.in
Author

RE: Learning to program in C.

Arabian
Banned



Posts: 332
Location: inside you.
Joined: 22.09.10
Rank:
Apprentice
Posted on 08-03-12 15:46
tuere816 wrote:
this might go down as hijacking this thread ...


but, just for arguments sake, suppose that I use a GOTO command to go to a certain line, in the code , is their an method which can help me determine the place from where i jumped...
e.g.
Code

#include<iostream.h>
void main()
{
int a=1;
cde: cout<<"meow";
//ohshumaka
abc: cout<<"grrrr";
cout<<"boo..";
if(a==0)
{
goto abc;
}
else
{
goto cde;
}
}





so , here i will land up in the else block , so after i go to cde, i will be at ohshumaka, so is there many method by which at this step i will be able to determine which goto was used....



very similar to functions i would say :)


Yeah, it's called a debugger. Learn to use GDB.

OR if you mean IN your code, you could set a new boolean value and update it with each goto.


G'bye y'all! I was an asshole, So korg banned me.

Edited by Arabian on 08-03-12 16:30