« first day (3620 days earlier)      last day (1320 days later) » 

4:03 AM
hi nerds is there any way in Xamarin / MVVM application not to doing getter/settrs in the view model?
 
mr5
4:56 AM
I just profited from my BTC by ~0.041USD. Should I cash it out now?
@c0dem0nkey wym?
 
5:16 AM
@c0dem0nkey You would need to send the object to the constructor when it's created
 
mr5
BTC is rising rn @Freerey
 
morning.
@c0dem0nkey What do you have against getters and setters?
 
I'm pretty sure he's trying not to "break encapsulation". Which is a strange question because I've used this concept more in java then in C# but I'm sure there's a concept bleed over
 
public properties aren't breaking encapsulation - public properties are the public API.
 
Yeah, I'm not sure you're breaking encapsulation with MVVM because the data is being controlled by the business logic
 
5:26 AM
Public properties on viewmodels are precisely the mechanism by which viewmodels expose binding points to views.
 
mr5
while we're at it, what are your thoughts of a model, esp., ViewModels, to received event from its property : INotfyPropertyChanged?
 
I'm in the same boat as you. I'm not sure why you would want to avoid them. Encapsulation would be my only guess why
 
@mr5 Not sure what you mean. Is it a model or a VM?
You mean, I have a VM with a different VM as a property, and I listen to its INPC?
 
mr5
@AvnerShahar-Kashtan supposed you have a binding like this in the XAML: {Binding VmProp.ModelProp}, and in the VM, that actual property implements INotifyPropertyChanged. I was thinking if it would be ideal to receive such event on the VM (who owns the VmProp) in case one of its property have changed.
 
Binding to a property on your viewmodel's property is a violation of the Law of Demeter. If you're a PotatoView and you're binding to a PotatoViewModel, the PotatoViewModel should expose the data you need. If you need a subproperty, you might be exposing your implementation here.
 
mr5
5:43 AM
hmm, okay here me out with my case. I am designing a library called PropertyValidator. It's a, property validtor, where the class/model would be able to listen to an event where a property was detected invalid. In one of my recent projects, I have encounter a case also where a model has a lot of property, so me, doing the usual thing, copies all the property from that model to the VM and I ended up bloating the VM, to which my colleague suggest if...
...we can just reuse the original model as a property but I still refuses cuz it won't definitely work for two-way bindings.
but since I'm implementing this on a dedicated service with dedicated event to trigger, would it be "nice to have"?
 
Ok, first of all, if the VmProp is a domain prop (let's say PotatoViewModel.Variant) but hte model prop is a technical property, not a domain property (say PotatoViewModel.Variant.IsValid) than I don't think the LoD is relevant. That's like saying you shouldn't check a string property's Length. That's not exposing implementation, as much as using a piece of "plumbing" to manage the binding process.
The question is, what are you validating? If your logic says that if Variant is undefined, then the entire PotatoViewModel is invalid, then yes, the VM itself should raise the Invalid property change event. If it's just the VariantViewModel that is invalid, that should raise hte NPC event.
Let your domain and UX logic dictate the design, not some abstract "MVVM" principles.
 
mr5
So, are you agreeing somehow that {Binding VmProp.Variant} is acceptable in my case?
let's say, it's just a one way binding or target-one-way binding, i.e., write can be made from the UI level only.
 
If your DataContext is a PotatoViewModel, it makes sense to bind Variant, or to bind to Variant.IsValid if you're trying to mark a variant as invalid.
 
mr5
what if my DataContext is SophisticatedAndElegantViewModel?
 
My distinction is between domain/businesslogic properties, and technical properties.
Your view should be getting the domain data it needs from its viewmodel - that's what the viewmodel is there for.
 
mr5
5:56 AM
@AvnerShahar-Kashtan this sounds, you're suggesting a potato programmer would only make that's why I asked ๐Ÿ˜‚
 
If your PotatoViewModel can be invalid, and the logic by which this is determined relies on a dynamically changing property of one of its properties - sure, listen to the property's INPC and update accordingly in the VM, because that's not the view's business.
 
mr5
yeah right. I was actually having a hard time thinking of a case that uses that kind of binding backed by a sane UI. An aggregated error message would not be ideal UX though.
 
But if your PotatoViewModel exposes a subproperty that has its own validation logic and that can be invalid, you might want to bind to its IsValid to mark just that part of your UI.
 
mr5
so I also have this for the purpose: .AddRule(e => e.PhysicalAddress, "Deez nuts", new AddressRule())
where e is the VM, and PhysicalAddress : INPC
since in my assumption that an aggregated error message would not be ideal UX, should I make the 2nd parameter be just an Exception instead?
 
Incidentally, why not simply use the existing INotifyDataErrorInfo mechanism?
Don't build your VM with a specific UX in mind. Have the VM expose the data, and let the view decide how to present it.
 
mr5
6:14 AM
yeah it will go there. Reporting an error as a single string from a multi-prop model seems off now that I think about it.
 
6:31 AM
Hi All, Getting error while creating selfsigned certificate
New-SelfSignedCertificate : A parameter cannot be found that matches parameter name 'Subject'
Any idea ?
 
mr5
it seems you're missing the Subject argument from the invocation of the command.
 
Hey guys! Any idea what height:inherit does in ASP?
 
New-SelfSignedCertificate -Subject โ€œxxxxโ€ -DnsName โ€œxxxxโ€, โ€œwww.manh.com<http://www.xxxx.com/>โ€ -CertStoreLocation โ€œcert:\LocalMachine\Myโ€ -KeyAlgorithm RSA -KeyLength 2048 -KeyExportPolicy Exportable -NotAfter (Get-Date).AddYears(10)
This is the command I am using
 
mr5
@tHiNk_OuT_oF_bOx have you tried this solution: stackoverflow.com/a/35924560/2304737?
@d4rk4ng31 in css, it means, to inherit the property of its parent.height value.
 
@mr5 Hmm, then why doesn't <div style="display:table; width:100%; height:inherit"> fill the whole page?
 
6:42 AM
Because CSS is so horribly overcomplicated.
 
๐Ÿ˜…๐Ÿ˜…
 
mr5
@d4rk4ng31 height:100% works for me.
 
No man! Tried that
 
mr5
remove the display property
why are you angry?
 
I ain't angry.... Why did you feel so?
 
mr5
6:45 AM
I feel it.
 
No idea man :) I ain't
@mr5, Something like this: <div style="width:100%; height:100%"> you mean?
 
mr5
@d4rk4ng31 yes
 
Nope man. Does not work :(
 
mr5
add a background-color to confirm
 
Chrome messing up?
:50446218
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>payments page</title>
    <style>
        #tab-div {
            float:left;
            width:30%;
            height:100%;
            background-color:red;
        }
        #form-div {
            float:right;
            width:70%;
            height:100%;
            background-color:blue;
        }
    </style>
</head>
<body>
    <form id="payments_form" runat="server">
        <div style="width:100%; height:100%">
 
mr5
6:48 AM
I'm using Chrome and it's working
 
I have posted the code
 
mr5
what is the form.height, form.display values?
 
CSS's box model is a mess, as I said, and you always have to see what any container you're in dictates. Use the browser dev tools to examine the entire chain all the way up.
 
mr5
@d4rk4ng31 this is not asp though, it's html
 
As @mr5 says, your div's height might be 100%, but that's 100% of its container, not of the page.
 
6:50 AM
@AvnerShahar-Kashtan Oh!
@mr5 What are these?
I am new man. Please bear with me :(
 
mr5
that is the parent of the div you're referring as shown in your code.
sends bears
 
The div has no parent
 
Yes it does - it's inside the <form>.
 
mr5
it has a parent
 
Oh! that one
Hmm.. wait
 
6:52 AM
@mr5 Yes I tried. but no luck
 
How does one find out those properties?
@AvnerShahar-Kashtan Hmm.. I tried this
It says 965.5x0
How do we change that?
 
step up the containers in the Elements tab, see the body's height, then the form's, then the div's, and see where things go wrong.
 
Okay :) Thanks man!
 
mr5
@d4rk4ng31 I run this code in Windows Chrome and have the entire height occupied.
 
:(
Preview Build bugs?
 
6:57 AM
Ugh, checked out the 10-day weather forecast and there's still no relief in sight. Still ~30°, day or night.
 
Also, what is aspNetHidden class?
 
mr5
btw, you can use the "upload" button and just directly upload the image from there.
 
@d4rk4ng31 Stuff that ASP.NET adds when you add runat=server.
 
@mr5 Hmm... that's strange
 
mr5
something is overriding your page's element properties.
do you have some script?
 
7:01 AM
No
Hey!
Edge runs it perfect
Time to ditch chrome I guess
 
mr5
they use the same rendering engine now though
so it should be the same result
 
Yeah, that's what
Strange man, very strange :(
Ah! Now found the problem
@mr5 There's this (unknown menu) script debugging which is enabled by default. I disabled it. Now even chrome works :)
Thanks tons guys :)
@mr5 What does that do anyway?
 
mr5
like, window.height = 0
Comments from 9gag says this is just Metallica lip-syncing Pokemon but his gestures and lip movement is spot on though.
 
7:36 AM
In this code, does the CellPadding attribute override the table-cell class?
 
You're seeing exactly the reason why WebForms went out of style. asp:Table is a server-side attribute that is rendered, at runtime, to an HTML <table> tag - probably. You're trying to match a CSS style to what is probably rendered as an inline attribute on the resulting <table>. Maybe.
This sort of uncertainty - where you're writing server-side elements alongside "plain" client-side elements and can't be sure exactly what gets rendered until you try it - was a source of endless frustration, and one of the reasons Webforms was eventually deprecated in favor of a cleaner model.
Cleaner? Maybe. But different, anyway.
 
Hmm.. Okay. Got that. Thanks :)
 
mr5
oh that's horrible framework.
glad I didn't use it :)
 
Aww man. I am a newbie
 
mr5
start in Razor/Blazor already then.
That's the future!
would you like to be a frontend or backend guy when you grow up?
 
7:46 AM
@d4rk4ng31 As a newbie, I can heartily recommend you don't start using a framework from 2002 that was gently deprecated over the past decade.
 
@AvnerShahar-Kashtan Try telling that to my college XD
 
Morning lads
 
mr5
Google Search result should really step up to prevent the newbies to avoid those deprecated techs!
 
Assignments are assignments
 
mr5
giff us the name so we can DDoS your college
searches Google how to DDoS
 
7:48 AM
@d4rk4ng31 Yeah, there's no helping that.
 
@mr5 pict.edu XD
 
mr5
Distributed Denial-of-Service is I think the most badass jargon ever produced in CS.
@d4rk4ng31 ping pict.edu -t incoming...
 
hahaha
 
mr5
@d4rk4ng31 even the website is bollywood inspired ๐Ÿ˜‚๐Ÿคฃ
 
Lol
 
mr5
7:58 AM
is it common in Mathematics to scale values through division?
I usually done it through multiplication in code but I've seen a popular video where he uses division as a way to "scale"
 
Dunno. I don't do math.
 
mr5
Math, I wish I know more Math.
 
What do you mean by "scale". Let's say, if your relevant numbers are huge (say, in the trillions), you simply divide them all by 1,000,000, and do all your calculations using the floating point representations?
 
mr5
It seems easier to express something in formula rather than writing lines of code.
 
Once the average numbers scale to the quadrillions, divide everything again. Because at this scale, a number that's in the thousands is equivalent to zero.
 
mr5
8:00 AM
@AvnerShahar-Kashtan yes that's it. But multiplication is a lot flexible imo.
 
You can see it in games like Idle Champions of the Forgotten Realms, or other idle clicker games. Power levels (HP, damage, etc) scale up logarithmically, but the fact that at the beginning of a run you do 50-100 damage, and a hundred levels in you do 10<sup>8</sup> damage is meaningless because everything scales accordingly, and if something doesn't - it doesn't matter if it had 500 or 5000 HP when you do 192,102,412 DPS.
 
mr5
And Mathematicians have it easier to solve a problem describe in words so I envy them.
 
It just sounds like rounding but with more effort
 
It's about choosing focus at the cost of precision. If your app deals with trillions, you can either use a 128-bit integer type or a bigint to store them which is wasteful and slow, or you can lose precision by dividing and then re-"inflate" when you display the results.
 
mr5
I'm preparing for my non-existent interview yet so I search in Google some common programming interview questions and got stuck with "how do you determine if a singly linked list have a circular reference".
I've never used singly linked list since I learned about it.
my first inefficient solutions were try-catch(stackoverflow), "store the memory address of every head and count its appearance"
 
8:16 AM
For my Google interviews I got myself a (*cough*PDF*cough*) copy of Cracking the Coding Interview which was great help, especially because I never studied most of that stuff formally before.
@mr5 Yeah, that's the first thing that comes to mind. Keep a HashSet of all nodes and run linearly over the list, breaking the first time your knownNodes.Contains comes up true.
 
mr5
man, I wish I have the courage to apply in Google. Even the moment I will speak to an English speaking guy frightens me.
 
I mean, I think the last time I wrote code to do BFS vs. DFS scanning of trees was in... 1998, when I was learning C. Never used it since.
 
mr5
@AvnerShahar-Kashtan I think there's more efficient/clever way as I recently discovered that you can efficiently find the mid of a singly linked list by having a slow (hops one) and fast(hops twice) iterator
 
@mr5 Sure, there are usually optimizations. The important thing in an interview, tohugh, is not to start with them.
 
mr5
It never occurred to me when I read about that problem.
but in Google level, you would likely not be hired if you head that way.
 
8:21 AM
The worst thing you can do is look at the question and start thinking of how to do it smartly. Thinking looks remarkably the same as not knowing to an interviewer. Always start by verbalizing your thoughts, saying "It seems like the naive approach would be to do X, which would do it in O(whatever) time". If the interviewer agrees, start writing the naive version. Sometimes just saying it out loud would be enough for the interviewer to say "yeah, but let's see if we can find a better way"
 
i think its more about how you think, not necessarily that you know everything...but knowing some things is important.
 
@mr5 In all my coding interviews at Google (quite a few of them in the process) I always started with the simple solution. If you show you can do that, they'll ask for a better solution. If you can't think of one, they'll give you hints. Good interviewers, as a rule, don't want you stuck - they want to always give you enough to keep going. That tells them a lot more about you.
 
mr5
then you hit the realization you can't come up with a better way and you wish to just melt there instantly.
 
if you didnt know what a linked list was..that woukd be a bad sign. im not sure it becoming circular is common..its normal that you hadnt thought about it (?), but how you think to solve the problem is critical. imo.
 
I hit that wall a couple of times, both in my Google and MS interviews. The interviewers either said "Oh, you could have done X,Y,Z, now let's move on".
 
mr5
8:24 AM
@AvnerShahar-Kashtan hmm, what if I suck at communication?
 
@mr5 Then go work on that, because that's critical for interviews. And also for working in a team. And for life, in general.
 
mr5
@ABuckau as far as I can remember, it can be used in memory management (OS level) or to create a snake game. I did try to use it in snake game but come up with a more easier solution.
 
"common". but sure.
 
I'm not kidding, actually. Communicating clearly is also a skill that can be learned. It can be public speaking classes, trying out improv comedy (those two are remarkably similar), or if the problems lie with social anxiety, a therapist. These are all there to help with exactly those problems.
 
mr5
@AvnerShahar-Kashtan in your resume, do you have a detailed description of every project you've done? Do you also have a portfolio website?
I mean by detailed is, are the words described in high level form?
 
8:32 AM
so, the opposite of detailed? :p
 
mr5
because, that seems to be an indication of well-communicated person right?
@ABuckau :D
 
@mr5 Nope. Just places I'm worked over the years. I've worked as a consultant and contractor for most of my employment so I didn't list every project, but do list every employer.
You can look at it, if you like.
 
mr5
welp, less technical but still detailed
@AvnerShahar-Kashtan where is it?
your website is down.
 
mr5
question, can you apply for a senior position even though you've not been promoted yet before?
@AvnerShahar-Kashtan I am so copying this layout. I like it.
Mine is a little similar but lesser content though :)
 
8:48 AM
You can apply, sure. If you want your CV to be taken seriously for the role, build your CV for it. Frame your role properly. Even if your CV lists "Software Engineer" but you know you did senior-level work there, say it in the text. "Led a team". "Designed and developed".
 
mr5
I have realized that if you're going to apply as a backend, the design of the CV wouldn't matter. My previous CV was inspired by material design so it has the edginess there and the phrase screaming "I'm a frontend guy"
never again.
yeah, I did led the team a lot of the times. I did encourage to code review always even our PM is opposed to it.
I didn't get the promotion (was about to) because of my communication skills.
so I think my backing answer if I get scrutinize is "to pressure myself on improving my communication skills". That should work right? haha
 
@AvnerShahar-Kashtan The IDF does a software course? Huh.
 
mr5
in my non-technical section: Playing games 20hrs a day.
 
I recently redid my CV
 
mr5
@CaptainObvious can I haz te look?
 
8:54 AM
link for the curious - I hadn't really updated my CV since I started my current job in 2015 (whgich is my first real proper job)
So with only having a couple of "previous emploiyer" type entries, I put quite a bit of detail into each one
I eventually decided it wasn't worth updating the original one, and just wrote a brand new one when I was considering leaving my current position a month or so back
 
@CaptainObvious Yup. That's the sum of my formal training in software.
 
mr5
ha! you can hear avni's voice here: astronomitv.wixsite.com/scifieye/post/…
digital divide huh
@Squirrelintraining hear avni there ^
 
Yes, yes, I do indeed have a new(ish) podcast.
 
The A level computing course I did didn't help much with the actual coding itself, which I was already doing, but it did help with some concepts and general software knowledge which I still use
 
mr5
@CaptainObvious so did you resign also?
 
9:04 AM
@mr5 Nah I'm still here, I changed my mind
 
mr5
is this your car @CaptainObvious?
captainobvious have a mansion o.O
are all people in UK living in mansions?
 
no
I see you're on streetview
Note that the street view imagery there is now 11 years old
 
10:03 AM
may I remind y'all that it is still weekend, this chatroom should be ded :D
 
It's sunday though. I work sundays and apparnetly sundays aren't weekends according to Avner
So he's also in work I believe
 
10:46 AM
To be fair, the Hebrew word for Sunday is "yom rishon", literally meaning "First day". It's the first day of the week, and for biblical literalists, it's the first day ever.
 
Hey guys, how do I create the sidebar nav using those # pages? The tutorials simply give upto href, but do not tell where to create the rendered page.
 
Are you still using asp forms?
If so, no idea
 
Yes ๐Ÿ˜…
Assignments are silly man!
 
11:02 AM
@CaptainObvious Yeah, school assignments tend to move... slower than the industry.
 
 
2 hours later…
1:05 PM
 
1:45 PM
That's an unusual use of that template
 
its the big brain version of it
 
that's a highly usual use of that meme
Are you smarter before or after solving a problem?
 
That depends if our lives runs on a Chaosium/Quest for Glory style "increase skill after use" mechanic, or on a more general D&D-style arbitrary-level-up mechanic for attributes.
 
I think that's an interesting question in general but in the context of the meme the last panel the problem is solved through self-talk. This would imply that you increased your skill after use.
You could also point out that if you solved a problem through self-talk did you really learn anything? Or did you already know the answer?
 
The usage I know of for the meme don't talk about a linear progressing of actions leading to enlightenment, but about 4 levels of enlightenment, not necessarily one leading into the other for the same person.
Panels #2 and #3 don't represent any higher levels of understanding. They're just steps taken. And #4 doesn't represent enlightenment, it represents a solved problem.
 
2:20 PM
Maybe it's not the traditional use of the meme but could it be argued that participating in a process to a resolution is in its self enlightening.
If there's a grease fire am I more enlightened to grab a bucket of water or a can of salt?
and is the knowledge of knowing the outcome of any given action a sign of enlightenment
 
3:03 PM
Anyone there?
 
3:31 PM
(removed)
(removed)
 
Hey man!
How does one use anchor tag in asp:Button?
 
3:48 PM
I would strongly suggest not using the asp: family of controls, for the reasons I mentioned before. You can use webforms while just sticking to the server-side versions of the standard controls.
Use <a> and <button> and everything, but with runat="server"
 
 
4 hours later…
7:34 PM
TIL PluralSight has a window for what you can search, not remove, just show up in their search. PSA if you're looking for old tech on PluralSight, Use google.
 
 
3 hours later…
10:26 PM
@CupOfJava that one so reminds me of our previous HR miss, who forced the meaning of "kindly reminder to fill the timesheet" on all possible memes, that was not meant for that.
 
10:56 PM
Nope. This is the hill I will die on
fighting for the structure of this meme
 

« first day (3620 days earlier)      last day (1320 days later) »