Skipping the getter/setter dance for POJOs and just using public fields.
Ask HN: What horrible things do you do in your own code when no one is watching?
31–40 of 40 posts
Re: Ask HN: What horrible things do you do in your own code when no one is watching?
#32String str;
Re: Ask HN: What horrible things do you do in your own code when no one is watching?
#33I never hide data. All structs with all public members. Even if I write an API around that, I can still just access everything directly if I want to.
When I use raw pointers, I usually don't check for nullptr.
I abuse unions and their initial members and don't bother checking tags even if I tag them.
Does it compile? Good. Does it run? Good. If I leave it running does it eat all my RAM? No? it's probably fine then.
I tend not to push changes for weeks or sometimes months, and my commit message is basically that I forgot everything I actually changed. Also, my commit messages are terrible.
I keep one big text file full of notes, comments and old code pasted in. My source code itself tends not to be commented well as a result.
Re: Ask HN: What horrible things do you do in your own code when no one is watching?
#34Re: Ask HN: What horrible things do you do in your own code when no one is watching?
#35Re: Ask HN: What horrible things do you do in your own code when no one is watching?
#36Re: Ask HN: What horrible things do you do in your own code when no one is watching?
#37The ever-present possibilty of open-sourcing on github and getting code-reviewed by future employers hangs over my head like the sword of Damocles.
The more useless social media BS Github piles onto its site the more it becomes the new Linkedin... no thanks.
Re: Ask HN: What horrible things do you do in your own code when no one is watching?
#38The ever-present possibilty of open-sourcing on github and getting code-reviewed by future employers hangs over my head like the sword of Damocles.
That's one of the reasons I no longer use Github. I don't want every line of code I write to be used as part of a hiring filter, much less just the languages I'm tagged with or the number of stars in my repos or in anything I contribute to. The more useless social media BS Github piles onto its site the more it becomes the new Linkedin... no thanks.
Re: Ask HN: What horrible things do you do in your own code when no one is watching?
#39Re: Ask HN: What horrible things do you do in your own code when no one is watching?
#40Profanity. It can look like a key party got out of hand in there. Use g for a string variable at least once.