#codeing — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #codeing, aggregated by home.social.
-
i have to switch one of my scripts to use
getoptsinstead of just acasestatement pray for me ;_; -
i have to switch one of my scripts to use
getoptsinstead of just acasestatement pray for me ;_; -
i have to switch one of my scripts to use
getoptsinstead of just acasestatement pray for me ;_; -
i have to switch one of my scripts to use
getoptsinstead of just acasestatement pray for me ;_; -
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
-
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
-
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
-
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
-
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
-
☑️ 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: https://github.com/akshatsingh1718/leetcode/tree/main/maximumSwap
🔗 My Leetcode Github: https://github.com/akshatsingh1718/leetcode
-
☑️ 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: https://github.com/akshatsingh1718/leetcode/tree/main/maximumSwap
🔗 My Leetcode Github: https://github.com/akshatsingh1718/leetcode
-
☑️ 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: https://github.com/akshatsingh1718/leetcode/tree/main/maximumSwap
🔗 My Leetcode Github: https://github.com/akshatsingh1718/leetcode
-
☑️ 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: https://github.com/akshatsingh1718/leetcode/tree/main/maximumSwap
🔗 My Leetcode Github: https://github.com/akshatsingh1718/leetcode
-
☑️ 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: https://github.com/akshatsingh1718/leetcode/tree/main/maximumSwap
🔗 My Leetcode Github: https://github.com/akshatsingh1718/leetcode
-
Check out my latest article: Is http://main.py == main.txt? 🐍💻 https://linkedin.com/pulse/mainpy-maintxt-akshat-singh-ux0yc
-
Check out my latest article: Is http://main.py == main.txt? 🐍💻 https://linkedin.com/pulse/mainpy-maintxt-akshat-singh-ux0yc
-
Check out my latest article: Is http://main.py == main.txt? 🐍💻 https://linkedin.com/pulse/mainpy-maintxt-akshat-singh-ux0yc
-
Check out my latest article: Is http://main.py == main.txt? 🐍💻 https://linkedin.com/pulse/mainpy-maintxt-akshat-singh-ux0yc
-
Check out my latest article: Is http://main.py == main.txt? 🐍💻 https://linkedin.com/pulse/mainpy-maintxt-akshat-singh-ux0yc
-
CW: Rant about configuration formats
Im currently working on my dlang serialization framework and just thought about adding maybe yaml, but the spec is so fucking complex, half the time it even dosnt know what it wants to even say. Like, it cannot tell you straigt what characters are allowed in an key, heck it dosnt even can decide how keys should be parsed. For example you can put a `?` at the start of a line (after indentation ofc) and then write arbitary yaml that then gets parsed and used as the key! Like wtf!
So I tought: "maybe try toml instead", but theyre just the same insane but in a different way; like keys and tables/sections cannot have the same value since a table is just syntactic sugar for a key with an inline-table aka object. End bc it's not enough already we invented that it would be nice to put another pair of brackets (`[]`) around the section/table to say: hey this is now an **array of tables**! Like very nice for serializers and stuff.... *sigh*
#programming #technology #serialization #fileformats #code #codeing #dlang
-
CW: Rant about configuration formats
Im currently working on my dlang serialization framework and just thought about adding maybe yaml, but the spec is so fucking complex, half the time it even dosnt know what it wants to even say. Like, it cannot tell you straigt what characters are allowed in an key, heck it dosnt even can decide how keys should be parsed. For example you can put a `?` at the start of a line (after indentation ofc) and then write arbitary yaml that then gets parsed and used as the key! Like wtf!
So I tought: "maybe try toml instead", but theyre just the same insane but in a different way; like keys and tables/sections cannot have the same value since a table is just syntactic sugar for a key with an inline-table aka object. End bc it's not enough already we invented that it would be nice to put another pair of brackets (`[]`) around the section/table to say: hey this is now an **array of tables**! Like very nice for serializers and stuff.... *sigh*
#programming #technology #serialization #fileformats #code #codeing #dlang
-
CW: Rant about configuration formats
Im currently working on my dlang serialization framework and just thought about adding maybe yaml, but the spec is so fucking complex, half the time it even dosnt know what it wants to even say. Like, it cannot tell you straigt what characters are allowed in an key, heck it dosnt even can decide how keys should be parsed. For example you can put a `?` at the start of a line (after indentation ofc) and then write arbitary yaml that then gets parsed and used as the key! Like wtf!
So I tought: "maybe try toml instead", but theyre just the same insane but in a different way; like keys and tables/sections cannot have the same value since a table is just syntactic sugar for a key with an inline-table aka object. End bc it's not enough already we invented that it would be nice to put another pair of brackets (`[]`) around the section/table to say: hey this is now an **array of tables**! Like very nice for serializers and stuff.... *sigh*
#programming #technology #serialization #fileformats #code #codeing #dlang
-
CW: Rant about configuration formats
Im currently working on my dlang serialization framework and just thought about adding maybe yaml, but the spec is so fucking complex, half the time it even dosnt know what it wants to even say. Like, it cannot tell you straigt what characters are allowed in an key, heck it dosnt even can decide how keys should be parsed. For example you can put a `?` at the start of a line (after indentation ofc) and then write arbitary yaml that then gets parsed and used as the key! Like wtf!
So I tought: "maybe try toml instead", but theyre just the same insane but in a different way; like keys and tables/sections cannot have the same value since a table is just syntactic sugar for a key with an inline-table aka object. End bc it's not enough already we invented that it would be nice to put another pair of brackets (`[]`) around the section/table to say: hey this is now an **array of tables**! Like very nice for serializers and stuff.... *sigh*
#programming #technology #serialization #fileformats #code #codeing #dlang
-
Unpopular opinion: business logic is boring.
Compilers, kernels, drivers, hardware, parallelism / async, tooling & frameworks, how things interact, integrate and complement each other; now **thats** the interesting shit!
#developer #programming #development #IT #code #codeing #unpopularopinon #frameworks #tooling #parallelism
-
Unpopular opinion: business logic is boring.
Compilers, kernels, drivers, hardware, parallelism / async, tooling & frameworks, how things interact, integrate and complement each other; now **thats** the interesting shit!
#developer #programming #development #IT #code #codeing #unpopularopinon #frameworks #tooling #parallelism
-
Unpopular opinion: business logic is boring.
Compilers, kernels, drivers, hardware, parallelism / async, tooling & frameworks, how things interact, integrate and complement each other; now **thats** the interesting shit!
#developer #programming #development #IT #code #codeing #unpopularopinon #frameworks #tooling #parallelism
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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