« first day (2186 days earlier)      last day (2756 days later) » 

2:08 AM
Passing objects between assemblies with IL is hard :|
 
 
4 hours later…
5:53 AM
Good morning.
 
6:08 AM
It's 12AM
 
6:40 AM
Where?
 
<points> over there!
 
From the world that exists outside the borders of the United States!
 
so good morning to you, Mr. W.
or "Mister Dubyah" as Americans might say
 
Every time a discussion online revolves around the time of day around the world, I am reminded of a scene in Gremlins 2 that I must have last seen, oh, 30 years ago, where someone is warned never to feed mogwais after midnight. He laughs, says "it's always midnight somewhere", and then a gremlin punches through a desk and kills him.
I'd go trawl youtube for the scene, but my PC is currently hooked up to the office's soundsystem.
 
@Squiggle o/
 
6:53 AM
all the more reason to do that, Avner.
o/
 
7:13 AM
Good morning everyone ^.^
 
good morning :)
 
user6438653
Hi guys.
 
user6438653
@TomW It's 8:30pm
 
user6438653
@Dartek12 Gm.
 
user6438653
@Xariez Goodmorning.
 
user6438653
7:25 AM
Hi @AvnerShahar-Kashtan.
 
Is there anyone who knows electrical engineering stuff?
because I have some troubles with understanding basics
 
possibly, but this isn't really the right channel for that sort of expertese
 
user6438653
Sorry, I don't
 
I know, but I dont really know
where to find sth like this
 
Did you try to reverse the voltage on the cross-hop Ohm matrix?
 
7:26 AM
or just any source for absolute layman
No :|
 
Maaaaaaaaan if these cookies would just work like I want them to this morning would go a lot better
 
Mmm cookies
 
cookies, I love them
 
Yeah, they are nice
 
No-one around on the Electrical Engineering stack chat?
 
7:29 AM
@Dartek12 what sort of depth do you want to go into? coursera.org/learn/electronics You could do a free online course if you fancy? :)
 
Morn all
 
YASS, I haz progress
 
Someone invited me to room and asked if I can do survey??
 
This is what I am working on currently, I know for a fact that "public ActionResult .." won't work, but yeah.
 
@Ggalla1779 Yeah, there are spammers hanging around occasionally. They usually get reported and banned pretty quickly.
 
7:31 AM
Not a expert or anything but, usually when you got a somewhat popular website those often unfortunately appear
 
@Squiggle thank you, I'll have a try
 
@Xariez You're not really enforcing any sort of authentication there right now, you know, right?
 
@Dartek12 those courses probably take a week or so to go through, mind you. It depends how much background you want. Why are you learning? as part of a project? :)
 
You're just checking if a login cookie exists, not that it's valid. It can easily be modified or added by malicious client-side code.
 
Yeah unless they are paying I aint doing a survey
 
7:33 AM
Fair enough. I knew there was going to be some kind of hole in there that I was missing but thats it then @AvnerShahar-Kashtan
 
@Xariez @AvnerShahar-Kashtan protip: Don't roll your own authentication unless it really cannot be avoided
 
So what you are saying is that I should be trying to reroute myself to Identity I pressume?
 
@Squiggle well, I have electrical engineering as a subject in my university, and as I am complete layman I have no basic knowledge, e.g. no idea what exactly voltage is and whatsoever
 
Or, something like it?
 
@Dartek12 GIYF :)
also - youtube videos! They're often really great for the basics
 
7:35 AM
@Squiggle Yeah... but still :D
 
I just noticed some of the tags for this room, LOL
"panini" and "php-hate"?
 
@Dartek12 well..isn't the point of taking the class to learn it?
 
^
 
@TomW Problem is that, lecturers demand some basis I dont have
 
You didn't do circuits etc at school?
 
7:36 AM
not really
I used to go to musical school :|
 
But yeah, if you dont mind me asking, I assume that in this case Identity Authentication is superior to cookies then? @Squiggle
 
played violin
 
@Xariez sorry I don't know what you mean by "Identity Authentication"
also, most off-the-shelf authentication mechanisms use cookies anyway
 
!!panini
 
May 4 at 14:23, by Caprica Six
Jan 12 at 16:55, by Markus Werner
to all stupid put all "Panini" in your asshole
 
7:42 AM
That explains that one
Php-hate is obvious I hope
 
@Xariez If by Identity Authentication you mean MS's Identity Framework, than yeah, it can use cookies or headers.
I started thinking of how to design our new multi-tenancy feature before realizing it isn't really multi-tenancy.
Well, it is but it isn't.
I wonder if there's a better term to google for.
 
Squatting? ;)
Sub-letting
 
We need to segregate our data into deployments/environments, meaning that a single user can manage several different clients, each with they own distinct, isolated data - but he needs to see it all from one UI.
So, for instance, I can see a unified list of Cases, each clearly marked as belonging to different Environment.
In the back-end, each environment has a different set of resources - DB tables, document indexes, etc.
I'm trying to think of how to integrate that in without rewriting too much.
For instance, I don't want to add an "Environment" parameter to all my apis.
And all my data entities.
But I might have to.
 
Where will you bridge environments? in the back-end? or the client?
 
7:57 AM
Back-end. Current approach is we'll add a data broker component at the BL level.
That will fetch the relevant data based on the user's authorized/requested environments and aggregate the results.
Which means that either I change my API to return a grouping of Environment-Case, or update the Case entity to specify Environment.
Hmpff.
Or move the management over to the client, making a different API call for each environment.
 
either way you'll be having to refactor :)
 
Yeah... *sigh*.
We have a base class for most data entities. I can add the EnvironmentID field there, and have it [Unmapped] since I don't need it as a column in every table in every DB.
But it means that every time I pull data from EF, I have to go over it and add the Environment to it.
 
8:45 AM
Hey, one question about domain model validation, is it best practice to validate in UI, and than validate again in Domain, even if you know UI validates fully?
 
@QuietNaN Yes.
 
@AvnerShahar-Kashtan if UI validates and than validation fails on Application layer, how do you notify user if you are using CQRS with void commands?
 
If your server assumes that the client already validated the data, it's open to attacks by people impersonating the client - can be a man-in-the-middle attack changing the data between client and server, can be someone making direct HTTP calls to your server.
 
As I am still fiddling around with authentication, how secure and/or good pradctice is simply changing a value in a database depending on if you're logged in or out?
 
@QuietNaN I don't know the specifics of the CQRS pattern, but a void command can still return an error - if it's a web service, simply return 400 Bad Request
@Xariez Not sure I understood, but probably bad.
 
8:49 AM
@AvnerShahar-Kashtan thanks
 
Well, update a database row with the name "IsLoggedIn" to the value of '1' when you log in and '0' when you log out @AvnerShahar-Kashtan
Then again, then you need to run a additional query to the db for each view, which probably isnt a good thing in itself.
 
@Xariez Pretty bad, yes. Both because of the additional query, as you say, and also because being logged on isn't really a persistent state.
 
Ah yeah, thats true
 
It can be stored in a DB if that DB is simply a backing store for a session storage, like ASP.NET used to do.
 
That probably means as well that if you log in as admin and it changes the database record, everyone gets access to it since it'd probably run on something like if (query == 1) { // display stuff }
 
8:52 AM
@AvnerShahar-Kashtan BTW what is best practice, to validate in object constructor and throw there if no valid, or to validate in application layer and throw there?
 
@QuietNaN I prefer doing it in the application layer, myself.
 
k
 
@Xariez Also, this is not good security practice. Don't try to implement your own login scheme. You should use a reliable, tested authentication system.
 
@Xariez how will you ensure that a user who gets up and walks away isn't logged in forever?
 
These things are very easy to get wrong, and with security, this leaves your system exposed and you potentially liable for damages.
 
8:54 AM
Not sure to be honest, but I assume it could be checked through a DateTime and login age? @TomW
 
If you don't already have good answers to questions like that you shouldn't be writing it yourself
 
Yawn
Who's liable for damages?
I could use some extra funds.
 
lol
 
The more I look at the code behind this the more I'm amazed it works at all.
 
9:09 AM
@AvnerShahar-Kashtan can i have input validation also in domain model? because some say you shouldn't, in domain you should have only domain validation like is this order eligible for placement, etc
 
The domain model doesn't really know or care what "input" is. It has an entity. If the domain rules state that the entity's Name must be alphanumeric and 2 or more characters, it should validate that.
 
I think the same way, can't understand why people say that input validation doesn't fit into domain
strange
 
It's not input validation.
It's just validation.
 
yup, they call input validation e.g. Employee name should be more than 1 characters long
etc
 
hi can anyone help me... How can i find a method returns a particular object
from the dll
 
9:14 AM
@AvnerShahar-Kashtan BTW when you validate in application layer, isn't it counted like object can be constructed in invalid state and than it is being validated, and i also see that people say object shouldn't be in invalid state, they should be validated while construction
 
That always feels too academic to me, to treat the constructor as a logical barrier that, if passed, you can assume the object is valid.
 
@Jilu 'a particular object'? You mean a Type? or an instance?
 
^^
 
A constructor, to me, is a technical aspect. There are ways to create objects without passing through them (deserialization, for instance) and objects aren't always immutable.
 
thanks
@AvnerShahar-Kashtan can i have custom exception for my models? or it is better to throw default exceptions?
 
9:29 AM
@QuietNaN I used to define custom exceptions for everything. Then I realized I don't really need that type information.
 
;)
 
suppose I've a class SFClaimsAuthenticationManager. I initialized this class in order to authenticate a user. before I do so I shud assign some values to it. And I don't know how to do that
@sq
@Squiggle
 
A question: our current server flow includes a WebAPI controller that receives the request and does initial handling - authentication, update the call context with the current user or any session information and that sort of thing. Then it calls the service BL which features application logic, calling repositories for the actual data queries. Simple.
Now, I want to put another component between our controllers and the BL components. A data broker, of a sort - it determines which environments need to be queried, calls the relevant BL instances for each environment, and aggregates the results.
Now, how should I name this component?
I don't like Data Broker.
 
Does object validation in application violates SRP?
 
@AvnerShahar-Kashtan I don't know, but adding 2 words You could combine in the name: Entity, switch
 
9:40 AM
Entity is way too vague.
 
yeah. Just we have a column in our database, which does what You just elaborated. And that is entity
I don't like the name neither
 
And of course, in our grand tradition, it's used both as a generic technical term (we have Case entities and Event entities) and also as a specific kind of entity in our domain model (a Case has Entities and Relations). Just to make sure things are as muddled as possible. :)
(And our two most common entities, Case and Event, are nicely chosen so that they match reserved keywords in C#, so I can't have a variable called "case" or "event". :))
 
:D nice.
 
foreach (var theCase in cases)? foreach (var @case in cases?)
 
It's a test, if the programmer knows what '@' is for
 
9:44 AM
@AvnerShahar-Kashtan might even go for a 'c' there.
 
@scheien I use cc sometimes.
 
9:58 AM
foreach (var kase in cases) lol
 
Mmm. Käse.
 
hi guys
I have a blurred background image in the background for which i am using filter: blur(5px); in css and i want that image to lose its blurring inside a division on my page.
It will look like this.
 
"to lose its blurring" - doesn't really work like that
 
ohh
 
you'll need to overlay an un-blurred element
 
10:09 AM
like what?
same image
 
Sure
 
ok. I'll try doing it. Thanks.
 
10:20 AM
@ntohl Java style. Blech.
@ntohl Also, too cheesy.
 
Who wants to try a riddle?
If I have a time stored as a military time style int with 10 minute intervals for the minutes
And the value is 610 what time is it?
 
6:10?
That would be military time.
 
Right, 6:10am.
 
That's a pretty crappy way to store a time.
 
So if I set the value to 1310 what time is it?
 
10:25 AM
It might look like a riddle to you, but 24hour time is standard in most parts of the world, here included. :)
 
Just take a guess.
 
It's 1:10pm. It's not a guess, it's how I think of time representation by default.
 
7:10am because fuck any sense of logic.
 
That...
makes no sense.
 
See what it does, and this is absolutely retarded
 
10:26 AM
That's not military time, it's just a random way to store time.
 
Instead of parsing the int, it checks the current value of the int and if the new value is larger it checks two things:
A) Is it bigger by a factor of 100, B) is it greater by any multiple of 10 less than 100.
In then increments the int by that number.
 
So you cannot set it to 13:10
 
You can however INCREMENT IT all the way to 13:10
The fuck if I know.
 
10:27 AM
Is that the actual spec? or is that just a retarded implementation?
 
It's the way time is implemented in an XNA game.
 
lol
 
I legitimately cannot change the time.
 
100% broken
 
So the setter of the Time property doesn't actually set the var to the given value, but does a weird merge/increment thing instead?
 
10:28 AM
The game has a function that takes the int and converts it to a string ie. 610 => 6:10 am
No it's EVEN WORSE
There is no getter/settter
it's JUST an int
and a method is called every x game ticks
 
Where is the previous value stored?
 
in a private variable
tmpTimeOfDay
 
So instead of setting its value, you put a different value inside a different variable, serving as a drop point, which the timer loop picks up and modifies the time according to its arcane rules?
 
The method checks the timeOfDay int against the tmpTimeOfDay and then increments it if they differ by 100 or 10's
Apparently yes, that is the way in which it is done.
 
Fascinating.
 
10:31 AM
It has a helper function getTimeOfDayString(int)
If you pass it 1310 it says: 1:10 pm
If you do: timeOfDay = 1310;
timeOfDay increments by 100
 
because 1310 is more than a factor of 100 > tmpTimeOfDay
 
But tmpTimeOfDay = 610?
 
I.e. I passed 999 and it still incremented timeOfDay by 100;
 
And I assume expecting comments or documentation explaining this code is out of the question, right?
 
10:34 AM
It's all from decompiled source so yes.
 
Guys do you prefer Visual Studio with minimal look with nothing but code or enterprisey look with lots of toolbars and panels?
 
There's a way to make Visual Studio minimal?
I mostly just use Resharper and VS/Resharper shortcuts or context menus.
That and of course the solution explorer, property panes, etc.
 
I've just found a way to remove title bar and other clutter. Screenshot: cloud.githubusercontent.com/assets/2109710/19224412/…
 
The toolbars and menu bars don't really bother me.
And I use a lot of the panes on a regular basis, so having them all collapsed all the time would be annoying.
 
What tasks do you do with panes (except when designing a GUI and debugging)?
 
10:46 AM
GUIs I do in code, actually, not using a designer.
I use the Find Results panes a lot.
And with debugging, of course, the Locals/Autos/Watch/Threads/Processes/Immediate/etc.
I don't use the Solution Explorer much, relying on keyboard shortcuts for navigation, but I'm not too hard up for horizontal real estate anyway - I try to break lines after ~100 characters anyway, which still leaves a lot of space on the right side.
 
In debug VS switches to a different workspace anyway, so you can have a clean environment when writing a code and lots of stuff when debugging
 
Maybe I'll move the debugging panes to the right.
 
34" UltraWide monitor here, I'm alright on space.
 
Hello guys! Can you give me a real life example usage of MPI AllToAll() besides matrix multiplication?? I really ran out of ideas. :-(
 
11:37 AM
@AvnerShahar-Kashtan :D
 
...what?
Does anyone here know what "MPI AllToAll()" is?
 
@TomW I googled it.
I knew what MPI was, actually, but I really don't know the terminology it uses.
 
Oh, the interprocess communication protocol?
 
I had to google as well
 
Aware of it. Know nothing about it
 
11:46 AM
What is better naming? ContactDetails or ContactInformation
 
@QuietNaN Pick the shortest one and move on.
 
:D
Already picked shortest.
    I want to group this into 1 class, what name can you suggest for it?

            public string StockItemName { get; private set; }
            public string Tags { get; private set; }
            public string Images { get; private set; }
            public string Description { get; private set; }
^^
 
I have absolutely no idea what your business domain is.
So I'll suggest ideas in vacuum.
public class Thingie
public class StockItemWithTagsAndImagesAndAlsoDescription
(That last one might not be future-proof)
public class NonInvisibleTaggedStockItem
 
12:01 PM
StockItemWithTagsAndImagesAndAlsoDescription
:)))
 
12:13 PM
string Images
....
 
If I have an existing WebAPI server with several dozens methods spread across about 10 controllers, and now I want to add a parameter to all calls. I don't want to add it to all endpoint method signatures, of course.
Does sending it as part of the request header make sense?
Technically speaking, that's how the session token/auth information is sent, and that's an equivalently infrastructurish parameter.
I can't decide if its' a valid design or a terrible hack.
 
You could probably add it to the payload and frig the model binding to pull it out that way
Headers feel to me like you're talking to the server, rather than to the application
 
If you can say that's the case I'd consider it appropriate
 
So an IModelBinder? That should work even for parameterless GET endpoints, right?
 
12:20 PM
Never done it, only aware that you can
 
But won't that interfere with all the other (default, mostly) model binding that goes on?
 
Seems a bit weird to send data to a when GETting data doesn't it?
 
Yeah, but you implicitly do it when you send a session token, for instance.
 
as a cookie or header yes, as a payload? No.
 
That's the bit where I can't decide if it's a hack or not. I want to specify the context for the call - so a call to /api/Cases/GetCases should return different values based on the environment it's executed in. But should the environment be a parameter to GetCases or a header in the request that defines the context?
 
12:25 PM
Then you could specify the environment in the url
/api/Cases/GetCases/{environment}
 
@scheien That means adding a new request parameter for all those dozens of methods.
 
yep, it does.
but sending a payload with a GET is ugly, and does not conform to standards.
or you can pass it as a header, as you said earlier. Might still feel a bit arcane though.
750
A: HTTP GET with request body

Paul MorganRoy Fielding's comment about including a body with a GET request. Yes. In other words, any HTTP request message is allowed to contain a message body, and thus must parse messages with that in mind. Server semantics for GET, however, are restricted such that a body, if any, has no sema...

 
I don't want something GET-specific. I have GETs and POSTs, parameterless and with parameters, sometimes [FromUri], sometimes [FromBody].
That's why I want to pass it as a header, part of the infrastructure. I need it for every call.
 
I think you just answered it yourself :)
 
Morning
 
12:36 PM
o/ @JakobMillah
 
How you doin? :)
 
I'm doing great. Final week before I leave for my new job. :)
 
Oh oh oh shieeeeet! :D EXCITING
 
Indeed. I'm counting hours (almost).
How are you doing?
 
I'm leaving the company at the end of dec
we had an agreement about that. I wanted to leave now
but they have convinced me to stay till end of project (maximum dec31)
 
12:39 PM
Really great :) I am doing fine. I do laundry today hahah chillin.
 
@ntohl How did they convince you?
 
Waiting for some interviews. Got a job secured, but it's in Gothenburg... I would love it, but why did I meet this girl here... :D
 
@AvnerShahar-Kashtan it kind of sounds like a user claim
 
@TomW That's an interesting way to look at it.
Which helps me justify putting it in the headers. :)
 
The identity framework would tie in quite nicely to stashing a claim in the user's principal describing which environment they are browsing
 
12:43 PM
But the same user might make different calls in the context of different environments.
 
If they switch environment, another way to look at it is that their login has changed 'colour' - they're still logged in, but you can expire their token and reissue it with a different environment claim
 
@scheien well. That was creative way of persuasion. Company offered me 1.5 times raise, that other company offered. So I tried to convince the new company, to let me stay 2 more month additional to the 1 month notice period. They said they need programmers ASAP. Also they said they couldn't afford what I stated, but the difference was minimal, and the tech I would like to work with. Anyway the HR at my current company showed me, that there must be some problem with the company.
 
Do they have to be looking at one environment at once or does the use case span multiple?
 
So we agreed on the HR of actual company will try to get me some better job
 
@TomW Spans multiple, unfortunately.
For some operations, anyway.
 
12:44 PM
in exchange I will work here for 2 more month
 
Well those operations can ignore it
 
Let's say, they get an aggregated list of cases from all environments. When they select a case, it goes to get the case's details, which is a single-environment request.
 
@ntohl that sounds reasonable.
 
But I don't want to keep expiring and reissuing hte claim, because they switch back and forth when browsing the cases.
 
@AvnerShahar-Kashtan hmm ok
 
12:46 PM
@ntohl why did you agree to work for them, if they can't pay you what you stated?
 
The client code would be aware of the current environment, of course. It's easy enough for it to add it to the outgoing HTTP request as a header, and easy enough for the WebAPI base class to extract it and add it to the LogicalCallContext.
 
XY problem? Just suck it up and change the code so that it's expressed cleanly?
 
@scheien yeah. I would love to work with reactive extension. Most of the jobs are legacy shit, and that company works with Rx. That's why
 
It's a possibility I'm not discounting, but it means "dirtying" dozens of API calls and DTOs.
OF course, "dirtying" implies that this information isn't supposed to be there.
 
@ntohl I see. It's better to work with something you like, rather than working with shit you don't like just because of money.
 
12:49 PM
It feels like a business logic concern
Rather than infrastructure. Headers feel like infrastructure
 
It is. But one of the business requirements is "Make the current system support multiple environments without rewriting the whole system". :-/
 
@scheien true. 131 eur per month doesn't worth to work with something You don't like
 
That's not a requirement
 
Ah, true. Let me rephrase. "Support multiple environments" is a business requirement. "Don't rewrite the system" is a requirement from the VP R&D.
 
I have a database question if anyone has advice they can offer: stackoverflow.com/questions/39958578/…
 
12:51 PM
@ntohl Money never weighs up for the continuous grind of just getting to work, when you have a job you don't enjoy.
 
Unachievable under current resource constraints and cost/benefit analysis
Quality is non-negotiable
4
 
@Michael Yeah, that seems about right. Your tags are logically grouped into categories, but physically stored in one table, and their ID is based on their table, not their category.
It's not really a problem. It only seems that way because you're viewing your data sorted by the Id, which is a meaningless sort order.
Remember, the data isn't in that order, it's just the default view. Just sort it by DisplayCategory and everything will be grouped nicely.
 
@AvnerShahar-Kashtan Do You have repository pattern?
 
@ntohl As in, do we use it? Yes.
 
@AvnerShahar-Kashtan Is it feasable to swap out the current IRepository implementation that will diference items by their environment? So the logic would be implemented 1 place. It's just an idea.
 
12:59 PM
@AvnerShahar-Kashtan thanks :)
 

« first day (2186 days earlier)      last day (2756 days later) »