Bar Graphs!!!!

I made a thing in React and D3: Find The Nines

My understanding of D3 is developing. In the creation of the above bar graph, I ran into a ton of different issues, like when to add elements to a selection, how to chain functions, how to make the rendered SVG responsive, and how to organize my React components. It surprises me how quickly I can breakdown problems and code them out. I used to struggle a lot with that. It's nice to see progress.

I met with a friend in the afternoon to chat about our upcoming meeting and jot down some questions we'll have. It was nice chatting with another coder in person. Though, he did point out the pitfalls of overdoing it (I am). It's incredible that there are people out there that are so encouraging. I'm not sure I've ever felt that amount of encouragement and positivity in any endeavor.

Later that night, I studied more D3 and was given a challenge to quickly come up with a function to output the Fibonacci sequence. Here be that code:

const fib = (totalFibNums) => {
  const arr = [1]
  for (let i = 0; i < totalFibNums - 1; i++) {
    arr.push(arr[arr.length - 1] + (arr[arr.length - 2] || arr[arr.length - 1]))
  }
  return arr
}

attachment (4).jpeg

more blogs

copyright © 2022 Albert Padilla all rights reserved