« first day (745 days earlier)      last day (4210 days later) » 

4:00 PM
Glad it worked.
 
thought you couldn't fail over, heard you were working on it.
 
that came in just in time :)
 
Ok.. let me elaborate on the real problem, may be you guys can give me a better solution:

I have two string[]. I want to know if both of them contain the same elements (possibly out of order)

right now I'm doing Array1.Intersect(Array2).SequenceEquals(Array2) (I'm not sure this is the best way to do this) -> this works fine except for the string case.
 
Wouldn't it have been a bummer if SO would have gone down within 12 hours of my . :P
@Maverik Do Except and check for empty.
 
4:01 PM
Will that solve the case issue?
 
wow this is so surreal:
 
@Maverik It will if you can specify an IEqualityComparer
Which you can.
 
@KendallFrey hehe, thats where I'm originally stuck. Can't figure how to offer it the string equality compare that takes a StringComparison argument
i guess i have to wrap it?
 
Pass StringComparer.CurrentCultureIgnoreCase
to Except.
 
Aha! thanks
 
4:08 PM
End of day here guys, ttyl
Hang on to your horses in NYC
 
@LeClerq you have a French name, amirite?
 
trying to work with Except, but can't seem to get equality of two sets sorted. it returns empty even if its a subset (which is logical). Should I be doing two Excepts?
Array1.Except(Array2).Any() && Array2.Except(Array1).Any() to confirm equality?
 
Ah, yeah, try that.
 
Yea that works, but I don't understand the "why" behind two Excepts over Intersect + SequenceEquals (plain learning curiosity reason).
 
This is how Facebook users rank presidential nominees. isidewith.com/results/26. LOL@Romney.
 
4:22 PM
0
Q: Logic for getting number of pages

tereškoIf a page can have 27 items printed on it and number of items can be any positive number then how can I find number of pages if I have number of items, I tried Modulus and division but didn't helped. FYI, I am using C# as programming platform.

 
this is probably better suited to Stack Overflow
also, you should describe your results: "I tried this and got that, but I expected that"
instead of "I tried this and it didn't work"
this makes it easier for people to tell what's going wrong
 
oh right, I edit it
 
4:37 PM
Okay, I have a web solution. I'm adding a new project to this solution. It's going to be used for various utilities. What's the best project type for this?
(can't google, too dumb to phrase that in a search query)
 
I know nothing about web projects, but if it was a non-web project that would be a "class library"
(a dll)
 
I'll give it a shot. Thanks Zneak.
 
gotta love it when something is hard coded and the client asks you to change it and you have to say "no"
 
@Billdr Web project or non-web project, it will be a class library
 
4:43 PM
@AntLaC Thanks for the confirmation.
 
NP :)
 
hey guys
 
noooooooooes i forgot to put the SimCity 3000 soundtrack to my ipod
hello Tom
 
I are the dumb. I can't get something as simple as batch file to work
 
4:51 PM
my earphone's cord is too short to get to my computer #firstworldproblems
 
Requirement is thus:
Find the first file with a certain name located anywhere under %TEMP%
Print the contents of that file to the console
that's it.
 
(btw the music is also freely available on Jerry Martin's website)
 
Create a batch file to call a C# program :)
 
@KendallFrey or as it's known these days, Powershell ;)
 
4:52 PM
lol 6 feet
what would I do without you Kyle
 
Any URL with "female extension" in it is not to be trusted.
 
if I don't get free shipping on it that's not really worth it though
 
@TomW Except you need batch files to run PS scripts.
 
4:53 PM
eBay probably has something from China that will cost $2 shipping included
 
you can buy those at best buy or radio shack (do those still exist?) too.
 
yeah for like 20 bucks
 
So, I did the isidewith thing, it actually got it right :)
 
true. such is the plight of brick-and-mortar
@AntLaC same with me
 
4:55 PM
Seriously, anybody halfway competent at cmd help me out? There must be a conceptual gap here because I can't find anything that will just tell me how to do it. Must be one of those things that's so obvious that nobody would ever need to be told
 
I identify as independant, but ISideWith told me I was Far-Left
 
1 cent
 
@zneak not bad
 
@TomW, I don't even know if there's a built-in program that will output a file
I'm pretty sure Powershell has it though
and if it doesn't you're free to call anything from the .net framework
so just use powershell and be done with it lol
 
4:56 PM
it told me I sided 94% with the person I voted for
 
It seems like the most basic job possible. And cmd can read the contents of files, but I can't work out how to get it to search for the file first
 
it's not the most basic job possible
 
sharepoitn designer
 
recursively searching for files is a pain in a batch file
as I learned yesterday evening
 
@#%%^ damn windows key doesn't work
 
4:58 PM
Thanks, Kyle, for sharing every detail of your work day.
 
wscript
:)
Actually, not quite, today.
 
@zneak this guy seems to be able to do anything using batch files robvanderwoude.com/batchfiles.php
 
i need quicksilver for windows
 
What's that?
 
5:01 PM
its for mac
its an app launcher
very handy
 
quicksilver is the best thing invented by man
after hot water and the wheel
on windows you can use launchy even though it's not quite as cool
 
Why would I return Boolean instead of bool?
 
they're the same
 
To make people swear.
 
5:03 PM
Or visa versa?
 
the exact, very same
 
bool is a C# keyword. Boolean is the struct which is actually instantiated in the CLR, IIRC.
 
if you put your mouse over the "bool" keyword you'll see "System.Boolean"
 
@zneak Nope, bool is shorter, and thus faster when working with source.
 
So personal preference
 
5:04 PM
yes, though convention dictates you should use bool in C#
 
I always have. Reading someone elses code, and he returns Boolean. I had to scratch my head at that.
 
I figure that the C# compiler would still recognise bool if you could somehow stop it from linking to anything - but Boolean lives in mscorlib, so it would be inaccessible
 
I like Boolean better...
looks prettier :)
 
bool is an alias for Boolean, just like int is an alias for Int32
 
huh. So my lead doesn't like using language level aliases?
TIL.
 
5:06 PM
@TomW Shouldn't, since bool is in mscorlib too.
 
your lead probably comes from the C/C++ world where the size of integer types is platform-dependant
 
does he have a java background?
 
no, but I do.
 
in java you have to use Boolean
 
boolean actually
Boolean is the wrapper class of boolean lol
 
5:06 PM
yeah yeah, stupid case sensitivity.
 
Hmm. I wonder if eclipse handles that for me... been a while since I've written java code.
 
@KendallFrey I guessed that bool was a keyword like for and therefore fundamentally different to specifying actual typenames. May have been off the mark there though
 
I kinda want Java to diaf. I love Android to bits - but that framework is buggier than Jeff Goldblum on a bee farm.
3
 
@TomW It is sorta, but maps to the same type.
 
@TomW, bool is a token that the compiler will recognize, but the compiler will die as soon as it needs metadata for System.Boolean
 
5:09 PM
Code puzzle of the day: When does int compile where Int32 doesn't?
 
<--stumped.
 
Sounds like a question for Jon Skeet
 
Or me... :)
 
You did not just compare yourself to Jon Skeet
3
 
Nope.
Not at all.
 
5:11 PM
Kendall is "Jon Skeet lite".
 
Kendall is "Jon Skeet for Dummies."
 
it doesn't compile when you use it as the base type of an enum
 
sorry I was away lol
 
Why would you know that?
 
5:12 PM
Why not?
 
@Billdr Because he is Kendall.
 
because 4 years ago one of my friends came up with that same exact trivia question lol
 
@LewsTherin Zneak is Kendall's sock puppet?
 
I feel so awesome knowing I'm a duplicate.
 
lol
 
5:13 PM
@Billdr Thought you were talking to Kendall not Zneak :O
 
@KendallFrey the guy is going to intern at Microsoft on the WP8 team next summer ;)
 
Word Perfect 8? At Last!
 
pshahaha
 
So not obvious who starred that...
 
5:17 PM
I honestly don't know what my lead is thinking. He's putting a throw behind a return inside a catch block.
 
that wasn't me
 
My biggest fan.
 
@Billdr My fan is bigger than your fan! :P
 
@Billdr probably in case the return statement doesn't return, you never know right?
 
so is anybody from C# offline due to storm?
 
5:18 PM
In that case, we already have an exception.
 
"return false" is probably going to throw an exception.
 
Give me a program in which return x; throws an exception.
 
Exception x = new NullPointerException();
return x;
 
Naw.
 
private Int32 ExceptionReturner() { return false;}
 
5:21 PM
BTW, it is possible.
 
int Foo() { int? x = null; return x; }
 
Those will be compile errors I think.
 
lemme check
 
Yes, you're right
 
yes, that's a compile error
 
5:22 PM
but, you did say throw an exception
:)
 
public bool x()
{
return x();
}
 
compile error != exception
 
compile error is a pretty big exception :)
 
oh yeah @Billdr
 
@Billdr No, that's not the same.
 
5:23 PM
int x { get { return x; } }
 
@AntLaC Your mom...
@zneak Not bad, but mine is faster.
 
@Billdr fraudulent and you know it. A method call is not a variable reference ;)
 
It'll throw an exception, probably on return too.
 
Since it doesn't need to overflow the stack.
 
@TomW Damnit.
 
5:23 PM
WTF who flagged.
 
Flags must be a rep thing, I don't see it.
 
Yeah.
Someone thought @AntLaC's mom was offensive.
 
Alright Kendall, what was your solution?
 
well anything with an implicit conversion that can fail would do it
 
pretends not to know about flag system
 
5:25 PM
dynamic x = "Hi";
return x;
Where Main returns int.
 
wtf is a dynamic?
 
its a dynamic type :)
 
it's an "anything"
 
Honestly?
 
dynamic=var?
 
5:26 PM
no
 
@Billdr It's like a var but not compile-time checked
 
var knows its type
 
googling
 
@KendallFrey if you're referring to flagging.. nah wasn't me :)
 
5:26 PM
var is compile time, dynamic is runtime
 
dynamic like object except there's no compile-time checking on anything on it
 
you can do some nifty stuff with dynamic type
things that i mostly hate
like powershell exchange return stuff >.>
 
Oh, that's a great way to write some sloppy code
 
yes
 
Yes.
But our code requires it to use the COM API.
 
5:27 PM
But it can be convenient in cases ... I used dynamic a decent amount for extracting values from Facebook JSON objects
 
Actually, there is a .NET wrapper, but it sucks.
 
yup.. its pretty annoying when you're forced into the world of dynamics
 
afk a sec
 
@robjb I imagine people used to JS world would be more comfortable with dynamic than ones like myself who haven't ventured into the world of web development
 
My understanding of dynamic is limited
 
5:29 PM
@Maverik Yea if you've written in any dynamic language, it's not that different ... PHP, javascript, w/e
 
Is it basically intended so that you can state object.somedata=literal and from that point on, object knows it does in fact have a member called somedata?
 
dynamic, as I understand it: just tells to compiler to believe in the infinite wisdom of the developer and stop trying to be smart
3
@TomW yea
 
All dynamic does is prevent compiler type-checking on that variable (until runtime.)
 
@TomW, a dynamic is just a wrapper that resolves everything at runtime
 
of course it all blows up if it can't be done at runtime
 
5:30 PM
if it points to an instance of a given class, you can't do anything more than what that class allows
 
Yeah, I've looked at the docs for dynamic, just never used it
 
@Maverik dynamic is scary... only use it if you have a very good reason :P like writing TypeScript
 
there are a bunch of classes that allow what you're talking about, like ExpandoObject
these classes make use of runtime features that let them react differently when you try to resolve a member that doesn't exist
 
Writing TypeScript isn't a reason to do anything.
 
The abuse that's possible in the CLR is quite astonishing
 
5:31 PM
@Pheonixblade9 i've avoided it like the plague - i went out of my way with exchange libraries and casted everything to their actual types
 
Ideally, anything dynamic would be internal or private ONLY.
 
anyways I need to get stuff done
 
but i might not be able to that for long, I can't get Exchange 2010 libraries to work like that..
 
I love coding challenges but I can't do that all day
I'll be back later
 
5:32 PM
@Maverik same here. It has its uses, but it's not something to be played with. Huge PITA to test/maintain
 
dynamic me = client.Get("totten");
string firstName = me.first_name;
string lastName = me.last_name;
Where first_name and last_name don't actually exist as properties on the object
 
ExpandoObject? That's scary.
 
Give a fundamentally evil person dynamic, Moles, Roslyn and Castle.DynamicProxy and see what horrors they wreak upon the world.
 
The comments in the FB API docs say:
A dynamic object is an object that is evaluated only at runtime. You can think of it as being a Dictionary<string, object> that is easier to use. In fact, the dynamic object we use actually is an IDictionary<string, object>.
 
I fail to understand why MS won't give .net developers a native sdk (or even a wrapper) to deal with exchange
 
5:34 PM
Tbh I thought that's a rather elegant use of dynamic
 
EWS goes some way for management but for more hardcore stuff you have to dive into COM or powershell to deal with it
infact i've started to hate powershell - with everything being powershell friendly, feels like they're forgetting the developers that have to deal with these things creating additional layers to deal with user friendliness that shouldn't have been there to begin with (its a technical world not lay man's land)
 
I've never even used powershell :0
 
I've tried
 
example: I pull a ton of information from entire infrastructure in about 20 seconds - then i take about 40 seconds to deal with exchange
 
@robjb Consider yourself lucky.
 
5:37 PM
struggled to get that to do anything as well. Don't get the syntax
 
and all I'm trying to find is.. mailbox size and public folders
 
We have zero tickets in dev-ready status ... dafuq?
 
and this exchange stuff is happening in parallel even (throwing 8x2 [across 2 CAS servers] requests at a time)!
 
channel9.msdn.com/Shows/HanselminutesOn9/… <= Check this out if you do any ASP.NET development, neat stuff ... now if I could only run our projects locally :/
 
an Escalation Engineer sounds terrifying
report ANYTHING and it comes back to you i) bigger and ii) your fault
 
5:42 PM
Yea, but an Escalation Engineer for MS ... and part of ASP.NET design team I believe'
 
You know what, I think I'm becoming conditioned...I actually prefer stuff that's my fault
because that keeps me away from fixing other people's fuck-ups
 
Hello guys, can you help me parse this hour fomrat: 2012-10-30T18:25:49+11:00 ?
 
I'm willing to accept that I'm an imbecile, it bothers me more when my colleagues are
 
If I wrote the code, and the bug is not my fault, that annoys the ___ out of me.
 
@Maverik Sounds frustrating ... I would have expected an interface against Exchange to have been developed by MS long ago
 
5:43 PM
@SpecialK. DateTime.Parse?
 
@Kendall Frey I need it using ParseExact
 
Then use that.
 
well, I would've used it if I was able to do it
 
@SpecialK. so what's the actual problem?
 
@Tom I can't get the second argument working (the one where you specify the format)
 
5:46 PM
Oh the joys when some random vendor tells me:
-Hey Ryan, we have an SLA that requires us to get this data in under 100ms. Your service gives it to us in 140ms, you guys need to make it faster
-Me: Our SLA for our service is 400ms, and we're doing it in 140? Damn we're good. What's your issue?
-him: ...
Love my job
 
I don't know the answer...but I'm wondering, why didn't you just lead with that? Why make someone ask you what the real question is?
 
umh?
 
@RyanTernier your follow-up should be "...we can look into supporting a better SLA..."
i.e. ka-ching
 
@robjb Majorly! but there's little that I can do... There's no way to retrieve public folder information without going through powershell right now as far as I know... I pull most of exchange stuff directly off AD attributes, rest from EWS but then i have to resort of powershell and then it just takes eternity
 
@TomW They want our Pie, and we don't share :P
 
5:49 PM
@RyanTernier obviously it would cost them money
We had a deal. You want a better deal, pay money or go away.
 
Yea, they're cheap and don't want to pay. They'd rather have us pay
 
Gotta love weird lines :D.
`public Dictionary<int, List<byte[]>> RemoteData = new Dictionary<int, List<byte[]>>();`
 
@RyanTernier was it you I was interrogating about BizTalk the other day? My memory fails, I was quite inebriated
 
Yes, it was
 
Guess what - more BizTalk. I practically got given an assignment by these people
'read on these subjects' basically
Look up the following BizTalk artefacts:

a. Receive/send location
b. Adapter
c. Pipeline
d. Map
e. Message Box database
f. Orchestration

and use them to briefly describe a typical message flow
I feel like I'm back at university
 
5:53 PM
hahaha
Anyone ever work with NoSQL Solutions (ie. distributed cache)?
 
Nope.
Looked into NoSQL - it looked a lot like the XML file backing store we use. Which made me think GAAH KILL IT WITH FIRE
 
I've had a MongoDB environment set up on my machine for a month or so, still haven't had time to learn anything about it :(
 
@TomW We need to put 100 million people on a system that doesn't rely on SQL in order to grab a person by a key in under 10ms
 
honking great hashtable
 
and that "cache' needs to be synced accross 3-5 server stacks, accessible by .NET and have a lookup/update function
Redis seems pretty good, but looking around if anyone else has played
 

« first day (745 days earlier)      last day (4210 days later) »