« first day (2433 days earlier)      last day (2517 days later) » 

12:00 AM
whats value tho
 
value is the syntax that C# uses when you call a setter
 
ohhh
 
so myObject.xcoord = 3; will set value to 3
you dont make value
it's just part of it
 
but why would you implement it that way
as opposed to:
private static int xcoord { get; set; }
 
because you were told to
1 sec
 
12:03 AM
Here's the little complicated one. The gist that makes our lives miserable :P
 
just say you wanted to negate whatever int comes in (for some reason)
private int x;

public int xcoord {
    get {
        return x;
    }
    set {
        x = -Math.Abs(value);
    }
}
you can use the longhand setter as a code block to do manipulation
which you can't in {get; set;}
 
oh
ok i see
i'd prefer longer anyways
it lets me know exactly whats going on
 
@hsimah Thanks for the clarification :)
 
yah thanks @hsim
 
@Brogrammer give it a few weeks with intense C# and you might change your mind :P
 
12:05 AM
lol
 
You get used to it with more exposure
 
has this happened to u guys
where u learn one language
u get good at it
and then when you learn others
you start to forget
syntax
i was really good at c++ but i kinda forgot some syntax stuff
 
Yup
It happens.
 
will ppl at interviews not like that
 
But you can pick back up fairly quickly
 
12:07 AM
ya thats also true
 
People generally prefer you understand how programming works.
 
right the algorithm part
 
And that you can do development with the language.
 
and making it efficient
define development
 
Programming / development.
 
12:08 AM
do you guys work at a company
 
Programming to me sounds more program-specific whereas development is programming and developing a solution
 
I don't at the moment.
 
what types of problems do people have to deal with as a programmer
 
It helps if you get the languages they use before the interview, then spend some time brushing up your skills on it.
Bugs, bugs, and bugs everywhere! :P
 
12:09 AM
like at a company
do they ask you to reverse a string
 
They might.
It depends on the company.
 
LOl
but why do they need ppl for that
theres a reverse function
 
shrug
 
or just take half the string and put it backwards
 
they might ask you to do silly things
 
12:10 AM
and they pay ppl to do that
 
I think it depends on the company.
The last company I worked for gave reasonable projects.
 
dank memes
 
I had to modify the help desk ticket modal to enhance validation and add new fields.
And I was also given a project to work on creating an application management portal
 
use jquery
 
Not silly reverse-string functions :P
 
12:12 AM
you should see the literal retardation that I have to code into one of our apps to make users happy
 
@ndugger We used more than just jQuery for that. :)
Ooh... What was it?
 
only jquery now
🎅
 
oh hell no.
I need some strong typing enforcement there so I don't goof stuff up
 
sometownge
 
im slowly learning to accept javascript
 
12:13 AM
if i didnt use a backfield
would i do this:
public int Get_yCoor()
{
return yCoor;
}

public void Set_yCoor(int value)
{
yCoor = value;
}
 
no
yCoor is the backing field
you have to have the backing field unless you do { get; set; }
 
so {get; set;} isnt the backing field
 
well there is a backing field there, but the framework handles it for you
 
because my directions say:
 
12:15 AM
you're like 'hey C# i have a property and I cant be bothered writing all the backing field jibber jabber can you do it or me?'
 
1. A Property named xcoord that sets (private) or gets (private) the x coordinate of a
point. This property MUST be implemented with a backing field
2. A Property named ycoord that sets (private) or gets (private) the y coordinate of a
point. This property MUST be implemented as an automatically implemented
 
and c# says 'yo write get;set;
 
property. That means you will not declare a backing field.
 
private int x;
public int xcoord {
    get {
        return x;
    }
    set {
        x = value;
    }
}

public int ycoord {get;set;}
 
12:16 AM
ok
that example is perfect
 
they're teaching you the different ways to do it
 
right
i think i'll stick to the field way
because then i can do anything i want
when setting the values
 
@Brogrammer Give it time ;)
 
nah
youll come around to it
 
but what if i want to do as u said before x=-value
 
12:17 AM
because they're the same thing (in that example), you just did more work
then you have to use it, yes
 
right but thats for an easy example
 
but for ones that you dont need to use
 
ok
i guess what ur trying to say is
use both ways when needed
if im dealing with an easy example just do without the field
 
mate, i have an object here in my code with 100 properties. i would be there all day if i didnt use the shorthand
 
lol
fair point
 
12:18 AM
about 3 have the full getter and setter for reasons
 
12:44 AM
@Brogrammer it is auto implemented by the compiler
the backing field is auto generated by the compiler
if the compiler did not create that, 'invisible' backing field your code would not compile, b/c you would need to create it
if you want to see this in action, install VS.2003 (ish)
you have to VS targeting a .net framework lower then 3.0
And that will be hard, since I think 8 & 7 are 3.5 at install
 
 
3 hours later…
mr5
4:09 AM
\o/
M
C
A
!!ymca
 
@mr5 That didn't make much sense. Use the !!/help command to learn more.
 
mr5
!!learn ymca \\o/ \<o\> \<o_ /o\\
 
@mr5 Command ymca learned
 
mr5
!!ymca
 
@mr5 o/
@mr5 Command ymca learned
 
mr5
4:12 AM
!!ymca
 
@mr5 \o/
@mr5 Command ymca learned
 
mr5
!!ymca
 
@mr5 Input not matching /<o>/. Help: User-taught command: <o_ \o/
@mr5 Command ymca learned
 
mr5
!!ymca
 
@mr5 Input not matching /<o\>/. Help: User-taught command: <o_ \o/
 
mr5
4:16 AM
hey. can I modify the source code of this bot?
 
4:51 AM
can I modify your source code?
 
mr5
5:18 AM
sure
 
5:54 AM
wrar
good old so chat porn in the mornin'
keep on talking you two :)
 
@vishuminhas run as administrator maybe?
+ what is the error output?
 
did many times @Nerdintraining
I have attached screenshot to show the output please follow it from my question link
 
i ment the HttpFailure[...].html file
 
mr5
restart your computer at least 3 times
 
6:04 AM
@mikeTheLiar how to star this message sir?
 
@Nerdintraining this is the output error
"The Web server is not configured for anonymous access and a required authorization header was not received."
 
mr5
@Nerdintraining post the permalink and star your post
 
@vishuminhas Seems pretty strait foward
configure the web server for anonymous access :D
 
mr5
there is actually a star option when you click on the chevron
 
Hola hola!
 
mr5
6:07 AM
kamil, fix your bot pls
 
@KamilSolecki piss off ♥
 
@mr5 *bzzt* Witam serdecznie!
 
mr5
@KamilSolecki Naprawić twój bota proszę
 
'morning.
 
@mr5 wepzedacz
if i wrote that correctly
 
6:13 AM
@Nerdintraining look my question I have edited
 
mr5
@Nerdintraining I am not a polish actually. It's just Google Translate. lol
 
O I C
@vishuminhas the problem is i still don't know anything about asp.net or web dev in general ':D
 
@mr5 almost. Should have been: Napraw swojego bota, proszę.
@Nerdintraining what's that supposed to mean xd
 
@KamilSolecki [we ptsche dasch] --> sale in english
gosh i cant write polnish pronounceiation^^
@KamilSolecki thank you kamil for this message :)
(its the song from yesterday)
 
mr5
6:36 AM
@KamilSolecki how about this: Proszę naprawić dupę?
dupe dupe
 
morning :)
 
6:49 AM
heyho
 
@mr5 ahahahahahhaahhahahhahahahahahahahahah
@Nerdintraining wyprzedaż :D
 
@KamilSolecki almost nailed it
@mr5 it get's translated into german by google to: Bitte korrigieren Sie Ihren Esel
wich means, please correct your donkey :D
google is so polite translating ass to donkey
 
Fix your ass sounds 100% funnier in polish than in English though
 
mr5
I thought ass in german is Asschck
 
ohayou
 
mr5
7:05 AM
hentai kamisama
 
@avner quick small question
since i know you use autofac
do you load assemblies or do you load each class seperately?
 
@misha130 pinging doesnt work that way
 
yes it does
@sebastian
 
lol
 
doesn't it?
 
7:07 AM
didn't know that
 
ok then
 
i thought you have to write the full suggested name ^^
 
I think it looks for closest person in the chat and then switches to closest person in universe of stackoverflow
 
@misha130 Assemblies.
 
the chat is complex :^)
 
7:08 AM
@SebastianL (It does)
 
@AvnerShahar-Kashtan I mean don't you load POCOs then? kind of?
 
@misha130 Yeah. And sometimes it messes up, and trying to ping @misha130 could accidentally ping a shorter-named @misha, if one such was a regular in the room.
@misha130 Not sure what you mean.
 
It might make the injection slower
since it has a larger list of classes to iterate through
 
Hi, I'm trying to create a hashset like this :

var existingValues = new HashSet<(string, string) > (
objectToSerialize.elements.Select(x => (x.data.source, x.data.target)));

But it gives error at this part : HashSet<(string, string) >

How can I use this hashset with two keys?
 
@jason You can do a Hashset<Tuple<string,string>>.
 
7:10 AM
HashSet sounds awfully like Java
 
Though it's important to notice that {"a","b"} would be different from {"b", "a"}.
@SebastianL It's a general data structure, not really tied to any language.
 
@AvnerShahar-Kashtan yeah i know, but in c# i use dictionary instead of hashset :D
 
@AvnerShahar-Kashtan how should I modify this part ?
.Select(x => (x.data.source, x.data.target)));
 
@SebastianL A hashset isn't a dictionary. You're thinking of Java's HashMap, which is similar to .NET's Dictionary.
 
@mr5 :)
 
7:12 AM
@jason Select(x => new Tuple<string,string>(x.data.source, x.data.target))
 
o7 @Proxy @AvnerShahar-Kashtan
 
@KamilSolecki yo
@misha130 I don't register every single object in the assembly.
 
Thats what I asked
 
Getting up early is nice
 
žyo
 
7:13 AM
Lazy shower, lazy dick around on internet before work
 
I misunderstood, then. I call builder.RegisterAssemblyModules and pass it a list of assemblies. It looks for classes that implement IModule, instantiates them and calls Load on them.
 
@AvnerShahar-Kashtan thanks, just googled it ^^
 
ah I see I see good advice thanks
 
@TomW The words "dick" and "internet" should never be used in close proximity in civilised company.
 
Quite right
 
7:14 AM
Yeah. It never even occurred to me that you meant registering every object - I'd never want to do that.
 
@AvnerShahar-Kashtan last question : how will I look up that hashset?
 
@jason you mean searching?
 
@jason if (hashset.Contains(new Tuple<string,string>("a", "b")) ...
 
yea I dont want to do that too, I just didn't know whats the best way to specify
 
Clumsy, I agree. C# doesn't have more streamlined syntax for that.
 
7:16 AM
@AvnerShahar-Kashtan thanks a lot.
 
If you use it a lot, I'd create a custom class - TwoKeyHashset - that inherits HashSet<Tuple<string,string>> and adds easy-to-use methods like Add(string a, string);
 
@AvnerShahar-Kashtan thanks a lot.
 
Of course, you could do it the quick and dirty way, simple use a HashSet<string>, and combine your two keys into one string with a known delimiter that's guaranteed not to appear in the data.
 
I implemented a memory cache like that once
We had a bunch of data that was keyed by I think three string parameters, I created a key by concatenating with ~ and stuck them in a ConcurrentDictionary
sorry, ConcurrentDictionary<string, Lazy<thing>>
 
@mr5 arsch actually
but ass can also be a donkey
 
7:19 AM
BritE solves this problem
Arse.
 
@AvnerShahar-Kashtan is that option better performance-wise?
 
arse is just the polite way of saying ass
 
False
 
its just british
 
British english boils down to the polite version of english
 
7:25 AM
wait a second
 
good morning
 
@ntohl bugger off you ruddy old cunt ♥
 
the helllll
ok that is weird
 
@jason Same-same, I think.
 
In the chat input pane, when I type ampersand I get ~
When I type hash I get \
 
7:27 AM
@Nerdintraining ♥
 
in a different window the key bindings are correct
how is this possible
 
@Nerdintraining how did You guess my clan tag is "old cunt" in steam?
 
I actually don#t know where apostrophe, ampersand and hash are in this weirdass keybinding, nor how it is even possible for an application to modify the machine#s behaviour
 
@ntohl just seemd to be you all ove :)
 
Different tabs in Chrome, even
 
7:29 AM
@TomW Weird javascript hackery?
 
must be
is this a prank?
 
@TomW weird alt space hackery?
 
Have yo installed any user scripts lately?
 
....and now it's back to normal
 
or what ever the shortcut is for changing keyboard layout
 
7:30 AM
wtf
no
 
javascript hockey........ fun
 
...there's a shortcut for changing keyboard layout?
 
alt-shift
 
@TomW Sure. Alt-shift.
 
what marvels
 
7:30 AM
Native English speakers showing their privilege. :)
 
oh great
well thats rather easy to do by accident
and not realise
 
is this for real???
 
@TomW ya, you have to disable the other layouts
 
it's real. I use it frequently
 
it sucks when suddenly you have an english layout on a german keyboard
z<->y are swaped and allot of weird shit
 
7:31 AM
Don't you all have keyboards that match your language, installed on your machines that you bought in your country?
 
With Hebrew it's very easy to notice - the entire keyset is different.
@TomW Well, my keyboard technically doesn't have anything on its keys except obscenities.
 
Does a machine bought in Germany not come with a German keyboard and default to German keyboard layout?
 
But it's really easy to notice when your layout isn't on English נוא םמ Hקנרק' ןמדאקשג.
 
@Nerdintraining no it doesn't when You write code with english layout, and You have to break the flow changing layout to write a user interaction in hungarian.
 
@ntohl wat
@TomW it does, but it has english layout installed aswell, or atleast for me it had it on my windows installation
so quite frequently in dota i would hit alt+shift acidentally and then wonder why my hotkeys don't work anymore
 
7:34 AM
@Nerdintraining typing... typing. Oh fluff. I have to fill up a string with hungarian stuff... option 1.> change layout click on the little icon... select the right layout. (not good). Option 2.> alt-shift
 
+ for shits and giggles i had a russian layout installed once, just to "shit talk" in russian in random letters^^
 
the most wonderful is writing the ' in hebrew
 
@Nerdintraining alt in dota? When?
 
I write a letter in hebrew switch to russian then to english write ' then go back to hebrew
 
@ntohl u right
@ntohl minimap for hero icons, quick casting on yourself ect.
 
7:35 AM
Yeah, triple-layouts is fun.
At least they're all for different alphabets, so it's easy to spot. If you have en-us and en-gb installed, you won't notice which one you're on until you try to write @ or ".
 
en to de is the same
 
@AvnerShahar-Kashtan precisely my problem
 
@ntohl jó reggelt!
 
did they have to choose a key combo that is easy to hit by accident
 
@TomW As someone who switches between en-US and he-IL about 50 times a minute - yes, yes they did. Otherwise it would be a pain.
 
7:40 AM
@KamilSolecki Dzień dobry!
 
I understood thaT!
good day!
 
good morning
I have a clean coding theoretical question. Let's say, I have a composition root. There are two classes that depends on each other. IoC framework freaks out. How to handle that situation?
I was thinking about the whole problem is based on which class is instantiated first
 
@ntohl you mean a circular reference?
 
@SebastianL IoC framework says circular ref. Yes
btw I think the most trivial example is a Stack implementation: class Node { public Node Next {get;set;} }
no. Forget it
it's completely different... I'll make a short example of circular ref
    public class ClassA
    {
        private ClassB _b;

        public ClassA(ClassB b)
        {
            _b = b;
        }
    }
    public class ClassB
    {
        private ClassA _a;

        public ClassB(ClassA a)
        {
            _a = a;
        }
    }
    ClassA a = new ClassA(null); // I think that is the source of the problem
    ClassB b = new ClassB(a);
so make it IoC handled, Extract interface from both of them, Bind IClassA to ClassA, Bind IClassB to ClassB, and You can't easily instantiate theese classes
 
7:59 AM
in Root Access on The Stack Exchange Network Chat, 16 secs ago, by satibel
my morning: psu is crapped out, fetch another psu from the "crap but working PCs" pile
try to debug why the pc still isn't booting for an hour, changing mobos, ram, gpu etc... still no go... then the "new" psu goes bang, fetch the last psu, works well, but the fan's bearing are dead, need to get a new 120mm fan, none of the dead psus have one, I finally found one on a pc, open the psu, need to change the connector because of polarity issues, finally put it back together and I'm here.
hello
 
@ntohl i'm not that deep into IoC but that looks like a design issue to me
@satibel this is dedication to get to work :D
 
@satibel great fun
 
2 go bad in one day... Very bad luck, or some other issue?
 
Damn it. I wrote some code a couple of months ago, shelved it in TFS, and now I can't find it.
 
You have ton of hardware? Extra draw?
 
8:05 AM
@SebastianL I think there are well designed classes that are inherently cross connected. The thing is: Is the composition root a tree? Or just graph?
well designed graph nodes may have reference to parent, and children.
 
@ntohl can you register multiple constuctors in IoC?
 
you can even tell IoC to not do that when there is such a constructor
so to not create a circulation
 
@SebastianL I didn't read it through, but it states it possible> nephandus.com/2013/05/10/overloading-ninject
4
A: Injection of class with multiple constructors

user2371370The problem you're having is that Ninject selects .ctors based on the number of bound parameters available to it. That means that Ninject fundamentally doesn't understand overloading. You can work around this problem by using the .ToConstructor() function in your bindings and combining it with ...

 
@SebastianL well, fixing PCs is part of my job.
 
@satibel then you're more of a tech than a programmer or are you just the only "computer guy"? :'D
@ntohl i don't know ninject specifically, but can't you just register a constructor without params and call IoC.Get<ClassA>();
 
8:16 AM
@SebastianL we're 2 computer guys.
in Root Access on The Stack Exchange Network Chat, 40 secs ago, by satibel
I deal with computers, network, electronics, and making software.
 
what polarity problems?
 
@satibel thats a pretty broad job :D
@misha130 maybe it's a pwm fan
 
@SebastianL I'm switching to freelance, i'll be dealing with that + machining, building and doing russian massages.
and maybe cars for easy stuff.
(e.g. oil, lights, and wheel change.)
 
@SebastianL It's possible, and I thinking about it as solution. Tho someone would say in the composition root, You should define the dependencies, and write there explicitly. And we are lying about ClassA is not dependant on ClassB.
 
@ntohl so you want assign ClassB to _b of ClassA later on?
 
8:30 AM
@SebastianL yes. Just as You want a parent set on a graph node.
 
@satibel you're awfully quiet today, how's your back?
 
@AdiMohan back still hurts, and I'm writing docs.
 
Hi guys, I have a question about ViewModels: let's say that in View_A I simply display file - I need just id and path so my FileAViewModel should have two fields. In another view (e.g. View_B) I need more data about file - id, path, name, extension, created date e.g. Should I create new view model class (FileBViewModel) or just develop FileAViewModel by adding new fields?
It's still same file ^
 
@1_bug i'd create two different Views like View_FileBasic and View_FileDetails
 
8:41 AM
@SebastianL not yet. I was curious about chatters opinion.
thx for the link. Mark is pro in IoC.
 
@1_bug I'm not sure what "file" refers to here.
If you have one view (say, FileListView) that only shows two fields, and another view (say, FileDetailsView) that shows the full file details - are you asking whether you should have a FileListViewModel and FileDetailsViewModel as well?
The simplest approach is to simply have one FileViewModel that can be used in both views. The first view can only use the fields it needs. This is fine, but can lead to problems down the line.
 
mr5
Am I the only one who finds underscores on code ugly? I only used it when making a unit tests
 
@mr5 Well_it_depend_how_you_use_them.
 
mr5
or in xml, when creating ids
it should be stop
 
HAMMERTIME!
 
mr5
8:56 AM
stopasdas
stop_
the world needs a clean code
stop spreading underscores on source codes. right caprica?
 
ahoy mateys
 
@mr5 Code style is a matter of what you're used to. I've been doing C# for years, so PascalCase makes sense to me.
To someone used to C on linux or to PHP or python, snake_case makes sense.
I've found that claims of objective merit for a certain coding style or another are always spurious and fall apart when examined.
 
@AvnerShahar-Kashtan yep, this was my question. Thanks for explanation.
 

« first day (2433 days earlier)      last day (2517 days later) »