Here is some viking music to read this post to as we prepare to sail.

Today JavaScript grew quite a bit from what it was 5 years ago. Back then there were few frameworks and jQuery together with several toolkits. You could count them on fingers pretty much, read few articles make your pick or learn them all. It was good time to start JavaScript as ecosystem was just picking up the pace. Nowdays when you look developer surveys JavaScript competes with no more no less than with Java itself. Java was king of the hill when it comes to all sorts of libraries that it had for pretty much anything.

Often developers when starting out are overwhelmed by wast open sea of libraries and when looking how to fare it one can easily get sea sick. You can’t no longer try it all out just like in middle ages you could not anymore learn all the things like in early centuries. Since this is contemporary problem where there is most prob not one answer people most prob try to cope with the problem in different ways. Many developers now days are most probably all having their opinions about how to navigate JavaScript seas. While landlubers not practicing the craft are often left to whatever expert judgment they can google quickly to form their opinion.

Here are some tactics and strategies tymbac developed while fairing high seas for some time now. Hope it helps with your raids.

Strategies:

  • use whatever experience you have to estimate what you would like that you don’t have. Then find people on github that teamed up to do it for comunity and stick with them.
    Example: react-boilerplate
    why: Its just that good. We all want to have this type of setup but its time consuming to redo it all the time. So good man Mr. Stoiber started a project realizing that early on.

  • stick with the heard
    Example: pick bigger libraries backed by major teams if you are developing something comercially
    why: Lifetime of libraries is main thing due to fast pace of entire ecosystem. Its not just libraries that are fast paced its entire community for good reasons.

  • always use best tools
    Example: linter! minifier! complier! bundler! what not!
    why: Your local esnaf might tell you that in order to practice the craft you need to have good tools.

Tactics:

  • When picking minor libraries go for path of least resistance
    Example: you look at few libraries that will save you time but you consider how it will play out long term
    how: You think like how much does this really give without being cumbersome. Can I hack this easily? How big is it? Do I need to rely on maintainer to not abandon the project or can I easily hack it even if it goes obsolete like how small is the thing? How good does it work compared to competition you look around a bit and evaluate on above trial and error criteria. Don’t be afraid to hack the library if its small but does not fit your need perfectly you might never find better one but it might be so simple and if its small it will last for ages.

  • One legendary professor of mine once said: if in doubt when driving a car just look how others behave and try to copy.
    Example: You look how other engineers around the internet solved problems. Learninng by example is one of staples of learning no matter if its software architecture or beekeeping.
    how: You look some of representative examples of engineering and see how they solved chalanges we all face. You also try to put yourself in position of everyday user since we all use things and we know how others use them. Most importantly you think from perspective of your customer and think are they getting what they want and are they going to say at end of the day this is what we wanted this is solid for our future.

  • never forget to apply software engineering pratices to JavaScript
    Example: good editor. good architecture. good practice. don’t trust everything you read online. don’t overdo it. when sensible follow 80% rule. remember that you need the tests. learn what a state machine is.