Click here to Skip to main content
15,888,286 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: Aaaarg....use the namespace Pin
Eddy Vluggen12-Jun-12 9:02
professionalEddy Vluggen12-Jun-12 9:02 
GeneralRe: Aaaarg....use the namespace Pin
BillW3315-Jun-12 4:19
professionalBillW3315-Jun-12 4:19 
GeneralRe: Aaaarg....use the namespace Pin
Eddy Vluggen15-Jun-12 5:17
professionalEddy Vluggen15-Jun-12 5:17 
GeneralRe: Aaaarg....use the namespace Pin
PIEBALDconsult12-Jun-12 4:49
mvePIEBALDconsult12-Jun-12 4:49 
GeneralRe: Aaaarg....use the namespace Pin
Eddy Vluggen12-Jun-12 9:00
professionalEddy Vluggen12-Jun-12 9:00 
GeneralRe: Aaaarg....use the namespace Pin
PIEBALDconsult12-Jun-12 9:45
mvePIEBALDconsult12-Jun-12 9:45 
GeneralRe: Aaaarg....use the namespace Pin
Eddy Vluggen12-Jun-12 9:59
professionalEddy Vluggen12-Jun-12 9:59 
GeneralRe: Aaaarg....use the namespace Pin
Nagy Vilmos12-Jun-12 23:10
professionalNagy Vilmos12-Jun-12 23:10 
No, you prefix the member if a class with this to prevent any ambiguity. The method or property on it's own only implies where it is. If I have this code:

Java
class Thingy {
    private int majig = 27;

    void summit() {
        if (majig > 42) {
          // clever code
        }
    }
}


And I copy the test to another method, all bad things could happen:

Java
void nuThang() {
    // lots of code
    int majig = 69;

    // lots more code
    // copied:
    if (majig > 42) {
      // clever code
    }
}


oops.


Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

QuestionRe: Aaaarg....use the namespace [modified] Pin
Eddy Vluggen13-Jun-12 1:30
professionalEddy Vluggen13-Jun-12 1:30 
GeneralRe: Aaaarg....use the namespace Pin
PIEBALDconsult14-Jun-12 4:20
mvePIEBALDconsult14-Jun-12 4:20 
GeneralRe: Aaaarg....use the namespace Pin
PIEBALDconsult12-Jun-12 3:51
mvePIEBALDconsult12-Jun-12 3:51 
GeneralRe: Aaaarg....use the namespace Pin
Sentenryu12-Jun-12 4:41
Sentenryu12-Jun-12 4:41 
GeneralRe: Aaaarg....use the namespace Pin
PIEBALDconsult12-Jun-12 4:50
mvePIEBALDconsult12-Jun-12 4:50 
GeneralRe: Aaaarg....use the namespace Pin
Sentenryu12-Jun-12 5:12
Sentenryu12-Jun-12 5:12 
GeneralRe: Aaaarg....use the namespace Pin
PIEBALDconsult12-Jun-12 8:23
mvePIEBALDconsult12-Jun-12 8:23 
GeneralRe: Aaaarg....use the namespace Pin
Sentenryu12-Jun-12 8:55
Sentenryu12-Jun-12 8:55 
GeneralRe: Aaaarg....use the namespace Pin
thatraja14-Jun-12 23:00
professionalthatraja14-Jun-12 23:00 
GeneralRe: Aaaarg....use the namespace Pin
Sander Rossel15-Jun-12 13:04
professionalSander Rossel15-Jun-12 13:04 
GeneralRe: Aaaarg....use the namespace Pin
Edward Giles22-Jul-12 12:39
Edward Giles22-Jul-12 12:39 
GeneralRe: Aaaarg....use the namespace Pin
Sander Rossel22-Jul-12 20:10
professionalSander Rossel22-Jul-12 20:10 
GeneralWhat can you do when you have different timetable Pin
Mohibur Rashid10-Jun-12 20:52
professionalMohibur Rashid10-Jun-12 20:52 
GeneralRe: What can you do when you have different timetable Pin
RobCroll11-Jun-12 13:38
RobCroll11-Jun-12 13:38 
GeneralRe: What can you do when you have different timetable Pin
Ingo11-Jun-12 21:37
Ingo11-Jun-12 21:37 
GeneralRe: What can you do when you have different timetable Pin
Mohibur Rashid11-Jun-12 22:59
professionalMohibur Rashid11-Jun-12 22:59 
GeneralRe: What can you do when you have different timetable Pin
Ingo12-Jun-12 3:25
Ingo12-Jun-12 3:25 

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.