jdworks's avatar

jdworks wrote a comment+100 XP

4mos ago

@Shivamyadav When you approach people to contact you via mail with out any valid reason, it raises red flags why you can't discuss something in public forums. You could be anything from a hacker to an extortion ring or even Jeffrey way posing as a Level 16 user. Remember the first lesson of Laravel, never trust input from any user, not even Jeffrey way.

jdworks's avatar

jdworks wrote a comment+100 XP

4mos ago

@Shivamyadav Thanks but no thanks buddy

jdworks's avatar

jdworks wrote a comment+100 XP

4mos ago

FSMs are the way to go about making games even in Alpine.

This course should be titled how not to make Games with Sphagetti code ;-))

jdworks's avatar

jdworks wrote a comment+100 XP

4mos ago

Students today have access to tools like AI that can provide them with clear explanations, direct answers, and high-quality code suggestions— instantly, and without unnecessary complication. When Human Teaching Assistants or Mentors withhold clarity or avoid giving straightforward guidance, the effect isn’t that newbies “learn less”; instead, the community is perceived as less supportive, and students naturally turn to tools that are straightforward.

If tutorials want their role to remain meaningful, you need to offer something better than what students can already get from AI:

  1. clarity rather than obstruction
  2. guidance rather than cryptic hints
  3. generosity rather than gatekeeping
  4. real human insight and encouragement

Good mentorship in 2025 isn’t about limiting learning—it's about accelerating it. When the community/mentors/TAs helps openly and constructively, students respect and value their roles. When they don’t, AI will inevitably fill in the void.

jdworks's avatar

jdworks wrote a comment+100 XP

5mos ago

Any chance updating the source to use tailwindCSS ?

If not, its a good exercise for using AI as a teaching assistant for such tasks.

jdworks's avatar

jdworks wrote a comment+100 XP

5mos ago

Woulda been nice if you did this small project with an FSM design pattern in Alpine. Starting with its design in a Mermaid document. But I can only wish.

jdworks's avatar

jdworks wrote a comment+100 XP

5mos ago

Great tutorial. Wish you would mention the pattern (React/Vue pattern) "update the canonical state upstream & compute downstream", unlike updating a score with +1 as many unity tutorials demo.

jdworks's avatar

jdworks wrote a comment+100 XP

5mos ago

Thanks

jdworks's avatar

jdworks wrote a comment+100 XP

5mos ago

Test todos seem very good for documenting & Notes about the software behaviour we are learning in Tutorials than using disconnected markdown notes elsewhere.

jdworks's avatar

jdworks wrote a comment+100 XP

5mos ago

Use IntelliJ multiple cursors when:

  • You see all occurrences on screen at once
  • The change is visually obvious and uniform
  • You want to edit columns or aligned things
  • You’re doing structural changes that aren’t semantic (e.g., aligning params)

Better use IdeaVim and the */n/. pattern

This is especially true in Laravel/PHP projects where variable names and method names are easy to accidentally partially match.

  • Editing code identifiers (safe → whole-word match)
  • There might be similar but not identical words
  • You want to inspect occurrences one at a time
  • You need to repeat a full edit sequence, not just text insertion
jdworks's avatar

jdworks wrote a comment+100 XP

5mos ago

Very Good

jdworks's avatar

jdworks wrote a comment+100 XP

5mos ago

The analogy I use for remembering Coupling, Dependency Injection and Programming to Interfaces is 3 workers - bricklayer, carpenter and plumber working to build a house.

In tight coupling each worker has knowledge of the other work that needs to be done and knows that they have to wait for the first worker to finish their job. And they all have to be present at the site at the same time.

In loose coupling, all workers know there is a blue print or (Interface or contract) on how to build a house, and worker A when he is done with his work, writes on the Job Board that brick laying is finished and hands over the responsibility of doing further work to the next person in line and thats it. He doesn't care if its the plumber or carpenter who has to start doing their job next. They do their stuff at their convenience without knowledge of who has to do what and when.

jdworks's avatar

jdworks wrote a comment+100 XP

5mos ago

Super Cool. Very Good video. Even more cool is that Laravel has implemented Polymorphic Many to Many so beautifully which even Ruby on Rails still struggles with

jdworks's avatar

jdworks wrote a comment+100 XP

5mos ago

PHP Storm complains it cannot find the font when font is added to public folder. So here is what was done to fix it.

  1. moved /fonts/pixl/DepartureMono-Regular.woff2

    • from /public
    • into /resources
  2. In @font-face in app.css

    • Change src() as
      • src: url('../fonts/pixl/DepartureMono-Regular.woff2')
jdworks's avatar

jdworks wrote a comment+100 XP

5mos ago

[Newbie] Analogy for N+1 Query

Disclaimer: This analogy is based on personal experience when working as expats in foreign countries.

Imagine a passport office that relies on a central government server for all citizen data.

Every morning, the office IT technician is supposed to download (preload) the day’s records in bulk to a local server before the public arrives. That way, when each officer looks up an applicant, the data is fetched instantly from the local cache.

But if they forget to preload (or the LAZY Technician decides not to prefetch or preload) and instead query the central server every time a citizen walks up, each computer sends its own request across the network. Multiply that by hundreds of citizens, and suddenly you’ve got network congestion and a painfully slow system.

That’s the N+1 query problem in the real world: One initial query to get the list of applicants (the “1”) Plus one extra query to the central server for each applicant’s details (the “+N”).

The fix is the same in both worlds: fetch related data in advance — preload it once, locally or in memory — instead of letting every record make its own round trip.

Correct me if I'm wrong - but this is what system design engineers call "Batch early, cache locally, serve quickly"

jdworks's avatar

jdworks wrote a comment+100 XP

5mos ago

[Newbies] Struggling with the Concept of Closures

A closure is like a function with memory — it carries a private backpack of variables from the scope in which it was born.

Understanding Closures in PHP (with a simple analogy)

Imagine a child (inner function) who grows up with certain family values (variables from the outer scope). Even after the parents (outer function) are no longer around, the child still carries those values inside. That’s what a closure is — a function that remembers the environment where it was created, even when it’s used elsewhere.

jdworks's avatar

jdworks wrote a comment+100 XP

5mos ago

[Newbies] Understanding the Role of the Model

Most tutorials will tell you that “the Model is where business logic lives.” That’s true — but it’s also incomplete.

A clearer way to understand the Model is this: Information is Data that makes sense for your "domain". Data belongs to the database. Information belongs to the Model.

The database stores raw data — just facts: numbers, names, and relationships. But data on its own has no meaning until it’s interpreted in the context of your domain. That process — turning data into information that makes sense for your application — is what the Model is truly for.

This is the business logic that lives here because it’s the set of rules that define meaning in your domain.

For example, deciding what counts as a “top 5 job,” “active customer,” or “late payment” isn’t a database concern — it’s a domain concern.

And that logic naturally belongs in the Model layer.

So instead of thinking of the Model as just “where queries go,” think of it as the intelligence that transforms data into meaningful information. It’s what makes your application’s world make sense.