DEV Community

loading...

Discussion on: Identifying the dirt in our code - names, functions, and comments

Collapse
ccunha profile image
Carolina Cunha

I loved this article! In fact, I'm think I should print it :)

But I didn't understand that part. about abstraction:

When we talk about abstraction levels, we can classify the code in 3 levels:
1) high: getAdress
2) medium: inactiveUsers = Users.findInactives
3) low: .split(" ")

Can you explain it to me, please?

Collapse
rachc profile image
Rachel Curioso :D Author

The high level abstraction are functions that you create, like searchForsomething()

The medium level are methods in your object, like account.unverifyAccount

The low level are methods that the language provides, like map, to_downncase and so on (:

Collapse
ccunha profile image
Carolina Cunha

Ahhh!Thanks!Sorry, was pretty clear now that I get it :)

Very nice article, I'am looking forward for the others.

Collapse
yuripredborskiy profile image
Yuri Predborskiy

I believe repeating "Account" in account.unverifyAccount is not required. Do you think it is? Why?

Thread Thread
rachc profile image
Rachel Curioso :D Author

The Account in unverifyAccount is clearly an unnecessary addition of context. Thank you for the review