Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

How to Smell your JavaScript Code

How to Smell your JavaScript Code

Symptoms that you are doing bad coding for front-end

Avatar for Narendra Sisodiya

Narendra Sisodiya

July 16, 2015
Tweet

More Decks by Narendra Sisodiya

Other Decks in Technology

Transcript

  1. • Context of this presentation is Large Scale, Scalable, Single

    page, Web Applications. • Scalability is a challenge ! • Managing codebase is difficult. Context 2
  2. 3 How to Smell your code Symptoms that you are

    doing bad coding for front- end
  3. • Do you fear touching your old codebase • Do

    you fear replacing your old codebase Fear to touch 4
  4. • You do not know exact flow of your application

    because some framework in doing Magical Stuff for you Magic 5
  5. • You are not sure that your code changes may

    affect some unknown part of your application. • Your changes leads to new bugs. Unpredictable 6
  6. • You yourself know that you are coding a Jugaad

    • because you are helpless* Jugaad * - may be because of framework 7
  7. No Fine Control • Your framework or library forcing you

    in certain way . • Automate many things so that you cannot get control. • tools/framework/ libraries are for your help & not to trouble you. 8
  8. Code Duplication • You repeat same code and logic many

    places • You do not refactor your code. 9
  9. Dead End • With release of new version of framework

    you cannot migrate (Ex - Angular 2.0) • Why work with a framework with uncertain future. • You cannot work on your own code which you wrote 6 month ago. 10
  10. Unmovable Code • You cannot move your widget/ module/ component

    from one page (place) to another. • You code sticked to your DOM structure. 11
  11. Obvious but take time • Sometimes things are so obvious

    but take time and efforts to complete • restricted by framework/library 12
  12. Reproducing Bug !== easy • Reproducing bugs take long time.

    • Some times bug is just a spell mistake but it take hour to setup and reach at that STATE 13
  13. Frustration • You must enjoy coding. • If you Frustrated

    then there is a problem with either you or your codebase 14
  14. • All Images are Copyrighted by some unknown users, which

    I do not know. They must be proud that their images is so papular that it appears on first page of google image search with relevant keywords. • I have copied Images shamelessly form Internet for global benefit. Credit 15