CSS Transitions(linear, ease, ease-in,etc.)

All the different properties for the CSS3 animation and transition can be confusing at first. The typical properties are usually:linear, ease, ease-in, ease-out, ease-in-out

Here is a quick summary: 

linear: no acceleration or slow down
ease: fast beginning and a slowdown at the end (the default)
ease-in: start slow and then finish fast
ease-out: normal beginning and slowdown at the end
ease-in-out: starts slow, fast in the middle and finish slow

A simple way to thinking of it is to think of “ease” as “take it easy- in this position“, so for example:
“ease-in”: Take it easy near the beginning
“ease-out”: Take it easy at the end
“ease-in-out” Take it easy at the beginning and the end

Motivation and Passion is a Myth

It seems that a lot of people are just ‘waiting’ for motivation or passion like it’s a Christmas present and that when they receive or find this present everything else will follow through. Although I’m not the one to wait, I never actually self actualized this to myself. Just like many other startup founders, I had ambitious goals and worked insane hours but at first I can’t really say I had a huge passion or had a surging motivation for it. Rather, at first my passion and motivation would run like fuel on a car- running great at first and then having to refill up again( refueling in my case was to read an inspiring book about a rockstar entrepreneur).

But after a couple years, working ungodly hard just became a regular habit and I love learning more about programming. While I was reviewing a couple notes on some books I’ve read(Mastery by Robert Greene and So Good They Can’t Ignore You by Cal Newport)  a culmination of ideas just hit me. Motivation and passion is really just a myth.  I don’t mean it in the sense that they don’t exist at all but in the sense that it’s all backwards. In the business world, it is a common saying that if you build a great product that solves a great problem that the money will follow. In this case, the side effect of a great product is money or a crazy acquisition(like Instagram).  In this same logic, I like to say that motivation is a side effect of doing work. We all know what our goals are and what we need to do, so just do it! The motivation will follow just like when we don’t feel like working out but we feel great afterwards so we do it again(this is how we build a habit). Passion is the same, except it happens in a much broader span of time. Passion is a side effect of becoming a master of some valuable skills or when you become “So good they can’t ignore you.” At first it may seem like you’re the average entrepreneur, programmer, marketer etc but when you start seeing money and users come in or your awesome open source project is getting shared it motivates you to further “level up” to the point where you become the top 10% in your field and as a result you are “passionate” about what you do.

There’s a common saying that says “Success breeds success”, in this case good work breeds motivation, and becoming a master breeds passion. So, if you’re more proactive towards your goals (instead of reactive ) you will feel more  motivated and eventually become passionate about what you do.

All this reminds me of a TED talk I saw a couple months ago about forcing yourself to do things at first:  (I highly recommend it)

CSS Animation Methods

There are 2 popular ways to use CSS animations

“animation-name” Method: (The animation will happen as soon as you load)

Use -webkit-animation-name: Something;

Sample code:

#ID_HERE {
-webkit-animation-name: moveright;
-webkit-animation-duration: 1s;
-webkit-animation-fill-mode: forwards;
}

@-webkit-keyframes moveright
{
0% {
right: 200px;
}
100% {
left: 200px;
}
}

**Usually, if you don’t describe an end state for your webkit animation it will go back to its original state, to avoid this use animation fill mode:

https://developer.mozilla.org/en-US/docs/CSS/animation-fill-mode

“transition” method: (Use this method if you want to initiate the animation after an action)

From the W3schools example:

div
{
width:100px;
height:100px;
background:red;
transition:width 2s;
-webkit-transition:width 2s; /* Safari */
}

div:hover
{
width:300px;
}

In this case, the transition will ONLY happen during the hover, the “webkit-transition” method WILL NOT allow you to activate it onload, in this case it is better to use the ‘webkit-animation-name’ way.

More About CSS3 Transitions:

http://css3.bradshawenterprises.com/transitions/

Of course, you can also use jQuery for the animation but it is very taxing to use the DOM, the CSS way is A LOT faster because it will leverage the GPU.

Git 101 – An intro to Git

What is Git?

According to Wikipedia “Git is a free distributed revision control, or software source code management project with an emphasis on being fast”. The main principal behind git is fast and parallel development. What does this all mean? First off, Git is not a concept, or a best practice it’s actually a piece of software(like a text editor) used for development and it manages your source code.

Git is associated with “revision control”, the idea is that it’s a good idea to keep a historical snapshot of your coding projects. This is a good idea so that you can have multiple backups of your code in case something goes awry.

Git is completely used in the command line, so it’s a good idea that a user be somewhat fluent to the basics of the command line(Mac terminal). I wrote a seperate blog post about the basics of mac terminal in case you need some review.

Git “Lingo/Jargon”

Repo: A repo is short for “repository”, which is the project folder where your code lies

commit: A commit is a snapshot of your project at that specific instance

forking: Forking is the term used when you clone and use a project from github

branch: A branch is essentially a copy of the repo, you can thing of it as a safe sandbox that you can mess around and play with that has no serious consequences. A branch is typically used when fixing bugs or working on a new feature.

Getting started with Git

1. The first step is to create a “repo”
2. First create a project folder and navigate into that folder using cd inside the terminal. Use the “git init” command to initiate git
3. Once you’re in the repo you need to tell Git what to track, use the “git add .” command to track all changes (the period is used to track all). *In case you want to only track a specific file you can just point to the file name. For example git add index.html
4. Now it’s time to take a snapshot, to do this you use the “git commit” command. You can add a message by using the extension “-m your message here”
5.  FInally you can use git push to push your changes

Appendix: Good stuff to know

Branches:
git branch name_of_branch – This command creates a new branch for you
git branches- This tells you how many branches you have (the ‘*’ symbol will tell you which one you’re currently in)
git checkout master – This will take you back to the master branch
git checkout branch_name – Allows you to switch between multiple branches
merge name_of_branch – This allows you to merge the branch to the master.
git branch -d branch_name – This will delete the branch

git clone https://www.github.com/sample project – this will clone the source files to the current directory

git log – shows useful commit history information(who commited, messages, time,etc)

Quick Recap to push a repo:
git init
git add file.filetype
git commit -m “initial commit message”
git remote add origin https://github.com/user/repo_name.git
git push – u origin master

 

SQLite

 

The very first thing anyone should know about “SQLite” is that the “Lite” in SQLite does not refer to its capabilities or limitations. It’s just called “Lite” because the of its simple usage and “lite” size.

Benefits of SQLite:

  • Serverless – SQLite does not have a client/server relationship. The entire database is integrated into whatever application needs access to it.
  •  NO setup required – Unlike MySQL server setup, there is nothing you need to do server side when in comes to installation
  • Small runtime – should be self explanatory
  • uses dynamic-type system in SQLite (this means that data types aren’t restricted to any column/row e.g number, date, string,etc)

This simplicity makes it easy to use with smart phones, touch pads, etc where no traditional database system can reach.This works easily because SQLite is built right into the application itself.

Learning SQLite

SQLite is very easy to setup and easy to use. It also uses the core of SQL language and best of all it requires no server setup or administration.

You can download SQLite at: www.sqlite.org/download.html

Short comings to SQL Lite

-No real time replication

-Not ideal for extremely large datasets – because SQ Lite is 1 file if a large dataset is crunched into  1 file it may not be wise to use SQ Lite.

 

Believing in the ridiculous

Some time ago I did a post about Will Smith’s video and the common traits of success- one of them being that successful people are delusional.

I just read this, and I had to post it here. Not only is it inspiring, but it gives us the chance to get a glimpse inside the mind of a very accomplished person.
———————————————————————————————————–

Believe In “Ridiculous” Dreams…By Heavy D

Some years back there was a young, ambitious, tenacious young man who wanted to rule the world. This young man and I grew up in the same town. I was slightly older by a couple of years but I had already begun to realize my dreams. This young man reminded me a lot of myself.

1. He believed in himself when no one else would.

2. He often felt like an outcast and alone because there was nobody around that he could share his “RIDICULOUS” dreams with and because most people couldn’t see that far.

3. No one wanted to hang around this person because they found him either annoying or NUTZZZ!

4. He never quit, he never gave in to anyone’s opinion of him. He’d rather be alone than give up on his dream.

Damn, “That was me,” I said, that’s how I felt when I was coming into my own and striving to realize my dreams. I did sound crazy. I did feel alone. Hell, I was crazy and still am. I know what this brother is going through.

“From now on…” I said to him, “You can roll with me … tours, videos, studios, meetings. Just come hang out.” We became fast and close friends actually more like brothers than anything else. He called my mom “MOM” and I called his mom “MOM.” Till this day it remains so.

I helped this young brother without any expectations for myself. It was just so reminiscent of my endeavor and of my lonely dreams that I felt like I had to help him. Now, I didn’t know it at the time but I was mentoring this young brother. Again, for me it was just helping another brother out who wanted to do something bigger than anyone where we were from could realize.

We would sit for hours in my mom’s basement and talk so much sh** about what we would do with our first million dollars and the types of cars and houses we would buy. Today, I still laugh at the nerve we had. But that’s what it took. NERVE!!

Funny thing about “passion,” it will lead you directly to your dreams. So yes, I mentored this young man, albeit indirectly.

Today, this young man is one of the most powerful, hard working, famous people on the planet. He’s done things that I have never imagined doing myself. He is smart, shrewd, and still tenacious.

He has accomplished more than he and I ever discussed. He has gone on to create and even re-create some of the most recognizable brands and artists in the entertainment business.

He continues to break down barriers and change the game. Time and time again, he has faced adversity, criticism, hate, jealousy, ridicule and pain but he has always maintained his drive and his dream.

Today, he is now a mentor to many. And the irony is that he is even a mentor to me without him ever knowing it.

I am constantly inspired by this brother. I reflect sometimes on our many conversations as “dream chasers” and “outliers.”

I will never lay claim to the heights that he has brought himself to but I will say that if you or anyone you know has a “ridiculous” dream remember, it doesn’t take much to encourage someone to go for that dream and this brother is living proof.

I have another friend who told me a great quote. Allow me to share it with you.

“BEING REALISTIC IS THE MOST COMMONLY TRAVELED ROAD TO MEDIOCRITY”  -Will Smith

So, here I stand today proudly in the shadows of a true dreamer.

I salute you Mr. Sean “Diddy” Combs. And may you continue to dream, the “RIDICULOUS” dream…

BLESSINGS,

HEV

 

The importance of failure

The story goes that “Thomas Edison failed more than 1,000 times when trying to create the light bulb”. When asked about these failures,Edison allegedly said, “I have not failed 1,000 times.  I havesuccessfully discovered 1,000 ways to NOT make a light bulb.”

Here’s a more modern quote:
The very first company I started failed with a great bang. The second one failed a little bit less, but still failed. The third one, you know, proper failed, but it was kind of okay. I recovered quickly. Number four almost didn’t fail. It still didn’t really feel great, but it did okay. Number five was PayPal.”–Max Levchin

I once remember reading a book about someone interviewing a room pack of millionaires. He asked them how many times these people have failed before their first million. The average was fifteen, FIFTEEN major failures. Some succeeded with less failures and some with more, but on average fifteen.

I think for every entrepreneur that wants to succeed he or she must be willing to fail a couple times. In my mind, the biggest failure of all is giving up entirely after all that invaluable knowledge was gained through painful failure. This is why many entrepreneurs say persistence is key, because with every succession of failure you increase your odds of succeeding.

Below is a link of Vinod Khosla talking about the importance of failure and the Sillicon Valley culture of failure:

http://techcrunch.com/2011/10/25/keen-on-vinod-khosla-ive-failed-more-times-than-ive-succeeded-tctv/

Basics of SQL

It’s been a while since I touched databases. I was looking for some of the notes I made on SQL way back, but after about a couple minutes of not being able to find it, I just Googled my way to the basics that is essential to SQL.

Here are the essentials followed by some examples I made myself:

Selecting Data
select column1, column2, column3
from table name
where “condition” (e.g first LIKE, age > 24, etc)

Example:
SELECT First, Last, EmpID
FROM employinfo
WHERE age>30;

Creating Tables
CREATE  table name
(first varchar(15),
last var char (18),
empid number(5),
ssnum number (9) );

Datatypes:
char(size)
date
number (size) or number(size,d) where d is the digits to the right of decimal
varchar(size)

Updating:
UPDATE table name
SET columname = newname
WHEREcolumnar = previous name;

Example:
UPDATE employinfo
SET name = Josh
WHERE name = John

Delete:
DELETE from table name
WHERE column name = ‘value';

Example:
DELETE from employinfo
WHEREname = ‘Josh';

Being a Javascript master

With the surge of HTML5, Javascript has become a crucial part of development in general because of all the neat things you can do on a browser now. Javascript is probably one of the most dynamic language in the sense that it is constantly being improved with frameworks, shortcuts, etc. To really be good at Javascript one must be on top of everything Javascript.

I read a great post that has a list of WHO ‘s blog to check up on for the latest of javascript:

Here is a list of 30 developers who are in the fore front of Javascript:

http://net.tutsplus.com/articles/web-roundups/30-developers-you-must-subscribe-to-as-a-javascript-junkie/

The Basics of the Mac Terminal

Whenever dealing with web application frameworks like Django,
Ruby, etc. it's good to know your way around the Mac terminal
The basics of Mac Terminal

Most used commands:

cd - stands for change directory(e.g cd mysite) If a folder
called "my site" is within the directory it will change to
that specific directory

cp - copy files/directories

ls - list files and directories
(this will list all the files and subfolders of the current
within the current folder you're in)

mkdlr - creates a new directory

mv- move or rename files/ directories

pwd- stands for "present working directory". This will output
the path of the current directory

rm- remove files or directories (rm foldername or rm samplefile.txt)