|
|||||||
| Programming, Coding, (Web)Design Discuss all your programming or design needs with likeminded people. |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
DriverHeaven Addict
Join Date: Jun 2002
Posts: 315
Rep Power: 0 ![]() |
I am super dumb.
Hello, folks.
Is there differnet special way of thought process to be a very good programmer? Is it just practice? I'm sure most will just say 'practice and more practice'. I am a student in a computer science major. I started taking the first programming classes this semsester. Now it's spring break. The reason I am writing is just that I am very depressed about the class not going very well. We had an exam right before spring break(2nd in this semester) and I screwed up big time unlike the 1st one. The first one was almost like a give-away. Is C++ supposed to be that hard? I mean I have studied and turned in most of homeworks so far but this 2nd exam made me reconsider my major. The exam was about loops, strings, and fstream. I'm sure these are all basic stuff. After introduction of the loop, I am totaly confused and don't have a clue about what goes where anymore. I mean I can see how it works but when multiple loops are combined with strings and streams stuff it really hurts my head. It takes me just too long to figure out. ![]() The exam problems were well worth several hours of planning to me just to figure out how to do it. I was to figure them out within an hour and I only completed half of it. I am not even sure whether I did a good job on them. what makes me really go crazy is that others seems to do well without much difficulties. Quite a few students finished it almost half an hour earlier. I stared at them as if they are some kind of freaks. I heard a few people saying that programming is not for everyone. Maybe this is not for me... I don't know. I hope it is. I thought it was. I thought I was doing well. I heard that the 2nd semester of this C++ class supposed to be harder. Somehow, I feel no matter how hard I try and 'practice' I won't success in this major. Anyway, I just wanted to rant or whatever. Having gone numb in front of the test problems, I feel wothless. Spring break is giving me no pleasure.
|
|
|
|
|
|
#2 |
|
HardwareHeaven Extreme Member
|
I tried c+ it sucked It's hard to get down
....(I gave up!) but keep trying ... I plan to take another shot at it later... made some cool stuff trying tho... You think it hard with clases try firguring it out on your own like I am it's very hard but thats just me...........
__________________
|
|
|
|
|
|
#3 |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 70 ![]() |
Not everone can be a programmer, regardless of how hard they try. FWIW, I went into a final exam on writing Pascal an hour late and a bit drunk (was chatting up a girl at the pub
) an I left after 30 minutes or so. First one to leave, only one with a Distinction pass mark. But then I've been programming since the age of 5.When I started my current job, there were 3 other developers. Now there's only one - me. I can work 4 times faster than they could and produce better work. As such I'm payed very nicely and get loads of perks like flexi-time. Programming is as much of a gift as it is a skill - I didn't have any programming certifications then and still don't. The other 3 developers were MSCE qualified. C++ can be a very hard language to teach the novice programmer. Java would be a much better starting block IMHO.
__________________
Gentoo Linux - Developer (baselayout) Read my blog "I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." Stephen Roberts |
|
|
|
|
|
#4 |
|
DivrerHaeven Seinor Mebmer
Join Date: Mar 2003
Location: Baltimore, MD
Posts: 236
Rep Power: 0 ![]() |
Lolz, yeah C++ is not that hard, it's just tedious. BTW, don't be surprised if during your 2nd-3rd semester you grow fangs and start to shun sunlight -- that's normal. And always do what the engineers do -- study with a friend, it makes things so much simpler.
__________________
Pepole olny raed wrods. Btu oyu shuodl sitll check oyur spleling! http://realgar.hopto.org
|
|
|
|
|
|
#5 | |
|
DriverHeaven Founder
Join Date: May 2002
Posts: 32,480
Rep Power: 177 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
|
|
|
|
|
|
|
#6 |
|
Mostly lurking lately....
Join Date: Jun 2002
Location: U.S.A.
Posts: 2,160
Rep Power: 71 ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
HEH, programming code has always looked like gibbersih to me. Even visual basic makes no sense to me. Well, very little sense anyway.
People that can program ANYTHING at all deserve alot of respect, as far as I'm concerned. |
|
|
|
|
|
#7 | |
|
confutatis maledictis
|
Quote:
|
|
|
|
|
|
|
#8 | |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 70 ![]() |
Quote:
__________________
Gentoo Linux - Developer (baselayout) Read my blog "I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." Stephen Roberts |
|
|
|
|
|
|
|
|
DriverHeaven Addict
Join Date: Jun 2002
Posts: 315
Rep Power: 0 ![]() |
lol
|
|
|
|
|
|
#10 |
|
unplugged
|
My younger brother of 4 years is a C+, C++ programmer and makes damn good money- The funny thing is, he doesn't know jack about computers, he calls me up all the time asking questions about his computer and has freinds at work that want me to build them PC's. I used to think all programmers must be geeks, I guess that's just not the case.
I used to program basic to make games on my old tandy and save them on a tape recorder when I was 13. if, then, if, then, if, then, goto, stop- drives ya nuts.
__________________
|
|
|
|
|
|
#11 | |
|
confutatis maledictis
|
Quote:
|
|
|
|
|
|
|
#12 |
|
BSD SMASH!
Join Date: May 2002
Location: A rabbit hole. . .
Posts: 1,170
Rep Power: 0 ![]() |
Why don't you post some code that you are having trouble understanding? Perhaps one of us can explain it better.
__________________
quad (FreeBSD/amd64 8-CURRENT): Intel Q6600 - Asus P5E-VM HDMI - 2x2 GB Kingston PC6400 DDR2 Ram - Seagate 320GB 7200RPM HD - 2xSeagate 1TB 7200RPM HD in RAID 1 via ZFS - Lite-On 20x DVD Multi Recorder - Coolermaster Centurion 5 router (FreeBSD/amd64 8-CURRENT): Intel E4500 - Intel D945GCNL - 2 GB PC6400 Mushkin Ram - Lite-On 48x24x48x16 - Seagate 320GB 7200RPM HD - Silverstone SST-SG02-F wanderer (FreeBSD/i386 7-CURRENT): Lenovo Thinkpad T61p mini (OS X 10.5): Intel Core 2 Duo @ 1.8Ghz, 4 GB Mushkin PC5400 Ram - Headroom MicroDAC Portable sound: Rockboxed iPod Video -> Westone UM2's Not-So-Portable Sound: Headroon MicroDAC -> Singlepower PPX3-SLAM -> Grado RS-1's or Beyerdynamic DT-880's Very-Not-Portable-Sound: Squeezebox v3 -> Denon AVR-1507 -> B&W 683's & Sunfire HRS-10 |
|
|
|
|
|
#13 |
|
HardwareHeaven Senior Member
|
I just started taking classes and learning C++ in school. Well maybe I should say relearning C++ in school. But I don't like the way they teach. Lecture, program, Lecture, Lecture, Program. Snore. I don't know about the thought process but I think it could help alot. Although this stuff seems to come natural to me. I just need to learn more commands.
I must say I didn't like it when my class taught file in out commands and cout.xx commands before the class command. Would make things simplier. main() { for (x = 0; x >= 0; x++) { learncommands(); } return 0; }
__________________
AMD Phenom II X4 925 AM3/ Giga-byte MA790XT-UD4P XFX HD5770 1GB / 2x2GB of GSKILL DDR3 10666 8-8-8-23 Samsung SH-S182D DVD-RW drive / Sony Optiarc BD-5300S BD-RW drive Western Digital WD1501FASS(Primary)/Western Digital 15EADS(Secondary)/Western Digital 7500AACS(Secondary)/Seagate Barracuda 7200.10 320gb(Secondary)/Western Digital 3200KS 16MB 7200rpm SATAII HD(Secondary) Antec TP-550 / CoolerMaster CMStacker Sound Blaster X-FI Titanium Fatal1ty Professional / Creative Inspire 6600 6.1 speakers Samsugn T200HD 20" LCD Monitor / Logitech Internet 350 Black Keyboard Logitech MX510 Mouse |
|
|
|
|
|
#14 |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 70 ![]() |
The return statement would never be executed, so why include it?
__________________
Gentoo Linux - Developer (baselayout) Read my blog "I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." Stephen Roberts |
|
|
|
|
|
#15 |
|
HardwareHeaven Senior Member
|
I felt like including it.
And it is just a habit.
__________________
AMD Phenom II X4 925 AM3/ Giga-byte MA790XT-UD4P XFX HD5770 1GB / 2x2GB of GSKILL DDR3 10666 8-8-8-23 Samsung SH-S182D DVD-RW drive / Sony Optiarc BD-5300S BD-RW drive Western Digital WD1501FASS(Primary)/Western Digital 15EADS(Secondary)/Western Digital 7500AACS(Secondary)/Seagate Barracuda 7200.10 320gb(Secondary)/Western Digital 3200KS 16MB 7200rpm SATAII HD(Secondary) Antec TP-550 / CoolerMaster CMStacker Sound Blaster X-FI Titanium Fatal1ty Professional / Creative Inspire 6600 6.1 speakers Samsugn T200HD 20" LCD Monitor / Logitech Internet 350 Black Keyboard Logitech MX510 Mouse |
|
|
|
|
|
#16 |
|
Yarr... I be blind!
Join Date: May 2002
Location: Calgary, Canada
Posts: 3,190
Rep Power: 74 ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
From what I hear, Windows expects a return value of 0 if the program executed successfully. (Not console apps, just certain Windows apps), also some older compilers require you to return 0 from the main function, even though it is not a part of the ANSI specs.
__________________
|
|
|
|
|
|
#17 |
|
Custom User Title
|
Technically you should do it for console apps, DOS apps, everything. I've also heard that main() is a special case, and even though it is specified as int, you can just use:
return; And it will return 0 by default. |
|
|
|
|
|
#18 |
|
Unbiased.
Join Date: Jun 2002
Posts: 4,812
Rep Power: 0 ![]() |
Can't you also just do "void main()" and be more or less rid of the whole problem?
__________________
[img][/img] [color=White]Peace be with you, Joe.[/color] Driverheaven Staff Member (Supermoderator) |
|
|
|
|
|
#19 | |
|
Custom User Title
|
Quote:
|
|
|
|
|
|
|
#20 |
|
HardwareHeaven Senior Member
|
Wow a discussion over a small piece of code I wrote for fun.
I believe you can't do void main() because the OS is calling the int main() of that program. The code for windows calling int main() would probably look something like this. if ProgramCrashYes(main()) { breakwindows(randombreak()); } else { if createcrash() { breakwindows(randombreak()); } }
__________________
AMD Phenom II X4 925 AM3/ Giga-byte MA790XT-UD4P XFX HD5770 1GB / 2x2GB of GSKILL DDR3 10666 8-8-8-23 Samsung SH-S182D DVD-RW drive / Sony Optiarc BD-5300S BD-RW drive Western Digital WD1501FASS(Primary)/Western Digital 15EADS(Secondary)/Western Digital 7500AACS(Secondary)/Seagate Barracuda 7200.10 320gb(Secondary)/Western Digital 3200KS 16MB 7200rpm SATAII HD(Secondary) Antec TP-550 / CoolerMaster CMStacker Sound Blaster X-FI Titanium Fatal1ty Professional / Creative Inspire 6600 6.1 speakers Samsugn T200HD 20" LCD Monitor / Logitech Internet 350 Black Keyboard Logitech MX510 Mouse |
|
|
|
|
|
#21 | |
|
BSD SMASH!
Join Date: May 2002
Location: A rabbit hole. . .
Posts: 1,170
Rep Power: 0 ![]() |
Quote:
Usually, returning a number is good for debugging and properly making commands for Unix, especially if you want something that can be piped. AFAIK, it returns 0 when the program runs successfully, and returns something else when there's a problem. Of course, you have to determine what to return if the program fails, so you have make other values that you can return. And no, you shouldn't learn about classes first. You really have to learn the basic syntax and the usage of functions before you go onto class, structs, and dynamic memory allocation.
__________________
quad (FreeBSD/amd64 8-CURRENT): Intel Q6600 - Asus P5E-VM HDMI - 2x2 GB Kingston PC6400 DDR2 Ram - Seagate 320GB 7200RPM HD - 2xSeagate 1TB 7200RPM HD in RAID 1 via ZFS - Lite-On 20x DVD Multi Recorder - Coolermaster Centurion 5 router (FreeBSD/amd64 8-CURRENT): Intel E4500 - Intel D945GCNL - 2 GB PC6400 Mushkin Ram - Lite-On 48x24x48x16 - Seagate 320GB 7200RPM HD - Silverstone SST-SG02-F wanderer (FreeBSD/i386 7-CURRENT): Lenovo Thinkpad T61p mini (OS X 10.5): Intel Core 2 Duo @ 1.8Ghz, 4 GB Mushkin PC5400 Ram - Headroom MicroDAC Portable sound: Rockboxed iPod Video -> Westone UM2's Not-So-Portable Sound: Headroon MicroDAC -> Singlepower PPX3-SLAM -> Grado RS-1's or Beyerdynamic DT-880's Very-Not-Portable-Sound: Squeezebox v3 -> Denon AVR-1507 -> B&W 683's & Sunfire HRS-10 Last edited by Malus; May 18, 2003 at 07:18 AM. |
|
|
|
|
|
|
#22 |
|
DriverHeaven Extreme Member
|
that was me programing. beat that!
|
|
|
|
|
|
#23 | |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 70 ![]() |
Quote:
__________________
Gentoo Linux - Developer (baselayout) Read my blog "I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." Stephen Roberts |
|
|
|
|
|
|
#24 | |
|
BSD SMASH!
Join Date: May 2002
Location: A rabbit hole. . .
Posts: 1,170
Rep Power: 0 ![]() |
Quote:
__________________
quad (FreeBSD/amd64 8-CURRENT): Intel Q6600 - Asus P5E-VM HDMI - 2x2 GB Kingston PC6400 DDR2 Ram - Seagate 320GB 7200RPM HD - 2xSeagate 1TB 7200RPM HD in RAID 1 via ZFS - Lite-On 20x DVD Multi Recorder - Coolermaster Centurion 5 router (FreeBSD/amd64 8-CURRENT): Intel E4500 - Intel D945GCNL - 2 GB PC6400 Mushkin Ram - Lite-On 48x24x48x16 - Seagate 320GB 7200RPM HD - Silverstone SST-SG02-F wanderer (FreeBSD/i386 7-CURRENT): Lenovo Thinkpad T61p mini (OS X 10.5): Intel Core 2 Duo @ 1.8Ghz, 4 GB Mushkin PC5400 Ram - Headroom MicroDAC Portable sound: Rockboxed iPod Video -> Westone UM2's Not-So-Portable Sound: Headroon MicroDAC -> Singlepower PPX3-SLAM -> Grado RS-1's or Beyerdynamic DT-880's Very-Not-Portable-Sound: Squeezebox v3 -> Denon AVR-1507 -> B&W 683's & Sunfire HRS-10 |
|
|
|
|
|
|
#25 |
|
HardwareHeaven Senior Member
|
Dubugging -> Easiest way to recieve a migrane especially when you were not the one that made the program you're dubugging. Even worse is when the program actually runs and you need to dubug it. Always great to know that there is an error but you are not quite shure where it is, but it has to do with this region of code.
__________________
AMD Phenom II X4 925 AM3/ Giga-byte MA790XT-UD4P XFX HD5770 1GB / 2x2GB of GSKILL DDR3 10666 8-8-8-23 Samsung SH-S182D DVD-RW drive / Sony Optiarc BD-5300S BD-RW drive Western Digital WD1501FASS(Primary)/Western Digital 15EADS(Secondary)/Western Digital 7500AACS(Secondary)/Seagate Barracuda 7200.10 320gb(Secondary)/Western Digital 3200KS 16MB 7200rpm SATAII HD(Secondary) Antec TP-550 / CoolerMaster CMStacker Sound Blaster X-FI Titanium Fatal1ty Professional / Creative Inspire 6600 6.1 speakers Samsugn T200HD 20" LCD Monitor / Logitech Internet 350 Black Keyboard Logitech MX510 Mouse |
|
|
|
|
|
#26 | |
|
Unbiased.
Join Date: Jun 2002
Posts: 4,812
Rep Power: 0 ![]() |
Quote:
__________________
[img][/img] [color=White]Peace be with you, Joe.[/color] Driverheaven Staff Member (Supermoderator) |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|