home.social

#codeing — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #codeing, aggregated by home.social.

fetched live
  1. i have to switch one of my scripts to use getopts instead of just a case statement pray for me ;_;

    #bash #CommandLine #codeing

  2. This is how I roll when I need to mark models as "completed", or anything else:

    1. Allow the marking to be idempotent
    2. If not idempotent, throw exceptions on duplicated calls
    3. Save is opt-out, to avoid more than one update query.

    #Programming #PHP #Laravel #Database #DB #WebDevelopment #WebDev #SoftwareDevelopment #Software #Codeing #code

  3. This is how I roll when I need to mark models as "completed", or anything else:

    1. Allow the marking to be idempotent
    2. If not idempotent, throw exceptions on duplicated calls
    3. Save is opt-out, to avoid more than one update query.

    #Programming #PHP #Laravel #Database #DB #WebDevelopment #WebDev #SoftwareDevelopment #Software #Codeing #code

  4. ☑️ Day 19/100: #Leetcode daily question

    🟨 Question: 670. Maximum Swap

    The question was good and I was able to do it but went for the solutions tab because I was not feeling like solving anymore. The solution was using a greedy approach.

    🐈‍⬛ Check out my #GitHub where I post all the daily streak 🔥 questions and #LeetcodeContest 🏆 solutions

    🔗 Solution Link: github.com/akshatsingh1718/lee

    🔗 My Leetcode Github: github.com/akshatsingh1718/lee

    #codeing #Algorithms #python #greedy

  5. OKAY, so #Symfony question for you experts out there.

    I have an entity that I'm using to store encrypted data in the DB. My entity needs to get a parameter from the parameter bag that's unique to the .env file it's in.

    Symfony basically says "don't do this" except that I really need to do it. If I try to use a setter, I'm having to add a setter for this for EVERY time I ask for either the entity, or one of its parents.

    That is... A lot... of calls to a setter where instead I could just have the entity get the parameter instead.

    And no, can't be a class constant (unless there's some way that I haven't found that lets you set constants based on params).

    So, how do I do this? Would appreciate some advice here. #symfony #php #codeing

  6. OKAY, so #Symfony question for you experts out there.

    I have an entity that I'm using to store encrypted data in the DB. My entity needs to get a parameter from the parameter bag that's unique to the .env file it's in.

    Symfony basically says "don't do this" except that I really need to do it. If I try to use a setter, I'm having to add a setter for this for EVERY time I ask for either the entity, or one of its parents.

    That is... A lot... of calls to a setter where instead I could just have the entity get the parameter instead.

    And no, can't be a class constant (unless there's some way that I haven't found that lets you set constants based on params).

    So, how do I do this? Would appreciate some advice here. #symfony #php #codeing

  7. Am 31.03.2023 schließt git.codecoop.org. endgültig. Bitte migriert Eure Projekte bis zu diesem Zeitpunkt.

    Seit nunmehr 2 Jahrzehnten(!) ist “codecoop.org” ein Ort, an dem Menschen gemeinsam Software entwickeln

    so36.net/news/codecoop-migrati

    #so36 #github #codeing

  8. Am 31.03.2023 schließt git.codecoop.org. endgültig. Bitte migriert Eure Projekte bis zu diesem Zeitpunkt.

    Seit nunmehr 2 Jahrzehnten(!) ist “codecoop.org” ein Ort, an dem Menschen gemeinsam Software entwickeln

    so36.net/news/codecoop-migrati

    #so36 #github #codeing