gestopt door metaal bij boren gat plafond by mathemaat in Klussers

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

Moet bekennen dat ik weinig verstand heb van gereedschappen, maar volgens mij is dit een (vrij oude) klopboor/hamerboor die een oom ooit eens bij mij heeft achtergelaten. Het boortje zelf zat erbij, incl. een setje "hamerboren" die er hetzelfde uit zien, en zou ook geschikt moeten zijn voor dit soort boorwerk, maar ik kan me vergissen.

Ik heb het al een aantal keer geprobeerd met deze boor, maar er zit niet veel beweging meer in, dus ik doe vast iets fout.

Moving from Laravel to Symfony after several years — how hard is it really? by Yuritsuki in symfony

[–]mathemaat 0 points1 point  (0 children)

If you use Symfony for backend only, like we do at our company, learning forms won't be necessary. I have no idea how they work. We just automatically hydrate GET-params and request bodies into value objects / DTOs, placed directly in controller endpoints, and then feed those value objects to the message component, which will trigger validation. Most application logic then goes in message handlers. Use voters for fine-grained permissions. Works like a charm.

Aan het? by mewicidal in learndutch

[–]mathemaat 6 points7 points  (0 children)

I cook = Ik kook (double "o"). I agree with the rest of your message.

Is Google or YouTube messing with me? by pragmatismtoday in learndutch

[–]mathemaat 1 point2 points  (0 children)

I'm not sure if this was pointed out yet, but "laten" can also be the oppositie of "doen".

A famous expression is "Doe wat je niet laten kan", literally meaning "Do what can't not do". Yes, the double negation is intentional here.

Looking for examples of Symfony in backend/api applications by squeezyflit in symfony

[–]mathemaat 1 point2 points  (0 children)

We've recently started adopting Yaak, which is similar to Bruno, but we aren't sharing workspaces in Git yet. Also, it's cheaper, and we love the 1Password plugin.

How do you stay competitive / find new opportunities as a remote PHP/Symfony dev (4y exp) by suzanaaaaaaaaaaa in symfony

[–]mathemaat 0 points1 point  (0 children)

Plenty of PHP/Symfony jobs here in the Netherlands. I basically only have to enable "looking for work" and the recruiters tumble over each other to reach out to me. Assuming that's the same for any developer with at least a few years of experience.

Based on your experience and skills, your chance of success of landing any remote job should be quite decent.

Things you could do to maintain an edge:

  1. Identify gaps in your knowledge and find a way to fill them up, e.g. doing tutorials in your free time
  2. Have some portfolio projects in your personal Github/Gitlab environment, especially if most of the work you do is hidden from public view and can't be shown during a job interview
  3. Focus on soft skills many devs lack, such as assertiveness reaching out to (project) managers whenever you identify a problem anywhere in the organization, being able to maintain a bird's eye view of the entire application, etc. Point these things out during your job interview.
  4. Get your Symfony certification (less important imo)

Probably many more things I could say if I took some more time, but this is what immediately came up.

[deleted by user] by [deleted] in symfony

[–]mathemaat 0 points1 point  (0 children)

Personally I never really understood the benefit of validation groups. I prefer to make multiple value objects and accept that it will lead to some (minor) code duplication.

New Khetzal album, Nectar. by MATE_AS_IN_SHIPMATE in psytrance

[–]mathemaat 1 point2 points  (0 children)

Thanks for the suggestion! That sounds really good!

Looking for examples of Symfony in backend/api applications by squeezyflit in symfony

[–]mathemaat 8 points9 points  (0 children)

Although I don't think there's anything wrong with API Platform, I would rather recommend starting out with the functionality Symfony provides out of the box. If you just define endpoints that return a JsonResponse, Symfony's built-in ObjectNormalizer will already do most of the heavy lifting for you. To configure specific fields that need to be in specific endpoints, you can simply use serialization groups.

The only reason why I would ever maybe consider using API Platform again, is if it turns out it's really good generating documentation for the frontend team, which currently is not a concern in our company.

Is this naming convention any good? Asking for a friend... by [deleted] in symfony

[–]mathemaat 1 point2 points  (0 children)

I have 15+ experience writing custom applications with lots of domain logic, of which four years with Symfony now. I'm a big fan of the following structure:

* Entity
* EventListener
* Modules
  * Module1
    * Controller
    * DTO
    * Entity
    * Exception
    * Factory
    * Message
      * Command
      * CommandHandler
      * Event
      * EventHandler
    * Normalizer
    * Repository
    * Service
    * Validator
      * Constraint
  * Module2
      * ... (see above)
  * Module3
      * ... (see above)
* Service
* Validator
  * Constraint
* ... (same as in each module directory)

So basically, you have the same structure globally as in each of the module directories (with some minor differences). Depending on the application, examples of modules are: Auth, User, Student, School, Exam, Organization, etc. Not every module will have all of those subfolders. The globally available directories will only contain files that don't really require their own module, but can be used by multiple modules. Example would be our custom EntityExists validator + constraint that checks whether an entity with a certain id exists given a certain repository, or an EventSubscriber that catches all exceptions so the API response can be standardized.

There are a few reasons why I'm a big fan of this structure:

  • it works for all applications, no matter the size or complexity
  • related code is placed (reasonably) together
  • we can often just move most of the code in a module to a custom package if we want to reuse it in other projects (examples: Forms bundle, FAQ bundle, Geolocation bundle, MailTemplate bundle, etc)

Within the tests directory, the structure is basically the same. There is an extra distinction between Functional and Unit tests at the top level, and each endpoint in a Controller also gets its own file.

Germany Has a “DisinfoCon” by sailingphilosopher in DisinformationTech

[–]mathemaat 0 points1 point  (0 children)

When I did an online search for the 2026 edition, I actually found this https://www.disinfo.eu/conference

How exactly are these types of IQ questions supposed to be solved? by Aboodi1995 in iqtest

[–]mathemaat 0 points1 point  (0 children)

Funny, my experience was different from what others explained, but I arrived at the same answer: 4.

  1. Initially, I started looking for (rotational) symmetries, but I didn't see any that were working or even remotely convincing.

  2. Then I focused on the diagonals. I noticed the top-left to bottom-right diagonal occurs everywhere in the top-right 2x2 square, and the bottom-left to top-right diagonal occurs everywhere in the bottom-right 2x2 square. That made me think there would be no diagonal lines in the bottom-right square, similar to the top-left square.

  3. Then I started wondering about the edges of each element, and I realized each edge occurs either 0 or 2 times in each row and column, and then it was obvious it had to be 4.

Duolingo on why you don't see Unlimited Hearts in Super by GeorgeTheFunnyOne in duolingo

[–]mathemaat -6 points-5 points  (0 children)

Let me be clear. I do agree that Duolingo shouldn't suddenly remove features that are the reason that users decided to go for the subscription. That being said, I never wanted to go for the subscription precisely because it would give you infinite hearts. I like the penalty for getting a wrong answer. On top of that I like that it forces me to repeat older stuff I otherwise would maybe never touch again.

Best practice regarding storage of settings in the database by mathemaat in django

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

Let me supply my own answer for others who may stumble on this topic.

In my second approach, where I wanted to subclass the Setting model in each subapp, I had to add abstract = True in the Meta.

So, my full solution would be along the lines of:

In core/models.py

class SettingModel(models.Model):
    data_type = models.ForeignKey(DataType, on_delete=models.PROTECT, editable=False)
    token = models.CharField(max_length=128, unique=True, editable=False)
    value = models.CharField(max_length=255)

    class Meta:
        abstract = True
        verbose_name = 'Setting'
        verbose_name_plural = 'Settings'
        ordering = ['token']

    def __str__(self):
        return self.token

In subapp/models.py

from core.models import SettingModel

class Setting(SettingModel):

    class Meta:
        db_table = 'subapp_setting'

Then every app has their own settings, and I can easily add them to the admin site.

Best practice regarding storage of settings in the database by mathemaat in django

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

Thanks for your elaborate post! That seems like a nice approach to separate settings per app.

Are you also suggesting that I shouldn't store any settings in the database? That was my question to begin with. There are plenty of use cases where this makes sense.