Starting a personal node project could be easy; starting a team node project could be challenging.
I am a developer currently working in SEEK Australia.
In my experience, common mistakes developer make when starting a projects are:
- No Linting
Starting a personal node project could be easy; starting a team node project could be challenging.
I am a developer currently working in SEEK Australia.
In my experience, common mistakes developer make when starting a projects are:
| require 'rubygems' | |
| require 'httparty' | |
| resp = HTTParty.get("http://www.catfact.info//api/v1/facts.json?page=1&per_page=30") | |
| resp['facts'].each do |item| | |
| puts item.inspect | |
| end |
| require 'rubygems' | |
| require 'httparty' | |
| resp = HTTParty.get("http://www.catfact.info//api/v1/facts.json?page=1&per_page=30") | |
| resp['facts'].each do |item| | |
| puts item.inspect | |
| end |
| module ObjectTracker | |
| module ClassMethods | |
| def track_method(method_name) | |
| alias_method :"#{method_name}_without_tracking", method_name | |
| define_method :"#{method_name}_with_tracking" do |*splat| | |
| params = self.class.instance_method(:"#{method_name}_without_tracking").parameters.collect(&:last) | |
| self.send(:"#{method_name}_without_tracking", *splat) # do method first | |
| self.track_event!(method_name, Hash[*(params.zip(splat).flatten)]) # then track | |
| end | |
| alias_method method_name, :"#{method_name}_with_tracking" |
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't
| class API::V1::BaseController < ApplicationController | |
| skip_before_filter :verify_authenticity_token | |
| before_filter :cors_preflight_check | |
| after_filter :cors_set_access_control_headers | |
| def cors_set_access_control_headers | |
| headers['Access-Control-Allow-Origin'] = '*' | |
| headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS' |
| // ==UserScript== | |
| // @name GM_download emulation | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description emulate GM_download functionality | |
| // @require https://github.com/eligrey/FileSaver.js/raw/master/FileSaver.js | |
| // @match http://tampermonkey.net/empty.html | |
| // @grant GM_xmlhttpRequest | |
| // @copyright 2014, Jan Biniok | |
| // ==/UserScript== |