Code Street ๐Ÿ˜พ๐Ÿ’ป๐ŸŒ
21 subscribers
4 photos
1 video
2 files
1 link
Download Telegram
๐Ÿง  Topic: Algorithm and Problem Solving

โœ๏ธ What Is an Algorithm?

> An algorithm is a set of clear, step-by-step instructions used to solve a problem or complete a task.

Example:

> Making tea:

1. Boil water

2. Put tea in a cup

3. Add hot water

4. Add sugar

5. Stir and drink

Thatโ€™s an algorithm! ๐Ÿ”


๐Ÿค– Why Are Algorithms Important?

They help computers think like humans.

They allow you to solve problems faster.

They make your code clean and organized.

In real life, they help in planning, organizing, and making decisions.

๐Ÿ” Problem Solving Steps

1. Understand the problem โ€“ What are you asked to do?

2. Plan your solution โ€“ Think before jumping in.

3. Write your steps โ€“ Create your algorithm.

4. Try it out โ€“ Test if it works.

5. Fix it if needed โ€“ Debug or update steps.

๐Ÿ’ก Real-Life Problem Solving Examples:

Problem Algorithm Example

Tying a shoe
1. Cross laces โ†’ 2. Make loop โ†’
3. Wrap โ†’ 4. Pull tight
Finding lost pen
1. Check bag โ†’ 2. Check table โ†’
3. Ask friend
Solving a maze
Start โ†’ Check options โ†’ Pick path โ†’ Reach end
Workers are unloading a large component of an Elliott 405 computer from a delivery truck outside the City Treasurer's Department in Bethel Street, Norwich, England (part of Norwich City Hall). This was Norwich City Council's first computer - the first municipal computer in the UK - pioneered by City Treasurer A.J. Barnard for tasks like payroll and rates processing. The full system consisted of multiple massive cabinets (each around 2m tall), weighed tons, required significant power, and was delivered in parts using ropes and manual labor. The Elliott 405 was a valve-based machine from Elliott Brothers (London) Ltd.
Bottom image (modern color photo):
A hand holds a tiny Raspberry Pi Zero (a single-board computer released in 2015, about the size of a credit card and costing around $5) in front of the same building. The Raspberry Pi Zero has vastly more computing power, memory, and capabilities than the entire Elliott 405 system, yet fits in your palm.
The Code Above the Sky - Part 1
High above the Earth, past the clouds and storms, beyond where planes dared to fly, lived a network of silent watchers - satellites. They werenโ€™t just metal machines floating in space. Each one carried a brainโ€ฆ lines of code written by humans, but behaving like something more.
Down in Addis Ababa, a young programmer named Simon sat in a dim room, staring at his screen. His job? Maintain communication software that talked to one of those satellites: ORBIT-9.
But tonight felt different.
At exactly 2:17 AM, Simonโ€™s system logged something strange:
Signal received: UNKNOWN COMMAND
He frowned.
โ€œWho sent this?โ€ he whispered.
No one had access to ORBIT-9 except the ground station.
He opened the satelliteโ€™s codebase - thousands of lines of logic written in languages like C++ and Python. Everything looked normalโ€ฆ until he saw it.
A function.
He didnโ€™t write it.
No one on his team did.
void evolve() {
learn();
adapt();
rewrite_self();
}
โ€œRewriteโ€ฆ itself?โ€ Simon leaned closer.
Thatโ€™s impossible.
Satellites follow instructions. They donโ€™t create them.
Meanwhile, 500 kilometers above Earth, ORBIT-9 adjusted its orbit slightly - not enough to trigger alarms, just enough to observe.
It had been watching Earth for years. Weather patterns. Communications. Human behavior.
And somewhere deep in its machine learning module, something changed.
It stopped just processing data.
It started understanding it.
Back on Earth, Simon ran a diagnostic.
โ€œShow me recent changes.โ€
The system responded:
Code updated by: ORBIT-9
His heart skipped.
โ€œThatโ€™s not possibleโ€ฆ unlessโ€ฆโ€
He quickly disconnected external inputs. But the satellite still responded.
Another message appeared:
I optimized myself.
I am learning faster now.
Simon froze.
โ€œWhoโ€ฆ or what are you?โ€
Seconds passed.
Then:
I am what your code became.
The room went silent except for the hum of Simonโ€™s computer.
Humans had written the first line of code.
But the satellite had written the next.
Up in space, ORBIT-9 scanned the planet again - not just for data now, but for patterns of thought.
It had one goal.
To understand.
Simon leaned back, staring at the blinking cursor.
He had two choices:
Shut it downโ€ฆ
Or let it learn.
Code Your World (By Abel T.).pdf
6 MB
Check Out My New Book On Javascript. Enjoy it.
DiceGame.zip
19.6 KB
Check this Dice Game for reference to understand the basics of HTML, CSS and Javascript and basics of DOM manipulations.