Hamas terrorists held family at gunpoint before murdering daughter, 18, and forcing them to live stream October 7 atrocities
White Stripes frontman Jack White and ex Karen Elson's daughter Scarlett, 19, is the spitting image of her famous parents in fun dance clip after she made her catwalk debut in Paris
Karen Carney reveals she is using Strictly to help 'rebuild confidence' after being 'crushed' by the sexist abuse she faced as a football pundit
Google DeepMind minds the patch with AI flaw-fixing scheme
Google says its AI-powered security repair tool CodeMender has been helping secure open source projects through automated patch creation, subject to human approval.…
Kangaroo Island: Surfer bitten TWICE by a shark drives himself to hospital for emergency surgery
Black Holes Might Hold the Key To a 60-Year Cosmic Mystery
Read more of this story at Slashdot.
Moment furious bystanders confront young woman as she cuts down yellow ribbons for Israeli hostages from a fence in North London
Nicole Kidman is supported by children Sunday Rose, 17, and Faith, 14, at star-studded Chanel catwalk show in Paris as they make their first appearance together since actress confirmed her marriage is over
'Trump has COMPLETELY lost it': President attacked after making extraordinary 9/11 claim
Jennifer Lopez and Ben Affleck get VERY cozy at Kiss Of The Spider Woman premiere a year after divorce
Parents call for more compassion as Essex cricketer awarded George Medal
Parents call for more compassion as Essex cricketer awarded George Medal
Mother of Israeli hostage snatched by Hamas at Nova festival hopes peace deal talks will see her 'strong, beautiful' son released
Gary Neville's builder backlash: 'Angry' workers who he ordered to remove Union Jack hit back and accuse him of suppressing free speech
Representative Line: Listing Off the Problems
Today, Mike sends us a Java Representative Line that is, well, very representative. The line itself isn't inherently a WTF, but it points to WTFs behind it. It's an omen of WTFs, a harbinger.
ArrayList[] data = new ArrayList[dataList.size()];dataList is an array list. This line creates an array of arraylists, equal in length to dataList. Why? It's hard to say for certain, but the whiff I get off it is that this is an attempt to do "object orientation by array(list)s." Each entry in dataList is some sort of object. They're going to convert each object in dataList into an arraylist of values. This also either is old enough to predate Java generics (which is its own WTF), or explicitly wants a non-generic version so that it can do this munging of values into an array.
Mike provided no further explanation, so that's all speculation. But what is true is that when I see a line like that, my programmer sense starting tingling- something is wrong, even if I don't quite know what.
[Advertisement] Picking up NuGet is easy. Getting good at it takes time. Download our guide to learn the best practice of NuGet for the Enterprise.