19 Matching Annotations
  1. Jun 2023
    1. Conversely, I've never in 16+ years of professional development regretted marking a method protected instead of private for reasons related to API safety
    2. I just wanted to tweak Java's BufferedReader to handle custom line delimiters. Thanks to private fields I have to clone the entire class rather than simply extending it and overriding readLine().
    3. I'm not saying never mark methods private. I'm saying the better rule of thumb is to "make methods protected unless there's a good reason not to".
    4. Marking methods protected by default is a mitigation for one of the major issues in modern SW development: failure of imagination.
    5. Been disappointed, surprised or hurt by a library etc. that was overly permissive in it's extensibility? I have not.
    6. The old wisdom "mark it private unless you have a good reason not to" made sense in days when it was written, before open source dominated the developer library space and VCS/dependency mgmt. became hyper collaborative thanks to Github, Maven, etc. Back then there was also money to be made by constraining the way(s) in which a library could be utilized. I spent probably the first 8 or 9 years of my career strictly adhering to this "best practice". Today, I believe it to be bad advice. Sometimes there's a reasonable argument to mark a method private, or a class final but it's exceedingly rare, and even then it's probably not improving anything.
    1. Are protected members/fields really that bad? No. They are way, way worse. As soon as a member is more accessible than private, you are making guarantees to other classes about how that member will behave. Since a field is totally uncontrolled, putting it "out in the wild" opens your class and classes that inherit from or interact with your class to higher bug risk. There is no way to know when a field changes, no way to control who or what changes it. If now, or at some point in the future, any of your code ever depends on a field some certain value, you now have to add validity checks and fallback logic in case it's not the expected value - every place you use it. That's a huge amount of wasted effort when you could've just made it a damn property instead ;) The best way to share information with deriving classes is the read-only property: protected object MyProperty { get; } If you absolutely have to make it read/write, don't. If you really, really have to make it read-write, rethink your design. If you still need it to be read-write, apologize to your colleagues and don't do it again :) A lot of developers believe - and will tell you - that this is overly strict. And it's true that you can get by just fine without being this strict. But taking this approach will help you go from just getting by to remarkably robust software. You'll spend far less time fixing bugs.

      In other words, make the member variable itself private, but can be abstracted (and access provided) via public methods/properties

    2. As soon as you make a member not-private, you are stuck with it, forever and ever. It's your public interface now.
    1. Derived classes need to follow their base class contracts, but may choose to expose a subtype of base class with more capabilities. This includes making protected members public:
    2. Member Visibility
  2. Apr 2022
    1. Member States

      Perhaps this should be addressed not just to Members States, but, more explicitly to educational stakeholders. In many cases, for example the UK (2022), the "Member State" does not really have the means or the disposition to take seriously any of these recommendations. It is down to institutions and professionals within the territory of the Member State to take the lead, and therefore they are the ones to whom this recommendation should be addressed to.

    1. participants in the study reported feeling frustrated by the presence of an expert and dominant member who impeded the development of shared understanding and effort.

  3. Dec 2021
  4. Oct 2021
    1. Professor Lucy Easthope. (2021, October 20). WFH really is only for a very privileged few now. Not sure how that can stay a “thing” as an NPI. Too many harms being done by a fractured society where people are thriving by getting other people to bring them stuff/ make them things/ look after their family members for them [Tweet]. @LucyGoBag. https://twitter.com/LucyGoBag/status/1450842213613772802

  5. Jul 2021
  6. Feb 2021
  7. May 2020
  8. Sep 2018
    1. ducators being conscious of power dynamicsin the classroom, as well as the importance of seeing oneself as group mem-ber and a group leader, just as a bass player contributes to the foundationof the music and plays a role as a one of the musicians

      See glossary of group member roles from week one reading.

  9. Oct 2016