« first day (1913 days earlier)      last day (3018 days later) » 

9:01 PM
ugh, still don't know what's wrong with my sql connection thing
the database clearly exists
 
and you can't do a low level ado connection to it?
 
SqlConnection fails
 
what about over a program to test, navicat command line?
 
@Michael sorry, afk for a bit there. I'm not sure I understand - if the user is ending a contact object in this form, where does the original data come from?
 
@juanvan what?
 
9:04 PM
And I'm not sure about EntityState.Modified. Sounds like it should work but I've never used it before so I can't be sure.
 
You can create the DB but not connect to it after
 
yeah
 
@KendallFrey and just to make sure, you can access the database in SSMS (or something along those lines)?
Oh, wait. I think I misunderstood.
The database doesn't exist yet
 
Ya he made it, might not have select privileges
 
yes, I can access it in SSMS
 
9:06 PM
ok now am stumped
 
@mark np glad we got it sorted out
 
It also works fine if the database exists prior to running my program
the program, btw, deletes the db, recreates it, and then tries to connect to it
 
Hehe :) @mikeTheLiar only focus and take a close of eyes then boom, one blink I got my eyes. I see the error. haha
 
And that fails? Only if it's run in that order? Hmm.
 
if it doesn't exist, the delete ignores it, but after it creates the db, it doesn't connect
 
9:08 PM
can the program ever connect to a DB that the program made
meaning, create the DB, code will fail, comment out the create and see if it fails again
 
2 mins ago, by Kendall Frey
It also works fine if the database exists prior to running my program
yeah
 
and the program made that db not you
 
@KendallFrey could you try just querying the system metadate after creating the database?
 
and it's odd because it deletes the DB prior to creating it again
@mikeTheLiar you mean via a connection to master?
 
9:09 PM
select * from dbo.sysdatabases
where name like '%newdatabase%'
@KendallFrey exactly
Just for diagnostic purposes
 
maybe flush the grant table on it?
 
Actually, what's the error you're getting when you try to connect?
 
8 mins ago, by Kendall Frey
SqlConnection fails
 
How does it fail though? Login fails, database does not exist, invalid object name, could not connect, database is full of centipedes?
 
9:14 PM
conn.open I think from before
 
@mikeTheLiar login failed
 
@Amy You here?
 
user47589
yeah
 
anyone have an idea for how to change every textbox on a winform into a label displaying the text that was in the textbox?
 
I'm shop is trying to determine the ideal approach, they currently have MVC with jQuery everywhere.
 
9:17 PM
@Michael that way lies madness
 
I said, we should migrate to WebApi and Angular or WebApi and Ember, rather than use so much jQuery. It would make the application cleaner, module, and easier in a front end stand point.
 
@Michael That just sounds ugly
 
What would you say the pro's and con's? Why would I rather Ember over Angular for instance in a .NET environment?
 
@KendallFrey that's weird. And not to go in circles but it works if you create the database beforehand? With no other commands (i.e., create login or some such)
 
yeah
 
9:19 PM
@mikeTheLiar I already know :/
 
and it deletes the database before doing anything else, so...
 
Just hoping somone had a miracle
 
maybe it is full of centipedes
 
user47589
@Greg, i hate Angular. I hate it.
 
user47589
Ember is okay. Knockout is good.
 
9:20 PM
So I checked sys.databases, the database exists there before the connection is tried
 
@KendallFrey possibly relevant? stackoverflow.com/q/9297098/1015495
 
who can access the table after it's created?
 
@Amy Okay, what is the primary difference between all three?
 
@mikeTheLiar ohhhh that must be it
 
Or are they all the same?
 
user47589
9:21 PM
there are plenty of articles answering that.
 
    @mikeTheLiar oh and about the enity framework update. here is how the data access class looks,    should the using(context) surround all of the data access methods maybe?

        public static class ContactDataAccess
        {
            public static int InsertContact(Contact c)
            {
                Database.SetInitializer(new NullDatabaseInitializer<LitTrackContext>());

                using(LitTrackContext context = new LitTrackContext())
                {
                    context.Contacts.Add(c);
 
@Amy I thought I understood the difference, but what makes one better than another?
 
user47589
google "angular vs ember" or "angular vs knockout" etc.
 
@Michael not sure but the return context.Contacts.ToList(); looks odd to me. I'd change the return type to IEnumberable and just return context.Contacts
 
user47589
@Michael, why are you setting a database initializer inside a repository method???
 
9:25 PM
@Amy lol whoops
 
user47589
the initializer should be set once at the beginning of the application.
 
yeah, i had it copy and pasted
@mikeTheLiar I may do that, but for now all it needs to be is a list.
@mikeTheLiar but for getting the update to work, should I have the using(context){} surround all the methods?
the context.Entry(c).State = EntityState.Modified; actually works fine though... as far as i know. I just stuck it in there and it made it work.
 
anyone know why you can't compare a csproj file from the solution with the version in source control? you can compare cs and cshtml files just fine
 
No, you should have an class-level reference to the context
 
@mikeTheLiar so then its good as is?
 
9:28 PM
@Bardicer you should be able to do that, what are you using for Version control? Unless you csproj is just too big to diff or something
 
TFS
 
TFS sucks
 
right click doesn't give me the compare option on the project
 
@Bardicer That's why
 
i agree
i'd rather have SVN
but i'm stuck with TFS
...it's TFS not allowing that?
 
9:29 PM
@Michael if you move the dbcontext to be class-level and instead of action-level you're on the right track
 
Try in the Pending Changes window
 
And that should allow for your entities to know when they've been updated
 
+1 @KendallFrey it can be done in pending changes
-1000 M$ for being stupidly stubborn
 
@mikeTheLiar Wait... i thought u just said I should have the context at class level?

"No, you should have an class-level reference to the context"
 
TFS is Total Fucking Shit
 
9:31 PM
ohh
should**
 
yeah
 
lol sorry eyes seemed to be failing me
 
i'm not sure why it's so popular
 
Right. So in all those methods get rid of the usings
 
@mikeTheLiar So I made a loop that repeatedly queries the sys.databases until collation_name is set on the new db. Problem is, it never seems to be getting set, and it's stuck in the loop.
 
9:32 PM
And just have a private LitTrackContext context; as a property
@KendallFrey hmm. Might be worth hopping into chat.stackexchange.com/rooms/179/the-heap-consultancy-
'Cause I'm reaching the end of my DBA knowledge
 
I know DBA things, ask me
 
@Codeman 1. Create database via master connection. 2. Attempt to open connection to new db, it fails. (System.Data.SqlClient)
 
@KendallFrey obviously there's more details :) what have you tried?
 
1.5. Try looping until collation_name is set, as per above link. Now it never finishes
 
are you inside of a transaction?
 
9:36 PM
not explicitly
only if it uses one by default, but I wouldn't expect that would cause my problem
('it' meaning SqlConnection)
 
wait... i cant put a using outside of a method at class level?
 
I am reusing connections quite a bit though
@Michael try at the namespace level
 
user47589
i wish angular would throw errors, or at least log the errors. instead it silently swallows them into a blackhole darker and more sinister than /dev/null
 
@KendallFrey that doesnt work either Error: invalid token 'using' in class, struct, or interface member declaration
 
what?
 
9:41 PM
@Michael I'm assuming LitTrackContext : DbContext?
 
I said namespace level
 
user47589
then you aren't using using at the namespace level
 
namespace level doesnt work at all
that error is at class level
 
it does, I've used it lots
 
@mikeTheLiar yes
 
user47589
9:42 PM
uh, show us your code
 
@KendallFrey I'm pretty sure collation_name will not allow changes within the same connection
you need to drop and re-establish your connection
(I'm not sure this is true, but worth testing)
 
my master connection?
 
user47589
i'm guessing you are confusing the namespace level with class level
 
yes
 
I'm already working on trying that
 
9:44 PM
:)
 
im gona show you
just a sec
 
woo, aggressive
lol
 
@Michael is there a reason your class is static?
 
i put it in both levels there
@mikeTheLiar so no need to new up all the time
 
lol. That's not a great reason.
 
9:47 PM
@mikeTheLiar idk, thats how my supervisor had it, im just following his set up. lol
 
@Michael That kind of using only makes sense inside a method
 
So here's what I'd do - drop the static and pass in a reference to the context when you instantiate the class.
 
What did you really expect it to do if you put it outside a method?
 
So the ctor would look like ContactDateAccess(LitTrackContext context)
 
@KendallFrey what kind of using were you talking about?
 
9:48 PM
Assign that context to a private property and use that
@Michael I think he meant namespace aliases
 
@mikeTheLiar yeah, that is doable
 
Then when you instantiate the class do something like this:
using(var context = new LitTrackContext())
{
       var doa = new ContractDataAccess(context);
       // do whatever data stuff here
}
 
@Codeman Creating a new connection every iteration of the polling loop, still hanging
dunno if pooling or just stuff, but it no workee
 
@Michael does that make sense?
 
@KendallFrey shit on the floor
get shwifty
 
9:51 PM
Nobody would notice if I shat on the floor
 
@mikeTheLiar yeah, but then i cant explicitly insert when I want to insert or delete when i want to delete
 
@KendallFrey how are you changing collation? usually you have to drop and recreate for that
 
@mikeTheLiar I mean i could, if i added properties to the dataAccess class that say when to create, read, update or delete, but then its not as clean as the static methods
 
I'm not doing anything with it
Just waiting for it to change on its own
 
9:53 PM
hmm
why would it change?
 
33 mins ago, by mikeTheLiar
@KendallFrey possibly relevant? http://stackoverflow.com/q/9297098/1015495
I'm dropping and recreating the DB
 
does it ever return a non-null value?
 
apparently not
not in the loop anyway
 
@Michael I'm not sure I understand but I'm also far from an expert in EF. From what @Amy was saying earlier I think she knows quite a bit more than I do, she might be able to help
 
I would use state, not collation_name...
0 = ONLINE
1 = RESTORING
2 = RECOVERING
SQL Server 2008 through SQL Server 2016
3 = RECOVERY_PENDING
SQL Server 2008 through SQL Server 2016
4 = SUSPECT
5 = EMERGENCY
SQL Server 2008 through SQL Server 2016
6 = OFFLINE
SQL Server 2008 through SQL Server 2016
7 = COPYING
Azure SQL Database
10 = OFFLINE_SECONDARY
Azure SQL Database
 
user47589
9:55 PM
there's nothing 'cleaner' about static methods.
 
testing
 
user47589
using static methods unnecessarily can be an anti-pattern.
 
@Amy Plenty of well-respected individuals would disagree with you
 
@Amy I disagree - I make something static whenever possible..
 
user47589
static methods can't be mocked.
 
9:56 PM
only problem is it makes it harder to mock, but my counter-argument is that you shouldn't be mocking static methods - you should be injecting mocked versions of the dependencies
 
@Amy it seems clean to me, I can at any point inside the contact class ContactDataAccess.InsertContact(this)
 
You know, I may have fucked that loop up
 
@KendallFrey I dunno if I'm well respected
 
I think my condition was backwards
 
user47589
you're free to do it that way, but you won't be able to unit test those methods.
 
9:57 PM
that pretty much sums up my day
 
user47589
not easily
 
@Codeman I respect you
 
@KendallFrey YOUR FIRST MISTAKE
did the change to the loop work?
 
patience
 
Before you're respected, can you just be spected?
 
9:58 PM
@Amy we dont do unit testing here, to small of team / projects
 
@mikeTheLiar I was tired yesterday and I'm tired today. Does that mean I'm retired?
 
@Amy but that makes sense
 
@Amy if you're doing FP properly (static methods), you should be injecting your dependencies anyways
 
user47589
sorry, FP?
 
@Codeman nope, back to square one with failing connection
Will resume tomorrow
 
user47589
9:59 PM
functional programming?
 
yep
static methods are very functional
 
@Amy I mean do you have a super simple example of how you handle data access with EF?
 
statelessness et al.
 
I am a big fan of stateless code. Much easier to test
 
user47589
i inject my dbcontext into services that use it.
 
10:00 PM
I write imperative code like it's functional nowadays
 
So if you had a form, your dbcontext is in the UI code behind?
 
@Michael ideally your DbContext would be in a service the CodeBehind accesses.
 
@Codeman thats basically how I have it right? CodeBehind accesses DataAccess Class which has the dbcontext
@mikeTheLiar im reallyyyyy tired of winforms actually.. I hit a brick wall with UI design almost instantaneous for larger proejcts
 
@Michael fucking tell me about it. I have the dubious distinction of being "The Winforms Guy" for the parts of our application that we haven't redone in WPF yet
 
user47589
10:05 PM
winforms is a dated technology.
 
user47589
so dated
 
Which is large chunks of it, unfortunately
 
user47589
its too bad you can't mix winforms and wpf in the same project, like you can webforms and mvc.
 
@mikeTheLiar we are still building entire applications from the ground up in winforms lol kills me
 
@Amy Not as dated as your mom
 
user47589
10:06 PM
that's okay.
 
is WPF the latest and greatest? or is there some new microsoft alternative to even that?
 
@KendallFrey I'd date your mom
 
I prefer HTML over WPF nowadays
 
user47589
i'm not that familiar with universal windows apps. do they use wpf?
 
@KendallFrey but if you are doing a desktop app?
 
10:07 PM
mainly because I do a lot of quick-n-dirty
 
Yeah, that's the way the wind is blowing. Desktop apps are dead
 
@mikeTheLiar not quite in the enterprise environment
 
@Michael I don't do them much anymore I guess
 
user47589
desktop apps are dead in the consumer market. B2B, desktop apps will always be around.
 
@Amy IIRC it's a flavour of WPF
 
user47589
10:07 PM
i see.
 
@Amy I wouldn't say always
 
user47589
I always say always.
 
We're hopefully going to be gutting our application and migrating to microservices this year
 
I expect to see cloud/SaaS/thin client type of stuff becoming standard
 
@Michael let me know if you run into/solve this problem: stackoverflow.com/q/28632574/1015495
 
10:09 PM
@mikeTheLiar
you are probably using some sort of tablelayoutpanel
it redraws locally for each time you open the project
 
user47589
huh. in WEB API routes attributes, I have Route("{id:long}/snapshots"). but its complaining about the long filter. is that not correct?
 
each time you open the form, rather. In designer view
 
user47589
ooh, its a typo. nevermind.
 
Hmm. I'd have to double check but I'm pretty sure we are
 
Yeah, so per user, whomever opens it, it redraws.. and edits the designer.
 
user47589
10:18 PM
i remember that being a big problem with the C++ form designer and SVN. Just opening the form in the designer would completely change the generated code, and IIRC it was in binary.
 
user47589
we trounced on each others changes all the time, because the whole damn file was conflicted.
 
user47589
coding has come a long way.
 
Our biggest problem there is SSIS. Each SSIS package is basically a giant glob of XML behind the scenes so it's impossible to diff/merge changes
 
@mikeTheLiar that's a problem everywhere that uses it, FYI :(
 
Yeah, I know.
 
user47589
10:21 PM
yeah
 
SSIS is great when it works.
 
@Amy what kind of C++ was that? Borland?
 
When it doesn't work it's a gigantic steaming pile
 
anyone have a new appletv v4?
 
user47589
no, it was MSVC++. we only used the form designer, all the code was plain C or a derivative language of C called "DYNACE", which was created by one of our owners
 
10:23 PM
eww
 
@Amy that's weird. I don't remember any binary forms in MSVC. There were dialog resources, but they were in plain text. So, that was something custom I suppose
 
finally adding bluetooth keyboard support, because their text entry system is truly awful
 
user47589
for anyone who cares, this is Dynace: github.com/blakemcbride/Dynace
 
is it better then D?
 
user47589
no
 
10:25 PM
lol, ok
do they use a custom GC? or the usual Boehm?
 
user47589
basically, our owner said to himself one day "i want to make my own language!" and so he did. and then one day he said to himself, "i should start a company with my language!" and so he did. but the day never came when his language became popular, or even known.
 
user47589
and everyone lived happily ever after. the end.
 
well, that is a sad but quite general story
 
user47589
i couldn't tell you.
 
lol, awkward training videos
 
10:27 PM
He's in good company, Spolsky did the same thing
 
user47589
i didn't know spolsky made his own language
 
Disney has its own language. They also don't use source control, lol
 
wtf
 
user47589
wtf indeed
 
user47589
i liked reading "Joel on Software" 10 years ago.
 
cya guys :) thanks for all the help as always
 
hi
@Greg ah, that sounds.... fun.....
 
Finally closed a bug. I feel like it's been weeks since that happened. I mean, it hasn't but it feels that way.
 
im eating a chicken
 
10:40 PM
I'm told my voice sounds like Joel.
</random>
 
who's joel?
is that the subway guy?
 
Only the same Joel mentioned 10 minutes ago
 
too lazy to scroll up
 
Stop mentioning Joel. I have a colleague named Joel and I hate him.
 
go get yourself some subway and
@torvin how do you know they're not the same joel?
 
10:43 PM
That was a little too far, even for me
 
@SteveG If you need to scroll up to see 10 lines above, you need a new monitor
 
you're getting me a new monitor?
sawwweeeeet
 
Did I say anything at all like that?
Hint: No.
 
I'll get you a new monitor but spoilers: it's going to be a lizard
 
i like turtles
 
10:45 PM
hello
 
Did I say anything at all like that?
 
mine turtle
 
Hint: No.
 
Hi
 
hi
megatron!
 
10:45 PM
@SteveG did you actually watch asdfmovie then?
 
heard he might retire
 
how are you
 
alright, how'r you?
 
fine, thx
where are you from?
 
@KendallFrey i did, but then i realized it was a crappy version of robot chicken, so i instead googled robot chicken
@MegaTron michigan, of course
 
10:46 PM
cool
 
bought 30$ worth of rice crispies treats, going to eat them all in one sitting.
 
@SteveG asdfmovie is not crappy, it's a classic
 
ah
it was funny
but, it wasn't anything compared to rc
 
I gave an interview on Friday, one more today and another tomorrow...
any tips for phone interviews? @ReedCopsey @TravisJ @RyanTernier ?
I was gonna just go with my previous in-person plan, but on codescreen or something similar
 
:)
 
10:57 PM
Alright ladies and gents, it's been fun but I'm outta here
 
bye
love u
 
:-* keep an eye out for your new lizard
 
oh i'm waiting
boom
im bored
:(
 
half the people in this training video are douchebags, lol
 
hey
 
11:04 PM
j0
 
how long does it usually take you guys to feel settled in at a new job?
 
6-12mo
 
lol
I don't feel so bad then
I started last week and it's nothing like what I thought my first development job would be like :/
 
@Codeman I tend to not do them, so not really
 
@ReedCopsey yeah? do you just avoid them, or delegate?
 
11:08 PM
@Codeman I tend to just do in person
 
it's an initial tech screen, I thought my pair programming question would work still
just using collabedit or something
 
my initial tech screen is typically "look at their github account"
and/or SO, or something else that I know they do
 
yeah
 
and, tbh, that's typically my entire tech screen ;) I tend to not do "tech interviews"
because, IME, they're a waste of time and don't really give you any insight into how productive somebody will actually be once you hire them
 
I tend to agree. You just need to check that the candidate is not a complete moron and then you just hire them and wait
 
11:16 PM
well, that's my plan
 
No trick questions :P
 
hello Guys ,
I can't start SQL Server Agent , it can't be started from services , any idea ?
 
11:32 PM
what account is it running under?
And errors in event log?
 
no error in event log
it says
sql server agent successfully started
and then
sql server agent successfully stopped
Account used is : LocalSystem
 
@SpencerRuport of course. What's a good one you'd ask? This is for senior SDE, so design questions would be cool
how's this look?
Does C# support multiple inheritance?
What are the good/bad things about it?
What are some alternatives?

What is a lambda/anonymous function?
What is it used for?

What is the difference between a graph and a tree?

What is the difference between accessing an array and a hash table?

Coding: Given two armies, who wins in a fight?  Introduce randomness
 

« first day (1913 days earlier)      last day (3018 days later) »