« first day (1280 days earlier)      last day (3674 days later) » 

4:00 PM
@SpencerRuport That's something that will have to be regularly updated.
 
@abhi - Yep. I implemented it in such a way that we're tied to as few named members as possible for compilation so unit tests not compiling should be rare.
As far as updating the tests I have a plan for that as well which I think will help us since we have so many developers working on different things
We'll be able to identify which features broke which tests and get a picture of the coverage.
 
@SpencerRuport how did you solve it?
 
@SpencerRuport I am happy for your team.
 
@JohanLarsson - A lot of t4 templates and partial classes.
 
4:04 PM
It's a bit of an usual solution but the design is a bit unusual.
They have their own (very limited) ORM. I'm not sure who designed it but they made good decisions as far as not being overly ambitious so it's holding up really well. They did a good job of separating it too so I don't think converting to EF or nH would be terribly difficult to do should the need ever arise.
 
refactoring to IoC was too much pain?
 
Well... I think I did to some degree? I'm really bad with terminology.
I switched a lot of the member definitions to use interfaces so there's some IoC going on.
@JohanLarsson - What's your email? I wrote a company wiki article on what I did.
 
@SpencerRuport Ping when you have it, deleting ^
 
@JohanLarsson preparing my spam bot now...
=P
 
4:14 PM
<3
 
@JohanLarsson - got it
 
Hello Gentlemengs
 
@abhi you scarred me... your pic looks just like my boss ;)
 
@JohanLarsson - Sent.
 
I'm no expert btw, far from it :)
 
4:17 PM
I know but I'm pretty new at this so I appreciate the input.
 
Guys I just got a new job doing vb.net :\
Starting next week
 
D:
Write a VB.Net language parser for C#.
 
> Unit tests are an effective tool for verifying the behavior of the code base.
If you want to sell testing I think they are great for documenting code also
 
Not gonna write any secret stuff here
 
4:19 PM
lol thanks :)
 
@SpencerRuport You're overestimating my programming skills
 
I believe in you!
 
:*)
 
@EvanL Where are you located?
@BrianRizo Congrtulations. maybe you can persuade them to use c#
 
@abhi Thank you! Yes thats the plan. The other programmer working on the team also likes c# so thats good news.
 
4:25 PM
@SpencerRuport Have you used Ninject or Structuremap or some other IoC framework?
 
Unity:P
 
Nope. From what I understand those first require that you have interfaces available to use correct?
 
0
Q: Sql Query Issue in joining tables

agarg92I am using two tables tblMeet(roomid,meetid,timein,timeout,roomname,user,date) and tblMeetRoom(roomid,roomname,pc,phone,projector,capacity,location) where the roomid,roomname is foreign key in tblMeet. What I need is this: Select all such roomids from tblMeet where date=sysdate and time in and ...

 
@JohanLarsson - brb.
 
I hate questions where the database is not mentioned.
 
4:27 PM
Never seen that except keyword
 
:D
 
"EXCEPT returns any distinct values from the left query that are not also found on the right query." Cool
 
@BrianRizo The EXCEPT wants me to think it is SQL Server, while the sysdate makes me think that it is Oracle.
perhaps oracle also has an EXCEPT keyword,
!!google EXCEPT keyword ORACLE DOCS
 
@JohanLarsson - back!
 
4:37 PM
So, EXCEPT in SQL server would = Minus in Oracle?
 
how do i tell git to use beyond compare, i added this stuff to the global config, and still no luck:
48
Q: Git Diff with Beyond Compare

AvanstI have succeeded in getting git to start Beyond Compare 3 as a diff tool however, when I do a diff, the file I am comparing against is not being loaded. Only the latest version of the file is loaded and nothing else, so there is nothing in the right pane of Beyond Compare. I am running git 1.6....

when i do git difftool it says "the diff tool bc3 is not available as 'bcompare'"
 
@SpencerRuport gf stole the computer, had to switch to laptop,starting over now
 
Anyone know how to handle WCF faults/exceptions for non soap clients, like javascript ajax type clients
 
@Tommo1977 i guess you've read this
 
@SpencerRuport have you tried Moq?
 
4:51 PM
@abhi I'm already raising WCF WebFaultException which can be read by the SOAP client, but I need my 3rd party clients that make http web requests to the service to be able to get a Xml or Json response back of the error
any ideas...
 
okay, so no answer, np, when I add git config --global diff.tool.cmd (...), those aren't showing up in my global config, however, through gitbash i can view those values. I've also checked my local config and those values aren't in there
any idea on where I should look next?
 
@JohanLarsson - No not yet. My first step was to get the project in a state where it could use those frameworks.
 
ok writing a small dumb sample for you
 
aight
 
after dinner
 
4:59 PM
No rush. :)
Overall what do you think though?
 
looks ok, really nice documentation
 
Thanks. :)
 
@drch I use rebase :(
 
rebase confuses the shit out of me
 
its simple
merge takes all the code and mashes it together in one big commit
rebase rewinds the index to the most recent common ancestor and applies commits one by one
 
5:09 PM
Suck it jQuery, you've been owned bitch!
How is everyone?
 
good!
 
@Steve Fuck yeah? America- Fuck yeah?
 
America! Fuck yeah!
 
BAND AIDS
 
BOOKS
 
5:16 PM
BANANAS @drch
 
@Steve I don't think bananas were part of the song
 
oh, i was under the impression we were just yelling out random words that start with B
 
@Steve No, it's objects from "America - Fuck Yeah" from the movie "Team America World Police"
 
i haven't watched that movie since it came out
don't remember anything from it
 
5:19 PM
other than something about everybody having aids
 
I never saw that, I know the song. And i'm not sure if i'm proud of that.
 
here's a new one
my lead rewrote a bunch of unit test scripts to be stored procedures that ADD and DROP at the beginning and end respectively... because he wants to have the intellisense within the SQL script file. Instead of just having a clean SQL script
so it went from this.ExecuteNonQuery(@"MyScriptFile.sql") to a 50 line method... not to mention it broke several of my unit tests
this is what I get to deal with every day...
 
At least you don't have to deal with a message queue written in WCF
The thing is leaking memory like crazy and we're all stumped as to why
 
At least you don't have to deal with customers
 
WCF is evil.
 
5:25 PM
@abhi Denver CO, USA.
 
this happens every goddamn time. I write something simple that works and when my lead looks at it, he rewrites the entire thing to be way more complicated than it needs to be for questionable reasons
seriously, when the reason for wasting hours of my time is "I wanted Intellisense in the SQL file", I have to question it
I'm just trying to do my job and I have to fight against my own lead just to get a unit test working
 
Microsoft logic: If you make an account for someone for the first time, it is required that that person has a valid e-mail address, or a valid phone number capable of receiving text messages. Haven't they ever noticed that A) not everyone has a dozen e-mail addresses and B) not everyone has a mobile phone? Serious design flaws there.
 
@Pheonixblade9 That is a stupid reason to overcomplicate things...
 
googling anything for git makes me want to hurt people
 
Visual Studio 2012 intellisense crashes all the time. I'm becoming skilled at working without it because I don't want to close out VS and load everything up again.
 
5:28 PM
@RoelvanUden you only need 1 e-mail address..
 
google: "login information local config git", results: "hey, here is this introduction to git, but its going to be shitty and not explain about what you're googling"
 
mine has never crash spencer
 
Lucky you.
I notice it usually happens when the intellisense is open and I switch to another file quickly to check something and then come back.
No more intellisense.
Almost like it's telling me "Fine! You don't want my help do it yourself!"
 
I hate writing SQL functions, because you don't have intellisense.
 
write em in SSMS, no problem
 
5:32 PM
@TomW Yep, or SQL Everywhere has great intellisense as well.
 
@TomW SMSS (2008 r1) does not have intellisense for functions, only stored procedures and views (and everything else)
 
ah, functions
missed that
 
@gunr2171 why are you using SSMS 2008? 2013 is out already...
 
@Pheonixblade9 I thought it was 2012, and my job is cheap. hell, we have R1, not R2
 
...cheap? you don't have an SLA?
when will companies realize that ***engineers are the expensive part of engineering***

Not buying an engineer the right tools is like asking a carpenter to build a cabinet with a screwdriver and a nail
7
 
@Pheonixblade9 I very agree with this statement, which is why I know it's one of the Joel test items.
 
let's see, we cover... 1, 2, 3, 4, 5 (lol), 6, 10, 11
I do hallway usability testing, but noone else does.
 
@JohanLarsson - How do I run these tests? They don't show up in the VS test explorer.
 
9 is iffy mostly because I have a 4 year old PC and they've turned down my request for an SSD multiple times
 
I just left that job (a month ago). We covered 1, 2, 4, 10, and 11. That's it
 
5:51 PM
@SpencerRuport oh, it is nunit, switch [Test] to [TestMethod] or what mstest uses
 
oh ok
 
add some classes in domain and make the graph more complicated and see how sweet it is when the IoC container resolves it
if you don't add interfeces you don't even need the Bind<> bs
 
happy friday everyone
 
@JohanLarsson - "IoC Container"?
 
Ninject in this case, not sure I use the correct word
did you get them to run?
 
5:57 PM
Yes. :)
I guess I'm having trouble figuring out what Ninject is doing
I mean I understand the code I just don't really understand what's being demonstrated.
OHHH wait
 
the example is pretty dumb when the graph is so small
 
lightbulb.
 
put breakpoints in the ctors and debug it
 
So the advantage here is that you didn't have to tell the Logic class how to get an IAPI instance because you've already bound it.
NInject automatically does that for you.
 
6:00 PM
Nice
 
and if you need something you just add it to the ctor of any class and ninject injects it
try adding a Logger to the Api class ctor for example
 
Neato. Thanks :D
So, with regard to Moq... I did read about it before I created the template that generates my DALC (Repository?) Mocks.
One thing I read mentioned how if you refactor you're going to run into build errors on these unit tests
Since you're calling out GetNumber by name.
 
moq is just a way to not have to write MockApi etc
 
Gotcha.
Do you see any disadvantages to the SetMember approach I'm using?
I liked it because there's less chance of a build error.
 
reading it again
 
6:03 PM
I'd rather it just fail when the tests run.
@JohanLarsson - It's at the very bottom.
 
I'm not sure I like the string
Is is SetMember<T>("MemberName", T value)?
 
So you would prefer to see build errors? Not disagreeing with you. Just curious what your experience has been.
 
sec, coding up a thing
 
    public class MockBase
    {
        private Dictionary<string, object> members = new Dictionary<string, object>();

        public void SetMember(string key, object obj)
        {
            members[key] = obj;
        }
        protected T GetMember<T>(string key)
        {
            if (!members.ContainsKey(key))
            {
                throw new NotImplementedException("Mocked member not found: IAPI." + key);
            }
            return (T)members[key];
        }

    }
 
is member a property or method?
 
6:09 PM
I didn't really make a distinction.
The mocks generate a bunch of methods like this:
public EECP.BusinessEntities.Enrollment GetById(int Id)
{
    return GetMember<Func<int, EECP.BusinessEntities.Enrollment>>("GetById")(Id);
}
So the test calls EnrollmentLogic.GetEnrollmentById(Id) which calls _dalc.GetById(Id)
 
omg does nobody know git
 
@Steve I don't :)
 
@Steve Why don't you use a nice gui tool?
all that command line nonsense makes me want to hurt people too
 
yeah git extensions is nice, the vs plugin is sweet
 
@JohanLarsson - If you look at the section #inversion_of_control you can see the source code for the GetEnrollmentById method in the EnrollmentLogic class.
 
6:12 PM
@Steve vs2013 integration is great, github for windows is awesome
 
You can see it calls _dalc.GetById(Id)
 
user1804599
@RoelvanUden eww Git GUIs.
 
@Steve did you try the answer given by buffer?
 
Which in the mocked version returns GetMember<Func<int, EECP.BusinessEntities.Enrollment>>("GetById")(Id);
 
eh
i have a credential store setup, for my company github account
i have a private github account, i'd like to specify which account to push it to via the local config,
in other words, i want my local config to overwrite the credentials from the store
 
6:14 PM
and did you read the comments to that answer?
 
@JohanLarsson - If I knew how to use Git I'd add an example to your project.
 
fucking slut doesn't do anything, it just keeps trying my work account
 
@SpencerRuport the setmember looks very muck like mock.Setup(x=> x.GetEnrollmentById(...).Returns(...) )
 
I really need to learn it.
 
@NETscape yes
 
6:15 PM
@JohanLarsson - Yes that's correct.
 
@SpencerRuport make a gist/pastebin, I'll add a Setup that is more like what I think you want
 
I just prefer the string because then, if for some reason the method GetById changes or no longer exists due to a refactor we'll get a failed test rather than a build error.
 
@RoelvanUden i would, but everybody at work uses command line, and i'm not going to be THAT asshole who just has to be different :p
 
@JohanLarsson - Does that make sense? Or is that something you don't often run into?
 
@SpencerRuport pushed updates
Returning what was passed in starts to feel like overmocking
 
6:25 PM
FINALLY
after hours and hours it works
 
what does?
 
@Steve what did you just make work?
 
two github accounts on git bash
 
@JohanLarsson - I think I'm not being clear haha.
 
@Steve Oh, who cares? Use what makes you more productive. If we were all those kind of boring command-line loving people, computers would've never evolved beyond basic DOS.
 
6:27 PM
@SpencerRuport the Setup(x=> x.Something) should be very refactor friendly btw
 
@JohanLarsson - But if they don't change the test it will fail to build correct?
 
we are a very collaborative team, we work together on almost everything, it would kill productivity for anybody who worked with me
 
@SpencerRuport how do you mean?
if they rename stuff using ctrl + r +r or the vs equivalent it should update
 
plus i'm competitive, if my teammates know git from command line, you're damned right i'm going to
 
If I change the name of a repository method I have to change it in the unit test as well before I build the project correct?
 
6:29 PM
@SpencerRuport try it in the sample?
 
now to figure out this rebasing son of a bitch
 
@SpencerRuport yes but that should be automatic if you use rename
try it
 
Oh yes I'm aware
 
My concern is that I'm not sure I want everybody to be changing unit tests so freely.
 
6:30 PM
but they can change the strings no?
 
They can but they don't have to. It will still build.
And they can run the tests and then I can see that something in their changes has caused a unit test to fail.
 
the tests should update with the code if you rename stuff I don't see and issue with that
getting failed tests because of that feels like noise
 
Anyone familiar with git please help stackoverflow.com/questions/23159417/…
 
@JohanLarsson - But wouldn't it be useful to see the range of all the unit tests affected by the change?
So then someone who has a better understanding of the system can look at the failed tests and go "Okay this test no longer makes sense. /delete"
Meanwhile the developer, who may not have as firm an understanding of the unit test creates a copy of that test in a way that they think it should be updated.
Both can be compared and one thrown away.
 
perhaps requires info about the purposes of the test etc.
you go with what you like best
did you notice the logger in the update?
 
6:36 PM
Sorry. I feel like you think I'm disagreeing with you. :( I'm just trying to walk through an idea I have.
 
np man :D
I just don't get it, what problem it solves etc.
but with your knowledge about the system you can make the best decision
especially now when you know moq and can compare
that is about 80% of what I use moq for btw
 
yes. I really do appreciate it. I didn't understand ninject before now so that helped a lot. And it's good that I have a moq example.
 
and close to 100% of the api of ninject I use
structuremap is almost identical to ninject btw
and castle and the others are also very similar
VS can run nUnit btw, think an extension is needed pre 2013. Think 2013 runs 'em out-of-the-box
 
StructureMap is pretty good
tbh it's one of those frameworks where the specific bits you download shouldn't matter too much, if they're good they all use basically the same idiom and then should get out of your way
 
I couldnt spot a difference so I picked ninject at random
 
6:48 PM
for sure.
@JohanLarsson - I've just noticed in our project we have a lot of developers (including myself) who don't really understand all the functionality in the system so I'm reluctant to just have people go adjusting unit tests because then they could adjust it incorrectly and now we have a passing test that shouldn't pass.
That's the problem I'm trying to avoid.
 
chaps, anyone want to code review a fun pattern I learned in training a few weeks ago?
 
But we just started so I'm not sure if my approach will work.
 
@TomW Sure.
 
It takes a while to grok, but once you get it I promise it's sublime
 
6:50 PM
@SpencerRuport you have version control right?
 
and don't pay too much attention to my crude example; look at the infrastructure if you can
 
@TomW Okay, what pattern is it?
 
@JohanLarsson - Yes.
 
it was called the Actor Model, I'm not sure I can find a great deal of specific stuff that corroborates that
everything I can find relating to that phrase is quite abstract CS stuff
 
What is the point of it, create a implementation that mirrors other concrete implementations?
 
6:52 PM
@SpencerRuport what if you agree that changes to sensitive stuff must be reviewed by two people before being checked in?
drch knows more about this kind of stuff
 
@JohanLarsson - It will be overlooked the next time we're on a tight deadline. ;)
 
for values of more that are orders of magnitude bigger :)
 
@Greg not sure I understand what you're suggesting there. The way I understand what I've done in that repo is that it decouples your domain objects from the communications they send to one another
and as you can see in the readme, I credit the guy who demoed it, basically line by line, it's not my idea
@Greg looking at it another way, it's a reinterpretation of what events in C# are about, in a way that makes them more useful and semantic
trying to build an architecture around raising and handling events is a ball-ache because C# events aren't particularly extensible
 
Well, an example would be. Implementation (A) contains the context, but Implementation (B) contains the functionality. Then Implementation (C) would call (B) to get the context and the functionality.
I haven't looked at code yet. Just based on the name, I almost feel like it mirror the concrete implementation though it doesn't. Essentially the context may be stored in one class, where the second class calls the context and functionality, but a separate class can call those individual classes.
 
I don't think I can relate that to this code
tell me whether you think it applies when you've had a good look
 
7:00 PM
Okay.
 
and don't criticise too much, I'm using this to learn it myself :)
 
@TomW You understand what I'm saying.
 
I don't think so. I can't relate those notions to some kind of architecture you might see in code. Do you have an example?
 
Well I was wrong about the WCF memory leak.
 
@TomW Um, no. Maybe when I have time I'll try and build it, maybe I have a form of architecture in my brain that doesn't exist yet.
 
7:06 PM
The thread pool was being overloaded by requests and the queue was growly too quickly. What threw me for a loop was the fact that it didn't gracefully shrink (after removing the load) like I was expected. The queue would not GC until all the items were processed.
 
7:58 PM
Is it poor practice to fix particular elements to a page?
Like a header, nav, main, and footer.
 

« first day (1280 days earlier)      last day (3674 days later) »