0% found this document useful (0 votes)
8 views3 pages

Eloquent JavaScript Overview and Insights

The report discusses key learning outcomes in programming, emphasizing that programming is about instructing computers and that JavaScript is a vital language for browser interaction. It critiques rigid programming best practices, advocating for creativity and adaptability in problem-solving. The document also highlights the evolution of programming languages from binary to more human-readable formats and stresses the importance of understanding existing code and experimenting with solutions.

Uploaded by

Sheryar Khan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

Eloquent JavaScript Overview and Insights

The report discusses key learning outcomes in programming, emphasizing that programming is about instructing computers and that JavaScript is a vital language for browser interaction. It critiques rigid programming best practices, advocating for creativity and adaptability in problem-solving. The document also highlights the evolution of programming languages from binary to more human-readable formats and stresses the importance of understanding existing code and experimenting with solutions.

Uploaded by

Sheryar Khan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Eloquent JavaScript Progress Report:

Introduction:

Learning Outcomes:

1: Programming is set of instruction used to interact with computer. Or to tell a computer what to do.

2: JavaScript is one of the computer language that we use to interact with browser. It is built in in almost
every web browser.

3: A program is data in the computer’s memory at the same time it controls actions performed on this
memory.(Program is a directing force what tells a computer what to do with date i.e. Which is also a
program).

4: In order to make a computer do what we want we have to figure out a way to connect these parts
and make it work according to our own needs.

5: Author disagree with programming best practices. He says someone made these practices from their
own convenience. But programming is very divers and young, so we have to leave room for new ways.

6: Good programming come with practice not from the set of rules predefined by someone.

7: We should write program that is easy to understand. And at the same time we should go outside the
box to try new things because modern problems require modern solutions. Sticking to only predefined
best practices might not be able to solve new problems.

Why computer Language Matters?


1: In early ages programs were written in binary i.e. 0’s and 1’s which was a very tedious task for example assign
number 0 to memory location 0 in binary would look like this.
……………………………………………………………………………………..
which was a very confusing task. Not humane readable.
so a more readably approach would be like this

Set “total” to 0.
Set “count” to 1.
[loop]
Set “compare” to “count”.
Subtract 11 from “compare”.
If “compare” is zero, continue at [end].
Add “count” to “total”.
Add 1 to “count”.
Continue at [loop].
[end]
Output “total”.
1. A simple instructions of English language are:
Store the number 0 in memory location 0.
2. Store the number 1 in memory location 1.
3. Store the value of memory location 1 in memory location 2.
4. Subtract the number 11 from the value in memory location 2.
5. If the value in memory location 2 is the number 0, continue with
instruction 9.
6. Add the value of memory location 1 to memory location 0.
7. Add the number 1 to the value of memory location 1.
8. Continue with instruction 3.
9. Output the value of memory location 0.

And here are those instructions in programming language


that computer will understand.

let total = 0, count = 1;


while (count <= 10) {
total += count;
count += 1;
}
[Link](total);

Most Important part about learning programming is to read


old code patiently and understand it.
And write your own solutions don’t just assume that you
know the solution try for yourself with different
approaches.

Program to calculate Factorial.


function factorial(n) {
if (n == 0) {
return 1;
} else {
return factorial(n - 1) * n;
}
}

Dry Run:

Common questions

Powered by AI

The author emphasizes reading and understanding old code as a crucial learning strategy because it helps programmers understand different approaches and develop their problem-solving abilities. This process can be more instructive than assuming knowledge of solutions without experimentation .

The document describes the most important aspect of learning programming as not simply writing one’s own solutions but experimenting with different approaches. This encourages a deeper understanding, enabling programmers to innovate rather than relying solely on assumed knowledge .

The document suggests that procedural programming has evolved from the binary system to structured, human-readable languages like JavaScript. This evolution is characterized by a shift toward instructions that use logical constructs and loops to perform operations, simplifying coding and enhancing program clarity .

The author views the evolution of programming languages as a necessary progression from binary, which was tedious and non-human-readable, to more accessible and intuitive languages like JavaScript. This evolution is depicted as essential for aligning with advancing human-computer interaction demands .

The author views programming best practices with skepticism, suggesting they are established for individual convenience rather than universal applicability. They argue programming is young and diverse, necessitating flexibility and innovation beyond predetermined rules. Sticking rigidly to best practices may hinder solving modern problems .

To overcome limitations imposed by predefined best practices, the author suggests writing programs that are easy to understand while thinking outside the box to solve new and modern problems, implying a need for continuous innovation beyond established norms .

Programming languages like JavaScript are significant because they provide a human-readable way to interact with computers, which historically required use of binary code, making the process much less tedious and more intuitive. Additionally, JavaScript is especially important as it is built into almost every web browser, facilitating interactions on the web .

The document provides an example of a JavaScript program to calculate the factorial of a number, illustrating how programming languages can handle mathematical problems through logical constructs such as recursion .

The provided code example illustrates this transition by showing simple English instructions converted into JavaScript. This exemplifies how modern programming languages like JavaScript allow complex instructions to be expressed in cleaner, human-readable formats, contrasting the cumbersome binary notations of earlier computing practices .

The factorial function uses recursion by calling itself with a decremented argument 'n-1' until the base case 'n==0' is met. At this point, it returns 1, and the recursive calls resolve by multiplying the returned values, effectively calculating the factorial of 'n' .

You might also like