« first day (908 days earlier)      last day (4266 days later) » 

17:05
Well I finally got a full copy of my first "Program" out to the public. xD
cool
For all Interested, its nothing to special: github.com/CodeMonkeyAlx/CSharp/tree/master/CCalc%2B%2B
@CodeMonkeyAlx I was expected a C++ project, judging from the name :|
xD Sorry!
@RoelvanUden Baw haw haw haw
17:17
You have a lot of stuff in version control that shouldn't be there
@drch oh. I was more or less using it as a place to get the release folder out so people could use it. Thanks for the heads up man or I would not have known otherwise.
You should use CodePlex. It lets you manage releases separately.
Q: Is there a way to add a NETWORK SERVICE account from ServerA to project admins on TFS2010_ServerB?
@KendallFrey I am setting up on that as we speak.
You shouldn't take advice willy-nilly.
17:23
Best advice
What you most definitely should not do is maintain a project on both Github and CodePlex.
And don't use SourceForge. Ever.
Hello
is there a way to block internet connection with out disabling lan in c#
Ye, firewall
user1125394
17:30
can an algorithm run continuously, or the name algorithm refers more to a function
An algorithm takes input and produces the desired result.
I'm not sure an infinite loop counts, but it might.
but why are yu asking this Q in a C# chat room @Nighil
i asked it in stack and got answer but it is not working
socket programing?
user1125394
yes ok @KendallFrey
@Darek i tried with firewall but error
user1125394
17:34
the algo definition is maybe just without the function wrapper, being just the body
Hi guys
How to select all in word document....
any shortcut key?
ctrl-a
Perhaps... Ctrl+A
user1125394
alt+f4
@nirudyogi You don't even know how to use a computer as a non-programmer. What are you doing here?
17:38
I'm impressed he got here
Me too.
edc
edc
@KendallFrey to be fair, I didn't know the shortcut for device manager until a few years ago.
That's a little different.
how do you execute Ctrl-A?
Hmm
with Shift
or Alt?
or move finger in the oposite direction?
Up
edc
edc
@Darek No! You press Shift+C, then t, then r, then l, then -, then Shift+A
17:40
If you don't know what Ctrl+C, V, X, N, O, S, A, I, B, and U normally do, you aren't qualified to be a programmer.
@edc lmao
edc
edc
maybe @nirudyogi thought this is a musical chatroom
ctrl+A works like a charm....thanks guys
edc
edc
overflowing stacks of sheet music, and this room talks about the C# chord
I am very new to IT jaz
17:44
@KendallFrey I don't really think so
17:56
@KendallFrey I don't know CTRL+O/I/B/U
open, italic, bold, underline
Ah. I never use styling (I'm a programmer!) and open is a solution so :P
hi all
@Darek Sorry that I was going away, but all is solved now. thanks anyway..
I could probably think of some more common shortcuts, like Ctrl+F, H, Z, Y
Riveting
18:01
I read some posts about "popsicle immutability", but I'm not sure if this is what I need, or my class design is bad.. Is the need of "popsicle immutability" a bad sign?
Popsicle isn't a code smell. It's Just a way to describe freezable objects
@drch ok. I need it, because I wrote a little ProxyFactory class. And the class uses a settings class to setup the factory. after the settings is consumed, it should be immutable.. Should I make a deep copy, to ensure changes are no more possible, or check it with a bool?
Depends on how you think it should work. Both would be valid assuming the caller knows its changes don't affect the original
@CSharper no problemo, but I actually had a Q4U: how do you emit a throw ?
@Darek how do you mean, emit a throw? you mean throw an exception with emit?
18:09
yes
like you emit a return right
but how do I throw instead of return
@Darek IlGenerator.ThrowException(Type exception);
and if there is no type, just throw
throw;
a "rethrow" if you may
you mean rethrow?
ah.. yea, so. you have to catch the exception that is thrown. and then rerhrow it with the same statement above..
Ah
As Example:

Label exBlock = IlGenerator.BeginExceptionBlock();

// more code

IlGenerator.ThrowException(overflow);

IlGenerator.BeginCatchBlock(overflow);

IlGenerator.EndExceptionBlock();
you can see here the full example: msdn.microsoft.com/de-de/library/…
18:13
Thanks @CSharper!
@Darek why you need this?
I am trying to fix PostSharp Diagnostics Toolkit on CodePlex
with limited knowledge of MetaProgramming
@Darek what you try to fix there?
the problem is that a throw is being generated inside an if block. It should be outside
now I know what to lok 4
@Darek ok..
18:15
SharpCrafters refuse to fix it, because it is technically unsupported until v3
and I have to stay on 2.1
:|
@drch but how can I force that the consumer know about it.
Is it possible to impersonate a computer account using this:
[DllImport("advapi32.dll", SetLastError = true)]
        public static extern int LogonUser(string lpszUserName,
                                           string lpszDomain,
                                           string lpszPassword,
                                           int dwLogonType,
                                           int dwLogonProvider,
                                           ref IntPtr phToken);
@Darek yes.
in an Active Directory scenario
I am running as local systsem
system
what should be my log provider?
or type?
You could implement ICloneable to provide a mutable copy and throw an exception on modification to the original.
18:18
@drch thanks
My code works with NT AUTHORITY\NETWORK SERVICE, impersonates fine
but DOMAIN\computer$ fails
add remarks in the comments and/or create an IFreezable so it's obvious
@drch ok
thx again
thanks @CSharper I have that code and it works fine with the only exception of computer account in an AD
@Darek how you mean that, computer account?
18:20
Although exception is probably enough. IE list.AsReadOnly
Well, I added an AD computer account to TFS2010
@drch ok. When I have a dictionary inside, the values of it are not immutable, should I copy it?
it worked
@Darek but?
it is listed as DOMAIN\SERVER$
but when I try to impersonate that account while running as local system on said SERVER, it fails
18:23
@Darek you got an Win32exception?
2013-04-11 14:22:45,645 [1] WARN AlmScoreCard.Domain.Impersonator [(null)] - An exception occurred:
System.ComponentModel.Win32Exception (0x80004005): An attempt was made to reference a token that does not exist
@Darek ...token that does not exist
I wonder if I should drop teh $ sign
@Darek I think the token is that you try to retrieve does not exist?
at the end
18:24
@csharper yes if you ate exposing a collection you want to guard against modification. I don't recall if there's a readonlydictionary
are*
@drch ok.. thanks.
@CSharper should I still use LogonType.LOGON32_LOGON_SERVICE, LogonProvider.LOGON32_PROVIDER_DEFAULT
@drch I give it a try.. but not today.. The code is on another machine..
@csharper where are you from anyways
or LOGON32_LOGON_NETWORK >
18:25
@Darek hmm.. sorry I don't know..
that's OK
@drch switzerland, so my english is not the best ^^
who wants a CSS Challenge? @KendallFrey I know you are interested.
http://jsfiddle.net/rlemon/Qx785/10/show#top <- notice the #top
if you visit http://jsfiddle.net/rlemon/Qx785/10/ and run window.location.hash = 'top'; you will get the same results. The issue is; without breaking the menu functionality in pure CSS make the top menu show on load and hide itself when sub menus are opened.
@Darek try diffrent combinations, or read it on msdn of the UserLogon function
19:01
I found the bug!
Yay!
@CSharper neither BATCH nor NET nor SVC works with a computer account :|
How the heck TFS is able to add it to a valid group?
congrats @KendallFrey
Hardest part of fixing a bug: Why does it do that?
Second hardest part: Well, what SHOULD it do?
lol
@KendallFrey hardest part of a new feature: what SHOULD it do?
2nd hardest part: Why should it do that?
now help me solve my authenticate as computer problem
the frigging LogonUser does not want to work
19:13
@Pheonixblade9 The trick is to do those in the reverse order.
@KendallFrey how?
The 3 steps of software development:
1. Why should it do it?
2. What should it do?
3. How should it do it?
you have to determine the use case... what you want it to do.
yeah thats what I was saying.
No, it's not.
You can't decide what it should do before you decide why it should do it.
1) get a user story. What are you trying to accomplish/whats the problem?
2) design a solution
3) get stakeholder buyoff
4) implement solution
5) verify that solution meets user story
Ben
Ben
19:17
Phoenix: You're expanding software development further than the definition requires, IMO.
Your 1 is my 1.
Your 2 is my 2.
Your 3 has nothing to do with software development.
Your 4 is my 3.
Your 5 is what I didn't add because I didn't consider it part of developing software.
@KendallFrey it has everything to do with software development. If the people that are using your software don't get what they want, what's the point of developing it?
software development is more than writing code; you are not being paid to write code, you are being paid to solve problems. Being client-centric and ensuring that what you make meets the user's needs is the only objective that matters
That's part of business, not developing software.
Ben
Ben
@KendallFrey : #5 kind of falls under testing, IMO, which is part of development. I do agree that he's mixing design somewhat with product buy-in to some extent. OTOH, identifying the problem and verifying that it is resolved do incorporate #3 and #5, it's just an issue of how you define development. Is it just coding, or is it the full process?
developing software IS business. Anything else is naivete.
19:21
If you must relate that step to software development, I would say 3 : 2 :: 5 : 4
You know what would be cool?
If you don't do step 3, you're going to have a bunch of tools that people say "this isn't used... why was this built?" and you're not going to have an answer
User online status in StackOverflow
There is something similar, 'last seen' in profile I think
@Darek There is, sort of.
19:23
O, Seen
right
@Pheonixblade9 I'm not saying you shouldn't do step 3. I'm saying it's not about actual software development.
got it
@KendallFrey if you're saying "that's not typing code into my computer", I agree. However, it is a critical part of the process, and you shouldn't skip it.
By my interpretation of your logic, regular bathroom breaks are also part of software development, because without it, no software would get produced.
Nah, it's just a list of things you need to be involved in, in my belief.
19:24
"regular bathroom breaks" - now that's where shit REALLY gets done
@Loren literally.
Well, duh.
hahahah
:-D
Any c# pros know if it is possible to control the invoked "this" context of a c# lambda?
similar to javascript
No, you can't.
You can create a delegate from a method and an object. But not with lambdas.
19:27
Right. Ok thanks!
if (myTextBox.Text.Length > myTextBox.MaxLength)
{
    if (1 + 1 != 2)
    {
        // The world has ended. You should be afraid.
    }
    else
    {
        // You are using WPF bindings. You should check your code for bugs.
    }
}
gotta love binding
otherwise, you will pay with pain
@KendallFrey
Yes, that's actually possible. Yes, it actually happened.
No, I would not use WinForms. Why do you ask?
WinForms ? what is this, Brownfield development?
rofl
Yep, I specialize in POOP.
Procedural Object Oriented Programming
What? C# is procedural. C# is object oriented.
Ben
Ben
19:36
What's wrong with WinForms? I've only used it a couple of times... :)
So old, so stubborn, WinForms are
There's nothing wrong with it. It's just that there are better alternatives. It's like this. Sure, bicycles are cool, but they're really old technology. Cars are much easier and faster.
waits for it
waiting
Come on, Cody
come on
@KendallFrey I still think of WinForms as new technology. Crap, I'm old.
Ben
Ben
So in this analogy, what would you say is the car? And more importantly, the hovercar?
Either Mr. Cyclist is writing a long insult-ridden put-down for me, or he's AFK.
@Ben Metro Modern is the hovercar. WPF is the car, and WinForms is the bike.
Today was one of my more spectacular fails.
When I fix a bug, I often have to transplant the change to older versions.
This involves pulling the latest changes, transplanting the changeset, and pushing it back to the central repo.
I did everything but the transplant X/
GODDAMMU, WPF bindings!
<-- doing it wrong, I know
19:51
@KendallFrey are you using any MVVM>
Nope, that's how I'm doing it wrong.
:P
My favorite is MVVMLight, but Sacha Barber's stuff kicks butt too
// To be honest, I don't understand why this is necessary
Is that a problem?
makes it easy
very easy
And no, it is not a problem
Some days, I wonder, how did I go about without it
Is gitgub gist going crazy?
19:58
Could be.
@KendallFrey I was talking to our support manager... collecting requirements :)
busy day
You think you're busy? We pushed the end of our sprint out 3 days and we're still struggling to get stuff done.
Do you know what a wall of text is?
That is a wall of text.
characters blurred to protect the innocent
20:20
so......tired....
I am.... Sofaking tired O.o xD
Sofa King indeed.
I have multiple tabs open where I googled something, switched back to what I was doing, and forgot about it. Do I have ADHD?
edc
edc
so I am checking out MVC4, and i am thinking about how to tie it to my new project. I basically need to have a page with a multi-step dialog for creating an item. Does all the steps go inside one view?
@edc Do you need to have different kinds of validation depending on what step they are on?
@edc Depends.
@KendallFrey Hmmm good question.
20:25
You could use view models that inheret from one another.
Step2 inherits from Step1, for example
edc
edc
there are two types of items that I want to create. I guess I can break that down into two separate views
@KendallFrey looks like an aspx ScriptManager mess to me
edc
edc
But just can't wrap my head around multiple steps and the view
If I can't wait for a webpage to load, I either have ADHD or slow internet. I'm going with the latter.
@Pheonixblade9 XAML
ooo
we had a demo with a bunch of marketing people and a VP at 11... writing up tickets and stuff from that
edc
edc
20:27
oh like a ItemOneViewModelBase, and then each step for creating item1 inherits from it; ItemTwoViewModelBase, and each step for creating item2 inherits from it
user1125394
would you rather say close_origin or close_source
public class Step1 {
  public string SomeInfo {get;set;}
}
public class Step2 : Step1 {
  public string MoreInfo {get;set;}
}
user1125394
for putting who has done the close operation
to start. Then your Actions submit to the next step
edc
edc
@DigitalD interesting. let me look into it
20:29
Just make sure you have hidden fields or whatever to "remember" the previous step data
Also, you should think about when you want to write whatever data to a database or file or whatever.
Can someone "quit" the form and then pick up where they left off. That will change how you design it.
edc
edc
probably save to session until last step
or even cookies
but ya, you have a good point there
Then you might not need to do the inheritance between steps if you don't need all the "previous" data except maybe for validation?
opened a WPF solution for the first time just now. OK so it's like Forms meets HTML I see. But working with MVC I now despise the thought of code-behind. Is it necessary to use a code-behind file in WPF or is there an MVC framework template for WPF?
edc
edc
@DigitalD I see what you are thinking about - you are thinking about a wizard where there are multiple branches, and in that case I need information from previous steps. Right?
@edc More or less, yes.
Russian trance music time xD
Share... latex???
@KendallFrey Something tells me you got the same idea I did.... >.>
20:34
That seems... a little over the top.
@CodeMonkeyAlx I've been stuck on Oakenfold for a while: soundcloud.com/pauloakenfold/sets/bbc-radio-1-essential-mixes
But really grats @Pheonixblade9 .... yo
edc
edc
@DigitalD I think my steps are pretty much all linear, so maybe I don't need your inheritance approach, just error checking and storing things in memory
@DigitalD Oakenfold is pretty cool :D
edc
edc
39
Q: multi-step registration process issues in asp.net mvc (splitted viewmodels, single model)

JaniI have a multi-step registration process, backed by a single object in domain layer, which have validation rules defined on properties. How Should I validate the domain object when the domain is split across many views, and I have to save the object partially in the first view when posted? I th...

This guy solves it by feeding in step1 into step2 as argument, similar idea
20:36
@RyanJMcGowan there are
MVVM and MVC
Good. I'm not doing anything in WPF yet. Just wanted to know if I ever did get my hands dirty.
@edc right. I keep forgetting about @Html.Serialize
@RyanJMcGowan Dirty..... WITH BLOOD!!!!..... Yo.
Or something.
Tuna and ketchup.
edc
edc
It's my first project doing mvc4 too
previously i just use PageMethods
20:38
You'll never go back
@RyanJMcGowan I think I just threw up in my mouth a little
@RyanJMcGowan Not sure about that one... I am still trying to get over my aunt making Banana Mayonnaise Sandwiches.
I wasn't talking about food. You'll get it when you're older.
@RyanJMcGowan Suddenly it all becomes clear
O.o
20:41
Well I am glad to see I am not the only crazy S.O.B in this room then.
Adios Amigos
Peace Homie.... Yo.
@Pheonixblade9 Are you on L5D or something?
20:45
LSD?
or maybe... L4D?
LSD r.5
now with methlamine.
you're all just jealous I live in Seattle and MJ is legal!
Made it to chapter 10....
@Pheonixblade9 About that...
I live in California.
My last boss was stoned then entire time I worked there, and that's not an exaggeration.
@RyanJMcGowan yeah, but it's legal here, not just accepted.
20:53
Technically it's not legal anywhere still. It's a federal crime.
It's legal here if it's prescribed by a doctor. But walk down Venice and there's a dispensary about every 200 feet. The whole beach smells like a bong.
supremacy clause only applies for the constitution, I thought
edc
edc
@RyanJMcGowan I guess it depends. For smaller one page project, I think it's still more convenient to use the good old stuff
One page project would essentially make code-behind an MVC project.
edc
edc
precisely
code behind would be your controller
20:56
Is there a way to a webSite(asp.net) to connect to a TFS a show the list of file? Its for an homeMade project manager to select files modified in a release.
edc
edc
@forX isn't that called SharePoint?
@RyanJMcGowan I thought medical marijuana was always legal.
edc
edc
@RyanJMcGowan sometimes I get projects that have duration in the range of one week, and the client probably won't want any more enhancement, so MVC would be overkill
@KendallFrey only in states where it's legal.
Guess that makes it 'legal' in Canada.
At least the way I understood it.
20:57
nope. it was legalized in certain states. It's a "controlled substance" but that doesn't make it illegal for the FDA to approve for medicinal use.
edc
edc
@KendallFrey it's legal if you have prescription to take marijuana
@edc no, or maybe sharepoint can do that. but I already have a .net 3.5 project manager website. And I want to add a way to know modified file easely
edc
edc
in canada
@forX TFS already has a website where you can see everything
@edc Once you're familiar with MVC, calling it overkill for anything seems silly because it's light-weight. It keeps things simple.
edc
edc
so you shouldn't need to reinvent the wheel
20:58
While federal law in the United States bans all sale and possession of cannabis, enforcement varies widely at the state level and some states have established medicinal marijuana programs in that contradict federal law.
I'm in canada, and I dont know anyone who can have marijuana medicinal
edc
edc
@forX I am in Canada too, but I heard on the radio about medical marijuana pretty often.
@edc website? I dont know this . I dont think I can youse it in my company
edc
edc
21:00
There was once a guy who brought his medical marijuana to a restaurant and wanted to take it in the restaurant. The owner be damned if he asks him to leave, and damned if he let him.
@edc I know 3-4 five who had cancer, but no one can have marijuana, maybe its special, and I dont know where you get it.
edc
edc
@forX I dunno either
but I saw it first hand someone had it, so...
@edc happy for him
The FDA approved THC for medical use. There's a drug out there that's in pill form. It's legal in all 50. But no doctors use it because THC is a lot less effective than effective treatemnts.
@edc I'm still with my problem, how to know the list of file of a Solution in TFS.
@edc I mean, I dont know the website you talking about
edc
edc
21:04
@forX if you really really want to make it yourself, there is the TFS API:
http://stackoverflow.com/questions/469732/how-to-list-files-of-a-team-project-using-tfs-api
@edc tank you, I look immediatly
edc
edc
The site I was talking about is called TFS Web Access: tinyurl.com/cl5g65e
21:37
There's a line length limit to Console.ReadLine! I had no idea.
on my machine, I have a console program that just does Console.Readline. I can only type about 4 lines of text in it before it stops accepting my characters.
it just reads stdin until a newline
youll run out of memory before hitting a limit
what you are experiencing must be something different
What you describe makes plenty of sense, and I'm sure that I can pipe arbitrary-length strings to it. However, when I type them from the keyboard (or copy-paste), on my machine I observe a limit. I don't know where this is coming from.
You can try it yourself, the code is just:
String foo = Console.ReadLine();
Console.WriteLine("You wrote: "+foo);
in fact, I'm curious. If this works for you (i.e. you can type more than 5 lines) then it must be my machine that's broken (instead of just some C# behavior I didn't know about)
For me it stops after a bit over 3 lines... might be about 255 characters.
does it throw ArgumentOutOfRangeException in debug?
21:44
I have 29,999 rep.
Maybe I should cancel a downvote or something.
So tempted to randomly upvote you and make that statement untrue.
no exception, it just stops responding to the keyboard (well I can still use backspace)
nooooo! don't give me rep!
@redtuna: yeah i experienced the same
but if you run it from cmd.exe you wont experience that
i think
sec
21:47
wow that is mental
indeed! Very surprising.
C# Chat Wiki - Please read our wiki if you are new to the room. If you would like to have edit rights to this wiki, ping me and I will create an account for you to help manage the content.
3
Right, Ryan. This really belongs in the msdn page for Console.ReadLine
yeah htats fucking retarded especially since MSDN mentions that it could throw an outof memory exception
sorry you dont have enough memory to read 256 bytes
openstandardinput(int.maxvalue)
21:53
well, yeah, allocating a 4 GB buffer can reasonably cause an OOM
awesome video
I really love how that AI rage quits Tetris
maybe console.in.readline()
calls console.read() not sure if that in turn calls console.openstandardinput()
@drch the links posted have the solution, you use Console.SetIn(new StreamReader(Console.OpenStandardInput(8192)));
yeah no dice
lame
sure but then what if you want to read 8193 bytes
21:59
Is there any difference at all in the following?

[MyAttr][MyOtherAttr] public class Foo { }

vs

[MyAttr, MyOtherAttr] public class Foo { }
I agree with having a hard limit on the length of text Console.ReadLine() returns
@drch well then I'd suggest Console.SetIn(new StreamReader(Console.OpenStandardInput(8193)))
;)

« first day (908 days earlier)      last day (4266 days later) »