Click here to Skip to main content
15,895,192 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!

 
NewsIs Python the fastest growing programming language? Pin
Kent Sharkey10-Sep-17 18:01
staffKent Sharkey10-Sep-17 18:01 
GeneralRe: Is Python the fastest growing programming language? Pin
Marc Clifton11-Sep-17 2:05
mvaMarc Clifton11-Sep-17 2:05 
GeneralRe: Is Python the fastest growing programming language? Pin
Dan Neely11-Sep-17 2:25
Dan Neely11-Sep-17 2:25 
GeneralRe: Is Python the fastest growing programming language? Pin
Tomaž Štih11-Sep-17 22:26
Tomaž Štih11-Sep-17 22:26 
NewsC# 7: What are Discards and how to use them Pin
Kent Sharkey10-Sep-17 18:01
staffKent Sharkey10-Sep-17 18:01 
GeneralRe: C# 7: What are Discards and how to use them Pin
Bernhard Hiller10-Sep-17 21:03
Bernhard Hiller10-Sep-17 21:03 
GeneralRe: C# 7: What are Discards and how to use them Pin
Eddy Vluggen11-Sep-17 1:15
professionalEddy Vluggen11-Sep-17 1:15 
GeneralRe: C# 7: What are Discards and how to use them Pin
Dan Neely11-Sep-17 2:39
Dan Neely11-Sep-17 2:39 
Bernhard Hiller wrote:
A great new invention for showing that code flow relies on side effects only (why else would you ignore the return / out value?). That's interesting news for the real world clean coder.


... or just questionably designed APIs you can't get rid of.

C#
/// <summary>
/// Frobinates the data if possible.  Returns the data in multiple formats so you always have the one you need.
/// </summary>
/// ...
/// <param name="errorMessage">Returns 'Frobinated the data.' on success or 'Data not frobinatable!!!!!' if anything goes wrong.</param>
/// ...
public void AttemptToFrobinateData(MyDataType theSourceData, out string resultMessage, out bool succeeded, out MyDateType theOutputData, out string theOutputAsJson, out string theOutputAsXml)


Yeah I packed multiple WTFs into this on purpose, but having one of them is hardly uncommon. `resultMessage` is utterly useless as anything but a not even half-elephanted attempt to be lazy about generating a display message to the user and is redundant with `succeeded` in any event. Having a single publicly facing method return the data in multiple formats is also facepalmy in most circumstances. At most you might want a pair of overloads that return the serialized data instead of the raw object. Either `succeeded` or the desired flavor of result data should be a return value instead of an out parameter.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius

Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt

GeneralRe: C# 7: What are Discards and how to use them Pin
Bernhard Hiller11-Sep-17 5:02
Bernhard Hiller11-Sep-17 5:02 
GeneralRe: C# 7: What are Discards and how to use them Pin
Dan Neely11-Sep-17 7:37
Dan Neely11-Sep-17 7:37 
GeneralRe: C# 7: What are Discards and how to use them Pin
Pete O'Hanlon10-Sep-17 22:40
mvePete O'Hanlon10-Sep-17 22:40 
GeneralRe: C# 7: What are Discards and how to use them Pin
Jochen Arndt11-Sep-17 1:15
professionalJochen Arndt11-Sep-17 1:15 
NewsThe hackers who broke into Equifax exploited a flaw in open-source server software Pin
Kent Sharkey10-Sep-17 18:01
staffKent Sharkey10-Sep-17 18:01 
NewsOracle: Java 9 will not receive long-term support Pin
Kent Sharkey10-Sep-17 18:01
staffKent Sharkey10-Sep-17 18:01 
GeneralRe: Oracle: Java 9 will not receive long-term support Pin
Dan Neely11-Sep-17 7:41
Dan Neely11-Sep-17 7:41 
NewsAre we being watched? Tens of other worlds could spot the Earth Pin
Kent Sharkey10-Sep-17 18:01
staffKent Sharkey10-Sep-17 18:01 
NewsTry Azure #CosmosDB for free Pin
Kent Sharkey10-Sep-17 18:01
staffKent Sharkey10-Sep-17 18:01 
NewsBug in Windows kernel could prevent security software from identifying malware Pin
Kent Sharkey10-Sep-17 18:01
staffKent Sharkey10-Sep-17 18:01 
NewsAI and the (maniacs ? Illuminati ?) busy birthing BabyX Pin
BillWoodruff7-Sep-17 15:22
professionalBillWoodruff7-Sep-17 15:22 
NewsVisual Studio WinForms Designer on HighDPI Pin
Kent Sharkey7-Sep-17 12:46
staffKent Sharkey7-Sep-17 12:46 
GeneralRe: Visual Studio WinForms Designer on HighDPI Pin
BillWoodruff7-Sep-17 15:24
professionalBillWoodruff7-Sep-17 15:24 
GeneralRe: Visual Studio WinForms Designer on HighDPI Pin
Kent Sharkey8-Sep-17 6:51
staffKent Sharkey8-Sep-17 6:51 
GeneralRe: Visual Studio WinForms Designer on HighDPI Pin
Chris Losinger8-Sep-17 6:43
professionalChris Losinger8-Sep-17 6:43 
NewsHackers can take over our electricity with ease Pin
Kent Sharkey7-Sep-17 12:46
staffKent Sharkey7-Sep-17 12:46 
NewsC++17 is formally approved Pin
Kent Sharkey7-Sep-17 12:31
staffKent Sharkey7-Sep-17 12:31 

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.