Originally posted by MyUserName
View Post
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Code reviews
Collapse
X
Collapse
-
-
Originally posted by woohoo View PostI agree with you but it could be argued in this example that IsCardVerified could be a public method on a class called CardVerification. CardVerification could be passed into your class in the constructor. This would enable this common code to be used through out your app and other apps. BUT I would only do this for code that would be reused out side of calling class.Comment
-
Originally posted by SpontaneousOrder View PostYes it would. I just mean that "encapsulating" data by making it private but then just adding a public mutator/accessor in front of it is not really encapsulation at all - it's a token gesture to make yourself feel better.
Originally posted by SpontaneousOrderAll costs? no. Most of the time? sure.Comment
-
Originally posted by suityou01 View PostIndeed. In C#4 et seq you don't even declare accessors as it just does it all for you.Originally posted by MaryPoppinsI'd still not breastfeed a naziOriginally posted by vetranUrine is quite nourishingComment
-
Originally posted by d000hg View PostPresumably you can tell it not to, and still write custom accessors if you need to?Comment
-
Originally posted by MyUserName View PostIt does get overused, particularly by newer programmers. .
Presumably most of the lecturers turned to teaching because they weren't very good developers
I love this poster for the Liskov substitution principle:
I think the teachers always do a bad job teaching inheritance with their "is a?" approach. In the poster they'd say that the toy duck "is a" duck - but clearly it's not. It's a toy with duck-like attributes.Comment
-
Originally posted by d000hg View PostPresumably you can tell it not to, and still write custom accessors if you need to?Knock first as I might be balancing my chakras.Comment
-
Originally posted by SpontaneousOrder View PostParticularly by lecturers at schools/college! which is frustrating.
Presumably most of the lecturers turned to teaching because they weren't very good developers
I love this poster for the Liskov substitution principle:
I think the teachers always do a bad job teaching inheritance with their "is a?" approach. In the poster they'd say that the toy duck "is a" duck - but clearly it's not. It's a toy with duck-like attributes.Knock first as I might be balancing my chakras.Comment
-
When I was a lad
Originally posted by SpontaneousOrder View PostSo nothing particularly relevant to the discussion then.
I guess I was right!Comment
-
Originally posted by zeitghostI'm pleased to say that, as a signed up hacker of the 70s generation, I can't understand any of this.
And, more to the point, I find I don't care either.Knock first as I might be balancing my chakras.Comment
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- IR35: Substitution — updated for 2025/26 Sep 18 05:45
- Payment request to bust recruitment agency — free template Yesterday 21:04
- Why licensing umbrella companies must be key to 2027’s regulation Yesterday 13:55
- Top 5 Chapter 11 JSL myths contractors should know Sep 15 03:46
- Top 5 Chapter 11 JSL myths contractors should know Sep 14 15:46
- What the housing market needs at Autumn Budget 2025 Sep 10 20:58
- Qdos hit by cybersecurity ‘attack’ Sep 10 01:01
- Why party conference season 2025 is a self-employment policy litmus test Sep 9 09:53
- Labour decommissions Freelance Commissioner idea Sep 8 08:56
- Is it legal to work remotely from Europe via a UK company? Sep 5 22:44
Comment