Click here to Skip to main content
15,890,579 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Is it my fault? Pin
F-ES Sitecore16-May-18 4:09
professionalF-ES Sitecore16-May-18 4:09 
GeneralRe: Is it my fault? Pin
Eddy Vluggen16-May-18 10:35
professionalEddy Vluggen16-May-18 10:35 
GeneralRe: Is it my fault? Pin
F-ES Sitecore16-May-18 22:27
professionalF-ES Sitecore16-May-18 22:27 
GeneralRe: Is it my fault? Pin
Eddy Vluggen18-May-18 0:03
professionalEddy Vluggen18-May-18 0:03 
GeneralRe: Is it my fault? Pin
F-ES Sitecore18-May-18 0:10
professionalF-ES Sitecore18-May-18 0:10 
GeneralRe: Is it my fault? Pin
Eddy Vluggen18-May-18 0:16
professionalEddy Vluggen18-May-18 0:16 
GeneralRe: Is it my fault? Pin
Jon McKee17-May-18 18:21
professionalJon McKee17-May-18 18:21 
GeneralRe: Is it my fault? Pin
Eddy Vluggen17-May-18 23:57
professionalEddy Vluggen17-May-18 23:57 
Jon McKee wrote:

You're conflating contexts. Think of things from the perspective of the class. A File class' only purpose is to manipulate a file. Singular. A developer specifies a path. You have every expectation that file should exist. Now you're a Collection class. You handle an object set. Plural. A developer specifies an object. You have two options now: 1) the object set is well-defined, the object should exist, 2) the object set is not well-defined, the object might exist.

The big difference is that the Collection relies on the properties of the set while the File relies on the properties of the individual.
Lots of nonsense.

Jon McKee wrote:
Collections are more abstractly complex than Files.
So, a string is more complex than an Sql Server database-file now? And the string determines your approach?

Jon McKee wrote:
Agreed. Unless it's appropriate. In which case it's simply inefficient to use exceptions.
The only example I have seen that could be called "inappropriate" is where a try-catch is if you use it for a single check. Whether it is efficient depends on how often an exception is raised.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

GeneralRe: Is it my fault? Pin
Jon McKee18-May-18 10:13
professionalJon McKee18-May-18 10:13 
GeneralRe: Is it my fault? Pin
Eddy Vluggen18-May-18 13:09
professionalEddy Vluggen18-May-18 13:09 
GeneralRe: Is it my fault? Pin
David A. Gray25-Jun-18 11:19
David A. Gray25-Jun-18 11:19 
GeneralRe: Is it my fault? Pin
PIEBALDconsult16-May-18 17:09
mvePIEBALDconsult16-May-18 17:09 
GeneralRe: Is it my fault? Pin
Jon McKee17-May-18 14:35
professionalJon McKee17-May-18 14:35 
GeneralRe: Is it my fault? Pin
PIEBALDconsult17-May-18 14:42
mvePIEBALDconsult17-May-18 14:42 
GeneralRe: Is it my fault? Pin
Jon McKee17-May-18 15:16
professionalJon McKee17-May-18 15:16 
GeneralRe: Is it my fault? Pin
PIEBALDconsult21-May-18 14:11
mvePIEBALDconsult21-May-18 14:11 
GeneralRe: Is it my fault? Pin
Jon McKee22-May-18 13:54
professionalJon McKee22-May-18 13:54 
GeneralRe: Is it my fault? Pin
Mark Smeltzer23-May-18 6:08
Mark Smeltzer23-May-18 6:08 
GeneralRe: Is it my fault? Pin
Richard Deeming23-May-18 7:02
mveRichard Deeming23-May-18 7:02 
GeneralRe: Is it my fault? Pin
Mark Smeltzer23-May-18 7:18
Mark Smeltzer23-May-18 7:18 
GeneralRecursion in SQL Pin
dan!sh 14-May-18 1:50
professional dan!sh 14-May-18 1:50 
GeneralRe: Recursion in SQL Pin
Jörgen Andersson14-May-18 3:27
professionalJörgen Andersson14-May-18 3:27 
GeneralRe: Recursion in SQL Pin
Richard Deeming14-May-18 8:50
mveRichard Deeming14-May-18 8:50 
GeneralRe: Recursion in SQL Pin
Super Lloyd14-May-18 16:52
Super Lloyd14-May-18 16:52 
GeneralRe: Recursion in SQL Pin
dan!sh 14-May-18 19:36
professional dan!sh 14-May-18 19:36 

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.