lazerg's avatar

lazerg liked a comment+100 XP

2d ago

lazerg's avatar

lazerg liked a comment+100 XP

2d ago

Jeffrey's Larabits: Ep 52, Meet Bob, My New Personal Assistant

Quick PSA. Be very, very careful if you intend to install this on your primary machine.

Ideally, opt for a dedicated old laptop or VPS.

lazerg's avatar

lazerg liked a comment+100 XP

2d ago

Understanding Laravel's Context Capabilities: Ep 6, Using Stacks and Handling Events

Thanks for the overview, @jwmcpeak

With something this niche, it might take a bit to figure out some truly good use cases for it. But like you warned more than once, it's stored directly in memory, so it shouldn't be overused anyway.

lazerg's avatar

lazerg liked a comment+100 XP

2d ago

Understanding Laravel's Context Capabilities: Ep 3, Using Context in Jobs

@elsayed-elbeshry I'm pretty sure that's the default. In config\mail.php, there's a setting for the default mailer:

'default' => env('MAIL_MAILER', 'log'),
lazerg's avatar

lazerg liked a comment+100 XP

2d ago

Understanding Laravel's Context Capabilities: Ep 3, Using Context in Jobs

@Danakin looks like you are right. I tried it and it does get added to the payload, under the illuminate:log:context key.

{
  "uuid": "bded95ba-a45a-40ea-84d3-67ceae2b5dc4",
  "displayName": "App\\Jobs\\Example",
  "job": "Illuminate\\Queue\\CallQueuedHandler@call",
  "maxTries": null,
  "maxExceptions": null,
  "failOnTimeout": false,
  "backoff": null,
  "timeout": null,
  "retryUntil": null,
  "data": {
    "commandName": "App\\Jobs\\Example",
    "command": "O:16:\"App\\Jobs\\Example\":0:{}"
  },
  "illuminate:log:context": {
    "data": {
      "example": "s:5:\"hello world\";"
    },
    "hidden": {
      "secret": "s:12:\"don not tell\";"
    }
  }
}
lazerg's avatar

lazerg liked a comment+100 XP

2d ago

Understanding Laravel's Context Capabilities: Ep 3, Using Context in Jobs

Thanks @Danakin. I'm curious about the internal mechanism. Where, how, when are they hydrating and dehydrating the data.

lazerg's avatar

lazerg liked a comment+100 XP

2d ago

Understanding Laravel's Context Capabilities: Ep 3, Using Context in Jobs

What I'd like to know is how Context passes the data into a queued job, since you said Context resides in memory but queued jobs are not part of the request but are processed by a queue. How does that magic work?

lazerg's avatar

lazerg liked a comment+100 XP

2d ago

lazerg's avatar

lazerg liked a comment+100 XP

2d ago

lazerg's avatar

lazerg liked a comment+100 XP

2d ago

Load Balance a Laravel App: Ep 1, Configure the Network

@untymage No. It means that you won't be able to use this exact configuration, but it should be adaptable to other services with a bit of work. I would love to see this done on something like DigitalOcean, though. It just makes sense, given that Laracasts is hosted there itself.

lazerg's avatar

lazerg liked a comment+100 XP

2d ago

Load Balance a Laravel App: Ep 1, Configure the Network

I don't use AWS. What should I do? Does that mean I need to use AWS to take advantage of load balancing?

lazerg's avatar

lazerg liked a comment+100 XP

4d ago

Real Time Games With Laravel: Ep 3, Board Basics

I think instead of keeping the states in an 1-dimensional array, it'd be much easier to manage the user's state, calculate the winning state and visualize the overall board if it is a 2D array. Also, to calculate users' turn, one alternate solution could be simply incrementing a number on each user's action and checking if it's an odd number or an even number.

lazerg's avatar

lazerg liked a comment+100 XP

4d ago

Real Time Games With Laravel: Ep 3, Board Basics

@pascal78 thank you 😊 I'm glad that decision paid off - I wanted the focus to be on websockets and server/client interactions, but something a little more interesting than messaging indicators.

lazerg's avatar

lazerg liked a comment+100 XP

4d ago

Real Time Games With Laravel: Ep 3, Board Basics

Hi Luke ! Thanks you for this great course !

TicTacToe is a perfect example without too complex logic, and it allows us to focus on the websockets events and interactions via Reverb and Echo !

lazerg's avatar

lazerg liked a comment+100 XP

4d ago

Real Time Games With Laravel: Ep 2, Joining a Game

@sketchni so… you chose death 😁 No, all valid. If I were to be adding any additional methods, I'd definitely start splitting things out into dedicated CRUD controllers. Great break down here of the other side 👌

lazerg's avatar

lazerg liked a comment+100 XP

4d ago

Real Time Games With Laravel: Ep 2, Joining a Game

I was expecting this vid to start right where the previous one was cut off :D

lazerg's avatar

lazerg liked a comment+100 XP

4d ago

Real Time Games With Laravel: Ep 2, Joining a Game

Hi Luke, Just out of curiosity is there any specific reason apart from personal preference behind preferring the script at the bottom rather than at the top of the file?

lazerg's avatar

lazerg liked a comment+100 XP

4d ago

Real Time Games With Laravel: Ep 2, Joining a Game

Interesting as always, thanks Luke 🙂

lazerg's avatar

lazerg liked a comment+100 XP

4d ago

The Batteries-Included AI Toolkit : Ep 12, Testing AI Features Without Hitting the API

I just tested it in the Tinker

\App\Ai\DirectAnswerAgent::fake([
    ['response...']
]);

$response = \App\Ai\DirectAnswerAgent::make()->prompt('hi there');
$responseB = \App\Ai\DirectAnswerAgent::make()->prompt('hi there 2');

dump([
    (string) $response,
    (string) $responseB,
]);

And the result is:

[
    "[\"response...\"]",
    "Fake response for prompt: hi there 2",
  ]

It does not hit the API, it returns a generic fake response (because I haven't provided my custom fake response). But it does not hit the API, because fake() was called.

But once I remove the fake() completely - it does hit real API.

lazerg's avatar

lazerg liked a comment+100 XP

4d ago

The Batteries-Included AI Toolkit : Ep 11, Safety Layers and Guardrails

It's funny how Jeremy preferred not fixing the typo in the class name because probably VScode can't rename/refactor this as PHPStorm would.

lazerg's avatar

lazerg liked a comment+100 XP

4d ago

The Batteries-Included AI Toolkit : Ep 8, Retrieval from Files and External Sources

Very rushed video. I wish the details and theory were thought slowly.

lazerg's avatar

lazerg liked a comment+100 XP

4d ago

lazerg's avatar

lazerg liked a comment+100 XP

4d ago

lazerg's avatar

lazerg liked a comment+100 XP

6d ago

Practical TypeScript for the Laravel Developer: Ep 7, Where Should Everything Go?

Use type until you need something interface provides.

Both are totally valid and often interchangeable. My personal rule: start with type unless an interface-specific feature makes it necessary.

@JoeBot compare Type vs. Interface

lazerg's avatar

lazerg liked a comment+100 XP

6d ago

Practical TypeScript for the Laravel Developer: Ep 2, TypeScript Basics

Following the video and it is one of the clearest explanations I've seen for Typescript types. Thank you!

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

Write Code That's Easy to Maintain: Ep 1, Introduction

There aren’t many opportunities for CEO to teach me programming.

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

Write Code That's Easy to Maintain: Ep 1, Introduction

No way a CEO teaching me programming. Incredible!

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

Watch Me AI the UI: Ep 5, How to Organize Upgrades

This is a great series. Especially now that I am learning a bit about what Claude Code can do and how best to implement this in my daily work as a programmer.

Thank you!

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

Watch Me AI the UI: Ep 3, The Screenshot Approach

One trick I use after design comes back without pixel perfection is to annotate on the design, then ask my agent to review the original screenshot versus my annotated screenshot and then list all things that are wrong, before I confirm it can proceed to fix. I find that this approach drastically reduces the back and forth as the agent is forced to review its own work, aided by the annotations, itemise it for agreement and can proceed to one (or second) shot the design.

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

Watch Me AI the UI: Ep 3, The Screenshot Approach

Its not you Jeffrey its the "twitter" where all magically works one shotting it :)

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

The Ralph Wiggum Technique: Ep 16, Beyond Ralph Orchestration

@SabatinoMasala thanks, do you have a post or video about learning Linear so we can check in?

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

The Ralph Wiggum Technique: Ep 16, Beyond Ralph Orchestration

Great course! Really love it and appreciate all the learnings. One thing though, where can we find the files for this course?

lazerg's avatar

lazerg wrote a comment+100 XP

1w ago

The Ralph Wiggum Technique: Ep 3, What Is A PRD?

Off topic: How do you guys create the opening videos with Ralph in them? They look really cool. Do you use any tools?

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

Beginning TypeScript: Ep 10, Intersections

Is there some rule as to how semi-colons are used?

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

Beginning TypeScript: Ep 4, Literals and Enums

In WebStorm, unless I use a // @ts-ignore above the suitMeaning() function, I get a 'not all code paths return a value' error and the code won't compile. It specifically underlines the (suit: Suit) => { line. Any ideas why this might occur? If I use // @ts-ignore it compiles and works fine.

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

Beginning TypeScript: Ep 4, Literals and Enums

That's great to hear, thank you. This was one of the trickier videos to plan and I'm glad I was able to communicate the differences in a way that helped.

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

Beginning TypeScript: Ep 4, Literals and Enums

This is such a good explanation. I found myself using enums thinking it was the 'typescript' way to do things, when really I should've been using literals.

This really answers the 'when would I use enums at all?' question perfectly.

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

Beginning TypeScript: Ep 1, Hello, TypeScript

@Michael_Timbs The link to your Medium does not work :/

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

Redis vs Amazon SQS for Queue

REDIS does not require a different server- u can use it in the same server as you have right now for your dev. but a separate server would be a better choice.

lazerg's avatar

lazerg liked a comment+100 XP

1w ago

lazerg's avatar

lazerg wrote a comment+100 XP

3w ago

So You Want to Build an Agent : Ep 10, Agent Memory

Hi @jeffreyway ... When we will have the continuation?

lazerg's avatar

lazerg liked a comment+100 XP

3w ago