DEV Community

Discussion on: Daily Challenge #55 - Building a Pile of Cubes

Collapse
 
chrisachard profile image
Chris Achard

I made this one harder than it had to be at first :) I was trying to solve the math problem, but when I switched to just using a loop, it went super quick.

Below is what I came up with in JS, and I recorded my process, so you can watch me solve it! youtu.be/NVA_YuRqscE

const cubes = m => {
  let total = 0
  let n = 0

  while(total < m) {
    n += 1
    total += n**3
  }

  return total === m ? n : 0
}
Collapse
 
alvaromontoro profile image
Alvaro Montoro

Nice solution, and nice video explaining it. May I ask, how did you record it?

Collapse
 
chrisachard profile image
Chris Achard

Thanks!

I have a mac and use screenflow for recording: telestream.net/screenflow/overview...

If you use Windows, then camtasia is very similar: techsmith.com/video-editor.html

I believe QuickTime is a free option for screen recording, but then you still need to do editing somehow.

I make a lot of screencasts, so my mic setup is pretty good (read: expensive :) ) - but you don't need a fancy mic to get started! A lot of headphones (like the base Apple headphones) have pretty good mics in them actually, and then, you can use the audio tools in screenflow to clean it up, or use a service like auphonic.com/ to get some really high quality sound.

Hope that helps!

(I should probably write that up into a blog post so I can just point people to it 😀)

Thread Thread
 
alvaromontoro profile image
Alvaro Montoro

Thanks for the answer. I will give screenflow a try, and maybe get a new headset with microphone.

Btw, that's a blog post I would definitely read/watch. Let me know if you end up posting it.

Thread Thread
 
chrisachard profile image
Chris Achard

Will do!