News for hackers. Stuff that matters.
Re:Thirteen Years of Bad Game Code by sillysaurus3 on Friday March 31, 2017 @03:40AM (#14001840)
But it also means that what you're writing right now isn't that bad.

If you accept that your best is your best, then your best is good enough. The effort is what matters.

Re:Thirteen Years of Bad Game Code by wingerlang on Friday March 31, 2017 @03:51AM (#14001879)
> your best is good enough. The effort is what matters.

Not necessarily true, if you're (trying to be) a professional then it might not be enough.

Re:Thirteen Years of Bad Game Code by zero_iq on Friday March 31, 2017 @04:45AM (#14002057)
Judging by some of the 'professional' code I've read over the years, I'd say that's not a particularly high bar...! At least if you're horrified by code you wrote, it shows you care, and that shows some promise :)
Re:Thirteen Years of Bad Game Code by TeMPOraL on Friday March 31, 2017 @05:26AM (#14002235)
I concur. Especially if you define "professional" as "stuff people do at work, for money", the kind of code I saw in my career... well, it wasn't that much different from the code I was writing when I was 13.
Re:Thirteen Years of Bad Game Code by philbarr on Friday March 31, 2017 @06:04AM (#14002399)
Best one liner I've ever seen in "professional" code:

  String myBoolean = "yes"
Re:Thirteen Years of Bad Game Code by arethuza on Friday March 31, 2017 @07:49AM (#14002813)
Not sure I'd say it was he best, but it was certainly memorable:

   boolean alanIsABastard = true;
As I was the only person in the company with that name it was clearly meant for me! :-)
Re:Thirteen Years of Bad Game Code by TeMPOraL on Friday March 31, 2017 @07:55AM (#14002847)
In my current project at work, I still have a class named:

  public class ClassWithBadNoGoodNameForSharingStuffCommonToHandlers { //TODO rename
One day soon, I'll figure out what abstraction it represents and rename it...
Re:Thirteen Years of Bad Game Code by dcsan on Friday March 31, 2017 @08:27AM (#14002988)
git blame to the rescue!
Re:Thirteen Years of Bad Game Code by sillysaurus3 on Friday March 31, 2017 @06:19AM (#14002446)
I liked enum Boolean { TRUE, FALSE, FILE_NOT_FOUND };
Re:Thirteen Years of Bad Game Code by ramshorns on Friday March 31, 2017 @02:01PM (#14006321)
What's convenient is that TRUE is false, FALSE is true, and FILE_NOT_FOUND is also true.
Re:Thirteen Years of Bad Game Code by taneq on Friday March 31, 2017 @08:54AM (#14003178)
Well the last is basically what NULL means...
Re:Thirteen Years of Bad Game Code by cjslep on Friday March 31, 2017 @11:46AM (#14004966)
I was horrified to see:

    public void encryptCreditCard(int[] cc) {
        int tmp = cc[0];
        cc[0] = cc[6];
        cc[6] = tmp;
        // and so on...
    }
Decrypt version just did the steps in reverse, of course.
Re:Thirteen Years of Bad Game Code by TeMPOraL on Friday March 31, 2017 @12:57PM (#14005689)
I once had to implement "encryption" that consisted of rot13(base64(data)). The class ended up being named SecurityTheatreUtils, to ensure no one else in our team ends up thinking it does any actual encryption...