« first day (1552 days earlier)      last day (3411 days later) » 

1:00 PM
@Broken_Code You should start with very basic C# tutorials to understand how to use the language
I think you know the concepts but VB has stupid naming conventions
 
@TomW how would I be able to global declare if I am not to use modules
 
dim myString as String is the most evil var declaration syntax of all time.
 
Global functions are a bit lame, global variables are horrible. I usually consider any function to be a member of a class and it's rare that they're really applicable in global scope (i.e. in a module)
 
@Broken_Code Using global variables is bad, mkayyyy?
Scoped variables are fine
But never global ones.
 
I think modules came about from the classic VB/VBA days, which didn't have a concept of classes or namespaces iirc
 
1:02 PM
@TomW I see. I will keep that in mind that in mind... SO no global variables got it
 
One of the design goals of VB.net was that legacy code would compile with minimal changes, so Modules remained even though their purpose was defunct
 
@RoelvanUden If I told you that I generate my EDMX in the Data layer and then decouple the generated model classes and move them into the Core layer would that make you cringe?
If I ever update my EDMX then I just have to run the custom tool on the T4 script to update the model classes
 
Between vb.net and C# I kinda felt that C# in some cases had shorter coding but I also felt that way about vb.net and because most of the time I knew what I would need to use, I would fall back to vb.net simply because it was easier for me. I suppose that is biting me right because because of this bug I run into
 
@Broken_Code Your bug isn't language specific
It's from your code
We're just telling you these things cos you're in the C# room
 
^ that. It'd do the same thing if you wrote it i C#
 
1:06 PM
@Sippy so my code is flawed
 
@Broken_Code Yes, but I can't answer why because I don't know the technology
It's a misunderstanding you have with the way that Winforms works
 
@Sippy if you had to answer why from the C# prospective what would you say oh is that it?
 
I dunno
If you pastebin all your involved classes
We might be able to help a bit more
 
pastebin.?
 
1:14 PM
@Sippy It's a bit silly, yes.
 
@Broken_Code Never choose a language simply because it's less code to solve a problem, except in the case of code golf.
 
@Sippy I am not sure if i got that right
 
btw my work network blocks pastebin, so don't ask me
 
@TomW that is weird why would they do that
 
1:17 PM
@RoelvanUden What would be a better way to do it?
It'd feel more silly to me to generate models, then write them out again in Core, then write them out a third time for the ViewModels in my application
 
@Broken_Code Why do you have different behaviour if the debugger is attached?
 
@Sippy Why move them?
 
@RoelvanUden If I don't then the application layer has to depend on the data layer for the models
And people keep telling me the application layer shouldn't be aware of the data layer
 
@RoelvanUden when i try to add the forms as they are, I would get the top level error
@KendallFrey I am not sure i understand what you are referring to
 
uuurgh. Legacy database design. We have a minimum age specified as a double i.e. a number of years which may be a fraction. The person's age is specified in years, months and days. So they may or may not be over the minimum age depending on the date on which you ask.
 
1:22 PM
That makes sense for a date-related validation :P
 
it's such a pain in the fucking ass to work on a solution that literally 20 other people are contributing to
and its a pain in the ass that git can't fucking merge css without thinking theres a conflict every line
fucking rage
 
Every line? Sounds like someone is swapping spaces for tabs or vice versa.
 
No, it doesn't. Now - n.nnn*Years comes out to a different number of days depending on how many days the months prior to now have. And the result may or may not be greater than their date of birth, depending on when in the year you ask
 
@Broken_Code Your Debugger.IsAttached. If you code does different things in the debugger, it will be hard to debug.
@TomW "I was buying booze 10 years ago. Was I underage? Naw, I'm 19 now."
 
@RoelvanUden I'm missing the CreateObjectSet method and I can't figure out which assembly it's in
I've included System.Data.Entity but it's not liking it :(
 
1:26 PM
@KendallFrey oh right well i run the app in release after I have tested everything so yeah when i did not have that line of code before it would not point to the correct folder so after using google I found that to be the best way to ensure that it points to the right place
 
@Broken_Code Spoiler: it's not the best way
 
Ah. The column is a decimal, but it's actually intended to mean YY.MM
Nowhere is this documented.
 
@KendallFrey What would be. The best way?
 
@Sippy .Set<T>()? I think that's in EF5+
 
@Broken_Code That depends what problem you're trying to solve
It sounds to me like you want to create a Resources folder in your output directory
 
1:28 PM
I have a webform app that creates dynamic textboxes like so:

protected void AddBoxes()
        {
            counter++;
            TextBox tb = new TextBox();
            tb.ID = "Textbox" + counter;

            LiteralControl linebreak = new LiteralControl("<br />");
            PlaceHolder1.Controls.Add(tb);
            PlaceHolder1.Controls.Add(linebreak);
            controlIdList.Add(tb.ID);
            ViewState["controlIdList"] = controlIdList;
        }
 
@RoelvanUden Shouldn't EF6 have it as well then?
 
"I have a webform app that creates dynamic textboxes" I thought this was going to be a horror film at this point
 
this works well...but now I want to add a button to remove them one by one so this is what I have tried
protected void btnRemoveTextBox_Click(object sender, EventArgs e)
        {
            foreach (Control control in PlaceHolder1.Controls)
            {
                counter++;
                TextBox tb = new TextBox();
                tb.ID = "Textbox" + counter;
                if (control.ID == tb.ID)
                {
                    Controls.Remove(control);
                }
            }
        }
@KendallFrey quiet you...haha
 
@Skullomania Why are you creating tb if you're never using it?
 
@Sippy There is a plus in my EF5. The snippet I posted was EF4 :-)
 
1:30 PM
the remove does nothing. @KendallFrey i do use it...I do not check to see if it is null yet...I will add that in later.
I just want to remove it for now
 
@RoelvanUden Ah.
 
@KendallFrey Ah well see I am not creating a new folder I have a resource folder which while I am in Visual stupid my application was able to find very easily however after I ran the code in release it would not go to the correct folder so I used the code above to fix that and yeah
 
@Skullomania No, you're creating a textbox that never exists
@Broken_Code Well, you should be creating a new folder
 
@KendallFrey

List<string> controlIdList = new List<string>();
        int counter = 0;
        protected override void LoadViewState(object savedState)
        {
            base.LoadViewState(savedState);
            controlIdList = (List<string>)ViewState["controlIdList"];
            foreach (string Id in controlIdList)
            {
                counter++;
                TextBox tb = new TextBox();
                tb.ID = Id;
                LiteralControl linebreak = new LiteralControl("<br />");
 
if you're not, your program isn't going to work at runtime either
@Skullomania not that code, the other one
 
1:33 PM
that one is simply used to call this code in the page load so that the page starts out with a textbox instead of just a button
 
what?
I have no idea what you're talking about
 
and is used to perform an action in the button click event
 
TextBox tb = new TextBox();
tb.ID = "Textbox" + counter;
if (control.ID == tb.ID)
what is that
 
that is my failed attempt to try to get the textbox id to remove it
 
why do you create a new textbox there?
you're only using it for the id
a string variable would more than suffice
 
1:36 PM
@KendallFrey that just it...what string variable?
 
aaagh, that doesn't solve the problem at all!
 
i need to get the ID of ControlIDList right?
 
What is ControlIDList
 
controlIdList is the Viewstate variable
 
The subject is meant to supply their age in years, months and days ago i.e. relative to today. This means implicitly that you're comparing to now. YY.MM prior to now is a different number of days depending when you ask
 
1:38 PM
@KendallFrey controlIdList = (List<string>)ViewState["controlIdList"];
 
what does that have to do with this code?
 
i was just explaining what it was
 
@KendallFrey yeah but I have items in it...
 
@TomW How the f am I expected to know how many days old I am?
@Broken_Code ...and?
 
@KendallFrey where would i keep my items if i create a new folder
 
1:40 PM
@KendallFrey exactly! I'm complaining that the API I've been given to work with is cack and there are two irreconcilable representations of time here
 
@Broken_Code in the folder...
 
it is pertinent to the code there because it forces the page to keep the viewstate
 
Yes I keep my files in it
 
but is that where the id should be extracted
 
6 mins ago, by Kendall Frey
TextBox tb = new TextBox();
tb.ID = "Textbox" + counter;
if (control.ID == tb.ID)
I'm only worried about that code
WHY WHY WHY
 
1:42 PM
how else do I get the id of the textbox control to remove it
i understand that using TextBox tb = new TextBox(); creates a textbox
 
if (control.ID == "Textbox" + counter) is better, yet still horrible. :P
 
@Skullomania control.ID will get the ID
 
Adding to the chorus of why here
 
Why do humans have a tendency to overthink things they don't understand?
Surely it would be easier to underthink
 
@KendallFrey i am more lost than before... why control.ID == control.ID
 
1:46 PM
@Skullomania no, of course not
The issue is that you're creating a textbox solely for storing an ID to test against.
That's like hiring a semi truck to mail your letter.
2
Ugh, trying to diagnose why a Rebuild sometimes fails. Keyword "sometimes".
I can't even use trial and error on this one
 
@RoelvanUden Is your ServiceEntities defined as an ObjectContext somewhere?
 
@KendallFrey what type of application?
 
@Squiggle a big one
the solution has maybe 20-30 projects
mostly dlls, about 5 exes
 
2:01 PM
Mine has 24 right now :)
 
scratch that, it has 35
 
:-/
what error is it giving you?
can't be a compile error - normally it's a file access or dependency issue. Given that you have 35 projects, I'll bet you've got a circular dependency somewhere.
 
Well, it appears that one or more of the projects isn't building, and all it's dependents fail
 
do a clean -> rebuild and see what the first error is.
 
I suspect the AfterClean build task is managing to keep running after the project is built, and deleting some of the build output
That seems unlikely, but it's the first thing I thought of
 
2:05 PM
srsly, large projects like that are likely to have dependency issues
 
@Squiggle Problem is, it works 90% of the time
 
private readonly ObjectContext _entities;
private readonly IQueryable<T> _queryable;

#region Constructor

public MutableQueryable(SurveyEntities entities, IQueryable<T> queryable)
{
	_entities = ((IObjectContextAdapter)entities).ObjectContext;
	_queryable = queryable;
}
Why does that tell me that ObjectContext doesn't contain a 0 arg constructor?
 
> The type reference cannot find a public type named 'Foo'.
That's the first bunch of errors from XAML
it points to a type in the assembly that I suspect of not building
the build output appears to show it built
It's not in the output directory though
 
@KendallFrey clean/rebuild should fail every time if it's a circular dependency issue
Just rebuilding blindly may eventually get it to work
but that's shonky
 
@ton.yeung
 
2:17 PM
@Squiggle I don't think it has anything to do with circular references
problem project isn't referencing anything in my solution
 
@RoelvanUden I think I get it now. EF4 used ObjectContext but has been largely replaced by DbContext in later versions, so all it needs is a little modifying to use the new methods right?
 
@Sippy Jus. I have them somewhere, will have to dig them up for ef5+
 
It's fine I've learned something by doing it myself :D
 
Confirmed, the project is built, it exists in the obj folder
It either was never copied to the output folder, or deleted after it got there
lol, just randomly stumbled upon a SO comment from my coworker
 
@RoelvanUden I don't agree with the change from CreateObjectSet<T>() to Set<T>()
Because Set is a verb in of itself that does not mean a set of items.
 
2:26 PM
Don't blame me about EF naming...
 
Silly EF devs.
@RoelvanUden Nah that's what confused the shit out of me.
I thought in EF 6, they did away with the whole EntityState thing and used Set instead
Then I read what Set actually does and realised what my misconception was
 
Oh, no, the states are still around but are more obscured :P
 
db.Entry(item).State = EntityState.Modified;
Not that obscure :P
What's good about this is that now I've reworded it for EF5/6 I understand your code a lil better now
 
Not sure how it behaves if you do that on a non-attached entity.
 
I've never used EF with ObjectContext
 
2:28 PM
I think you might need to attach it first, then sset to modified.
 
@RoelvanUden Yeah you do.
 
Right. Cool then! :-D
 
^_^
Error 3002: Problem in mapping fragments starting at line 625:Potential runtime violation of table ResponderAttributePresetValues's keys (ResponderAttributePresetValues.ValueID): Columns (ResponderAttributePresetValues.ValueID) are mapped to EntitySet ResponderAttributePresetValues's properties (ResponderAttributePresetValues.ValueID) on the conceptual side but they do not form the EntitySet's key properties (ResponderAttributePresetValues.AttributeID, ResponderAttributePresetValues.ValueID).
That's all that's wrong now.
EF didn't throw that error yesterday ..
happy day
@RoelvanUden Would it be a terrible idea to call SaveChanges in the CRUD methods?
I assume that would depend on the 'transactionality' of your application?
 
@Sippy It would destroy the transaction capabilities of the calling code.
You probably don't want to save an item before processing an order..
 
Yay I understand how stuff works
 
2:38 PM
That's the idea of being a programmer :p
 
^_^_^_^_^_^_^_^_^_^_^_^^
I like it when I get stuff
Also what's the idea behind Mutable?
 
Using a transaction or you mean the inherent transaction of ef
 
@Shoe The optimistic concurrency
@Sippy Just to show that you can query, but also alter stuff.
 
Because if you use a transaction calls to SaveChanges have no effect until you commit that transaction
 
@RoelvanUden I meant the naming convention :P
I don't know it
My coworker saw it and said it meant nullable and something else
 
2:42 PM
It's English. :P
 
Oh
How odd
 
It has nothing to do with nullable and whatnot.
 
English is a really stupid language.
2
@Roel is there a reason why .. (gimme a sec)
public T Update(T item)
{
	_entities.TryAddObject(item);
	_entities.Entry(item).State = EntityState.Modified;
	return item;
}
Doesn't look like..
 
@Sippy try a DNA test
 
public T Update(T item)
{
	if (_entities.TryAddObject(item)) {
	    _entities.Entry(item).State = EntityState.Modified;
        }
	return item;
}
 
2:52 PM
@Sippy Because you don't care if the item was just added now, or added previously. It's just there to make sure it is added to the ObjectContext, so you can set it to modified and ensure it's saved along with other changes. This also enables you to use an arbitrary instance that isn't in the context yet (e.g. created from a MVC post) and update something in the database without querying it first.
I use that to let MVC turn a form into an instance and save it directly as an edit :-)
(Saves me the trouble of having to go find it by id, update it, and re-save it)
 
In later versions if you supply an object with an ID, it does that anyway :P
My point was though
 
For me it just goes boom (EF6)
 
TryAddObject can return false
 
Pft who cares what it returns :p
 
Why did you make it return if you don't give a shit xD
For lols?
 
2:56 PM
gaaaaaaargh
 
@Sippy Yes.
 
@RoelvanUden Fair enough :D
Ah Mr. Brown
Would you perchance know what EF is trying to tell me here:
27 mins ago, by Sippy
Error 3002: Problem in mapping fragments starting at line 625:Potential runtime violation of table ResponderAttributePresetValues's keys (ResponderAttributePresetValues.ValueID): Columns (ResponderAttributePresetValues.ValueID) are mapped to EntitySet ResponderAttributePresetValues's properties (ResponderAttributePresetValues.ValueID) on the conceptual side but they do not form the EntitySet's key properties (ResponderAttributePresetValues.AttributeID, ResponderAttributePresetValues.ValueID).
 
its telling you to take a hike
im guessing you have complex keys on your tables?
 
There is a Primary key and a Foreign key.
And a value.
The primary key exists for nothing, it's never referred to by anything.
Only added it cos EF whined at me for not having one
 
It looks like your foreign keys are not following convention, in which case they will need to be mapped/attributed properly
 
2:58 PM
Hm
The primary key table for the foreign key is a list of attributes, some of which are dropdown attributes
The presetvalues table contains values for those dropdowns.
So the foreign key just links to AttributeIDs in the primary table.
 
The property name ValueID refers to a foreign key in EF convention, for a navigation property named Value. Child-> Parent
 
So just rename it?
 
Same with AttributeId, [Xxxx]Id means something special in EF
 
derp
I've never had an issue with that before
 
It wont happen if your not using fragments, it usually figures it out
also, I am way to lazy to type ResponderAttreibutePresetValues... even with intellisense
@TravisJ @KendallFrey you two wizards ever try creating intellisense for SO chat?
 
3:03 PM
wat
 
@CharlieBrown Lol, I type at about 120wpm so it doesn't faze me particularly
If the next dev doesn't like it he can refactor it
:D
 
how can chat have intellisense
 
I learned to type before I was taught what home keys are, and never relearned, so I type like a snail
@KendallFrey why not?
 
I said how
 
Similar to the way Excel handles it
 
3:04 PM
Which is...
 
Take all words on the page that have been 'chatted', and make them the select list for intellisense
 
That sounds harder than typing.
 
you mean like people use for texting?
 
So if I started typing "Resp" it should present me with a list of options
 
What Sippy said
 
3:05 PM
Yeah, like texting
 
God please no not predictive typing
i cri
 
I didnt say useful, just asked if you tried it before
 
Ah
 
no, why would I
 
3:06 PM
@rlemon might know someone interested in that :P
 
b/c you try all sorts of weird shit
 
Ever tried typing non-English in English Skype? It auto "corrects" (read: malforms) all my native tongue words because of, reasons.
 
@CharlieBrown touche
 
@RoelvanUden I hate that
 
@Sippy in?
 
3:07 PM
I do a lot of uhh .. "u wot m8 rekt init fam on me mum" in skype
@rlemon What Charlie was just going on about
 
fam?
 
Intellisense for SO chat lol
 
2 mins ago, by Charlie Brown
Take all words on the page that have been 'chatted', and make them the select list for intellisense
 
IIRC @Sippy is from the Midlands. No wonder Skype doesn't recognise it as English
 
ohh, that could be neat
I wrote a script to give tab complete snippets to the chats
I don't use it tho :?
 
3:08 PM
@TomW Swindon m8
 
oic
 
@KendallFrey fam is a chav word from London
 
well that's no better
 
No, it's not.
 
@TomW code from yesterday, i like it
 
3:10 PM
dumb question
i created a folder in my winforms project and called it "Application"
 
@CharlieBrown tx
 
@Sippy You're lucky I even know what a chav is
 
now there's an application namespace so my project wont work
how can i get rid of references?
*namespaces
 
You Brits and your slang
@mbdavis rename them
What do you mean, it won't work?
 
how?
 
3:11 PM
Most of the rest of the world doesn't have chavs because they either have too much self-respect or they're violent enough that chavs will just get stabbed/shot
 
because the program runs with Application.Run(new MainScreen());
 
oh that way
 
@mbdavis using statement?
 
but now its referring to the Application namespace i made i guess
 
@mbdavis by typing in a new name where the old one is
 
3:13 PM
@KendallFrey yep that did it
that was dumb, cheers
 
Chav = douche where I live
 
Then there's Cockney rhyming slang
oh gosh
 
Britain is very tolerant of idiots that want nothing more than to have kids, smoke and intimidate people all paid for by our government.
Oh and drink a lot too.
 
Britain is crowded as fuck compared to murica, which is crowded as fuck compared to Canada
Remind me to have ALL the kids
 
I saw a guy in town center the other day who was walking round with about 4 litres of "white ace" (budget cider) asking people for cigarettes for free because he had no money.
 
3:17 PM
I saw a guy the other day
 
Lol
such witty much retort so wow
 
aaand hard drive failed. mf
 
Morning peeps.
 
3:35 PM
You know what would be cool? If I could store CLR types in SQL server tables. Neatest way to map names of things to types that handle those things. Something like Activator.CreateInstance(sqlDataReader.GetValue(0) as Type);
 
store the full name as a string
unless you mean actual code, in which case... code in a database? wut?
 
Not bad; one level of indirection more than I was hoping for. I was hoping for a bit more integratedness than that, after all we know that SQL server has boogly magic
 
@TomW New band name: One Level of Indirection
 
@Sippy Totally not inspired by any existing names
 
I know there's something called SQLCLR
> SQL CLR or SQLCLR (SQL Common Language Runtime) is technology for hosting of the Microsoft .NET common language runtime engine within SQL Server. The SQLCLR allows managed code to be hosted by, and run in, the Microsoft SQL Server environment.
Code in a database.
Yo dawg...
 
3:38 PM
@KendallFrey Nope not even slightly.
Totally original name.
 
I'll make a band called LMFTO
Laughing My Fallopian Tubes Off
 
I think that's basically what I wanted
I may have changed my mind
 
@KendallFrey Sexist
Men can't do that
@steve
 
@Sippy When was the last time you saw a man laugh his ass off?
 
@KendallFrey Why, just yesterday I saw a man become detached from his buttocks!
 
3:49 PM
So why do you guys hate firebug?
 
@SpencerRuport Why do you hate America?
 
Because Firefox has good dev tools now
 
And in comparison to those dev tools, FireBug is MEHHHHH.
 
@Sippy - I don't. I just feel like I'm still living in my parents house at 30 years old. None of the laws reflect the wishes of my peers. The baby boomers still control everything politically. ;)
 
@SpencerRuport I don't remember what movie this was from let alone other lines from the movie.
 
3:51 PM
haha
 
> As component software continues to grow as a market, there will be more and more instances where a user obtains a new software component as a single DLL or EXE module, such as when downloading a new component from an on-line service or receiving one from a friend on a floppy disk
 
@NETscape "on-line"
 

« first day (1552 days earlier)      last day (3411 days later) »