-
Feature Articles
- Most Recent Articles
- The Easy No
- Flushed Out
- The Hot Fix
- The Roadmap
- Let's Be Facebook!
- Whales Ahoy!
- Three Digit Acronyms
- The Pride Goeth
- 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
If the application has not even run a full decade in production, how can it be considered legacy? Especially in finance, legacy is from the previous millennium, or older! Please don't ask how I know.
Admin
You exaggerate slightly, requiring it to be beyond a quarter-century before it's "legacy". All it requires is a few lava flow antipatterns in each source file, some "here be dragons" areas, and the occasional chunk of system where all the people who ever knew how it works have gone, been wented, or even passed on from this mortal coil.
A decade is easily enough time for that.
Admin
Actually a good use case to try and utilize AI to write the unit tests (and check them of course) maybe
Admin
You forgot obsolete technology that isn't taught in schools any more and can't be found online.
Admin
True enough, and you're quite right.
Admin
Well, it has code painting in it - that's always a bad sign.
Admin
It's funny you put it like that because for the most part, all the tech I learned on in school was older than anything I used after I graduated. That's fine, though, because you're not in school to learn the languages, you're there to learn the principles.
Admin
I'm not well-versed in LINQ, but isn't it lazy? We're assigning a lazily evaluated IEnumerable to a property of some structure/class. This is bound to backfire.
Admin
No, I think you getting confused how IEnumerable and IQueryable work.
IEnumerable implement GetEnumerator(), which are enumerators based on state machines. So it's quite literally the opposite of lazy since you end up with the most eager (mostly) allocation free way to, well, enumerate collections.
IQueryable are on other hand the opposite. If you are not using them outright as expression parsers (like f.e. building SQL strings to be send to databases etc.), they are composed as late as possible to optimize for best compute performance sacrificing eagerness.
But both concept have nothing to do with lazy - an IQueryable can be in a worst case scenario end up being as eager as IEnumerable, especially we combined value type enumerators now commonly used by the compiler to avoid allocations of enumerators themselves due to how the chaining works.
Admin
IEnumerable can definitely be lazy: All it requires is that it do nothing until GetEnumerator() is called. And even the enumerator itself could be lazy, especially if its implementation assumes the underlying collection won't change but doesn't enforce it.
Admin
"or older"?!
Admin
Many Linq expressions are lazy. Any time you take an
IEnumerable, you had best beware that it might be lazy. If that's a problem, then you need to call something likeToList()to force it to be realized.