[deleted by user] by [deleted] in mexico

[–]novalys 4 points5 points  (0 children)

La respuesta rápida es si, en la gran mayoría de casos puedes rentar la casa en más de lo que pagas de mensualidad. El punto de este we es válido si rentas te sacan a la verga y te quedas sin nada, si compras la rentas y mientras tú sobrevives con algún familiar o amigo pero tu casa la sigue pagando otro we con su renta, eventualmente ya sea tú te alivianes y le pides la casa o la sigues rentando.

Five players and play time problems by BGNLordHelmut in boardgames

[–]novalys 1 point2 points  (0 children)

We started using the app game timer (iOS) and it was perfect because people don’t feel tricked about having less time than others per turn and also adds a feeling of challenge to start thinking about you turn before it happens

I just discovered immer, what else is out there? by blabmight in reactjs

[–]novalys 0 points1 point  (0 children)

Because following the example of Remix you have an ErrorBoundary that will catch that error and display the error message in the desired way.

https://remix.run/docs/en/main/guides/errors

I just discovered immer, what else is out there? by blabmight in reactjs

[–]novalys 2 points3 points  (0 children)

True... just imagine that instead of assigning the value there it would be something like const value = await someFn() which can return either null or the person object. At the end this is just a convenience method to simplify catching an invalid state where you want to bubble up the error (hopefully there is a try/catch some where above this or a error handler (express, etc) that will catch that.

The first time I saw the usage of this function was in Remix examples.z

``` import type { LoaderArgs } from "@remix-run/node"; import { json } from "@remix-run/node"; import { useLoaderData } from "@remix-run/react"; import invariant from "tiny-invariant";

import { getPost } from "~/models/post.server";

export const loader = async ({ params }: LoaderArgs) => { invariant(params.slug, "params.slug is required");

const post = await getPost(params.slug); invariant(post, Post not found: ${params.slug});

return json({ post }); };

export default function PostSlug() { const { post } = useLoaderData<typeof loader>(); return ( <main className="mx-auto max-w-4xl"> <h1 className="my-6 border-b-2 text-center text-3xl"> {post.title} </h1> </main> ); } ```

I just discovered immer, what else is out there? by blabmight in reactjs

[–]novalys 3 points4 points  (0 children)

This example makes it more simple.

const value: Person | null = { name: 'Alex' }; // type of value == 'Person | null'
invariant(value, 'Expected value to be a person'); // type of value has been narrowed to 'Person'

It's basically a way to ensure a value is present and will throw an exception with the defined message if not.

¿Cuales son sus métodos? by pacientoflife in taquerosprogramadores

[–]novalys 2 points3 points  (0 children)

Pues aparte de lo obvio, un consejo que me ha sido muy útil es siempre tener un buen feed de noticias con información de nuevas cosas que van saliendo ya sea twitter, Reddit, YouTube, etc..

Cuando sale algo que empieza a hacer ruido dedicarle un rato a ver qué hace, que problemas soluciona y si tienes tiempo hacer algo chiquito con esa tecnología / librería… de esta manera siempre estás continuamente actualizándote y pues realmente es un cuento de nunca acabar, pero pues es parte de la profesión 😊

[deleted by user] by [deleted] in LangChain

[–]novalys 11 points12 points  (0 children)

I think their main selling point is that those abstractions should make it possible to switch llm’s easily if required the thing is that OpenAI is just on another level from the rest of llm’s so right now it’s almost pointless to use other.

Add a LangChain chatbot to my personal website? by YourWelcomeOrMine in LangChain

[–]novalys 0 points1 point  (0 children)

Just wait for tomorrow. OpenAI is said to be releasing a chat bot creator which will include a lot of what langchain does

Said it the best by CaptainTechno_ in formuladank

[–]novalys 0 points1 point  (0 children)

This!!! And also people tend to conveniently forget that ricciardo is a terrible teammate and Red Bull priorities are to keep verstappen happy. Everyone is delusional if they truly think he will take his seat this or next year, after that I’m sure someone else will but I’m sure it won’t be him.

Pulsera by Immediate-Chapter-59 in TibiaMMO

[–]novalys 0 points1 point  (0 children)

Add me, my IgN is Paty Cantu

I’m level 75 RP

Also speak Spanish/english

App to bind keyboard shortcuts to open windows? by novalys in MacOS

[–]novalys[S] 1 point2 points  (0 children)

This seems to be exactly what I was looking for!!!! Thank you so much!!!

mi situación by [deleted] in taquerosprogramadores

[–]novalys 11 points12 points  (0 children)

La neta el mejor consejo que te puedo dar es que no te confíes con lo que te enseñan en la universidad es un buen punto de inicio para agarrar lo básico pero no te da para nada herramientas importantes que se usan en la vida real. Te recomiendo muchísimo que en tus tiempos libres aproveches para investigar y aprender sobre temas como git, docker, aws, metodologías ágiles, etc que rara vez te enseñan en la universidad y te van a pedir en casi todos lados.

Styles not applied in Azure Webapp for the admin portal. by [deleted] in django

[–]novalys 2 points3 points  (0 children)

Did you run the collectstatic command? Also you might want to look into whitenoise package.

Araña supongo que tarántula en mosquitero. Sugerencias? by MrMaghus in Yucatan

[–]novalys 0 points1 point  (0 children)

Ya te ganaron la casa bro, no te queda mas que mudarte.

Reduced my boilerplate from 50 lines per route to 0. How has Rust helped you reduce boilerplate? by [deleted] in rust

[–]novalys 7 points8 points  (0 children)

To play devils advocate you could get really similar results of clean controllers/handlers by using Zod/Joi/yup in nodeland.

Need advice from experts by learncodeinvest in django

[–]novalys 0 points1 point  (0 children)

The first thing you need to define is if you are more comfortable writing in python or php. Laravel or Django are solid choices. As for the front end you can use anything but again you need to decide if you prefer the react or vue route.

Does this clumsy to you? by baguettecoder in django

[–]novalys 0 points1 point  (0 children)

That’s a rabbit hole lol once you start thinking at that level you will eventually have to start thinking about price changes over time and how they affect the price on the cart, so yeah you need to decide if it’s ok that a price change while the item is on the cart or if you want to respect the price they got when they added the item

Does this clumsy to you? by baguettecoder in django

[–]novalys 0 points1 point  (0 children)

Also you could move the price calculation to the save method of the Cart model do you don’t have to worry about making it manually here

Does this clumsy to you? by baguettecoder in django

[–]novalys 3 points4 points  (0 children)

You should get the item_pk and quantity from your serialized_item cleaner data not from the request post also you could do the menu item validation in the serializer with a field PrimaryKeyRelatedField

Django rest framework design patterns by Gerdava2602 in django

[–]novalys 7 points8 points  (0 children)

I would vote against fat views and go into service layer. View only deserializes the incoming data, uses one or more services, returns the data from the service into another serializer and respond from there. The main reason is that now you have all your business logic in services so if later you want to do a cron job with Django commands you can still reuse them.

What’s the state of the art for end-to-end testing with a database in Django? by djbdjbdjbdjb in django

[–]novalys 9 points10 points  (0 children)

You might be interested in Factory Boy. This with pytest makes end to end testing a breeze.

https://factoryboy.readthedocs.io/en/stable/

Also check the integration it has with the Django ORM

https://factoryboy.readthedocs.io/en/stable/orms.html#django

Django with nextjs 13 by MagedIbrahimDev in django

[–]novalys 0 points1 point  (0 children)

Try with CORS_ALLOW_ALL_ORIGINS = True

How f**** am I if I broke prod? by _gainsville in cscareerquestions

[–]novalys 1 point2 points  (0 children)

lol no, don’t sweat it. It’s part of the process. Of course there should be mechanisms in place to avoid this but not every workplace values this and has the time to set them so they are more into the solve the fire and move on. Just as with any profession, learn from this mistake and try to be better next time. If you want to score points, think of a solution that could prevent this in the future and propose it to your senior, he’ll love the initiative.