View Full Version : Debugging C
NightrainSrt4
04-20-2009, 07:45 PM
I think I am going to go crazy. Everyone knows what end of semester means in soft.engi. Ughhh. Debugging semester projects.
Just spent two and a half hours going through 2000+ lines of code that would compile fine but ran screwy only to realize, boom epiphany, that I had = instead of ==. UGHHH that's such a newbie move, then again this is my first time being forced to work in C, and having to worry about getting the differences correct. This was after 4 hours of fixing code/ writing new code earlier. Ughh, I miss having strings lol.
Anyone having similar issues lately, being end of semester and all? Any newbie coding errors that shouldn't have slipped?
Drum Thumper
04-20-2009, 08:04 PM
Makes me glad I've been done with college since last October. I hated Java for the very same reasons.
Hang in there, and if you need to, just take a few minutes off and fire up a FPS and blow off some steam.
NightrainSrt4
04-20-2009, 10:29 PM
Ya, I'm used to java, so although I am catching on quickly to C, somethings are frustrating to know when to use. Like when to use a pointer for a set of characters, or just an array of characters. If it was just a string it would be quite easier for me to wrap my head around. It wouldn't be so bad if this was a smaller program, but being relatively large can make it more daunting.
For those interested, this first C program I'm working on is for Senior level networking. Have to rewrite FTP using c, both client and server apps. Once I'm done with this I've got to write a RPC/NFS program. Fun fun.
thats one language i've never learnt, C, i learnt VB first so my way of thinking when it comes to writing a program is completely wrong.
Im hoping i can work my way out of it, im trying to teach myself C (Or even C++) from online examples etc, etc
DaveW
04-21-2009, 01:57 PM
I'm not a big fan of C personally.
Segfaults away! (pew pew pew)
-Dave
cvitullo
04-21-2009, 05:19 PM
Eww, VB.
Sorry, but I kind of hate any graphical programming language. It's just cheating in my opinion. I'm not really a big fan of java, either. Or C#. I'm a bit picky when it comes to programming :D
I've been on and off learning C++ since like 6th grade and I'm finally starting to get proficient at it. Still all console based, but it's a start.
simon275
04-21-2009, 08:02 PM
I am in the same boat I learnt a lot Java early on at University. Including JavaEE java beans and all that. I am learning c++ at the moment in my spare time which I have very little of. Does anyone want to recommend me a good book to learn c++ that they have actually used.
Trace
04-21-2009, 08:56 PM
I am in the same boat I learnt a lot Java early on at University.
They obviously weren't teaching English :P :banana:
I learned VB 6 first, and now I'm moving on to PHP and Java.
Haha, Simon, I still love you <3 lol
NightrainSrt4
04-22-2009, 03:04 AM
Punctuation was off yes, but I always thought that was the British English way of writing it. You see it a lot with dreamt and a few others.
Anyway, I've got the ftp app all sorted. I've got everything I need implemented except transferring files, which I've got all pseudo-coded just have to add. help, stat, mkd, rmd, dele, list, nlst, user, pass, etc. are all done. The unix server we have to have it all run on we don't actually have root permissions, so the user/pass is all faked with array searching for the user and matching the index to a pass, with checks of course for all login sensitive commands. Still, it's really nice to have something come together in the end.
NightrainSrt4
04-22-2009, 05:42 PM
I've still got to add the other couple functions, but printed out what i had as its broken into parts to be handed in anyway. And thanks to comments and the extra checks the prof. wanted in it so far just the code alone comes to . . .
25 pages at 10pt font. If I were to do things my way I prob could have cut out some of the redundant parts, or tossed them in a method/function and ended up with half the printed code.
Add another 10-15 pages of script captured testing and I've got a big stack of papers and need to buy some more ink. :rolleyes:
NightrainSrt4
04-22-2009, 07:42 PM
Hehe ya. I almost bought one back last fall when newegg had that one day sale on purchasing a $300 laser printer and get, can't remember, it was either an EEE or acer aspire one. I was on the verge but didn't have time to research how much toner cost and whatnot.
my bro bought one for $180, colour one at that, i worked it out it costs just over £0.01 to print a full colour page,
with full toners (Not the sample ones it comes with) costs about £0.00.03 to print a full page
Powered by vBulletin® Version 4.2.1 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.