IB2.0  - Manager vs Leader

A world-known debate. What makes a Leader and what makes a Manager? What’s the difference, seen through the eyes of the IntelligentBee culture.

Of course, there are tons of content on the internet about this subject, all with reasonable and well documented arguments.

What’s better?

I think that’s an example of the wrong question. Actually, it’s incomplete. I’ve seen this question (especially in the title/header) on countless posts and I think it’s not relevant.

Better would be: What’s better in your current stage of the company?

There are many ways to differentiate a Manager and a Leader. For example, if we’re talking about strategy vs tactics, someone said once that the difference between Manager and Leader is: if you’re in a forest, a good Manager will tell you how to get from point A to point B with minimum of resources and in the shortest time possible. A Leader will tell you if you’re in the right forest or not.

Of course, that’s a way of looking at things. I’ll try to give my 2 cents on this from a different standpoint : IntelligentBee culture.

At IntelligentBee, we’re in a stage of growth with our company where the balance between management and leadership that we need from our middle and top managers is more inclined towards leadership. When I say “more” I mean a lot.

Encourage bottom-up communication in your team VS communicate only with your direct

The main point is: we want all teams to be unified and work as a whole. This came from the simple statement we agreed on a while ago: we come to the office because we like what we do and we like the people we work with. That is the main trigger that created our awesome culture based on the 4Hs: Humble, Honest, Hungry, Happy that kept our team highly motivated and engaged.

We think the team communication has a crucial role. We all love to feel like part of a tight team that has a purpose tied to its existence. When everything that happens or is about to happen in that team is first discussed inside the team rather than outside, team will start seeing the manager more as a leader. Regardless of its nature: plans, successes, fails, personal schedule that prevents planned things from happening, mistakes done, lessons learned, you name it.

Plan with your team VS assign work to your team

This comes right off the first one above. When everyone in your team participates in planning and decision making process, everyone will feel more empowered — therefore motivated to push for the team. We don’t particularly like situations when managers talk only with their superior/direct, and make a decision only based on that. Afterwards it’s just a simple “telling” to the team what is to be executed. No one likes to only execute. This of course is a good point to consider also for the superior/direct. A simple question to the manager: What’s your team thinking about this? should immediately trigger at least a question if not the whole pre-decision process involving the team. If the team participates in the pre-decision phase they will start looking at their manager more like a leader.

Serve your team VS your team serves you

A manager should be part of the team. One of her duties is that the team has all necessary resources to do their job. Although it might sound like a cliche, it has never been more true. But that’s not enough. Helping your team deliver by involving hands-on when something is at risk of being not finished on time, acknowledging everyone’s involvement, creativity and effort — only a few of the things that will make the team look at their manager more like a leader.

These are just a few traits of the managers we want to have in IB, traits that will make them more like leaders to their teams. It’s a well-known fact that employees stay or leave the company because of their managers. This is crucial for the culture we have and want to preserve in our company.


Key to negative feedback: be constructive

Feedback is one of the words I use and hear a lot. It looks like everybody knows what it means, how important it is. Then, why is it so hard sometimes to give it and accept it? I don't know if you like by the book definitions, but I'll give you one:

 In an organizational context, feedback is the information sent to an entity (individual or a group) about its prior behavior so that the entity may adjust its current and future behavior to achieve the desired result.

(a definition from www.businessdictionary.com)

There are two types of feedback, positive and negative, both valuable and effective.  We have a constant need of knowing where we stand, how do we do our job and how can we maximize our potential.

While it is more convenient to give and receive positive feedback, we might avoid giving the negative one. But this is one of the most important tools to develop employees.

No matter if we talk about positive or negative feedback, it has to be constructive so that it brings an improvement to the receiver's behavior. Feedback should be:

  • specific
  • realistic
  • well intended
  • timely
  • shouldn't be judgmental

When it is expressed as I mentioned above, it will motivate and should lead to performance improvement.

If what's communicated sounds as criticism, it's too general and doesn't refer to a specific situation or example, it will demotivate us. It is much easier or at hand to 'attack' with words than it is to deliver the message in a diplomatic, non-aggressive manner.

What's the context where a employee can give or receive feedback? We encourage our colleagues to have One on One Meetings with their managers.

1:1s are a chance to give and receive regular feedback, to develop a stronger connection between the two and a way to have in control the problems which may occur in a working environment. We see them as meetings that should be scheduled by the employee, but a manager can do it do. It should happen once a month (still working on improving their frequency in our company). All kind of subjects can be on the agenda: performance, career development, other professional or personal issues.

Of course feedback doesn't happen only in a formal meeting, it is a daily thing even though we might not be aware of it.

I'll leave now you with an intriguing affirmation I read. Feedback's role is to make employees do the job better, it is not to make them feel better. Do you agree with this statement?


tinyint, symfony, doctrine

How to add TINYINT MySQL type to Doctrine in Symfony 2.8

Hello! A few days ago I needed to define an entity with a TINYINT type column to hold a rating value between 1 and 5. I was doing this in a Symfony 2.8 project and to my surprise, Doctrine was unable to handle this type of data out of the box (it uses it for booleans but it has no TINYINT standalone type).

So I searched the internet for a solution and I found some but nothing complete.

The solution (TINYINT vs Doctrine):

First you need to define the new Doctrine type class like this:
[crayon-5b558d5345f8f310420705/]
Then, to register it, I used the boot function of the AppBundle:
[crayon-5b558d5345f9e168692069/]
I had to use the try / catch block to avoid an error when running symfony console commands having no database defined:

PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000] [1049] Unknown database 'rating'' in vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43

Now you can use the new type in your entities:
[crayon-5b558d5345fa6868704788/]

Learn how to setup Docker machine for Symfony development.

Hope this helps someone :)
Have a great day!


Automatically Restart Your Node.js Application

Many of us write code on Node.js, click [CTRL+S] to save the file but forget to restart the application.

If we don't forget to restart the application we will go in console and hit [CTRL+C] to stop the application and then restart it by pressing the [UP] arrow and [Enter].

Nodemon

You can automate this repetitive task and make your development process easier by using nodemon.

nodemon will watch the files and if any files were changed, the nodemon will automatically restart your node application.

First, you need to install nodemon:
[crayon-5b558d534729b863457468/]
Now, you should swap the node command for the nodemon command:
[crayon-5b558d53472a7420587749/]

Read about: How to set up a Node.Js development environment

If you need to manually restart your application, instead of stopping and restart nodemon, you can simply type rs on your console.
[crayon-5b558d53472ae631900697/]
Happy Coding!


IB 2.0 — how we are scaling our company

Like probably many other companies, we’ve already hit 2 walls so far when scaling IntelligentBee: one at 8 people, one at 15 and we’re currently facing another wall hitting: the one at 30 people.

After struggling for more than half a year with this, we thought it’s time to do something about it.

We don’t pretend we know exactly what would be the outcome of this, but we sure know what we want to achieve: sustainable scaling. Or, if we must have a clearer objective, let’s say we want to hit 100 people. I know it doesn’t sound very much like a business objective, but it kinda makes sense as we’re a services company . Therefore our main output depends very much on people’s knowledge, expertise and skillset.

Initial data

We’re IntelligentBee, an online development services company, 6 years old. We do mainly web applications and recently we decided we want to tackle mobile apps.

I’m Costi, Founder and CEO. I have a technical background backed up by some business studies and experience. A geek turned on the dark side of management like some people like to call it :)

The quest: scaling

Statistically, our scaling was around 40% growth rate per year since we started. This might sound awesome  and it actually is: things were crazy all these years. We’ve gathered lots of achievements and learning under our belt . Looking ahead I can’t see how we’re going to scale this company further using the same approach, tools and structure.

So, the quest is mainly about : how we’re scaling our company. I’m sure there would be lots of bumps along the way and therefore lots of learning involved. I’m thinking about writing down all about it and create what’s called a growth log for IntelligentBee.

That being said, I do now know what my next posts would be about specifically, but they will sure be about one of the three main topics: something we’ve learned, something we screwed up or something we got right.

IB 2.0

We called all this process IB 2.0. IB stands for IntelligentBee. 2.0 stands for a completely new “version” of ourselves as a company as we understand that if you have a black-box and you don’t change the Input but in the same time you’re expecting (somehow) the Output to change, you’re either a fool (or a sorcerer). We’re neither (eh, maybe we actually don’t want to be the first… remains to see if we are or not) so we decided to change the Input. 

The Input

What do I mean by the Input ?

For us, the Input is how we’re doing things in our company. There are specific ways of doing things suitable for each growth stage you’re in. For us, the way we’re currently doing things starts to lose it’s effectiveness and certainly it’s not a recipe for success having our plans in mind. It’s simple: how we’re doing things now got us to roughly 30 people, if we’re continuing like that — we’re going to stay at 30. If we need to grow to 100, we need to “change gears” :)

So, stay tuned if you would like to see how we’re getting there, what we’re going to learn and what we’re going to break. We hope to get there in a couple of years, but hey — you never know! What we do know is 2 things: 1. we’re gonna get there and 2. it’s going to be quite a ride!


Node.js Guide: A List of Top Node.js Frameworks, Tools, and IDEs

Node.js Guide: A List of Top Node.js Frameworks, Tools, and IDEs

Created by Ryan Dahl in 2009, Node.js is an open-source platform built using the Google Chrome JavaScript runtime. It enables software and app developers to build fast and scalable web applications using just a few lines of code.

The official website of Node.js described it as:

“Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world.”

The world of custom software development constantly evolves with new trends, techniques, and languages. But, with the Node.js library of modules, app development is significantly simplified. It provides quick and efficient solutions for back-end development and it integrates well with front-end platforms.

Web and network server applications written using Node.js are becoming more and more prevalent. Independent app and software developers, web design agencies, IT companies, and businesses both small and large utilize Node.js for various projects and applications.

We’ve collated a comprehensive guide on the top frameworks, tools, and IDEs for Node.js to further streamline your workflow.

 

Frameworks for Node.js

Node.js frameworks are increasingly gaining prominence in web programming and application development. Their main objective is to get you up and running as fast as possible by providing functionality that is not available in Node.js out of the box. These features come in many flavors and most frameworks will try to envelop all you need to deliver your project.

Here are the latest framework innovations that expand the features and functionality of Node.js.

 

1. ActionHero

ActionHero is a Node.js API server and framework that offers custom packages for companies of all sizes with high-end customer support.

At it’s core it allows you to write a RESTful API that you can consume either via HTTP, WebSockets or plain TCP Socket connections. You can also do this by using a front-end ActionHero Client that’s based on Primus that the framework provides.

You can use it to easily provide a real-time information to your users and even allow them to talk to each other using chat rooms that are natively supported by this framework.

This framework also provides scalability out of the box, as such, it relies on Redis in order to communicate with other nodes in the network.

Top companies such as Riot Games, Samsung, Task Rabbit, and Madglory utilize the ActionHero framework.

ActionHero

 

2. Derby.js

Derby is a full stack MVC framework used for modern web applications. A differentiating feature of Derby is that it allows you to sync JSON and text data between browsers, servers and databases for real-time collaboration.

If you have a heavy front-end then, then this framework is for you, as it supports server side rendering.

Additional features include offline usage, conflict resolution and template bindings to simplify writing multi-user applications.

Derby JS

 

3. Express

Distributed under the MIT license, Express is one of the most fundamental Node.js frameworks. It offers a flexible structure for processing requests. It integrates well with several community developed modules that cater to most project requirements.

This minimalistic framework is very lightweight, as such, it’s focused on performance above all. It also allows you to easily scaffold a project using a generator so that you can jump right into writing code.

Its features include simplified multiple routing, template engines, middlewares, and more.

MySpace, Geekli.st, Klout, Segment.io, and Yummly all use Express.

Express JS

 

4. Hapi

Hapi is capable of building full websites and enterprise level functions. Walmart developers encountered extensibility and maintainability issues from the Express framework as their application grew in size. They needed another framework that can accommodate the  the Black Friday influx of customers. Thus, Walmark developers created Hapi.

However, developers commonly use this rich framework for building services that pull data from the back-end and serve it efficiently, all while keeping well maintained code base.

Features include input and response validation, server-side caching, sessions, cookie-parsing, logging and others. Hapi also developed dozens of API development plugins for documentation, authentication, and other functions. Big brands such as Macy’s and Disney use Hapi.

Hapi JS

 

5. Keystone

Keystone is another full stack, open-source framework based on Express, with a few other libraries. It can be used to create database-driven websites, applications, and APIs in Node.js. It’s stack includes the Express framework and MongoDB as a database.

It’s main selling point is that it provides an auto-generated Admin UI to manage your database driven website. With Keystone, you get the best features of Express and Mongoose combined, resulting in a robust CMS framework.

Keystone JS

 

6. Koa.js

Dubbed as the “next generation web framework for Node.js”, Koa.js followed in the footsteps of Express. It provides a lightweight Node.js framework for building efficient web APIs and applications.

Koa.js utilizes generated-based control flows to eliminate callbacks and minimize errors. Unlike most frameworks, Koa is more modular and relies less on middleware. However, plugin packages are also available for routing, compression, caching and more.

Koa JS

 

7. Meteor

Meteor is a full stack framework for web and mobile applications. It boasts of a subscription-based cloud deployment service called Galaxy, which enables developers to easily deploy their applications in the cloud.

Global companies using Meteor include Mazda, Ikea, Qualcomm, and PGA Tour.

Meteor JS

 

8. Sails

Sails is an MVC framework ideal for customized, data-driven web APIs for businesses and enterprises. It’s known for its capability to simplify processes for real-time chat applications, dashboards, and multiplayer games.

This framework comes bundled with an ORM that boasts support for any database. It also provides an easy way to generate RESTful APIs.

Sails JS

 

9. Total.js

Total.js is a full stack MVC framework written in pure JavaScript. It has everything other frameworks have and more. What sets it out from the crowd is it’s native support for processing media like images and video streaming.

It’s also compatible with client-side frameworks such as Angular.js, Polymer, Backbone.js, Bootstrap, jQuery, D3, as well as other frameworks mentioned above.

Total JS

 

10. Restify

Restify is a Node.js module designed to create APIs by the book, allowing you to create an application that strictly conforms to all the rules of developing a correct REST web service. It focuses on debugging and profiling so that you can isolate systems and optimize your server performance.

Restify JS

 

Tools for Node.js

Node.js tools are used by web developers and software programmers for a wide variety of applications and workflows. These tools make it easier for developers working with Node.js.

Whether you’re an amateur or an expert developer, these Node.js tools will be useful for you.

 

1. Babel

Babel is a JavaScript transpiler commonly used as a tool for front-end development. It allows you to use all ES6 features while compiling ES5 for production. As a result, code readability is improved.

Babel supports the latest version of JavaScript so that you can use the newest syntax without waiting for browser support. It can also be integrated with other JavaScript tools.

Babel JS

 

2. Broccoli

Broccoli is a Node.js build tool running on an ES6 module that boasts of blazing rebuild and compile speeds, chainable plugins, and a flexible ecosystem. Broccoli dubbed itself as “the asset pipeline for ambitious applications.”

Broccoli JS

 

3. Electrode.io

Electrode.io is another tool built by developers of WalmartLab. It’s a universal platform for building both React.js and Node.js applications using the most standardized structures, advanced technology, and best practices.

With Electrode.io, greater focus is placed on consistency and universality instead of configuration and customization. This ensures reusability and performance.

Electrode JS

 

4. Log.io

It can be difficult to monitor hundreds of files spread across various computers. Log.io is a real-time log monitoring tool to help you monitor your deployments and troubleshoot quickly. It exposes a stateless TCP API where you can write your logs to. You monitor your log messages in a single browser session, so you can address issues and bugs immediately.

Log JS

 

 

5. Migrat

Migrat is a simple, yet pluggable, data migration tool that uses plain text. Designed for a variety of stacks and processes, Migrat runs migrations once globally or per server.

Migrat is not tied to any database engine, and can be found on GitHub and NPM.

Migrat JS

 

6. PM2

As an advanced production process manager for Node.js, PM2 monitors all launched processes to determine whether they’re running properly.

According to Full Stack Developer, Mariusz Dybciak, “You don’t need to worry about restarting applications after they’ve crashed, PM2 does it for you.” The finance software company, Intuit, and the online payment gateway, PayPal, use PM2.

PM2 JS

 

7. Webpack

JavaScript module bundling has been around for several years now, and helps developers and programmers save countless hours of manual labor.

Webpack is a JavaScript module bundler that simplifies deployments by creating bundles, and asynchronously loaded to reduce the loading time. With Webpack, bundling and serving assets are easy, quick, and painless.

Webpack JS

 

Integrated Development Environment (IDEs) for Node.js

An Integrated Development Environment (IDE) is a collection of tools used for a myriad of Node.js web applications. Most IDEs are used as a source code editor, automation tool builder, and a debugger. It lets web and app developers edit and debug their codes accurately and quickly.

We’ve picked out 15 modern and advanced IDEs for Node.js.

 

1. Aptana Studio

If you like Eclipse, then you should check out Aptana Studio. It’s an Eclipse-based IDE that was trimmed down to focus on web application technologies and popular frameworks.

With Aptana Studio, you can develop and test applications in a single environment, as it supports the latest browser languages such as HTML5, CSS3, JavaScript, Ruby, Rails, PHP, and Python.

Aptana Studio

 

2. Atom

Atom is a modern, open-source text editor built with HTML, JavaScript, CSS, and Node.js integration. Its features include cross-platform editing on OS X, Windows, or Linux, a built-in package manager where you can search, install, and create new packages, and smart autocompletion to help you write codes faster.

The best thing about Atom is that it’s fully hackable and customizable. Even the core packages can be changed.

Atom

 

3. Brackets

Created by Adobe Systems, Brackets is a lightweight but powerful text editor with advanced features that include inline editing, live code previewing, preprocessor support, code folding, and command line integration.

It utilizes visual tools and preprocessor support that make it easy for both front-end developers and web designers to work from the browser.

Brackets

 

4. Cloud 9

With Cloud 9, web and API development becomes much easier. It combines a powerful online editor with a full Ubuntu workspace in the Cloud so you can write, run, and debug your code.

Its key features include a built-in terminal, language and code completion tools, debugger, split view, and more. These functionalities can also be extended using a quite simple extension manager.

Name brands such as Soundcloud, Atlassian, Heroku, Mailchimp, and Mozilla work with Cloud 9.

Cloud 9

 

5. Codenvy

Codenvy also provides cloud workspaces for web designers and app developers to write, run, and debug on premise or in the cloud.

Developers can easily collaborate on a single project by using a shared URL. The team can work with their local IDE or the beautifully designed Eclipse Che cloud IDE.

Codenvy

 

6. CodeLite

An open-source IDE that fully supports Node.js, CodeLite specializes in programming languages such as C, C++, PHP, and JavaScript. Some features include Node.js debugger, intelligent code completion, lightweight memory footprint, and compilers.

CodeLite

 

7. Eclipse

Known for its Java Integrated Development Environment (IDE), Eclipse is one of the most popular cloud-based IDEs for web developers. It’s capable of combining language support and other features into any default package. Because it has a very active community, you can find open source plugins and developer tools in the Eclipse Marketplace.

Eclipse is highly-customizable and extendable, with features such as built-in debugger, error checking, source code generation, code refactoring, help window as toy type, and more.

Eclipse

 

8. Intellij IDEA

Maximize your productivity with Intellij IDEA by Jetbrains, a robust IDE compatible with various technologies such as Node.js, Angular.js, JavaScript, HTML5, and more. Intellij IDEA offers intelligent code completion, code analysis, and refactoring tools.

Another advantage of Intellij IDEA is its productivity-boosting features for Java EE, Spring, GWT, Grails, Play, and other frameworks.

IntelliJ IDEA

 

9. Koding

Koding is yet another open-source, cloud-based IDE that offers a smart interface that enables dev teams and managers to streamline their workflows. What’s great about it is its data analytics features for CTOs to locate bottlenecks and loopholes in the process to optimize efficiency and productivity.

Other features of Koding include syntax highlighting, keyboard shortcuts, collapsible panes, cloud workspace, auto indenting, code folding, and code preview using a built-in browser. Koding is ideal for large teams of hundreds or thousands of developers.

Koding

 

10. Komodo IDE

Komodo IDE is a cross-platform, polyglot IDE that provides a complete set of tools, integrations, and frameworks for a hassle-free web and application development. It supports over 100 programming languages such as Python, PHP, Go, Perl, Tcl, Ruby, NodeJS, HTML, CSS, JavaScript, and more.

Additional features of Komodo IDE include syntax and highlighting, code intelligence, debugging, markdown viewer, and DOM viewer. Komodo also offers multi-cursor support so that you can edit at the same time.

Komodo IDE

 

11. NetBeans

NetBeans is a free, modern IDE that supports multi-language programming for desktop, web, and mobile applications. Because it’s an open-source IDE, NetBeans allows developers to work on both the web and the desktop by building their own plugin to meet specific needs and functions.

NetBeans IDE

 

12. Sublime Text

As an innovative text editor for code, markup, and prose, Sublime Text provides a state-of-the-art user interface that allows developers to easily jump to characters, symbols, lines, or words using keyboard shortcuts.

You can also use other advanced features such as split editing, project switching, and multiple selection to rename variables and manipulate your files quickly.

Sublime Text

 

13. WebMatrix

Created by Microsoft, WebMatrix is a simple and lightweight IDE for Windows. It is ideally used for ASP.NET WebPages development and even PHP, HTML, and CSS. WebMatrix includes features such as code completion and built-in templates.

In October 28, 2016, Microsoft announced the discontinuation of formal support for WebMatrix starting November 1, 2017. Community support will continue in its forums.

WebMatrix

 

14. WebStorm IDE

Jetbrains popularized another powerful IDE for modern JavaScript development. WebStorm IDE offers intelligent code completion, rapid error detection, navigation and refactoring for JavaScript, TypeScript, stylesheet languages, and other popular frameworks. The newest version of WebStorm can be integrated with Jest, and supports Vue.js and standard JS.

Developer teams of popular brands such as Yahoo!, Reuters, Soundcloud, Intuit, Wix, Expedia, and BMW use this robust IDE.

WebStorm IDE

 

15. Visual Studio Code

Microsoft created Visual Studio Code to replace WebMatrix. Visual Studio Code is a free, open-source editor that runs on OS X, Windows, and Linux that supports operations such as debugging, embedded Git control, task running, and version control.

Other features include syntax and highlighting, IntelliSense code completion, and code refactoring. It supports more than 30 programming languages.

Additional tools and extensions are also provided for Node.js, TypeScript, JavaScript, ASP.NET 5, and more.

Visual Studio Code

 

Final Words

Node.js is becoming increasingly popular for web and app developers worldwide. Frameworks, tools, and IDEs are useful for both beginners and professional users alike. It makes writing and testing codes a lot easier and faster


blog_image

How to set up a Node.js development environment

Context:

Here at IntelligentBee we wanted to establish a few ground rules that all of our developers should follow when developing an app in Node.js. In that way all of us would be familiar with a particular set of tools, something that would make us deliver better software, fast. Here is how we set up a Node.js development environment for a particular project:

  • Installing NPM and Node.js
    To get things started you need to install npm, and Node.js. You can easily do that by downloading them from here.

 

  • Create a project folder, and navigate to it using your favorite terminal. Then create a package.json file in that folder, a file that will save all the libraries you use. Using the terminal, run the command [crayon-5b558d534b4d0516716596-i/] . Write a few details about your project, and that’s it.

 

  • The web framework
    This should be project based, but we recommend Express.js as it the most mature and widely used framework for Node.js. From the Terminal, navigate to the folder where you will build your project, and run [crayon-5b558d534b4e1811469636-i/]

 

  • The testing framework
    To deliver robust code, you need to write tests. Node.js has a lot of testing frameworks available, but Mocha.js is by far the most used and proven test framework out there. To install, run [crayon-5b558d534b4e7801056493-i/] .Here we also need to mention the assertion library that can make life even easier. We recommend Chai.js, as it exposes all interfaces of asset, should and expect. Just run [crayon-5b558d534b4ec998735108-i/]  in your terminal to install.

 

  • The IDE
    We’ve chosen Visual Studio Code over the more widely preferred Sublime Text, as it has a native support for Node.js debugging. Also, it is pretty easy for newer, less experienced developers to adopt it. You can get this free piece of software from here.

 

  • The linter
    We decided to go with ESLint, as it is the most popular linter for Javascript and has a plugin for linting Node.js code. It is recommended that you install ESLint in the project folder that you work in, but you could also install it globally. To install it for your project, run [crayon-5b558d534b4f2707469766-i/]  in your terminal. To make it aware of Node.js and Mocha you need to install these Eslint plugins as well:
    - Eslint-node: [crayon-5b558d534b4f8324824451-i/]
    - Eslint-mocha: [crayon-5b558d534b4fd874135540-i/]

 

  • The coding standards:
    The Airbnb coding standard is one of the most popular out there, for JavaScript and Node.js. That would help you write clean code, that will be easier to understand later on, or by other people. In your terminal, run [crayon-5b558d534b502679085436-i/]  and choose Airbnb as your coding standard. After you do that, you need to open the newly [crayon-5b558d534b508360981231-i/]  file that was created, and add "mocha" and "node" in the file. Basically that file needs to look like this, if you saved the file using JSON format:

[crayon-5b558d534b50d822906973/]
 

  • Install the ESLint plugin in VS Code
    Go into the VS Code app, and navigate to its Extensions page. Search after "eslint", and install the first result from the list. Restart VS Code.

 

Now you should be all set up and start coding. Enjoy!


How is your Monday?

We all know the Monday jokes. And I bet we all complained at least once about the fact that the weekend is over and a new work week is about to start.  Well, I’ll admit, it happened to me more than once. And every time I asked myself what is it that I don’t really like. Is it the fact I have to get up early? Is it the fact I don’t like working? I don’t think I ever felt sorry that Monday comes during vacation time. Or could that mean that I don’t like my job, the company and the team I work with?

The Monday Blues

Maybe you heard about the ‘Monday Blues’ defined by Alexander Kjerulf, an expert on happiness at work:

“the negative emotions that many people get at the beginning of the workweek if they're not happy at work”

I gave this definition a thought.

I started by making a list with what’s important for me in order to be happy at work. It looks like this:

  • Having ownership, ‘my job is mine’. Researches talk now about a new kind of ownership, the psychological ownership. This makes an employee feel that the company he works for is his/hers.
  • Having autonomy, being able to take decisions.
  • Being able to express ideas, concerns, opinions that contradict what others say.
  • Mistakes should be permitted; and haven’t I done like a million of them. Making mistakes is a sign that you had the courage to try something. They are a way of learning and experiencing new things.
  • Flexibility regarding my working schedule and the way I organize my tasks, activity.
  • The team I’m part of. I need to say that my colleagues offered me so much support, professionally and personally. I have all the reasons to be grateful and happy to work and spend time with them.

Do I have all these above at my current job? I’m lucky enough to respond with a firm yes, I do. Then what could be the problem when I’m not happy to hear the alarm clock especially in the first morning after Sunday? I’m still looking for this answer :).

My Mondays are great

Until I find it, I’ll keep in mind what someone told me once: 

“Monday is the perfect day to correct the last week’s mistakes”

This is a great perspective and opportunity to bring a smile on our faces when we feel a little bit down on a Monday morning or on any other working day.

Happy Monday everybody!


How to save a file in Vim after forgetting to use sudo

Many of you probably experienced this. You edit a file in Linux with Vim or Nano or whatever else text editor you might be using and when you try to save, you realise you forgot to launch the editor with sudo privileges, and file can't be written. Exiting without saving and editing again with sudo privileges is not always an option, especially if you lose a lot of work.

Solutions

There are some workarounds. You can open a new terminal and grant the right permissions on the file with:
[crayon-5b558d534cac2762198312/]
Now you can go back to your editor and saving will be possible. Don't forget to change back the right permissions for your file.

Also, you could save in a new file and then copy the newly created file over the old one.

But these are workarounds. Vim editor actually offers a solution.

In normal(command line) mode of Vim you can issue:
[crayon-5b558d534cad0850600331/]
And that works like magic. For the geeks, here is how the "magic" works:

  • :w - writes the contents of the buffer
  • !sudo - pipes it to the stdin of sudo
  • tee % - sudo executes tee that writes to "%" file
  • % - Vim expands "%" to current file name

So Vim actually makes magic happen.