Click here to Skip to main content
15,891,033 members

The Insider News

   

The Insider News is for breaking IT and Software development news. Post your news, your alerts and your inside scoops. This is an IT news-only forum - all off-topic, non-news posts will be removed. If you wish to ask a programming question please post it here.

Get The Daily Insider direct to your mailbox every day. Subscribe now!

 
GeneralRe: MIT created an AI that knows the ingredients in your food Pin
Kornfeld Eliyahu Peter22-Jul-17 20:19
professionalKornfeld Eliyahu Peter22-Jul-17 20:19 
GeneralRe: MIT created an AI that knows the ingredients in your food Pin
David O'Neil23-Jul-17 18:42
professionalDavid O'Neil23-Jul-17 18:42 
NewsWelcome to Outer Space View Pin
Kent Sharkey20-Jul-17 7:43
staffKent Sharkey20-Jul-17 7:43 
NewsAlphaBay and Hansa dark web markets shut down Pin
Kent Sharkey20-Jul-17 7:41
staffKent Sharkey20-Jul-17 7:41 
GeneralRe: AlphaBay and Hansa dark web markets shut down Pin
Jan Steyn23-Jul-17 22:27
Jan Steyn23-Jul-17 22:27 
NewsDo people write insane code with multiple overlapping side effects with a straight face? Pin
Kent Sharkey20-Jul-17 7:38
staffKent Sharkey20-Jul-17 7:38 
GeneralRe: Do people write insane code with multiple overlapping side effects with a straight face? Pin
PIEBALDconsult20-Jul-17 9:22
mvePIEBALDconsult20-Jul-17 9:22 
GeneralRe: Do people write insane code with multiple overlapping side effects with a straight face? Pin
Sander Rossel20-Jul-17 21:53
professionalSander Rossel20-Jul-17 21:53 
I currently have to deal with a coworker who does the opposite.
His code is so friggin long and stretched with all kind of useless things (and lots of if-elses) that no one could possibly decipher what that code is doing exactly.
Like creating "helper" classes that create an object and set one property.

From the top of my head.
C#
[ThisIsNecessaryForMef("SOME_CODE", typeof(MyHelper))]
public class MyHelper
{
   public IMyObject CreateObject(Input input)
   {
      IMyObject obj = SomeWeirdMefDiSolution.CreateObject<IMyObject>();
      obj.Id = input.Id;
      return obj;
   }
}
I should mention that MEF is NOT a DI container, but that's how we use it.
IMyObject is only used to pass some data, it has only properties and never any functions (and never more than one implementation), so why use DI in the first place?
Wait, I'm forgetting something, IMyObject HAS two functions, Serialize and Deserialize (do you see the problem with deserializing an object using the object before it's deserialized? D'Oh! | :doh: ).
And why create a complete helper object just to set a single property? WTF | :WTF:
You may be thinking this is handy when the creation logic changes (which it never does), but this is used in just one place only.
To make things worse, even the helper class is instantiated using MEF/DI.
Probably in a function of 1000 lines of code.

Here's the worst part, when you don't do exactly this he labels your code as "quick and dirty".

GeneralRe: Do people write insane code with multiple overlapping side effects with a straight face? Pin
Bernhard Hiller20-Jul-17 22:38
Bernhard Hiller20-Jul-17 22:38 
GeneralRe: Do people write insane code with multiple overlapping side effects with a straight face? Pin
Sander Rossel22-Jul-17 0:43
professionalSander Rossel22-Jul-17 0:43 
GeneralRe: Do people write insane code with multiple overlapping side effects with a straight face? Pin
Bernhard Hiller20-Jul-17 22:43
Bernhard Hiller20-Jul-17 22:43 
NewsStanford University dumps Java as an introductory programming language Pin
Kent Sharkey20-Jul-17 7:35
staffKent Sharkey20-Jul-17 7:35 
GeneralRe: Stanford University dumps Java as an introductory programming language Pin
Joe Woodbury20-Jul-17 8:18
professionalJoe Woodbury20-Jul-17 8:18 
GeneralRe: Stanford University dumps Java as an introductory programming language Pin
Jon McKee20-Jul-17 9:32
professionalJon McKee20-Jul-17 9:32 
GeneralRe: Stanford University dumps Java as an introductory programming language PinPopular
Marc Clifton20-Jul-17 15:14
mvaMarc Clifton20-Jul-17 15:14 
GeneralRe: Stanford University dumps Java as an introductory programming language Pin
PIEBALDconsult21-Jul-17 7:11
mvePIEBALDconsult21-Jul-17 7:11 
GeneralRe: Stanford University dumps Java as an introductory programming language Pin
PeejayAdams20-Jul-17 23:06
PeejayAdams20-Jul-17 23:06 
GeneralRe: Stanford University dumps Java as an introductory programming language Pin
Rob Grainger21-Jul-17 1:58
Rob Grainger21-Jul-17 1:58 
GeneralRe: Stanford University dumps Java as an introductory programming language Pin
PeejayAdams21-Jul-17 3:34
PeejayAdams21-Jul-17 3:34 
GeneralRe: Stanford University dumps Java as an introductory programming language Pin
Rob Grainger21-Jul-17 5:06
Rob Grainger21-Jul-17 5:06 
GeneralRe: Stanford University dumps Java as an introductory programming language Pin
PeejayAdams21-Jul-17 6:20
PeejayAdams21-Jul-17 6:20 
GeneralRe: Stanford University dumps Java as an introductory programming language Pin
PIEBALDconsult21-Jul-17 7:22
mvePIEBALDconsult21-Jul-17 7:22 
GeneralRe: Stanford University dumps Java as an introductory programming language Pin
TheGreatAndPowerfulOz21-Jul-17 10:09
TheGreatAndPowerfulOz21-Jul-17 10:09 
GeneralRe: Stanford University dumps Java as an introductory programming language Pin
Rob Grainger22-Jul-17 23:35
Rob Grainger22-Jul-17 23:35 
NewsA.I. scientists to Elon Musk: Stop saying robots will kill us all Pin
Kent Sharkey19-Jul-17 11:59
staffKent Sharkey19-Jul-17 11:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.