DEV Community

Discussion on: What I Learned using Flask for the First Time

Collapse
 
steelwolf180 profile image
Max Ong Zong Bao

Having lamda function might seem clever. The problem is that it might cause problems in debugging & readability. It might even be harder to maintain the code if they are unable to decipher the code.

So maybe I would suggest write it in a way that is easier for anyone to read. Especially if you were to stare at thousands of code.

Collapse
 
rosejcday profile image
Rose Day

I do agree! That is why I moved from the lambda function to the for loop / if statement combo. Not only was it doing the same job but I also found it to be more readable.

Do you know of any good resources that discuss readable code? The one I have been using thus far is Clean Code by Robert Cecil Martin but would love to have more references to use.

Collapse
 
steelwolf180 profile image
Max Ong Zong Bao

Well, there's some that I know which is considered a classic read on it.

Thread Thread
 
rosejcday profile image
Rose Day

Thanks for sharing! 😃