@jitterted@sfba.social
@jitterted@sfba.social avatar

jitterted

@jitterted@sfba.social

He/Him. Technical coach. All about Making #Java Code More Testable. #TDD #Refactoring #HexagonalArchitecture #JUnit #AssertJ

This profile is from a federated server and may be incomplete. Browse more on the original instance.

jitterted, to random
@jitterted@sfba.social avatar

C'mon California get with the program.

"The governor’s proposed 2024-2025 budget once again takes money from the ATP while leaving freeway spending untouched."

https://www.calbike.org/there-is-no-deficit-in-californias-transportation-budget

jitterted, to random
@jitterted@sfba.social avatar

Every time you create a Java folder called "exception" a kitten's favorite cardboard box gets recycled.

jitterted, to Java
@jitterted@sfba.social avatar

I think one of the biggest shifts over the past year in how I write server-side generated HTML (Thymeleaf + Spring MVC) is trying to completely avoid any decision-making logic (is there any other kind? 😏) in the template, and push all of the logic into the back-end (Controller or DTO).

This may not always be possible, but it does mean that such logic is much easier to test (and therefore test-drive).

Mike Rizzi and I have been live coding a small app where today, we did exactly that. You can see the whole playlist (we're up to 5 episodes) here: https://www.youtube.com/playlist?list=PLBHctPrH7Z2-nyaHBETfklyqddmEZUp95

Join my Discord community to talk about these episodes, #Java coding, design, architecture, #TDD, #DDD, and more: https://ted.dev/discord

jitterted,
@jitterted@sfba.social avatar

@itsjoshbruce Yeah, especially if tests are difficult to write or maintain (as is often the case with code in an HTML template).

On the other hand, I also want to reduce dependencies.

An example from this project is: do we write a custom Multi-Map (mapping a key to a list of values), or do we pull in a dependency (like Eclipse Collections).

We decided to write it from scratch and it was just a few lines of code (so far), and only needed a few tests.

But overall, the less code (especially code that needs tests, which is code that has logic), the better.

jitterted,
@jitterted@sfba.social avatar

@itsjoshbruce The Multi-map is not a built-in collections data structure in the JDK (it's been suggested and shot down as not being of wide enough interest), so that's why we had to decide whether to implement from scratch just what we needed, or pull in a library (like Eclipse Collections).

"Mapping" is one of those overloaded terms, which can get confusing when you're "mapping a map". 😁

jitterted, to random
@jitterted@sfba.social avatar

I really dislike yearly subscription services that don't give you advance warning of an upcoming renewal, especially when it's a significant price increase.

Always seems like an underhanded move and you can bet that I'll not recommend services that do this.

jitterted, to random
@jitterted@sfba.social avatar

One thing that I think is overlooked when doing #TDD and getting your test to fail ("getting to Red") is what it means for a test to fail "properly" in TDD.

I see three requirements for a successful Red (failing) test:

  1. It has to fail

  2. The failure is due to the current behavior not doing what you want it to do. This is failing for "the right reason". Lots of reasons for a test to fail, but in TDD, this step means it's failing AS EXPECTED because the desired behavior has not yet been implemented. If it fails for a different reason, then you either have a test that's broken, or your current assumption of the system is wrong.

  3. The failure message is understandable and reflects the missing desired behavior. This is your chance to ensure that when this test fails, there's enough information and context for someone to figure out what happened.

Requirement #2 is why I made Prediction such an important part of JitterTed's TDD Game.

https://tddga.me

jitterted, to random
@jitterted@sfba.social avatar

Health insurance really doesn't have to be this hard. Spent 15 minutes in chat to finally get: "fill out this PDF".

Them: fill out an attestation form

Me: what's an attestation form?

Them: It's like an affidavit

(rolls eyes) Me: what's an affidavit?

Them: It's a form we have on our web site.

Me: I don't see it. Can you give me a direct link?

Them: https://coveredca.com

Me (ending up at the forms page): What form, there are dozens?

Them: It is almost at the bottom of the page.

(sighing) Me: which one? can you give me the title?

Them: Attestation of Medicare Eligibility and Enrollment Status

(smh) Me: You mean https://www.coveredca.com/pdfs/Medicare_Attestation_Form.pdf ?

-- end chat --

Like WTH? Why not just give me that direct link in the first place??? Sheesh.

jitterted,
@jitterted@sfba.social avatar

I mean, yes, I know what "attestation" and "affidavit" mean, but why use those words instead of "here, go to this link and check the 4th box on this PDF"??? Would've saved both of us time and frustration.

jitterted,
@jitterted@sfba.social avatar

And I'm not going to even get into why I have to tell them I'm not getting medicare, when I'm not eligible for medicare! I'm not that old (yet)!

(And yes, you can be under 65 and be eligible under certain circumstances, but why are they assuming that? Why is the burden of proof on me?)

jitterted,
@jitterted@sfba.social avatar

And what started the whole thing was the frustrating mail I received that ended with:

"This person may have an offer of other health insurance from an employer or the government, such as Medicare or Veterans Health. If this is wrong, please send proof."

🤨

Reading that, I thought: how do I prove this is wrong?? How do I prove I was never offered anything?!

🙄

jitterted, to random
@jitterted@sfba.social avatar

Just had ChatGPT help me write a letter in opposition to the Census Bureau's proposed change that would reduce the count of disabled folks.

Via https://www.patreon.com/posts/94624464 @mattbc

jitterted, to random
@jitterted@sfba.social avatar

Hi @grimalkina, was reading your "belonging" article https://www.drcathicks.com/post/sense-of-belonging-and-software-teams and was wondering if you've written/researched about how it relates to Psychological Safety? They seem really similar?

GeePawHill, to random
@GeePawHill@mastodon.social avatar

HAH! It's "Plan" and "Trail" and "Guide". I knew if I kept chewing I would find the metaphor I wanted.

jitterted,
@jitterted@sfba.social avatar

@GeePawHill Salesforce has long used "Trailhead" as the name of their training programs, using terms like "Trails", "Trailblazor", and (my favorite) "Trailmix". Alas, it's superficial, since they call the actual things that you do/watch "Modules" and "Units". 😞

Typical corporate shallowness.

jitterted, to random
@jitterted@sfba.social avatar

Been playing with Event Storming for a tiny project with a friend, and it doesn't seem well-suited to such a project. (I have the 70% finished book by Alberto as well as some other resources.)

We've got lots of "queries" by our users (e.g., find songs given certain attributes) that don't generate any state-significant events. Do we create events for those queries (Song Search by Title Submitted)? Which then generates a Read Model? It feels too artificial.

It's unclear if we're doing it wrong, or if it's just the wrong process for our app. After all, we'll probably end up with just 3 or 4 aggregates.

jitterted, to random
@jitterted@sfba.social avatar

Alright, one more #TDD paper, because one of the conclusions in the abstract is 100% correct:

Paper: "A Family of Experiments on Test-Driven Development" https://dl.acm.org/doi/abs/10.1007/s10664-020-09895-8

[Capitalization to emphasize is mine]

"The quality-related performance of professionals using TDD drops more than for students. We hypothesize that this may be due to their being MORE RESISTANT to change and potentially LESS MOTIVATED than students."

And that's one of the most correct things I've seen in any paper. Resistant to change (and less motivated is the flip side of that coin) because "I'm an expert, and what I'm doing works for me" (completely valid)

jitterted, to random
@jitterted@sfba.social avatar

So while I don't think #TDD research studies prove anything, I think they can be useful to help me highlight benefits that might not be obvious from focusing on the TDD cycle itself.

For example, in "Analyzing The Effects of Test Driven Development In GitHub" https://dl.acm.org/doi/pdf/10.1145/3180155.3182535, they conclude two things:

  1. "We found that Java TDD projects were relatively rare."

Yup. Especially in public GitHub repositories, because very little application development happens there (it's mostly tools and libraries). I point to my codebases as good examples because—while small—are real-world production apps.

1/2

jitterted,
@jitterted@sfba.social avatar
  1. "In addition, there were very few significant differences in any of the metrics we used to compare #TDD-like and non-TDD projects; therefore, our results do not reveal any observable benefits from using TDD."

And that's possibly "true", but completely discounts things like: how long does it take to figure out where to make the next code change; how confident are you that the change works AND doesn't break anything else; and (related) how long did it take you to implement the change.

2/2

jitterted, to random
@jitterted@sfba.social avatar

Are you familiar with the "Transient Information Effect"? If you do presentations, or collaborate remotely, you should be.

The effect refers to information that disappears quickly, often speech, but could be some text, code, or a slide, that is no longer visible. However, speech is the most common type of transient information[*].

As a presenter, you may not notice how much what you say "disappears" and isn't absorbed by the listener. How do you figure this out? Record yourself, then while playing it back, count how long you're talking and nothing on the screen is changing.

Even better, plug that video into a speech-to-text (I use Descript) and count how many words are spoken with no change in the visuals.

ALL of that is transitory. Gone. Once it's said, you can't get it back (other than rewinding).

1/2

[*] I suspect this contributes to why many folks, like me, have captions turned on: they provide a bit more permanence to the speech (only a bit, but might be enough).

dhinojosa, to macos
@dhinojosa@mastodon.social avatar

If you're on #Docker and using a #macos machine. The latest version will mess things up royally. #HeadsUp

https://github.com/docker/for-mac/issues/6933

(Scroll to bottom)

jitterted,
@jitterted@sfba.social avatar

@dhinojosa Lucky for me I've already switched to OrbStack.

jitterted, to languagelearning
@jitterted@sfba.social avatar

This book chapter is very relevant to me as I think about expanding JitterTed's #TDD Game (https://tddga.me)...

"Board Games as Part of Effective Game-Based Learning Strategies"

https://link.springer.com/referenceworkentry/10.1007/978-3-319-17461-7_142

#EducationalGames #Learning

jitterted,
@jitterted@sfba.social avatar

@mlevison My TDD Game is currently only a physical game (or a Print & Play).

I had been working on a custom online version of the game (using Vue + Spring), but I shelved it because I'm not interested in continuing with Vue (nor any SPA).

I'm now looking at:

  1. Deliver the components on a Miro board and let folks play remotely using traditional videoconference tools. This will build on my Print & Play version.

  2. Use a platform like BoardGameArena.com (or similar), but BGA requires coding the logic in PHP so probably unlikely.

  3. Drop the Vue front-end and use HTMX and complete the implementation I started. I'll probably get back to working on this in a couple of months. I can justify it because I'll be able to extract material for my courses.

jitterted,
@jitterted@sfba.social avatar

@mlevison No guarantees when (if ever) it'll be done, though!

There are some libraries that may implement portions of what I need (e.g., the "lobby" or "player matching"), but I'm not sure they'll fit well.

jitterted, to random
@jitterted@sfba.social avatar

In teaching concepts, you can almost never have too many examples.

I'm often frustrated with books, videos, courses, etc., that use either no examples, or examples that have no meaning (those that name things "foo", "bar", or "a", "b", and "c").

The point of examples is to build up the concept by providing concrete things that the learner can relate to. So, also, examples need to relate to the knowledge the learner already has. Learners outside the USA will likely have a hard time understanding your Baseball example. (And I'd have a hard time understanding your Cricket-based example.)

jitterted,
@jitterted@sfba.social avatar

@gdinwiddie Absolutely, it's hard. But the alternative is wasting the learner's time and/or they end up with an incomplete or even wrong understanding of the concept.

As an educator/author, it's literally my job to come up with examples. And I think book editors (and readers!) need to hold authors to a higher standard, because the current standard (at least in tech books) is very low.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • megavids
  • GTA5RPClips
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • provamag3
  • Leos
  • cisconetworking
  • lostlight
  • All magazines