Skip to Main Content

What’s slowing down your eCommerce site? Get a FREE Site Performance Snapshot

Performance

Organizational Knowledge and Choosing What Not to Use: A CoffeeScript Story

Every day, we at Yottaa make choices on what to bring into our organization and what to keep away. We have a fairly large team that spans two continents, two languages, 12 hours, multiple teams and varying levels of experience. This complexity in our organization means we need to do some due diligence about our development choices. If it were just me or a small team, we could make a different set of choices on technologies.

Once we choose a technology at Yottaa (a language, library, process, or 3rd party) we need to turn our personal knowledge into organizational knowledge. This is a key point in the process: companies and organizations live and die based on their organizational knowledge. It’s true that personal knowledge is key when you start a company – it’s what the VC’s look for. But it’s important to convert that personal knowledge to organizational knowledge as quickly as possible, if you are to grow as a team and succeed.

In other words, it makes no difference whether there’s one person on our team that’s an expert in something. To let that person build a widget using knowledge only they have would be extremely dangerous to the team’s overall goals, unless that person can deliver from start to finish and the widget will never, ever need any maintenance.

In the process of developing organizational knowledge here at Yottaa, we discussed adopting CoffeeScript, a transcompiler of JavaScript that ostensibly makes the language easier to read and require fewer keystrokes.  It was proposed that we use CoffeeScript going forward for all our Javacript development.

We had lots of discussion internally about using CoffeeScript, and rather than explain our thinking I will place it here for you to read and draw your own conclusions.

—– Internal Email (Edited for grammar and completion of thoughts) ——

About the coffee script… We do not want to use coffee script at Yottaa. There are many reasons:

  • — We are all really good developers that are capable of learning and mastering a fundmental language of the web. Using CoffeeScript takes energy and time away from the learning and mastering Javascript. It is true some of the knowledge you learn is Javascript but everyone we hire going forward must also learn CoffeeScript because we use it.
  • — @ Yottaa we want our developers to learn skills that they can carry forward to other languages, projects and jobs in the future. Putting on a resume: “expert in JavaScript” is something that can increase your career and value (salary). If you know JavaScript well, the employer will “let” you learn CoffeeScript on their dollar.
  • –Syntax is a personal preference, having developed code in many languages through the years, i have realized that it is all the same. The webpage https://github.com/jashkenas/coffeescript says:

CoffeeScript is a little language that compiles into JavaScript. Underneath all those awkward braces and semicolons, JavaScript has always had a gorgeous object model at its heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.

  • –Reading code and seeing the syntax {curly braces and semi-colons} means you are not looking at the right things or you do not write code in a consistant way. All of the syntax should fall away in your thoughts and what is left is the essence of what you are building. This concept should be practiced and mastered, because it can be used over and over again no matter what language you are using. Think of it like looking at painting, you know what they used to create it (watercolors, pencil, crayons…) but what you see is the essence of the painting. If the painter sucks… sure you will be looking at the pencil strokes, splogages made by the crayons, but that is because they suck. Writing code is an art: when you are done, the code should be beautiful. The syntax never prohibits beautiful code, your craftsmanship does.
  • –Saving characters you type is NEVER a reason to choose a language. Not once have i said or heard anyone say: I cannot finish my project because i needed to type all the damn (i swear a lot, but will keep it clean today) “{}” or “;” We do not work at Gattaca.  Vincent wrote a program that as his boss exclaimed had “not one error in a million keystrokes”, we do not need to be so proficient at typing as Vincent. We can afford a few extra keystrokes and backspaces.
  • –Unlike other templating languages we use SASS and HAML. CoffeeScript produces “executable” code that requires debugging. This debugging happens within the browser using tools like firebug, chrome developer tools… the code you are looking at is auto-generated and not your creation. This makes it harder to quickly grasp the code, because auto-generated code is NEVER masterfully create and beautiful.
  • –“Simpler” is not always better, “Simpler” is not always easier, “Simpler” is not always faster. Learn the core technologies and learn them well; you will be better off in the long run.
  • –We do not have anyone passionate about using the technology and also an expert in CoffeeScript. Sure the creator of CoffeeScript thought it is a good idea to create it. I can not disagree with that. CoffeeScript will work well for many people but we can not always choose technologies because other people are using it. We ourselves must be overwhelmingly passionate about it and we must also have an expert in the language. We can not start using something today if neither passion nor expertise exists.
  • –You will still need to learn JavaScript anyways. You will always debug the code, CoffeeScript does nothing to fix logic errors, fence post errors, algorithm problems. You need to get into the code and make sure it works and figure out why. This will only occur in JavaScript.

@yottaa, we love it when there is overwhelming passion and expertise in a technology to carry it forward. Without passion it is hard to make anything successful.

Bob (Buffone)

 

Don’t let slow site performance cost you conversions.Let's Talk