this is my priority list of some of tools mentioned by him:
some developers use this feature to cast a number to string.
var number = 897; var numberToString = number + ""; > "897" #between quotes in a debug tool showing that it's a string
var number = 897; var numberToString = number.toString(); > "897" #between quotes in a debug tool showing that it's a string
the reason i prefer the method toString instead of + “” is the readability. the concatenation with a empty string “” can be confused or misleading when another developer is reading the code. this concatenation doesn’t show clearly that its aim is cast a number to string. i believe the method toString shows clearly this aim for the developers reading this code.
dave thomas explaining what he thinks to be a clean code in the first chapter of Clean Code book says:
“Clean code can be read, and enhanced by a developer other than its original author…”
probably you know that numbers are converted to string when it’s being concatenated to a string. it’s a interesting feature. however, it’s important to have a good understanding about how this conversation works. So, unexpected results can be avoided.
the conversation occurs only when the first string is added. So,
'6' + 7 + 8 > 678
6 + 7 + '8' > 138
it’s also important to know that it doesn’t happen with other math operations, such as:
'6' + 3*3 + '7' > 697
'6' + 3-3 + '7' > 607
"6" + 7 + 8
6 + 7 + "8"
if you want, you can add you answer as a comment. or send me a tweet. i’m going to post the answer in few days.
we saw a lot of people moving from waterfall to scrum. but we are also seeing people moving from scrum to other things saying it missed something.
uncle bob express clearly his opinion about the scrum. maybe you can think it’s radical, mainly if you use it. but, it’s a good warning. he tries to break the idea of scrum is necessarily agile.
i liked this video because he tells a little bit about the agile history. and also shows some of the mistakes we can do when we decide for scrum.
welcome to the code snack!!! my aim in this blog and site is share a little bit of what i’ve been learning e a little bit of my experiments in the coding world, while i’m tasting the my code.
i intend to talk about different topics related to coding and best practices (“clean code”, unit test…). i also intend to share some of article or videos that i watched or read, usually adding some of my opinions about that topic. sometimes, i’ll talk about some situation that i was involved and that i believe that we can learn something or at least laugh together. finally, i want to talk about the new challenges of developer application for the new “post-pc era” or “mobile era”.
the post are going to be in english and portuguese. you can change the language using the banner in the menu. the rss feed is also available in the both languages. so, if it’s not the language you prefer, change to it before sign the feed.
this is a responsive site and you can read it in your computer, tablet or phone.
i hope you enjoy it. wellcome!!!