« first day (3995 days earlier)      last day (1171 days later) » 
02:00 - 12:0012:00 - 23:00

02:32
 
1 hour later…
03:41
Wolfram is interesting language
btw how to pronounce it? warframe?
mr5
mr5
wolf + fram
making foreign key constrainable seems to be the wrong way
@Freerey go out there. they will suck away your youth energy :D
remind me my colleague build a fk deadlocked database
mr5
mr5
the only thing I think is okay-ish to be a constrained is the size of the type. other constraints should be delegated to another layer
hmm how is fk going to make a deadlock?
@Wietlol if I may add to the complexity, the dash variant or -rc -beta -alpha -preview
03:57
idk lol ,the db stop response after insert/ remove row that fk is involved
04:11
@mr5 I know a successful commercial one-stop multi-company accounting software that highly dependant on fk, a single table had usually over 10 fks. It working fine and stable
mr5
mr5
yeah I'm not saying it is flawed, I'm thinking of making the db engine more "dumb", like give it a less responsibility. By doing so, you could make this SQL engine more robust and the layer2 can make the specific constraints implemented.
@mr5 and how do you know that wasn't the case already?
because...
@nyconing oh God just noticed the naming convention.
why do developers won't follow the unwritten rule that every time you name your foreign key, it should be <table name> + "Id"
while when it is the table's id, it should be "Id" only
04:26
ah the software was initially developed back in maybe 200X when these str_naming_method tmp_is my_popular
Importantly the field name was fine, so its fine to me
mr5
mr5
dunno
I care too much about little details
 
2 hours later…
06:16
Good good morning
06:29
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
06:50
nonce = System.Convert.ToBase64String(Guid.NewGuid().ToByteArray()).Replace("+", "F").Replace("/", "E").Substring(0, 11)
?
mr5
mr5
could also be just Guid.NewGuid()
dafuq is that
A function that hashes a guid?
What kinda lame ID is that even
Like, a 90's game key
mr5
mr5
07:05
I think it's useful to shorten GUID
I think you can also use the device's nano clock for nonce
Morning
[Captain Obvious] Guid.NewGuid() is what you use to get a new Guid which isn't garbage
[Captain Obvious] I mean sure, you can use simply new Guid() but it spits out some interesting results
07:33
Flow charts are fun
Might change my mind when I do more of them sometime in future..
Yup, but main is generate random 11chars
08:02
anyone familiar with kibana?
I need to make an url to a dashboard and give some query filters, but I cant seem to find useful documentation for it
08:20
possibly...
but I guess I just have to reverse engineer the url
because those articles dont really help much
Do they have a customer support, maybe they can send you some documentation?
meh, I found the majority of the noise in the url
so I have a smol url already
"smol" as in relative to a black hole
mr5
mr5
08:40
donche and kibana 🎵
 
1 hour later…
10:00
@Wietlol Just noticed C# assembly version has 4 digits rather than 3. So 1.0.0.0. What's the 4th?
weird stuff
> major, minor, build, and revision
What is meant by build and revision?
[Captain Obvious] Whatever you want it to really
Build = Bug. Revision = Just going to leave it.
we use versions like this:
major = (potentially) breaking changes
minor = new features
build = new build (just fixes and shit)
revision = ignored
I suppose we could use revision for hotfixes, but we just use build for that
imo, a 3 part version is sufficient in most cases
also, a 4 part version is not sufficient for all cases
you want to add stuff that isnt easily described by numbers
such as a release candidate or an alpha/beta/prerelease/snapshot version
10:21
Hi all
In my case, I am implementing a function for log in window. "Remember me", which will save the username when the app is next launched. Is this Minor?
mr5
mr5
on the revision part, you can auto generate it every build and resets to zero when build number has been updated.
@Squirrel.98 imo, yes, but still depends on the management if it's the company's app.
On my contract, it is mentioned the app I build. It becomes the company's property.
mr5
mr5
10:36
ah of course that is usually the case lol
hi everybody I've got a problem concerning the transfer of information between a mvc controller and a web api controller this transfer should be a post request which fails because of a 500 server error again I know what's happening server side and I tried to not use the api and directly call the server from mvc controller and I successfully edited the entity which is the purpose of the post request
the postman message is the following Message":"An error has occurred.","ExceptionMessage":"Object reference not set to an instance of an object
I know this kind of message is concerned with the null reference exception and due to this error like i said before I tried to directly call the server without api and it worked
so the final question is: why does it work without api ? if there is a null reference exception it should always fail
10:57
[Captain Obvious] Your explanatiopn isn't very helpful, I think you should just provide a sample
@Riccardo How do you even call a server without API? Magic?
Autocomplete is tab here ;)
@Squirrelkiller web api is not the only way to call a server you can simply call a method which belongs to a dll separated from the ui
I see. It is still an API then, just not a web API.
ok
well when I tried to call that method belonging to the dll without api it worked
So how directly do you call it? Do you manually instantiate the controller and call that?
11:05
with the api it didn't
yeah
let me explain it better
mvc controller then call to backend method to edit an entity
Do you have any middleware or filters/services in your asp pipeline?
i don't
Because if the controller and everything from there is ok, it has to be something outside of that.
it is
Do you get a stacktrace?
11:07
may you create a chatroom for the two of us so that we free this one?
Nah I got work to do :)
i can't copy paste the stack trace here
just trying to get some more, actionable information here so others may have something to use
Just redact the company/app names
i don't understand the last thing you texted me
Why can't you paste the stacktrace here?
11:10
@mr5 my what?
@Squirrelkiller watch this imgur.com/a/YdmKLWC
So...what does AdminBusinessLayer.cs line 573 do?
remember when I told you it works without the api?
Because apparently there's a null there that shouldn't be.
however that's what it does
11:13
@Riccardo I do but you still have to figure out where the null comes from
Does that line work with a value that comes directly from the API?
@Squirrelkiller here it is
return await adminRepository.Edit(blog);
}
catch (Exception e)
{
throw e;
}
So adminRepository is null
if everything is ok i call the repository and add the entity else i throw the exception
Wait 573 is the throw?
@Squirrelkiller it can't be it is instantiated within the business layer
yes it is
11:15
Remove the e, just { throw; }
It should keep the whole stacktrace then
ok i will and get back to you asap
now it says it is this
Edit>d__14.MoveNext() in E:\\dev\\FattoriaLepiniSolution\\DataDLL\\DataLayer\\AdminRepository.cs:line 501\r\n
@Squirrelkiller
Thought so
need the screeshot again?
Nah
Just what that line does
(or tries to do)
Price3 = model.Price3,
this is an assignment
11:20
Oh it's an object initializer?
between two decimals
the whole thing is this one
BlogContents blog = new BlogContents
                {
                    Id = model.Id,
                    Title = model.Title,
                    Description = model.Description,
                    EntryUserId = HttpContext.Current.User.Identity.GetUserId(),
                    Content = model.Content,
                    Tag = model.Tag,
                    Category = model.Category,
                    Publish = model.Publish,
                    PublishToHome = model.PublishToHome,
                    ActivateTextArea = model.ActivateTextArea,
if you scroll it down you'll find that line of code
I have a feeling HttpContext.Current is null
Everywhere in this call chain, add .ConfigureAwait(true) to your await calls.
how can you tell? if it were null it should have been that line not this one
Like
await repo.GetStuff();
to
await repo.GetStuf().ConfigureAwait(true);
...threading
ok
return await adminRepository.Edit(blog).ConfigureAwait(true);
11:22
web API call maybe has too much to do so the inner task gets executed in a different therad
like this
[Captain Obvious] Threading is easy, except not when its
direct call doesn't have so much to do, so does everything in main thread
so you're telling me this call should be synchronous
????
11:23
Or like, pass die user id as a parameter. Only read it in the controller, then threading stuff can't happen.
Still asynchronous
Just not in a background thread
One thread can work multiple async tasks at the "same" time.
slow it down please ahah
Like, starting task 1, then working task 2 when task 1 waits for a DB call to return
let me try to see what's up with configure await set to true
We also have one lib of a different team we have to rely on that accesses the HttpContext somewhere down below. That was a complicated bug before I knew how threading fucks with the HttpContext.
So yeah...don't let the repo access the HttpContext directly, it shouldn't even know there is something like http.
{"Message":"An error has occurred.","ExceptionMessage":"Object reference not set to an instance of an object.",
"ExceptionType":"System.NullReferenceException","StackTrace":" at DomainDLL.Repository.AdminRepository.<Edit>d__14.MoveNext() in E:\\dev\\FattoriaLepiniSolution\\DataDLL\\DataLayer\\AdminRepository.cs:line 501\r\n--- End of stack trace from previous location where exception was thrown ---\r\n
11:27
Damn
Another task somewhere?
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at FattoriaLepini.AdminBusiness.AdminBusinessLayer.<EditContent>d__15.MoveNext() in
mr5
mr5
DomainDLL.Repository.AdminRepository is null
Or forget the configureawait, just just make the controller read the user id and pass it down
E:\\dev\\FattoriaLepiniSolution\\DataDLL\\DataLayer\\AdminRepository.cs:line 501\r\n
@mr5 Then it wouldn't even get to AdminRepository line 501
11:28
@mr5 it's instantiated within the business
without the api call the edit works
What if you put if(HttpContext.Current?.User?.Identity?.GetUserId() == null) throw new Exception("Yes it's the damn context"); right before that call
mr5
mr5
one way to confirm it is by putting a breakpoint
@Squirrelkiller ok
mr5
mr5
why are you guys still working. it's already 7:30PM
Well maybe I'm not doing half days like someone else
11:31
@mr5 it's 1:30 pm in italy
mr5
mr5
who is that 👀
@Riccardo your time is wrong
@Squirrelkiller Message":"An error has occurred.","ExceptionMessage":"Yes it's the damn context",
you did it
@mr5 i'm in a different time zone than yours
mr5
mr5
no. it's your time lying to you
@mr5 everything is corrupt
11:33
But time always tells the truth
mr5
mr5
true. you can never trust anything these days
@Squirrelkiller it's the damn context
what can I do next?
Damn threading I tell ya^^
so what's the solution to this ?
6 mins ago, by Squirrelkiller
Or forget the configureawait, just just make the controller read the user id and pass it down
That
mr5
mr5
11:35
@Squirrelkiller tell me who this is
so the mvc controller has to set the userid before the api call?
is it right?
The api controller, which calls the business layer, has to do HttpContext.Current.User.Identity.GetUserId() and pass that through the layers
oh i see
not the business the api controller
It's easy: Add the id as a parameter in the repo, then work your way up layer by layer until you're in the controller
Neither repo nor business layer should know that HTTP is something that exists
The Controller knows what HTTP is, how it works, how to read it.
ok I just have to install the asp net identity to web api controller
@Squirrelkiller i set the context to web api controller
EntryUserId = HttpContext.Current.User.Identity.GetUserId()
like this
it's always the damn context which is null as postman says
maybe i should set that context in mvc controller and not in the web api controller?
11:52
I'm not entirely sure how the mvc and api controller are connected here. Is it one application? Or is it one application calling another one?
the second one
i'm using http client to call the web api controller
within the mvc controller
mr5
mr5
eh
Oh, yes then you have to figure out how to pass the identity information from one controller to the other. The api controller only knows what is in the http call, so if it doesn't pass identity data, it doesn't have an identity.
so basically i've got mvc web api and three dlls which are business repository and domain
For example a JWT
mr5
mr5
11:54
doesn't all your resources reside in a single server?
i've pubished to iss only the web api
while the ui reside on iis express
for the sake of brevity
but the ui should be on a virtual machine then the web api on another virtual with the dlls and the db on another one
mr5
mr5
hmm idk much about iis express
is it any different tto the default iss?
i'm call the iss web api from iss express ui
no it's not
mr5
mr5
but you will intend to deploy these web api and your mvc on a different machine right?
This about right?
@mr5 IIS Express isn't integrated into windows like IIS, it is started by Visual Studio separately to host application. It does have basically the same settings and functionality as IIS.
02:00 - 12:0012:00 - 23:00

« first day (3995 days earlier)      last day (1171 days later) »