Would be nice!
Marc
(my first post on the new site!)
Would be nice!
Marc
(my first post on the new site!)
Yeah, people are often change resistant until it becomes a matter of life or death for them or their children. And even then... :(
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
What I see happening in my fuzzy crystal ball is that we're heading towards Basic Income or something similar. Depending on how that works out, we'll either see masses of people becoming addicted to both legal and illegal drugs, or a bizarre cultural revolution where people simply start doing what they really want (or can, with limited resources) do because at least they have a small room, food, and basic medical care. Or something in-between both of those extremes. Somewhere though, education, particularly higher education, also needs to become "free" because people in these service industries can't afford education. Heck, even middle-class people can't afford education.
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
Technological advances always displace people's jobs and in theory creates new jobs, though not as many and often requiring significant retraining / new skills. I tend to be less concerned with AI per se and more concerned with the robotization of lots of things (which, yes, AI plays a part in of course) and the droves of people that will be replaced, a significant number being in service industries. We're not looking at / planning for the social shifts that will result.
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
If CP disappears at some point, I'm am hoping that it will be after I've disappeared. ;) Though I agree, it would be nice to hear from the new leadership as to the future of CP.
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
I've been a member for 22 years. First found CP while searching for something C or C++ related, while living in North Guilford CT, using a 64KB IDSN connection. Gads that was slow. Where would I have gone? For posting articles, nowhere at the time. Eventually I would have started posting articles on a blog or a website, both of which I eventually created, but I've pretty much posted all my articles here. As to finding a community like CP? I think what CP has provided over the years is irreplaceable. There is nothing that compares, at least that I've found. Same with finding valuable resources. My code over the years is liberally sprinkled with comments like "see Code Project article here:"
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
Given I have 260 articles and 8 tips/tricks, that's quite a chore. Almost worth hiring someone.
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
Synthetic quartz can also be "grown."
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
Pascal, BASIC, Fortran, COBOL, and I would even go out on a limb and say assembly.
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
GKP1992 wrote:
Create a nested tuple and now you don't know which element you are referring to when you say Item2
Tuple "items" can be named, so: var name = GetMyName();
where:
(string firstName, string lastName) GetMyName()
{
return ("Marc", "Clifton");
}
I can use name.firstName
and name.lastName
Most of the time. ;)
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
Yes, tuples are great, especially as a replacement for out string foo
and I use them primarily for returning multiple things for rather low level methods when out
or a C# class/struct is just overkill. The fact that the tuple parameters can be named was a huge advancement, rather than having to use Item1
, Item2
, etc. That said, I use them judiciously and always ask myself, if I'm using a tuple here, is that the right approach or am I compensating for a possibly bad "design." For example (this from code I have in a library):
public (HttpStatusCode status, string content) Get(string url, Dictionary headers = null)
{
var client = RestClientFactory();
var request = new RestRequest(url, Method.Get);
headers?.ForEach(kvp => request.AddHeader(kvp.Key, kvp.Value));
RestResponse response = client.Execute(request);
return (response.StatusCode, response.Content);
}
Why am I parsing out the status code and content instead of just returning the response
object? One answer is that returning response
may probably require a using RestSharp
and even a reference to the RestSharp package in the caller project. OK, maybe that's a defensible argument, maybe not. After using this library of mine (REST is just one small part of this library) I'm not that thrilled with my initial wrapper implementation. But because I started this "pattern", it continues, like:
public (T item, HttpStatusCode status, string content) Get(string url, Dictionary headers = null) where T : new()
{
var client = RestClientFactory();
var request = new RestRequest(url, Method.Get);
headers?.ForEach(kvp => request.AddHeader(kvp.Key, kvp.Value));
RestResponse response = client.Execute(request);
T ret = TryDeserialize(response);
return (ret, response.StatusCode, response.Content);
}
And this illustrates mashing together various potentially bad implementation/designs. The tuple now returns three things, and the TryDeserialize
catches exceptions silently, returning a null for T item
, and what if I want the actual deserialization exception? And now that I look at that code again after a couple years, what's with that AddHeader
loop when there's a perfectly
From wikipedia: CPU @ 500 kHz Memory 2K (2048) 35-bit words (i.e., 83⁄4 kilobytes) (ultrasonic delay-line memory based on tanks of mercury) Good lord! And that was probably state of the art at the time.
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
@chris-maunder Code Project changed my life in major ways. Very few things, besides the birth of a child, have done that in my life. So thank you and the team for incarnating Code Project and my best wishes to your family and finding wellness and balance. I hope everything is OK.
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
It's about time, IMHO.
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
Oh look, I'm using an archaic fixed length COBOL-style file format! How's that for the name? ;)
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
trønderen wrote:
you could just type and run, no waiting for compilation.
Yup. Type. Run. And if you by happenchance execute the new code you just typed, discover the syntax errors at runtime instead of compile-time! :laugh:
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
Vivi Chellappa wrote:
What makes software different from common household goods such as TV, automobiles, etc?
Nothing, the rest of those industries just hasn't caught up yet. If you read about about The Great Reset, or whatever it's called, one of the key components is that nobody owns anything -- they rent stuff. :omg: "You'll own nothing and you'll be happy" - World Economic Forum, 2016.[^]
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
I don't waste my time on theming. ;)
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
The Formics are coming! (Sorry, just watched Ender's Game again -- the book is of course better, but it's always a pleasure to watch Harrison Ford.)
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework
Quote:
Another issue is interruptions causing lack of time for deep work, reported by 27 percent.
I read that first as:
Quote:
Another issue is interruptions causing lack of time for sleeping at work, reported by 27 percent.
Truly, I did read it that way first, was scanning the article rather too quickly. :laugh:
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework