Message from @porco

Discord ID: 480359898790625282


2018-08-18 12:54:44 UTC  

Guess which autistic feature pornspider will have next

2018-08-18 12:55:13 UTC  

logging

2018-08-18 12:55:44 UTC  

https://cdn.discordapp.com/attachments/189467888657235970/480359142779912192/Screenshot_2018-08-18_14-55-39.png

2018-08-18 12:55:48 UTC  

No that's already there :DDDDD

2018-08-18 12:56:10 UTC  

Dunno why but the idea of <InterfaceShit, Shit> seems kinda weird to me

2018-08-18 12:56:24 UTC  

what do you mean?

2018-08-18 12:56:29 UTC  

the idea of having interfaces?

2018-08-18 12:56:32 UTC  

No not that

2018-08-18 12:56:46 UTC  

It's just that those interface you have, have such distinct names that they imply being used in only one thing

2018-08-18 12:56:50 UTC  

And one thing only

2018-08-18 12:56:51 UTC  

He's a wannabe coder now, so he has big opinions

2018-08-18 12:57:03 UTC  

>said the hamburger coder

2018-08-18 12:57:22 UTC  

The only thing I code is my insulin pump

2018-08-18 12:57:33 UTC  

in my case it's not the interfaces that are too distinct, it's the classes that are not distinct enough

2018-08-18 12:57:41 UTC  

Get it? The joke is that I'm diabetic because I'm fat

2018-08-18 12:57:45 UTC  

for example, my `WikiPageListRepository` could also be `MySQLWikiPageListRepository`

2018-08-18 12:57:56 UTC  

`VideoSearchEngine` could be `HttpVideoSearchEngine`

2018-08-18 12:58:31 UTC  

but in the end, all those interfaces expose a tiny bit of replaceable functionality

2018-08-18 12:58:33 UTC  

tbh I'd thought that since they all use Search part then linkin them to ISearch should be enough

2018-08-18 12:58:40 UTC  

But then again I'm not the one hosting porn indexing site

2018-08-18 12:58:44 UTC  

ISearch would be waaaay to big

2018-08-18 12:59:10 UTC  

https://cdn.discordapp.com/attachments/189467888657235970/480360007628488704/Screenshot_2018-08-18_14-59-06.png

2018-08-18 12:59:26 UTC  

`ISearchQueryGenerator` generates search queries for the links

2018-08-18 12:59:39 UTC  

`SearchQueryGenerator` implementation does this, using the HTTP Request

2018-08-18 13:00:01 UTC  

soon, I will have a new implementation, that does this out of the request log

2018-08-18 13:00:31 UTC  

https://cdn.discordapp.com/attachments/189467888657235970/480360345282674698/Screenshot_2018-08-18_15-00-25.png

2018-08-18 13:00:43 UTC  

`IVideoSearchEngine` is a very simple interface

2018-08-18 13:00:51 UTC  

it allows you to search videos

2018-08-18 13:01:01 UTC  

the implementation of `IVideoSearchEngine` uses ElasticSearch

2018-08-18 13:01:25 UTC  

Now I could substitute this with an implementation running Lucene and use both at the same time if I was retarded

2018-08-18 13:01:38 UTC  

because I always only use `IVideoSearchEngine` and never the concrete implementation

2018-08-18 13:01:48 UTC  

that's the reason for having an interface for everything

2018-08-18 13:01:54 UTC  

also what you saw there is only the DI container

2018-08-18 13:02:09 UTC  

the DI container needs exactly ONE interface and the classes it passes through

2018-08-18 13:03:05 UTC  

```csharp
public interface IExample {
IExample Test(string name);
}```

2018-08-18 13:03:15 UTC  

This part from your code baffles me

2018-08-18 13:03:35 UTC  

But maybe because I haven't experienced much with interfaces at all

2018-08-18 13:04:02 UTC  

you can have a fluent interface
```csharp
something.WithThat().WithThis()```

2018-08-18 13:04:09 UTC  

that's what it is for

2018-08-18 13:04:44 UTC  

https://cdn.discordapp.com/attachments/189467888657235970/480361408467566604/Screenshot_2018-08-18_15-04-37.png

2018-08-18 13:04:51 UTC  

the implementation then returns itself