Challenge 1
Back to Home

A Journey Through Time

I'm standing in the middle of a city that's both familiar and strange. The buildings are taller, the streets are cleaner, and the sky is a shade of blue I've never seen before. But there's no one here. Not a single soul. Just me.

I've been stuck in this future for days now, and I'm desperate to get back to my time. Back to my friends, my family, my school. I miss the noise, the chaos, the life. Here, it's just silence.

I've found a computer in an abandoned library. It's sleek and shiny, unlike anything I've seen before. But it's my only hope. I need to send a message to the past, to someone who can help me.

I remember my computer science class from middle school. We were learning C#, a programming language. I was never really good at it, but now, it's my only hope. I start typing, my fingers flying over the keyboard.

"Help. I'm stuck in the future. Please, I need to get back."

I hit enter and wait. The screen flickers, then goes blank. I feel a pang of disappointment. But then, words appear on the screen.

"Who is this? How can I help?"

I gasp. Someone's there. Someone's listening. I quickly type back.

"I'm a girl from the past. I don't know how I got here, but I need to get back. Can you help?"

There's a pause. Then, the words appear.

"I'll try. I know C#. Maybe we can figure something out."

Days turn into weeks. We communicate through the computer, trying to figure out a way to bring me back. I describe the future to him, the strange buildings, the eerie silence, the loneliness. He tells me about the past, about school, about his friends. I miss it all so much.

One day, he sends me a message.

"I think I've figured it out. You need to type this code into the computer."

I follow his instructions, my heart pounding in my chest. I hit enter and close my eyes. When I open them, I'm back. Back in my time. I can hear the noise, the chaos, the life. I've never been so happy to see my school, my friends, my family.

I rush to the computer lab, to the boy who helped me. He's sitting there, typing away on his computer. He looks up as I approach, his eyes wide.

"You're the girl from the future,"

I nod, tears welling up in my eyes. "Thank you," I say. "You saved me."

He smiles, and I know we're going to be friends. Friends who share a secret no one else will ever understand.

Can You Send a Message to the Screen?

Use C# to write a simple program that displays a message on your computer screen.

Thinking about Code...

using System;

This line tells the computer that we're going to use a set of predefined tools from the "System" library. It helps us not to write everything from scratch and makes our job easier.

namespace SendMessage

A "namespace" is a way to group related pieces of code together. Here, we're creating a namespace called "SendMessage". It helps keep our code organized and prevents naming conflicts with other parts of code.

public class Program

A "class" is like a blueprint that defines the behavior and properties of an object. In this case, our class is named "Program". Inside this class, we can put functions and data related to this "Program".

public static void Main()

This is a special function called "Main". When we run our program, the computer looks for this "Main" function and starts executing the code inside it. It's the starting point of our application.

Console.WriteLine("Your message here!");

This line of code does one simple thing: it displays the text "Your message here!" on the computer's screen. "Console.WriteLine" is a tool we use to print text to the console or terminal window.

To sum it up: This code sets up some basic tools, creates a group for our code called "SendMessage", defines a blueprint named "Program", and has a starting point where it displays a message to the screen.

Reflections

Breaking Tradition

Traditionally, the very first program that a person learns to write is called "Hello World". The purpose is to display "Hello World" on the screen. While it provides the satisfaction of writing an actual program and seeing it work, it might seem lacking in deeper purpose.

The concept of sending a message, however, extends far beyond the simplicity of the "Hello World" program. Much of modern-day programming involves sending messages. Imagine transmitting messages to computers separated by vast distances. Such messages might even traverse space when internet connections utilize satellites. We often send messages to different devices, such as audio speakers, printers, or disk drives. This initial application seeks to emphasize the significance of the act of sending a message. And who knows, perhaps one day we will be able to send messages to the past.

An error has occurred. This application may no longer respond until reloaded. Reload 🗙