« first day (3344 days earlier)      last day (1597 days later) » 

11:00 AM
Edgar Allan Poe (; born Edgar Poe; January 19, 1809 – October 7, 1849) was an American writer, editor, and literary critic. Poe is best known for his poetry and short stories, particularly his tales of mystery and the macabre. He is widely regarded as a central figure of Romanticism in the United States and of American literature as a whole, and he was one of the country's earliest practitioners of the short story. He is generally considered the inventor of the detective fiction genre and is further credited with contributing to the emerging genre of science fiction. He was the first well-known...
 
Power over Ethernet.
 
Can't get to spotify
 
hmm im not sure how to name class b and declare class a
 
in this part:
 public B (A source)
      {
          X = source.X;
          Y = source.Y;
          Z = source.Z;
      }
 
11:04 AM
 
A a = new A(x,y,z);
B b = new B(a);
Today I'm in brainfart mode, so I might be wrong
 
here is class A
 public List<REGBDataTable> REGBDataList { get; set; }

        public class REGBDataTable
        {
            public decimal BALANCE { get; set; }
            public int EXMONTH { get; set; }
            public int EXDAY { get; set; }
            public int EXYEAR { get; set; }
        }
class b is
 public class DarkREGBDataTable
        {

            public DarkREGBDataList(REGBDataList)
            {

            }

            public decimal BALANCE { get; }
            public int EXMONTH { get; }
            public int EXDAY { get; }
            public int EXYEAR { get; }

        }
like this?
 
@Adan Why do you even need the second class?
 
isnt there 2 classes? Class A, Class B?
 
You might consider that your second class extends the first one, or both come from a common ancestor.
Looks like it's the same stuff with different name, which is usually a bad thing to have
 
11:07 AM
@Adan Sure, if you want the immutable version created from the mutable one. But is that really what you need? You mentioned something about having a temporary copy to use that won't affect the original - a clone can do that easily as well without a second class.
 
im ignorant to the .Clone()
neve rheard of it
 
@nyconing POE
smart girl
its actually poe
power over internet
so we dont need an extra energy cable
 
You've been playing Path of exile all this time Hans?
and you didn't know it?!
 
No
 
ARE YOU SURE
 
11:09 AM
ima google how to clone a class in c#...
back to square 1
if i use clone, do i have specify that i want it immutable?
 
May I ask what are you trying to achieve exactly?
In short, what do you want to get from this 2nd class.
Just a place to update data without affecting the original object?
 
the 2nd class contains the original values of the mutable class 'A'
 
@Hans1984 ethernet.
 
class 'A' will be mutated in a loop called 'test'
 
Let's say I have dog1 and dog2, so I update dog2 and give it 5 legs, but you want dog 1 to have 4?
 
11:11 AM
however, A is mutated after the first test
class B has the original values
 
OK so you just want a backup of your class
 
so the loop can continue to iterate tests until the 'while' loop conditiion is satisfied
yes
exactly
 
@AvnerShahar-Kashtan yes of course.
 
it's as easy as doing Class backup = new Class(original.x,original.y,original.z);
don't do Class backup = original;
 
what is 'original' ?
 
11:14 AM
whatever is your original object isntance that is going to be updated in your tests
if you want to create a clone, follow Avner's indications though
but seems like this should be all you really need.
 
Unless your object is BIG.
 
i just dont know how to implement it
 
For some reason I can't see any values in the debugger, and there must be. myMonth should equal 12.
But the debugger stays empty
 
@CopperKettle Aaaaaaahhhhh don't use VB's old naming conventions. Don't add cls prefixes to every class. They're classes. You don't need the name to know that.
 
11:16 AM
what do you think of this Avner?
public static List<T> CloneList<T>(List<T> oldList)
{
    BinaryFormatter formatter = new BinaryFormatter();
    MemoryStream stream = new MemoryStream();
    formatter.Serialize(stream, oldList);
    stream.Position = 0;
    return (List<T>)formatter.Deserialize(stream);
}
 
@AvnerShahar-Kashtan I'm just following the convention used by the author of the textbook )) "Beginning object oriented programming" by Purdum
 
@Adan you receive data, and instance an object of this type, let's call it data. This is the object you'll loop your tests into which will be modified. Before you start looping, just create a new instance, let's call it backup, which takes the properties from original.
 
@Adan This will work only if T is serializable.
I usually use the Json serializer to for cloning, since I'm usually already invested in having my objects be json-serializable.
 
for c# is it by default?
for my class A that i posted earlier
avner, what do you think of this?
it's as easy as doing Class backup = new Class(original.x,original.y,original.z);

don't do Class backup = original;
 
@Avner I'm still thinking, does he really need that copy feature? Given the example for class A and B, there are only 4 properties, 4 numbers in essence, what advantages would he get from a deep copy mechanism?
 
11:20 AM
@Adan That's exactly like my "create an immutable class B" suggestion from before, only instead of class B, have class A know how to create a copy of an instance of A when you get it in the ctor.
@HéctorÁlvarez Ah, it's probably unnecessary here. I suggested it before I knew the scope of the class.
 
Oh right.
 
we okay with this then?
	public class A
{
       public int X {get;set;}
       public string Y {get;set;}
       public List<bool> Z {get;set;}
}
public class B
{
      public B (A source)
      {
          X = source.X;
          Y = source.Y;
          Z = source.Z;
      }

      public int X {get;}
      public string Y {get;}
      public List<bool> Z {get;}
}
i just dont know what class B means
 
yes, but again, no need for class B, since it's the same as class A
 
how do i implement then?
Class backup = new Class(original.x,original.y,original.z);
?
 
I think he's using some sort of injection so he has to use class A
 
11:25 AM
@Adan Class A ctor
 
or something similar anyway
 
you can make class A derive from class B
 
I know where you're struggling right now
@Wietlol that's not what I'm aiming at, he's almost there
 
@Neil scroll up, i just wana make a simple backup of a mutable class, so when i play around with the mutable class, class B can restore class A's values
 
@HéctorÁlvarez what are you aiming at?
 
11:26 AM
I'll give you another tip because you're paying attention, but are clearly blocked
 
Class A, mutable, original values --> while loop {for loop} --> Class B restores Class A values
 
  public B (A source)
  {
      X = source.X;
      Y = source.Y;
      Z = source.Z;
  }
Try to translate that into class A
BTW I have to ask, this is homework isn't it?
 
Monrnign children
 
afternoon lee
 
I mean, are you actually implementing this in a live environment or is it an exercise
 
11:28 AM
nope, i came across this problem on a personal project
 
oh I see
right, can you guess the solution with that last tip?
 
morning wiet
 
@Adan seems like overengineering a bit
 
yes im working at that as we speak
 
11:28 AM
evening captain
 
all you need is to be able to make a copy of a mutable class
it will only be changed if you change it
 
@Neil right.. since im a beginner at this, i have to look at my class and see how to do that, i have to write new code
 
@Neil still, having immutable classes is a bless
even tho the mutable class has the same api
 
@Wietlol seems a lot of extra work just to be able to say that your copy is "readonly"
 
that's c# for you
in javascript you do this: const hello = 5;
 
11:31 AM
well it's relative. For all intents and purposes, a mutable class that you don't change could be mutable or not. It's not really relevant
heck, sharing a mutable class across multiple threads isn't a crime if you're not changing it
 
@HéctorÁlvarez i got this so far
public class List<REGBDataTable>
        {
            public int X { get; set; }
            public string Y { get; set; }
            public List<bool> Z { get; set; }
        }
        public class B
        {
            public B(List<REGBDataTable> source)
            {
                X = source.X;
                Y = source.Y;
                Z = source.Z;
            }

            public int X { get; }
            public string Y { get; }
            public List<bool> Z { get; }
        }
 
Our new office chairs have arrived
They are the same type of office chair I had at my last job
aka, 15 out of 10 chairs
 
@Neil depends, in many cases, you dont need mutation
 
excellente
would recommend
 
95% of my classes dont have a mutable variation
 
11:32 AM
@CaptainSquirrel Meet the new boss. Same as the old boss.
 
and it helps me a lot in not breaking things because of mutation
 
Hello guys i have this method to refactor
 
@Wietlol well in this case he does
 
@Adan that's rather deep copy
 
public double GetStandardLevel(TurbineCurtailment curtailment) {

if (curtailment == TurbineCurtailment.Default) {
return 0.0;
}
if (curtailment == TurbineCurtailment.Noise) {
return 0.25;
}
if (curtailment == TurbineCurtailment.Bats) {
return 0.15;
}
if (curtailment == TurbineCurtailment.Shadow) {
return 0.1;
}
if (curtailment == TurbineCurtailment.BoatAction) {
return 0.5;
}
if (curtailment == TurbineCurtailment.Technical) {
return 0.5;
}
if (curtailment == TurbineCurtailment.Grid) {
return 0.5;
i just did like this
 
11:32 AM
@Neil my body has longed for this office chair for a while
now it is happy
 
@Adan Where did your class A go?
 
public class TurbineBase
    {
        private const double Df = 0.0;
        private TurbineCurtailment _param;

        public TurbineBase(TurbineCurtailment param){
            _param = param;
        }
        private static readonly Dictionary<TurbineCurtailment, double> _dics =  new Dictionary<TurbineCurtailment, double>
        {
            {TurbineCurtailment.Default, Df},
            {TurbineCurtailment.Noise, 0.25},
            {TurbineCurtailment.Bats, 0.15},
            {TurbineCurtailment.Shadow, 0.1},
 
@CaptainSquirrel congrats, so long as they're comfy
 
@HéctorÁlvarez this is class A
public class List<REGBDataTable>
        {
            public int X { get; set; }
            public string Y { get; set; }
            public List<bool> Z { get; set; }
        }
 
Ours are your typical armless office chairs, except that you can't adjust the backing
 
11:33 AM
3 hours ago, by Avner Shahar-Kashtan
@SpedoDeLaRossa You can press Ctrl-K to format code properly. You can edit your last message (press Up arrow) and do it.
 
@Neil and in that case, making a derived mutable class would be my solution, because you still maintain the immutability throughout the rest of your code, where the assumption of immutability remains
 
and i just get the value by doing so var test = new TurbineBase(curtailment).GetTurbineValue();
 
i would like to have a feedback about my solution and if there is a btter way to do that
 
Mine is a DXRacer F-Series because I'm at home
 
11:34 AM
@Neil You can adjust basically everything on this chair
 
@Wietlol that's more elegant, I'll admit, but it's still an extra class
 
gime a minute
i messed up
 
yeah its working now we can finally catch those quirrels
 
not to mention, to copy back changes from the base class to the derived class means copying them one at a time
you can't (/shouldn't) just upcast
 
11:35 AM
extra classes are a good thing, assuming you dont write unnecessary behavior and dont duplicate code
 
@Adan I must admit I've never seen something like class List<T> before
 
@Wietlol I agree. And I digress on what you consider to be unnecessary behavior
 
@HéctorÁlvarez update:
public List<REGBDataTable> REGBDataList { get; set; }

        public class REGBDataTable
        {
            public decimal BALANCE { get; set; }

        }
        public class B
        {
            public B(REGBDataTable source)
            {
                BALANCE = source.BALANCE;

            }

            public decimal BALANCE { get;}
        }
 
if you write classes because you want a feature that you are not going to use, that is unnecessary
but if you write classes that dont bring any new features, but instead separate concerns more, then that is not unnecessary
 
We basically have the super comfy ones you can get in costco
 
11:37 AM
@Adan now that makes sense
 
I once had a colleague who was very much into YAGNI, which... took it a few steps too far
 
im getting warmer <3
i hope this works
 
OK so next tip: Forget class B exists.
 
almost up to the point of 'we dont need good naming yet'
 
11:38 AM
you may as well comment it out.
 
okay
 
can i get some help from you guys :$
 
You want "feedback on your solution". We are not a code review site
 
just want to know what can i do better
trying to make refactoring
 
looks comfy
a good chair to sleep
or fap
or eat
 
11:40 AM
@Kob_24 it looks like a good refactoring
 
or play games
or....
 
@Wietlol thank you man
 
@CaptainObvious it still amazes me that you have your screens setup like that
 
work !
 
@Kob_24 your varaible naming is a bit crap but otherwise looks fine
 
11:41 AM
although, you dont need to make new instances every time
 
We have these
 
@CaptainSquirrel Why? it's super useful
 
@Adan I assume you know about OOP or are you learning how to C# on the fly?
 
comfy as fook
 
Ew that looks horrible
 
11:42 AM
yes i know the difference between OOP and functinal (js)
 
you could make a class which contains that dictionary, then expose a method double GetStandardLevel(TurbineCurtailment curtailment)
 
we have these
 
@CaptainObvious Everything is adjustable
 
In other words, did you copy the code from some place and then edit it, or do you actually know how to create a class and all the properties?
 
@Adan JS is also OO
 
11:42 AM
And to be fair, we've had really crap chairs for the past however long
But these force you to sit correctly
 
I don't know why but this company has always bought really nice chairs
 
@CaptainObvious what do you think of my chair?
 
Makes sense I suppose
 
Happy employees === better productivity
better productivity === better performance
better performance === £££££££
 
Yeah exactl;y
 
11:43 AM
 
This question isn't to shame you or anything like that, it's critical for me to understand how you came up to the conclusion about classes A and B.
 
That's why I have to much screen space too
More screen space = more work done
 
lmao
That's true
 
Because it looks like you are trying to learn on your own, and you may be missing a few basics, like how constructors work.
 
I now have 3 monitors again which is nice
Even if one of those monitors is my laptop
 
11:44 AM
Yeah but 4
And none of mine are a laptop
Because I have a real pc
 
@HéctorÁlvarez i dont have an ego, i AM a shit programmer so i never took a class to learn all the nomenclature and function, i have gotten by for 2-3 years just doing this on my own
 
Mate, we can JUST about fit the two 27" monitors on these desks
 
Ew 27"
 
And we have to have a specific dock to run them
 
I hope they're 1440p or higher
 
11:45 AM
4k
 
Oh christ you're one of those guys
 
@CaptainSquirrel Did you have to ping me for this? :<
 
Hey I can get on board with that. My home setup is 2x 27"@4k
 
@Squirrelintraining ............yes
 
11:45 AM
@Adan OK that's cool, no problem. So here's one more tip: A class can have 1 or more constructors, but never 0. If none are specified then a default one will be added automagically, but you can't see it! :)
In this case you need to add an extra ctor to class A
Show me class A agian
 
@CaptainSquirrel I understand
 
@Squirrelintraining I didn't even get an email. I'll probably find out about the ping later
 
puts on hat
walks slowly away
 
what is a constructor?
 
I kinda want to get new monitors for home
 
11:47 AM
@CaptainSquirrel the "one of those guys" was about people who run about a bazillion things of a dock connected by usb to the laptop and it all runs like dick and the laptop is trash
 
@CaptainObvious not my choice
 
how slowly
?
 
@Adan The opposite of a destructor.
 
Can't run two of these monitors without the dock
Laptop isn't powerful enough
 
You should ask for a real pc
 
11:48 AM
 
@Squirrelintraining what is a destructor?
 
Real PC = better cpu performance = better employee performance
 
Literally no one in our office has a desktop pc
Everyone is running on laptops
 
Oh god the horror
 
I think my laptop runs kinda shit because of thermal throttling
 
11:48 AM
Do you even move around
 
the fuck
 
But working from home is easier
And also oncall
 
I can do that
 
@HéctorÁlvarez public List<REGBDataTable> REGBDataList { get; set; }

        public class REGBDataTable
        {
            public REGBDataTable()
            {

            }
            public decimal BALANCE { get; set; }
            public int EXMONTH { get; set; }
            public int EXDAY { get; set; }
            public int EXYEAR { get; set; }



        }
 
11:48 AM
Just remote to my desktop
 
im actually working on a mini pc
but i think i've told you before
 
Problem solved
 
if i get a call at 3am & need to work on a fix, i can just pull out the laptop and tap away
 
yeah its as shitty as it looks
 
11:51 AM
atleast it saves energy
yay
\o/
 
@Adan Ha, we found the reason of your confusion. Understanding the parts of an object is critical to understand OOP, so I think you should take some time to read online about some theory, now that you have some notions of how code runs around.
 
I cant do windows updates because my HD is too small
thats how shitty it is
 
damn son
that's bad
 
yup
 
Instead of pointing at the actual constructor, I'll kindly point you to Google, let's see if you can point out where it is.
Take your time
 
11:53 AM
but for such a small box its doing a pretty good job I think
no noise, you can run it 24/7, no crashes
low energy demand
 
mr5
@Hans1984 looks like an Android box TV
 
does it ?
 
mr5
Yeah. I'm working on one
Pretty decent performance also
 
well it has everything you need for normal computer usage
you can connect keyboard,mouse,screen,ethernet,headphones,energy
+ 3 usb ports
 
mr5
Does it come with network port/WiFi also?
Oh
No bluetooth?
 
11:55 AM
yes you can also use wifi
cableless
we call it W-Lan in germany
 
@HéctorÁlvarez k give me a min
 
so given the small amount of space
they really put a lot into it
 
@HéctorÁlvarez public Employee(int i, String n,float s)
        {
            id = i;
            name = n;
            salary = s;
        }
 
Nice.
@CaptainSquirrel Do you even VESA?
 
@HéctorÁlvarez wat
 
12:05 PM
Also, same error on Spoti
 
@Wietlol the opposite of a construcotr
 
12:23 PM
Guess who overslept and STILL made it to work at an adequate time??
I got one of those heaters for my room so I slept way better; just wish I wasn't so occupied last night
 
Jim from down the street?
 
user10864482
good moarning
 
I got to work late today. Car had a flat tyre & couldn't get any taxi's
I wanted to work from home but boss said I had to come in and suggested walking
So walk i did
 
I envy people who can walk to work
 
I won't really be able to soon
Not without going on the train first :(
 
12:26 PM
@AlRey Not me, cos someone whose name I'll keep private knocked on my door before my time to wake up and asked out loud "HECTOR YOU ARE GONNA BE LATE".
Mind you, I still slept an extra 10 minutes and then woke up, because I wasn't late.
@CaptainSquirrel For a moment I thought you'd lose a leg. Dude don't do that.
 
@HéctorÁlvarez lmao, hopefully that'll never happen
 
I also thought about this, for some reason:
23 hours ago, by Hans1984
https://i2.wp.com/www.foodrepublic.com/wp-content/uploads/2017/05/Screen-Shot-2017-05-11-at-4.22.18-PM.png .
 
oooooo
sunday roast in a yorkie pud
tasty as fook
 
I too was late for wotrk today
Had to go and perform my democratic duty as when I get home from work I'm gonna be playing Transport Fever 2
 
V.7
@CaptainObvious Check out TClock
 
12:30 PM
I'm going to vote when i get home
 
V.7
 
Luckily the polling station is 5 minute walk from the house
 
@V.7 my taskbar is 2 levelled anyway
 
V.7
It might support that
 
12:31 PM
o yea last night got a new fat ps2.....and the clock works so those heavenly orbs spin like they're supposed to
it's not quite as fast at reading discs as my slim model, but it's still good
 
@CaptainObvious oh god you have the icons AND the text?
🤮
 
I just noticed 7 years ago we were on 12/12/12, it will be 82 years until we see something like that again...
 
I need the text because I've got too much shit open usually
 
my boss does that, but at least he limits the taskbar to one row
@HéctorÁlvarez that day was my brother's 12th birthday
 
That said, I usuually can't see enough of the text to know what it is anyway
Anyway, brb going to butchers for some nice f00d
 
12:33 PM
@CaptainObvious bring me some too!
 
pls
I'll gib moneis
20p
 
V.7
@HéctorÁlvarez That's what made people scary about. Maya calendar or such which ended at 12 12 12
Although, some think this was civilization's next level moment
 
@V.7 12/21/12
 
Next level drugs, like the dudes that wrote the Bible.
@AlRey that's 9 months later than 12/12/12
 
12:38 PM
...
point is it was actually the 21st
and the fact that so many people actually believed it just proves humanity's eternal stupidity
 
V.7
12:50 PM
 
obviously it was all darkness
 
that is singularity
our space, our time, all the events is starts by big bang
there is no event before the big bang, because singularity dont exists law of physics
hence ??
 

« first day (3344 days earlier)      last day (1597 days later) »