DEV Community

Discussion on: SWE 101 : Programming Terms Explained in simplest form

Collapse
 
dev117uday profile image
Uday Yadav

thank you pointing out the mistakes, I do agree that func add_one is not a suitable example for illustration and will correct it soon.

but for the abs() function, i took this example from textbooks. Its is the de-facto example given to understand idempotency. Searching more the internet, i came across this : stackoverflow.com/questions/107741...

After reading both the stack thread and your comment, i do think there are better other better example to explain it

thank you again.

Collapse
 
_hs_ profile image
HS

Thanks for the link. It has a nice explanation on a slight difference in mathematics and programming. I didn't think of mathematical approach just assumed most people would head on to network approach where you can do multiple inputs to a program from external side. However it's good to always keep in both things. Really glad you replyed with this.