« first day (1915 days earlier)      last day (3026 days later) » 

8:00 PM
Why did I tell him or why do I regret it?
 
@mikeTheLiar - hah
Did you show him the article about the famous writer that explained the problem as well?
I can't remember her name off the top of my head
Marilyn vos Savant
 
coworker:
> my brain is doing things now, hold on
 
seems legit
 
8:17 PM
@mikeTheLiar Do you guys use bounded contexts? (domain driven design) or one single context/ just curious?
 
Not addressed to me but I see fit to answer it anyway: Not sure about 'use' but I try to think about DDD when I can. Bounded contexts are one of the clearer ideas for me at the moment
the blue book is a pretty hard read
 
@Michael when you say context do you mean DbContext?
 
@mikeTheLiar yes
 
As of right now we just use one.
 
Isn't a bounded context referring to separation of concerns?
 
8:19 PM
and what about repositories?
@TravisJ yes.
 
So that should be related to decoupling in general, and not DbContext in specific.
 
We're slowly starting the process of splitting the application into separate repositories
 
The biggest problem that we're facing right now is that everything is tightly couple to the database
The task that I should be working on right now instead of chatting here is actually related to addressing some of these problems
 
@TravisJ I wouldn't say it's quite the same thing in the sense that SoC is usually described in software
 
8:23 PM
multitask lol
 
Broader than that
 
@mikeTheLiar - An easy way to combat that is to build localized problems with solutions which can run independent of your project.
 
@TravisJ combating the tight coupling or the procrastination?
 
@TomW - It just depends on how you identify the concerns.
@mikeTheLiar - Tight coupling.
 
We're slowly pivoting towards microservices and message queues. Some parts of the application are more crucial to separate out than others right now
Business told us "we need $application to be able to talk to the website!" and we're like "uh, yeah, about that. Can't really do that right now."
 
8:26 PM
@mikeTheLiar - It helps because you only include what you need when building simple examples. Doing that will help you figure out what projection is needed in the database, as well as providing a minimalistic feature that takes only the small projection of data in order to produce the desired solution.
 
@TravisJ the thing that's gone unsaid so far is that this application is carrying 10 years of technical debt in its guts.
 
@mikeTheLiar - So the first step would be to write something independent of both $application and website which facilitates the type of talk you are intending on using.
 
That's basically what we did/are doing
 
@mikeTheLiar - That is just an issue of wiring though. If you make a fancy new part which has the right type of hooks, it can be wired rather easily; even into legacy.
 
This is all already planned
When I said "slowly" I meant that we're taking our time because we don't want to fuck it up
 
8:31 PM
Good plan :P
 
this project is really big and I have to write a design doc for it -_-
 
pocket morty's best game 2016
@Codeman thats not that bad
im doing service specs for the billion services im about to write
so
 
well... I'm designing a service coordinator that will enable easier communication between existing services
difficult :/
 
so you're writing middleware
 
I'd rather be speccing out a brand new thing, lol
not exactly. more like... a replacement for existing stuff that also has to work with that existing stuff
 
8:37 PM
some of my services do that
some services already exist and some dont
 
Where should i start looking if my application is wrongly returning 404, even when controller and action name are correct in the url??
 
we have a "wrapper" for our organization that we custom wrote
so now we're doing large scale integration
it will take forever to get all the services in
 
@Failsafe we're not in a competition for who has the biggest dick, no need to one up me
 
@Obviously routes/url/f12 dev tools
@Codeman implying i have a dick to begin with
 
@Failsafe I'm sure you understood the metaphor regardless of your anatomy :)
 
8:40 PM
i was finding similarity but if one upping was what you were looking for than i guess thats okay too
you can't really inflect with text
i guess
 
well, that was my interpretation :)
 
i didnt mean it that way
 
I think "that's not so bad, here's this thing that sounds way harder that I have to do" sounds like one upping regardless of tone inflection
@Obviously are you using custom routes anywhere? route definitions by convention or configuration?
 
okay...
im just gonna stop talking i guess
 
Yeah but those routes were working fine
 
8:42 PM
you don't have to stop talking, I'm just trying to tell you how the things you said made me feel. Take it as constructive criticism, if you like? it wasn't intended to make you feel bad, either :)
communication is hard
usually... if you want to avoid being seen as a "one-upper", especially in engineering discussions, rather than talking about how hard the similar thing is, maybe offer to discuss some problems you faced?
idk
 
user47589
text-only communication leaves a lot to be desired.
 
:) Happy Faces!
 
idk. how do you guys approach a large project that you are having a hard time understanding?
I'm trying to break it down
but my manager wants me to come up with a design before I try to determine features, that sort of thing. hm
and I'm not really used to writing design docs, I usually can just go straight to coding. But this is a brand new project, possibly a brand new service
 
Guys , SQL SERVER AGENT can't be started ,
the error in event log says

SQLServerAgent could not be started (reason: This installation of SQL Server Agent is disabled. The edition of SQL Server that installed this service does not support SQL Server Agent.).

note : i have the full edition not express
any idea plz
 
@Bassem "full edition"? there are many editions of SQL Server
did you google your issue?
 
8:54 PM
Is this the Go Daddy issue again?
 
@Codeman - I start writing on a white board.
 
@TravisJ my manager is pretty busy, maybe ask one of my coworkers to riff ideas with me? idk
I'm kinda being put in charge of this
 
@Codeman - Names of key roles, and their behaviors.
 
@codeman yes i google , i mean that i don't have express edition
 
If you have a block of text with what it should be, then parse the text into the roles and behaviors.
 
8:55 PM
@mikeTheliar , i contact godaddy , they can't help
 
@Codeman - From there you can start to break down their connections, and then also coming up with any supporting roles that may fit into the design. At that point you should be in a good place to begin to fill in more details in various places.
 
@Bassem Ahh GoDaddy
what a fun provider
 
@Codeman - Then all that is left is the over-engineer the crap out of it :D
 
I have about 20 params in here:
params SqlParameter[] spParams

Is there any way in VS2013 to just output the name/values as text?
 
Please guys , i spent a lot of time on this
i don't know why sql server agent can't be started , someone help me plz
 
8:56 PM
GoDaddy is to web provider as shit is to sandal.
 
@JoJo Param.Value.ToString()?
 
spParams contains: {Co.DataLayer.SqlParameter[20]}
 
GoDaddy is pain in ass
 
@Bassem we can't help you today any more than we could help you yesterday
 
@Failsafe I'll take a look
 
user47589
8:57 PM
@Bassem we cannot begin to help with this
 
I mean to say while in Debug mode
 
I use discountasp.net now, absolutely love it. Haven't had any problems or interruptions.
 
So guys what is the purpose of this chatting room !
 
user47589
this room is about C#, not godaddy or sql server
 
@Bassem first run this query on your server and see what's the string returned: select @@version
 
8:58 PM
@Bassem - Certainly not to be a help desk.
 
@Amy are you refering to my C# debug mode question?
 
user47589
no, i was addressing @Bassem
 
kk
 
@tweray , this is string returned :
Microsoft SQL Server 2014 - 12.0.2000.8 (X64)
Feb 20 2014 20:04:26
Copyright (c) Microsoft Corporation
Express Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)
ops , EXPRESS !!!!!!
 
@Amy - And sometimes about code golfing JavaScript :D
 
8:59 PM
well, turns out it is sql express
 
user47589
@TravisJ o/
 
@tweray , can i upgrade it to make sql server agent work ?
 
yes
sqlexpress doesn't support agent
 
Gotta pay for a license though
 
if you have msdn sub., you can get a standard dev instance by like 25 bucks if i didn't remember it wrong
but of course, if you use that on production environment, the famous msft lawyer team is waiting for you
 
user47589
9:04 PM
i bet the Java room would know.
 
Any particular reason you think the Java room would know about MS SQL? Just curious
 
@tweray , so i must buy it from godaddy ?
 
user47589
its as relevant there as it is here.
 
Eh, I think it's a little more relevant here but I see your point.
 
@TravisJ I'm trying to underengineer as much as possible :P
 
9:13 PM
@Codeman step 0 is 'find the nouns'
More precisely, work out what your domain objects are and what their relationships are. The notion of an aggregate root might be helpful
> but my manager wants me to come up with a design before I try to determine features
 
PSA: Never try to implement your own ETW event source
 
Oh and punch that guy in the face
@KendallFrey Yeah, encountered that shit yesterday and today.
 
@TomW I think he means an overarching design, but idk
 
If you figure out how to get a pre-made one to just log to the fucking event log like a normal person please let me know
 
user47589
underengineering an overarching design might be difficult
 
9:20 PM
@Codeman Microservices. Fin.
 
yesterday, by Tom W
Just wave your hands, make boogly eye gestures and crow "MICROSERVICES!"
 
I regret nothing.
 
user47589
we need your kind of energy here
 
yesterday, by Codeman
@TomW "I really feel that microservices proactively leveraged in the cloud are the most cromulent methods of making customers happy and building stockholder value"

"GIVE THAT GUY A BOARD SEAT"
 
I'm trying to figure out if my current task can be (sanely) done solely in SQL and I don't think it's possible
 
9:24 PM
@TomW but do you know what a graph is?
 
Hello. I am beginner at OOP in C#. Please any help guys? :)
 
@Codeman blobs and lines
 
I have an issues.
 
sometimes the lines have arrows on them to indicate direction
a 'directed graph' if you will
 
@mark you don't need to ask to ask :) just ask your question. Try to be specific and show that you've put effort into solving it yourself.
@TomW lol, I would have accepted "blobs and lines" as an answer
 
9:25 PM
Oh sure @Codeman. I will try now. :)
 
@Codeman depends what you mean by 'is'
 
I have a class name where I have two variables. places and kilometer. public string Places { get; set; }
public int Km { get; set; } How can I add the value in the Places e.g {place1,place2,place2} and in the Km {1,2,3}
I also have public void Hours in my class.
 
@mark Places and Km should both be of a collection type. List<T> is an example of a collection type
 
Where it will compute the hours from my form with 2 combo box.
 
void means 'nothing', you know that right?
public void Hours() { // does not return a value }
 
9:31 PM
@mark What do you mean by add the value in places and in the km?
 
When the user click the button in the form, the first combobox has a default name with defaultplace name. In the combobox 2 are the places from the class with variable of places. and in my method Hours() will compute the hours.
Oh @TomW it must be public static Hours() right?
 
@mark er, no. That's nothing to do with the issue
 
@Michael what I mean is, its like List<T> how can I do that? hehe
Oh @TomW sorry. haha
 
@TomW technically he can use public void Hours()
 
Yes, if you set a member of the class in that method
 
9:33 PM
if he has global variables or something
 
But that's quite an unclear way of performing a calculation
 
@mark have you tried doing some "intro to c sharp" type videos or classes?
 
@Codeman ahh... just slight. hehe
 
@mark definitely look more into that :)
 
But I have now some ideas but I don't now how can I apply it.
 
9:35 PM
@mark I would follow along with a youtube video to understand the basics a little better. Its hard to help from the ways you've asked your question
 
Ahhh... but just give me some ideas now. :)
I will ask again here if I already move in the next problem I have. I think that would be in the public void Hours(){} if I am encountering some problem there. :)
 
@mark I liked this guy when I was first starting. explains things super simply youtube.com/playlist?list=PL0EE421AE8BCEBA4A
 
user47589
a better function name would be CalculateHours
 
Oh Thank you @Michael for the resources. :)
But I am just wondering,
The form couldn't call my variables in the class name.
I tried this one. ClassName classname = new Classname;
classname.VariableOne = "sample";
classname.VariableTwo = "sample2";
 
user47589
"couldn't call my variables in the class name." is a meaningless statement.
 
user47589
9:39 PM
variables aren't called. class names don't have variables.
 
user47589
if the name of your class is ClassName, please change it right now.
 
I mean, entity?
Hehe is that entity or vector?
 
definitely not vector
 
@mark if you have code samples, could you please use dotnetfiddle or gist or pastebin and write code that compiles, see sscce
 
so entity right? :)
 
user47589
9:40 PM
object
 
we have no idea what you are really talking about.
 
user47589
study some C#, learn the terminology.
 
Ah yeah. Object :D Its class object right? hehe
 
user47589
we cannot talk effectively until you know the right terms.
 
Oh sorry. hehe :) By the way the error I have says , "Windows ... 'property' but used like 'type'"
what is that mean?
 
user47589
9:42 PM
i dont know, you shortened the error and removed any meaning it might have
 
user47589
please paste the entire error.
 
Error 2 'WindowsForm.clsDestination.Cities' is a 'property' but is used like a 'type'
 
user47589
and what line is that error thrown on?
 
clsDestination.Cities
my real code.
clsDestination.Cities
public class clsDestination
{
public string Cities { get; set; }
public int DestinationKm { get; set; }


public void Hours() {

}
}
 
user47589
that isn't the line that error occurs on.
 
9:46 PM
@Amy Im struggling with where to put my dbContext still. Ive looked into it more, and people use "repositories" and UnitsOfWork. The way I have it structured seems to extract things similarly to Repositories. But I'm worried about how the context is being opened and disposed
 
@Michael it will only be open during the Using statements
 
user47589
@Michael, well EF has unit of work and repositories out of the box really. the dbcontext is a unit of work, and DbSet<T> is a repository. you can add abstractions on top of your dbcontext, but recognize that EF already uses those abstractions
 
@juanvan I know but I dont know where to put the usings. For example If I have this as a data access class:

    public static class ContactDataAccess
    {
        public static int InsertContact(Contact c)
        {
            using(LitTrackContext context = new LitTrackContext())
            {
                context.Contacts.Add(c);
                return context.SaveChanges();
            }
        }

        public static int UpdateContact(Contact c)
        {
            using (LitTrackContext context = new LitTrackContext())
 
I'd recommend against the additional layer of abstraction. The web team here started with that and eventually removed it. Ended up adding a ton of extra unnecessary work
 
So where should I use usings.. in the UI code behind?
 
9:48 PM
No
 
Or in the Objects themselvs?
 
user47589
your code looks fine to me
 
@Amy clsDestination.Cities = "Sample 1";
 
You use the Repo so Other UI can call the repo with out having to do all the Edit stuff
 
@mark clsDestination is a class, not an instance. You can't reference a non-static property on a type
 
user47589
9:50 PM
@mark, clsDestination is the class Type. not an instance
 
if I have a Contact class that has a SaveChanges() method. should it look like this:

        public bool SaveChanges()
        {
            bool result = false;

            if (this.Id.HasValue) //Update
            {
                int returnValue = ContactDataAccess.UpdateContact(this);
                result = (returnValue > 0) ? true : false;
            }
            else //Insert
            {
                int? returnValue = ContactDataAccess.InsertContact(this);
                this.Id = returnValue == -1 ? null : returnValue;
Or should the using be directly in this Contact Class SaveChanges() method?
 
user47589
no, it's fine
 
user47589
you can put the using statement there, and pass the context into your data layer
 
user47589
but i dont see the point of that.
 
Ah @Amy and @TomW hehe
It should be something like this... clsDestination classname = new clsDestination();
 
user47589
9:52 PM
IMO, keep the context itself inside your data access layer
 
then classname.Cities = "Sample1";
:)
 
yes
 
@Amy Im concerned about the UpdateContact() method in particular though. where i have to explicity say"context.Entry(c).State = EntityState.Modified;"

        public static int UpdateContact(Contact c)
        {
            using (LitTrackContext context = new LitTrackContext())
            {
                context.Entry(c).State = EntityState.Modified;
                return context.SaveChanges();
            }
        }
 
user47589
yes, mark
 
Context is not in Codebehind or UI
 
9:52 PM
Oh okay :D I got it now. :) Thank you. I will try to work on this now. Thank you for the time!
 
It never occurred to me to read the C# specification when I was starting out, but it probably would have been a good idea
 
user47589
welcome, @mark
 
Anything you can't do for whatever reason, ultimately the real reason is 'because the specification says so'
 
And Have a good day @Amy and @TomW :D
 
I feel like It should know that something has been updated without explicitly specifying its state
 
user47589
9:54 PM
@Michael, it would if the object originated from EF (and tracking is enabled)
 
^
 
@TomW I love how anders was an author of that
 
It would... for example from this:

        public static List<Contact> GetContacts()
        {
            using (LitTrackContext context = new LitTrackContext())
            {
                return context.Contacts.ToList();
            }
        }
But you can see that the using is closed. after it gets it
 
user47589
right
 
oh god that's 2003
bad link, bad link
 
9:55 PM
So now the context is disposed, and the Update wont know about the change
 
user47589
right.
 
well that sucks..
 
@Michael that's why I was suggesting to make those methods non-static and pass in a reference to the context. So the context is open for the entire life-cycle of the dao
 
user47589
in my current project, we instantiate the dbcontext at the beginning of every request and dispose of it at the end. a single context for the entire request lifecycle
 
@mikeTheLiar and @Amy So could I create a global variable holding the context..
and then.... Idk how I would dispose it
 
user47589
9:57 PM
you could yeah. Service Locator Pattern
 
Well I would just make it a property of ContactDataAccess
 
@mikeTheLiar sure that works too
but how would you know when to dispose?
 
user47589
do you have more than one DataAccess class?
 
@Amy Yes, one for each object
 

« first day (1915 days earlier)      last day (3026 days later) »