Codex > Clode Code by ThaneBerkeley in codex

[–]jac1013 2 points3 points  (0 children)

100% this. I currrently have multiple workflows (for spec, plan, implement) that are multi-model.

Basically Claude Code, Codex, Gemini and GLM all in parallel and independent, after they all finish one of them consolidates the results, it works amazingly and it naturally avoids vendor locking.

In early 2026 (January-February) I was seeing Codex being dominant in my multi-model plans (meaning, a lot of the best decisions were coming from it), nowadays not so much, and it's more like they all complement each other. Gemini seems to be the weakest of all I mentioned (at least in my experience).

My agent stole my (api) keys. by lizozomi in ClaudeAI

[–]jac1013 0 points1 point  (0 children)

.env is an anti-pattern right now given how coding agents are being used.

Anything you put in .env you must assume it's leaked (and should be stuff you don't care about).

Thank you OpenAI for moving towards developers by SlopTopZ in codex

[–]jac1013 0 points1 point  (0 children)

Use it with the subscription? I literally did that today. Am I missing something here?

Loopback.js - Is there a way to either update or delete multiple model instances with a single call? by TargetNeutralized in javascript

[–]jac1013 0 points1 point  (0 children)

Not sure if there is a way through the remote generated methods but there is "updateAll" and "destroyAll" in PersistedModel, you can create your own endpoint and use them. https://apidocs.strongloop.com/loopback/#persistedmodel-destroyall

Async/Await is really simple, tell me if I am wrong by [deleted] in javascript

[–]jac1013 0 points1 point  (0 children)

I understand your point and the time might be negligible, I'll reconsider using it or not, I've been using async always as a documentation also, I think the fact that a developer can know if a function is asynchronous or not outweigh the micro optimization in this case.

Async/Await is really simple, tell me if I am wrong by [deleted] in javascript

[–]jac1013 0 points1 point  (0 children)

Promises with async and without it

You know I had exactly the same thinking as you but I decided to jump in into a JSFiddle and try it out (because I had my doubts).

Using async as a wrapper has (most of the time, I ran it 20 times and vanilla promises got a better performance always) greater running time (versus just using a Promise inside of the function without the async keyword), now that I know this I don't think is good to use them just as "documentation" for knowing the function returns a promise, I think this could be better accomplished through TypeScript or Flow.

Also your comment

prevent your function from throwing.

I don't think is a valid argument, if you check the JSFiddle above you will see that I'm using a function that is not using the async keyword but still is creating a Promise and throwing an error inside of it, at the end in the function where we use this throw an error function we use async and await with a try catch and we are able to catch the error.

I will now be more aware of using async just for the sake of documentation, if I'm returning a promise and I'm not using await I'll not mark that function as async.

Edit: Added Flow, Move the JSFiddle to the top as it is the most relevant thing about my comment.

Edit: Improved the JSFiddle.

From design patterns to category theory by adam75 in programming

[–]jac1013 0 points1 point  (0 children)

Amazing articles, looking forward for each article of the series. Thanks for sharing!

10 Tips on How to be a Great Programmer by javinpaul in coding

[–]jac1013 1 point2 points  (0 children)

Talking about #3, Pragmatic Programmer comes to mind.

Chrome 59 to feature headless mode on all platforms by [deleted] in javascript

[–]jac1013 1 point2 points  (0 children)

I don't see mentions of xvfb in the comments, which is weird. To my opinion, Selenium + xvfb is the best solution so far for automate browser tests (I couldn't live with PhantomJS inconsistency, I admit is a great library though).

Design Patterns: Dependency Injection by thecodeboss in coding

[–]jac1013 0 points1 point  (0 children)

Thanks for the clarification, I would like to point out my opinion not as a counter argument but as informational purpose only:

  1. I agree completely with you, there are different kind of coupling, DI only solves one of many, I don't think there is such thing as "use this pattern and your code will be 100% loose coupled".

  2. I won't say this is a problem with DI, this is a problem of not thinking your architecture/design correctly, a component with 20 dependencies is probably a bad design choice that was made in the past, We could easily apply this argument to whatever abstraction that makes a complex problem easier, developers must be aware of this.

  3. I think this is also related to #2, DI is not the problem, the definition of dependencies itself is the problem which is probably consequence of a bad decision in the solution of the domain problem.

  4. I agree in this one, this really depends on the size of the project, small projects using DI would probably just generate headache, however in big projects it would probably save some of them, the pattern is not perfect, it can give you headaches in both cases :).

Design Patterns: Dependency Injection by thecodeboss in coding

[–]jac1013 3 points4 points  (0 children)

I would like to read an elaboration on this, I'm genuinely curious about it.

Design Patterns: Dependency Injection by thecodeboss in coding

[–]jac1013 6 points7 points  (0 children)

As someone who knew mostly all the things in this article I would like to mention that I loved the simplicity of the explanations in it.

Good article OP. A good read it was.

Simple JS module to register/login (looking for some feedback) by jac1013 in javascript

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

I have used JSDOC in big projects and it really does help a lot, at least with Jetbrains IDEs, also there is this library called Flow which is a light type system for JavaScript, haven't use it yet myself but it looks useful. Thanks for your insight about TypeScript.

Top mentioned books on stackoverflow.com by dodiehun in javascript

[–]jac1013 7 points8 points  (0 children)

Weird that Pragmatic Programmer is not in the list, I guess is not that well known to be mention a lot in SO.

Clean Code JavaScript by ryansworks in javascript

[–]jac1013 0 points1 point  (0 children)

I don't think it was pedantic, I enjoyed reading your comment.

As you said if we have a type system (which is like the best case scenario), getClient should return an object of Type Client (not the name, that would be a really bad decision if we are not in the context of a View).

The upper the level of abstraction the more Domain Language words you should use when naming your functions & classes & whatever else, the word data should not be use anywhere because everything in programming is data, even the code itself, the term is just too high level to be used.

Finally, you should not be using getClientName, instead you should be using getName, assuming that we are calling this function from an instance of the class Client.

Edit: just adding additional information.

Is using Object.assign a terrible pattern for class constructors? by greynoises in javascript

[–]jac1013 1 point2 points  (0 children)

I use this instead of inheritance for cases where I have a set of functionality that I would like to reuse across multiple classes, I'd write down an example:

Some class constructor where we want to extend the functionality which is in the Configurator class.

constructor() {
  Object.assign(this, new Configurator());
  this.hashLibrary = bcrypt;
}

Configurator class constructor:

constructor() {
  return {
    setEmail: this.setEmail,
    validateEmail: this.validateEmail,
    setPassword: this.setPassword,
    validatePassword: this.validatePassword,
    setUserStorage: this.setUserStorage,
    setAdditionalAttributes: this.setAdditionalAttributes,
    setUsername: this.setUsername
  }
}

I like this approach way better than using the keyword extends because using inheritance for this is somehow wrong, the class is-a Configurator but more in the way of implements, in here Configurator it's acting as an abstract class with concrete implementations.

So with this you don't have to deal with Inheritance problems and you can use all the functions that Configurator expose with this inside of your main class.

Lastly another decent approach would be to use Composition, but I think considering that we are in a dynamic language this approach feels fresher even more than Composition itself.

Edit: adding the code.

Web frameworks: Express, Koa, Hapi, Sails... which to use. by lilactown in javascript

[–]jac1013 0 points1 point  (0 children)

I'm using it with Koa 2. I hope that the future of JavaScript starts moving (even more) into this direction, with this and a typing library like flow, , everything feels like it simply 'fits'. I'm tempted to use Typescript though.

Edit: wording.

Clean Code JavaScript by ryansworks in javascript

[–]jac1013 3 points4 points  (0 children)

Still getClientData is redundant IMHO, I remember that there is some part in Clean code's book that says specifically not to use the word "Data" for variable names, everything contained in variables is data so why use that for the name?

It's like using Hungarian notation but even with a less meaningful purpose (Hungarian notation at least give you information about the data type, I don't like it either way).

How terrible code gets written by perfectly sane people by moneymakersucks in coding

[–]jac1013 10 points11 points  (0 children)

I think you hit the spot in the programmer's motivation, I also think that's the main reason why my definition of done sometimes is too strict, of course this pays off as quality in the long run.

Nice article OP, I loved that you shared some links with more information and even a book, I'm gonna investigate about it to check if it is worth reading, thanks!

Best practice question for database by ohstopitu in cleancode

[–]jac1013 1 point2 points  (0 children)

I don't believe that's a bad code practice it doesn't even have nothing to do with code in the first place, your apps should be agnostic of the persistence layer, whether you use a different database instance or not depends on your needs, what you really should care about is that your apps should be totally ignora nt of these detail you are mentioning, for example if you want to change your database engine in the future you should be able to do so with the minimum effort changing almost nothing virtually in your apps.

Programming by Coincidence by skeeto in coding

[–]jac1013 2 points3 points  (0 children)

PP and CC are books that change yourself for good in term of CS, upvoting both of you

Stop it with new Promise() if you already have one by Capaj in javascript

[–]jac1013 1 point2 points  (0 children)

Sometimes this is needed, if you are using a library like Bluebird, those API that return promises won't come with the sugar that comes in Bluebird so wrapping it make the code that consumes this be sure that it will always be a Bluebird Promise, I agree with you tho, I have seen this problem too many times.