I could use some help with a teaching skill.
How to teach someone how to code without clutter?
(An unrepentant clutterer)
I could use some help with a teaching skill.
How to teach someone how to code without clutter?
(An unrepentant clutterer)
how is it clutter? (also i was only in 7th grade at the time, and had been using mit app inventor for 2 months+we hadnt learn how to use tiny dbs in full length)
Let's start with defining clutter.
Have you ever visited an old person's home and been surprised by the mounds of old stuff on the floor and on shelves, piled up over years with the intention of getting around to them in the far future that never comes?
Clutter slows you down over time, as you find yourself lifting things out of the way just to get from here to there.
Cluttered code also slows down the code reader, as it forces the reader of the code to have to do the mental heavy lifting of searching the rest of the code for hints as to what the name or literal value means.
Example of clutter in code:
Considering that App Inventor is a platform for people to learn programming and it’s perfectly reasonable for people to start with non optimal coding practices. Could we also educate what is an example of a better way to program without cluttering?
The community here is "cluttered"
with example of good coding practice !
I wrote back joethebob in his original post in the Help category, trying to give an explanation of where to start (good naming practices).
The Design and Coding interfaces encourage technical debt by autonaming and autonumbering their newly created objects.
The one exception is the Screen creation sequence:

When you create a new screen, you are forced to adjust its name before it will proceed with the creation of the Screen.
Other places, not so much:


This tempts the lazy coder to leave renaming for later, in their rush to create.
Is it wiser to force forethought from the moment of decision to create, or to let the student suffer from technical debt later?
I would go with the first choice, always popping up a rename dialog at creation.
This is probably a major change, so i dare not hope for it.
i mean, how is this cluttered code? its necessary bc we needed to use tiny dbs for the project, and its needed btw.
and ive already explained elsewhere why i dont name my code. i find this extremely insensitive and ignorant
and i also added comments btw
I have moved this out of the Welcome New Teachers thread, as it's a new topic.
I gave it a new headline too.
Though this board serves an entire world of people with different upbringings, religions and cultures, there is a common denominator.
How can we tell the difference between Good and Evil?
My best summary was:
Good: Feels bad now, but as a result feels better later.
Evil: Feels nice now, but as a result feels worse later.
Military training camps have their new recruits make their beds and stand at attention for their inspection, before breakfast.
This instils in the new recruits a habit of discipline that serves them well both in their military service and later in their civilian life.
(I am not suggesting your parents send you to military school. (yet).)
Creating new variables and procedures is a process that can tempt a coder to be lazy and save renaming for later, falling back on autonumbered content for names of procedures, variables, and components.
Autonumbering has its place in some contexts, for example a spreadsheet input form or a chess board. But even then, it should build on a descriptive root (cellA1, cellA2,...) .
The object creation work flow in Ai2 encourages lazy behavior, leaving naming for later. But if not now, when?
I’d start by isolating one block at a time instead of changing everything at once. What exactly happens on the app screen when you run it, and which button or feature isn’t working?