{"id":22131886,"url":"https://github.com/forthright48/learndev","last_synced_at":"2026-03-19T21:52:53.503Z","repository":{"id":136140667,"uuid":"47423969","full_name":"forthright48/learnDev","owner":"forthright48","description":"Useful resources of beginner developer.","archived":false,"fork":false,"pushed_at":"2015-12-15T06:54:42.000Z","size":12,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-29T14:50:24.212Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/forthright48.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-04T19:15:08.000Z","updated_at":"2021-12-25T11:29:18.000Z","dependencies_parsed_at":"2023-03-15T07:45:43.064Z","dependency_job_id":null,"html_url":"https://github.com/forthright48/learnDev","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forthright48%2FlearnDev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forthright48%2FlearnDev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forthright48%2FlearnDev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forthright48%2FlearnDev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forthright48","download_url":"https://codeload.github.com/forthright48/learnDev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245241019,"owners_count":20583145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T18:38:10.081Z","updated_at":"2026-01-04T18:42:56.177Z","avatar_url":"https://github.com/forthright48.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learning Development\n\nWhile learning development, a beginner needs to cover lots of topics. As a beginner myself, I decided to track the useful resources in one place.\n\n# AngularJS\n\n1. [Why do we use $rootScope.$broadcast in AngularJS?](http://stackoverflow.com/questions/24830679/why-do-we-use-rootscope-broadcast-in-angularjs/24831979#24831979)  \nUsing $broadcast we can create custom events. Using $rootScope directly is bad practice and we should create custom event handler service.\n\n1. [AngularJS Interceptros for Logging Service Calls](http://intown.biz/2015/02/04/angularjs-interceptors/)  \nShort and simple tutorial to adding interceptors to angularJS.\n\n1. [Cookies vs Tokens. Getting auth right with Angular.JS](https://auth0.com/blog/2014/01/07/angularjs-authentication-with-cookies-vs-token/)  \nUsing express-jwt module to authenticate routes and verifying tokens. Also, it has code on how to attach interceptors to angularjs requests.\n\n1. [AngularJS Best Practices and Tips by Toptal Developers](http://www.toptal.com/angular-js/tips-and-practices)  \nHow to set watchers, One time binding, making ng-click conditional and more.\n\n1. [Angular Function Declarations, Function Expressions, and Readable Code](http://www.johnpapa.net/angular-function-declarations-function-expressions-and-readable-code/)  \nWe 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.\n\n1. [Route Resolve and Controller Activate in AngularJS](http://www.johnpapa.net/route-resolve-and-controller-activate-in-angularjs/)  \nWhere to put the logic that populates variables of controller. Using `activate()` vs route resolve.\n\n1. [$scope vs scope](https://thinkster.io/a-better-way-to-learn-angularjs/scope-vs-scope)  \nWhat's the difference between $scope in controller and scope in link function of directive.\n\n1. [Accessing The View-Model Inside The Link Function When Using Controller-As In AngularJS](http://www.bennadel.com/blog/2896-accessing-the-view-model-inside-the-link-function-when-using-controller-as-in-angularjs.htm)  \nHow to access controller from link function of directive.\n\n1. [Insert HTML into View](http://stackoverflow.com/questions/9381926/angularjs-insert-html-into-view)  \nHTML is rendered as text in {{}}. Need to use ng-bind-html after making it trusted using $sce.\n\n1. [How to get dynamic content working in angularjs](http://stackoverflow.com/questions/11771513/angularjs-jquery-how-to-get-dynamic-content-working-in-angularjs)  \nWhen dynamic content is inserted using DOM manipulation, angular no longer watches them. We need to $compile them before adding.\n\n# BootStrap\n\n1. [Vertical Align Columns in Row in BootStrap](http://stackoverflow.com/questions/28077398/twitter-bootstrap-3-vertical-align-columns-in-a-row-middle)  \nThe code snippet for `v.center` works like a charm.\n\n# Express\n\n1. [Why can I execute code after `res.send`?](http://stackoverflow.com/questions/16180502/node-express-why-can-i-execute-code-after-res-send)  \n`res.send()` simply closes the response. The function is free to continue as long as it does not attempt to call methods on `res`. So, better to use `return` where we want things to stop.\n\n# HTML\n\n1. [HTML5 History API ](http://diveintohtml5.info/history.html)  \nChanging browser location without refreshing the full page.\n\n# HTTP\n\n1. [Choosing an HTTP Status Code — Stop Making It Hard](http://racksburg.com/choosing-an-http-status-code/)  What should be the http status code for a response?\n\n# JavaScript\n\n1. [Immediately-Invoked Function Expression (IIFE)](http://benalman.com/news/2010/11/immediately-invoked-function-expression/)  \nBeautiful explanation on how to use closure to create IIFE along with reasons why it has that particular syntax.\n\n1. [Promise Anti Patterns](http://taoofcode.net/promise-anti-patterns/)  \nLots of anti-patterns for Promise.\n\n1. [How to Encode and Decode Strings with Base64 in JavaScript](https://scotch.io/quick-tips/how-to-encode-and-decode-strings-with-base64-in-javascript)  \nSometimes API sends their content base64 encoded, so decodnig them is necessary.\n\n# JQuery\n\n1. [Automatic Table of Contents](https://css-tricks.com/automatic-table-of-contents/)\n\n# Markdown\n\n1. [Cross-reference (named anchor) in markdown](http://stackoverflow.com/questions/5319754/cross-reference-named-anchor-in-markdown/7335259#7335259)  \nHow to create table of contents and other cross-reference inside markdown.\n\n# MongoDB\n\n1. [Checking if a document exists – MongoDB slow findOne vs find](https://blog.serverdensity.com/checking-if-a-document-exists-mongodb-slow-findone-vs-find/)  \nUsing `db.find().limit(1)` is faster than using `db.findOne()`. Oh well, I will still use findOne() since I don't need ultra optimization.\n\n# Node.js\n\n1. [Authenticate a NodeJS API with JSON Web Tokens](https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens)  \nA simple tutorial that shows how to use jsonwebtoken module to use JWT with API for authentication.\n\n1. [Node.js, Require and Exports](http://openmymind.net/2012/2/3/Node-Require-and-Exports/)  \nNodeJS by default isolates codes inside a file from the global space. We need to use `module.exports` explicitly to tell node what we want to share and `require()` to get what we want.\n\n1. [jsonwebtoken doesn't expire](http://stackoverflow.com/questions/28874915/jsonwebtoken-doesnt-expire)  \nDumping user info in an object before signing does the trick.\n\n# Security\n\n1. [How to Safely Store a Password](http://codahale.com/how-to-safely-store-a-password/)  \nEmphasis 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.\n\n1. [What are rainbow tables and how are they used?](http://security.stackexchange.com/questions/379/what-are-rainbow-tables-and-how-are-they-used)  \n  Seems like there is a difference between Rainbow attack and Dictionary attack\n\n1. [Why is using salt more secure?](http://security.stackexchange.com/questions/14025/why-is-using-salt-more-secure)  \nSalt 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.\n\n1. [Stealing JWT from authenticated user](https://ask.auth0.com/t/stealing-jwt-from-authenticated-user/352)  \nWhat happens if someone steals JWT from browser and uses from someother place?\n\n1. [Invalidating JSON Web Tokens](http://stackoverflow.com/questions/21978658/invalidating-json-web-tokens/23089839#23089839)  \nHow 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.\n\n# Testing\n\n1. [Unit testing with Karma and Jasmine for AngularJS](https://blog.logentries.com/2015/01/unit-testing-with-karma-and-jasmine-for-angularjs/)  \nA simple tutorial on importance of testing from beginng. Suggested method for testing is to use Karma + Jasmine.\n\n1. [The Difference Between TDD and BDD](https://joshldavis.com/2013/05/27/difference-between-tdd-and-bdd/)  \nI thought there would be significant difference. They seem same to me. BDD looks nice since it sounds like normal sentence.\n\n# Tools\n\n## Bower\n\n1. [How to change bower's default components folder?](http://stackoverflow.com/questions/14079833/how-to-change-bowers-default-components-folder)  \nBasically, just set `.bowerrc` file.\n\n## Grunt\n\n1. [What is Grunt Wiredep?](http://stephenplusplus.github.io/grunt-wiredep/)  \nInstall with bower and then running `grunt wiredep` will inject scripts and css into html file.\n\n1. [The HUGE Grunt.js Guide to a Better Frontend Workflow (Part 1: Coding)](https://blog.srcclr.com/huge-grunt-js-guide-better-frontend-workflow/)  \nLittle notes and codes for common grunt services used.\n\n1. [\u003c%= yeoman.app %\u003e and \u003c%=yeoman.dist %\u003e variables for a gruntfile](http://stackoverflow.com/questions/21420593/yeoman-app-and-yeoman-dist-variables-for-a-gruntfile)  \nWhat are those \u003c%= yeoman.app %\u003e variables inside grunt files?\n\n# Uncategorized\n\n1. [Top 18 Most Common AngularJS Mistakes That Developers Make](http://www.toptal.com/angular-js/top-18-most-common-angularjs-developer-mistakes)  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforthright48%2Flearndev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforthright48%2Flearndev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforthright48%2Flearndev/lists"}