Daily Shaarli

All links of one day in a single page.

August 20, 2020

Existential types in Rust | varkor’s blog

About impl Trait

Name As If Your Life Depends On It: A Guide To Clean Code - Delivery Doubled

So there is four stages of quality for each name :

  • Nonsense : For example, we might extract a method from a larger one and quickly rename it somethingWhatever() to get the refactor done and the tests passing.
  • Accurate : We rename the nonsense method to what it actually does, such as processPayroll()
  • Precise : Once we realise what the method really does, we might refine the accurate name and give it more precision, such as loopThroughEmployeesAndPayThem().
  • Meaningful : At this point, we’ve revealed the complexity of the method, and can look to split it up into two methods: forEachEmployee() and perhaps a payWages() method on a separate interface.

I always use at least accurate names, because it helps me even during the development process. Something I tend to is to use meaningful names and thus creating a lot of functions 😅
I dislike the precise one as it looks as a function that need to be changed, because of doing to much things. At least, this reveals the complexity behind the name.

The Golden Rule of Generics

Rule: If a type parameter only appears in one location, strongly reconsider if you actually need it.

The 88x31 GIF Collection | Part 1

A website that regroup all 88x31 gifs

Google is down: Users facing issues on Gmail, Google Drive, and more | 91mobiles.com

The problem of centralized services : when they are down, everything is down

EricaJoy on Twitter: "😘🧖🏾‍♀️💖 @OlaySkin https://t.co/HL6rsSVZ2A" / Twitter

Le code python écrit :

def LetsFaceIt(gender, ethnicity):
  try:
    if (gender != "Male")
      chanceOfSTEMJob = "24%"
      if (ethnicity != "White" and ethnicity != "Asian"):
        chanceOfSTEMJob = "5%"
  except:
    logging.error("This is the STEM gap")
  return chanceOfSTENJob