|
In the past 26 years of places that I've worked, sick leave is wrapped up with other days off in a PTO package. That package does not make a distinction of what those hours are used for, be it bereavement, doctor appt, home emergency, etc.
Vacation days are different in that they are usually known about ahead of time and planned for.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Interesting anniversary. Today, Mrs. Wife and I have reached the second week after the second vaccination - sort of exciting with visits to/from the kids/grandchildren now available.
I'd been "thrown out of my office" to work from home about a month before COVID kicked in, so I don't expect any changes. Well, aside from the veiled threat to all of IT (by CIO) that we may no longer be shielded from the next round of layoffs. I suggest they think it through before acting.
My commute went from 90min each way (commuter rails) to 18min (car) to zero. I like zero.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
I got my second vaccination last Tuesday, so another week for me; my wife gets her first one tomorrow morning.
I was already working from home 3-4 days a week before Covid, so my life really changed very little - and in all honesty mostly for the better. We were already ordering groceries online for pickup, we're just ordering a lot more (and a lot healthier) now than before, and our spending at restaurants has dropped from $75-$100 a week to almost nothing. We never were big shoppers, so that's no loss. And now I don't even have to go inside the library; I can either borrow e-books to read on my various devices or request that physical books be sent to our local branch library and then pick them up using curbside delivery. I'm really hoping they'll keep that service around after everything goes back to whatever "normal" will be.
|
|
|
|
|
Yup - the new normal has had a great opportunity to evolve and there is the saying/song from circ. WW I "how ya' gonna' keep 'em down on the farm . . . ? "
My place I think has plans to continue it (although they don't say as much, yet) because the own one building but the main building's rental space in Brooklyn (Manhattan became to costly) and one reason I think they sent me home in January was to make more space in their own building so they don't have to rent so much space - and now, with everyone on a VM and the test forced upon them, they discovered that working from home saves a real lot of potential rental (and associated costs). $Millions.
Our eating out hasn't changed much - but it was really take-out. Except for a period of closure, we still do Chinese takeout about once a week and G-d's gift to mankind, pizza, about once/month. We never did the grocery delivery: I saw a "shopper" in a store - unmasked &etc. and realized it's worth the risk to not take that risk - "Senior Hours" at many stores helped a lot in shortening the lines. Basically, we're minimalists to begin with and our normal shopping/storeables rabbits kept us out of the shortages by hoard of hoarding idiots.
Recreation outdoors was a few parks - mostly wide-open space. One vacation, to the Finger Lakes region of NY (at the time almost COVID free, later a hot-spot). Much of that, too, by it's nature, was wide-open scenery via hiking trails.
Only big loss was a fully planned trip to Hawaii. With good fortune we managed to get back all of the money - even the travel insurance (Worth it when booking a trip in December to be taken in June). Possibly because our plans were pre-COVID and thus we were truly blameless for having our plans screwed, everyone was merciful. An patience: I didn't jump on air-line vouchers right away but waited for the slowly rolling time frames to make the refunds of non-refundable tickets happen.
But (after my verbose interlude), I think the work-at-home will be a big part of some of the new normal. Not much help for hands-on manufacturing work but for office workers it saves them a bunch money in rental space (and utils) on one end and burning fuel to travel. Even if one is feeling a bit sick there's no danger of spread in you work from home.
What that other old saying? Something like "There's no wind so ill that it doesn't blow some good".
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
True or false: perhaps dieters might eat a famous person? (9)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Bit Celery ? anag of Celebrity where a bit is 0 or 1 (aka True or False)?
|
|
|
|
|
CELEBRITY it is!
True or false BIT
perhaps (anag)
dieters might eat CELERY
a famous person?
You are up tomorrow!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Doh! I'd hoped I was wrong.
|
|
|
|
|
I thought it might be celebrity - but had no idea how to get there!
|
|
|
|
|
It's a bugger when that happens, isn't it?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
And how it just does not work with interfaces or base classes. At least, I can't get it to work, so maybe I'm stupid.
Doing some googling, there's things like HasBaseType that have to be manually coded in the OnModelCreating method, or in the query, potentially using .Include , but really.
Why can't it just figure out what to do based on the class structure?
Maybe it's me. But I can understand why people use Dapper.
|
|
|
|
|
Personally I like to keep it simple and straightforward, i.e. 1 table => 1 class.
i.e. no hierarchy, interface, etc...
Works for me! ^_^
You could argue I am ignoring many powerful features... and you would be right! But it works out quite well for me anyway!
|
|
|
|
|
Maybe you'll get a mail someday that starts with "I have been maintaining your code for a decade now, and I really HATE you!" 
|
|
|
|
|
That's fine, I get a lot of positive comments, so I can look at the negative ones in a funny way!
|
|
|
|
|
Quote: I have been maintaining your code for a decade now, and I really HATE you!
IMHO: If you work for a decade doing plain CRUD, without automating the process, you should probably look for a different profession …
Espen Harlinn
Senior Architect - Ulriken Consulting AS
The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.Edsger W.Dijkstra
|
|
|
|
|
I'm trying to implement a certain degree of abstraction, especially for REST calls, where the entities (tables) are passed in as part of the route and I want CRUD methods that are abstracted so I don't have to write unique code for each context entity.
My problem is one of laziness - I know how to do this in different ways, thought I'd see how one might do this with EF, but I'm too lazy and impatient to figure out what hoops, canyons and mountains I have to jump through, create a bridge over, or climb with enough oxygen tanks, to get it to work.
Maybe I'll google some more.
|
|
|
|
|
I never used oData.. but it looks like LinQ 2 SQL code over WebAPI, could it be something that would be useful to you?
And I remembered being excited about it... but then, in some context it's doomed to obsolescence because exposing the DB is often a no-no.. But it's a god send me think for SPA or private phone apps...
Anyway, if you are curious, here is a link:
OData documentation - OData | Microsoft Docs
modified 22-Mar-21 9:46am.
|
|
|
|
|
Agreed. Frameworks are great if you're solving the same problem as the framework developers. If you're trying to solve something else they're a waste of time.
|
|
|
|
|
EF entities (classes) can have interfaces; used as a base class; and can be composed of partial classes.
The EF "model" understands tables, entities, and related functions; not specific language features.
The (basic) "table" is in fact a "base" class candidate; while a view is a single or multi-table "interface" of selected columns.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Clearly EF is not everyone's cup of tea, but I think things could be worse e.g. when you would have to use NHibernate
Here is an overview of some alternative ORMS[^]
|
|
|
|
|
You mean it should create tables based on your inheritance structure?
EF can deal with regular inheritance and interfaces just fine, I guess it kind of ignores it.
But if you have a class, say Employee, that inherits from Person, a migration won't magically create two tables with Employee having only the Employee specific properties and a reference to Person.
I put everything in OnModelCreating (like types, nullable, etc.).
Just because you're using an ORM doesn't mean you don't have to think about your DB structure anymore
|
|
|
|
|
Sander Rossel wrote: You mean it should create tables based on your inheritance structure?
Nah, I don't want EF creating anything. I just thought I'd try using it, but I want control over the inheritance structure and leave it to my responsibility that the fields defined in the base class are implemented in the table that mirrors the derived class. Seem that it doesn't like that.
|
|
|
|
|
I've never had an issue with that...
However, I use my entities as just that, entities.
"Dumb" classes that do nothing except hold some data.
Whenever I want to do something, anything, with that data, I create a model class.
I've worked with entities before and it always comes back to bite you (lazy loading, then NOT lazy loading, circular references, etc.).
|
|
|
|
|
Using base classes to define common properties for multiple entities just works, in both EF Core and EF6. For example, I often use a TrackedEntity class:
public abstract class TrackedEntity
{
public DateTimeOffset CreatedDate { get; set; }
public string CreatedBy { get; set; }
public DateTimeOffset? UpdatedDate { get; set; }
public string UpdatedBy { get; set; }
}
public class Foo : TrackedEntity
{
public int Id { get; set; }
...
}
public class Bar : TrackedEntity
{
public Guid Id { get; set; }
...
} Each table will have the properties from the base class.
If you want more complicated things, there's always Table-per-Type or Table-per-Hierarchy options:
Inheritance - EF Core | Microsoft Docs[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hmmm, I think when I was testing this, my failure was in declaring the base class as abstract. Like I said, I might be being stupid.
|
|
|
|
|