Thursday, September 22, 2016

5 Entrepreneurship Rules I’ve Learned from Starting 7 Figure Businesses

Entrepreneur

I'm living the immigrant dream. Moving to Houston at the age of 14, going from Saudi Arabia (pre-Internet) to Texas resulted in some massive culture shock. The Internet was my outlet.

I immediately started dabbling in building websites (being the nerd that I was, my first website was on QBasic). It was in 1999 that I made my first serious entrepreneurial attempt — in the world of online gaming. Building up popular sites around online games such as EverQuest and Ultima Online, we helped facilitate virtual item and currency sales. It was successful.

After that I moved into the local search space. Moving into an underdeveloped neighborhood of Toronto, I immediately set out to map all of the local businesses in that area (this was before Google Maps even existed). It was also successful.

Flush with success, I decided money was not my motivator. Thus I retired, and spent five years traveling around in the US and Argentina.

Yet the itch was ever-present. As I lost a significant amount of weight, I created what most people know me for: Examine.com. Analyzing scientific research on nutrition and supplements, we became the trusted source for unbiased information. Selling educational information to health professionals, it also became successful. Today it clocks in at roughly 2 million visitors a month.

And making it full circle, I now talk about online entrepreneurship on SJO.com.

The reason I expanded on my past in-depth is that while I've worked in industries that literally have no connection with each other, I have found some basic truths about what drives success.

I've had successful companies in a variety of industries. In that time, I’ve learned 5 simple rules on being a better entrepreneur.

1. Take Investment Only IF You Really Need It

Venture capitalism is akin to pornography — it sells you something sexy, but the reality is not so hot.

I personally know a dozen people who sold their companies for eight figures, yet the amount they took home barely broke six figures. Outwardly it appears to be a success, but the reality was that the effort was not worth it.

The reality is that the moment you take outside capital, you lose:

  1. Control. You are no longer the boss; your investors (and subsequently your board) are the people with the final say.
  2. Time. Once you take capital, the clock starts ticking; either your business does really well and you are deemed a success, or else you are considered a failure and gutted. There is no slow growth or middle ground.
  3. Balance. In a funded startup, there is no such thing as downtime. Your personal time fades away into oblivion, and you live and breathe your company.
  4. Share of the pie. As I mentioned, once you take funding, the investors are getting their money and their return back before you make your money.
  5. End game. Few entrepreneurs actually take the time to pause and ask themselves — "why am I doing this?" Too many get seduced by big numbers, totally forgetting why they got into this in the first place.

Starting up an online business is easier than ever now — from incredibly cheap hosting, to using Wordpress to as your CMS, to Facebook making targeted ads incredibly powerful (and Kickstarter letting you pre-sell), the cost of getting going is so incredibly low that even if you do need funding, waiting as long as you can is likely the way to go.

When Inc Magazine analyzed the companies in their Inc 500 they found more than 50% were started with under $50,000. Almost 80% self-funded them!

Bootstrapping your business will give you a lot more control, which often leads to a better business.

2. Inspire Loyalty in Your Employees

If you look at Examine.com's about page, you'll see I'm the seventh person listed.

This is by design. The goal of Examine.com is not for me to get famous, but to shine a light on the actual truth when it comes to nutrition and supplements. For us to achieve that goal, I am not the person people will identify with. The people who are listed first are the actual talent providing the unique value to our customers.

Far too many times, I see entrepreneurs make their business about them. Sorry, but running a business is not an opportunity to be self-indulgent and celebrate yourself.

Your business is about offering something about value, not about you.

My employees know:

  1. Working for me will be a platform for them. At Examine.com, team members like Kamal and Kurtis are the ones who get quoted in the media (such as BBC, The Guardian, Mother Jones, and more).
  2. That I always have their back. Internally we can respectfully disagree, but publicly, no one can talk ill about my employees and not hear from me. As the leader, it's my job to make sure they know that I support them. This support also gives them the confidence to take on more responsibility internally.
  3. The customer is not always right. If any are ever abusive, I am glad to fire a customer — I refund them their money, and invite them to spend their money elsewhere.

What’s amazing about this is opportunities open up for me in this way. I became a digital advisor to Arnold Schwarzanegger because his team saw the work Examine.com was putting out, and invited me to join. They knew I wasn’t chasing the limelight, and it has opened up a lot of doors for me.

Make your employees the industry leaders and always take care of them. They will in turn take care of you.

Continue reading %5 Entrepreneurship Rules I’ve Learned from Starting 7 Figure Businesses%


by Sol Orwell via SitePoint

This week's JavaScript news, issue 302

This week's JavaScript newsRead this e-mail on the Web
JavaScript Weekly
Issue 302 — September 22, 2016
Components are a core part of Angular 2 around which most apps will be built. Learn what they are, how they work, and how to test them properly.
Matt Fehskens

Pavels Jelisejevs introduces ESLint, a highly configurable (and popular) tool that analyses your code and highlights (or can even fix) bugs or style issues it finds.
Sitepoint

Easy-Fix is a new module from Walmart Labs that helps integration tests capture and replay test data allowing tests to run in live, capture or replay modes.
Dan Rathbone

PubNub
Learn to build your own Java/Android chat app with realtime messages and more. Watch Now.
PubNub   Sponsor

Despite all the hype and noise, Burke Holland says that Angular is still the dominant JavaScript framework and Angular 2 will be gasoline on the fire.
Burke Holland

Features an intuitive Canvas-esque API, is based on SVG/VML technology, and works right back to IE6 and Chrome 1.
AnyChart

A look at how to build 3D games declaratively using Three.js, React and WebGL.
Andrew Rey

How to draw on a canvas, rotating a matrix, rudimentary requestAnimationFrame listening and handling keyboard input are covered in this fun 51 minute tutorial.
Meth Meth Method

One way to understand a system is to build something similar of your own. In just 30 minutes, Paul O Shannessy does just that - rebuilding a very simple React-a-like.
Paul O Shannessy

Jobs Supported by Hired.com

  • Javascript Developer at X-Team (Remote)We're looking for a developer with an extensive knowledge of Javascript and skills in different frameworks and libraries. We are 100% remote and we provide the funding needed to help you achieve your goals and grow. X-Team
  • Senior JavaScript Engineer - Glint (Bay Area)Want to join a fast-growing startup? Glint are looking for a Senior JavaScript engineer who is ready to be a hands-on integral member of our engineering team and empower brands like eBay & FICO. Glint
  • Stop wasting time - know what you'll earn before the interviewOn Hired, sign up in 10 minutes and get offers from top companies like GitHub, Uber, & Stripe. Engineers get an average of 5 offers on the platform in 1 week. Hired.com

In brief

React Router v4 Takes Radically Different Declarative Approach news
A huge overhaul.

The Progress of Node.js A Year After Node and io.js Merged news node
Node.js Foundation

Try RASON™ – And Start Using Advance Analytics in Your Web/Mobile Apps rawurl
Solve powerful optimization & simulation models in your app easily with RASON™. Use a high-level modeling language embedded in JSON, & a simple, Azure-backed REST API.
RASON.com by Frontline Systems Inc  Sponsor

Using Lambdas with Bluebird.Map tutorial
Pete Lyons

Code Size Reduction Tricks for asm.js tutorial
Andre Weissflog

An Introduction to Generators and Channels in JavaScript tutorial
A. Sharif

Data Flow in Vue and Vuex tutorial
Benjamin Listwon

Building a Hacker News Client with Angular 2 CLI, RxJS and Webpack tutorial
A thorough tutorial.
Houssein Djirdeh

4 Tips for Building Cross-Platform Electron Apps tutorial node
Avocode

Top-Level 'await' Is A Footgun opinion
“Top-level await, as far as I can tell, is a mistake and it should not become part of the language.”
Rich Harris

Why Vue (Not React) Is The New jQuery opinion
Peter Jang

What's Coming in Vue.js 2.0 podcast
Full Stack Radio

A Flight of JavaScript Frameworks podcast
This 48-minute podcast discusses the overwhelming options available when choosing a JavaScript framework, and which are the best to use.
Front End Happy Hour

WebAssembly: Birth of A Virtual ISA video
A great intro to what WebAssembly is and isn’t and its ecosystem.
Ben Smith

Find and Fix Node.js Errors Faster (and have fun doing it) 
Quickly pinpoint what’s broken and why. Get the context and insights to defeat all Node errors.
ROLLBAR  Sponsor

PM2 v2 Released: The Node.js Process Manager tools
Keymetrics

fetch-reject: Simple Wrapper for 'fetch' Which Rejects on HTTP Error code
Matan Kotler-Berkowitz

promise-sequential: Like Promise.all(), But Sequentially code
Russian Rebouças

Matter.js: A 2D Rigid Body Physics Engine for the Web code
Liam Brummitt

Lory: Touch-Enabled, Minimalistic Slider Written in Vanilla JS code
Maximilian Heinz

React Routify: A Routing Library for React Applications code
Ryan Whitmire

Curated by Peter Cooper and published by Cooper Press.

Stop getting JavaScript Weekly : Change email address : Read this issue on the Web

© Cooper Press Ltd. Office 30, Lincoln Way, Louth, LN11 0LS, UK


by via JavaScript Weekly

Mini Studio

MiniStudio

'Mini Studio' is a free One Page WordPress theme suited for a digital agency. The long scrolling Single Page theme features an intro slideshow, services section, small image portfolio (with filter), blog feed and a contact form. 'Mini Studio' is a good starting point if you on a tight budget and want to use WordPress. (also check out our hosting recommendations that start at only $3.49/month)

by Rob Hope via One Page Love

How to Set Up Basic Routing in Angular 2

Rails: Dynamically Chain Scopes to Clean up SQL Queries

One of the worst things that can happen to a Rails application is SQL queries becoming a huge complex conditional mess. I have come across controller actions that build query strings using a type of “chain of conditionals” method, like so: sql = "active= 1" if condition sql += "and important=1" end if second_condition sql […]

Continue reading %Rails: Dynamically Chain Scopes to Clean up SQL Queries%


by William Kennedy via SitePoint

Exploring Devise, Part 1

In some of my previous articles about image uploading in Rails, I made mention of Devise but did not go deep into it. In this tutorial, I will be teaching you about Devise.

Ready? Let's get started!

Devise Introduction and Modules

Devise is an authentication solution for Rails built with Warden and provided by the awesome people at Plataformatec. Devise provides different modules:

  • Database Authenticatable: This encrypts and stores a password to the database to validate the authenticity of a user while signing in.
  • Omniauthable: This attaches OmniAuth support to Devise. Users of your application will be able to sign in using accounts such as Facebook, Twitter, and Google.
  • Confirmable: This enables the sending of emails with instructions that will help in the verification of an account.
  • Recoverable: This module helps in times when users forget their password and need to recover it. With this, the user will be able to reset the password.
  • Registerable: This handles the signup of users. It also allows users to edit and delete their accounts.
  • Rememberable: This module makes it possible for your application to remember a logged-in user by storing a cookie.
  • Trackable: This module helps track sign-in count, timestamps, and IP address.
  • Timeoutable: This module is responsible for expiring a session that has not been active for a period of time.
  • Validatable: With this module, email and password get to be validated.
  • Lockable: This provides an extra layer of security—when activated, an account can be locked after a given number of failed sign-in attempts.

Devise Integration

For the purpose of this tutorial, we are going to generate a Rails application that we'll use to check out the workings of Devise. Let's proceed!

rails new devise-app -T

The -T flag tells Rails to generate the application without the default test suite. Navigate to your application directory and drop the following gems into your Gemfile.

Now install the Devise and Bootstrap gems you just added.

bundle install

Rename your app/assets/stylesheets/application.css file to app/assets/stylesheets/application.scss and add the following lines in it:

Open up the app/assets/javascripts/application.js file and require bootstrap-sprockets. Mine looks like this:

Next, you need to run the Rails command to install the configuration files for Devise. You do so by running this command:

rails generate devise:install

The command generates the following on your terminal. You should read it to understand what happened.

The command also generates two files, which you can find in the config directory. It also gives us some instructions on what we should do.

Navigate to your application layout, app/views/layouts/application.html.erb, and make it look like what I have below:

You need to define the default URL options for your development environment. Add the code below in config/environments/development.rb.

Now you need to create a User model for Devise. You can do so using your terminal.

rails generate devise User

This will generate a user.rb file in your app/models directory. The file generated will look like this:

You can see that it contains the default modules I mentioned above. The command you ran also modified your config/routes.rb file by adding a route for devise. You should check that out.

At this point, you need to migrate your database. You do so by running: 

rake db:migrate

Authentication Using Devise

Now you need to create a PagesController and wrap Devise authentication around it—this will prevent unauthorized persons from seeing the page.

rails generate controller Pages index

Open up your routes file and set the root of your application.

Open up your PagesController and add authentication for your index and new pages.

The code shows that the index and new pages are accessible only to registered users. Open up your terminal and start your rails server. Point your browser to http://localhost:3000 and you will automatically be redirected to the Devise sign-in page.

Signing in Without Using Email

The default means of signing into Devise involves the use of email address and password. What if you want to enable users to sign in with their unique username? If that is what you want, it is possible. Let's see how.

Run the command:

rails generate migration AddUsernameToUSers username:string

This will add a new column for username in your users table. Migrate your database.

rake db:migrate

You need to add a field to your views where your users can enter their username. When you go to your app/views directory, you will not find any file that renders the Devise views. This is because Devise loads the views from its gemset. To customize it, you have to generate copies of the views. The command below does the magic.

rails generate devise:views

This will generate some folders and files in your app/views directory.

You will need to edit the page for signing in, signing up, and updating user information. Just paste the blocks of code below into their respective files.

Sign-Up

Edit

Sign-In

Using your text editor, navigate to app/controllers/application_controller.rb. You need to modify it to permit the use of username. Modify it to look like this:

Now a user can sign in with his/her username. At this point there is something not right about your application. When a user signs in, there is no way of signing out. This does not result in a great user experience. I'll show you how to fix that.

From your terminal, create a new directory called shared in your app/views folder.

The file you created above is a partial where the code for your navigation bar will be written. Drop in the following code.

Now you need to render the navigation bar in your application layout. Open up app/views/layouts/application.html.erb and drop in the code to render your navigation bar.

Conclusion

In this part you learned how to install Devise and add authentication to your pages. I also made mention of a partial. I will cover that in a separate tutorial. 

In the next part, we will cover some areas more advanced than this. I hope this was worth your time!


by Kingsley Silas Chijioke via Envato Tuts+ Code

AtoZ CSS Quick Tip: Using Hover and Height

H is for Hover and Height

There’s not too much more I can say about hover that I haven’t already covered in the video about the letter H. However, there are some cool animations that you can apply for a hover state. Google "CSS hover effects" and you’ll find plenty.

Here are a couple of sites that have some nifty effects:

Further to those, I recently produced a video for Code School, all about a library called hover.css.

Continue reading %AtoZ CSS Quick Tip: Using Hover and Height%


by Guy Routledge via SitePoint