Posts

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

jitterted, to random
@jitterted@sfba.social avatar

These days I'm trying to differentiate between tests where dependencies (used by the Code Under Test) can't (and shouldn't) be replaced by Test Doubles—inside the Domain layer¹—and those that are replaceable (Use Case/Application layer), where the concrete version of the dependency accesses hardware or I/O.

¹ These are almost always part of an Aggregate (graph of objects).

gdinwiddie,
@gdinwiddie@mastodon.social avatar

@jitterted I often tested the lower parts of aggregates in isolation, but not so much the upper part. If the dependency was complicated, I might test with a simpler or more predictable version.

jitterted, to random
@jitterted@sfba.social avatar

Friends don't let friends create forms with separate boxes for First and Last names.

#StopTheFormIndustrialComplex

jitterted,
@jitterted@sfba.social avatar

Need a "friendly" way to address me (like:"Hi, Ted!" or "Welcome to the community, Ted") then you can specifically ask me for that, too! It's easy:

Full Name: [_________]

First or nickname: [_____]
(How should we address you?)

jitterted, to random
@jitterted@sfba.social avatar

Testability and fast feedback loops drive everything I do in creating software. (One could say just fast feedback loops, and testability follows, but without testability, long-term viability of continued fast feedback loops can easily be lost.)

jitterted, to random
@jitterted@sfba.social avatar

One of the best things about live coding (and doing it enough to have a few people in the "audience") is that it raises my level of awareness of what I'm doing by being asked questions:

"Why aren't you refactoring after getting to TDD-Green?" or "Why didn't you extract that string into a variable?" or "Do you use Test Data Builders?"

If I was trying to "get work done", these questions would be annoying¹, but instead (especially as a technical coach/educator) they are More Valuable than GOLD!

One of the hardest things to do as an "expert" who is also a coach is to take what has become automatic and turn it into steps that can be taught to a non-expert.


¹ of course if I wanted to just get work done, live coding is not the most efficient way to go (tho it works really well for me despite the welcome interruptions.)

jitterted, to random
@jitterted@sfba.social avatar

I need to hire (i.e., pay) someone who can clean up some Adobe Illustrator files, or possibly recreate them (which ever is better), so that I can more easily work with them to change their text, size, etc., as I need to. Right now they look OK, but are very difficult to modify.

An example is below. I had to extend the edges (bleed) for printing, but this is terrible if I need a digital version that looks correct.

Recommendations of folks who can do this (perhaps it's you?) and boosts appreciated. (And in case it wasn't obvious, this is for-pay work!)

jitterted, to random
@jitterted@sfba.social avatar

I've been reflecting on LLM tools in IDES, like Sourcegraph's Cody and JetBrains's AI Assistant, and I think that they (and other LLMs targeted for code generation) suffer from the same problem:

The inability to FORGET.

Unless you have complete control over the data used to train the LLMs, you're going to get old solutions for problems that may not exist anymore, because languages, libraries, and frameworks eventually deprecate and remove code, come up with better (or worse, but different) ways to do things, etc.

It's a bit frustrating to get a solution that works, but is the "old" way of doing things (indexed for loop instead of a for-each, or instead of a stream). It's even worse when the solution worked 3 years ago, but no longer does, or worse is a mixture of modern and obsolete code, making it difficult to separate the two (LLMs are entirely based on "mixing", so this happens frequently).

I'm pretty sure the solution for these kinds of tools is to be trained on better (or at least more recent) data.

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar
jitterted, to random
@jitterted@sfba.social avatar

@claresudbery talking with @jbaruch about Continuous Integration at #DevoxxUK https://www.youtube.com/live/l7vpkCBad2U

jitterted, to Java
@jitterted@sfba.social avatar

🚨 #LiveCoding Alert 🚨

Working solo on some final Ensemble Timer features using #Java #SpringBoot and a bit of #htmx.

Join me now on Twitch at https://jitterted.stream

jitterted,
@jitterted@sfba.social avatar

Finished the "Reset Timer" feature as well as adding sounds for "Pause" and "Resume" (that way you can hear when the timer is paused without having to look at it all the time).

With the help of a viewer, was able to DELETE the kludgey JavaScript code and let #htmx handle all of the work of playing audio. Sending an <audio> element over the WebSocket with autoplay worked as desired!

jitterted, to random
@jitterted@sfba.social avatar

The whole reason that Premature Optimization is evil is that it can make the code (much) more complicated, when you might still be modifying it heavily (hence the "premature").

Get it to work.
And ensure it's what's needed.
Then look at optimizing.

(This is a general guideline: your context, of course, might require you to do optimization up-front, but then it's not premature!)

jitterted, to random
@jitterted@sfba.social avatar

Using #htmx in my apps has let me turn the "no logic in HTML templates" all the way up to 11.

I am now very aware (and suspicious) of any logic being evaluated, or even things like string concatenation, being done in HTML templates.

I may have to write a tool to warn me (or fail a test!) if I start using th:if, th:unless, or anything that looks like a method call in my Thymeleaf templates.

jitterted,
@jitterted@sfba.social avatar

@itsjoshbruce

Ooh, sounds interesting. Is it a private thing, or is it something that you could make available?

I've toyed with the idea of creating a custom UI builder, but I've got enough side projects. 😄

itsjoshbruce,
@itsjoshbruce@phpc.social avatar

@jitterted: Sure! Thanks for asking: https://github.com/8fold/php-html-builder

Part of the inspiration was also removing tokenized parsing of HTML. So, instead of “get PHP out HTML” it was “get HTML out of PHP” - it’s basically just string concatenation. lol

Very little code (a few hundred lines), and should be easy to port without becoming a full-blown project. A stable and complete build. I haven’t needed to tinker with it for years.

jitterted, to random
@jitterted@sfba.social avatar

On today's solo stream, I was doing my #TDD as usual, and, because I use Predictive Test-Driven Development (see https://ted.dev/articles/2021/03/05/clarifying-the-goal-of-behavior-change/), I was able to avoid writing code that wouldn't get the test to pass.

Why? Because 3 separate times, I predicted how the test should fail, and it failed differently! They failed in the unexpected way because I had either written the test setup incorrectly, or misunderstood a library method¹.

Had I just looked out for a failing test, I would have started writing code to make it pass, and been disappointed that it didn't pass when I was done.

--
¹ Turns out Java's String.indent(4) normalizes line endings, meaning it will add a line ending to the last line, even if it didn't have one before! Surprise!

bradwilson,
@bradwilson@mastodon.social avatar

@jitterted I have always thought the circle diagram for #TDD sent the wrong message to new practitioners. Refactoring should always start and end in green. If you refactor and things go red you’ve done something else other than refactoring.

jitterted, to random
@jitterted@sfba.social avatar

Well that was a bunch of wasted time because the Mac PDF Preview app is BROKEN when it comes to password-protected PDFs that limit things (for form-filling).

I filled out the form in Preview, but once I saved it, nobody could VIEW it without the original security password (that nobody seems to know).

Apparently this is a known issue, but Apple has yet to fix this 2+ year-old problem.

Had to open it in Adobe Acrobat, fill out most of it there, then "print" to a new PDF, and then finish the edits with that new PDF.

jitterted, to random
@jitterted@sfba.social avatar

One (of MANY) lesson learned is to NOT name your Thymeleaf template "index.html". You will get confused. You will be surprised.

Spring Boot will serve it up as a static page to your "/" path GET request, even if the "index.html" is in the src/main/resources/templates directory.

(See WelcomePageHandlerMapping and WelcomePage for details.)

jitterted, to random
@jitterted@sfba.social avatar

Hey #TDD Game fans!

If you were thinking of ordering your own copy of JitterTed's TDD Game, I recommend ordering soon, as I'm running low on inventory (and won't get more for another month or so).

Get your copy (or multiple copies—saves on shipping) today at https://tdd.cards

jitterted, to random
@jitterted@sfba.social avatar

This is how you should be asking for name information!

(From the We Review conference submission system:)

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