Coding 101

Make sure you set yours to public or unlisted so that I can see it:

No worries!

2 Likes

Changed it … Does it work now?

2 Likes

Yep! I can see it now!

2 Likes

Great! :smiley:

2 Likes
  1. One morning I shot an elephant in my pajamas. How he got into my pajamas I’ll never know
  2. If you’re going to tell people the truth, be funny or they’ll kill you.
  3. The cure for boredom is curiosity. There is no cure for curiosity.

Is this okay?

4 Likes

The link works but it just says “Does this work?” in the link.

2 Likes

Wait, I got it now, Lumi :slight_smile:

2 Likes

I don’t see your code?

2 Likes

I just added it! :slight_smile: Can you please check? It’s 3 am and I’m tired :see_no_evil:

2 Likes

Okay, I can see it now!

2 Likes

Thanks Lumi! :heart:

2 Likes

Table of Contents:

  1. Pretend
  2. this
  3. says
  4. something
  5. important

Pretend

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ut egestas nisi. Aenean vitae diam maximus mi dignissim vulputate. Ut ultrices, eros id ullamcorper cursus, velit felis egestas nisi, eu auctor quam neque eget eros. Cras in finibus magna. Donec eu diam mauris. Duis consequat velit nunc, tempor rhoncus odio vehicula vel. Donec auctor ante id eleifend pellentesque. Aliquam sed justo est. Vivamus pulvinar est in quam convallis hendrerit. In justo sapien, rhoncus nec est ac, pretium volutpat libero. Maecenas mauris quam, commodo ac placerat sed, volutpat et quam. Sed efficitur volutpat lacus sed vehicula. Ut orci tortor, porttitor eget semper sit amet, luctus non dolor. Cras mollis fermentum posuere. Maecenas iaculis neque nisi, eu ultrices dui dapibus ac. Cras nec quam felis.

this

Quisque faucibus et erat in consectetur. Quisque ut fringilla leo, vitae sagittis augue. Donec fermentum tristique sapien consectetur sodales. Mauris pharetra luctus odio, tempus faucibus ipsum pellentesque eget. Quisque quis quam eget leo accumsan dignissim sit amet ut dolor. Quisque neque ipsum, sodales eu rhoncus at, finibus sed turpis. Nulla facilisi. Suspendisse sodales accumsan dui, ut viverra tellus. Fusce leo lorem, vestibulum at laoreet quis, lobortis hendrerit lorem. Morbi euismod ante vitae lacinia vulputate. Pellentesque purus diam, eleifend vel condimentum eu, ultricies sed turpis. Donec in maximus magna.

says

In hac habitasse platea dictumst. Etiam egestas facilisis volutpat. Aliquam id imperdiet arcu, eu porttitor felis. Proin neque urna, porta quis eros in, interdum viverra turpis. Quisque in fringilla ipsum. Nunc vel ultrices est, eu aliquam lorem. Nulla eget sodales ex. Nullam pretium augue lectus, non vehicula velit lacinia at. Nunc porta mauris eget odio auctor tincidunt. Nunc hendrerit feugiat viverra. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

something

Praesent a nunc tempus, pretium ligula condimentum, tincidunt leo. Praesent ligula ante, convallis at consectetur non, maximus et ipsum. Duis pellentesque dictum ipsum, quis vestibulum lectus iaculis ac. Nam efficitur tortor ac ante consectetur volutpat lobortis sed metus. Nulla vestibulum libero libero. Donec malesuada eros felis, lacinia faucibus neque sollicitudin eu. Maecenas sapien nisl, consectetur vitae orci at, ultricies ultricies metus.

important

Sed erat mauris, venenatis eu mollis nec, consequat at augue. Sed at tortor sed lorem ullamcorper laoreet nec id libero. Phasellus tempus scelerisque rhoncus. Donec lacus lectus, hendrerit vitae orci et, porta condimentum diam. Etiam at leo ac dolor aliquet interdum id sed dolor. Nam finibus nibh et orci pulvinar, quis finibus erat finibus. Nullam laoreet pharetra risus, et laoreet ex varius pulvinar. Mauris sapien dui, iaculis sit amet orci nec, pharetra vulputate nisl. Morbi mollis, erat nec euismod lobortis, lectus mauris varius nunc, id porta nisi ex rutrum erat. Quisque accumsan libero lectus, non feugiat eros dictum nec. Proin condimentum egestas pellentesque. Nulla suscipit libero id nisl varius volutpat. Nunc auctor lorem eget molestie semper. Donec lectus lectus, commodo eu dapibus tincidunt, molestie sed massa. Donec sit amet maximus felis, laoreet ultrices neque.

4 Likes

Course Announcement

Calling all students!

@flyingCouch @xinmure @lst-my-shp-sil @greekmyth @merinnie @Theora @deathinreverie @Forever_D_A @ValKayRee @dumplingbabe @hazelnuttys @panaceia @Beth-Pebble @floreswrites @JJJ000YYY @Nablai @keen

Welcome back to class! Hopefully, the last assignment didn’t scare you off. Speaking of the last assignment, I’ll have grades posted sometime within the next day or so. Once I’m done grading, I’ll tag you all here again so we can go through the grading scheme together as well as how you all did. As always, let me know if you have questions or concerns and I’ll get back to you as soon as I can.


Unit 2: Learning to Use Anchors

So, in the grander scheme of things, this feature may not be as important as others to learn but I’m teaching it to you with one main goal in mind. You need to learn the importance of paying attention to close details. Missing one semi-colon or using the wrong quotation mark can be the difference between your code working and it not working. After staring at strings of letters all day long, it’s just easy to make mistakes like that. If a piece of code isn’t working and you can’t figure out why, it’s either time to take a break or find another set of eyes to help you find the problem. Anchors are a good chance to learn this.

But what are anchors? Well, anchors create links within your post that allow you to link to a later portion of the same post. It comes in handy when constructing text-heavy threads that begin with a table of content. For a live demonstration of what it may look like, please click here and take a look.

Now, let’s try deconstructing the code involved so that we can use anchors for our own posts. With anchors, you need a starting place and a final destination. You start at the start, and through the use of the anchor (think of it like a map!), you end up at your destination. Did I lose any of you yet?

Typically, multiple starting places are arranged in a way to form a table of contents with each anchor or map taking you to a different heading or destination. The following code is an example of what a starting place may look like:

<a href="#heading--example">Section 1</a>

The word “example” can be changed to whatever you want to name the anchor. It’s best to keep the names simple but descriptive enough that you can remember where it leads. It pairs up with the following code for the final destination:

<h2 id="heading--example"><a href="#example">The Wonders of Magic</a></h2>

Again, notice how the word “example” is used here. If you change the word used in the starting place’s code, you have to make sure to also change it in the final destination so that the two match up and the code actually works. If you use multiple anchors, make sure each word is different. If you don’t quite understand what this means, that’s okay. It’ll become more clear as you practice more with anchors.

Now, it’s time for you all to give it a go! Here’s what I expect your submission to include:

- at least 3 anchors (each leading to a different section)
- table of contents (optional but a plus if you include it)

Direct reply to this message with your submission by August 24th 6pm PDT. Grades will be given shortly. If, at any point during this assignment you wish to ask a question, feel free to tag me and ask!

10 Likes

@astrophile

Hey, is it okay if I use dpaste instead of Pastebin?

2 Likes

May I ask why?

2 Likes

May I ask why you guys prefer to store your codes offsite instead of just pasting it directly into the message?

2 Likes

Sharing the code in a Pastebin link is what I did last time I ran this course and it made grading easy for me, so I kept that aspect this time around, too.

Also, the whole escape/unescape thing is a bit annoying.

3 Likes

Fair enough.

You don’t have to escape your code if you use encase your code with the triple backtick (```).

2 Likes

Yeah, I know of that method. For certain things like this, where I shared the code in the dropdown, you have to scroll quite a bit to see the ends of each line and you can’t even see the whole code at one glance.


Edit: It’s basically a personal preference thing.

3 Likes

Oh yeah that whole scrolling thing really can be a pain.

2 Likes