41

If you name your UI controls like TextBox1.... TextBox24.... Then GO AND FUCKING DIE

Comments
  • 0
    Haha no, only Label1, Label2, etc, as they are set once in designer and that's it. (I've no need for multi-lang in internal tools)
  • 2
    @olezhka ...at least refactor those to have a proper name. Label1 becomes <something>Label.
  • 2
    @filthyranter Honestly, I don't see the point. At least in Visual Studio with Windows Forms all those objects that we drag into designer are created in code in a separate partial class with *.designer.cs extension.

    And unless I am specifically using some label for output I leave them be and only change the Text property to what I need.

    They will not be visible in any meaningful way after that...
  • 2
    @olezhka Good point, but it's still good practice to give them meaningful names.
  • 4
    @olezhka i agree. It is ok to do that with labels or controls that are basically static. But not with input fields like textboxes.
  • 4
    I name all of mine thelegend27
  • 2
    Text_box_adress_postal_code
  • 2
    @RodrigoF while I am not a fan of the '_' at least there is a naming convention here. I prefer: AddressPostalCodeTextBox
  • 1
    Nah I group stuff by name, so text boxes start with something like txt_something or textbox_something..
    It's easy to find a specific controller this way...
    Like lbl_name, lbl_age, lbl_adress , img_box_logo.....
  • 0
    @Dovlahkin much better!
Add Comment