ariugwu / mudz

Game we're making with the skills we cover in the live stream. Text adventure. Zombie survival.
13 stars 0 forks source link

Dependency Injection #4

Open smudge202 opened 9 years ago

smudge202 commented 9 years ago

Is this a pattern you want to tackle on stream at some stage, or can I add it, pretty please?

It's typically the first thing I do when working with a repo like this (see https://github.com/smudge202/Lewtz/commits/dev for example).

smudge202 commented 9 years ago

Wondering if a google hangout style work-through of DI on stream might work. Up to you.

danielcirket commented 9 years ago

This would be useful, I just rolled my own DI container for a recent project (more of a learning process than just throwing in a prebuilt library) so would like to see how it stacks up in terms of theory/application.

ariugwu commented 9 years ago

I like this. I think currently the "Text Resource" approach is going to lead to the Template pattern. Then maybe do DI. Then a few weeks of deep dive and clean up. I'd love if this project continued to be a functional example for mid level developers. I'm finding the gaps in my own knowledge every stream.

smudge202 commented 9 years ago

As always, I'm more than happy to help out (on this and any other subjects). Composition techniques is something I have a fair amount of experience in (https://github.com/smudge202/compose / http://blog.devbot.net/composition etc). If you want to do some kind of collab then just let me know what works best for you and the stream and I'll see what I can do.

There's a million things I'd like to do with this project, some of them are rather fundamental. I think the repo and stream are an excellent resource for junior-mid level devs, so feel somewhat obliged to clean out some of the stuff we don't want them to learn from. :D

I'll get to adding issues when I get some time. I know it sucks up your time too @ariugwu , but hopefully you'll be able to scan through anything I raise to let me know what you don't want changed, what you'd like changed off-stream, and what you plan to tackle on stream. Hopefully I'll give you some ideas towards the latter.

ariugwu commented 9 years ago

Awesome! You're right, time is at a premium but I think the more it becomes a part of my routine the more productive I'll be. Should be taking another two week break in August and that could be a great time to really tidy things up before moving forward.

danielcirket commented 9 years ago

@smudge202, fancy checking out my basic DI container? https://github.com/danielcirket/SimpleContainer it's probably a horrible implementation but I thought Id learn rather than always throw in a prebuilt library. Any feedback is welcome!

smudge202 commented 9 years ago

Moved the SimpleContainer discussion to danielcirket/SimpleContainer#1

smudge202 commented 9 years ago

So, how do we want this to work? It's just gotta happen one way or another.

Just caught up and watched through part 1 of the template pattern, which was a good watch. But it occurs to me that a stronger understanding of DI, abstractions, isolation, and so forth would be making a world of difference with regards to code quality.

Personally, I feel @ariugwu is a much better teacher than me, so I'd really like to either tackle this offline with you, or perhaps cover it in a code review (#6) but without PR'ing too many changes in the hope of seeing it pushed across on the @ariugwu stream.

Anyway. Thoughts?

ariugwu commented 9 years ago

Warning: Not sure how this email is going to format on github. :D

I agree. As I look at the game there seems to be an endless number of features and approaches that can be explored. I'd love to educate myself (with your help) on how to improve the code quality and consistency.

Perhaps get the code base stable and then devote one day to exploring features/patterns and then the second day exploring code quality and consistency? Grunes (sp?) in chat mentioned a desire to see the analysis run. I did that after the stream and it only found 3 things. False confidence! So I think there's a lot of value in diving into code review, analysis, testing, etc.

So in terms of my schedule it might look something like this:

Day 1: Design Patterns: Play the game. Debug the server, let people connect and poke around. Develop features and feature requests. With a solid architecture this should just be fun extension work. Day 2: Code Quality: Take a look at specific implementations, build tests, refactor, discuss pros/cons.

Thoughts?

On Wed, Jul 22, 2015 at 5:04 PM, Tommy notifications@github.com wrote:

So, how do we want this to work? It's just gotta happen one way or another.

Just caught up and watched through part 1 of the template pattern, which was a good watch. But it occurs to me that a stronger understanding of DI, abstractions, isolation, and so forth would be making a world of difference with regards to code quality.

Personally, I feel @ariugwu https://github.com/ariugwu is a much better teacher than me, so I'd really like to either tackle this offline with you, or perhaps cover it in a code review (#6 https://github.com/ariugwu/mudz/issues/6) but without PR'ing too many changes in the hope of seeing it pushed across on the @ariugwu https://github.com/ariugwu stream.

Anyway. Thoughts?

— Reply to this email directly or view it on GitHub https://github.com/ariugwu/mudz/issues/4#issuecomment-123863262.

Ari Ugwu, Web Developer DRY By Design www.drybydesign.com http://www.drybydesign.com

smudge202 commented 9 years ago

Regarding analysis, I ran it with full analysis enabled and there was 273 issues. ;)

The game right now is a long way from SOLID... I wonder if a streamed code review or two for the sake of education (no PR's) might help keep things on track?

Email formatting on github seems to be fine

ariugwu commented 9 years ago

Mon deiu. Are you using the VS tools for analysis? Everything I've learned so far has gone right into my day job. Peer review on 273 issues is going to wound the pride a little but what a great chance to improve.

Have any thoughts on how a streamed code review would work?

I'll do a little refactor this week but

On Thu, Jul 23, 2015 at 4:38 PM, Tommy notifications@github.com wrote:

Regarding analysis, I ran it with full analysis enabled and there was 273 issues. ;)

The game right now is a long way from SOLID... I wonder if a code review or two for the sake of education (no PR's) might help keep things on track?

Email formatting on github seems to be fine

— Reply to this email directly or view it on GitHub https://github.com/ariugwu/mudz/issues/4#issuecomment-124233775.

Ari Ugwu, Web Developer DRY By Design www.drybydesign.com http://www.drybydesign.com

smudge202 commented 9 years ago

Hit Alt+Enter on each project in turn, go to the analysis tab, select "Microsoft All Rules" in the dropdown and check the tickbox at the top to enable it. Once enabled for each project, hit build.

Most of the rules you can ignore. For example, it'll tell you to make the assemblies strongly named but that is advice I recommend against. There are a tonne of rules you can safely surpress/ignore, but you may find it interesting to have a scan through them and perhaps address some.

Your pride can be rest assured that most people ignore these rules and it's rare to see projects with full analysis enabled. I believe gruenes was just asking as a matter of interest. You actually have several warnings from R# from what I saw on stream with unused/unassigned variables and such, which MS CA may or may not detect.

With regard to peer review, what would be really cool is if we can arrange a time when we're both free, have you hop on teamspeak or Skype with me and we can walk through it? Either skype desktop sharing or on stream if you're happy to go with that. It's all about finding the time... I have a fair amount of ""free"" time so just let me know when's best for you and I'll see if I can make it.