« first day (3134 days earlier)      last day (1800 days later) » 
03:00 - 12:0012:00 - 22:00

12:01 PM
@AndreasDuering Not that kind of app, what I would expect is to have alt+e/d/f disabled from shortcuts
Wow VS Code apparently doesn't support removing shortcuts to the top menu?
I can disable custom shortcuts like opening a contextual menu, but I can't disable Alt+e to drop down the (E)[google.com]dit menu
Is this a joke.
Someone broke the chat guys.
 
Squirrel is the "ClickOnce but which doesn't suck", isn't it?
 
I don't know for sure, but given it's tied to Teams I understand it could be
‮Is this working now?
How do I know if my damn magic worked?
 
did not
 
I'm not sure what I'm doing wrong right now, typing did go in reverse.‮
 
@HéctorÁlvarez It's reversed for me, if that's what you were after.
 
12:13 PM
Indeed, but I think there was something else going on that could be spotted directly...
 
Hey people.
Anyone has exp working with multitenant applications?
 
@Raimonds Some. What's the question.
 
I need to determine tenant and it's environment based on hostname, which isn't too great, anything else unique per website that is not hostname?
 
You want to redirect the user the the relevant tenant's data, based on the hostname it used to connect?
 
I need to resolve tenant, only meaningful way seems like hostname
and each of them should have live and dev configs
for live it's easy - rule -> not under subdomain
 
12:16 PM
Don't they have logins?
 
Any user can connect to any tenant?
 
nope
yes
tenant is basically rebranded website
so user can connect to any website based on url
 
So if I go to avner.raimonds.com I get the same site but different data from hector.raimonds.com?
 
same but rebranded
with custom css / js / google tag manager keys
but it's same application
 
If the user can connect to any tenant, and you want the user to decide which tenant to connect to, you need a differentiator which the user can pick. The user can't really specify much more than the URL.
 
12:18 PM
My concern is that my dev env urls are bit inconsistent
 
You can do it with a cookie - the user connects, by default, to a blank/unbranded site. There they can choose their site of choice, you store it in a cookie on their browser, and from now on, they'll be redirected to the tenant.
 
I am using auofac multitenat so as far as I know tenant name must be specific
 
Perhaps this we're talking about isn't multi-tenant apps, but rather several clients spread across websites where all of them require customizable layout?
 
unless I write some abstraction over it
for partial matches
 
There's quite a bit of distance between the user typing a URL and AutoFac resolving a dependency.
 
12:19 PM
no it's still 1 website with 1 backend
 
For MVC you can set different partial layouts and load whichever your client needs depending on whatever arbitrary condition
 
autofac has extension for multitenancy support
where you need to implement resolve strategy
it basically splits out bool and tenantId
 
Right, but you're talking about several sites, all of them serving the exact same data, and you need to resolve what UI customization you need for each client, if I got it right
 
data is different as well
like different pricing
 
oh a rabbit
 
12:21 PM
Ah sorry, thought you meant it was the same but rebranded.
 
there is lot to it :D
 
why do you need this extension in autofac if you can just write factories for it
 
Well autofac says strategy needs to be fast since it will call it every time I want to resolve something that is multitenant
 
so I'm supposed to be able to connect to all tenants, but I should always connect as the company I'm from...
 
How fast would be to regex over hostname
doesn't seem too expensive
 
12:23 PM
I think Avner's cookie would be the best solution.
 
people can just replace cookie
 
That's why this kind of systems have login credentials
 
and buy something they shouldn't at best
 
If someone goes as far as replacing cookies then you have a different problem
 
at worst website will just die :D
 
12:24 PM
authorization tokens are fine too
 
by using cookie I will serve wrong config to wrong site
 
You'd have to implement auth in the backend though.
 
like a good practice
 
He doesn't have logins!
 
still
 
12:25 PM
well yeah
auth is good thing
 
Step 1 should be adding security before browsing
step 2 should be adding security before purchasing
 
@Raimonds I thought you said any user can access any site simply by navigating to a different URL.
 
hello
 
12:28 PM
I want to improve my object oriented design skills,how do i improve it ?
I feel like I am lacking alot in this
 
Dejà vú
 
Yes they can
 
@ILoveStackoverflow Didn't you say the same thing about... a week ago?
 
there is logic that sets cookie already but whenever you interact with it its being validated
 
1. In production, the tenant ID is resolved via the hostname (by subdomain).
2. In dev, you don't have subdomains, so you need something equally clear.
3. Why not simply use the first element of the path? `http://avner.raimonds.com` will, in dev, be the same as `http://localhost/avner`.
 
12:30 PM
I think I will use custom tenantIds that are numbers or something
 
@HéctorÁlvarez Yes i dit and i am still looking out for the ways to improve it
 
That example with 2 steps where you had to rollback step 1 if step 2 wasn't completed, but wanted to make it 100% SRP-compliant.
 
and use partial regex match to resolve them
 
Oh right
 
1 and 2 other way around
I am having inconsistent host names
like some have -uat
some don't
one has over-20-foo
 
12:31 PM
Not sure what you mean. I don't know what those random strings are.
 
so that logic of resolving dev env becomes awkward
 
do you mean something like hector.raimonds-uat.com?
 
yeah
emm no
website-uat.subdomain.com
basically anything with subdomain.com
is dev
 
What's the problem? "website-uat" is your tenant ID, right? Or at least a unique tenant name.
 
yes
but some of them won't have -uat
but tenandId's must be know
so hardcoded values
because how autofac extension works it looks is it 100% match with values you supply
 
12:35 PM
 
I am pretty sure I am wrong here, and you could actually create some sort of resolver factory around it
 
How does VS know that one is used and one isnt, when neither have references?
 
It looks like the problem you have is that you have two places where tenant IDs are defined. How does your code know that website-uat is the subdomain of tenant "website"?
@Squirrelkiller The greying out is Resharper, not VS, I think.
And it might use different logic than CodeLens.
 
They don't really know that
 
@Squirrelkiller Assuming this method is in a public class, it really shouldn't ever be grayed out - only private methods with clearly knowable scope should.
 
12:37 PM
@Raimonds I just read first time about this multi tenant extension and it really seems like resolver factory for the cool kids
 
all testing websites are under 1 domain, live websites are on different ones. If I got you right, but I guess it dosn't matter since they are both under same app in iis
Wrapper code and syntax sugar ;D
 
It really seems that your problem is that your data isn't properly cleaned up.
 
There is nothing I can do about most of the mess
 
It's VS
 
12:38 PM
So I am trying to get it right and as clean as I can
 
@Squirrelkiller "value assignments, variables, and parameters" - not methods.
 
Damn
Back to learning ot read I guess
 
```
mtc.ConfigureTenant('1', b => b.RegisterType<Tenant1Dependency>().As<IDependency>().InstancePerDependency());
```
 
@Raimonds I wouldn't try to do guesswork with partial matches and regexes. Simply build a small mapping between subdomains and tenant IDs, save it to a file, and map between them.
 
where 1 is tenantId
I guess something like
1 - foo-uat.domain.com; foo.domain.com
basically list of whoever 1 can be
 
12:40 PM
@Squirrelkiller Are the methods exposed through an interface? Do you have Resharper or some other similar extension installed?
 
@Raimonds Use Ctrl-K to format a block of code here, not ```. :)
 
or just regex expression
thanks
 
R#: yes, Interface: no
It's a DTO
 
Are both methods in the same (public) class?
 
How about you make a list of known hostnames, and progressively add them either manually or dynamically when clients connect?
 
12:43 PM
Methods are directly bwlow each other, I made a screenshot without post processing
Same prototypes samee everything
both are basically return string.IsNullOrWhitespace(someProperty)
 
How sure are you that that information is correct? I mean, it has 0 authors as well... You have code spontaneously coagulating in your solution? :)
 
In that case, I suspect it's a R# hiccup.
 
@LasseVågsætherKarlsen Sometimes there'll be code that just apears and disappears and we just roll with it since that code probably has a reason to come here you know and, like, when it's done with whatever it came to do it'll probably just go away.
 
@Squirrelkiller That's the code representation of Leonard Nimoy
 
@Squirrelkiller That's the best code, code with a mission and code that knows when it has surpassed its visitation time.
My code is more like a bad relative, it moves in and is impossible to get rid of short of burning the apartment to the ground.
(aka the big rewrite)
 
1:04 PM
That's why you write a thing one way
and make it so complex that in order to remove it
 
and they are all like "but we're family, you can't kick us out", but they start to get taxing on the income, and you start to struggle with other code as well, because the longer they stay the more you have to focus on them and the new partner you were trying to settle down with is getting scared and talking about the commitment you have to them instead...
 
you need to spend another year re-writing the codebase from the ground up
 
legacy code
 
also
job security
When we "finished"(LOL) this project and put it to production
it took about 2 weeks before i wanted to make it legacy and start again
because processes that "Definately needed to be the way that they were" suddenly weren't correct even though they had been tested and signed off...
a year later, here we are
making "urgent" changes that need to be done immediately
not that im salty or anything
Kappa
 
In my previous company they started a new product, it was going to be modular, had a core and several pieces. Turned out if you removed any optional component, like the printer, it would simply crash.
 
1:08 PM
soft dev fire camp scary stories
 
That was one funny large monolythic project disguised as cutting edge coding products.
 
when sales and production collides
 
you know what my most favorite thing is?
 
@CaptainSquirrel VB6
 
when people who aren't in the dev team try and tell me how the software i made works
also vb6
 
1:10 PM
Oh yeah that one's great
 
The system should automatically set this persons record to x y z
and i'm sat there like
its literally never done that
 
on par with "It shouldn't take more than 5 minutes, I only want you to move this field from an Excel spreadsheet to display real time on this website, just copy it".
 
I'm leaving this job next friday anyway so \o/
are you ready to enter interop?
 
I'd sit there like
K give me that in writing and two weeks to build it.
 
because that sounds like a fun job for interop
 
1:12 PM
@Squirrelkiller Oh you can't say that here. Any time schedule different from "now" isn't allowed
Even "now" is forbidden if "yesterday" is an option
@CaptainSquirrel How's that? New position? New company?
 
yes and yes
 
Oh hell, congratulations
 
thanks :)
I can now walk 30 minutes across the city instead of driving for 1hr10m at minimum
thats an hour and 10 minutes each way
if the traffic is good
 
Yeah I also shaved my driving times from 25m to 5m
 
more money too \o/
 
1:16 PM
I could simply jump down the window and let my fainting body roll down the ramp and I'd be halfway there.
 
Uh extra cash
that's always good
 
Well more money straight away because i'm not dedicating a chunk of money on fuel
then the raise on top of that
 
To be honest, fuel shouldn't be more than... 50-100€ depending on tank size
 
@CaptainSquirrel I open the docs on them and tell them where does it say that
 
1:18 PM
@misha130 if we had docs, i'd do that
 
It's money after all, but such a small amount
 
and lmao sometimes they update the docs 5 minute before
 
@HéctorÁlvarez mine was basically double that
 
@CaptainSquirrel That's quite the small city then
 
@Squirrelkiller not really :D
 
1:18 PM
Well, 1h 10m driving is quite some distance now.
 
30min to walk across the city?
I call that town
 
technically i'm walking into the centre
but its basically across
 
He means he's walking in the city, not crossing it.
but that would be fun, even my home town is bigger than that.
what is 30m walking? Like... 3km?
or 5?
 
5 would be more jogging
 
ugh it all depends on the country too
you cant walk 30 minutes to work in the middle east
 
1:22 PM
Well, even if it was 10km wide, that's a village.
I mean if you cross a city walking in 30 minutes that's not even one pixel in a standard map
Now all this stuff aside, time to go home
I ran out of strawberries though, it's going to be a sad day.
If only I could find blueberries
First world problems I guess
o/
 
Adios Hector o/
 
@HéctorÁlvarez its 2.09km
 
1:50 PM
Cya hecti
 
Jay
I'm pretty sure I live in a village then
 
2:32 PM
Ima going now aswell
seeing you
 
anyone familiar with status: degraded for a windows service?
running gwmi for a service usually outputs "Ok" for me, but now it put "Degraded" instead. Google doesn't say much really
 
2:48 PM
Bye bye Squirrel
I'm off too
Bye bye everyone else
 
Jay
@Default never seen one say degraded sorry, they're usually either running or not running
 
 
1 hour later…
4:16 PM
Has anyone any experience using a MVC application to Route old Classic ASP requests to a .net Controller and return relevant view
 
Why not use URL rewrite module in IIS?
 
I'm actually wanting to keep the existing folder structure that contains all the old classic ASP pages, but change the response to be a .NET view
Is this possible
 
4:38 PM
What exactly do you want to keep? The asp files, or the routing structure?
Because if you "bypass the asp pages and return a view from a .net controller", you basically...dont actually use the pages?
Also hi I'm back I'm home now yes of course I gotta get back to coding as soon as I'm finally done with coding at work
 
Eventually I will not want to keep the classic asp pages
 
That didn't actually answer my question though.
What exactly do you want to happen with a request to, say, `yourSite.com/yourApp/someView` ?
So far it'd, what, go to an ASP page called someView in the root of your structure, right?
That page decides what happens and returns an appropiate view
 
For example
The requested URL is either
en/hotels/london/earls_court/my_hotel_name/

en/hotels/london/earls_court/my_hotel_name/index.asp
Obviously there are lots of other hotel URLs that I want to route, but this is the basic structure
Actually this is my question on SO
2
Q: How to route specific URL in MVC, otherwise return requested URL

neildtI have the following route public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute("Hotel", "en/hotels/{*hotelName}", new { controller = "Hotel", action = "index" }); } So...

Because we will be adding new information to the new views, I can't really just to a blanket redirect
I will have a list of urls that have been 'updated' that I want to route and return the .net view
When using MapRoute
How can I route both index.asp and non index.asp
For example
routes.MapRoute("Hotel", "en/hotels/{*hotelName}",
                new { controller = "Hotel", action = "index" });
Is only routing en/hotels/london/victoria/my_hotel/ and not
en/hotels/london/victoria/my_hotel/index.asp
 
5:08 PM
My best guess for now is to have a that in a middleware in the pipeline.
In Configure/ConfigureServices
 
5:48 PM
posted on May 16, 2019 by ericlippert

We’ll get back to stochastic programming soon; I wanted to do a quick post about some updates to my earlier series on anti-unification. As I noted in the final part of that series, I spent a few months in 2018 … Continue reading →

 
6:35 PM
Howdy all
 
6:47 PM
@Squirrelkiller You Sir are a true hero
 
Has anyone heard of the concept of the "Display's" IP address vs the local IP address?
 
?
Your External IP address instead of your 192 address?
 
not quite (this is a Bloomberg thing btw)
I'll explain (or try)
 
Link?
 
I don't have a link, but I can provide the release note
Actually, I'll probably have to create a link for the text. Pastebin? or something here in SO?
 
6:58 PM
ya Pastie works
 
well, this is nice. I can't currently open pastebin...
 
well that's lame
 
Remember, this is from Bloomberg's docs. Not Citrix.
 
anyone knows a fabulous way how to parse a string?
"\"Hello World!\"" -> "Hello World!"
"Hello"world!" -> IllegalArgumentException("no u")
like that
im currently using regex, but I feel it is a half baked solution
(might want to simply iterate over the content and use a stringbuilder)
 
7:17 PM
Ya it seems like display IP address is the external public IP and the Machine Address is the local
 
Not sure what that's talking about, but "physical IP adress" is ilogical
There's a physical adress, and a logical adress
The physical adress is called MAC, the logical one is called IP
ALso the "machine adress" is usualy the mac adress
 
@juanvan, that's def something I should look into.
and thanks for looking at it too
 
Also btw a local IP adress doesnt neccessarily start with 192, it can also be 10. or 172.
 
copy that
 
Although it's a bit more fine grained: Every adress with 10.... is local. 192 adresses need 192.168...
the midle one is 172.16.0.0 <= x < 172.32.0.0
 
7:31 PM
Is 10... routable?
nope...
 
Just locally
 
technically
 
Those are the three adress ranges only routed locally
I mean, the standard says they're local adresses. You can of course make a router with a firmware that tries routing these ranges, but it won't really work with any other networks, since nothing else routes those.
 
one for /24, one for /16, and one for /8, right
?
Oh and @Squirrelkiller, ya, "physical" IP address is a bit of a misnomer. They even call it a local IP in other release notes.
 
@BrandenBoucher what the shit is this and how to I get it to work on my Bloomberg terminal?
@BrandenBoucher where dear god where in Bloomberg's doc please
 
7:38 PM
@MikeTheLiar justpaste.it/58tvb
 
Right, that's what I'm talking about. How do I get it to work? My Bloomberg terminal sprouts legs and walks over to where I'm sitting to beat me over the head if I try to connect to it remotely.
 
@MikeTheLiar, Bloomberg terminal is the problem. It's already using this "display" IP
Really?
wtf. might be your license
 
lol no, not really. But it does log out all active terminal sessions
 
Oh, yep
 
Someone has to physically go over to the machine to log in to the terminal
 
7:40 PM
So a few scenarios.
 
You used to be able to get around it using the VPC protocol but then they started blocking that, too
 
If you log in on your local machine, and then use Citrix to log into another machine (or log in to a separate physical machine), your local terminal will disconnect. Is that what you were asking?
However, if you MSTCS into another computer and log on to bbg term, while it will disconnect your local term, it will consider it the same session
 
This is something different, we only have one terminal so having multiple sessions isn't really a problem for us.
 
you mean one license? The terminal I'm talking about is software
Do you have a PHYSICAL terminal?
 
Yes
 
7:45 PM
Oh shit
 
that does make a difference here... lol
 
lol me
Jan 26 '16 at 16:49, by mikeTheLiar
If you ever get the chance to work with the Bloomberg terminal API, don't.
Three and a half years ago 😀 🔫
 
omg
so true
but tis my life for the last 5
on, and off
just on and off to completely forget how to use it in between
 
It's funny because it's true.
 
7:48 PM
We have just the keyboards with the finger swipe and labeled buttons, or b-units, and the terminal software running on windows.
 
Actually I'm pretty sure that's all a "terminal" is nowadays.
I wouldn't be surprised if they physical keyboard itself were somehow linked to software instance but I don't know that for sure
 
The only way to interface with the terminal API is to have your code running on that machine. To the best of my knowledge it's impossible to interact with the API remotely.
Someone was working on making a Bloomberg mock API but I don't know if that ever got anywhere
 
well, yes and no. If you have the SAPI or DAPI you can
 
You people you shit about java? I think I'm going crazy. That threeten library, basically making the actual java library backwards compatible, has a DateTime equivalent "Instant". Seems to be totally awesome and everything. Just...how the fuck do I make an Instant with, like, ints for year/month/day/hour/minute/second?!
I can't figure out that fucking library
 
7:52 PM
And, you don't really even need to be authenticated to pull data. Just a UUID and go. It's just not compliant
 
I haven't used this emulator library yet
 
8:04 PM
I'm so tired, I feel I'm actualy getting stupid now. Can't figure out this damn "Instant" class. Time to go to bed. Bye bye.
 
Isn't Instant a Joda thing?
 
damn it@juanvan. I should have finished the explanation.
It goes like this. If you log on to Bbg Term from your physical machine, your local IP is used for authentication. If you MSTSC to a remote desktop (physical or virtual) and connect to Bbg term, it uses that desktop's IP address. However, if you use Citrix to connect to a remote desktop, Bbg term uses your local IP address instead of the remote desktop's.
 
So it's a secondary IP from RD
 
9:00 PM
passing PropertyInfo wouldn't be more efficient than passing a string propertyName, would it?
 
if they're both reference types and you're not serializing them or anything, they're equally fast- it's just a pointer
if one's a value type, it's going to get copied if you pass it in somewhere
but the difference is tiny, so do whichever makes more sense for your code
 
var prematureOptimization = Math.Sqrt(Evil.All())
!!xkcd 1691
 
9:24 PM
"Tiny" overstates it- you literally will not notice a difference
 
You could start running your program now and let it go until the heat death of the universe and the difference would be less than the amount of time we've spent talking about it.
 
@juanvan, I guess? Not sure what that really means
 
03:00 - 12:0012:00 - 22:00

« first day (3134 days earlier)      last day (1800 days later) »