dimanche 25 octobre 2015

Unhappy with the code itself and how codes are littered

this post is yet another outburst, hoping to find someone like me who are unhappy with codes are itself.

I'm a JS developer, I work alone in my three years career. I learned paying courses in frontendmasters, treehouse, codeschool, lynda, etc .. I never had an exchange of experiences with anyone.

A few months ago, I've become increasingly critical of my own code, refactoring once after another .. when I finish I think is good, but it's just spend 3 days I think there's something wrong and there goes again ... refactoring.

I can't let go, just to see the working code and go to the next, it has to be beautiful as well, an example would be:

this:

$ ('button'). On ('click', function () {
 $ (this) .hide ();
});

becomes this:

var Toggle = {
 init: function () {
   var button = $('button');

   button.bind('click', this.toggle);
 },

 toggle: function () {
  $(this).hide();
 }
};

Everything needs to be aligned .. well, Its looks like I have OCD.

I search libraries like ember, jquery, etc and i thinkg the source code is horrible..

As you can see, I have a problem. I loved program, never had those problems before and do not know how I was getting in this state.

I would like to ask for help, what could I do to overcome this?? Someone goes through it? I often see stupid codes that could be written in a better way, but just are not ... why is that? I'm freaking out?




Aucun commentaire:

Enregistrer un commentaire