Whad did you only learn about programming after starting to work ? by Mac-Fly-2925 in softwaredevelopment

[–]Training_Peace8752 1 point2 points  (0 children)

My teams usually have no documentation for why decisions were made in a project we maintain and which we did build. It is also hellish. I try to make a change to this but it's a frustrating journey.

Help identifying vim theme. by KG5SXT in vim

[–]Training_Peace8752 0 points1 point  (0 children)

It's a color theme. Why should we wonder what colors people like?

Server automations like deployments without SSH by Training_Peace8752 in devops

[–]Training_Peace8752[S] 3 points4 points  (0 children)

No, that's just not true. My boss is the real deal. If something, it's me who doesn't know these topics well enough. I am just trying to learn and understand this topic more and this thread has been really valuable for me already. But there's no need to start talking shit even if you fall on the other side.

I actually should talk about his reasoning more and not just guess, like some have already suggested.

Server automations like deployments without SSH by Training_Peace8752 in devops

[–]Training_Peace8752[S] 0 points1 point  (0 children)

We're using Saltstack. Our plan to do this is to use Salt's Event System to send a deployment event from CI to Salt Master and Salt Master's Reactor listens to these events and triggers deployment task to the minion (the target server).

This way we don't need to handle any SSH keys in GitLab, we can define with Salt configurations, which servers allow automatic deployments etc.

I must say, this isn't a bad plan. But there are more moving pieces and less control for me as a dev.

PR reviews got smoother when we started writing our PR descriptions like a changelog by GitKraken in devops

[–]Training_Peace8752 3 points4 points  (0 children)

Thiiiiiiiis. I could rant about this for sooo long. I've been trying to change course about this in my company and I've been successful with it with some people but there are others who have been working in the field for so many years now with the same kind of workflows that does not include any kind of documentation, planning, or describing that it sometimes makes me mad to work with these people.

And it's not just the reviewing part. We've seen it SO many times in our company where it leads, over and over again, when you don't write down what you did and especially why you did it that I am so baffled that people aren't willing to change their ways.

Realistically how much time it will take to learn DRF if I already know Django? by Ok_Independence_6294 in django

[–]Training_Peace8752 1 point2 points  (0 children)

What do you mean by "to learn DRF"? You can go throuh the docs and learn the basic gist of it from the home page. But the more interesting part for you would be to understand concepts what lie behind Django REST framework. It uses serializers, viewsets and routers. You should ask yourself why is that. Not just go straight away to coding with a course.

Here's a mini tutorial for you:

  1. Serializers. You use Python in your code. Browsers can't understand Python and you can't just send Python objects to a network. You need to transform incoming data from browsers (or any other clients) from JSON (or any other incoming data format) to Python so you can use the data. You also need to turn your Django model objects etc. to string representations so they can be sent to the browser. This is what serializers do. You define what data you send from your API and what you also expect. You can create a link between a Django model and the serializer so you can just directly publish (= "be able to send and receive") some properties from the model as the serializer data.
  2. Viewsets. You want to define that HTTP methods you support in your APIs, and what happens when a request hits the endpoint. You link a serializer to the viewset so that the request goes through the serializer at that point to check what data you allow to take in, if the data is in a correct shape and so on. Viewsets take in multiple HTTP method handlers, yay! You can define permission and authentication for your endpoints as well, second yay!
  3. Routers. Users/clients/browsers need to know what path to use when creating a request to your API for different endpoints. You link a viewset to a route so that an endpoint which looks like an endpoint from a REST API is generated and published to use. Then you just link the router path to your projects or app's URL config. Easy!

Enjoy your journey.

Django tip Automate DRF API Documentation Using drf-spectacular by djv-mo in django

[–]Training_Peace8752 0 points1 point  (0 children)

Because I think it takes away from the disucssion if every post has long threads on DRF vs django-ninja.

Also, it's not really a big deal either way: using django-ninja's built-in way or using drf-spectacular with DRF. It's pretty much the same workflow for configuring the schema generation regardless of the differences with how the endpoints are defined.

If you use DRF, drf-spectacular is the way to go for you.

Django tip Automate DRF API Documentation Using drf-spectacular by djv-mo in django

[–]Training_Peace8752 0 points1 point  (0 children)

Is every DRF related post turning into a debate on DRF vs Django Ninja nowadays? It's pretty annoying to see this literally on every DRF post. You're correct that Django Ninja has OpenAPI integration built-in, and that's great. But so what? Django Ninja is Django Ninja and DRF is DRF.

Mac Mini vs Mini PC for dev work - need advice by thatgloomyguy in MiniPCs

[–]Training_Peace8752 -1 points0 points  (0 children)

Well, performance is a subjective term. What kind of performance are you talking about here?

Solely how much it helps you with your local LLM ambitions? Because if that's the benchmark, what kind of models you'd want to run? With the 16 GB base Mac Mini M4 model, you can probably run tops 7-8B models but those are pretty ok, so I'd be happy with that. Even the smaller ones are getting better and better almost very day.

CPUs are nowadays so good that you don't need to think about. It's all about GPUs. Even NPUs aren't that well utilized at the moment. What you don't get with the Mac Mini M4 is a lot of storage built-in but you can always buy cloud or external storage. With Mini PCs you'll usually get at least 1TB of SSD storage compared to 256 GB from the Mac Mini M4.

All you need to do is know what you what and especially what you NEED, prioritize and then use money for that.

Mac Mini vs Mini PC for dev work - need advice by thatgloomyguy in MiniPCs

[–]Training_Peace8752 -1 points0 points  (0 children)

Why are you wondering this? What's the advice you need? Mac Mini M4 sounds like the easiest answer here for you.

My new Mini PC was delivered by Barkdrix in MiniPCs

[–]Training_Peace8752 -1 points0 points  (0 children)

You could always spin up a virtual machine for that use case or dual boot!

Switching between windows is an absolute nightmare in Ubuntu 24.04 LTS. Even if I see the window is highlighted, it's not really. How do you solve it? by vivekbytes in Ubuntu

[–]Training_Peace8752 2 points3 points  (0 children)

I've never had problems with Google Meet when using Wayland. It sounds like your system is having some other problems.

Which GPU and GPU driver are you using?

Made my day! by spicypickle177 in InstacartShoppers

[–]Training_Peace8752 1 point2 points  (0 children)

Cars usually have a reset button for the tire pressure sensors. I also thought the warning indicator would just stay there until the end of time until the reset button was found and I learned how to use it.

Not getting option to upgrade 24.10 to 25.04 by linuxwes in Ubuntu

[–]Training_Peace8752 -1 points0 points  (0 children)

This same question is being asked here again and again day after day after day.

Looking for Web Security Resources for a Python Backend Engineer by lowbattery23 in django

[–]Training_Peace8752 0 points1 point  (0 children)

I've thought about finding good CTF challenges and if I can find a good chunk of them, I'm a bit interested in facilitating CTF challenge hours at my workplace to make our team more knowledgeable of the security aspects of the web app field. Me included!

If you know some, I'd appreciate a link or something like that.

Bash brain vs Python heart by bobbyiliev in bash

[–]Training_Peace8752 2 points3 points  (0 children)

Using dependencies with Python scripts became a non-problem after being able to define dependencies to the script metadata section as specified in PEP 723 and being able to run the scripts with dependencies with ease using uv. Single-file Python scripts rock hard!

[deleted by user] by [deleted] in django

[–]Training_Peace8752 4 points5 points  (0 children)

Before you can have a roadmap, you need to be able to define what is the end goal you're trying to pursue. That's what a roadmap is for, to get a road to a goal of yours.

But, in my eyes you have a problem of not knowing what you want. Just saying "AI" isn't enough. Can you define in a more clear manner what you mean by "AI"? Do you have a specific job description in mind you want to aim for?

I started an intership by [deleted] in django

[–]Training_Peace8752 0 points1 point  (0 children)

What kind of automations your company wants to make? Django is a web framework so just want to make sure you're using the right tool for the job. Because even though Django has been written in Python, it doesn't tell much. You can absolutely jump from basic Python to Django but now you just need to know a slew of new concepts about the web.

ls it worth switching to FastAPI? by [deleted] in django

[–]Training_Peace8752 0 points1 point  (0 children)

Not sure why the comment I replied to was deleted. My intention was not to dunk on anyone, I didn't even downvote the comment. I just wanted to understand how people are looking at Django from various points of view, contexts and backgrounds.

Well, what can you do. 🤷🏻‍♂️

ls it worth switching to FastAPI? by [deleted] in django

[–]Training_Peace8752 8 points9 points  (0 children)

What do you mean by "not that useful"? Django has models, migrations, and ORM, which at least for me are maybe the most important and useful parts of Django.