As I was editing my new book Practical Node.js, 2nd Edition, I found a few recurring mistakes that my publisher’s editor was correcting. I wrote over dozen of books but I still don’t know some of English grammar. Do you know some of these tricky rules?
- Front-end app vs. frontend
- Which vs. that
- While vs. whereas
- May vs. might
- Login vs log in
Front-end is an adjective while frontend is a noun. For example, “I build front-end systems”, but “I work on the frontend”.
While and whereas are similar when you contrast two things, but whereas is a bit more formal (and less used in spoken language). While can be used for timing but whereas cannot. For example, “
window is a global variable in browsers while/whereas
global is in Node”, but “When it’s noisy in cafes, I write code while listening to Spotify”.
May has more probability than might. For example, “I may go to Japan next quarter”, but “I might quit Node.js and move to Denmark to study Artificial Intelligence”.
Finally, login is a noun and log in is a verb. For example, “Implement login using OAuth 2.0”, but “You need to log in to AWS console as admin first and only then create a new user”.