@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

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.

jitterted, to random
@jitterted@sfba.social avatar

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

grimalkina, to random
@grimalkina@mastodon.social avatar

I've spent the week reading like 50+ papers on learning to remember what I know about how people learn and this is what I know:

-people are bad at deciding what to learn
-people are bad at studying. We choose the worst ways to study and we hate the most efficient ways
-people give up on learning so much. Like more than anyone believes
-people aren't clear about what their goals really are for learning and if you try to get people to set goals they don't want to
-teachers truly work miracles

jitterted,
@jitterted@sfba.social avatar

@grimalkina Mayer & Fiorella have a good book on the topic: "Learning as a Generative Activity: Eight Learning Strategies that Promote Understanding"

Mapping (esp. Concept Maps) is one of my favorite activities.

Excerpt here: https://www.researchgate.net/publication/264233729_Learning_as_a_Generative_Activity_Eight_Learning_Strategies_that_Promote_Understanding

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!

khalidabuhakmeh, to CSharp
@khalidabuhakmeh@mastodon.social avatar

I’m hosting Chris Simon on a to discuss , , and . Not to be confused with D&D, which is about wizards, dragons, and dungeon masters… wait it's pretty similar.

https://www.youtube.com/live/gXz7gKtRVpM?si=Uc_kn-GzdEIvSR_p

jitterted,
@jitterted@sfba.social avatar

@khalidabuhakmeh Awesome!

If JetBrains ever wants someone to do a similar talk for Java and IntelliJ IDEA, let me know (I livestream doing exactly that 10+ hours a week). 😁

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 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. 😄

jitterted, to random
@jitterted@sfba.social avatar

On today's solo stream, I was doing my 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!

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.)

#SpringBoot #Surprise

dhinojosa, to random
@dhinojosa@mastodon.social avatar

There is now a built in "Presentation Assistant" in so you don't have to install the plugin. Do a CTRL+`, then View Mode, and then Toggle Presentation Assistant. You can configure, Mac, Linux+Win, or both in the settings.

@jitterted not sure if you knew this.

jitterted,
@jitterted@sfba.social avatar

@dhinojosa

Yes, it's been available in the 2024.1 EAPs and I hate it.

I don't like the layout (spacing between the elements), the location (always seems to block something), nor the coloring (not adjustable).

I dislike the built-in version so much that I forked the original plugin to make it compatible with 2024.1 and use that instead.

jitterted,
@jitterted@sfba.social avatar

@dhinojosa I haven't made my fork public yet (will be doing that shortly!).

In the meantime, it's one of my top plugins: https://ted.dev/articles/2021/04/21/favorite-intellij-idea-plugins/

jitterted,
@jitterted@sfba.social avatar

@dhinojosa

In case you want it, I published my fork of the original Presentation Assistant:

https://github.com/tedyoung/ij-presentation-assistant

jitterted, to random
@jitterted@sfba.social avatar

Hey 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:)

jitterted, to random
@jitterted@sfba.social avatar

I continue to find ChatGPT and the like to not be very helpful for writing more than a little bit of code, and even there, it's mostly helpful in areas where it's with APIs that I'm familiar with, but don't use enough to be fluent in. I also find it useful in suggesting alternatives for solutions I already have, but even there it's still pretty limited (e.g., my attempts to get it to write better ArchUnit tests that don't include my test code that didn't include the "obvious" solution).

I find it much more useful in clarifying my understanding (and therefore my explanations) of concepts. For example, I've been thinking a lot about Mental Models vs. Heuristics and where the line is. For example, are "DRY" and "SOLID" mental models or heuristics? How about "OOP"? Or, more specifically: do I model my countdown timer with pause support as a "bag of seconds that get consumed" or as "end time gets postponed by amount of pause time".

jitterted,
@jitterted@sfba.social avatar

@gdinwiddie Apparently it's in the name. A mental model is a model: a simplification and view of a reality that allows us to reason about that reality, such as by making predictions or decisions in line with the model.

e.g.: this CountdownTimer class is modeled like a sand clock or hourglass, reducing the "amount" of time at each tick. (Allows me to predict its behavior and know what will happen when it "runs out of time")

A heuristic is a prescriptive guideline, sometimes generic and without much context.

e.g.: pass the current time as a parameter to a method, instead of injecting a clock as a dependency, to make it easier to test.

(I'm sure @rebeccawb would have much more to say on this!)

jitterted,
@jitterted@sfba.social avatar

@gdinwiddie @rebeccawb

The model was useful, though wrong (of course—it's not reality), because it helped us understand that we're "using up a fixed amount of seconds" vs. ending the timer at a fixed instant of time.

How reliable the "ticks" are is important, but also is how critical it is. This isn't a real-time system, so if we lose a second or two out of the entire time period, that's not an issue.

Once we started implementing the timer, we found that we could either assume a reliable once-per-second "tick", or, measure the elapsed time since the last "tick" and reduce the "bag of seconds". We chose the latter, mostly to reduce the hidden coupling (assumption), with the side benefit of more resiliency.

jitterted, to running
@jitterted@sfba.social avatar

Finished my Half-Marathon race today in a better-than-expected time of about 2h25m. Was able to keep a pretty consistent pace, until the last mile where I ran the fastest mile of the whole event!

(Mile 12 was slow because I had to stop and fix the cushioning in my shoe.)

jitterted, to random
@jitterted@sfba.social avatar

Took me almost 2 hours to finally wrangle some HTML into what I wanted. It's frustrating only because I don't do CSS from scratch very often and there's so many tiny little things one has to know separately and how they work together.

Luckily the browser tools have gotten good enough to provide quick feedback along with help for grid and flex layouts. Juggling align-content and justify-content and so on is so much easier with immediate feedback.

jitterted,
@jitterted@sfba.social avatar

@itsjoshbruce It's the new UI for my Ensemble Timer. (I'll be showing it on my next live coding stream in 30 minutes!)

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