|
Sander Rossel wrote: Sometimes I think I've chosen the wrong profession Like I've always said: plumbing is the best job, because there's at least a good reason why you're up to your neck in sh1t.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Allow a penalty perhaps? (8)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Nice one but quick question, What is the significance of ? in a CCC
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
|
Just visited the 'About us' page and realized why Bob is such an excellent member... Bob holds a spanner in one hand and a glass of beer in the other...
We should learn from the best!!!
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
modified 20-Jan-20 2:42am.
|
|
|
|
|
A glass of Bear? That explains why they abduct animals, I guess.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I was probably thinking of the upcoming snow...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
Now that you mention it, I can't really think of too many devs I've known whom I'd trust with a spanner.
Or a stove, for that matter; they can stay on the other side of the kitchen, with the microwave.
And there's no way I'd let any of 'em near my windows registry.
Or powerpoint. God forbid they get within a mile of that.
Or any documentation tool, since we're in that area.
Sewing needles? Get plenty of lemons in, for the bloodstains.
And if you like your home in an un-burned-down state, don't ask them to change a fuse or a lightbulb.
Basically, we're a pretty useless lot, except for messing about with code and spending hours deciding what haircut and eye colour a man-at-arms should have.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
The three most dangerous entities:
A hardware guy with a computer program
A software guy with a soldering iron
A manager with an idea
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
too true!
|
|
|
|
|
I can:
Fix a motorcycle engine.
Cook a gourmet meal.
Sew curtains, curtain liners, tablecloths, napkins, pillow cases, mostly via the sewing machine.
Change fuses and lightbulbs, wire a house, wire a motorcycle loom from scratch, fit a shelf, heck - create furniture including shelves, solder, desolder, read a circuit diagram, fix a PCB (with a circuit diagram).
Oh, and I can bang out code too.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
What a wuss.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I prefer "Multi Talented Wuss", if you don't mind.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Mark_Wallace wrote: I can't really think of too many devs I've known whom I'd trust with a spanner
WARNING: WAR STORY INCOMING
When I first started my current job, my test machine was in a hardware lab. I used to pick up a screwdriver with an intent look on my face just to mess with the technician.
Software Zen: delete this;
|
|
|
|
|
Mark_Wallace wrote: Or any documentation tool, since we're in that area.
As a dev I would just like to know what this 'documentation' thing is and why I would need a tool for it?
I, for one, like Roman Numerals.
|
|
|
|
|
The pattern of noise my hard drive makes for each is distinct enough that I can tell which one is working.
Real programmers use butterflies
|
|
|
|
|
Three little letters: 'S', 'S', and 'D'.
Try it. You won't go back.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: Three little letters: 'S', 'S', and 'D'. Spin, Shriek, Die?
But yeah, fully agree. SSD is the way to go.
only regret is when on someone else's still on HDD computer - regret forgetting to bring a book to read
|
|
|
|
|
OriginalGriff wrote: Try it. You won't go back. I did.
I replaced the SSD with a 2TB drive, to save having to carry external drives and/or have everything on bloody annoying memory sticks.
I don't really give a damn if a program loads a tenth of a second faster, or if windows boots in three seconds less. Once stuff is loaded, memory is faster than SSD (unless it isn't any more; I don't read all the tech press), so I just max out the memory on all my machines.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
my next machine will have a 2TB nvme system drive.
Real programmers use butterflies
|
|
|
|
|
Same here, unless I splurge out for 4tb.
I probably won't though unless prices fall a lot in the next 2 years (or QLC sweeps prosumer drives and a huge SLC cache is needed to keep performance up); since my 6 year old 1tb SSD (best $500 upgrade I've ever made) is still only ~56% full.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
you know, I want to be hard on my little pike VM lexer for taking .028 msecs to lex my sample text.
vs. .004 msecs for my DFA lexer
but then i have to consider that my lexer is powered by a virtual machine (a pikeVM written in C#), running in a virtual machine (.NET CLI) running in a virtual machine (virtualbox)
It's not half bad.
Real programmers use butterflies
|
|
|
|
|
|
This is NOT a programming question. Just something you might want to be aware of.
So I migrated my project and fixed that various things in Startup that broke. Stupid things, like apparent env.IsDevelopment() doesn't exist anymore, and IHostingEnvironment has to be changed to IWebHostEnvironment or something like that, and app.UseMvc(); is wrong now and you have to use:
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
instead, and I don't have Razor pages anyways.
And I do wish that the whole NuGet package manager / Visual Studio would figure out that when I change the target framework, yes, please go and get the appropriate packages for the new framework, and now I need to specifically install the System.Data.SqlClient framework? And we're no longer using Microsoft.AspNetCore.App but instead need Microsoft.EntityFrameworkCore and Microsoft.EntityFrameworkCore.SqlServer?
Sigh. Fine, relatively easy fixes, and all that was an aside, relatively easy to fix, but annoying.
So, once I got it to compile, fired it up and tried a very simple API call that returns an access token.
Now, in .NET Core 2.2, the response at the client contains the key "access_token"
In .NET Core 3.1, the response at the client contains the key "token"
As in:
JSON.parse(xhr.response).access_token;
has to be changed to:
JSON.parse(xhr.response).token;
WTF?
On the C# side, the return from the API call is the same:
ActionResult<IAccessToken>(resp.token)
where IAccessToken is quite literally just:
public interface IAccessToken
{
string Token { get; set; }
}
Now here's where it gets interesting. resp is actually a tuple: (IAccessToken token, HttpStatusCode status)
and I'm returning the token part of the tuple resp.token (checking the status is not necessary because if the status isn't "OK", then the token is null so the full line is actually:
ret = resp.token.Token == null ? Unauthorized() : new ActionResult<IAccessToken>(resp.token); but that's irrelevant to this discussion.
The point being, .NET Core 2.2 serializes the container IAccessToken differently than .NET Core 3.1.
Good grief. I would not have expected that kind of a breaking change. Why the heck is 2.2 prepending "access_" to the key? And what else breaks in the serialization of objects with 3.1?
And (shame on me) why didn't I notice that weird "access_token" issue to being with? I even wrote up the example response in the documentation with that!
There's a lesson here somewhere. Don't trust .NET Core. Don't trust open source projects. And notice stupid things, because if I had, I could have at least forced it to return what I expected.
And here's another fun one. This code:
client = context.Client.SingleOrDefault(acct => acct.Token == token && (!acct.IsDeleted || allowDeletedAccounts));
Given:
[NotMapped]
public bool IsDeleted { get { return (Deleted ?? 0) != 0; } }
(yes, we have a Deleted flag as a nullable integer in our tables) - this code works fine in .NET Core 2.2.
But noooo, EF can't figure out what to do with it in .NET Core 3.1. So instead:
client = context.Client.SingleOrDefault(acct => acct.Token == token && (((acct.Deleted ?? 0) == 0) || allowDeletedAccounts));
And that breaking change isn't discovered until runtime! (Like the serialization issue when the client tries to parse out the token.)
So how many places in the code base break at runtime and you won't know until you've executed all the possible code path queries?
Now, while I had tried .NET Core 3.1 because there were posts about multi-part content being broken in .NET 2.2 and it was fixed in .NET Core 3.0, it turns out that that wasn't the reason my file uploads weren't working.
But that's a whole other story. Involving pretty much 8 hours of try this, google that, and getting so pissed off (which is rare for me) that I really wanted to just go on a rampage. Because, at the end of the day, it's quite simple, but nobody actually tells you the important things you need to make sure you do correctly. That will become an article, so that somewhere in the cloud there will be a concise example explaining why and not just glossing over the critical, key, pertinent, essential, vital niggly little things you need to do to post FormData up to a .NET Core application. Grrr.
|
|
|
|
|
Marc Clifton wrote: Don't trust .NET Core. Don't trust open source projects.
Don't trust
FTFY
Real programmers use butterflies
|
|
|
|
|