- Dec 2019
-
github.com github.com
-
This is a browser execution environment. It may provide additional built in objects exposed in the global namespace. It is a specialized execution environment which provides builtin capabilities beyond the base javascript language spec.
-
This is a non-dom based javascript execution environment. It usually only contains the base javascript language spec libraries and objects along with modules to communicate with OS features (available through commonjs require).
-
The use of a bundler to create a file(s) suitable for running on a client.
-
It allows the module code (and subsequently dependants on the module) to not use preprocessor hacks, source code changes, or runtime detection hacks to identify which code is appropriate when creating a client bound package.
-
The browser field is where the module author can hint to the bundler which elements (other modules or source files) need to be replaced when packaging.
-
When a javascript module is prepared for use on a client there are two major concerns: certain features are already provided by the client, and certain features are not available. Features provided by a client can include http requests, websockets, dom manipulation. Features not available would include tcp sockets, system disk IO.
-
You can simply prevent a module or file from being loaded into a bundle by specifying a value of false for any of the keys. This is useful if you know certain codepaths will not be executed client side but find it awkward to split up or change the code structure.
-
-
master.neutrinojs.org master.neutrinojs.org
-
Various test runners support using compiled webpack code to drive tests, but may be difficult to integrate with webpack, and Neutrino helps alleviate this
-
-
github.com github.com
-
tap
First sighting. Kind of like Ruby's tap.
-
-
-
neutrinojs.org neutrinojs.org
-
Create and build modern JavaScript applications with zero initial configuration
-
- Nov 2019
-
stackoverflow.com stackoverflow.com
-
const setRefs = useRef(new Map()).current; const { children } = props; return ( <div> {React.Children.map(children, child => { return React.cloneElement(child, { // v not innerRef ref: node => { console.log('imHere'); return !node ? setRefs.delete(child.key) : setRefs.set(child.key, node)
Illustrates the importance of having unique keys when iterating over children, since that allows them to be used as unique keys in a Map.
-
-
Tags
Annotators
URL
-
-
www.youtube.com www.youtube.com
-
reasonml.github.io reasonml.github.io
-
Reason compiles to JavaScript thanks to our partner project, BuckleScript, which compiles OCaml/Reason into readable JavaScript with smooth interop. Reason also compiles to fast, barebone assembly, thanks to OCaml itself.
-
-
reasonml.github.io reasonml.github.io
-
We've worked very hard to make Reason look like JS while preserving OCaml's great semantics & types.
-
-
github.com github.com
-
legacy.reactjs.org legacy.reactjs.org
-
return class extends React.Component {
Cool! anonymous/unnamed classes used here
Tags
Annotators
URL
-
-
reactjs.org reactjs.org
-
React guarantees that setState function identity is stable and won’t change on re-renders. This is why it’s safe to omit from the useEffect or useCallback dependency list.
-
-
stackoverflow.com stackoverflow.com
-
Since the checkbox is rendering an input I would work with it rather than focusing on the image. You could do something like this: const checkbox = getByTestId('checkbox-1234').querySelector('input[type="checkbox"]') expect(checkbox).toHaveProperty('checked', true)
-
the way Material UI works is it renders a different SVG when the checkbox is clicked, and not changing the attributes or anything on the actual input element. So how do I actually test that the element is checked in line with the react-testing-library philosophy?
These tags belong to entire page. This quote is just supporting evidence for the tags.
-
-
survivejs.com survivejs.comPreface1
-
survivejs.com survivejs.com
-
-
roylee0704.github.io roylee0704.github.io
-
github.com github.com
-
Tests implementation details a bit (child component props received), but pretty good other than that.
https://www.robinwieruch.de/react-testing-tutorial, for example, says that is reasonable to do:
an integration test could verify that all necessary props are passed through from the tested component to a specific child component.
-
-
developer.mozilla.org developer.mozilla.orgwith1
-
Using with is not recommended, and is forbidden in ECMAScript 5 strict mode. The recommended alternative is to assign the object whose properties you want to access to a temporary variable.
-
-
jestjs.io jestjs.io
-
github.com github.com
-
I don't recommend unit testing stateful components, or components with side-effects. Write functional tests for those, instead, because you'll need tests which describe the complete end-to-end flow, from user input, to back-end-services, and back to the UI. Those tests frequently duplicate any testing effort you would spend unit-testing stateful UI behaviors. You'd need to do a lot of mocking to properly unit test those kinds of components anyway, and that mocking may cover up problems with too much coupling in your component.
-
-
github.com github.com
-
Although this page only mentions using with Jest, you can use it without Jest: https://testing-library.com/docs/react-testing-library/setup#using-without-jest
-
-
testing-library.com testing-library.com
-
This library is a replacement for Enzyme.
-
-
www.valentinog.com www.valentinog.com
-
gist.github.com gist.github.com
-
github.com github.com
-
github.com github.com
-
jestjs.io jestjs.io
-
-
medium.com medium.com
-
The amount of dev time it saves is uncanny. Like, what used to take 3 hours to write now takes like 30 minutes. No joke.
-
-
-
www.npmjs.com www.npmjs.comts-mocha1
-
airbnb.io airbnb.io
- Oct 2019
-
reacttraining.com reacttraining.com
-
"Element" SelectorsEach component has a data-reach-* attribute on the underlying DOM element that you can think of as the "element" for the component.
-
-
www.typescriptlang.org www.typescriptlang.org
-
In TypeScript, we can also set a value that a parameter will be assigned if the user does not provide one, or if the user passes undefined in its place.
-
buildName(undefined, "Adams")
-
If a default-initialized parameter comes before a required parameter, users need to explicitly pass undefined to get the default initialized value.
-
-
stackoverflow.com stackoverflow.com
-
There are many strings which I need to convert if not undefined. I could do as follows: { date1: date1 ? formatISODate(date1) : undefined, date2: date2 ? formatISODate(date2) : undefined ...
-
-
microsoft.github.io microsoft.github.io
-
typeof type guards
-
-
stackoverflow.com stackoverflow.com
-
Try to avoid mucking with native prototypes, including Array.prototype, if you don't know who will be consuming your code (3rd parties, coworkers, yourself at a later date, etc.). There are ways to safely extend prototypes (but not in all browsers) and there are ways to safely consume objects created from extended prototypes, but a better rule of thumb is to follow the Principle of Least Surprise and avoid these practices altogether.
-
He's not messing with them he's extending them for Arrays.
-
-
github.com github.com
- Sep 2019
-
github.com github.com
-
suitcss.github.io suitcss.github.io
-
github.com github.com
-
codesandbox.io codesandbox.io
-
stackoverflow.com stackoverflow.com
-
There is a new specification which is called a dynamic import for ES modules.
-
-
github.com github.com
-
developer.mozilla.org developer.mozilla.orgimport1
-
Tags
Annotators
URL
-
-
developer.mozilla.org developer.mozilla.org
-
forEach() loop other than by throwing an exception. If you need such behavior, the forEach() method is the wrong tool. Early termination may be accomplished with:
-
-
stackoverflow.com stackoverflow.com
-
Object.filter = (obj, predicate) => Object.fromEntries(Object.entries(obj).filter(predicate))
-
-
stackoverflow.com stackoverflow.com
-
Object.fromEntries = arr => Object.assign({}, ...arr.map( ([k, v]) => ({[k]: v}) ));
-
Using reduce and Object.keys As (1), in combination with Object.assign Using map and spread syntax instead of reduce Using Object.entries and Object.fromEntries
-
- Aug 2019
-
stackoverflow.com stackoverflow.com
-
const list = [].concat(x);
-
-
developer.mozilla.org developer.mozilla.org
-
The parentheses ( ... ) around the assignment statement are required when using object literal destructuring assignment without a declaration. {a, b} = {a: 1, b: 2} is not valid stand-alone syntax, as the {a, b} on the left-hand side is considered a block and not an object literal.
-
Your ( ... ) expression needs to be preceded by a semicolon or it may be used to execute a function on the previous line.
-
-
blog.logrocket.com blog.logrocket.com
-
({ theme = 'secondary', label = 'Button Text', ...restProps })
-
-
stackoverflow.com stackoverflow.com
-
props parameters and assign default values directly:
-
-
github.com github.com
-
Null Coalescing Operator
-
-
github.com github.com
-
cssinjs.org cssinjs.orgJSS1
Tags
Annotators
URL
-
-
github.com github.com
Tags
Annotators
URL
-
-
emotion.sh emotion.sh
-
@emotion/core
-
-
material-ui.com material-ui.com
-
Explore the documentation theme object:
-
-
github.com github.com
-
www.youtube.com www.youtube.com
-
.
Tags
Annotators
URL
-
- Jul 2019
-
dev.to dev.to
-
However using the proposed syntax it's easy to see how big components could have logic broken up into smaller reusable pieces, moved into separate files if necessary, leaving you with small, easy-to-understand functions and components.
Benefits are evident and good, imho. A big improvement in code organization and separation of concerns.
Just, I think the new syntax suffers from the loss of, as you said, that easy-to-understand-separation-by-type, that is appealing and clearer to newcomers and people that deal with pretty simple components. The component code is divided in three different sections (State, Computed, Methods) that are easy to scroll and to keep conceptually segregated.
That's one appealing aspect for beginners, helping them to grab the main concepts and organization of Vue. Also helps giving some simpler view to who not too confident with JS and its patterns. With this "separation by function" the beginner is more disoriented since has to import state & computed as functions to place in specific points. Places that they need to know/remember, rather than just filling up the three object provided in module.exports (and I suppose there are packages that build a basic .vue template for you; maybe vue-cli itself too, that people get used to blindly use).
So in the end the new syntax gives in my opinion a lot more power in modelling, but requires to accept some compromises with the somehow more verbose syntax (const everywhere; return & export providing private/public but necessarily longer to write) and with the slightly higher shadiness of its main concepts.
Still, a good & efficient & clear documentation, as it was on Vuejs.org until today, will for sure easily compensate to these drawbacks and bring the most out of this new -more OOP- approach. For me also class could be use here, but I like trying to stay compatible using the prototypical approach (maybe also less overhead? Dunno, I'm not so deeply in the JS world).
I am actually pretty curious to see how it is gonna evolve. And I am glad I didn't engage with Vue too much yet... 😜
Tags
Annotators
URL
-
-
zh-hans.reactjs.org zh-hans.reactjs.org
-
[a, b, c] = lines[i];
ES6的解构赋值
-
- May 2019
-
javascript.info javascript.info
-
The document object gives access to the page content
note: page content, not other functional areas of the browser. Read on to see other parts of the browser.
Tags
Annotators
URL
-
- Jan 2019
-
urbigenous.net urbigenous.net
-
“I see. You’ve been starting at AAAAAAA... and working up to ZZZZZZZZ....” “Exactly — though we use a special alphabet of our own. Modifying the electromatic typewriters to deal with this is, of course, trivial. A rather more interesting problem is that of devising suitable circuits to eliminate ridiculous combinations. For example, no letter must occur more than three times in succession.” “Three? Surely you mean two.” “Three is correct: I am afraid it would take too long to explain why, even if you understood our language.”
Andrew Oakley actually wrote a Javascript program to do exactly what the monk was asking Dr. Wagner on the day that Arthur C. Clarke died (March 19, 2008). The site of course has a disclaimer if you decide to run the program to completion: "USE OF THIS PROGRAM IS AT YOUR OWN RISK. I WILL NOT ACCEPT ANY LIABILITY FOR THE CONSEQUENCES SHOULD YOU ALLOW THIS PROGRAM TO RUN TO COMPLETION." See: http://www.aoakley.com/articles/2008-03-19.php
-
- Sep 2018
-
-
Javascript
This is a public note. Javascript FTW
-
-
nolanlawson.com nolanlawson.com
-
It's important to understand that in the Event Loop there are Tasks & Microtasks. The Microtask queue is exhausted before returning to the Task queue - and Microtasks can queue other Microtasks, hance why the for loop in this example will block any other execution.
-
- Aug 2018
-
gist.github.com gist.github.com
-
-
Such behavior means that errors might be visible somewhere in the user interface, or maybe, when some operation is performed on the wrong value, but not at the moment when the real typo occurred.
错误会等到它发作的时候才会显现, 而不是在它被定义或编译的时候。 这为错误的排查提供了障碍。
-
- Jul 2018
-
www.educative.io www.educative.io
-
.
That's the key point
-
-
www.hacksparrow.com www.hacksparrow.com
-
-
-
Strings, like all primitives, are immutable. For example concat() doesn’t modify the existing string but creates a new one.
Important!
-
-
developer.mozilla.org developer.mozilla.org
-
filter() does not mutate the array on which it is called
Array.filter() is therefore pure.
-
- Jun 2018
-
github.com github.com
Tags
Annotators
URL
-
- May 2018
-
artillery.io artillery.io
-
-
www.toptal.com www.toptal.com
-
(the extra + before the first "2" is treated as a unary operator). Thus, JavaScript converts the type of "2" to numeric and then applies the unary + sign to it (i.e., treats it as a positive number).
-
function sum(x) { if (arguments.length == 2) { return arguments[0] + arguments[1]; } else { return function(y) { return x + y; }; } }
this combines 'regular' access of function arguments (shown in usage of argument 'x') and using 'arguments' array, in parallel. nice
-
order of operations
operator precedence in JS: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence
-
Then, "12" + "2" yields "122"
probably, since operator precedence is the same across all statement, its performed from left to right with no 'jumps' to preform some operations earlier than others
-
Since one of the operands ("2") is a string, JavaScript assumes it needs to perform string concatenation and therefore converts the type of 1 to "1"
this is a basic rule when it needs to decide if coercing of an operand is needed
-
This behavior also argues for following the convention of placing an opening curly brace at the end of a line in JavaScript, rather than on the beginning of a new line. As shown here, this becomes more than just a stylistic preference in JavaScript.
I was on the righteous side all those years! Yey!
Tags
Annotators
URL
-
-
developer.mozilla.org developer.mozilla.org
-
The reversed array.
Important - it returns a reference to the original array, which is reversed too (as noted in the example above). Its crucial to understand to prevent bugs...
-
- Mar 2018
-
blog.jonudell.net blog.jonudell.net
-
This selection tool has nothing intrinsically to do with annotation. It’s job is to make your job easier when you are constructing a link to an audio or video segment.
I'm reminded of a JavaScript tool written by Aaron Parecki that automatically adds a start fragment to the URL of his page when the audio on the page is paused. He's documented it here: https://indieweb.org/media_fragment
-
- Jan 2018
- Dec 2017
-
github.com github.com
-
Elm architecture in plain JavaScript
-
- Nov 2017
-
www.tryxapi.com www.tryxapi.com
-
JavaScript widgets create simple graphs to quickly and concisely display activity by exhibit and by student
Wonder if these were custom-made or if they relate to other initiatives.
-
- Sep 2017
-
developer.mozilla.org developer.mozilla.org
-
An object is an iterator when it knows how to access items from a collection one at a time, while keeping track of its current position within that sequence. In JavaScript an iterator is an object that provides a next() method which returns the next item in the sequence. This method returns an object with two properties: done and value.
description of
iterator
in ES2015
-
- Jul 2017
-
developers.google.com developers.google.com
-
For notifying the user of events (e.g. calendaring sites), the Notifications API should be used.
That is a heck of a large privilege to grant a site just so it can avoid showing you a popup on the page itself.
-
-
-
And again, this is just checking client-side, third-party JavaScript libraries for known vulnerabilities.
Which is why this needs to be taken with a grain of salt. These numbers are frightening until you realize how little impact the actual vulnerable parts of code are going to have on most websites.
Of the jQuery vulnerabilities linked, 4 are XSS attacks and 1 is a denial of server attack against sites that use jQuery to compile templates on the server.
In all cases, the site is only vulnerable to the extent that it accepts user input and uses it either serverside or clientside across multiple users.
Do you really think that all of these libraries are doing that? Absolutely, some of them are. But most sites are using jQuery because they don't know how
document.querySelectorAll
works, not because they're loading user-submitted comments from a server.
-
- Jun 2017
-
-
Examples of other similar JavaScript DI frameworks:
A useful list of dependency injection frameworks for JS. From what I've seen of the packages listed here:
BottleJS looks like the simplest and least demanding in terms of JS engine features.
InversifyJS is heavily orientated towards TypeScript and assumes use of decorators, reflect-metadata etc.
Inverted is unmaintained and the link 404s.
I haven't yet looked at WireJS or Mocktail.
-
-
-
"Lazy", "stale", "reactive". Lots of buzzwords.
Here's a simple explanation for the
fullName
/nickName
magic (fullName
stops being watched ifnickName
exists):On every component
render
,Mobx
registers all the attributes they've accessed onstate
, so it will trigger aforceUpdate
on them whenever one of these attributes change.If at one
render
(when there's anickname
) some attribute is not accessed (fullName
), the MobX will not register an access on that attribute, so subseqüent changes of that attribute will not triggerforceUpdate
s anymore.If for some reason that attribute (
fullName
) is accessed ever again (either due tonickName
ceasing to exist or due to some other internal component logic) that value is simply given to the component and it starts to be observed again and to triggerforceUpdate
s again on that component.
-
- May 2017
-
github.com github.com
-
"who's the target of the assignment (LHS)" and "who's the source of the assignment (RHS)".
LHS is looking for the target of that assignment whiel RHS is looking for the source!
-
- Apr 2017
-
medium.freecodecamp.com medium.freecodecamp.com
-
JavaScript's var, let, const, and variable hoisting.
-
- Mar 2017
-
aurelia.io aurelia.io
-
All views use standards-based HTML templates
Aurelia's standards focus means our code stays relevant down the road.
-
One of the strengths of Aurelia is that you can write so much of your application in vanilla JS.
By sticking close to standards, such as upcoming EcmaScript features, Aurelia code prepares for us for the future. It encourages writing code that will be relevant 2-5 years from now, or perhaps beyond.
-
Separation of Concerns is great for developer/designer collaboration, maintainability, architectural flexibility, and even source control.
This is a good reason why templates and logic files can be kept separate.
-
- Feb 2017
- Jan 2017
-
resilientwebdesign.com resilientwebdesign.com
-
Anyone using that older browser should have access to the same content as someone using the latest and greatest web browser. But that doesn’t mean they should get the same experience. As Brad Frost puts it: There is a difference between support and optimization. Support every browser ...but optimise for none.
This is why HTML (content) must be separated from CSS (layout) and javascript (interactivity). Content is the core functionality. CSS are displayed through progessive enhancement.
Tags
Annotators
URL
-
-
resilientwebdesign.com resilientwebdesign.com
-
hover effects
javascript hack included in CSS later
-
required fields
javascript hack included in HTML later
Tags
Annotators
URL
-
- Dec 2016
-
www.codecademy.com www.codecademy.com
-
SX is a syntax extension for JavaScript. It was written to be used with React. JSX code looks a lot like HTML.
JSX
-
- Nov 2016
-
-
Interesting dive into how string slicing with
String#substring
is implemented in the Dart and V8 VMs and the performance consequences of that. This investigation was prompted by poor performance of a port ofless.js
lexer to Dart vs. the original JS implementation.The article ends with benchmarks showing the cost of trying to match sequences of characters in a lexer using a regex vs. manually.
-
A person with a bit more insight into RegExp features might come up with the following optimization:
Neat trick for matching regular expressions within a string starting at a fixed position using pre-ES6 features:
- Create a regex with the global flag set which matches
pattern|()
where()
is an irrefutable pattern which is guaranteed to match - Set
regex.lastIndex
to the position you want to match at - Use
regex.exec(str)
- Create a regex with the global flag set which matches
-
match can be easily implemented in any modern JavaScript interpreter that supports sticky RegExp flag introduced in ES6:
Notes on how to match a regex starting at a given position in a string, making use of the sticky flag introduced in ES6.
-
-
vorlonjs.io vorlonjs.io
-
Vorlon.JS is a tool for remotely debugging JavaScript on any device. Use involves running a Vorlon debugging server on the machine hosting the web service and adding a script tag containing the client runtime to the page that you want to debug.
Tags
Annotators
URL
-
- Sep 2016
-
github.com github.com
-
Reusing an object with a reset function is much faster than declaring a new object with new
Better insert a reset function than declare a new object!
-
- Aug 2016
-
davidwalsh.name davidwalsh.name
-
Libraries like jQuery are useful because they hide the ugly details of dealing with cross-browser differences in JS engines. But these OO-helper libraries are different: they're going to great lengths to hide the true nature of JavaScript's OO mechanisms, instead masking them in a set of patterns that are more familiar to other languages.
Tags
Annotators
URL
-
-
-
How it’s implemented doesn’t matter at all unless it’s implemented poorly.The only thing that matters in software development is that your users love the software.
-
- Jul 2016
-
eloquentjavascript.net eloquentjavascript.net
-
break case catch class const continue debugger default delete do else enum export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof var void while with yield
Reserved JavaScript keywords.
-
You should imagine variables as tentacles, rather than boxes. They do not contain values; they grasp them
Nice metaphor!
-
-
eloquentjavascript.net eloquentjavascript.net
-
There is only one value in JavaScript that is not equal to itself, and that is NaN
-
The string has to stay on a single line.
Use escape characters for new lines, not <enter> key.
Tags
Annotators
URL
-
- May 2016
-
daringfireball.net daringfireball.net
-
JavaScript has brought the web to the brink of ruin
Though it makes sense in context, the anti-JS sentiment can create new divides.
-
-
-
Savings Total
Dropdown arrow needs functionality
-
- Apr 2016
-
medium.com medium.com
-
Good update on the state of React circa April 2016
-
-
facebook.github.io facebook.github.io
-
Brief but useful contrast of Jest vs. Angular approaches to dependency injection.
The argument is that most code uses one implementation in production and one mock in testing and that using
require()
as the seam for inserting test doubles makes code easier to write than Angular's approach of implementing its own module system and DI container.
-
-
github.com github.com
-
Transcrypt, a Python to JavaScript transpiler.
Tags
Annotators
URL
-
-
www.npmjs.com www.npmjs.com
-
ESLint plugin that provides limited name checking of ES6 import usage
Tags
Annotators
URL
-
- Mar 2016
-
bugzilla.mozilla.org bugzilla.mozilla.org
-
These tests are not evil enough
Tags
Annotators
URL
-
-
github.com github.com
-
Very interesting thread with a discussion on how to improve handling of effects in Redux and make Redux applications composable ala. the Elm Architecture.
Redux Loop looks like a very interesting take on supporting the Elm arch with the current version of Redux
Tags
Annotators
URL
-
- Feb 2016
-
hughfdjackson.com hughfdjackson.com
-
Useful deep-dive into ES2015 arrow functions, with actual references to the specs.
-
-
www.sitepoint.com www.sitepoint.com
-
A useful (2015) recent comparison of different JavaScript linting tools.
The TL;DR is that the recommendation is to use ESLint as it is widely used, supports ES6 well and provides a decent combination of configurability and presets.
-
-
groups.google.com groups.google.com
-
ES6 performance sucks! Strong mode is a mode for ES6, you cannot use it without using various ES6 features. However, idiomatic ES6 code currently is substantially slower than ES5, across all browsers -- easily by 2x, often by 10x or more. Due to the sheer size of ES6, plus a number of unfortunate design choices, it will likely take years until implementations catch up with ES5 optimisations, and the hundreds of man years that went into those. Until then, strong mode is not going to be an attractive target
Oh dear, "unfortunate design choices" sound ominous.
-
-
inversify.io inversify.io
-
I'm not sure I like the requirement to use classes but some interesting notes on dependency injection for JS
-
-
rjzaworski.com rjzaworski.com
-
window.fetch('/api/v1/users')
Just
fetch()
also seems to work. -
Testing API requests from window.fetch
Sinon.js's
fakeServer
works forXMLHttpRequest
but not forwindow.fetch()
. Instead,window.fetch()
is really easy to stub withsinon.stub()
.
-
- Jan 2016
-
github.com github.com
-
Tutorial on new features of JavaScript in ES6.
Tags
Annotators
URL
-
-
github.com github.com
Tags
Annotators
URL
-
-
-
Statements, line breaks, semicolons, and ASI (automatic semicolon insertion) in JavaScript.
More detail here:<br> http://inimino.org/~inimino/blog/javascript_semicolons
-
- Dec 2015
-
medium.com medium.com
-
This is an interesting opinion piece on the difficulties that newcomers have with the React ecosystem and the problems with the lack of a central guidelines about which pieces to use and how to tie them altogether.
I don't think it applies to just React though - choices around testing frameworks, build tools, languages etc. apply regardless of which framework you are using.
-
-
javascriptair.com javascriptair.com
-
Video discussion of the Babel JavaScript transpiler.
-
-
-
In-browser JavaScript VM and debugger.<br> https://github.com/amasad/debugjs
Make Flow Visible from Bret Victor's Learnable Programming implemented with debug.js
-
- Nov 2015
-
medium.com medium.com
-
“Many random number generators in use today are not very good. There is a tendency for people to avoid learning anything about such subroutines; quite often we find that some old method that is comparatively unsatisfactory has blindly been passed down from one programmer to another, and today’s users have no understanding of its limitations.”— Donald Knuth; The Art of Computer Programming, Volume 2.
Mike Malone examines JavaScript's Math.random() in v8, argues that the algorithm used should be replaced, and suggests alternatives.
-
- Oct 2015
-
jlongster.com jlongster.com
-
Great article on the state of immutable data structures in JS and using them with React and Redux
-
- Sep 2015
-
google.github.io google.github.io
-
@private global variables and functions are only accessible to code in the same file.
This is largely obsolete with CommonJS modules. TypeScript goes further and adds class-private variables.
-
- Aug 2015
-
www.cheatography.com www.cheatography.com
-
@interfaceFunction is interface (no new)
Use this to document abstract classes in JSDoc
-
-
modernweb.com modernweb.com
-
One way to be sure that you are using state of the art techniques is to use a scaffolding tool when building new apps/packages. With a scaffolding tool you can also get help when upgrading an existing project that has already been generated with the tool. The most popular scaffolding tool today is Yeoman and it has a huge amount of project generators. To save time when setting up new projects I decided to create a Yeoman generator of my own – generator-klei which is a MEAN stack (MongoDB, ExpressJS, AngularJS and NodeJS) app generator. At first it was a great experience and I was really satisfied with the generator, that was until it had to be maintained.
-
In the world of web development today it’s hard to stay updated with the ever increasing amount of new modules, libraries and packages that are released each day. What’s hot today can be forgotten tomorrow.
Slush – A Better Web App Scaffolding Tool
-
- Jul 2015
-
www.venturesity.com www.venturesity.com
-
Up for a Challenge?
Do you have what it takes? Signup on www.venturesity.com and unlock opportunities.
-
- Mar 2015
-
www.bloomberg.com www.bloomberg.com
-
Angular Style Guide: A starting point for Angular development teams to provide consistency through good practices.
This is a fantastic and very detailed AngularJS style/best practices guide. Used by hypothesis/h.
-
- Feb 2015
- Jan 2015
-
www.toptal.com www.toptal.com
-
variables and functions declared inside of an eval() statement are not created in the containing scope
this is one point. basically eval will create it's own scope, it may still have access to containing scope, but it won't overwrite conaining loop?
-
so what's the guidance to use float number in Javascript.
-
function foo2() { return { bar: "hello" }; }
this is really hard to detect.
-
Throws error on invalid usage of delete. The delete operator (used to remove properties from objects) cannot be used on non-configurable properties of the object. Non-strict code will fail silently when an attempt is made to delete a non-configurable property, whereas strict mode will throw an error in such a case.
in which case, it's useful?
-
Disallows duplicate property names or parameter values.
-
Prevents accidental globals. Without strict mode, assigning a value to an undeclared variable automatically creates a global variable with that name. This is one of the most common errors in JavaScript. In strict mode, attempting to do so throws an error.
this is most important one.
-
-
adodson.com adodson.com
-
A client-side Javascript SDK for authenticating with OAuth2 (and OAuth1 with a oauth proxy) web services and querying their REST API's. HelloJS standardizes paths and responses to common API's like Google Data Services, Facebook Graph and Windows Live Connect. It's modular, so that list is growing. No more spaghetti code!
javascript facebook client
Tags
Annotators
URL
-
- Jan 2014
-
www.elasticsearch.org www.elasticsearch.org
-
javascript web applications and elasticsearch
Good article on using ElasticSearch with JS
-
-
todomvc.com todomvc.comTodoMVC1
-
Developers these days are spoiled with choice when it comes to selecting an MV* framework for structuring and organizing their JavaScript web apps.
Cool project to help choose a framework, by building an app that uses each framework.
-
-
blog.stevensanderson.com blog.stevensanderson.com
-
Rich JavaScript Applications – the Seven Frameworks (Throne of JS, 2012)
Good summary of JS frameworks
-