« first day (2113 days earlier)      last day (2834 days later) » 
01:00 - 14:0014:00 - 23:00

2:00 PM
Heya Guys,
I have a question for all those who know anything about Windows Services.
I've got this Server-Application (stand alone .exe) that I wrote and my boss now wants me to build it as a Windows Service.
Is it possible to just Copy Paste my Server-Code into the Windows-Service-Code?
If i do that, can it cause problems, that my Programm is using several Threads and opens some Listner Ports?
 
@MilesA. That depends on your code
In general, Windows Services run the same type of code as anything else.
 
@StevenLiekens thanks for that one, i will have a look at it
 
There are some things you can't do, like UI.
 
@KendallFrey so technically speaking, if i delete the UI-Part of the Server-Code i could just paste it into my Windows Service code?
 
2:04 PM
Not necessarily
I can't answer your question without knowing your whole code
How I typically write services is as a dual program, one that can be run from the commandline or started by Windows as a service.
 
@Failsafe internal AND protected, instead of internal OR protected
"private" outside the assembly and "protected" inside
 
@KendallFrey That actually sounds like a neat idea!
 
The choice of modifier keywords has brought up a lot of debate and backlash which is why it wasn't included in C# 6
It will save you (the dual program thing)
Debugging a service is annoying
I've never written a service personally but we have at least one client who is using one with our library
 
Yeah, write it with two front-ends; one a service, one a command line tool.
 
I had a debugging session with them and it was really great to have the command line tool (actually it was WPF they wrote it as) for debugging
 
2:11 PM
Is there any difference in performance between: for (var i = 0 ...){ for (var j = 0 ...){}} and var i, j; for(i =0 ...){for(j = 0 ...){}?
 
@JoãoPaiva probably not, post compiler optimization at least
 
well the difference is the scope of j
in the first snippet, you can only use j in the inner loop
actually I just noticed the scope of i is different too
 
@JoãoPaiva no
 
@StevenLiekens Yes, in regards to scope I was aware of the differences, but I was interested in knowing in terms of performance.
Okay, thanks!
 
de nada
 
2:15 PM
I use global variables. NOSCOPE GET REKT SKRUB
 
@catgocat 'brigado
 
@KendallFrey can't fix my game bug :(
 
@JoĆ£oPaiva I think it will compile down to the same code, so that shouldn't be any different.
 
when I see "var" I immediately glance at the room title to see if its javascript
 
@catgocat +1 to that xD
What is the reason to use var anyways?
 
2:17 PM
when u want the compiler to figure out the type
 
yes, I should probably change it to int :b
 
@catgocat Doesnt that jsut make your code less concise to read and longer to comple? :DD
 
dont know
depends though...
 
Just say yes, it will make me feel better xD
 
2:18 PM
var makes everything so much more readable
 
imagine Dictionary<SomeOtherStuff<T>, int> dict = new Dictionary<SomeOtherStuff<T>, int>();
you could replace the first type declaration with var
 
@StevenLiekens i strongy disagree
 
160
Q: Will using 'var' affect performance?

Jeff KeslinkeEarlier I asked a question about why I see so many examples use the varkeyword and got the answer that while it is only necessary for anonymous types, that it is used nonetheless to make writing code 'quicker'/easier and 'just because'. Following this link ("C# 3.0 - Var Isn't Objec") I saw that...

 
Oh bugger!
 
@MilesA. try a debugger
 
you should only ever use explicit types when you want to declare a variable as the base type of what's on the right side of the assignment
IList novar = new List<object>();
if I see usages of explicit type declarations for any other reason, I will let resharper mass replace it :>
 
var is love. var is life.
 
thank var it's friday
 
Oh my Glob!
 
oh, the var discussion all over again.
 
user47589
2:35 PM
yup
 
user47589
var is love
 
user47589
var is life
 
var is 42.
 
Nah it's irrvarlefant!
 
user47589
people who think var causes problems clearly haven't used it much.
 
2:37 PM
Me personally dislike the idea of not being clear.
(I obviusly have a being clear problemo)
 
It isn't unclear, ergo, no problem
 
There is nothing unclear about var. You most likely know the type beforehand when writing code. Those who will debug it, will most likely be able to figure out the type pretty fast.
 
TIL "Go To Implementation"
 
user47589
var being unclear is an imagined problem.
 
I think Go To Implementation is new since VS 2015
 
user47589
2:44 PM
prior to that you had Go to Definition
 
user47589
resharper has go to impl tho
 
@MilesA. don't worry. I'm with You. I prefer full class name specification especially where there are things like var isItIntOrDoubleOrFloat = Math.Floor(1.5);
 
@Amy Yeah, that's the opposite of what I use Go To Implementation for
 
You also have the Peek thingy
 
user47589
i've never cared for Peek in VS.
 
2:48 PM
It could have been better for sure
 
user47589
@KendallFrey ok, so?
 
I consider it a failure of vim skills to use the peek thing.
 
:>
 
why use peek, or go to definition tools, which stops You in reading in the first place, when it't totally not a problem if You don't write var
or don't write var most of the times
 
user47589
its far less of an issue than you imagine.
 
2:53 PM
I don't use go to definition because I use var, I use it because I want to add something to the class of the variable I'm currently using and can't be bothered to touch the mouse...
or if I'm in someone else's code and I don't know where they put their classes
 
hey ho
 
@ntohl Peek and Go To Definition have nothing to do with var
 
I don't want to use [authorize] in authentication, I want to do something on the shared layout that would check if the one accessing the page have a cookie with him. Is this possible? google is not providing me what i want.
 
anyone know what timezone translates to -60 timezone offset?
 
@ElieSaad like @if(User.Identity.IsAuthenticated) ?
 
2:56 PM
Yes, with an cookie
 
@BrianJ MARS?
 
user47589
@BrianJ well that's -1 hour from UTC. look at a map.
 
@CuddleBunny just gonna tag u if you are waiting a notification from me :P
 
@KendallFrey peek and go to definition are tools to see the type, when var hides it. It requieres You to stop the flow of reading. That is the main problem. The additional problem, that for peek You need the mouse, which I don't like to use while programming the code.
 
@ntohl That's not what the tools are designed for
 
2:58 PM
@ElieSaad even if you use cookie auth, you can still use Identity
 
@ntohl you're reading the code with your keyboard?
 
@CuddleBunny I am using forms auth, because identity is too much for our web apps.
 
@KendallFrey It's true, tho a tool may have multiple usages. And Scheien suggested to use theese.
 
@ntohl I didn't think he was talking about var
 
@milleniumbug I said there is a problem with "peek inside". That have nothing to do with reading the code.
 
3:01 PM
@ElieSaad I don't use forms auth, but I think it is Request.IsAuthenticated
 
@KendallFrey long ago we was talking about "we can dodge things like what is the return type of Math.Floor" by using peek inside, and point the mouse over the Floor.
 
@Amy ok that's strange js on browser telling me my timezone is GMT-1, but I'm in GMT+1
 
I just hover over the variable and it shows me the type :p
 
that is the connection between var and peek inside
 
var whatever = lolsomething(asdf); hover the mouse over whatever
 
3:02 PM
That is the failure I don't do.
 
user47589
lol
 
3 mins ago, by milleniumbug
@ntohl you're reading the code with your keyboard?
 
I use hjkl ctrl-d ctrl-u to navigate most of the time
 
@ntohl Again, I don't think he was talking about var
 
why use mouse?
 
3:03 PM
@ntohl but if I have int i = 0; instead of var i = 0; but it is 300 lines above my cursor, what is the difference?
 
oh look a hipster :D
 
I'm anticipating a response like "your method is too long" :D
 
tbh there's probably a way to use a keyboard there
I just don't bother
 
13
Q: VS2010 Keyboard Shortcut - Show ToolTip

Dave MateerQuestion: How to display the mouse hover over tooltip in VS2010 using a keyboard shortcut? Ctrl+Shift+Space gives some detail on overloads. Cheers Dave public ActionResult About() { return View(); }

 
@borrrden example would be a class property in a class with more than a few methods
 
3:05 PM
You can't use "var" there anyway ;)
 
CTRL-K CTRL-I shows the same type info tooltip as hovering your mouse.
 
true that I guess
 
Hmmmm I use Xamarin Studio half the time....
I wonder if it has an equivalent one
 
Nothing is worse than when the CEO tells you, in front of the whole office, "You did in 30 min what the rest of these guys couldn't do in 2 days?" ... talk about making a pariah /vodka time
 
@MichaelEdenfield nice tip
 
3:06 PM
I see what you did there...
 
here's a better tip: learn to use a mouse grandpa
 
@MichaelEdenfield cool
 
nice "tip" lol
(tooltip)
 
tbh I learn as little keyboard shortcuts as possible because every IDE has different ones
 
though really you should be able to infer the type of something from its name so this is kind of a moot point
 
3:08 PM
@CuddleBunny I use gd a lot too. In case of the variable is not clear. But the problem is when You read the line var isItIntOrDoubleOrFloat = Math.Floor(1.5); is actually avoidable to hide the type, when just looking at a variable, that is far behind declared, it's not.
 
Ctrl+Shift+R from Resharper is excellent because it makes learning another 20 keyboard shortcuts unnecessary
 
@borrrden
 
Ctrl+Q from vanilla VS is excellent in general
 
bwa ha ha ha
 
If Microsoft could make it faster
it takes like 2 seconds what could have been instantaneous
 
3:09 PM
@RyanTernier so hey thanks for the vote of confidence but, y'know...
 
@milleniumbug same with searching solution explorer :/
 
If you're gonna do that, be vague
 
@ntohl Wouldn't it be nice if Math.Floor could return either, depending on what you pass the result to?
wink wink
 
:) I agree
 
"Ryan has done some great work in really good time, thank you Ryan" leave it at that, doesn't piss anyone off
 
user47589
3:11 PM
nudge nudge wink wink
 
mumble mumble ...Haskell... mumble
 
If anyone shops at kroger. You can download their app, and get a Free Item (via coupon) every friday.
fyi
 
@milleniumbug I use ctrl-Q for block select :(
 
@CuddleBunny if dat works i shall let you know
 
In project management, a death march is a project where the members feel it is destined to fail, or requires a stretch of unsustainable overwork. The general feel of the project reflects that of an actual death march because the members of the project are forced to continue the project by their superiors against their better judgment. The fields whose project management practice first named these related phenomena are software development and software engineering. Other fields have since recognized the same occurrence in their own spheres and have adopted the name. Death marches of the destined...
 
3:20 PM
@TomW I got called at 430am (my fiance was super happy about that after working a nursing shift) with "nothing is working it's all broken". I told them "i'll fix it, bring khalua , bailey's and vodka". They didn't bring the vodka. I don't want to press this deploy button!
 
For Vacation, i'm going to Phoenix, Grand Canyon (South Rim), Los Angeles, and Las Vegas all for the first time next week.

Anyone who has ever been out that way have any tips/thoughts on cool stuff to see or do?
 
Who the fuck cares what is broken at 430am
 
user47589
the person who called, i guess.
 
@Michael If you make your way into Sedona, there's an amazing liquor store there - they have Glen Fiddich 50 yr scotch! (and they sometimes let people try a sip)
 
3:22 PM
that's something I didn't need to see today
 
@RyanTernier i've never had scotch. Not a hugeee fan of alchyhol anyways
 
@mikeTheLiar My fiance wants me to buy these for her:
 
@KendallFrey you didn't need to see it, but you wanted to.
 
Is your fiance half-fish?
 
3:23 PM
lol, nice
 
That explains the smell.
 
aand fishy after-taste
 
and this room has steeped to another new low
 
wow don't you guys know how to make friends
 
Sorry I'm just cranky today. @RyanTernier I'm just being a dick, no hard feelings?
 
3:25 PM
@TomW Why do you think we're here?
 
Sleep deprivation gets me every time
 
Do I want to start mixing cement today...it's 4:30....I'm gonna say no
 
@TomW am or pm?
 
Do you think I'd be here at 430 am?
 
If(am == true) {startmixing();}
Mixing cement when the sun is down is much easier than when its up
I really do hate mixing it though, messy stuff
 
3:27 PM
Nothing like pouring cement in 45c degree weather. fml I don't miss those days
 
fortunately this particular project calls for a dry pack
so I just have to mix it, no watering
 
wait what?
U have to use water.
 
Er, no
 
mixing dry cement leaves you with dry cement
 
Slab base for a shed. 8:1 tamped down dry is fine
It's hygroscopic, it absorbs moisture from the environment. Dry pack sets slowly over time but it never gets so solid you can't dig it up again
I don't think so, anyway
 
3:30 PM
interesting combo
over this way everyone is switching to porous base materials
 
that is so weird
Ive never heard of that.
 
It's the recommended method from several different manufacturers
 
Is it like powdery too?? like normal stuff?
 
12" base of clear rock, 4" of stone chip
 
3:33 PM
Believe it or not I do know what I'm talking about.
 
I believe that you know what you're talking about, but I don't know what you're talking about
 
Are you doing one of those plastic grids with it as well?
 
@CharlieBrown Nope. Timber bearers on cast concrete slabs laid on sand/cement
 
ah, gotcha. thats what i was thinking for mine as well
 
3:36 PM
It's what my parents had and that lasted 20 years in a wet climate, and after that they just replaced the shed and the base was still sound
 
how thick is your base? northern climate?
 
@ntohl Yeah this one is another issue - resharper changes that one so I needed to tell resharper that I want to keep it
 
Do you have to put a restsharp client inside a using?
 
My trench is about 4" deep
 
(or should you, rather)
 
3:37 PM
@RyanTernier where does it all go??
 
@Michael Most likely dranage rocks under the concrete
 
!!doyouwant sinkholes
 
@mikeTheLiar Do you want sinkholes? Because that's how you get sinkholes.
 
I'm not sure how they'll do it, honestly @michael. IN vancouver, our highway roads are 14-18" of asphalt / concrete, which are put ontop of a packed road crush (rocks + sand) which are ontop of packed soil.
 
IN Ohio our roads are potholes
 
3:38 PM
I know a couple of pavement engineers. They can get really boring about this stuff.
I'm starting to think pouring concrete might have been easier though. Then at least I wouldn't have to find a way to split 2ftx2ft concrete slabs neatly down the middle
 
how can I create a jugged array from a fixed array instance?
is there an easy extension method for that?
 
> jugged array
 
@Michael method b: tigersheds.com/buildabase.asp
 
int [,] something;
int[][] toThis = something.ToArray();
is there an officialish implementation of that ToArray()?
 
@TomW thats pretty neat
 
user47589
3:43 PM
not that i'm aware of. you'll need to write your own.
 
thanks
good (ugt) night
 
Sneaky sneaky
Ponies doin a deception
 
I smell click bait lies
 
user47589
 
@roscoe_casita you don't believe the industry is plagued with people who are that stupid/insane?
I did kind of write something a little bit like that once, but only because the architect insisted
 
user47589
 
4:09 PM
No more lies! I refuse!
 
"We can't use the BizTalk Rules Engine because regular C# devs don't understand it (even though the rest of the solution middleware is in BizTalk) so you're going to rewrite our customer acceptance logic as a normal WCF service"
 
user47589
 
"We have to be able to add new parameters and rules against those parameters without redeploying"
...so you want a rules engine
 
man, I hope this is gooodder then true.... insurance through the school rocks... now I just need to see if they cover other people as well
 
insurance for what?
 
4:15 PM
medical
 
user47589
well, duh
 
duh yourself
maybe the school insures your, I dunno, cat
 
user47589
i wouldn't expect cat insurance to cover other people.
 
@Amy your avatar reminds me of this ahahaha
 
user47589
um ok
 
4:24 PM
because of course there's a starterpackmemes.com
 
it's genius
 
user47589
why are you in here? no one flagged anything
 
I came for the ponies
 
user47589
A very good reason.
 
4:31 PM
inb4 anything kendall says
I gotta ask -- why do you like MLP? Not judging -- just curious
 
user47589
its cute and fun, and has positive lessons
 
Thats as good a reason I've ever heard
 
user47589
its also written well.
 
user47589
a lot of kids shows are hard to watch as an adult, the plot holes are so glaring and the dialog poorly written.
 
I would still watch spongebob
I loved that show
 
4:39 PM
leedle leedle leedle lee
 
MLP gives me cancer
no, but it makes me cringe
 
Uncontained uranium gives me cancer
 
Running on legos... pshhhh, If you want to torture yourself, get to know my ex-wife.
 
I expected more blood
The internet has ruined me
 
4:47 PM
He doesn't have shoes on
He ded
 
user47589
hyperbole gives me cancer.
 
@KendallFrey nonono, it's when the shoes fly off
Lose your shoes === ded
 
@SterlingArcher He's ded before the video even starts
 
5:24 PM
Anyone know how to enable the Angular2 router, to be primarily used for Asp.Net Core?
 
@Greg as in, replace the MVC 6 router with the ng2 router?
@Greg when I use client side routing with ASP.NET Core I go the way of
app.UseDefaultFiles();
app.UseStaticFiles();
then just use MVC routes for APIs
 
Yeah.
@CuddleBunny Exactly what I'm looking for.
Do you remove the app.UseMvc(); ?
Then it will allow Angular to simply be the primary router?
 
@Greg no, I still have app.UseMvc();
but it is last
so if there is a default file or static file it will load that first
 
Okay. Do you have to dabble or mess with any of the routing to ensure it points to the wwwroot? Or no?
 
nope, wwwroot should be your web root, so angular won't try to route to anything outside of it
 
5:32 PM
Okay. I wasn't sure about the MVC portion.
That is pretty simple.
 
yup, so much easier than before
 
Just add attributes and bam.
 
user47589
6:31 PM
 
6:42 PM
Morning Pony
 
the pony error pages
 
Pony Error
 
I think only Pony here but others
Where can I find a good C# developer resume template
 
7:07 PM
resume template? So you can add your name to it and forward it over?
 
7:41 PM
rleonardi.com/interactive-resume Use something like that for a web dev resume
 
8:38 PM
That is a little over the top for a resume - but it screams Pay me $$$$$
 
hello all oooooooooooooooooooop
 
user47589
8:53 PM
you can pay me $$$$. I won't object.
 
user47589
but if you refuse to pay me $$$$, I may object-orient your children with Java. Think on that.
 
I will work for only $$$¢
 
 
1 hour later…
user47589
10:17 PM
its friday, but will tomorrow be saturday? or will it be friday again
 
01:00 - 14:0014:00 - 23:00

« first day (2113 days earlier)      last day (2834 days later) »