« first day (2048 days earlier)      last day (2899 days later) » 

7:00 PM
ohh okay
 
If you're using the bundle/minification stuff in MVC don't both looking at less and sass just yet. Get used to plain CSS first
 
user47589
yeah
 
user47589
one thing at a time
 
with the above example, you might have a blog bundle instead of just a blog css.
which could consist of blog-post.css, blog-list.css, blog-comments.css, etc.
 
@CuddleBunny actually at the moment I bundled everything.. into a bundles/all
I forget who I asked about it.
I was asking if I should do multiple segmented bundles like:

@Styles.Render("~/bundles/styles/bootstrap")
@Styles.Render("~/bundles/styles/jquery")
@Styles.Render("~/bundles/styles/site")

vs

@Styles.Render("~/bundles/styles/all")
 
user47589
7:08 PM
unless your site gets a lot of traffic, it doesn't matter that much
 
would make it easier to remove to test things if they were separated
 
Thats what I thought.
 
why is this header still have a pad of,
 
user47589
combining stylesheets together makes things slightly more efficient but unless you support huge levels of traffic, in practice you won't notice a difference.
 
Okay I think ill propably break them up
what about javascript?
same thing?
 
user47589
7:09 PM
one thing you might consider is combining your non-changing sheets together into a bundle. and things that change frequently into smaller bundles.
 
user47589
because of how caching works, clients will only ask for and receive the small, updated bundles.
 
Hello
Anyone ever had "This project is incompatible with the current edition of visual studio" ?
 
user47589
if you put everything into a single bundle, they will request the entire thing even if one line of script changed.
 
user47589
yes @Froxer
 
hm thats good to know
 
user47589
7:10 PM
what version of VS are you using and what version was the project written in?
 
Basically, i am supposed to do a test for a job. And i cant even load up one of the projects I am supposed to work with to solve it.
 
@Amy what about js though? minimal performance difference as well?
 
I have no clue what the project was written in, but i am personally using VS2015 Community
ops
 
@Froxer usually that issue is the otherway around
 
user47589
@Michael pretty much. its all the same performance bottlenecks, client requesting one big file in one request is cheaper in bandwidth and faster than many smaller requests
 
7:11 PM
Same problem happends on 2 machines
Both with visual studio 2015 community installed.
Tried on my gaming machine, as i play around occasionally on it in visual studio as well. And i tried on my dev laptop
 
user47589
Are you positive you have .Net 4.5 installed?
 
Same issue
 
user47589
Or 4.6.2?
 
I am not sure if i have 4.6.2
I have 4.5 for sure
How do i check easily?
 
user47589
verify you have the very latest framework
 
user47589
7:13 PM
programs and features
 
nope, 4.6.1 seem to be the highest i have.
 
user47589
try installing 4.6.2 and try again.
 
Ok
 
user47589
you might also need .net core. hard to say. you get that error if you don't have the required framework
 
@Froxer what file type is the project file?
 
7:15 PM
could open the proj file in text to see what it targets
 
the .*proj
 
Cant really access it to tell. It is in my solution, but i dont get the usual Properties i can simply go into.
 
in a text editor
 
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
 
4.6.2 is just a preview right now
 
7:18 PM
yea, i saw
I saw, <Reference Include="System.Core"> in the code
Does that imply that i need to get .net core?
 
if it was asp.net core you would have a project.json file and it would be .xproj
 
@Michael - One large file is best, because if you have many files, then there are many requests, and that effects page load times
 
There is a lot of json going on in the solution.
 
is there a sln file? what happens when you launch it?
 
user47589
that sounds like a .net core project
 
7:23 PM
I don't think core can target 4.5, only 4.5.1
 
idk, i see a lot of Json, a lot of cs files, System.Core has been mentioned as a reference
there is a sln file, i am in the solution currently.
I just cant load one of the projects properly.
 
system.core is just a .net dependency
asp.net core would be like Microsoft.AspNetCore.Something
 
are you trying to run a asp.net core project in 2013?
 
no
i have vs 2015 community
 
user47589
7:28 PM
its a project type that isn't installed.
 
I don't think it is core. @Froxer can you create an empty web project and just import the files?
you could run a "modify/repair" on visual studio and make sure the web development box is checked
 
just because he has 2015 community doesnt mean he has the asp core update
 
Exact same shit on 2 machines tho.
 
I'm guessing it is MVC4 or something.
 
I found something in the solution.
The weird part is that most files are either .json / .cs
BUT
(Keep in mind, this is for a junior position for a C# dev position).
### Prepare your environment

Before running the steps, you need to:

- Download and install Visual Studio 2015 to run the tests
- Download and install Java, required by Selenium Standalone Server
- Download Selenium Standalone Server and the drivers (Edge and Chrome)
 
7:31 PM
there are no json project files below core
everything is proprietary
 
I think they're just non-project json files or for something in the JS world.
 
it's either .config .asax or .cs or .settings
make a new project and copy paste the folders/files into the new project directory
and then go into VS, click show all files, and add them to the project
 
ok
Entire new solution as well _
?
 
yes
 
Hello
Turns out that SO chat is actually very pleasant to use on mobile
I did not expect that
 
7:39 PM
More information: pastebin.com/8rxa8Cx7
I kept KitchenSink in on purpose, it seems to be a widely used name on github
 
user47589
its like Hello World
 
What's kitchensink
 
@Froxer I think you're just missing something. Try running the modify/repair on VS and checking some more boxes.
 
Ok
Another thing to note. Idk if it matters.
From their github, i downloaded the package as a zip and extracted it to my projects folder.
 
Can I see the csproj file
 
7:50 PM
The github solution is public
Does that mean that they dont mind it being shared?
 
no you can share it lol
 
Or how is the usual ways with github?
Ok
I am just getting out of prototyping and actually into the real world. So thats why some questions might be retarded.
 
It depends on the license
 
It has a standard MIT license
 
if it is in a public git you could find it in the searches
 
7:52 PM
The MIT License

Copyright (c) 2016 Starcounter AB

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
 
MIT is good
Yeah we know what MIT means
 
Ok, so I can share it without them thinking I am retarded (I am applying for a junior position).
 
You can do whatever you want as long as you don't modify the license
 
MIT is my favourite license
 
user47589
ToolsVersion="4.0"
 
7:56 PM
That's not it
 
user47589
VS 2013 uses tools version 12. i have no idea what version 4 indicates
 
4 is msbuild that shipped with .net 4
 
4.0 is 2010
which used the base .NET 4.0 stuff
 
It's not 2010
Up until .net 4 you would get msbuild by installing the .net sdk
 
Do i need to : Download and install Java, required by Selenium Standalone Server ?
 
7:57 PM
Starting with vs2013 (12.0) you get msbuild by installing visual studio
 
if you upgrade a project to 2010 it added ToolsVersion="4.0" to the project file
 
Because I didnt do step 2, 3
 
user47589
maybe you should follow the instructions you were given?
 
user47589
i thought this whole time that you had.
 
I had not.
 
user47589
7:58 PM
why not?
 
user47589
maybe finish the instructions and try again
 
Because I cowboyed it like usual and didnt look through it properly.
 
You need a cowboy hat and boots
 
user47589
we've been helping you for 45 minutes.
 
I apologize for wasting your time.
 
8:01 PM
It's okay my time has no value
3
 
Everyones time has value
 
Tell that to my boss
My paycheck says otherwise
 
Your boss is retarded.
 
Lol
No just greedy
 
holy mary mother of god not a single test failed
 
user47589
8:04 PM
run the tests again
 
@KendallFrey has won C#
 
Yes but did you test your tests?
 
@Amy I will
 
user47589
see that you do.
 
Before someone creates a TFS work item for it
*shudders
 
8:20 PM
TFS BUG: detected shuddering
 
If I have the following code, why does the rounding produce 10?
decimal num = 10.5m;
var num2 = Math.Round(num, MidpointRounding.ToEven);
Console.WriteLine(num2);
I would expect it to give back 11, if it's rounding 10.5 up
 
MidpointRounding.ToEven
 
@Alex You didn't read your code, did you?
 
that's what that does - makes it round to nearest even number instead of rounding away from zero
 
user47589
8
Q: C# Rounding MidpointRounding.ToEven vs MidpointRounding.AwayFromZero

Carlo V. DangoIn C# Is there any difference in the accuracy of the two decimal rounding strategies MidpointRounding.ToEven and MidpointRounding.AwayFromZero? I mean do both ensure an even distribution amongst the numbers that are rounded to, or is one rounding strategy over representing the rounded numbers c...

 
8:23 PM
Oh, so I need to use the other option
 
user47589
> Depending on the data set, symmetric arithmetic rounding can introduce a major bias, since it always rounds midpoint values upward.
 
@KendallFrey Somehow in my mind, ToEven meant up :)
 
nope, ToEven means "to the nearest even number" - ie: bankers' rounding
 
Isn't that the default?
 
which is statistically superior, but not what most people expect from what's taught in schools
yes - ToEven is the default
 
8:25 PM
@ReedCopsey So, if I just want to round a decimal according to what we learned in school (.4 and below rounded down, .5 and above rounded up), which option is correct?
 
@Alex MinpointRounding.AwayFromZero
will round 2.5 to 3, and -2.5 to -3
which is what people are often taught in schools
but it does introduce bias
 
@ReedCopsey Thanks. Why does that name AwayFromZero keep throwing me off?!
 
no idea ;) it's about as clear as you can get
 
If it's biased, then what's best to do?
 
it rounds it "away" from "0" :) which is higher when positive, and lower when negative
 
8:27 PM
Oh, now it makes sense
 
depends on the scenario
I will often use away from zero if it's just rounded for display purposes, but toeven/default if it's being rounded in something that's used for calculations
 
Ahh, interesting.
So for calculations, best to stick with default?
 
user47589
yeah it becomes important when you're dealing with financials
 
So for financial purposes and calculations, best to stick with default
For display, use away from zero
 
yes, away from zero tends to cause bias towards larger numbers if you're dealing with positive values
but for displaying to users, it's often what's expected
 
8:30 PM
Good to know!
 
@Alex but for god's sake don't mix and match
Our users will double check the calculations if they don't like the result
 
@mikeTheLiar But if you don't mix and match, how can you confuse the users then? :)
 
If we're not showing them what we're using in the calculations they won't be able to verify
 
GF just texted me: I'm going to stop and get some eggs to make cornbread for the chili. We should lift tonight 1:30 PM
I think I might have to marry her
 
Thanks, everyone, for your help :D
 
8:32 PM
Where are the refactoring wizards? lol I have a snippet I want to prevent duplication
 
@KalaJ just post it
 
It's an if statement lol
I want to prevent code dups
 
single if (!initializeOfferCode || AppState.ApplicationInfo.IsFirstTimeAppsFlyerOffersVisit)
 
hmm I think that does work
 
yeah
your branches are exactly the same
 
8:36 PM
@KalaJ I wouldn't have suggested it otherwise :p
 
if(referralCodeAvailable && (!initializeOfferCode || AppState.ApplicationInfo.IsFirstTimeAppFlyerOffersVisit))
 
Thanks @ReedCopsey
 
yeah - if you want to collapse the outer if you can do that, too
and, for the love of everything that's holy, move the brace onto it's own line :p
 
haha
I will just for you :P
 
C# is already awful WRT visual honesty - K&R bracing style only makes it much, much worse
 
8:41 PM
@ReedCopsey one of my biggest annoyances with typescript is the egyptian braces (K&R braces)
 
yeah - it's an awful choice
I'm not a fan of braces in general anymore, but if you're going to use them, at least don't do K&R style
 
tell that to the JS folks
they're messed up that way
 
yup :/
 
user47589
I prefer BSD style, also known as Allman style
 
I've always done it that way D:
 
8:52 PM
If I find myself wanting to put in a bunch of <br /> tags to create spacing between two divs. but really I dont think I want to necessarily increase the margin or padding of either of the two divs, what should I do?
 
Why don't you want to use margin?
 
make a choice and see what looks best
 
@scheien Idk, seems weird. maybe its not.
 
I geuss that depends on what and where.
 
user47589
use margin/padding/border as appropriate to space elements apart
 
9:05 PM
except when it's not available^
:P
Sorry, I'm stuck in mobile mindset lately
 
user47589
if it isn't available, it wouldn't be appropriate to use it.
 
That would be in...html emails?
 
@amy, I can only dream.. I'm so glad they have margin support now for elements. I have to add element to layouts to get padding and spacing
 
hehe
I can imagine that being really cumbersome.
 
Why not just use centering and % widths/heights
 
9:09 PM
Yes very and then I wonder I must be doing it wrong
 
If you cannot use padding/margin
 
@TravisJ for Xamarin? Well if I use a stack layout, then the elements by default expand to the size of their stack!
So I would have to use several stacks to adjust the sizes and widths of the stack
 
Yes, so if you use a % of the size, then they come with padding?
Right, it would still take a wrapper element
 
yeah but it creates a very messy view (in terms of code)
every element would be in it's own stacklayout
LOL
 
user47589
does xamarin have a grid layout system?
 
9:12 PM
yes
but I believe that would only allow for event spacing between elements
 
user47589
i see.
 
You can set row and column spacing is what I mean
 
@KalaJ - Is this padding not available to you? developer.xamarin.com/api/property/Xamarin.Forms.Layout.Padding
Personally I prefer padding to margin
 
user47589
as a stock trader, wouldn't you prefer margin over padding?
 
Margin has a tendency to push other elements out whereas padding has a tendency to condense the content contained
 
9:15 PM
You wouldn't have to account for the extra width when using padding, as you would with margin.
 
@Amy - I don't always trade stocks... but when I do I prefer margin over padding ;)
 
user47589
hehe :)
 
Don't get me wrong though, a good padding can be fun #vegas!
(padding an account is typically done with frivolous expenditures)
 
@TravisJ, look at the example... it's only for layouts :P
Not the individual elements themselves
so I can't use padding for buttons, labels, images
 
layout all the things!
 
9:24 PM
That's exactly my motto for Xamarin until we move to Xam 2.2
 
user47589
i wish i had a motto
 
user47589
and a theme song
 
user47589
when i'm rich, i'm gonna hire someone to do nothing but follow me around beatboxing a theme song
 
@Amy - Siri can do that! :)
 
9:39 PM
@Amy, you mean you don't have someone doing that already?
Pleb :p
How often do you all use abstract classes?
I knew about them, I just never really used them till now.
 
Siri can do it indeed like Travis said :)
 
10:07 PM
@Nathvi Almost never. Sometimes for something like a parser.
 
For the most part, I use interfaces
 
I have two more of these waiting for me at home... surprisingly quite tasty untappd.com/b/seattle-cider-company-cold-brew-coffee-cider/…
abstract classes are useful for templating, I think, but it's easy to get leaky abstractions with that
 
10:22 PM
super random question but if I see an API in python for example, can I work on making it also available in C#? How much work is involved in making a C# wrapper for it?
 
@KalaJ look up c# python interop
 
I want some cider now
 
17
Q: Calling a C# library from python

ychuriAnyone can share a working example on how to call a simple C# library (actually its WPF) from python code? (I have tried using IronPython and had too much trouble with unsupported CPython library my python code is using so I thought of trying the other way around and calling my C# code from Pyth...

 
You can't use IronPython for that?
 
@Codeman, thanks :)
idk, I just found a cool library/API I want to use and it's in Python... Then I was thinking, what if I made it available in C#?
Never done anything like this before
 
10:26 PM
Not sure if it's only python -> .net, or also the other way around.
 
It's like python, just with less wrinkles.
 
Okay, I'll have to take a look since I'm not really sure what IronPython entails
 
10:42 PM
@TravisJ hehe
 

« first day (2048 days earlier)      last day (2899 days later) »