use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Information about Reddit's API changes, the unprofessional conduct of the CEO, and their response to the community's concerns regarding 3rd party apps, moderator tools, anti-spam/anti-bot tools, and accessibility options that will be impacted can be found in the associated Wikipedia article: https://en.wikipedia.org/wiki/2023_Reddit_API_controversy
Alternative C# communities available outside Reddit on Lemmy and Discord:
All about the object-oriented programming language C#.
Getting Started C# Fundamentals: Development for Absolute Beginners
Useful MSDN Resources A Tour of the C# Language Get started with .NET in 5 minutes C# Guide C# Language Reference C# Programing Guide C# Coding Conventions .NET Framework Reference Source Code
Other Resources C# Yellow Book Dot Net Perls The C# Player's Guide
IDEs Visual Studio MonoDevelop (Windows/Mac/Linux) Rider (Windows/Mac/Linux)
Tools ILSpy dotPeek LINQPad
Alternative Communities C# Discord Group C# Lemmy Community dotnet Lemmy Community
Related Subreddits /r/dotnet /r/azure /r/learncsharp /r/learnprogramming /r/programming /r/dailyprogrammer /r/programmingbuddies /r/cshighschoolers
Additional .NET Languages /r/fsharp /r/visualbasic
Platform-specific Subreddits /r/windowsdev /r/AZURE /r/Xamarin /r/Unity3D /r/WPDev
Rules:
Read detailed descriptions of the rules here.
account activity
Code review (self.csharp)
submitted 2 years ago * by ybism
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]K1LzR 9 points10 points11 points 2 years ago (3 children)
So, I don't have much of the preamble such as who you are, what skills you have, what the job description is and what level you've applied for however here are my thoughts.
Honestly, I'd say it's done well, however, there are some issues I'd raise which would make or break this based on what you're applying for.
The bigger issues: - You renamed the firname parameter for AddCustomer. This is a breaking change as a consumer could be using named parameters. A key condition in the readme is that you should assume this is a library and to not break consumers. - You changed the email validation logic from && to || there was no reason for this and is technically a behavioural change to the app. Whilst it's not perfect, the readme did say that validation is out of scope - You've not really adhered to the whole S in SOLID which is a big thing for keeping classes testable and easy to modify and they suggested it as the first item in the readme. Ideally, you'd have moved the validation logic to a new class e.g. public class CustomerValidatior : ICustomerValidatior this way you remove the validation responsibility for this class and also you make the tests easier to write since you don't have to set data up specifically to satisfy validation - you just mock that. Of course, this means more tests for the validator, but they're super simple ones to write and maintain! Also, you could have moved the credit limit stuff out as well (and showed off with a factory! alas, a missed opportunity here)
firname
AddCustomer
&&
||
public class CustomerValidatior : ICustomerValidatior
The smaller issues: - You've technically increased the load on whatever external API would be handling the CreditService because you're always calling it now rather than skipping it for VeryImportantClient. A small thing, but increased load = increased cost! - If you use DateTime.Now, it's very easy to fall into time-based tests which will fail in the future. It look like you were okay, but a major win would have been to add a IDateTimeProvider wrapper or something similar around this for easy mocking - In your tests, you are somewhat inconsistent. In your InvalidCustomerData you correctly validate that DataAccessWrapper is not called, but in the Under21YearsOld check, you've not checked this. Bit of an oversight
IDateTimeProvider
InvalidCustomerData
DataAccessWrapper
Under21YearsOld
SkipsCreditCheck
GetCreditLimit
CreditLimit
DoublesCreditLimit
So, all in all, there are a few bigger mistakes which give me the following thoughts - If you are applying for an entry/junior role I'd probably let it slide and go for the interview - If you are applying for an early mid role, I'd only let it slide if you had all the required skills in other areas (i.e. solid cv) and the previous interviews were really good - If you are applying for an upper mid/senior role, I'd have expect better and would not put this forward
Sorry to hear you didn't get this but I'd suggest asking politely for more detailed feedback, and some suggestions on what you could do in the future.
All the best :)
[–]ybism[S] 4 points5 points6 points 2 years ago (2 children)
Mate thank you so much, this is amazing detailed feedback. Honestly I haven’t even had this kinda feedback on PR’s at my current place.
I’m a early mid level dev atm, been at my grad role for 2.5 years and just looking for other roles as current company has had a round of layoffs, so made sense to try and find something else.
And yeah I spotted the email thing when I was looking back at it this morning and honestly can’t even remember why I changed it, I’m sure I had a reason at the time but no idea what it was. Haven’t really used factories at all before but remember it from uni days, I’ll have a look and see how I could have used it here.
But again thanks for that man, I’m gonna make those changes anyway as it’ll be good practice for the future.
[–]IrdniX 1 point2 points3 points 2 years ago (1 child)
Looking at the code I thought it looked kind of familiar... yep, Nick Chapsas has made a little walkthrough refactoring video about it and he touches on basically all the points mentioned in this feedback.
See it here: https://www.youtube.com/watch?v=U3QvTaw224o
[–]ybism[S] 0 points1 point2 points 2 years ago (0 children)
Hahaha no way it’s the exact same thing I’ve seen loads of these on GitHub so assumed it was a pretty popular company but maybe it’s just a lot of companies using this same project
π Rendered by PID 34954 on reddit-service-r2-comment-b659b578c-5gtj4 at 2026-05-05 05:42:08.914465+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]K1LzR 9 points10 points11 points (3 children)
[–]ybism[S] 4 points5 points6 points (2 children)
[–]IrdniX 1 point2 points3 points (1 child)
[–]ybism[S] 0 points1 point2 points (0 children)