Azat

July 15, 2014

Azat’s latest book about Node.js is ready!

Practical Node.js was designed to be a one-stop source for going from hello-world examples to building apps in a professional manner. The libraries covered in Practical Node.js greatly enhance the quality of code and make developers more productive.

You can get it on Amazon, B&N and Apress directly. Also, Apress has the ebooks in all formats.

The book’s website is at practicalnodebook.com. And the examples’ code is freely available at github.com/azat-co/practicalnode.

Why Node Program is Different

Node Program

Node Program is the  fastest and most engaging way  to get started with Node.js, MongoDB and Express.js. It’s an  intensive  weekend-long  live course  taught in the Bay Area by skilled experts who have run Node.js in production  for years!

Node Program is the ultimate way to get up and running with the foundations of Node.js, by learning the required foundational skills to use Node.js! Learn more about our approach and curriculum.

Continue reading

The Nastiest Little Secret

The nastiest little secret about software engineering job search, in any time and geolocation that I’ve seen: virtually everybody wants senior developers. So there’s very little chase to get into the industry. One theory this catch 22 happens is because senior software engineers are 10-20x more productive with only 10-30% more pay. Or at least that’s what most of the companies think. I’m not sure this is true 100% of the time. Therefore, if you are a junior developer—fake it till you make it. Most of us have been there. Become an expert in one field, and make a name for yourself. Then the companies will fight for you. Networking also helps. You need to be considered for the job before the job opening has been posted to the company’s website.

Node Program July 2014 Registration

The Node Program registration is open now (6/11/2014 9am) until 07/21/2014 11:30pm PT. The registration is limited only to 10 students! Register now.

This is the core Node Program curriculum:

  • Node.js
    • Building “Hello World” in Node.js
    • Node.js Core Modules
    • Node Package Manager
    • Deploying “Hello World” to PaaS
    • Deploying to Heroku
    • Message Board: Run-Time Memory Version
    • Test Case for Message Board
  • MongoDB
    • MongoDB shell (mongo)
    • MongoDB Native Driver (mongodb)
    • MongoDB on Heroku: MongoHQ
    • MongoDB BSON data types
    • Message Board: MongoDB Version
  • Express.js 4
    • Installation
    • Express.js 4 Generator
    • Configuration
    • Routers
    • Main Middleware
    • Jade Template Engine
    • Stylus CSS library
    • Mocha for TDD/BDD
Node Program is a customized learning experience. We want you to tell us what questions do you have to tailor our program to your needs. Also we’ve developed elective project paths:
  1. Full-stack: Working on an Angular.js app that uses MongoDB, Node.js and Express.js server
  2. Integration: Working on third-party integration (Twitter) using OAuth and Everyauth
  3. Deployment: Working on deploying Node.js apps to Amazon Web Services (AWS) with Nginx and Varnish Cache

More information at the EventBrite page.

Seven Things You Should Stop Doing with Node.js

Seven Things You Should Stop Doing with Node.js

Inspired by 5 Things You Should Stop Doing With jQuery by Burke Holland, I decided to open a discussion and highlight seven things you should immediately stop doing with Node.js:

  1. Stop using callbacks
  2. Stop using * for versions
  3. Stop using console.log for debugging
  4. Stop using GET and POST for everything
  5. Stop using semicolons
  6. Stop using comma-first style
  7. Stop limiting your connections with default maxSockets value

Continue reading

Node Program Announcement: Intensive Node.js, MongoDB and Express.js Course in The Bay Area

We’re glad to announce intensive Node.js, MongoDB and Express.js course in the Bay Area — Node Program.

Node Program (np): Intensive Node.js, MongoDB and Express.js Course in The Bay Area

Node Program (np): Intensive Node.js, MongoDB and Express.js Course in The Bay Area

The July 2014 course has only 10 seats (only 10 students!), and the registration will be open from 6/11/2014 9am PT to 07/21/2014 11:30pm PT.

If you would like to get updates about Node Program, sign up for our email list.

WHAT IS NODE PROGRAM?

Node Program is the fastest and most engaging way to get started with Node.js, MongoDB and Express.js. It’s an intensive weekend-long live course taught in the Bay Area by skilled experts who have run Node.js in production for years! Node Program is the ultimate way to get up and running with the foundations of Node.js, by learning the required foundational skills to use Node.js!

NODE PROGRAM HIGHLIGHTS

  • Engaging: Live experience learning from instructors, mentors and peers
  • Customized: Uniquely tailored to your needs; treat us as your consultants and coaches!
  • Convenient: One weekend (16h), no need to take PTO or travel (Bay Area)
  • Limited: Only 10 seats in each course; students undergo application process to insure they get the maximum out of the program and plenty of individualized attention
  • Exclusive: The course will be repeated only 6 times
  • Tested: Instructors have years of practical experience with Node.js and materials have been carefully developed and tested for success
  • Practical: Students will walk out with multiple Node.js apps (projects)
  • Transferable: Node Program is non-refundable because we want 100% commitment from students; but in the case of unforeseen circumstances you can transfer registration to another person before the deadline.

For more information, go to the event page.

JavaScript and Node FUNdamentals is Finished

JavaScript and Node FUNdamentals: A Collection of Essential Basics

JavaScript and Node FUNdamentals: A Collection of Essential Basics is a short read to brush up and refresh JavaScript and Node.js topics including frameworks like CoffeeScript, Backbone.js and Express.js. The motto of the book is “If it’s not fun, it’s not JavaScript.

JavaScript and Node FUNdamentals: A Collection of Essential Basics

JavaScript and Node FUNdamentals: A Collection of Essential Basics

JavaScript and Node FUNdamentals has these chapters:

  1. JavaScript FUNdamentals: The Powerful and Misunderstood Language of The Web
  2. CoffeeScript FUNdamentals: The Better JavaScript
  3. Backbone.js FUNdamentals: The Cornerstone of JavaScript MV* Frameworks
  4. Node.js FUNdamentals: JavaScript on The Server
  5. Express.js FUNdamentals: The Most Popular Node.js Framework

The book is available on Amazon.com (Kindle) and LeanPub (MOBI, PDF, EPUB).

Continue reading

Intellect as an Impediment to Successful Marketing and Selling

Intellect as an Impediment to Successful Marketing and Selling

After watching The Foundation video it struck me that an intellect can be an impediment to successful marketing and selling. I’ve heard some variation of this before but the aforementioned video was an aha moment when it all came together.

Have you ever heard about the curse of knowledge? Or cognitive bias? Basically, if a person knows something he/she assumes that everybody else also know that. This leads to omissions, assumptions and messages that don’t reach target audience. And it’s not because the average audience is stupider in general, they’re just not so fluent in this particular narrow topic and your language (The Secret Language Of Millionaires in the video). I have to fight myself tooth and nail with this bias when I’m writing my programming books!

Sharing my musings on Twitter led me to Steve Jobs who no doubt was intelligent and very good at marketing:

I think smart people have to work extremely hard to “dumb” down their marketing messages. A good example is the original Apple iPod ad that used X number of songs instead of Y number of Megabytes.

Original Apple iPod

Original Apple iPod

Another revelation was that all this time many people that I know (startupers) and I were doing it all wrong. Almost always we start with products instead of starting with problems. In the best case, we pick out our own problems to solve (some do it successfully, like Evernote founders). But where are the guarantees that our problems are not just emotionally exaggerated and the market for them is big enough? Instead we should identify the pain points first and try to pre-sell. Yes, pre-selling (before building) can solve this dilemma. Let consumers vote with their wallets (actually debit/credit cards). What if we can’t sell our service or product without it being ready, or without all the fluff like a catchy domain name, fabulous design, beautiful logo and half-a-dozen social media profiles? Then, the problem is not too big for us to work on it anyway. Not all ideas should be executed and not all problems are worth solving. :-)

Last night, I did exactly that. I created a Gumroad page for Introduction to Express.js video course. It took me half an hour, and it already has sales! The conclusion is to go lean early or suffer later.

CoffeeScript FUNdamentals: The Better JavaScript

CoffeeScript FUNdamentals: The Better JavaScript

Disclaimer: This text is a part of the JavaScript and Node FUNdamentals: A Collection of Essential Basics ebook which is available now for free. However, upon the book’s completion it’ll be priced at $2.99. The book is 80% done as of this writing. The formats available: PDF, EPUB and Kindle. If you would like to participate in the writing process by providing your feedback and future topics, fill this short Future Topics and Feedback form.

Continue reading

Practical Node.js TOC

As the Apress team of technical reviewers and copy editors and I make progress on the Practical Node.js manuscript, the date of the publication approaches fast. Last time I checked it was June 2014.

Practical Node.js: Building Real-world Scalable Web Apps

Practical Node.js: Building Real-world Scalable Web Apps

Many people ask me: how is the process compared to self-publishing? Is it worth the hassle?

So far, I can say only good things about my editors and the process of traditional publishing itself. I’m impressed about so many things I’ve already learned about structuring and technical writing. I feel like it enormously improved my style. There is more on this in my new meta book&resource ProgWriter.

As a sneak peek, here’s the tentative Table of Contents for the Practical Node.js book:

  1. Setting up Node.js and Other Essentials
  2. Using Express.js to Create Node.js Web Apps
  3. TDD and BDD for Node.js with Mocha
  4. Template Engines: Jade and Handlebars
  5. Persistence with MongoDB and Mongoskin
  6. Using Sessions and OAuth to Authorize and Authenticate Users in Node.js Apps
  7. Boosting Your Node.js Data with the Mongoose ORM Library
  8. Building Node.js REST API Servers with Express.js and Hapi
  9. Real-time Apps with WebSockets, Socket.IO and DerbyJS
  10. Getting Node.js Apps Production Ready
  11. Deploying Node.js Apps
  12. Publishing Node.js Modules and Contributing to Open Source

The good thing is that people who want to get the book first don’t have to wait ’til the book is released. They can pre-order the book on Amazon, or even better get access to the alpha version at Apress!

The alpha version will be release chapter by chapter starting in the next few weeks!

Migrating Express.js 3.x to 4.x: Middleware, Route and Other Changes

Migrating Express.js 3.x to 4.x: Middleware, Route and Other Changes

Express.js 4 is the latest (as of May 2014) version of the most popular mature and robust Node.js framework for web apps, services and APIs. There are some breaking changes going from 3.x to 4.x, so here’s a brief migration guide:

Continue reading

Express.js 4, Node.js and MongoDB REST API Tutorial

Express.js 4, Node.js and MongoDB REST API Tutorial

Usually good things don’t stay the same, so our tutorial on building a JSON REST API server with Node.js and MongoDB using Mongoskin and Express.js, and testing it with Mocha and Superagent, has became a bit outdated with the new Express.js 4 version release. Here’s a brand new, revisited tutorial for Express.js 4, Node.js and MongoDB (Mongoskin) free-JSON RESTful API server.

The code for this new tutorial is available at github.com/azat-co/rest-api-express (master branch). The old tutorial’s code for Express 3.x, is still working and in the express3 branch.

Express.js 4 and MongoDB REST API Tutorial consists of these parts:

  1. Node.js and MongoDB REST API Overview
  2. REST API Tests with Mocha and Superagent
  3. NPM-ing Node.js Server Dependencies
  4. Express.js 4.x Middleware Caveat
  5. Express.js and MongoDB (Mongoskin) Implementation
  6. Running The Express.js 4 App and Testing MongoDB Data with Mocha
  7. Conclusion and Further Express.js and Node.js Reading

Instead of TL;DR:

If you’re only interested in a working code from the repository and know what to do, here are brief instructions on how to download and run the REST API server:

$ git clone git@github.com:azat-co/rest-api-express.git
$ npm install
$ node express.js

Start MongoDB with $ mongod. Then, in a new terminal window run the Mocha tests:

$ mocha express.test.js

Or, if you don’t have mocha installed globally:

$ ./node_modules/mocha/bin/mocha express.test.js

Node.js and MongoDB REST API Overview

This Node.js, Express.js and MongoDB (Mongoskin) tutorial will walk you through writing the test using the Mocha and Super Agent libraries. This is needed for a test-driven development building of a Node.js free JSON REST API server.

The server application itself will utilize Express.js 4.x framework and Mongoskin library for MongoDB. In this REST API server, we’ll perform create, read, update and delete (CRUD) operations and harness Express.js middleware concept with app.param() and app.use() methods.

First of all, make sure you have MongoDB installed. You can follow the steps on the official website.

We’ll be using the following versions of libraries:

  • express: ~4.1.1
  • body-parser: ~1.0.2
  • mongoskin: ~1.4.1
  • expect.js: ~0.3.1
  • mocha: ~1.18.2
  • superagent: ~0.17.0

If you try to attempt to use later or older versions the code might not work. :-(

Continue reading

CoffeeScript Quirks

CoffeeScript Quirks

CoffeeScript is a solution without the problem.

— Unknown ironic source.

CoffeeScript is awesome, until it’s totally confusing, and it’s illogical, which can lead to unexpected and subtle bugs. If you’re one of the CoffeeScript haters please skip this post; for others, I’ll share a few notes on the CS quirks that I’ve observed.

For example, let’s say we have a counter and need to assign a value of index subtracted by one to it:

numberOfRadios = index -1

But the line above is not the same as:

numberOfRadios = index - 1

Did you notice that there’s a space after the minus sign in the second example? It took me awhile to track down this type of bug. The reason for this behavior is that the first line will be converted by the compiler to the function invocation and that is probably not what you wanted.

Try the minus one snippet on CoffeeScript.org. It outputs the following JavaScript code:

var numberOfRadios;

numberOfRadios = index(-1);

numberOfRadios = index - 1;

Another pitfall, that leads to writing despondently inconsistent code (by us developers), is caused by the fact that parentheses are optional for function calls.

This example involves if conditions in which we want to compare the value of the expression model.get() or the operand typeof to some strings:

a() if @model.get 'groupType' is 'radioGroupTabs'
a() if typeof @model.get 'condition' is 'function'

CoffeeScript is treating the entire thing as an argument and the results are pathetic. Duh. ;-( Here is the native JavaScript code:

if (this.model.get('groupType' === 'radioGroupTabs')) {
  a();
}

if (typeof this.model.get('condition' === 'function')) {
  a();
}

Placing parens over the function still does us no good. Look at this CoffeeScript code:

a() if @model.get ('groupType') is 'radioGroupTabs'

And its JavaScript output:

if (this.model.get('groupType' === 'radioGroupTabs')) {
  a();
}

The workaround involves using () around function calls, or flipping the order in the if statement so that the function invocation is the last bit of code in the if statement:

a() if (typeof @model.get 'condition') is 'function'
a() if 'function' is typeof @model.get 'condition'
a() if (@model.get 'groupType') is 'radioGroupTabs'
a() if 'radioGroupTabs' is  @model.get ('groupType')

The code above compiles to what we wanted originally:

if ((typeof this.model.get('condition')) === 'function') {
  a();
}

if ('function' === typeof this.model.get('condition')) {
  a();
}

if ((this.model.get('groupType')) === 'radioGroupTabs') {
  a();
}

if ('radioGroupTabs' === this.model.get('groupType')) {
  a();

Is it all good now? Not really, because I personally think this approach leads to inconsistencies: parts of CoffeeScript code that must have parentheses, while in other places they are optional.

Try these if conditon snippets yourself on CoffeeScript.org.

The next note explains the most common beginner’s mistake in CoffeeScript; that is to use an a instead of an a() for function calls. However, super inside of a class, must be called without parentheses in order to pass the arguments to it.

Moving on to the single hash (#) comments which are just skipped over by CoffeeScript. Again, this can lead to unexpected consequences.

For example, a straightforward if statement has a few lines of code:

unless A 
  b()
  blah blah

But if we comment out all of the lines inside of if, the whole thing will fail miserably at the compilation step (at least thank you for that, CoffeeScript!):

unless A 
  # b()
  # blah blah

Just by adding an empty else we can mitigate the failure:

unless A 
  # b()
  # blah blah
else


c() # the code continues here

Try this snippet yourself on CoffeeScript.org

Last but not least, there is another CoffeeScript pitfall related to jQuery events that don’t propagate when the event handler returns false. Of course, CoffeeScript philosophy makes every function an expression (the last statement is evaluated if there is no return statement present).

b = ()->
  false # usually this result is less obvious and buried deep down in code
$a = $ 'input'
$a.click ()->
  console.log 'this happens all right'
  b()

$a.parent().click ()->
  console.log('this never happened')

Of course, in real life the b() function is not so obvious and it’s buried somewhere deep within Backbone and Angular model methods. And the event isn’t propagating up the DOM tree (return false). Therefore, we’ve lost the second event handler without even realizing t. Buyers beware of this elusiveness! :-)

Try the event propagation bug yourself on CoffeeScript.org

This is the end of my list. If you know of any additional CoffeeScript idiosyncrasies, please send them my way. :-)

Further CoffeeScript reading:

DocuSign for BlackBerry 10 in a Few Hours

DocuSign for BlackBerry 10

Last week DocuSign engineering had a second internal hackathon (a nice collage resulting from the first one) and I built DocuSign for BlackBerry 10 in just a few hours (well, sort of).

Some of you might be wondering what BlackBerry is. It’s a mobile operating system that is actually in the process of surpassing Windows and Kindle, based on market share, according to this reputable study. Oh, and by the way, BB also has many loyal aficionados thanks to their years of being a mobile solo-provider to enterprises.

Luckily, DocuSign already had an app for Android and, based on my research, which consisted of looking at this page for a minute, and talking with our mobile dev manager, I figured out that I could just port the DocuSign for Android app to the BlackBerry OS. Porting is just a fancy word for re-writing something in a new language, or for a new platform, without changing functionality very much. It typically involves re-compiling, changing APIs, updating code and re-packaging.

It’s worth noting that RIM (the company behind BlackBerry) provides many other options for building BlackBerry 10 apps including:

  • Adobe AIR
  • Native
  • HTML5

This is probably done to boost the number of available offerings within their marketplace (BlackBerry World) and jump-start their development ecosystem, which is lagging far behind those of iOS and Android.

I have worked with Java and J2EE before. In addition, I was an Adroid guy for a long time prior to getting my first Apple product (MacBook Air): I remember that my very first smartphone (running buggy Android 1.6) had constant “Force Close” errors. However, up until this hackathon, all of my forays into mobile dev land consisted only of using HTML5 with the Jo and Sencha Touch frameworks. Awesome challenge! Or so I thought.

The goal was to use Android code, re-package it, and install it in the simulator (with or without changes). I decided to go with Android Studio vs. Eclipse, and downloaded these tools (download page):

The complete tutorials are available at Runtime for Android apps.

After downloading, literally, a few gigabytes of SDKs and packages, I was stuck with our code-base in Android Studio due to some Java exceptions regarding Gradle, so I resorted to using command-line tools.

These are the commands from the BlackBerry toolchain that I ended up using:

  • apk2barVerifier: to verify apk (Android) files for compatibility for bar (BlackBerry)
  • apk2bar: to re-package apk to bar
  • blackberry-deploy: to upload and install the app on a BlackBerry

It’s worth noting that for distributing BlackBerry 10 apps to the BlackBerry world, apps must be signed with a special token (tutorial). Obviously, I skipped this step for the hackathon.

Lo and behold, everything worked on the BlackBerry with 0 code changes (except where DocuSign tries to charge via Google Play). The end results were quite pleasing. Thank you BlackBerry for making it easier for us developers. I guess, I can now say that I develop native apps (yeah, right). :-)

DocuSign for BlackBerry 10: Homescreen

DocuSign for BlackBerry 10: Homescreen

DocuSign for BlackBerry 10: Sign a Document

DocuSign for BlackBerry 10: Sign a Document

DocuSign for BlackBerry 10: Main Menu

DocuSign for BlackBerry 10: Main Menu

DocuSign for BlackBerry 10: Document View

DocuSign for BlackBerry 10: Document View

In addition, I also found this neat but scammy-looking service called APK Downloader that allows us to install Android apps from the Google Play market directly onto the latest BlackBerry 10 systems. Simply enter the name of the app as a Java package, e.g., com.docusign.ink, (link). The real hack! I could have used it from the beginning and saved myself a few hours. Therefore, it’s vital to conduct proper up-front research prior to embarking on a project! ☺

Growth Hacking The New DocuSign Experience

The DocuSign Momentum 2014 conference was a huge success, attended by over 1,200 people and filled with many announcements of new developments. One was a culmination of many years of hard work for DocuSign product engineering — the re-imagined web application dubbed the New DocuSign Experience.

The web app is fast, beautiful and well thought-through. It was a pleasure to watch its live demo on a large screens and hear tons of positive comments from glad DocuSign customers.

Being a part of the growth hacking team and its team lead / ScrumMaster, I had the chance to work on a few important features:

  • Responsive and dynamic homepage: certain sections on the homepage change based on account types and states, e.g., show “Your plan is expiring in X days” for trial users, but “You have Y documents left before reaching your limit” for freemium ones.
  • Visual notifications: special messages conveniently spread across the app, which are triggered dynamically based on user account states (similar to the dynamic homepage).
  • Analytics: removing old page-view-based tools in favor of event-based ones (go Mixpanel!).
  • In-app upgrade: before, it was not a smooth experience and required multiple logins, redirects and was a plain PITA.
  • Landing page for Sign a Document: when users self-sign docs, the recipients (CCs) see a nice page that prompts them to sign up.

Continue reading

Getting Published as a Programmer: The Practical Node.js Story

Finishing The Practical Node.js Manuscript

TL;DR: This is the story about how I got my first publishing deal, what this book is about, and what problems I encountered along the way.

I spent last weekend sitting in an awesome new coffee shop in Oakland, typing up the last two chapters of my Practical Node.js manuscript. The book is scheduled for release by the UK-based technical publisher Apress in the late spring.

I started writing the manuscript in October 2013. I devoted my weekends and holidays to it (as so many entrepreneurs and writers do). The fact that I smartly had a few example apps and some drafts written — some of them for my blog, others for proposals to Pragmatic (declined!) — helped to speed things up. (Needless to say, in publishing rejection is a common thing and often an opportunity to get better.) However, the writing itself wasn’t the hardest part. Here’s the short story why.

Continue reading

What is Growth Hacking

The First Day of The New DocuSign Exerience

Growth hacking is such an interesting term. When I first heard of it, either at one of the meetings organized by 500 Startups or on the Jason Calacanis’s show, it made a lot of sense to me. Growth is vital for startups, and hacking is all about finding clever solutions (which are usually temporary but efficient).

When I became a growth hacking team lead at DocuSign, I started reading more about growth hacking. Soon I found out that there’s a ton of confusion on the Internet around the meaning of this phrase.

Some folks, especially ones who’s been doing new media and online marketing for a long time, think that it’s just a fancy trend for good old tools and techniques like:

  • A/B testing
  • Email marketing
  • Referral marketing
  • Social media marketing
  • Viral marketing
  • Content and SEO
  • Analytics

It’s true that these kinds of online marketing have been around for the last 5—15 years! What these adepts usually miss is the difference in how growth hacking approaches product by directly influencing and oftentimes even developing it!

Note: Being a programmer hacker is not required to be a growth hacker.

On the contrary, there is little to no input from marketers on product decisions in traditional marketing. For example, imagine, there are a car manufacturer and its marketing department. Most likely, the marketers will have little to no input into the car’s engineering and design.

Another example, a pure marketer might organize an email campaign, but because the funnel hasn’t been optimized, the conversion rate turns out to be dismal. On the other hand, a typical growth hacker will first test the funnel, and only after optimizing it, they launch full-blown campaigns reaping better conversion rates!

In software, and info products (and maybe in services?), the relative low cost of prototyping — vs. increasing cost of advertising and other traditional strategies — lead to the emergence of a hybrid: growth hacking. The distinct boundaries between marketing and product departments become blurred.

The best growth hacking will involve some sort of product engineering, user experience and design work, gathering and analyzing of metrics and events.

Usually there are only two tactics for growth hacking:

  • Push
  • Pull

Push tactics often involve finding temporary “loopholes” and getting a competitive advantage by using them. These are examples we often hear/read about: AirBnB posting on Craigslist, Dropbox using free space for referrals, etc.

That’s all good, but as in our example with an email campaign, if the product is not selling itself — that’s where the most ROI is for a growth hacker: pull tactics. They involve working on a funnel, and making product better to use / easier to know about expired CCs, etc. In the next post, I’ll show how my team and I growth hacked The New DocuSign Experience.

To sum it all up, there is a good quote from TNW post by GAGAN BIYANI:

Growth hackers focus on low-cost and innovative alternatives to traditional marketing, i.e., utilizing social media and viral marketing instead of buying advertising through more traditional media such as radio, newspaper, and television.

PS: I absolutely positively recommend this amazing free ebook The Definitive Guide to Growth Hacking by Neil Patel and Bronson Taylor.

Pre-Order Practical Node.js and Buy Alpha!

Practical Node.js: Building Realtime Scalable Web Apps

Practical Node.js: Building Realtime Scalable Web Apps

My brand new book Practical Node.js: Building Realtime Scalable Web Apps is available for pre-order on Amazon.com! The book is dubbed “if you have time to read only one Node.js book, this is the book you should read”, and its ebook is also available in alpha for purchase directly from Apress.

Express.js Guide Goes to Apress

 

I’m extremely exited about my second book contract with Apress and also about using the product that I’m working on (the DocuSign web app) to wet this publishing deal. Pro Express.js is going to be the ultimate Express.js resource “thank you” to all my readers who contributed with suggestions!

Rare opportunity! Final sale!

Goodbye Express.js Guide Sale: 4 Books For Only $19.99 (reg. $84.97)

How to Stay Healthy and Sane Working 12-hour Days As a Programmer

DocuSign Momentum '14

The DocuSign Momentum conference is just a few days away, and my team and I has been pulling long shift in order to deliver something absolutely amazing and to make sure that it’s in a great shape. So I wanted to share what exactly helps me stay healthy, sane, productive and happy working as a programmer 10–12 hours per day sustainably:

  • Get at least seven to eight hours of sleep
  • Skip breakfast: clears mind, reduces calories intake, and saves time
  • Check work email only a few time per day and check personal email/Facebook/LinkedIn/etc only once (in the evening) preferably inboxing zero both categories
  • Meditate and workout (12 minutes is enough)
  • Cancel all activities and avoid any additional obligations and projects
  • Wear uniform-like clothing
  • Drink lots of good coffee (e.g., bulletproof coffee)
  • Avoid fruits, sugars, sodas (even diet ones), grains, legumes and potatoes, i.e., paleo lifestyle/diet
  • Change workstations: resistance ball chair, stand-up desk, sofa, etc.
  • Consume vitamins: C, Omega–3, Multivitamins and D3
  • Take walks and stay positive!

PS: The Healthy Programmer book has been on my to-do list for a long time. Please let me know whether you read/liked it.

Express.js Guide Might Be Retired and Re-Published Traditionally

A major technical literature publisher approached me and offered to publish Express.js Guide: The Comprehensive Guide on Express.js. The new book proposal was accepted by the editors last week. This is exciting news! The new book might become my first traditionally published book (I have Practical Node.js in the works).

What it means for potential readers: the content will become better (professionally edited technically and grammatically a few more time in addition to the current edits).

However, the price is likely to go up to over costs of traditional publishing house. This is not up to me. Publisher will have all the rights. The one thing I’m sure about: there would not be a budget Kindle edition available directly or via Amazon.com for just $9.99.

So if you want to get a copy, or know a friend who might benefit from the Express.js/Node.js book, get it now, before the publishing contract is signed. ;-)

 

Express.js Guide is #1 Best Seller in Cliet-Server on Amazon Kindle Store

Express.js Guide is #1 Best Seller in Cliet-Server on Amazon Kindle Store

Succeeding with Agile, Brief Overview I

Succeeding with Agile

Couple months ago, I was promoted to a ScrumMaster role at DocuSign. In light of it, I decided to brush up on my agile development skills and theory by reading. My choice fell on the highly acclaimed Succeeding with Agile: Software Development Using Scrum by the guru of Agile Development and Scrum — Mike Cohn.

Succeeding with Agile

Succeeding with Agile

Here is a short overview of the first half of the book, or gist as programmers call it:

  • A ScrumMaster has more responsibility and authority over processes, but a limited authority over people; the role is akin to a fitness trainer (a yoga teacher analogy fits me better): enforcing the agile process.
  • Every sprint team needs to deliver shippable (and tested) code: features, bugs, etc.; if the task is too large — split it.
  • Developers should work with product managers/owners directly on requirements.
  • Different developers should work on all parts of the application / code base.
  • Agile is not for the developers who likes to work in privacy putting their headphone and not talking to people (Bummer). :-)
  • Team functions better with a mix of generalists and specialists; avoid all-specialists teams at all cost.
  • When possible use feature teams rather than component teams.
  • Keep teams small. Four to nine people is an optimal size due to the social loafing (having more people reduces average productivity) — this was one of the reason our DocuSign team was split into three smaller teams!
  • A non-coding architect and project manager are obsolete roles on a Scum team.
  • Don’t let team members multitask. Each additional task reduces productivity; however, after three and more tasks the reduction becomes smaller and smaller. Direct quote: “Individuals assigned to work on multiple projects inevitably get less done

To be continued…

What I really liked about the book so far is that it’s not just boring theory. Each point is supported by data, references to sources and personal three-decade-long (anecdotal) experience of the author (Mike Cohn). If you liked the bullet point above, get Kindle Succeeding with Agile on Amazon.

Programmers Are Assholes?

Right now, I’m lucky to work in a great team where everybody is a wonderful human being. However, during the years in software engineering, I’ve encountered a disproportionate number of assholes comparing to other fields or professions. Does coding affect someone’s personality negatively or it’s the other way around? Do computers attract certain asocial elements, so they can put on the headphones and not talk to people? Why there are more assholes in software engineering than in real estate or food&beverage?
Continue reading

Invest in Yourself

Of course, foreigners steal your job!

In the modern society, it’s not enough anymore just to graduate from a four-year college, and hope the skills and education acquired there will get you through the next 30–40 years of professional life. This is very prominent in software and technology fields, but applicable to many other industries as well.

In the age of the information workers, just to stay competitive on the market place, we constantly need to re-invent or jobs and ourselves. However, not everybody is happy about it. I often find people who don’t read professional books, magazines, blogs, and don’t learn outside of the job duties. Wake up people!

It’s so easy. MOOCs and online courses like Udemy and CreativeLive provide affordable interactive education. Free online ebooks are everywhere. Pick up a new language like Node.js or build something cool with React.

It’s no surprise that tomorrow, these people might be the first to be left on the outskirts of professional world . And when this happens, whom they’ll blame?

Blog Express.js Web Application Example

Blog Express.js App Admin Page

For the past few weeks, I’ve been writing a new book on Node.js. Hence the lack of new posts. This time, the book encompasses virtually all of the practical aspects of web development using Node.js: authentication, authorization, OAuth with third-party service providers, testing, libraries, frameworks, databases, ORMs and MVC-like patterns. In other words, if you have to read only one book on Node.js (which is not a good advice, but let’s assume), this will be the book that you have to read. :-)

The title and the alpha sign up are in secret for now (subscribe to get the news faster). The book is due in early spring 2014.

Here is one of the main examples that is featured in the book: the Blog application built with Express.js, MongoDB and Mongoskin. The application is subject to change, but if you’re an intermediate or advance Node.js programmer, go ahead and poke the source code, kick the tires of the server. It’s not a Ghost blogging platform, but blog-express can give valuable practical tips on how to implement:

  • Session-based authentication
  • Express.js middleware authorization
  • MVC-like pattern using lightweight MongoDB library called Mongoskin
  • REST API server
  • Express.js routes organization
  • Jade and server-side rendering
Blog Express.js App Home Page

Blog Express.js App Home Page

GitHub: http://github.com/azat-co/blog-express

Get Your Programming Questions Answered

If you have questions about programming and web development, we’re accepting them. Don’t suffer in the unknown!

Depending on the volume of received questions, we’ll be answering some of them on our blog and a future podcast.

Example topics:

  • What programming language should I learn?
  • How to land a dream job in software engineering?
  • What libraries should I use?
  • What is NoSQL?
  • What is Node.js?

Send your questions via the form: http://webapplog.com/about-azat-mardanov/.

56% off on Four JavaScript and Node Books During Holidays!

Holiday JavaScript

Holiday JavaScript

Hurry up to purchase four books on JavaScript and Node.js as a gift or for yourself. The deal will last only ’til the end of December 2013. The total value is over $62, but you can get all four books for just $27.49!

The bundle includes titles:

  • Rapid Prototyping with JS: Agile JavaScript Development
  • Express.js Guide: The Comprehensive Book on Express.js
  • Oh My JS: The Best JavaScript Articles
  • JavaScript FUNdamentals: A Collection of Essential Basics

Become smarter next year with the Holiday JavaScript bundle: https://leanpub.com/b/holidayjavascript.

Node.js FUNdamentals: A Concise Overview of The Main Concepts

Note: This text is a part of upcoming ebook JavaScript and Node FUNdamentals: A Collection of Essential Basics.

Node.js is a highly efficient and scalable non-blocking I/O platform that was build on top of Google Chrome V8 engine and its ECMAScript. This means that most front-end JavaScript (another implementation of ECMAScript) objects, functions and methods are available in Node.js. Please refer to JavaScript FUNdamentals if you need a refresher on JS-specific basics.

Continue reading

Breaking Bad (Loops in JavaScript Libraries)

It was sort of a surprise for me when I discovered inconsistencies in the most popular JavaScript libraries in how they handle their each and forEach loops. This post compares:

  • forEach Loop in Native JavaScript
  • each Loop in Lo-Dash
  • each Loop in jQuery
  • each Loop in Underscore.js
  • forEach Loop in Underscore.js

forEach Loop in Native JavaScript

JavaScript Libraries are important (e.g., jQuery, Lo-Dash, Underscore), but in the case of functional loops (forEach and each) they create a lot of confusion (for loop can be broken with ‘break’). Let’s inspect the example of native JavaScript code for the forEach method:

[1,2].forEach(function(v){
  alert(v);
  return false;
})

This will display us two alert boxes. Try the native JavaScript code yourself in JSFiddle.

This is an expected behavior in most cases because with each iteration we invoke a new function. Unlike the for (var i=0; i<arr.length; i++) {} code that has no function/iterators.

Continue reading

Goodby MediaTemple and Hello WPEngine

This week I transferred webapplog.com from MediaTemple to WPEngine. MT was orders of magnitude better than my previous frugal shared hosting. Nevertheless, lately my weblog was choking (anywhere from 6–12s to load) on the days when the traffic was higher than 1,000 visitors. The transition was as easy as uploading SQL dump file and the wp-content folder. At the same time, I changed my nameservers which resulted in insonsistency and the slight downtime was cause by some kinks which WPEngine team was able to solve. However, so far the overall experience of WPE is pleasant and most importantly the speed is lightning fast!

No, WPEngine didn’t pay me credits to write this post. :-) Here is a coupon if you decide to switch: ARTOFBLOG.

Express.js FUNdamentals: An Essential Overview of Express.js

Note: This text is a part of upcoming ebook JavaScript and Node FUNdamentals: A Collection of Essential Basics.

Express.js is an amazing framework for Node.js projects and used in the majority of such web apps. Unfortunately, there’s a lack of tutorials and examples on how to write good production-ready code. To mitigate this need, we released Express.js Guide: The Comprehesive Book on Express.js. However, all things start from basics, and for that reason we’ll give you a taste of the framework in this post, so you can decide if you want to continue the learning further.

Continue reading

Why You Should Not Work at a Startup

I have nothing against startups per se. I think they are great places for exceptionally bright individuals to work on ground breaking products. However, I think there are some misconceptions and myths about working at a startup, especially working in an early stage startup as a technical person, i.e., software engineer (or web developer, or coder, or programmer). Here is my list of reasons why someone should not work at a startup.

Continue reading

Foreword to Express.js Guide: The Comprehensive Book on Expresss.js

Dear reader, you are holding a book which will open you to understanding and fluent usage of the Express.js framework – standard de facto in web application programming on Node.js. And I would especially recommend this book because it was written by a practicing engineer, one who has a comprehensive knowledge about the full stack of web application development and Express.js in particular.

Continue reading

Solving Programming Problems

Programming problems are not that much different from mathematics or physics problems. There are usually an input and an output to which someone needs to arrive by providing an algorithm. This algorithm is typically a function or series of functions.

Programming puzzles and toy problems are good exercises to sharpen skills and prepare for technical interviews. No wonder that more and more online coding schools (e.g., CodeAcademy) make those metal workouts main staple of their courses.

Beginner programmers might benefit by applying these steps to their process of solving a programming problem:

Continue reading

The Release of Express.js Guide: The Comprehensive Book on Express.js

Express.js is a de facto standard of Node.js development and the most popular NPM library as of today! However, as with any framework, sometimes the learning curve is steep. At HackReactor, I often asked the same questions about code organization, authentication, database connections and deployment.

Continue reading

Todo App with Express.js/Node.js and MongoDB

Note: This tutorial is a part of Express.js Guide: The Comprehensive Book on Express.js.

Todo apps are considered to be quintessential in showcasing frameworks akin to famous Todomvc.com for front-end JavaScript frameworks. In this example, we’ll use Jade, forms, LESS, AJAX/XHR and CSRF.

In our Todo app, we’ll intentionally not use Backbone.js or Angular to demonstrate how to build traditional websites with the use of forms and redirects. In addition to that, we’ll explain how to plug-in CSRF and LESS.

Example: All the source code is in the github.com/azat-co/todo-express for your convenience.

Continue reading

Notes from Startup School 2013 by YCombinator

The Startup School 2013 event organized by YCombinator and Paul Graham had an impressive list of speakers including Mark Zuckerberg of Facebook, Jack Dorsey of Twitter/Square, Ron Conway of SV Angles, Phil Libin of Evernote and others.

Here are the notes if yesterday you weren’t at Flint center or missed the live online translation:

Here are the notes from the talk by Jack Dorsey — Founder, Square, Twitter

Reading to us from books that have helped him along the way, adding his own thoughts.

Continue reading