Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Loops and compitency of recent CS grads

Reply
Thread Tools

Loops and compitency of recent CS grads

 
 
Josh Mcfarlane
Guest
Posts: n/a
 
      10-28-2005
TIT wrote:
> A complex mind lacks simple thoughts =)


Sometimes, but rarely do these over-the-top cases work as intended,
which is part of what brought about this post.

 
Reply With Quote
 
 
 
 
puzzlecracker
Guest
Posts: n/a
 
      10-29-2005

Josh Mcfarlane wrote:
> TIT wrote:
> > A complex mind lacks simple thoughts =)

>
> Sometimes, but rarely do these over-the-top cases work as intended,
> which is part of what brought about this post.

Why don't you show us a sample of your code? Thus, the coding problems
may be inherent to a completely different source. Additionally, your
English writing doesn't reflect any teacher/professorial
attributes...can't say no more, for it is already off-topic...

 
Reply With Quote
 
 
 
 
Ian
Guest
Posts: n/a
 
      10-29-2005
Josh Mcfarlane wrote:
> Just sort of curious because of a trend I've been noticing.
>
> Around here, most of the newer students and even some professionals
> that pick up C++ or another similar language tend to do inefficient
> things with loops / iterations, such as:
>

Many people "know" a language, which often means one way of doing
something and they are often unwilling to experiment or expand their
knowledge. I've seen this a lot over the years and not just with junior
staff.

Ian
 
Reply With Quote
 
Josh Mcfarlane
Guest
Posts: n/a
 
      10-29-2005
puzzlecracker wrote:
> Why don't you show us a sample of your code? Thus, the coding problems
> may be inherent to a completely different source. Additionally, your
> English writing doesn't reflect any teacher/professorial
> attributes...can't say no more, for it is already off-topic...


This wasn't about my code. This was about a common problem I noticed
with loops and some of the programmers around here. I end up having to
go in and fix things, not because they're unclear in meaning, but in
attempting to be complex or doing things in the first mentioned
example, they screw something up (such as record iteration) and it
brings in undefined behavior.

 
Reply With Quote
 
Jim Langston
Guest
Posts: n/a
 
      10-29-2005

"Josh Mcfarlane" <> wrote in message
news: oups.com...
> Just sort of curious because of a trend I've been noticing.
>
> Around here, most of the newer students and even some professionals
> that pick up C++ or another similar language tend to do inefficient
> things with loops / iterations, such as:
>
> array[0] = 0;
> for (int i =1; i < size; ++i)
> {
> array[i] = i;
> }


A few ways this could come about. Some new programmer trying to think how
to do something to a variable. "lets see. I want to initialize it to 0.
That would be X = 0. Oh, X is an array, so I need X[0] = 0. There got it.
Oh, gotta do the rest. lets see, already did 0 so..."

Or, most likely. "Ahh, let me initialize my size variable array. for (int
i = 1; i < size; ++i)" later "Dang, what bug, oh, forgot to initialize 0.
Umm.. I'll just throw it up top."

>
> or my favorite
> for (int i = 0; i < 2*size; ++i)
> {
> if (i % 2 == 0)
> dofunct(array[i/2]);
> else
> dootherfunct(array[i/2]);
> }
>
> Is proper iteration really that hard of a concept to grasp?
>


Actually, for people new to programming iteration is a total mystery. They
still have a hard time understanding how X = X + 1 can be true when their
algebra teacher told them both sides need to be equal...

Just unlearning a lot of things and learning back over.

I remember going through this phase many many years ago. When I didn't even
understand 2/3 of what I wrote, but it worked dag nab it so it must be
right! I better not touch it or I might break it again...


 
Reply With Quote
 
TIT
Guest
Posts: n/a
 
      10-29-2005
Josh Mcfarlane sade:
> Just sort of curious because of a trend I've been noticing.
>
> Around here, most of the newer students and even some professionals
> that pick up C++ or another similar language tend to do inefficient
> things with loops / iterations, such as:
>


I doubt that you'll only find irritating code in iterations. The
recent decade of mass production of programmers may have led to
a decay of the avarage programmers capabilities.

I once accused a c++ teacher at a university in 2001 for
teaching the concept of pointers way too late, and he replied:
"You know, in Java you don't even have pointers."

TIT
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dads & Grads Superstore best Cisco 0 05-21-2009 05:57 PM
Dads & Grads Superstore fighter ASP .Net 0 05-21-2009 03:48 PM
Dads & Grads Superstore diehard4.0 C Programming 0 05-21-2009 03:19 PM
Dads & Grads Superstore diehard4.0 Python 0 05-21-2009 03:19 PM
Opinions on college grads in this field Matthew Superstar Swass HTML 4 07-28-2004 03:44 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57