Code Monkey home page Code Monkey logo

Comments (8)

ttsui avatar ttsui commented on June 8, 2024

Title: Mastering Your Tools (Why don't people do this?)

Tools amplify your talent. The better your tools, and the better you know how to use them, the more productive you can be.”
― Andrew Hunt, The Pragmatic Programmer: From Journeyman to Master

from events.

rodolfoprr avatar rodolfoprr commented on June 8, 2024

hi @ttsui ! could we have the "Mastering Your Tools (Why don't people do this?)" talk in the next event https://www.meetup.com/en-AU/Software-Craftsmanship-Sydney/events/243295595/?eventId=243295595?

from events.

ttsui avatar ttsui commented on June 8, 2024

@rodolfoprr Sure. It'll be good if we can get a few more lightning talks. I hardly be able to fill the whole time slot.

from events.

rodolfoprr avatar rodolfoprr commented on June 8, 2024

@ttsui 15 minutes is 👍 for you?

from events.

ttsui avatar ttsui commented on June 8, 2024

@rodolfoprr Sure. I can ramble on for 15.

from events.

rodolfoprr avatar rodolfoprr commented on June 8, 2024

@ttsui cool! so I'm adding your lightning talk :)

from events.

rodolfoprr avatar rodolfoprr commented on June 8, 2024

Set for September edition: https://www.meetup.com/en-AU/Software-Craftsmanship-Sydney/events/243295595/

from events.

ThibautGery avatar ThibautGery commented on June 8, 2024

I don't have any talk but I have a question/problem:

I have a functionality that starts with a few SQL query and then I call a pure method to format my entity. it is composed of a lot of pure function and it must take me 500 lines of highly functional code (very dense).
It looks like this

function myfunctionnality(param) {
 const myData = callSQLs(param)
 return formatData(data)
}

function formatData(data) {
   formatEntityA(data)
   formatEntityB(data)
   formatEntityB(data)
}
function formatEntityA(data) {
   formatEntityA1(data)
   formatEntityA2(data)
   formatEntityA2(data)
}

function formatEntityB(data) {
   formatEntityB1(data)
   formatEntityB2(data)
   formatEntityB2(data)
}
...

it continues like that for 500 lines. The code is readable (could be improved a lot) but I am unsure on how to test it:

  • I have chosen not to write any unit or integration on the callSQLs
  • I tested every formatXXX function to handle its cyclomatic complexity but without mocking the child functions.

My issue most of the time I modify the functionality of one function, it will break the parent function.
If I were to mock the child function, I would need to update those mocks.

Unfortunately, I cannot show some code because it doesn't belong to me.
Starting with this real life example we could talk about:

What do you think, could this spark a nice debate?

from events.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.