Skip to content

Instantly share code, notes, and snippets.

@tjg
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjg/e3f053b1522e5b4c0c85 to your computer and use it in GitHub Desktop.
Save tjg/e3f053b1522e5b4c0c85 to your computer and use it in GitHub Desktop.

[Something I learned later: they have major coding test(s) on paper. Biased against otherwise successful programmers with dyslexia.]

Hi [redacted]!

Some thoughts based on my weak understanding of your situation. Please skip anything unhelpful!

You're welcome to email me: tjg@pentaside.org

Initial thoughts

I'd personally consider dropping the class [CS 2110]:

  • Zero respect for your time: "They have no problem losing a third of the students (or more)."

  • Java+Eclipse are extraneous overhead — and poor user-interfaces to computation. Python's the obvious choice — they teach it, supports interactive programming, and lets you only write code that matters (instead of boilerplate).

  • Instructors admit "60% of students have not seen Java prior to taking this course", and are too lazy/incompetent to support additional options like Python.

  • Why mandate a one-size-fits-all 1000-page book instead of simply focusing on your programs? (Or at least why not point you to "Design and Analysis of Computer Algorithms" by Aho/Hopcroft/Ullman and "Programming Pearls" by Bentley?)

  • The algorithms/datastructures covered by the course are usually available as (optimized, debugged) libraries or StackOverflow snippets.

  • They say, "Did you have binary search in your previous course? If so, this should be easy." Cruel! Binary search is notoriously hard to get right — Java had a bug in it for 9 years; professional programmers screw it up all the time.

(Nothing's easy, except falling for the Dunning-Krueger effect. Ironically, Dunning & Krueger developed it at Cornell...)

Techniques that might speed you up

You mention Java (not the concepts) is the main problem. Techniques to consider & combine:

  • "Pseudocode programming process": a) type pseudocode, b) turn it into comments in your sourcecode file, c) implement it between the comments.

  • First work in a programming language you like. (Python?) Then translate your debugged, polished, tested code into Java.

  • "Test-driven design": Write unit-tests first. (Don't forget edge-cases.) Then write the code which makes your tests pass.

  • Do your work on paper, then implement the code. Because typing in symbols is an impoverished user-interface. (Paper's also weak, but more flexible than just symbols.)

  • Hammock-driven development: Lie back & think. [Video, transcript]

  • Use lots of print statements to visualize what your code really is doing.

These techniques attack a central problem of Java — juggling multiple ideas simultaneously. (Declaring types, public/private...) Mental focus is vital.

Another problem with Java is people constantly use custom interfaces instead of generic data. Example:

// No preexisting code in the world supports your new Point type.
// Java devs need heavyweight IDEs to navigate the rat's nest of custom interfaces like this.
new Point(2,5);
// Zillions of functions operate on Map types.
{x: 2, y: 5}

Institutional critiques

Helps me act effectively, when I learn why an institution is so dysfunctional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment