This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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

 
Sheriff
Posts: 13155
219
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: 13155
219
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:
 
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!