- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
class AlsoReturnComment extends ReturnValues { return "Frist"; }
Admin
Constructor super calls should not risk a call stack overflow.
Admin
Beautiful! Brilliant!
Admin
I have, for some time now, been convinced that "Agile" is the new "Enterprise".
Admin
(Fisrt)Forth
Admin
I have, for some time now, been convinced that "Agile" is a great idea in the short term, but we will see in 10 years that all of the companies that adopted it have folded because of failure to pay down their technical debt.
Admin
I have, for some time now, mentally substituted the word "Chaos" for "Agile" whenever I heard it.
Admin
Oh....... WTF??
Admin
Good luck persuading anybody of that. (It's very possible that Dave Thomas agrees, but the other Agilistas are off selling courses and suchlike.)
I hold in my hands a book called "Disciplined Agile Delivery," published by IBM Press and 481 pages long. I would not hesitate to suggest that this book, simply by its very existence, proves that Agile is the New Enterprisey.
It's hard to blame Agile for the rottenness in the OP, however. Like the (arbitrary, but useful as a sanity check) limitation on five parameters to a function, the existence of this cast-tastic multivariate indeterminate return structure should, in any methodology whatsoever, induce an immediate rethink and refactor.
You can create technical debt in any methodology whatsoever!
Admin
I am of the same opinion.
But the thing is, even if (y)our hypothesis is true, there's no reason for a software organisation to care one way or the other. Ten years is an awfully long time in software development, so management could legitimately (by their metrics) claim, on the macro level, YAGNI.
If this monstrous heap of unfumigated crap lasts five years and satisfies business requirements ... it's been amortized basically to zero cost. Rinse, wash, repeat.
Admin
I thought this tactic looked familiar, then I recalled:
"If you have a class with 10 properties (member/method) in it, consider a base class with only one property and subclassing it 9 levels deep so that each descendant adds one property. By the time you get to the last descendant class, you’ll have all 10 properties." -- http://mindprod.com/jgloss/unmaindesign.html
Admin
Yeah, of course the extensions on extensions is bad, but what bugs me more is the naming convention they "chose".
"Also return" > "Add" > "Include" > "Include" > "Return with" > "Return with" > "Return with" > "Return with" > "Return with" > "Return with"
I guess they really ended up liking "Return with", but still...
Admin
If you've got to return more than one thing from your method, your method is probably doing too much.
Admin
Add a sub class... Now you have two problems.
Class dismissed!
Admin
fucking facepalm ugh nasty
Admin
I think the main problem here is that there aren't enough classes. For instance, what if I want to return the number of days, the last name, the price, and the expiry date? There should be a class for that combination too, without forcing me to also include the transaction data and so on.
Admin
Id like to touch base on this issue, and synergize the outcomes across multiple spheres of engagement.....
Admin
def message(): return "Such a pity", "they don't use Python"
Admin
Why yes, yesterday was my birthday, thank you! I was perfectly square again
Admin
Happy birthday, Joe. Wish this article went one step further for you and included:
class ReturnWithBirthdayWishes extends ReturnWithPriorities
Cuz everyone knows, birthdays are a priority - sometimes with great returns ;)
Admin
May happy returns of the day, SplinyJoe ;-)
Admin
Good point, Scarlet_Manuka. With twelve parameters, we can capture every possible combination with 4095 subclasses. Not only will this give you the ability to only ever pass the values you actually need, but also it helps your bottom line if you're paid or evaluated by lines of code.
Admin
Agile is not bothering to design things properly upfront and calling it a strategy.
Admin
I would go slightly further.
It's managers telling you to do the minimum required work now (but you have to test it. But there is no quality measure on the tests, so, useless).
And it's managers telling you that it's "OK" to acquire Technical Debt -- trust me, they actually say this -- because Technical Debt can always be paid down later.
And it's managers running the shop as a sausage factory, churning out mystery meat, and claiming bonuses based upon spurious metrics.
And it's managers who blame the designers and the programmers when the whole unwieldy mess of pottage turns upside down and loses them customers.
Not quite the original ideal, but if you examine the original ideal, it was nothing more than a bunch of failed Extreme Programming maniacs (plus Dave Thomas) trying to revive their consultancy careers. In which they were quite successful.
Dave Thomas (my old boss), is exempted from this. He has recanted. But he really shouldn't have said it in the first place.
Admin
YAGNI (You ain't gonna need it) is in response to those bloated bits of code where you put literally everything you think someone might need, because, you know, they might need it.
So you start off with just what you need, and maybe when you need a bit more, you add more to it. But SOMEONE should have said -- Hey, wait a minute, this is getting complicated, let's figure out a better way of doing this...
C# and javascript have dynamic objects; or you could have a dictionary of keys/objects, or (gasp) put the actual return values on the heap somewhere and just return a key to find that return object, or ...
Admin
Sorry, mate, you'll have to run a story by the owner of my journey for that.
Admin
Ugh. I wish I hadn't read that Unmaindesign page now. It made me want to weep.
Admin
And each Class is repeating the same database IO (probably from the same table(s) or View) to retrieve that piece of data. Good thing most databases nowadays have good caching.
Admin
"wonder if maybe they should have been just a little less agile and that perhaps a tad more planning was required" - I completely disagree.
RESPONDING to change does not imply any sacrifice to "Technical Excellence", "Best Design and Architecture" or any other element.
It is all about making JUST IN TIME (not too early, nor too late) decisions.
Admin
Snoofle, how did you know it was my birthday on the 6th? Eerie.
Admin
TRWTF is that practically all programming languages still only support one return value, even though multiple parameters have been around forever. There are many situations where multiple return values may be required, just look at the number of functions that take reference/pointer parameters for additional return values.
A classic example is a function that needs to return a piece of data long with a status code. The common solutions are to either a) use a reference parameter for one of the return values, b) hackishly "combine" the return values into one value, such as using a positive pointer for the data or a negative error code, or c) use a follow-up call to another function to get the status of the previous function call.
There's no technical reason why multiple return values aren't possible, and no sane reason to assume that this won't or shouldn't be necessary. AFAIK Lua is the only language that gets this right, and all the big OOP languages (even the newer ones like Kotlin) require a workaround and don't naturally support multiple return values.
Admin
I think it was originally meant to spell "fragile", but the initial "fr" couldn't come through unit tests, so they simply dropped it :q