Let's Self-Study Comp Sci for 2011-2012!

<p>BK, Khan Academy is the one that has Python. If you can, you should do the Karel assignments, they’re super fun and teaches you more about programming than Java.</p>

<p>and I’ve just finished the StoneMasonKarel code. I’d love feedback, corrections, improvements, or anything!</p>

<p>/*

  • File: StoneMasonKarel.java

  • The StoneMasonKarel subclass fully repairs damaged pillars in Karel’s world. It does not * place more than one stone on any corner.
    */</p>

<p>import stanford.karel.*;</p>

<p>public class StoneMasonKarel extends SuperKarel {</p>

<pre><code>public void run() {
turnLeft();
moveToTop();
turnRight();
while (frontIsClear()) {
buildPillar();
turnRight();
moveToNextPillar();
}
buildPillar();

}
</code></pre>

<p>/* Pre-condition: Karel is at the bottom of a pillar facing north.

  • Post-condition: Karel is at the top of a pillar facing north.
    */
    private void moveToTop() {
    while (frontIsClear()){
    move();
    }
    }</p>

<p>/* Pre-condition: Karel is at the top of a pillar facing north.

  • Post-condition: Karel has returned to the top of the pillar, replacing all missing stones, and facing north.
    */
    private void buildPillar() {
    turnRight();
    while (frontIsClear()) {
    if (noBeepersPresent()){
    putBeeper();
    move();
    } else {
    move();
    }
    }
    turnAround();
    if (noBeepersPresent()){
    putBeeper();
    }
    moveToTop();
    }</p>

<p>/* Pre-condition: Karel is at the top of a pillar facing East.

  • Post-condition: Karel is at the top of the next pillar facing East.<br>
    */
    private void moveToNextPillar() {
    move();
    while (leftIsClear()){
    move();
    }
    }</p>

<p>}</p>

<p>is it too late for me to start this…? Will I catch up?</p>

<p>School hasn’t even started, you have plenty of time :)</p>

<p>Yeah but I’ll likely do better if doing it with a group, maybe their school has begun.</p>

<p>That’s great you are doing this together. My son did the Stanford class himself last semester. His school doesn’t offer programming classes, so he was able to get a semester of credit for intro to java. Have fun!</p>

<p>My school hasn’t started. Just watch the first 3 stanford lectures asap and buy barron’s, I can’t imagine that anyone in this thread is very far yet.</p>

<p>My online AP Comp Sci for Georgia Virtual Schools started Monday and now I’m a couple weeks ahead. It really moves too slowly. Sounds like I’ll need to work through Barron’s or Stanford lectures in the meantime.</p>

<p>Can someone pleas help me set up Eclipse so I can do Karel? I downloaded it and whenever I try to open it I get a message saying “The eclipse executable launcher was unable to locate its companion library”. I run Windows. Does anyone have any step by step instructions?</p>

<p>to all having trouble with Karel…you need the STANFORD version of Eclipse:</p>

<p>check the official CS106A website to download that: [CS106A</a> Programming Methodology](<a href=“http://www.stanford.edu/class/cs106a/]CS106A”>CS106A Home)</p>

<p>To be honest though, Karel is a great intro fro loops, etc…but I don’t like it :frowning:
Starting lecture 4 right now. Good luck everyone!</p>

<p>I’m suppose to watch Programming Methodology</p>

<p>^^that was a question btw</p>

<p>I don’t really have time to read through this thread right now, but I would like to self study comp. sci. with you guys. If someone could post links to the Stanford lectures and the programs I need, I would love you forever :P</p>

<p>I think(but im not 100% sure) we’re suppose to watch the Programming Methodology Lectures. Im on Lecture one and the teacher is awesome, wish my crappy public school had teachers like him. :stuck_out_tongue: [Lecture</a> 1 | Programming Methodology (Stanford) - YouTube](<a href=“Lecture 1 | Programming Methodology (Stanford) - YouTube”>Lecture 1 | Programming Methodology (Stanford) - YouTube)</p>

<p>do you guys recommend I do the assignments? I’m taking notes but don’t think it’s enough</p>

<p>eeek, I’m on lecture 4 and they’ve started talking a little about graphics…and there is nothing on graphics on the test itself. What to do…?</p>

<p>@ iwaitz4u, you should really just look through the thread, it takes like two minutes.</p>

<p>@ MegaFund, I recommend you do the assignments. It’s a nice way to pass the time and very rewarding.</p>

<p>@ LilBaller, it depends on your reason for self studying APCS. Are you planning on actually programming later in life, or are you just doing it for the credit? I’d watch the lectures just because it’s nice to know more about the subject than what is being tested.</p>

<p>^you’re right</p>

<p>Can someone please help me? I downloaded Eclipse from the Stanford website but it won’t let me open it. Whenever I try to it starts up and then a message appears saying “Failed to load the JNI shared library “C:\ProgramFiles\Java\jdk1.6.0_26\bin\server\jvm.dll”.” I also downloaded the Java JRE Installer from the Stanford website but when I try to run it a message appears saying “C:\Users\Owner\Desktop\Dr.Java\Downloads\jre-6u2-windows-i586-p.exe is not a valid Win32 application.” I really want to start working on this but I can’t even do the first assignment :[ If it helps at all I can run Dr. Java fine, and I save all programming related files in a folder named Downloads inside a folded named Dr. Java thus the \Dr.Java\Downloads\ part. I’d appreciate any sort of help immensely! Thanks.</p>

<p>I don’t know the fix for that but im sure others has had the same problem. Look it up in google, there should be a fix or explanation somewhere.</p>

<p>[Eclipse</a> Community Forums: Newcomers Failed to load JNI shared library](<a href=“Eclipse Community Forums: Newcomers » Failed to load JNI shared library”>Eclipse Community Forums: Newcomers » Failed to load JNI shared library)</p>