|
| | #1 (permalink) |
| Banned Join Date: Nov 2003
Posts: 1,219
| Request: C++ Help If anyone on here is fluent in C++ I would appreciate it if they could give me some help regarding the I've made a really simple time clock program where it retrieves the start and end times of someone and calculates their time worked. The only thing I'm having trouble with is the inability to format the minutes correctly when I restate the data the user has given. Example: Time Clock Program Name : FoH Guild Starting time : 3:01 Ending time : 3:04 Payrate: 25 Employee: FoH Guild Starting time 3:1 Ending time 3:4 Press any key to continue . . . ---------------- I need the 3:1 and 3:4 to be 3:01 and 3:04 respectively. We are NOT allowed to use setfill, so I'm at a loss ![]() Thanks in advance if you can help. |
| | |
| | #7 (permalink) |
| So there's this plane on a treadmill... Join Date: Jan 2005 Location: Southern California
Posts: 2,858
| This is a completely pointless rant, in a thread thats pretty much dead, but I just felt like writing because a few of my classes have been bugging me. Posts like this make we wonder about the state of people being taught programming. I TA'd for a few lower level programming classes, and some of these kids seriously just did not get it. And they kept trying to do what the original poster did, which was find a library function to do the work for them. I usually let it go because I figure, basic level programming is an elective to a lot of people, so they probably don't care. But when I see them next semester in a higher level programming course, I begin to worry. I see them make the same mistakes, miss the basic concepts completely, and still search everywhere for the easy way to do it. A lot of it has to do with the teaching methods though, and I must say I'm torn myself. On one hand, there are all of these libraries out there, so that you don't have to write stuff like this yourself. Why should you go through the hassle of doing all this busy work when the function is already available? So on one hand, I figure, if their going to be using all the libraries, might as well just teach it as so. But on the other hand, you have to know wtf your doing, how this stuff works, so that when such a method doesn't really fit the problem, you can adapt. I was taught without any libraries, using only the basic ones for basic functionality. And while I understand the 'under the hood' so to speak, after my classes were over I had a very weak grasp on what kind of libraries were out there for me to use. I'd often times write up my own function when a prewritten one would have done it better and faster. What worries me, is that there may be teachers who solely focus on library methods and "concepts" rather then implementing them. Where in one class, this guy could have gotten away with using setfill and never understood how to implement it himself, going on to get his degree, then floundering because he lacks the basic concepts of how to build the things he's been taught. Or, hopefully his teacher now has him implement everything himself, so he knows how to do this stuff, but at the price of having him not know all the helpful features of the libraries. I guess, if I had to teach a course in programming, I'd have you write up a certain library function, and then show you what prewritten methods are available. Do a 50/50 with learning the libraries, and actual coding them. Or maybe there should be a class solely on libraries. There are SO many out there, that unless you work in the industry, or spend a vast majority of your time going through them, you'd never know about half of em. I guess in the end though when they graduate they will figure out of if they can hack it or not, and it will just sort of work itself out. It's just annoying. =\ |
| | |
| | #8 (permalink) |
| Banned Join Date: Jul 2006 Location: Cleveland, Ohio
Posts: 309
| Yes, I've taken programming courses myself and they mainly focus on libraries; I've even brought the situation up to the instructor just to be told that we would cover it in another session. Bullshit. |
| | |
| | #9 (permalink) |
| CHARLIE DON'T SURF! Join Date: Jul 2004
Posts: 777
| Who cares how kids now days are taught. The good ones will still break through (the ones that care and actually got "it"). Fuck the lousy ones, they don't want to program for a living anyways and, if they do, won't do it for long. |
| | |
| | #10 (permalink) |
| Banned Join Date: Nov 2003
Posts: 1,219
| Well, in CS-115 at UK, the professor is trying to teach the "under the hood" stuff before we can just plug shit in with libraries. Its a lecture class of like 120-150 (not sure, a lot of people dropped the class) with a lab taught by a TA once a week. Luckily I made friends with my TA early on. EDIT: I know at Transylvania University, my girlfriend is in an intro level CS course there and they haven't even gotten into programming yet, with a little more than a month left in the semester. Its actually pretty intelligent. The professor of that class is teaching, in great detail, algorithms and how to implement them. I remember helping her with a couple of problems, and it was stuff like "Write an algorithm to add numbers." or "Write an algorithm to sort numbers from highest to lowest." I wish my class had been taught that way, as opposed to teaching us with ALICE .Also, my professor, for your viewing pleasure: Last edited by tikkus : 11-01-2006 at 06:10 AM. |
| | |
| | #11 (permalink) |
| weeeeee Join Date: Jun 2005 Location: Miami, Fl.
Posts: 703
| When I started my programming career, we were using borland c++. Our teacher made us do everything by hand, no libraries at all. It was fun creating the dynamic linked list and Queues and stacks. Then a couple of classes alter they introduces us to the libraries and how to create stacks and queues in 2 lines, I felt robbed at that time. But now looking back at it, i think it was a necesary learning experience. |
| | |
| | #12 (permalink) | ||
| Math Enthusiast/Badass MC Join Date: Jun 2002 Location: Seattle
Posts: 585
| Quote:
Quote:
Those that are passionate about it and strive to succeed in this field will figure it out themselves. That's not to say, however, that my Data Structures and Algorithm Analysis class wasn't extremely helpful and the most valuable class I took in college-because it was. We had to make everything from scratch in C++: Linked lists, Queues, Stacks, Red/Black trees, binary sorts, quick sorts, etc. I think there should be 2 intro courses in college: 1 for elective students and one for CS majors. I understand that a geology major isn't going to care how this stuff works, but it's important to make a CS major learn it. Good programmers should be able to visualize exactly what is happening in their code at all times. | ||
| | |
| | #13 (permalink) |
| CHARLIE DON'T SURF! Join Date: Jul 2004
Posts: 777
| Truth is, coding your own linked list or other data structure is not that hard in any high level language, C/C++ or Java. As far as good programmers being able to visualize their code at all times, I agree to an extent (dependent on the size of the project). They should be able to visualize the process no matter what, for sure. If you know the process, then it's just a matter of tracing to find the flaw. |
| | |
| | #14 (permalink) |
| Flaccid Steel | You guys are so lucky. I am taking CIS (basically Info Tech) and my C++ professor was such a waste of time. We had like a few labs at the start of the year that covered to about chapter 5 and basically from there on, he would lecture us with the slides that came with his book. Basically, the slides is exactly what the book says. We never had a real lecture teaching us how to code. The whole class didn't learn a single thing and a classmate of mine (who already graduated from computer science) told me he is such a shitty teacher. Of course, I complained about him to my department head and he left the school (because he is not allowed to teach programming anymore). Luckly, my Java teacher is much better. Not the greatest, but I understand what is going on and having some fun along the way. |
| | |
| | #15 (permalink) |
| Math Enthusiast/Badass MC Join Date: Jun 2002 Location: Seattle
Posts: 585
| One of the biggest red flags I see when helping someone with their code is when they have no idea how to use the debugger. Me: "Ok, let's step through your code and find the problem, load up the debugger." Them: "Ok...where is that?" "sigh." Edit: To Kallian-yeah, certainly not hard in C++ but still valuable to actually step through each peice and see what's happening. Especially for me as someone who learns best by doing. Last edited by Zippygoose : 11-01-2006 at 11:18 AM. |
| | |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
| |