|
Chris Maunder wrote: And yes, the real laziness here is not rewriting the entire WebForms app in MVC. Or Angular. Or Blazor. Or ...
PHP?
|
|
|
|
|
If no problem with lazy code, but with some people which write big work around with new flags and handling for one special case as my mate proposed on friday afternoon .
I replies on friday afternoon I dont start new coding tasks.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
The worst I've done was low-level parsing in the high-level part of my parser. The low-level part I inherited is, understandably, somewhat complex and I was running low on time so I've made a low-level distinction between two values in the high-level part framed with a comment about how sorry I am.
|
|
|
|
|
I wrote a C++ program to close a dialog which is left open by another program when it loses it's connectionto SQL Server, which it does on a not infrequent basis.
In my defence:
1. The offending program is written in VB6 and I am not refactoring that.
2. It is running on Windows 7. Not an actual server OS. (Until last year when the physical hardware got vitualised it was XP)
3. No one else here really knows C++ so that will be my lasting gift to them
|
|
|
|
|
if (claim.Contract.ProgramID == 280)
{
taxAddOns = ClaimsAccess.AddTaxToAddOnList(taxAddOns, claim.Contract.ProductID);
}
and then the ClaimsAccess method hard-codes building the objects it returns, instead of looking at the database for them.
So:
- Too lazy to add an attribute to the Program data to represent the business need
-- Probably really means they didn't understand the business need
-- Of course, nobody else will ever want this to happen, so we shouldn't even make the program id a configuration value.
- hard-coding the construction of the objects instead of running off to the database
This is the sort of terrible approach I have to fight every day, day in and day out.
|
|
|
|
|
Chris Maunder wrote: var count = GetCount();
Using var is possibly the laziest code technique I've ever run across. It makes the code harder to read and opens up the real possibility of type cast errors when the initialization results in the wrong data type.
|
|
|
|
|
Here is the laziest code of all:
The code which is written correctly FIRST TIME around, with no correction needed to it ever, no need to revisit it ever again.
Does it have to take longer?
No, because you'll never spend time on it again.
Does it take a long time to write such code?
Not if you actually are capable of perceiving all ramifications of it, and actually confront the entirety of the issue at hand.
The writers who spend 7 years to write a 500 page book don't actually write better books ... did you know that most of the well known artists like Mozart etc, spent incredibly little time to create immortal master pieces?
Sorry for not being funny ...
|
|
|
|
|
nepdev wrote: did you know that most of the well known artists like Mozart etc, spent incredibly little time to create immortal master pieces?
My understanding is that this is actually an urban myth (Here's a Guardian article[^] that mentions this too)
If you can write code that works first time, no fixes, forever and ever then I take my hat off to you. You've either put in a lot of work to get to this point or you're incredibly lucky. It's usually the former.
What I was after wasn't the code that took the least effort to write. I was after the code you wrote with the least *thinking* and that you know, deep down, is just wrong, but you do it anyway. Like eating a doughnut: so wrong, but so easy.
cheers
Chris Maunder
|
|
|
|
|
After spending a week on my yearly elderly cruise
My grandparents have both been in the hospital last year (heart attack and I can't even remember what grandma had) and so they weren't quite up for a cruise this year...
Until my mom told them we'd be going to Friesland (northern Dutch province).
They'd still be in the Netherlands and my grandpa is from Friesland so they've been there before and it's known territory.
So my grandparents had a great week (despite the heatwave) and they wanted to go again next year.
And it pains me to say, but the Netherlands isn't my vacation country
Maybe because I live there and I've seen the water, the polders, the ditches and the flatness (I like mountains and forests with an occasional castle, needless to say I love Germany!).
And maybe because it's just too crowded, there are people and cars everywhere you go.
In fact, if you're reading this and you're living in the Netherlands I strongly advice you to move to another country and take about four million people with you (I'm not going because I like living here)
Not sure if I can stand another elderly cruise next year though
|
|
|
|
|
Sander Rossel wrote: I like mountains and forests with an occasional castle
Sander Rossel wrote: Not sure if I can stand another elderly cruise next year though
You are doing the good deed by going though, some day your grandparents will not be with you, and you will remember the times you were with them. Worth the frustration IMHO.
|
|
|
|
|
|
Sander Rossel wrote: more people should do this.
Show them old folks some love
Agreed
|
|
|
|
|
So you were part of the mob traipsing through my town, dripping ice-cream everywhere, and making it impossible to cycle the forest paths!
Bloody foreigners! Stay down south, where you belong!
A wall, that's what we need! Walls work!
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I'm only fleeing from all the tourists over here!
Be a tourist or be touristed!
|
|
|
|
|
Yes, Wall-ace is what we need
|
|
|
|
|
Quote: And it pains me to say, but the Netherlands isn't my vacation country Denmark, the sensible alternative !
|
|
|
|
|
I'd really like to visit it sometime!
It's supposed to be really dull, but at least they have Lego Land
Denmark and Sweden are still on my list though.
|
|
|
|
|
It depends what part you visit, I found the westcoast of Jutland not very interesting, looks like the waddenzee and Friesland. The eastcoast is more fun I think, more hills and fjords and interesting places like Sonderborg and Aarhus.
|
|
|
|
|
Sander Rossel wrote: Not sure if I can stand another elderly cruise next year though Give it a few years, and you may start to enjoy it
Sander Rossel wrote: And it pains me to say, but the Netherlands isn't my vacation country So how was the fine dining on the cruise? Which stamppot did you have?
Sander Rossel wrote: In fact, if you're reading this and you're living in the Netherlands I strongly advice you to move to another country I live just next to the German border. Forests, some hills, the occasional castle - so no, not moving when I have the best of both worlds
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
|
Sander Rossel wrote: The crew was mostly Indonesian so we did have an Indonesian buffet.
No sambal added because old folks can't eat spicy food! A small bottle of tabasco doesn't take much room in the luggage
Sander Rossel wrote: I know myself well enough to know I wouldn't go outside when I'm not on vacation anyway You only (allowed) outside for 3 weeks/year?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"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 only (allowed) outside for 3 weeks/year? Believe me when I say it's better for everyone that way
|
|
|
|
|
Are birds of prey also known as nuns?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Lonely, vicious things with sharp claws and a kill everything attitude?
Yep, them's nuns alright!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
They await the day of the raptor.
|
|
|
|