« first day (1773 days earlier)      last day (3399 days later) » 

03:11
DDD, what if my aggregate root is a list, i can wrap it, but i'd still need to expose the list of entities outside of the aggregate, so it's not really the place for it, i could make it it's own aggregate, but then the original aggregate is just a wrapper
well, i guess thats okay, i can load the wrapper with some properties, but then it'd still contain functions to act on that list of entities, which is it's own aggregate? that doesn't sound very cohesive...
it sounds really anemic
i could put methods on each entity in the list, and loop through it, but that sounds dirty too, where would the logic go for figuring out what to pass those functions..... in the wrapper? that actually sounds like a decent plan
04:11
 
2 hours later…
05:52
WHOOOO MONDAYYYY
06:04
Morning :)
TIL the word for all those animations when something is loading (like the hourglass or, in recent Windows versions the blueish circle) is 'throbber'
06:21
Windows 10 is fucking awesome. I think I'm gonna install it at home too.
Win 10 is just Win 8.1 with Cortana and a keylogger and an ad-spam service
and you can only deactivate Cortana.
The window positioning is awesome too
It's not yet a full-blown tiling window manager, but it's getting there.
You mean having multiple desktops?
No, haven't explored that. I have multiple screens though
Coming from PHP, Inversion Of Control was something that I didn't like because I never was certain that an object with that key was present in my container. Does this work better in C#? Am I missing something by not using it in my WPF app? I feel that, the longer I work on my current job, the less I retain of my previous knowledge :(
Right now I have a WPF / MVVM-like application, just wired together by manually creating a new ViewModel in my codebehind, and attaching it to the View's datacontext. My ViewModel then gets stuff from the database, does magic, saves stuff.
06:53
Good morning guys :)
@BenjaminDiele IoC is never strictly needed. It just decouples. And that's nice.
ALso, good morning.
Hmm, I think my code might need some decoupling. What's a good way to determine if it's stuck or not? I'm using WPF with MVVM. My Codebehind creates my VM for my V
MOrning guys :D
@BenjaminDiele It's almost never "stuck". It's just less pretty :P
07:26
@BenjaminDiele Ctrl+Win+D --> Ctrl+Win+Arrow Left/Right
@RoelvanUden Sorry to dump this on you, but this is an example of the style in which I've written my code.
07:43
My biggest issue is that I can figure out small tasks and how to clean them up. But I don't know if the overal "flow" of the program is any good, and what I can do to make it better / cleaner / more readable or maintainable.
@BenjaminDiele You can use CallerMemberName (I did mention this before, right?) gist.github.com/Loetn/5de7de142aa32dd4c9f4
@BenjaminDiele Sorry I have no opinions on this at all. @KendallFrey might.
@BenjaminDiele I'd use an abstraction for INotifyPropertyChanged though.
Because typing it out is meh.
top o' the morning to you all
@Squiggle morning o/
o/
Nice day to not be holding shares in commodities, huh?
07:56
@Loetn Yeah you did, just didn't implement it yet :(
@RoelvanUden Can you expand on that?
@BenjaminDiele Easy to implement: copy and use :)
public MeterType MeterType
{
    get
    {
        return _MeterType;
    }
    set
    {
        _MeterType = value;
        NotifyPropertyChanged(() => MeterType);
    }
}
@BenjaminDiele Probably using Expressions.
@Loetn This seems to work as well (stole it from a friend of mine who changed the code already)
@BenjaminDiele Yep, but I only use that method when I want to call NPC when not in the specific property
08:01
you have a point there
But that's only because I use CallerMemberName :)
If not: you can use your version
No, it's a good suggestion and I'll implement it. I just cba to start working on the program again :(
08:25
@Squiggle: Stock market is really shaky this morning.
aye
I keep thinking I might want to invest in some shares, then something like this happens and I think I might just keep it in my Swiss bank account.
What are you guys into?
or try to invest them when the market seems to get better. it's been all down down down the last few weeks.
@C4ud3x I'm totally into girls
Uh cool.
08:27
@BenjaminDiele Uhm. One sec.
@scheien yeah, I dunno. I'd probably just invest in anything Elon Musk does.
Trading forex?
sorry, I mean Tony Stark
I always get the two confused
hehe yea
That Hyperloop thingy seems pretty awesome
trading FX is for people with more knowledge than I
Hyperloop is a (vaccuum) pipe dream. I'm more interested in the battery systems and smart grid tech.
08:29
Hah^^.
though he says that over 1500km it would be cheaper to transport passengers by super sonic airplanes.
@C4ud3x srsly, I wouldn't touch FX with a 10ft pole
Trading is always about knowledge isnt it?
Knowledge and experience.
Where experience = knowledge. So knowledge.
@Squiggle: indeed. He has some great visions, one of them being that as much as possible should be batterypowered.
@BenjaminDiele Example of using it:
namespace Rs.Os
{
    internal sealed class Vector2D : Bindable, IVector2D
    {
        private float _x;
        private float _y;

        #region Constructor

        public Vector2D()
        {
        }

        public Vector2D(float x, float y)
        {
            _x = x;
            _y = y;
        }

        #endregion

        #region Implementation of IVector2D

        public float X
        {
            get { return _x; }
            set { Set(ref _x, value); }
        }

        public float Y
( I really want a Tesla, that's one awesome car )
08:37
@RoelvanUden That's pretty cool
aye Tesla cars are beautiful
sexy
Tesla was hiring .Net developers, BTW
(In L.A.)
That's a long way from home
:)
09:10
I'm so glad that I haven't gotten around to put our childrens money in mutual/equity funds (not sure what they're called in english), now that the stock market is going down like a lead zeppelin.
I know this is C# chat, but do any of you have any suggestions on how to fix this? stackoverflow.com/questions/32178285/…
Have you tried commenting out each line in the load event, to find the specific line that throws the exception?
Does the same happen if you havent done the firstTimeSetup?
as if you have?
@scheien Commented all code inside mainForm_Load (as said in the question), still happens (meaning it's not a problem with my own code).
@scheien Went short on eur/usd. Looking forward for a fall. :)
@scheien yeah, the same thing happens.
09:19
Does mainForm inherit anything? Not totally sure about the vb syntax, but the handles MyBase.Load makes me thing of that. If yes, what does the base class do?
not that I know of, and Visual Studio won't let me navigate to MyBase
09:33
weird
user868935
Hey all
@cybermonkey: might be something happening in the parent class constructor.
yeah, that's why I'm confused, thinking of just recreating the form
user868935
Any WPF people here? I'm trying to generate functions automatically, but forgot how it works
Unfortunately me not.
09:39
@SpicyWeenie Just ask :)
Can I ask to ask to ask a question to ask a question?
@scheien May I ask why you want to ask that?
user868935
@Loetn Ok, how do you generate functions automatically after a component in WPF? My components are <sharpGL:OpenGLControl
OpenGLInitialized="init"
OpenGLDraw="draw"
Resized="resized"
@SpicyWeenie Eeuh what? I've no clue.
09:59
If anyone here has a Windows 10 Pro key (from MSDN or something) that I could use for personal use, I'd be much obliged! I want to install it onto a new HTPC machine but paying $200 for it is a bit.. much.
@RoelvanUden Buy a cheapo Win7 or 8 key, and use the free upgrade?
I don't want an upgrade. I want a clean install :P
Then you pay for it :D
You have to pay for the "free" upgrade too.
@RoelvanUden Buy a cheap W7/8 key, install W7/8, update, remove and install W10? :)
10:08
AFAIK you can't use an 'upgrade' key on a clean install?
@RoelvanUden No, but your installation is bound to your account
When you install, it checks your license on your account
When you use an online account ofcourse.
Don't know how it works when you use a local account
Well that's silly.
Hi All
I am facing one issue with sequence of c#. I have two if condition , which throw exception if true and after that there is one try catch block. Issue is - My first conditional statement work fine and the second block always process with true
even if the condition is false
if I change sequence of second conditional block to first, it exceute first proper
and second as true always
can any one help
how to resolve this
if(Mycondition)
{
throw error;
}

if(anothercondition)
{
throw error;
}

try
{
// code
}
catch
{
//code
}
10:27
@Roel @Squiggle @Tom @rest \o/
Hey. Im trying to open a new form and check its parent-name. In visual studio it works fine. When starting the compiled .exe it gives me a null-reference-exception at this point. How is it possible that there are differences?
@C4ud3x have you switched between debug and release?
Oh no. Let me try.
No error.
The context: I got a userControl which should be able to "pop-out" of the main form.
When the popup-form is shown, the userControl.Load-Event is raised. There Im trying to get this.Parent.name which works inside VS but not outside.
@SebastianL Ah I got the problem: Im trying to if(control.Parent.Name == String.Empty) but its actually NULL.
10:45
I keeeeeeeeep finding helper classes everywhere that wrap basic functionality. I'm losing my mind man
Just found a JS file which wraps a jQuery addon
This helper has no documentation, the addon has plenty.
Wtf is the point.
/wrists
@Sippy to confuse other devs normally
@Sippy no u
ok
1st day new job. Organisation fail.
got my kit. Nobody knows what they want me to do
Decent.
Sounds a lot like my job
Well, my old job
10:56
laptop is nice
well, it's a laptop. But as they go, it's a good one
office fairly quiet
Hi guys I've got to encode up paeans using a custom encryption. What's the best method of decoding and bind to a model? Overriding the binder?
what's a paeans?
@BenjaminDiele So let's expand a one liner to loads of lines
@BenjaminDiele: some pretty awesome code right there
need moar loc!
11:11
I think it's kinda cool
@BenjaminDiele that's beautiful
@BenjaminDiele is that from your codebase? That deserves to appear on thedailywtf.com for sure.
Nah, got it from a colleague that most likely found it on reddit :)
aww
At least it's documented, right?
Wait, it doesn't apply any colour styling if there's only one item in the list.
@Squiggle Maybe the default color is c2?
@Squiggle It's smart yo
11:29
@BenjaminDiele i was sick a bit
I think I'm gonna do a solution-wide search and replace for <summary>.*</summary> to [This is preliminary documentation and subject to change.]
the comments that are there only serve to confuse and mislead me
12:04
heyy
sup all
o/
12:23
if I use AssemblyVersion("1.0.*") to version my assemblies then can I get msbuild to return the version that it generated?
haha
Panasonic 48" LED TV - only £30.46 per kilo
and it weights 150kg?
guys if i want to include a dfmirage driver in my project
is there any change i can only include the dlls file? or do i need to include the whole instalation too?
@Slashy no idea. Have you tried either approach?
which is?
@Squiggle
12:31
@Slashy like, including the driver.
what do you mean man? @Squiggle
@Slashy how are you intending to actually use this thing?
Shouldnt i also add the driver instalation?(i realy dont want to do that)
this is for a screen sharing program
¯\_(ツ)_/¯
kung fu?
12:33
?
cmon try to help mee :(
@Slashy Did you try it without the driver installation?
@Loetn yep, its throwing an error
@Slashy What error?
that i dont have a mirror driver installed.. etc @Loetn
@Slashy Then you probably have to..
12:36
yes but im just asking if there's any way to include the instaltion
in the compiled exe
@Loetn
@Slashy No, you asked if it was required to add it :)
@Loetn alright... changing my question
You should probably include it in an installer or something.
12:55
Anyone knew you can start a process without an actual exe or binary file on the HDD? and that there isnt a single antivirus program that can detect such a thing?
and the scariest thing about this is, its been described in a paper 3 years ago :O
I thought I remembered reading that it was a 100% cast iron rule in Windows that any process HAD to be started referencing a physical file on disk. Maybe that's historical; maybe what I was reading was wrong
@SebastianL Antivirus programs are designed to catch viruses, not shady programming.
Or there's a trivial workaround that creates a file arbitrarily then runs it
@KendallFrey but thats exactly what i would do if i want to write an efficient virus o.O
If you were to write an actual virus, chances are AVs would start detecting it
12:59
@SebastianL Start a process on a stub in a paused state, alter the PE, add assembly code, and run it. That's pretty simple to do. Hell, you could even make a program that is 'legit', injects some code in another program, and let IT do things.
@KendallFrey there are plenty of viruses that use exactly this technique to gain access to machi ne
@RoelvanUden you dont even need to add assembly code, you can fill in a "virtual" exe
@RoelvanUden add machine code you mean
@RoelvanUden but why arent AVs able to detect those?
if they are doing bad things
@KendallFrey Yes, that.
@SebastianL AVs hook into the kernel for file read and writes and scan binaries prior to processes starting them. There is no way for them to reliably control/read/prevent alterations of memory that just so happens to be ran by a process
It's practically impossible for an AV to catch shady programming. I don't know if any major ones do it properly. Most of the time they just eliminate anything they recognize AFAIK
13:02
Say you download something from the web, extract it in-memory, and run it, you've circumvented AVs as well. It's not hard :P
Yes, it's just heuristics. They just try to detect patterns that are 'bad' and eliminate that (thus only by reading the files, etc).
so if theres not a change in the architecture of Windows they just arent able to prevent this?
Avs do some in-mem stuff but again its all just heuristics as @RoelvanUden said
i just lost my faith in AVs :D
@SebastianL They can prevent the first code from running, thus preventing the injected code from being run
catch (Exception)
{
    //TODO: log message that a field wasn't found.
}
I shouldn't be allowed unsupervised access to a keyboard.
13:09
@SebastianL you just need to remember they are a tool, not a replacement for sensable use of a computer.
@BenjaminDiele pair programming for you, matey.
I mean think what sort of code you would need to make a fool proof AV
@Squiggle More like a disconnected keyboard.
@Alex Making a foolproof AV is akin to solving the Halting Problem
@Alex i knew it isnt hard to evade being detected by an AV but i didnt knew there was a way, where you can evade even if they know you are there
13:11
Come to think of it, has anyone ever tried "mob programming"?
Mob programming is a software development approach where the whole team works on the same thing, at the same time, in the same space, and at the same computer. This is similar to pair programming where two people sit at the same computer and collaborate on the same code at the same time. With Mob Programming the collaboration is extended to everyone on the team, while still using a single computer for writing the code and inputting it into the code base. The mob programming approach was invented at Hunter Industries. It builds on principles of lean manufacturing, extreme programming, and lean...
@SebastianL Well the problem is it would need to understand what a program was tring to do, and im fairly sure current computers just dont have the power to do that on the fly
This is a wonderful start of the week
haha
Haha
@BenjaminDiele No
13:13
It can match pattens, but the problem being a lot of things you would do in a virus are totaly legit things to do in a normal program
reminds me of this classic
enum Bool
{
    True,
    False,
    FileNotFound
};
2
lol
@Alex yes downloading and such things, but i just tried to do a UAC-violation with just inmemorycode and sadly it worked nearly on the first approach
The worst part? It's for radiobuttons "Individual" or "Collective".
13:16
I inherited a project recently with a deleted property that was a string, it turns out it accepts Y or No ... Both will indicate that its deleted.
@BenjaminDiele i bet you find a wrapper for this with a mapping like:
public string getValue(string key)
{
switch(key)
case "Yes"
[...]
case "Off":
[...]
default:
return null;
}
No, it's data I need to fill in for writing to a pdf. Those are the values it accepts :D
lol
But the pictorial representation is good
@Loetn :D :D
13:26
Does anyone here use OneNote?
that's a peculiar coincidence
@KendallFrey me
my condolences
I had just at that moment accidentally opened it because the trackpad on this new laptop is bad
indeed
though I don't like Evernote or Wunderlist either...
13:28
I like it. I don't use it right now because I don't have a Microsoft account keyed to my new work email yet
I like OfficeLens on Windows Phone for scanning whiteboards into documents for OneNote, works nice
also have shared grocery list with household... but that is the extent of my notes usage
OneNote is becoming more widely used here. I haven't really touched it since Office 2003 though. I assume it's changed a lot?
I had one of those Toshiba touchscreen tablets that ran WinXP back in the day.
was useful
@Squiggle One Note is pretty useful, especially with the way it integrates across all devices.
@KendallFrey Im using OneNote. But Im not very familiar with it. ^^
the screenshot shortcut is quite useful
windows + s gives you a crop control that automatically pastes to onenote and to clipboard when released
13:36
They gutted the OneNote app in Win10 though... I really liked the radial menu it had in 8.
hey
can i get a feedback about a question i asked? just want to make sure it's well asked
Cant see any posted question.
okay aha
0
Q: C# scanning image code improvment

SlashyIm working on a screen sharing app,which runs a loop and grab fast screenshots using *Gdi Methods- example here Of course i also use a flood fill algorithm to find the changes areas beween 2 images(previous screenshot and current). I use another small trick-i downscale the snapshot resolution i...

oh btw, random question, how do i disable that useless onenote tray app
Is it a service?
Stop it using the services snapin?
13:45
idk
I don't want to stop it, I want to disable it permanently
start=never or whatever the setting is
That's assuming it's a service
Yes. I'm not sure that it is, in fact.
@KendallFrey if you open it, there is a checkbox at the bottom
open what
The tray popup
@TomW Yeah, but does that actually turn off the functionality?
Says "Start with OneNote" I think, should stop it from opening.
You lose your hotkeys if you disable it though.
hm, apparently yes
@CuddleBunny That's why I want to disable it ._.
Yeah, I just unchecked "Start with OneNote" and clicked "Exit" and it never opened again.
14:07
I'm stuck
@StevenLiekens lol
nope
how do I translate this to C#: "midnight local time, without taking into account time zone adjustments for daylight saving time"
14:31
Console.Write(DateTimeOffset.UtcNow + TimeZoneInfo.Local.BaseUtcOffset)
that?
does that seem right to you?
@StevenLiekens time of day doesn't have a time zone
you can just do 0000 unless DST is in effect then 0100
I need a datetime that doesn't respect DST
because I'm using it to generate revision numbers
and I don't want to get a lower revision number when the clock changes back
Lordy the stock markets are going completely tits-up today.
@StevenLiekens DateTime doesn't respect DST
@ton.yeung yay China :-/
14:41
I need to reproduce what this attribute does when you specify 1.0.*
I just realized I can just dotPeek at the source of the attribute and steal it
The default build number increments daily. The default revision number is the number of seconds since midnight local time (without taking into account time zone adjustments for daylight saving time), divided by 2.
what a terrible version system
@ton.yeung It doesn't know that it's DST...
Yes
@ton.yeung what? no
It will always show the "correct time"
I'd say just subtract 1800 from the revision number if it's DST
yeah that works nicely for me
@ton.yeung You'd also add a bunch of stuff that my approach wouldn't have
My approach doesn't need any timezone kerfuffle
Simply get local time, divide by two, and adjust for DST
What I want to know is, what happens if it's 12:01 AM DST?
@ton.yeung by checking
Not more, less
@ton.yeung Because negative revision numbers are probably bad
they are not negative
@ton.yeung Because 12:01 AM DST is 11:01 PM the previous day
14:51
so it counts the seconds from midnight on the previous day
@StevenLiekens What then, modulo 43200, or?
you still get a positive revision number
ok
@ton.yeung because time of day doesn't know that
in that case, I'd move the DST logic to between DateTime.Now and .TimeOfDay
by the way, I had to use DateTime.UtcNow instead of DateTimeOffset.UtcNow
no idea why
Utc? I thought this was based on local time
14:53
DateTime.UtcNow + TimeZoneInfo.Local.BaseUtcOffset
But why....
just use local time in the first place?
that makes it local time, that doesn't change with daylight savings
no because local time changes back and forth
sure, but you can adjust that for DST too
I need a xanax.
Alprazolam /ælˈpræzəlæm/ or /ælˈpreɪzəlæm/, avaliable as the trade name Xanax /ˈzænæks/ among others, is a short-acting anxiolytic of the benzodiazepine class. It is commonly used for the treatment of panic disorder, and anxiety disorders, such as generalized anxiety disorder (GAD) or social anxiety disorder (SAD). It was the 12th most prescribed medicine in 2010. Alprazolam, like other benzodiazepines, binds to specific sites on the GABAA receptor. It possesses anxiolytic, sedative, hypnotic, skeletal muscle relaxant, anticonvulsant, and amnestic properties. Alprazolam is available for ora...
14:56
@ton.yeung Apparently, they're quite fun to abuse.
@ton.yeung You don't take medicine? wtf
How do I draw a pacman in Windows Forms? There is a DrawArc, but not a FillArc?
See also: Alcohol, caffeine, heroin, kittens
@ErwinOkken flags question as too broad
@ErwinOkken Step 1: Throw that motherfucking WinForms out the window
5
14:58
wut ;_;
It's just a question :P
You can do paths, right?
make the arc into a path by connecting it to the middle
oh thx :p
I know

« first day (1773 days earlier)      last day (3399 days later) »