Git Product home page Git Product logo

Comments (1)

jtigger avatar jtigger commented on May 22, 2024

Well, this is a good question, @NobbZ. Thanks for inquiring.

Looking back in the git history

git log --stat -- **/EtlTest.java

the earliest version I see of this test is @e53508827ad3b7b0691abe2cde2fcdd5a525562b. At that time @sit was using the instance method style. So, I'm not able to compare it with a prior style.

This exercise does not require transform() to be either a class member or an instance member — either solution "works." So, any conclusion we might draw here won't be some "one true & right" answer.

That said, static keyword means "this member is shared with all instances of this class." I infer that, "it would be inappropriate to send this message to an object; it's utility code." In this case, though, transform() contains a reasonable amount of "business logic." Given this, seems like the instance member move is the "better" of the two.

Now, it's true that we might likely want Etl to be a singleton; but that is expressed in a different way: either natively or by use of a dependency injection container.

Thoughts?

from java.

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.