The number one thing that gets in my way of refactoring to function is figuring out what to name the functions takes too long.

Skull giver
link
fedilink
58M

deleted by creator

I had a similar thought

zea
link
fedilink
28M

Pick something and change it when inspiration strikes. Sometimes you need a big picture view of something to get the right abstractions or even just name things.

Victor
link
fedilink
88M

Then perhaps the code you are trying to extract doesn’t make a clear and cohesive procedure. Maybe include more or less of the code, or rework the code into logical pieces or steps. Write the algorithm in human language first, then implement the steps using functions.

🤷‍♂️ Or fnck it.

@Feathercrown@lemmy.world
link
fedilink
English
1
edit-2
7M

Sometimea the smallest logical unit of an algorithm uses more than 3 levels of indentation

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 124 users / day
  • 147 users / week
  • 523 users / month
  • 2.5K users / 6 months
  • 1 subscriber
  • 1.6K Posts
  • 35.6K Comments
  • Modlog