question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Users blindly copying example

See original GitHub issue

Describe the Issue

I like the updated description better, but now users are blindly copying the example and jamming it into their code instead of reading the instructions… I’m not sure how to help prevent that?

Affected Page

https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-6

Your code

Sample User Code:

<html>
 <body>
   <h1>CatPhotoApp</h1>
   <main>
 <ul> 
      <li> Child Element 1 </li>
      <li> Child Element 2 </li>
</ul>
   <h2>Cat Photos</h2>
        <!-- TODO: Add link to cat photos -->
   <p>Click here to view more cat photos.</p>
   </main>
 </body>
</html>

Expected behavior

Users should read.

Screenshots

No response

System

All

Additional context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:24 (23 by maintainers)

github_iconTop GitHub Comments

4reactions
jeremyltcommented, Jun 10, 2022

Step 6

In the previous step, you nested the h2 element, comment, and p element within the main element. Indenting nested elements two more spaces than their parent element improves readability:

<ul> 
  <li> This `li` element indented </li>
  <li> This `li` element is also indented </li>
</ul>

Add two spaces in front of the h1, comment, and p elements so your HTML is more readable.

2reactions
bbsmoothcommented, Jun 15, 2022

Just more random thoughts on this.

Perhaps we should add some tests that look for the <ul> and <li> elements and then we could give feedback telling them that they should not add any new elements to the HTML and even recommend they restart the step.

Or add a note just below the code example that makes it clear that it is just an example and they should not add any new elements to their HTML.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do we blindly copy and paste code? - iDiallo
It's an example. Yes, for the author it is only an example, and no one in their right mind will copy and paste...
Read more >
Don't copy-paste commands from webpages — you can get ...
And so, another reason to never blindly trust what you copy from a web page—better paste it in a text editor first. A...
Read more >
Blindly Copy-Pasting Code is BAD: A Gentle Reminder!
Copying and pasting any code without understanding what it does has always been a bad idea. If you don't understand it, then don't...
Read more >
The Risks of Imitating Designs (Even from Successful ...
Here are some clear examples of designs that definitely should not be copied, in case you aren't convinced — or, in case you...
Read more >
Five Reasons Why Copying Someone Else's Terms of Use ...
For example, some other company's Terms: ... describe your actual user data handling practices (very likely, if you've simply copied your ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found