loading...
markdown guide
 

I like to start with the README (README driven development), define the API of the library I'm going to build and how Is going to be used (basically document it), then I just code it to follow that API.

E.g. I'm going to create a JS module to sum N amount of numbers, so I create a README and define it's going to be used this way:

import sum from 'cool-sum';
const result = sum(1, 2, 3, 4, 5, ...N);

Then I code it so it works as expected.

 

Actually, I discussed this with one of my developers in a podcast a few months back: MousePaw'dCast Ep 2: Accents and APIs (skip to 14:50, which is the start of that part).

One takeaway (of many from that conversation): please document the API! (Also see Your Project Isn't Done Yet.)

 

Thank you for your response. I will checkout those links as soon as possible :)

Classic DEV Post from May 8 '19

Is “Defensive Programming” actually healthy?

I can’t solve this one, and I think I need the help of the DEV Community. So, a d...

Nick Polideropoulos profile image
I'm a passionate coder that i love trying and learning new things every day.

dev.to now has dark theme. 🌝

Go to the "misc" section of your settings and select night theme

P.S. It's the best move you can make for your dev career.