hints in C

Any other programming language that is not covered in the Web Scripting category.

hints in C

Postby pugrit on Wed Jul 06, 2005 7:15 pm

guys im really having a hard time gathering my thoughts when writing a program..and thats just the problem since a class is just about an hour or so and usaully i wont finish up an exam.

id just like to ask how you write code, in an oragnize manner.. i usualy write from #includes down and its not a good practise.

any additional hint would be fine.

thanks
pugrit
Phoenix Veteran
Phoenix Veteran
 
Posts: 293
Joined: Thu Mar 10, 2005 1:06 pm
Location: /home/pugrit

Postby Strafe on Wed Jul 06, 2005 9:35 pm

Offtopic: 00:55 in here.
In 7 hours i'm taking an exam (Pascal) and i'm still not sleeping. Kids these days Wink

About your problem: I write code (although not C) using primitive means (keyboard input Very Happy)... sure hope that clears up things Wink
Strafe
Valued Member
Valued Member
 
Posts: 195
Joined: Fri Jun 17, 2005 8:19 am

Postby pugrit on Thu Jul 07, 2005 8:10 pm

no i mean in papaer..written exam.. its easy on the computer since its trial and error, you can check if it has errors.

its more difficult in paper..and since exams are suauly in paper..
pugrit
Phoenix Veteran
Phoenix Veteran
 
Posts: 293
Joined: Thu Mar 10, 2005 1:06 pm
Location: /home/pugrit

not sure what you are asking

Postby whitehat101 on Fri Jul 08, 2005 6:58 am

I'm not sure what you are asking... but

I usually write all the # options

then leave some space for variable declarations

then open main(){
and then I code, lol

if I use a loop I start and finish it leaving space for the code so I can jump around if I need to add stuff later (make sure you close all your {} and () right after you open them)

sometimes I end up squeezing an extera line in there! Yeah! I'm not sure if I really answered what you asked... but I hope it helps, and if you asked a more spicific question I could probably help there, too!

and errors... You just re-read it to make sure you have all your ; and , and whatever else you might need!
If it hurts, rub it.
whitehat101
Contributer
Contributer
 
Posts: 41
Joined: Fri Jun 24, 2005 5:18 am
Location: Orangevale, CA

Postby Strafe on Fri Jul 08, 2005 11:00 am

Oh, on paper ? That's easy.
I always write the main program (on a separate sheet, of course) and then declare the variables.
Strafe
Valued Member
Valued Member
 
Posts: 195
Joined: Fri Jun 17, 2005 8:19 am

Postby whitehat101 on Fri Jul 08, 2005 3:32 pm

Strafe wrote:Oh, on paper ? That's easy.
I always write the main program (on a separate sheet, of course) and then declare the variables.


Cool
That is where knowing C would help. You can't declare the variables after main or it won't compile (unless you declare them inside main(or other sub), but you will know why you are doing that if you are doing that).

I didn't say it before, but I declare variables then structures(ect) and then subs after my #'s and before my main(). It doesn't really matter, but it's just the order I do things in.

Again, error checking-- just read through the code and try to compile it in your head! It's good to think that way, that way you do less trial and error when you code on a computer!

(j/w what platform are you coding on? && What editor(s) do you use?)
If it hurts, rub it.
whitehat101
Contributer
Contributer
 
Posts: 41
Joined: Fri Jun 24, 2005 5:18 am
Location: Orangevale, CA

Postby Strafe on Fri Jul 08, 2005 5:57 pm

He said it's for his exams.
The editor is probably the pen and the compiler is his brain Wink
Strafe
Valued Member
Valued Member
 
Posts: 195
Joined: Fri Jun 17, 2005 8:19 am

*cough*cough*

Postby whitehat101 on Fri Jul 08, 2005 7:38 pm

Strafe wrote:He said it's for his exams.
The editor is probably the pen and the compiler is his brain Wink


...
*cough*cough* yes you are very smart...

I thought it was safe to assume that everyone would know that I was talking about when he codes on a computer, but I forgot you are here Rolling Eyes

plus, I asked what platform not what compiler...
(Strafe: you don't have to answer what platform hearing 'mead' or 'human OS' isn't what I'm looking for)
If it hurts, rub it.
whitehat101
Contributer
Contributer
 
Posts: 41
Joined: Fri Jun 24, 2005 5:18 am
Location: Orangevale, CA

Postby Strafe on Sat Jul 09, 2005 7:28 am

Oh, sorry about that...
The platform is "human OS" Twisted Evil
Strafe
Valued Member
Valued Member
 
Posts: 195
Joined: Fri Jun 17, 2005 8:19 am

*sigh*

Postby whitehat101 on Sat Jul 09, 2005 8:28 am

Strafe wrote:The platform is "human OS"

I expected you to reply, but I expected you to be a little bit creative with your answer... *sigh* again, I assume too much from you...
Razz
(no hard feelings now)

While I've been talking with ya' I've been getting curious of what you do! You say you know/are learning Pascal? Anything else..?
If it hurts, rub it.
whitehat101
Contributer
Contributer
 
Posts: 41
Joined: Fri Jun 24, 2005 5:18 am
Location: Orangevale, CA

Postby Strafe on Sat Jul 09, 2005 10:16 am

I'm actually done learning Pascal for now, since i've finished highschool, passed all my exams and in two weeks i'll be a college student (i hope so).
Pascal is obsolete, the only reason i put up with it is because it was taught in school and i couldn't do anything about it.
On the other hand, Visual Basic is more modern but people seem to dislike it. I don't know why, it's visual, easy, customizable and so on.. my first contact with VB was 6-7 years ago, so i can say i'm pretty good.
I've tried learning C a few years ago (bought a book - C for dummies Very Happy) but the book simply disgusted me and i've end up with knowing only the meaning of void main() or something like that.
I'm not into programming now, maybe i'll change my mind if i get accepted at UbiSoft here in Romania (500$ salary, pretty good).
I've been using linux systems for 4 years now, i'm not elite or anything, i just get around with it and i learn pretty fast. Right now, i've Slackware 8.1 on my HDD, no X system, camp for playing music, centericq/BitchX for chat and a few tools to get along. It's all i need.
I've been a "bad boy" for 2 years of my linux experience. I broke into lots of vulnerable servers in that time just for the fun of it; i was a script-kiddie. I'm ashamed of my actions now and i use all of my knowledge for creating, not destroying. Even though people still come to me and beg me to help them (create a rootkit, teach them linux so they can break into vulnerable systems and install psybncs/mechs/mirkforce...), i am changed.
About Windows.. even though you people consider it "lame".. i've been using Windows since i had my first computer (duh Razz) - AMD K6-2 300MHz with 32MB of RAM (back in 98 ). Windows is my primary concern now, i know pretty much everything there is to know, since i'll be having a job really soon and i'll have to service my clients (computer repair - software).

Don't judge me before you know me - Only God can judge me.
Last edited by Strafe on Sat Jul 09, 2005 6:55 pm, edited 1 time in total.
Strafe
Valued Member
Valued Member
 
Posts: 195
Joined: Fri Jun 17, 2005 8:19 am

(;

Postby whitehat101 on Sat Jul 09, 2005 1:22 pm

Strafe wrote:Don't judge me before you know me - Only God can judge me.

Hey hey hey now! I figured you were a smart cookie, although several of the posts you posted around me were kinda air-headed humor. Knowing/learning(I didn't know at the time) pascal says something because it is more or less dead. Very Happy I also saw some of your serious posts in other topics, so don't judge me on judging you.=P We both have our fun in different ways (mine can be harsh & I'm sorry).
I think we kinda got off on the wrong foot because you don't like the gimp, which I think is an awesome and powerful tool. But that doesn't really matter ^_^ So, we can try again.

I agree with you on C, but I'm not giving up on it. I was sad because string functions in C are sooo much harder than perl. But I bet it's harder to add a gui to perl so... I'm going to keep with it until I'm dazzled or I know everything and end up being disappointed in myself for wasting my time.

I started learning html in the fifth grade (I found a book, not a class:)) and most of what I've done has centered around that. perl for scripts, css for style, image manipulation (&maps and all that snaz), flash, databases (postgres sql think mysql if you don't know postgres). I recently purchased Javascript: The Definitive Guide, but haven't had time for it, but by the end of summer (:
Web has been my thing! I recently received $850(grand prize) for making a web site on the use of Bio tech in forensics. Both content and look were judged. [link=Http://jebler.is-a-geek.net/]here[/link] is a copy on my web server, as far as I know they haven't gotten around to putting all the sited on their server yet. I can make better looking web sites, but this one had to be optimized for IE and I was running short on time (my partner did nothing and dropped out a week before it was due) and I chose to focus on content more than looks.

As you know, I've started liking blender (3d modeling) and I think that can be oh so promising. If not for the fun I can have with it I'm sure I could get $10 by making a 3d logo for somebody. It amazes me... Some of the scenes I've seen. You would swear they are photographs...

Since you talked about school, I'll say I'm still in the middle of high school. I'm very much a science and math cookie (not to brag, but most freshmen don't take algebra 2, and most of the ones that do don't hold top grade in class all year ^_^) I'm excited about school. I'm going to take higher classes than are offered on campus (there is a junior college near by that the school has a deal with I'll be taking math, foreign lingo, and maybe science there).

As for OS's I was raised with MacOS, but I feel confident to call myself pro in MacOS and WinOS. (My opinion is that Mac is so much better now, it's unix based. what else do I need to say?) I don't remember when I first opened a terminal two and a half to three years ago... But it's the best thing since the spoon. I have hard times knowing how good I am because there isn't anyone like me here... *pause for a moment in silence for my sad life* Anyways, I use command line tools and X apps infinitely more than anyone I know (infinite, because I've never met another person [my age or older] that uses them).

I recently found some old but cheap x86 hardware and I have plans of finding a flavor of *nix and going all the way, if for nothing else to completely dazzle the people that already don't have a clue what I'm doing.

My friend, I do think we have gone a itsy bitsy bit off topic (;
If it hurts, rub it.
whitehat101
Contributer
Contributer
 
Posts: 41
Joined: Fri Jun 24, 2005 5:18 am
Location: Orangevale, CA

Postby Strafe on Sat Jul 09, 2005 6:54 pm

If somebody thinks we're going offtopic, please raise your hand.



Good. Let's move on Smile

If you were me, you'd understand it's hard not to get mad when somebody is using too much sarcasm... I agree we started on the wrong foot, but like i've said, let's move on Smile

I know Pascal is obsolete, trust me. But here in Romania.. grr.. how can i explain this ? PEOPLE ARE STUPID. We have tons of computer addicts, some of them are so brilliant they could outclass Bill Gates. Our society though doesn't appreciate their value and pays them hardly nothing. That's why most of them fly to the States or anywhere their work is valued. And most of them do it illegaly.
To put it in perspective: the department of education, or whatever you call it, is so primitive it doesn't understand that kids need to be taught programming languages crucial to their future (C/C++, Java, Perl etc)...
Pascal is being taught because it's "the root of all programming languages". My ass (pardon my expression) ! It's so like romanians to be stupid.

About your site, you could have gone without the frames. I can't show you any of my work because it's deleted. After i finished highschool i've deleted all of my sites because they belong to the past. I have to make room for the future (like i've said in another topic, i plan to start my own webdesign company).
I'm sure you can do better sites, because to be honest, that looks like something made by a newbie.

I'm not into photo editing. I know a few tricks to get along and that's all. Complex 3D programs i'll never use because they do not appeal me. If you can find people to pay you 10$ for a logo, good. In my country the best offer would be a dime, so i'm dropping the idea.

I see you're into studying. I don't like anything that has to do with studying because i know i'm going to get along just fine without having to know what a natural logarithm is or how tall is a mountain. In highschool i was "average" - enough to pass all of my classes but not dumb enough to be the last of the group. It's exactly what i needed.

Good luck with your future box, maybe you'll "link" it to this network some day.

Btw: when i was your age, believe me, i knew a lot about computers...but you can't blame somebody who's 30 if he knows less about computers than you do. We live in different times. I see 12-year olds pretending to be hackers. Get the idea ? Smile

Peace Wink
Strafe
Valued Member
Valued Member
 
Posts: 195
Joined: Fri Jun 17, 2005 8:19 am

Postby pugrit on Sat Jul 09, 2005 7:38 pm

back in my high school days i had to learn clipper85, i think that was the name..i forgot..high school was i duno way back hhmm.. i graduated my senior year batch 99.
pugrit
Phoenix Veteran
Phoenix Veteran
 
Posts: 293
Joined: Thu Mar 10, 2005 1:06 pm
Location: /home/pugrit

Postby Strafe on Sat Jul 09, 2005 11:39 pm

That's not "way back" Smile You're still young, enjoy life Very Happy
Strafe
Valued Member
Valued Member
 
Posts: 195
Joined: Fri Jun 17, 2005 8:19 am

Next

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron