<p>tl;dr/ Students tend to do what they have the most practice doing. But timed contests can advantage/disadvantage some students independent of skill and background. </p>

<p>I have to admit I'm not a big fan of timed contests for programming. I don't know if that is the situation here, of course. The problem is that they favor <em>quick thinking</em> over <em>deep thinking</em>. If you don't have time to get <em>something</em> for every question your score likely suffers even if your solutions to the ones you work on are brilliant. </p>

<p>My advice to a student taking such a challenge would be to get <em>something</em> for every question. </p>

<p>That said, I would expect that students who have seen a lot of OO, and, in particular, have written a lot of classes themselves would naturally (and quickly) put down a class framework and then write methods. Less likely (given time constraints) would they do a problem decomposition into appropriate helper objects and composition of objects to solve any problem. It just takes too long, unless they have an IDE that will produce class/method templates at a click, or use JUnit or similar to build the application scaffolding for a given test. </p>

<p>Likewise, I'd expect that a student with little experience in creating classes would be more likely to just write functions, even if they had seen objects/classes. In a way, assuming that the test judging criteria allow either approach, these students may have a bit of a time advantage since there is less to type. </p>

<p>The psychological effect here is that you tend to do what you have the most practice doing. So Object-Early students automatically start by writing class ..... and Object-Late students may not. But there is little time for reflection on the quality of your overall structure in any case. And likely none for refactoring. </p>

<p>A possible countering psychological effect, since the competitions/challenges take place during the school year is that there is a tendency to repeat what you have most recently been focused on, being fresh in your mind, though less settled. </p>

<p>My bottom line, however is that programming isn't best tested in a timed environment, especially when the questions can be tricky in some sense, where you get an advantage, perhaps serendipitously, if you just think of the trick involved or have seen it before. Some students (my history says I'm one of them) is disadvantaged in this situation. </p>

<p>On the other hand, I can write code very quickly (hundreds of correct lines of code per day) with good tools and practices, including test-driven development with a good IDE (Eclipse). But if you give me a variation of NIM or some other mathematical puzzle, I'll stare at it for too long. </p>

<hr>

<p>I also teach objects from the start (before <code>if</code> and <code>while</code>) since I value large scale structure over small. That is, providing a solid framework for the smaller scale issues. </p>

CC BY-SA 3.0
2018-02-08T18:59:13.190Z
"You tend to do what you have most practice doing." Indeed.
Mr Bradley
CC BY-SA 3.0
2018-02-08T18:16:19.090Z
2018-02-08T19:08:31.277Z
2018-02-08T19:08:31.277Z
Buffy
<p>Here is the essential parts of a (HS) Junior level question from one of our (Canadian) national computing challenges.  (<a href="http://www.cemc.uwaterloo.ca/contests/computing/2017/stage%201/juniorEF.pdf" rel="nofollow noreferrer">http://www.cemc.uwaterloo.ca/contests/computing/2017/stage%201/juniorEF.pdf</a>)</p>
<h3>Problem start</h3>
<p>Input Specification:<br />
The first line of input contains the integer x (−1000 ≤ x ≤ 1000; x != 0). The second line of input contains the integer y (−1000 ≤ y ≤ 1000; y != 0).</p>
<p>Output Specification<br />
Output the quadrant number (1, 2, 3 or 4) for a specific x,y coordinate.</p>
<h3>end</h3>
<p>I have long suspected a difference in the outcome between objects-early and objects-late.  For instance, a student who was given an objects-early approach might create code like this:</p>
<pre><code>public class Point
{
    public Point( int x, int y)
    {
        this.x = x;
        this.y = y;
    }

    public int getQuadrant()
    {
        if(x&gt;0 &amp;&amp; y&gt;0) return 1;
        if(x&gt;0 &amp;&amp; y&lt;0) return 4;
        if(x&lt;0 &amp;&amp; y&gt;0) return 2;
        if(x&lt;0 &amp;&amp; y&lt;0) return 3;
        return 0;   // origin or no quadrant
    }

    private int x = 0;
    private int y = 0;
}
</code></pre>
<p>Whereas a student who was given an objects-late approach might create code more like so:</p>
<pre><code>public int determineQuadrant1( int x, int y )
{
        if(x&gt;0 &amp;&amp; y&gt;0) return 1;
        if(x&gt;0 &amp;&amp; y&lt;0) return 4;
        if(x&lt;0 &amp;&amp; y&gt;0) return 2;
        if(x&lt;0 &amp;&amp; y&lt;0) return 3;
        return 0;   // origin or no quadrant
}
</code></pre>
<p>And similarly later in the same challenge students were asked if there could arrive at a destination (coordinate) using an exact number of moves (energy) and I noticed these types of solutions:</p>
<pre><code>public class Point {
      public int distanceTo( Point p )
      { return | x – p.x | + | y – p.y | ; }    // math notation used }
</code></pre>
<p>While Late Objects students continued to approach the solution as functions with:</p>
<pre><code>int getDistance( int x1, int y1, int x2, int y2 )
{ /* same math */ }
</code></pre>
<p>What I think I am seeing is a preference for Early Object students to employ objects and services in their solutions from the start, while Late Object students kind of ease into it if at all.
I have additional examples from questions later in the challenge that seem to support this.</p>
<p>Is there evidence, either published or anecdotal, that I am correct?  Do we know that the order of instruction matters here?</p>

CC BY-SA 3.0
2018-02-08T16:52:05.803Z
I have other more substantial examples I can share/post if required for clarification.
Mr Bradley
CC BY-SA 3.0
2018-02-08T16:57:47.897Z
Say more about what you mean by "outcomes". The code may be different, but is either necessarily to be preferred, especially in the context of a programming contest?
Buffy
CC BY-SA 3.0
2018-02-08T17:30:52.713Z
Is x! = 0 supposed to be x != 0?
candied_orange
CC BY-SA 3.0
2018-02-08T17:40:15.743Z
@CandiedOrange yes it should read x != 0
Mr Bradley
CC BY-SA 3.0
2018-02-08T17:46:29.333Z
Fixed, I hope. MathJax was formatting oddly.
Buffy
CC BY-SA 3.0
2018-02-08T17:47:25.507Z
@buffy the outcomes I refer to is not the code, rather the thinking process or paradigm the students use to solve problems. I am attempting to ascertain if an early objects approach helps to create or establish a different perhaps more effective way to solve problems. The example posted above is just the intro, the next few questions in the competition show a more pronounced effect. Indeed most EO students seem to get farther through the test.  Do you have any similar experience?
Mr Bradley
CC BY-SA 3.0
2018-02-09T03:36:03.413Z
"Objects late"  causes students to learn to write FORTRAN programs in Java.
Bob Brown
CC BY-SA 3.0
2018-03-11T00:13:11.283Z
Anecdotal evidence from one source (not high enough standard to consider an answer) - my wife. When she was in high school, she was initially taught using Borland Pascal, without introducing the objects of the Borland frameworks.  When she moved to a new high school the next year, she was unable to even begin to grasp how the object modeled event driven screens of the (then) modern UI worked.  In contrast, her object first peers had no problem picking up command line programming when it was introduced later. I'd call that a difference in outcome.
pojo-guy
CC BY-SA 3.0
2018-04-14T12:32:12.307Z
In the contest context, the first code example is quite clearly overengineered. Literally half of the code is a useless boilerplate. Of course, there are advantages to the object based approach, but they are all about things like maintainability and extendability: completely irrelevant in the competition environment. Also, object-based approach may easily be a red herring: you may start modelling the domain first, instead of determining what computation you need and which parts of the domain are really relevant.
Frax
<curriculum-design><java><object-oriented-paradigm>
Is there evidence of differences in the outcomes of objects-early vs objects-late?
# Is there evidence of differences in the outcomes of objects-early vs objects-late?

(Asked by: username_0 on 2018-02-08)

Here is the essential parts of a (HS) Junior level question from one of our (Canadian) national computing challenges.  (http://www.cemc.uwaterloo.ca/contests/computing/2017/stage%201/juniorEF.pdf)
Problem start
Input Specification:
The first line of input contains the integer x (−1000 ≤ x ≤ 1000; x != 0). The second line of input contains the integer y (−1000 ≤ y ≤ 1000; y != 0).
Output Specification
Output the quadrant number (1, 2, 3 or 4) for a specific x,y coordinate.
end
I have long suspected a difference in the outcome between objects-early and objects-late.  For instance, a student who was given an objects-early approach might create code like this:
public class Point
{
    public Point( int x, int y)
    {
        this.x = x;
        this.y = y;
    }

    public int getQuadrant()
    {
        if(x>0 && y>0) return 1;
        if(x>0 && y<0) return 4;
        if(x<0 && y>0) return 2;
        if(x<0 && y<0) return 3;
        return 0;   // origin or no quadrant
    }

    private int x = 0;
    private int y = 0;
}

Whereas a student who was given an objects-late approach might create code more like so:
public int determineQuadrant1( int x, int y )
{
        if(x>0 && y>0) return 1;
        if(x>0 && y<0) return 4;
        if(x<0 && y>0) return 2;
        if(x<0 && y<0) return 3;
        return 0;   // origin or no quadrant
}

And similarly later in the same challenge students were asked if there could arrive at a destination (coordinate) using an exact number of moves (energy) and I noticed these types of solutions:
public class Point {
      public int distanceTo( Point p )
      { return | x – p.x | + | y – p.y | ; }    // math notation used }

While Late Objects students continued to approach the solution as functions with:
int getDistance( int x1, int y1, int x2, int y2 )
{ /* same math */ }

What I think I am seeing is a preference for Early Object students to employ objects and services in their solutions from the start, while Late Object students kind of ease into it if at all.
I have additional examples from questions later in the challenge that seem to support this.
Is there evidence, either published or anecdotal, that I am correct?  Do we know that the order of instruction matters here?

**Tags:** curriculum-design, java, object-oriented-paradigm

> **Comments:**
> **username_0**: I have other more substantial examples I can share/post if required for clarification.  
> **username_1**: Say more about what you mean by "outcomes". The code may be different, but is either necessarily to be preferred, especially in the context of a programming contest?  
> **username_2**: Is x! = 0 supposed to be x != 0?  
> **username_0**: @CandiedOrange yes it should read x != 0  
> **username_1**: Fixed, I hope. MathJax was formatting oddly.  
> **username_0**: @buffy the outcomes I refer to is not the code, rather the thinking process or paradigm the students use to solve problems. I am attempting to ascertain if an early objects approach helps to create or establish a different perhaps more effective way to solve problems. The example posted above is just the intro, the next few questions in the competition show a more pronounced effect. Indeed most EO students seem to get farther through the test.  Do you have any similar experience?  
> **username_3**: "Objects late"  causes students to learn to write FORTRAN programs in Java.  
> **username_4**: Anecdotal evidence from one source (not high enough standard to consider an answer) - my wife. When she was in high school, she was initially taught using Borland Pascal, without introducing the objects of the Borland frameworks.  When she moved to a new high school the next year, she was unable to even begin to grasp how the object modeled event driven screens of the (then) modern UI worked.  In contrast, her object first peers had no problem picking up command line programming when it was introduced later. I'd call that a difference in outcome.  
> **username_5**: In the contest context, the first code example is quite clearly overengineered. Literally half of the code is a useless boilerplate. Of course, there are advantages to the object based approach, but they are all about things like maintainability and extendability: completely irrelevant in the competition environment. Also, object-based approach may easily be a red herring: you may start modelling the domain first, instead of determining what computation you need and which parts of the domain are really relevant.  

---

## 1 answers

### Answer by username_1 on 2018-02-08. Score: 1

tl;dr/ Students tend to do what they have the most practice doing. But timed contests can advantage/disadvantage some students independent of skill and background.

I have to admit I'm not a big fan of timed contests for programming. I don't know if that is the situation here, of course. The problem is that they favor *quick thinking* over *deep thinking*. If you don't have time to get *something* for every question your score likely suffers even if your solutions to the ones you work on are brilliant.

My advice to a student taking such a challenge would be to get *something* for every question.

That said, I would expect that students who have seen a lot of OO, and, in particular, have written a lot of classes themselves would naturally (and quickly) put down a class framework and then write methods. Less likely (given time constraints) would they do a problem decomposition into appropriate helper objects and composition of objects to solve any problem. It just takes too long, unless they have an IDE that will produce class/method templates at a click, or use JUnit or similar to build the application scaffolding for a given test.

Likewise, I'd expect that a student with little experience in creating classes would be more likely to just write functions, even if they had seen objects/classes. In a way, assuming that the test judging criteria allow either approach, these students may have a bit of a time advantage since there is less to type.

The psychological effect here is that you tend to do what you have the most practice doing. So Object-Early students automatically start by writing class ..... and Object-Late students may not. But there is little time for reflection on the quality of your overall structure in any case. And likely none for refactoring.

A possible countering psychological effect, since the competitions/challenges take place during the school year is that there is a tendency to repeat what you have most recently been focused on, being fresh in your mind, though less settled.

My bottom line, however is that programming isn't best tested in a timed environment, especially when the questions can be tricky in some sense, where you get an advantage, perhaps serendipitously, if you just think of the trick involved or have seen it before. Some students (my history says I'm one of them) is disadvantaged in this situation.

On the other hand, I can write code very quickly (hundreds of correct lines of code per day) with good tools and practices, including test-driven development with a good IDE (Eclipse). But if you give me a variation of NIM or some other mathematical puzzle, I'll stare at it for too long.

---

I also teach objects from the start (before `if` and `while`) since I value large scale structure over small. That is, providing a solid framework for the smaller scale issues.

> **Comments:**
> **username_0**: "You tend to do what you have most practice doing." Indeed.  

---

