While learning development, a beginner needs to cover lots of topics. As a beginner myself, I decided to track the useful resources in one place.
-
Why do we use $rootScope.$broadcast in AngularJS?
Using $broadcast we can create custom events. Using $rootScope directly is bad practice and we should create custom event handler service. -
AngularJS Interceptros for Logging Service Calls
Short and simple tutorial to adding interceptors to angularJS. -
Cookies vs Tokens. Getting auth right with Angular.JS
Using express-jwt module to authenticate routes and verifying tokens. Also, it has code on how to attach interceptors to angularjs requests. -
AngularJS Best Practices and Tips by Toptal Developers
How to set watchers, One time binding, making ng-click conditional and more. -
Angular Function Declarations, Function Expressions, and Readable Code
We spend more time reading our code than writing them. Using function declaration approach, we can keep our exposed variables at top and hide implementation below. -
Route Resolve and Controller Activate in AngularJS
Where to put the logic that populates variables of controller. Usingactivate()
vs route resolve. -
$scope vs scope
What's the difference between $scope in controller and scope in link function of directive. -
Accessing The View-Model Inside The Link Function When Using Controller-As In AngularJS
How to access controller from link function of directive. -
Insert HTML into View
HTML is rendered as text in {{}}. Need to use ng-bind-html after making it trusted using $sce. -
How to get dynamic content working in angularjs
When dynamic content is inserted using DOM manipulation, angular no longer watches them. We need to $compile them before adding.
- Vertical Align Columns in Row in BootStrap
The code snippet forv.center
works like a charm.
- Why can I execute code after
res.send
?
res.send()
simply closes the response. The function is free to continue as long as it does not attempt to call methods onres
. So, better to usereturn
where we want things to stop.
- HTML5 History API
Changing browser location without refreshing the full page.
- Choosing an HTTP Status Code — Stop Making It Hard What should be the http status code for a response?
-
Immediately-Invoked Function Expression (IIFE)
Beautiful explanation on how to use closure to create IIFE along with reasons why it has that particular syntax. -
Promise Anti Patterns
Lots of anti-patterns for Promise. -
How to Encode and Decode Strings with Base64 in JavaScript
Sometimes API sends their content base64 encoded, so decodnig them is necessary.
- Cross-reference (named anchor) in markdown
How to create table of contents and other cross-reference inside markdown.
- Checking if a document exists – MongoDB slow findOne vs find
Usingdb.find().limit(1)
is faster than usingdb.findOne()
. Oh well, I will still use findOne() since I don't need ultra optimization.
-
Authenticate a NodeJS API with JSON Web Tokens
A simple tutorial that shows how to use jsonwebtoken module to use JWT with API for authentication. -
Node.js, Require and Exports
NodeJS by default isolates codes inside a file from the global space. We need to usemodule.exports
explicitly to tell node what we want to share andrequire()
to get what we want. -
jsonwebtoken doesn't expire
Dumping user info in an object before signing does the trick.
-
How to Safely Store a Password
Emphasis on use of bcrypt for encrypting password. Using MD5, SH1 and others is not safe as they are fast and can be broken using brute force. bcrypt is safe cause it's slow. -
What are rainbow tables and how are they used?
Seems like there is a difference between Rainbow attack and Dictionary attack -
Why is using salt more secure?
Salt does not protect a single password. All it does, in case of leak of password database, is make it harder to use dictionary attack and crack multiple passwords in one go. -
Stealing JWT from authenticated user
What happens if someone steals JWT from browser and uses from someother place? -
Invalidating JSON Web Tokens
How to invalidate a JWT once user logs out. Some tips on logging out users safely. Keeping JWT expiry time short and regularly updating the token sounds good to me.
-
Unit testing with Karma and Jasmine for AngularJS
A simple tutorial on importance of testing from beginng. Suggested method for testing is to use Karma + Jasmine. -
The Difference Between TDD and BDD
I thought there would be significant difference. They seem same to me. BDD looks nice since it sounds like normal sentence.
- How to change bower's default components folder?
Basically, just set.bowerrc
file.
-
What is Grunt Wiredep?
Install with bower and then runninggrunt wiredep
will inject scripts and css into html file. -
The HUGE Grunt.js Guide to a Better Frontend Workflow (Part 1: Coding)
Little notes and codes for common grunt services used. -
<%= yeoman.app %> and <%=yeoman.dist %> variables for a gruntfile
What are those <%= yeoman.app %> variables inside grunt files?