Readit News logoReadit News
dglass commented on Things you forgot (or never knew) because of React   joshcollinsworth.com/blog... · Posted by u/inner_square
marksomnian · 2 years ago
Plus, the power of being able to treat JSX as any other JS object means that you can use standard JS constructs like loops - slightly contrived example:

  const items = [];
  let runningTotal = 0;
  for (const item of someArray) {
    runningTotal += item;
    items.push(<li>Item {item}; running total {runningTotal}</li>);
  }
  return (<ul>{items}</ul>);
The closest example I can find in Vue would require a computed property to implement something like this.

dglass · 2 years ago
Disagree. I would argue your example is hard to read compared to the equivalent in Vue, and it mixes business logic (computing the running total) with the rendering logic.

  <script setup>
    const items = [1,2,3,4,5,6]
    let runningTotal = 0

    const getRunningTotal = (item) => {
      runningTotal += item
      return runningTotal
    }
  </script>

  <template>
    <ul>
      <li v-for="item in items">
        Item {{item}}; running total {{ getRunningTotal(item) }}
      </li>
    </ul>
  </template>
No need for a computed property. Plus, getRunningTotal can be unit tested, or extracted to another file for reusability.

dglass commented on Ask HN: Does your company ban GitHub Copilot?    · Posted by u/pqn
dglass · 3 years ago
I think the bigger reason it is banned at most companies is because it's nearly impossible to know what kind of license the generated code is available under. Copilot is trained on open source codebases, which carry a number of different licensing agreements to use that code in your own codebase. Companies simply do not want to deal with using software that opens them up to unknown legal risks.
dglass commented on Ask HN: Who needs beta testers?    · Posted by u/sft321
dglass · 3 years ago
https://www.tracket.com

Tracket is a platform that lets you build, customize, and monetize niche job board websites. Our platform empowers ambitious entrepreneurs to create professional, customizable job boards and monetize them to bring in extra income.

We're looking for feedback on our onboarding flow and how we can make it as easy as possible to get a job board up and running quickly. We're also looking for suggestions on how to make our themes more customizable and easier to use.

Contact info: dave @ tracket . com or https://www.tracket.com/contact

dglass commented on Kysely: TypeScript SQL Query Builder   github.com/koskimas/kysel... · Posted by u/cal85
bastardoperator · 3 years ago
How does this compare to say Prisma? I want to write SQL more than I want to write Javascript. I got really hung up on writing joins with Prisma and don't want to use a raw query. How would this compare assuming they're comparable, thanks in advance.
dglass · 3 years ago
Prisma is good for writing simple selects, updates, and deletes. But the moment you need to write any kind of advanced query with joins, nested queries, unions, etc. it gets frustrating very quickly.

Kysely and Knex are far more flexible for writing complex queries and don't get in your way.

dglass commented on Objection to ORM Hatred (2019)   jakso.me/blog/objection-t... · Posted by u/thunderbong
monero-xmr · 3 years ago
My problems with ORMs can be reduced to:

- SQL is so easy and so useful that being a professional engineer that can code but can't learn SQL is absurd

- You will never switch databases, so abstracting away the DB for some hypothetical "I might want to switch DBs one day!" scenario is absurd

- If you ever get enough scale to require optimization the ORM will be your enemy

In summation, anything related to ORMs and SQL is immediately invalid, other than questions like "Help! I joined a company where they mandate ORMs and I hate my life!"

dglass · 3 years ago
> You will never switch databases

No, you may never have had to switch databases, but I have worked on codebases where we've had to switch databases, and I'm sure others have to. Most likely when dealing with monoliths where you can't do a full re-write and you can't break out a separate service for various reasons. The repository pattern is your friend in these situations. An ORM should ideally be able to read/write to multiple database drivers which makes this easy by dual-writing to both databases from the repository layer.

dglass commented on On Trucking   snowingpine.com/2023/01/0... · Posted by u/snowypine
dglass · 3 years ago
I work for a startup in the trucking space so it's nice to see such an in depth analysis of the industry. I can agree that most of the article is accurate based on what I've seen in my 4 years in the industry. There is so much more innovation going on in the trucking industry that a lot of people don't know about.

My company, Platform Science, is building a configurable open platform that connects a lot of the different categories mentioned in the article (drivers, carriers, brokers, OEMs, software vendors, etc). If you're interested in career opportunities in the trucking industry, we're hiring for a number of open positions[1]. Feel free to send me an email (My work email is in my profile) and I can connect you with the right hiring manager.

[0]: https://www.platformscience.com

[1]: https://www.platformscience.com/jobs

dglass commented on Ask HN: Those making $500/month on side projects in 2022 – Show and tell    · Posted by u/folli
147 · 3 years ago
How did you grow your newsletter/market your book? My goal for 2023 is to focus on growing my audience for my newsletter on devopsy topics.
dglass · 3 years ago
Mostly through posting valuable content on the newsletter and sharing it across various channels, as well as comments like this where I can plug the book and newsletter in the right context.

It also helped that the book was published on Holloway.com, and they had their own audience that they have been able to promote their titles.

u/dglass

KarmaCake day674February 27, 2015
About
personal: david (dot) glassanos (at) gmail.com work: dglassanos (at) platformscience.com
View Original