|
This week I've had the pleasure to work on an application I wrote three years ago.
Today I'm working on an application I started three months ago.
The recent application has a few less layers of, well, overhead.
I've gone from business and data layers to validations and (Entity Framework Core) database code straight in my controllers.
There's little to no reuse between the code anyway.
Then the database.
I've gone from hardcore "normalize ALL the things!" to "I need to save this redundantly anyway."
The redundant storage is mostly for reporting and historical accuracy (for example, save a name in a record as it is now, not relying on the name in a related record as that might change over time).
It feels like I've been studying all these best practices for years, but in the end only one practice really reigns supreme: YAGNI[^].
Don't get me wrong, I think you need to know the best practices before you have the right to ignore them, it should be a choice, not ignorance.
Kind of like not knowing the law is not an excuse to break it.
Is this what they call "experience"?
It certainly makes coding a lot easier
This message was brought to you by Not-Working-In-A-Team, LLC.
|
|
|
|
|
Sander Rossel wrote: I think you need to know the best practices before you have the right to ignore them, it should be a choice, not ignorance.
Nice way to put it
Though, believe it would depend on mindset and with whom you are discussing/reviewing it. Flexible ones will take it and rigid ones would stick to 'best' known practice.
Sander Rossel wrote: Is this what they call "experience"?
|
|
|
|
|
Before I got to the end I was going to say, I think that's called "applying your experience", so yeah
I often feel the majority of the time, "best practices" are there to make sure all the noobs are doing things the same way. Less stress for the seniors, because they can just fob them off with "go and learn practice X".
And yeah, "no team" makes things a lot simpler.. the more people you have working on something, the longer it takes to get it done!
|
|
|
|
|
Sander Rossel wrote: The redundant storage is mostly for reporting and historical accuracy (for example, save a name in a record as it is now, not relying on the name in a related record as that might change over time).
That has always been my objection to over-normalization.
We almost always wound up with databases we lovingly called BigAss Tables. That comes of working mainly for the military where vendors and "customers" change frequently.
|
|
|
|
|
Yeah - what we've done vs. what we do - the improvements aren't limited to code, either.
However, agreeing with one of your points: fully normalizing SQL tables isn't always the best practice. Sometimes it just makes mores sense to have for each record instead of a reference to it (as a most likely scenario).
That term "best practices" - that's really someone's opinion. How you name your symbols? Hungarian notation was all the rage. I used camelCase. Now camelCase is much appreciated. I still use camelCase. And when next the latest and greatest comes out to be the next Best Practice . . . well, actually I can retire whenever I want so who gives a sh*t what they think? For, you see,
I figured out the real meaning of best practices - something that works, is maintainable, understandable by others and even yourself after a few years. Something that is enduring.
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 |
|
|
|
|
|
W∴ Balboos, GHB wrote: I figured out the real meaning of best practices - something that works, is maintainable, understandable by others and even yourself after a few years. Something that is enduring.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
W∴ Balboos, GHB wrote: I figured out the real meaning of best practices - something that works, is maintainable, understandable by others and even yourself after a few years. Something that is enduring.
Hear! Hear! Well said!
"Go forth into the source" - Neal Morse
|
|
|
|
|
Just wait until you have forgotten more than some people will ever know.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
Experience is when you know which shortcuts you can take without them coming back biting your ass a few years down the line.
So yes.
Wrong is evil and must be defeated. - Jeff Ello
Never stop dreaming - Freddie Kruger
|
|
|
|
|
Jörgen Andersson wrote: Experience is when you know which shortcuts you can take without them coming back biting your ass a few years down the line. And yet, they still will
|
|
|
|
|
I think theoldfool answered that one below already.
Wrong is evil and must be defeated. - Jeff Ello
Never stop dreaming - Freddie Kruger
|
|
|
|
|
Experience is something you think you have, until you get more of it.
If you can keep your head while those about you are losing theirs, perhaps you don't understand the situation.
|
|
|
|
|
|
I only know I know nothing?
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Well, if you know that, then you know something.
I think I just confused myself.
If you can keep your head while those about you are losing theirs, perhaps you don't understand the situation.
|
|
|
|
|
Haha. Still trying to work out how to grade it myself.
I'm certain anything higher than a 50% grade would be an error.
Lets spin the big old steel wheel shall we?
Zero's to the left of me
Half's to the right, here I am
Stuck in the middle with you!
|
|
|
|
|
I call it "the more you know, the more you realize how little you know".
|
|
|
|
|
In my case:
Experience: "recognizing a mistake the second time you make it"
Anonymous
If you can keep your head while those about you are losing theirs, perhaps you don't understand the situation.
|
|
|
|
|
Quote: Don't get me wrong, I think you need to know the best practices before you have the right to ignore them, it should be a choice, not ignorance.
Picasso was a very good academic realist before moving on to break all the rules... not to be construed as you would be a Picasso of programming but you get the gist
Mircea
|
|
|
|
|
Mircea Neacsu wrote: be a Picasso of programming This phrase brings up some rather interesting imaginings.
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 |
|
|
|
|
|
Feet hurt oh so much less than ears, that's for sure!
|
|
|
|
|
I know many programming Picasso's! /
|
|
|
|
|
Because they are genious?
Or because their programs are totally surrealistic?
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
In the day you had "data base administrators" that would force feed their normalized databases on the application developers; whether it made sense or not. That, and "QA". Enjoy it if it lasts (being "in charge").
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
|
|
|
|
|
Experience is when you start designing things right the first time. It's also when you have a large enough codebase/repertoire of projects that nothing's really new anymore...it's just a matter of remembering where you did that thing and translating it and quite possibly improving it.
Software is a great job that way...getting paid to make something out of nothing and constantly building on what you learned yesterday! It's the people that annoy me.
"Go forth into the source" - Neal Morse
|
|
|
|