• 0 Posts
  • 112 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle



  • Often I use Python for exploratory purposes. Like, I got a bunch of data, and I want to know if a particular algorithm might work or not. I implement the algorithm, but realize the results don’t look good enough. So I tweak the algorithm, maybe even do major refactoring. Or maybe I realize my visualizations or metrics don’t capture what I need to see. Or maybe I must settle for some compromise?

    I iterate on this repeatedly until I find something I’m happy about (or until I give up). Sometimes I end up with something completely different from my initial idea.

    TDD won’t help me much here because the end result is unknown. For each iteration of this idea process I might even need to rewrite all the tests because none of them are valid anymore.















  • One benefit of using dropwhile is that (with a bit of practice) it can actually be easier to read than a for loop. All for loops look similar. You need to read the for loop line by line to understand what it really do.

    With dropwhile (or map, filter and reduce), it’s immediately obvious it will drop all elements until a certain condition turns false.



  • You don’t need to know math or physics to build a house. Sure, it can help if you know those things, but it’s not essential.

    Same goes with programming. Math and programming are two separate skill sets, but knowing one can probably help with the other.

    Also, a question for you. Why do you want to do Common Lisp? If you’re skeptical about your abilities I recommend to start with a more common programming language (like Python, Java, C#). Easier to find good learning resources.