|
I once rejected an open source library that had received very good critics. We knew that we had to make significant extensions / modifications of the code. All names of variables and internal functions, as well as all code comments, were in French. None of us knew any French.
This is almost as bad as ALGOL68: The formal language specification defined tokens at abstract level; it didn't mandate IF and WHILE and FOR; you could define a language implementation that was Greek even to Greek programmers ... I don't know if that was ever done, but I did once see an ALGOL68 program using German language keywords. I know that it would be trivial to make a converter for replacing the German keywords with English ones, but if the programmer uses German keywords, I take for granted that all names and comments are in German, too. That French library at least had English keywords - but that was not sufficient for our use of it.
|
|
|
|
|
A long time ago I did a consulting job that was essentially a code review. Part of the code base had been out-sourced to a Ukrainian company. Merriment ensued...
Software Zen: delete this;
|
|
|
|
|
Depends on the size of the module and the name and scope of the variable. In other words, does renaming the variable add to the maintainability of the code?
|
|
|
|
|
Sometimes VS and .NET is a PITA. But you know that.
I needed to have an Azure web app (Framework 4.7.2) log to app insights, so I installed the various AI packages and MS extensions dependency injection abstractions package. I ensure the abstractions DLL shows up in my references, I have a 'using' reference to it, and all that looks good. But VS is telling me the type and namespace can't be found for the ServiceCollection object, although it sees the bloody IServiceCollection interface. The same packages and the same code works in a console app on the same framework version.
So the big question is, if I retire now, can I live off a reduced SS check and my current 401K and savings for the next 20+ years?
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
Did you include the assembly as a reference?
TNCaver wrote: if I retire now, can I live off a reduced SS check and my current 401K and savings for the next 20+ years? No 401k in Europe. Ask an American.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
It shows up in my references, so I assume it's there. I tried to find it in the Reference Manager to add it manually, just in case, but it isn't there. Not sure that's a problem since it isn't in the Manager in the console app, either, and it works fine.
I could retire now if I could talk my wife into moving to Arequipa, Peru. And if we could speak Spanish.
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
TNCaver wrote: I could retire now if I could talk my wife into moving to Arequipa, Peru. And if we could speak Spanish. Then why are we talking references my man?
You don't need Spanish in Peru (though it helps).
TNCaver wrote: It shows up in my references, so I assume it's there. I tried to find it in the Reference Manager to add it manually, just in case, but it isn't there. Not sure that's a problem since it isn't in the Manager in the console app, either, and it works fine. It was an assumption, sorry.
TNCaver wrote: I ensure the abstractions DLL shows up in my references, I have a 'using' reference to it, and all that looks good. But VS is telling me the type and namespace can't be found for the ServiceCollection object, although it sees the bloody IServiceCollection interface. You need a reference to that DLL, as far as I can guess now.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: You need a reference to that DLL, as far as I can guess now. Yep, or the right DLL, which is another rabbit hole I can't find the bottom of.
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
TNCaver wrote: I could retire now if I could talk my wife into moving to Arequipa, Peru. And if we could speak Spanish. Even though I can't, I would given the option. Go live near the coast and be happy?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I enjoy the ocean, but I prefer mountains, or at least very tall hills and ridges, buried in trees, flowing with rivers to kayak and caves to explore. That's my retirement plans.
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
|
Thanks, that got me closer. I removed what I had and installed the Microsoft.Extensions.DependencyInjection package, which also installed the Abstractions package, using the same version as the console app. It now recognizes some version of the ServiceCollection, but not the version with an IServiceCollection that contains the definition for AddLogging and AddApplicationInsightsTelemetryWorkerService. And yet both the web app and console apps are using the same version of those packages, as far as I can tell, and those methods are defined in the console's version.
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
It will be the right ServiceCollection ; it just looks like you're missing some other references.
AddLogging is an extension method defined in the Microsoft.Extensions.Logging NuGet package.AddApplicationInsightsTelemetryWorkerService is an extension method defined in the Microsoft.ApplicationInsights.WorkerService NuGet package.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank you. I owe you a beer. Or three.
The question I (and probably you) have now is, why couldn't I find that answer myself? My google-fu is normally black belt level.
But you have to admit the situation is complicated, even bizarre. IServiceCollection is in the Microsoft.Extensions.DependencyInjection namespace, but the methods attached to an object instantiated from that interface are in two other namespaces. I mean, what the actual elephant?
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
That part actually makes sense: the extension methods are defined in the assemblies they're used for. Otherwise, all of the classes to configure eg: logging would need to be included in the DI assembly, which would be an absolute mess.
For the Microsoft extensions I've seen, the class where the extension methods are defined is usually deliberately added to the Microsoft.Extensions.DependencyInjection namespace, even though that's not the correct namespace for the assembly. That way, you don't have to add extra using statements to your code to configure the services; you just need a reference to the assembly.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
My rig bombed out, and until I could get a cheap WinTel spare (while I look for my dream gamer rig), I was stuck surfing the 'net with my Android phone. Oh my, what a horrific experience, between all the junk ads and not being to use Firefox's Bypass Paywalls add-on. I am considering getting an Android pad, which would be for me just for use when I'm in public transport or eating at a restaurant, etc., but if with Android I will be stuck with this rotten experience, I'll just stay with my dinosaur era phone using Opera Mini (which is so old that ads are too sophisticated, and which isn't a problem since I am only interested in the text).
Any ideas that do not involve paying through the nose for an Apple?
|
|
|
|
|
|
Brave browser, AdBlock optional.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
swampwiz wrote: I was stuck surfing the 'net with my Android phone. Oh my, what a horrific experience A gross experience, was it?
|
|
|
|
|
144 what?
Software Zen: delete this;
|
|
|
|
|
Wrong
It is more along the lines of "gross income" or "gross taxes". The whole, with nothing taken away. As opposed to the "net income". You get the whole web page with all the ads, nothing taken away. swampwiz didn't want the gross page, he wanted to surf the net - that is, with the ads removed. And apparently, he thinks web pages with all the ads are rather gross.
|
|
|
|
|
I use Firefox with AdBlock Plus and I'm clean as can be while browsing the web...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
Firefox with uBlock Origin works for me.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
This was a big problem for me too. I finally solved it by installing a VPN server at home (we have Gigabit fibre here) and a pi-hole DNS cleaner. The VPN is SoftEtherNet which is really simple to set up and doesn't need any client software. While I'm out and about I just fire up the VPN on the phone and get virtually ad-free browsing just like when I'm at home.
So old that I did my first coding in octal via switches on a DEC PDP 8
|
|
|
|
|
I use MS-Edge on my Android phone and have very little advertisement or spam in my Android browsing sessions.
|
|
|
|