Tim Ottinger Profile picture
Aug 17, 2020 5 tweets 1 min read Read on X
So,
x.append(y)
vs
x = x + [y]
vs
x += [y]
vs
x = list(itertools.chain(x,[y])
vs
<something even worse here>
worse:
x[len(x)]=y

It's fun to find horrible and wrong ways to do perfectly fine things. As long as it's twitter and not production code!
x = *[*x],y

I don't know if you can make it much worse in python.
I may have hit a local maximum.
No, wait. I have something even more heinous maybe:

x = eval(', '.join(f'{i}' for i in x) + f', {y}')
Ever think of something so awful it makes you cringe?
That last python perversion might be it.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Tim Ottinger

Tim Ottinger Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @tottinge

Apr 16
What does software development look like from the outside?

I request N things. A few of them come out months later.
Hence: these programmers need to work faster.

1/ Image
however, each of the N things really only took about 4 days to complete on average. Working 2x as fast (a dubious prospect) would carve off only 2 days from delivery time.

2/
What you don't see is that the work was delayed, prioritized, queued up behind dozens or hundreds of other bits of work, rejected and reworked, queued up some more, approved, and then batched up with a bunch of other work while it waited for a few more things to finish.

3/
Read 12 tweets
May 9, 2023
Test first - red.
Oh, I don't like the way that message reads.
Ah, better.
Code - not green?
Quick, most obvious solution.
Still not green.
Oh, why didn't that work?
Was it the test or the new code?
AH! It's the new code. Okay...
Green.
Refactor: I don't like how I structured that test.
Still Green.
The code has some funny names in it. Rename.
Still Green.
Oh, crud, there's a library function for that.
Revise.
Still Green.
Okay.
Read 6 tweets
May 1, 2023
A: Why do you use a ticket tracker?
B: We have thousands of backlog entries.

A: wait... what? Why? How does that help?
B: If we don't store them, we may forget.
A: if you have a list of thousands, you'll remember them all?
B: No, but if we review it we can see that we stored them and might pull them into the sprint.

A: How often do you do that?
B: We don't, there's always too much new work.
A: Okay, so you store them in case you ever run out of new work to do and need to pull something old and forgotten into the sprint.
B: Well, yes, and so we can tell people it's in the backlog.
Read 8 tweets
May 1, 2023
Sometimes you cannot plan. This is either because of the prevailing circumstances (chaos, complexity, extreme complication, dependency) or because you just don't know how.
In those cases, you set an intention and take advantage of opportunities.
At the end of the road, looking back, an excellent opportunist or an exquisite planner will not only have the same results, but their paths are indistinguishable.
Everyone thinks people reach their goals through exquisite planning and flawless execution, but (truth be told) it was largely intention & exploited opportunity.
Read 6 tweets
Jan 21, 2023
“How long does a 2-point story usually take?”
“We peg story points to half-days so 2 points is one day.”
“Yes, how long does a 2-point story usually take?”
“One day.”
“Historically, or ideally?”
“One day.”
“Most of the features you released are over 40 days old.”
“But, um….”
“So 40 days is more than one day, right?”
“Yeah, but the coding part only takes one day.”
“Are you sure. Did you check the actuals on that?”
“No, but they are estimated for one day, so it’s got to be pretty close.”
“But is it?”
“Now that you mention it, no.”
“So how do you know?”
“Well, we always fail our sprints by coming in short. We need the developers to work faster.”
“Work faster so that the estimates become true?”
Read 7 tweets
Jan 20, 2023
If I had to work in an editor that didn't have refactoring support, I probably wouldn't refactor much either.

I'd rather leave a bad name in place than have to manually go to EVERY PLACE in the code where it's referenced and fix it by hand.
It's oddly less bad to move a method from one class to another. I know techniques to get away with that easily.

The recipes in Refactoring (Fowler) work just fine, but they're more steps than just pressing a hotkey.
I'm also spoiled.

I don't want to have to go to a terminal and run the test suite after every line of change. I want the IDE to do that for me.

I never want to have to ask if I'm currently 'red' or 'green' on the tests - that should be constant and automatic.
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(