Coder Social home page Coder Social logo

east's People

Contributors

mageekguy avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

east's Issues

Comments ...

Hi Frederic,

Here are some comments as requested and please keep in mind that I don't know
PHP well, although your code is clear I can understand it.

You reference a Steve Job's paper/problem. Can you give me a reference so I might understand the problem better? Without this knowledge my comments are a little superficial.

As far as East is concerned:

You have made a good starts with methods like 'ifKeyMatch' in lock.php
In this method if the keys match you call the callable.
What if they don't match? Give a default second argument callable, one for 'if there is a match' and one for 'if there isn't', the negative case taking the default argument of a no-op function.
Then you can always use the positive case (a match) and only when necessary add the second parameter for when there isn't a match.

This approach can be applied to multiple methods in your project.

With the lock object it appears to me that lock.takeKey is actually asking the lock to keep a key. Is this correct?

Why do you ask a lock to take a key and not a key to give to a lock?
Both approaches are valid but ask yourself what happens when you turn this around and ask a key to do the work. Maybe it makes more sense to ask the key and pass a callable. This method could then be called internally reducing the amount of code you have.

One thing to always keep in mind with East is why am I adding this method, is it to achieve an outcome that is more than just get/set and if it is only get/set then it is probably not worth adding because you are not adding behaviour that models the world and encapsulates it.

I think in general without knowing the problem definition (Job's paper) it is hard for me to comment further but it looks like a good step East.

How do you feel about the structure and usefulness of the code?

  • James.

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.