This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

[ADDITIONAL STUDENT CHALLENGE] Exercise your critical thinking skills  RSS feed

 
Sheriff
Posts: 12198
199
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NOTE: See first two paragraphs in this post https://coderanch.com/t/689726/java/STUDENT-CHALLENGE-suggested-threads-reply to understand the context of this thread.

This is primarily for any of our new Ranchers who are students wanting to complete their quota of posting to online forums. Anyone else is still welcome to contribute to the discussion.

The Premise

We often say around here that programming is 10% typing and 90% thinking.

At dinner last night, I was asked "How should students be taught how to program?" when I started to gripe (again) about how students are taught computer programming these days. I gave the following analogy:

In your high school English classes, you were probably taught vocabulary, grammar, and composition, right? In my opinion, the most important part in writing is composition. Whether it's an essay for English or a program for a CS course, what makes your work "good" is really the composition part. The way students are taught programming at most places of higher education these days, however, it's basically all about vocabulary and grammar. That is, it's mostly about syntax and algorithms. When it comes to writing computer programs, "composition" is about design. Good composition and good design have at least one thing in common: a clear and coherent expression of ideas.

The coding horror of Arrow Code is very easy to recognize once you know what it is. People who don't know much about "composition", i.e. design, in programming are usually the ones who write horrific Arrow Code.

The Challenge
Look at the code in the first post in this thread (see below also). It is an example of the Arrow Code antipattern (follow the other link and read about Arrow Code if you haven't already). That should be immediately apparent to you at first glance.

Discuss this: What can you do to make that code better and eliminate or reduce the amount of arrow code? 

Please post your answers as replies in this thread.
 
Junilu Lacar
Sheriff
Posts: 12198
199
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For convenience, this is the code you should discuss:
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!