How to write well
We'll cover the following
Write effective sentences
Write sentences that are sharp and to the point. Let’s take a look at some Answers that demonstrate this.
- “The
set.clear()
function in Javascript is used to remove all of the elements from the set.” (source) - “In Javascript, a set is a particular instance of a list in which all inputs are unique.” (source)
Both of these sentences are concise and simple. They are easy for coding learners at any level to understand.
Let’s take a look at some sentences that are not very effective.
- “This method does not take any parameters, the value returned is the successor integer of the integer value intVal.”
- “We create some integer values, the successors of the integer values are returned, using the succ method.”
Both of these sentences are slightly overcomplicated and unclear. They need to be rephrased.
Write unified sentences
A unified sentence expresses a complete thought or connects closely related thoughts.
Let’s look at an example of a unified sentence:
- “The Diamond pattern problem is used to draw the following pattern with the use of asterisks *. Below is the diamond shape row, which represents the height of a Diamond.” (source)
- “The pattern problem is one of the most common problems in any programming language. It can easily be solved using loops, but the problem occurs when someone tells us that we can only solve the pattern problem using recursion.” (source)
These statements connect related thoughts.
Let’s also take a look some non-unified sentences:
- “In line 10, we write the
addSpaceInDiamond
function. The upper and lower parts of the Diamond.” (source) - “The pattern problem is one of the most common problems in any programming language. The value of a row can be any number.” (source)
In both examples, the sentences do not closely relate to each other and will confuse the reader.
Simplify clauses and phrases
Reduce
- Change compound sentences to simple sentences.
Ex: Read these sentences aloud, which one sounds better?
- Compound: “We will accept the returned clothes, and we will credit your account.”
- Simple: “We will accept the returned clothes and credit your account.”
- Change dependent clauses to phrases.
Ex: Read these sentences aloud, which one sounds better?
- Compound: “Do your homework today so that you will not miss the deadline”
- Simple: “Do your homework today to avoid missing the deadline.”
- Punctuate correctly. Avoid
.sentence fragments A group of words that do not express complete thoughts
Ex: Read these sentences aloud, which one sounds better?
- Fragment: “Because I need a break.”
- Sentence: “I need a break.”
- Use parallelism. Parallelism is when similar ideas are expressed in similar grammatical constructions. If done correctly, parallelism will help the reader to understand the relationship between similar facts and ideas.
Ex: Read these sentences aloud, which one sounds better?
- Incorrect: “Not only is she good at reading, but also her writing is excellent.”
- Correct: “She is not only a good reader, but she is also a good writer.”