740 Matching Annotations
  1. Sep 2015
    1. LESS (and now SASS as well) allow to use & within a single class name. There is no strict requirements on what should be the symbols before and after &. Thus, you can produce simple selectors instead of cascades.

      This is the approach I've started to take for H

    1. Harry Roberts also has a brilliant system for ensuring all CSS keeps to the right naming convention: he lints his CSS using scss-lint to ensure all team members stick to the convention correctly. As Harry put it, “It’s all well and good telling the team to use BEM, but it’s important to police it as well.

      Recommendation for a useful tool to enforce CSS class naming consistency

    2. “Use long, descriptive class names over short names that don’t document themselves.”

      And also when you have only crude tools for refactoring, this makes it easier to refactor CSS class names.

    3. In Yandex we usually separate styles per block, its modifiers, its elements and for their modifiers. But in reality it is very hard to support all these separations. That’s why in pet projects I and ex-Yandexers support a one-file-per-block structure

      One "block" === a "component" in other terminology - as explained on the main BEM site, so this translates to one-file per component

    4. Some useful notes on experiences with BEM-style CSS at scale

    1. This is the main reason we end up with bloated code bases, full of legacy and unknown CSS that we daren't touch. We lack the confidence to be able to work with and modify existing styles because we fear the consequences of CSS' globally operating and leaky nature. Almost all problems with CSS at scale boil down to confidence (or lack thereof): People don't know what things do any more. People daren't make changes because they don't know how far reaching the effects will be.
    1. Spotlight search has always been a handy tool in iOS, helping you find things very quickly on your iOS device: a friend’s phone number, directions to a restaurant, or that important email that is somewhere in your inbox

      Spotlight integration on iOS looks to be a very useful thing to have. Should check whether something similar is possible on Android

    1. I'm invited to toggle the dropdown (which implies filtering) to Public. Do so. What does that mean in this context? Nothing.

      I expected the dropdown to filter the annotation list as well. The fact that it doesn't was surprising.

    1. If your timeline graph is dominated with the color green after recording

      Green is used to denote time spent painting

    2. there does not seem to be a general rule for how many workers to spawn. Some developers claim that 8 is a good number, but use an online calculator and suit yourself

      Web workers are very heavy objects as they include an entire JS VM instance. 8 sounds like a lot.

    1. The patterns described here appear to be what the H code is following at the moment, but note this comment where the author notes that they since abandoned the approach in favor of more pure modular CSS.

    1. Recommendations for how to structure blocks (ie. components) which fits in well with recommendations about how to structure components from other places.

    1. Potentially useful article discussing applying various methodologies for structuring CSS, particular in the context of React but likely relevant for any component-orientated system.

    1. This is an interesting history of web app and specifically component / styling development at Yandex and the evolution of the BEM methodology.

    1. Talk from ng-conf 2014 with advice on how to integrate Browserify and Angular, dealing with the fact that both have their own module systems.

    1. Useful overview (but note, from late 2013) of testing template rendering with Angular.

      This is something I'm not keen on - one approach to test directives, another to test controllers etc.

    2. After some research, I found karma-ng-html2js-preprocessor, a npm package that does the above, all from the karma configuration

      This is used in the H app, or at least referenced in package.json

    1. By compiling the element like we did in directive template testing, we can access the scope and start testing the publicly accessible methods right away.

      This is a non-obvious method but one that is used in some of our existing tests.

    2. First of all, you could simply register a controller on your module, and then use that as you normally would

      This sounds like a simple and obvious approach.

    3. Now, the problem is that the usual approach to controller testing is to instantiate the controller using $controller, but this fails since we do not have a named controller registered on our module

      This was the problem I ran into initially when writing a test for GroupsListController

    1. UPDATE 4/19/2015: The most current and detailed Angular Style Guide is the community-driven effort led by John Papa and Todd Motto, which you can find at https://github.com/johnpapa/angular-styleguide. Please use this instead of the one mentioned below.

      The link to the currently recommended style guide as of April 2015 is here

    1. While the example above is simple, it will not scale to large applications. Instead we recommend that you break your application to multiple modules like this:

      Recommendations on how to split an Angular app into separate modules

    1. The $scope that each Controller receives will have access to properties and methods defined by Controllers higher up the hierarchy.

      So a little like React context, except that React components have to explicitly specify which context properties they want to have available to them.

    2. The $digest loop keeps iterating until the model stabilizes

      cf. React where an event triggers an event handler, which can trigger state changes and calls to React.render(). These are then batched together resulting in a single re-render, a DOM-diff and the application of the result to the DOM. Consequently you can't have an infinite state update loop. The exception is if a state change happens asynchronously, and that state change triggers another async state change (and so on...)

    3. Key intro to the data-binding mechanics at the core of Angular, essential for understanding performance implications.

    4. Dirty checking the scope for property changes is a common operation in Angular and for this reason the dirty checking function must be efficient. Care should be taken that the dirty checking function does not do any DOM access, as DOM access is orders of magnitude slower than property access on JavaScript object.

      $watch takes two args, a value function and a listener. The value function returns the current value which is compared to the previous value. This is what is referred to by the dirty checking function.

    5. The debugger allows you to access the currently selected element in the console as $0 variable.
    6. currency:c

      Where is 'currency' defined?

    7. In Angular, the only place where an application should access the DOM is within directives. This is important because artifacts that access the DOM are hard to test

      Compare and contrast with React's approach - Angular abstracts app logic away from the DOM. React instead has the app generate a virtual UI from an input state tree which gets 'compiled' into a DOM.

    1. progarm

      typo

    2. the the

      typo

    3. (Note: you need typescript nightly for this at the moment).

      Don't think that's true anymore with the release of TS 1.6

    4. bar = <any>foo; // Okay!

      Should probably change this to recommend the new <expression> as <type> syntax in TS 1.6

    5. Useful intro to the process of migrating an existing JS project to TypeScript

    6. Useful document explaining why TypeScript is valuable

    1. When should I use an attribute versus an element? Use an element when you are creating a component that is in control of the template. The common case for this is when you are creating a Domain-Specific Language for parts of your template. Use an attribute when you are decorating an existing element with new functionality.
    1. To create a mixin you use the @mixin directive and give it a name. We've named our mixin border-radius. We're also using the variable $radius inside the parentheses so we can pass in a radius of whatever we want. After you create your mixin, you can then use it as a CSS declaration starting with @include followed by the name of the mixin. When your CSS is generated it'll look like this

      This particular example would be better replaced with a post-processor like autoprefixer

    1. Our toy and demo apps currently group files functionally (all views together, all css together, etc...) rather than structurally (all elements of a view together, all common elements together, etc...) When used in a real larger scale app (e.g. Doubleclick For Advertisers), readability is improved by making the directory and app structure consistent with the architectural design of the app

      We're currently not applying the concept recommended here of grouping all the parts of a component together and I think it would make a lot of sense to do so.

    1. Second, you will often not even want the data copied directly into your data objects until the data has been sent to the server (typically using a remove create or update service), and the server has responded that the data was accepted.

      Showing the change immediately as if it was successful (ie. optimistic updates) is now considered essential for good perceived performance. The important thing is being able to gracefully handle failures in this case - eg. by rolling back the state of the UI.

    2. In my opinion the argument is based on a false premise. The premise that if a designer knows the HTML syntax then they can all of a sudden perform programming tasks, given an HTML-like templating system. While this is theoretically true, the premise mistakes syntax for semantics.

      +1

    3. This is an interesting dive into the challenges of creating a good language to describe the structure and functionality of a UI.

      It advocates using a declarative structure to lay out the components and then using imperative logic within the components.

    4. Therefore, when you try to use a declarative language to mimic imperative mechanisms it may work for simple cases, but as the cases get more advanced the code tend to become clumsy

      This really captures what bothered me reading Ember's documentation.

    5. While this allowed imperative control logic to be mixed with the declarative HTML, developers soon realized that mixing Java directly into the HTML resulted in really messy code when the HTML pages got more advanced. The syntaxes of Java and HTML just didn't complement each other very well.
    1. If the value returned by the value function is different than the value it returned the last time it was called

      Q: How is different determined? A: Using reference equality by default, there is an option to use value equality see this section of the docs

    2. The value function should return the value which is being watched. AngularJS can then check the value returned against the value the watch function returned the last time

      Ah, so since the input is a scope, this means that Angular needs to call every watch value fn that might be affected by a change. Should look into whether it has any optimizations to avoid that for common watch expressions.

    3. Useful reference on Angular's core $watch,$digest,$apply functions

    1. The $event variable contains the original browser event object

      cf. React where an abstraction layer normalizes differences between browsers - although I'm unsure how much difference there still is between modern browsers that needs to be abstracted away

    1. The orderBy filter can also take a second $scope variable as parameter. In this example that variable is named reverse. The value of this variable determines if the data objects are to be sorted in their natural order, or the reverse order of that. In this case the reverse variable is set to true, meaning the data objects will be sorted in reverse order.

      Again, cf. React where one would just use a chain of map() calls.

    2. ng-switch Directive

      cf. React where one just uses ordinary JS logic to generate the markup, made more aesthetically pleasing with JSX, rather than embedding a subset of a programming language in HTML.

    1. Error: filter:notarray

      The inclusion of links to a useful page about the problem in Angular stacktraces is awesomesauce.

    1. Backup tutorial for Angular that I used after their official docs broke :P

    1. You will also have to tell AngularJS what part of the directive's HTML template that is to contain the transcluded HTML

      cf. The concept of 'slots' in the Shadow DOM spec.

    2. This processing is called "transclusion"

      So transclusion is analgous to the children props on a React element.

      From Wikipedia:

      In computer science, transclusion is the inclusion of part or all of an electronic document into one or more other documents by reference.

    3. In case that HTML template grows big, it is gets hard to write and maintain the HTML inside a JavaScript string.

      Of course, with ES6 a literal string could be used to avoid that problem.

    1. Both accessibility and performance are invisible aspects of an experience and should be considered even if they aren’t explicit goals of the project.
    1. So to sum up: It should be an active design choice whether you want to enable users to change the font size independently to parts of or all layout and graphics. If so, pixels will probably not be your friend. If not, I’d say it’s mainly a matter of personal taste and/or project.

      This is good guidance on when/whether to use em vs. px sizing

    2. Useful article giving an overview of the history of how browser zooming affected CSS units.

      Makes a strong overall recommendation to use px almost everywhere, except where component size elements should specifically relate to their font.

    3. In version 7 of internet explorer that was released in October 2006 there was a very prominent zoom icon on the bottom right of the browser window. And guess what… The zoom function was just modifying the CSS reference pixel in the browsers CSS rendering engine!

      This is a useful resource on the history of zooming and accessibility in browsers.

      See also this argument

    1. This is not true nowadays. Pressing Ctrl+ and Ctrl- in any modern browser will scale the pixel values as well. It has been like this for a while now.
    1. This will not render properly, unless we do some scope magic.

      Sigh. This pattern of in scenario A we have problems B and C, so lets add another feature D seems to occur quite a lot in this guide.

    2. This will not render properly, unless we do some scope magic.

      Sigh. This pattern of in scenario A we have problems B and C, so lets add another feature D seems to occur quite a lot in this guide.

    3. But ngRepeat has a dilemma. It needs to be able to clone new <li> elements for every action in user.actions. This initially seems trivial, but it becomes more complicated when you consider that user.actions might have items added to it later. This means that it needs to save a clean copy of the <li> element for cloning purposes. As new actions are inserted, the template <li> element needs to be cloned and inserted into ul. But cloning the <li> element is not enough. It also needs to compile the <li> so that its directives, like {{action.description}}, evaluate against the right scope. A naive approach to solving this problem would be to simply insert a copy of the <li> element and then compile it. The problem with this approach is that compiling on every <li> element that we clone would duplicate a lot of the work. Specifically, we'd be traversing <li> each time before cloning it to find the directives. This would cause the compilation process to be slower, in turn making applications less responsive when inserting new nodes. The solution is to break the compilation process into two phases: the compile phase where all of the directives are identified and sorted by priority, and a linking phase where any work which "links" a specific instance of the scope and the specific instance of an <li> is performed.

      Interesting to compare to React's approach, which is much simpler.

    1. IcoMoon was also the first to solve a big problem with icon fonts: Compatibility with screen readers. By using the Private Use Area of Unicode, this problem was solved and almost every other icon font started to use the same encoding.
    1. The configuration file itself can be treated as an extension if it contains a setup() function.

      This can be used to embed H in readthedocs pages

    1. @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.

    1. The project also adheres closely to the Google Python Style Guide.

      The style guides moved to GitHub. Links should be updated

      JavaScript - http://google.github.io/styleguide/javascriptguide.xml Python - http://google.github.io/styleguide/pyguide.html

    2. We use a combination of [JSHint](http://jshint.com) and [JSCS](http://jscs.info) for helping confirm code style conformance.

      Couple of minor links to fix.

    3. Generally, no semi-colons are used. This may change.

      I probably would suggest changing this. AFAIK the majority of code in the wild does use semis.

    4. Please stick to strict, 80-column line limits except for small exceptions that would still be readable if they were truncated. Eliminate trailing whitespace wherever possible.

      The .editorconfig file doesn't have rules for this at the moment, though they could be added

    1. The full range of possibilities here is still in need of documentation and we would appreciate any help to improve that.

      This could be done with a JSDoc interface description or my preferred way is to write a TypeScript definition file.

    1. Copy your extension’s ID from the chrome://extensions page. Chrome generates this ID the first time you install the extension and will reuse it each time your rebuild or reinstall the extension

      Need to check whether this is actually still necessary or not. The extension ID can be fixed in the manifest to avoid the need for this dance.

    1. Add a node symlink. This is needed because the node binary from Ubuntu is called nodejs but many packages will try to run it as node:

      Might be worth recommending installation of Node from nodejs' website instead.

    2. Please consult the administration documentation for more information on accessing the admin dashboard.

      Should be a link to appropriate admin docs

    3. Once installed, running nsqd in its default configuration should suffice for integration with h in a development environment

      Running make dev currently succeeds with no warnings or errors if nsqd is not running.

      How do I verify that H is able to communicate with nsqd?

    4. The h project uses ElasticSearch (v1.0 or later) as its principal data store for annotation data, and requires the ElasticSearch ICU Analysis plugin to be installed

      Sounds obvious, but should have a note here about making sure that ES is actually running.

    5. Using the bookmarklet or otherwise embedding the application may not be possible on sites accessed via HTTPS due to browser policy restricting the inclusion of non-SSL content.

      I think this is out of date?

    6. If you don’t have your h/node_modules/.bin directory on your PATH then you’ll get errors because the Node modules you’ve installed can’t be found (for example: Program file not found: uglifyjs). To add the Node modules to your PATH:

      This isn't something you would normally expect to need to do with a node project. Any gulpfiles, Makefiles or other tools should usually reference the binary in ./node_modules/.bin directly. Any particular reason for this?

    1. If you want to annotate a site that’s served over https then you’ll need to serve h over https as well, otherwise the browser will refuse to launch h and give a mixed-content warning.

      Might be a good idea to make this the default recommendation since so much web content is served via HTTPS nowadays.

  2. arxiv.org arxiv.org
    1. Given an LSH familyH, the LSH scheme amplifiesthe gap between the high probabilityP1and the lowprobabilityP2by concatenating several functions

      Useful recap of LSH

    2. Recent survey paper for hashing-based approaches to similarity search

    1. This paper has a very useful overview of previous work that is worth reading under section 9.

    2. We used the following publicly available real datasets in the experiment

      Datasets used are DBPL, ENRON, UNIREF-4GRAM. All small (<1M records) in web terms and I would guess, all with small document sizes.

      Given a lengthy paper, could potentially divide into smaller documents (1 doc === 1 page) and do signature calculation on a per-page basis. This could have the benefit of bounding the search time by limiting the number of pages that need to be rendered to text in order to start the lookup process.

    1. Implementation of the mix-blend-mode property is more complex than background-blend-mode so it is taking a bit more time, but don’t let that get you down. Blend modes will be here soon

      Where possible, using multiply blending would avoid highlights making the underlying text less readable in PDFs where the <span> created by H does not actually contain the visible text of the element

  3. static.googleusercontent.com static.googleusercontent.com
    1. This model states that showing more ads resultsin ads blindness, i.e., a decrease in users' propensity to clickon ads.

      Does this mean users propensity to click on any ad from those that are shown or users propensity to click on a particular ad when it is shown alongside many vs few other ads?

    2. We discuss two examples where, byprioritizing user satisfaction as measured by ads blindnessor sightedness, we have changed the auction ranking func-tion [10] and drastically reduced the ad load on the mobileinterface. Reducing the mobile ad load strongly improvedthe user experience but was a substantially short-term rev-enue negative chang
    1. If your head boiled from reading the above section, imagine what it was like to write it.

      I find this slightly disturbing to read in the documentation (!)

    1. This approach is called change data capture, which I wrote about recently (and implemented on PostgreSQL). As long as you’re only writing to a single database (not doing dual writes), and getting the log of writes from the database (in the order in which they were committed to the DB), then this approach works just as well as making your writes to the log directly.

      Interesting section on applying log-orientated approaches to existing systems.

    1. So instead we introduced the loading spinner on each widget. Nothing is actually any faster, but the whole experience feels more responsive
    2. Simply reducing some CSS transition times from 500ms to 250ms, and cutting others out entirely, made the whole dashboard feel snappier and more responsive.
    3. This means content is served from the nearest possible geographic location to the user, cutting down request latency from as high as 2500ms (in places such as Singapore) to tens of milliseconds
    4. We eventually came up with a compromise solution based on Addy Osmani’s basket.js, using a combination of server-side script concatenation and localStorage for caching. In a nutshell, the page includes a lightweight loader script, which figures out which JS and CSS it has already cached and which needs to be fetched. The loader then requests all the resources it needs from the server in one request, and saves all the resources into localStorage under individual keys. This gives us a great compromise between cutting down the number of HTTP requests while still being able to maintain cacheability, and not re-downloading code unnecessarily when it hasn’t changed. Addtionally, after running a few benchmarks, we found that localStorage is (sometimes) actually faster than the native HTTP cache, especially on mobile browsers.
  4. Aug 2015
    1. Stdlib support for a global Trace trait that everyone derives would be awesome.

      The issue of wanting to augment structs from external crates with additional traits seems like a pretty generic problem. Seems a shame to solve it only for GC tracing.

    1. This section defines three signature algorithms based on the RSA encryption process described in Sections 8 and 9. The intended use of the signature algorithms is in signing X.509/PEM certificates and certificate-revocation lists, PKCS #6 extended certificates, and other objects employing digital signatures such as X.401 message tokens. The algorithms are not intended for use in constructing digital signatures in PKCS #7. The first signature algorithm (informally, "MD2 with RSA") combines the MD2 message-digest algorithm with RSA, the second (informally, "MD4 with RSA") combines the MD4 message-digest algorithm with RSA, and the third (informally, "MD5 with RSA") combines the MD5 message-digest algorithm with RSA.

      See http://security.stackexchange.com/questions/10706/encode-der-with-openssl for a high level overview of the signing process

    1. Accessing a Webpage
    2. In Share extensions (on both platforms) and Action extensions (iOS only), you can give users access to web content by asking Safari to run a JavaScript file and return the results to the extension.
    3. On both platforms, your custom JavaScript class can define a run() function that Safari invokes as soon as it loads the JavaScript file. In the run() function, Safari provides an argument named completionFunction, with which you can pass results to your app extension in the form of a key-value object. In iOS, you can also define a finalize() function that Safari invokes when your app extension calls completeRequestReturningItems:completion: at the end of its task. A finalize() function can use items your extension passes in completeRequestReturningItems:completion: to change the webpage as desired.
    4. Create a JavaScript file that includes a global object named ExtensionPreprocessingJS. Assign a new instance of your custom JavaScript class to this object.
    1. Quick recap — what authors should do now

      Useful reference for what parts of a citation are actually needed to generate something useful.

    2. But if a URL link is for a quotation the problem disappears. Readers follow the link to the top of the sources, copy a few words of the quoted passage into the Control+F search box, and go directly to the passage cited.
    3. However, if an open access version of a text is available, this must always be treated as the primary text. Here the commercial version of the text becomes the secondary version and it should always be cited second and in a manner that makes this completely clear. For instance, after the primary reference to the full text, you could write: ‘Also available as: ….’

      Would be interesting to write a tool that could take a paper as input and replace all citations with references to freely available versions

    4. Using URL referencing of the kind I employ in this blog, or other innovative methods, readers should be able to go directly (in a single click and in real time) to the specific part of the full text of source that is being cited
    1. To do that I just typed “label:techgroup -is:starred” without quotes in the search bar and clicked on Search. It displayed all the emails from that label which isn’t starred.

      How to find unstarred emails in Gmail

    1. Writing a program is an error-prone exercise in translation. Even math, from which our programming languages are born, has to be translated into something like this:

      Using old-school C++ here to demonstrate the verbosity of code compared to a maths-expression exaggerates the status quo somewhat.

    1. Many of the Forerunner models have the ability to easily delete anything older than 30 days (Menu > History > Run > Delete > Keep 30 days > ok) For the Forerunner 110/210, Garmin says do this:Press and hold page/menu button until menu appears Select OK on History Press up or down button to locate activity to be deleted Press start/stop and lap/reset simultaneously Release on buttons once Delete Activity message appears Press OK on Yes A message Delete all activities? will appear* If wanting to delete all activities, select Yes

      Garmin Forerunner 210 history clear / delete steps

    1. Angular 2 embraces web platform standards, so it puts the view of the component in the Shadow DOM of the element where it has been created. If your browser does not support Shadow Dom, Angular will emulate it on a par with native shadow DOM.

      At the time this was written I don't think vendors were anywhere near agreement on several major aspects of shadow DOM

    1. When we first set out to identify malicious extensionsour expectation was to find banking trojans and pass-word stealers that duplicated the strategies pioneered byZeus and SpyEye. In practice, the abusive extensionecosystem is drastically different from malicious bina-ries. Monetization hinges on direct or indirect relation-ships with syndicated search partners and ad injection af-filiate programs, some of which earn millions of dollarsfrom infected users [37]. Miscreants derive wealth fromtrafficanduser targetingrather than the computing re-sources or privileged access mediated via the browser. Itmay simply be that the authors of malicious binaries havelittle incentive (or external pressure) to change, leavingextensions to a distinct set of actors. This uncertainty isa strong motivation for exploring the extension ecosys-tem further.

      This is the section that identifies the motives and economics around malicious extensions

    1. Link to a webpage listing your publications (eg your professional/university profile, ResearcherId, Google Scholar, Research Gate…

      Should get Mendeley listed here

    1. Setting the tabindex of the focused element to "0" ensures that if the user tabs away from the widget and then returns, the selected item within the group retains focus. Note that updating the tabindex to "0" requires also updating the previously selected item to tabindex="-1". This technique involves programmatically moving focus in response to key events and updating the tabindex to reflect the currently focused item. To do this:

      This looks like a lot of manual work for web authors that many are likely to get wrong. How much of this could be automated?

    1. Have you seen the ContentMine project at all? I met Peter Murray Rust at a Mozilla science event a couple of months ago and the use case he discussed sounded quite similar to this - mining large numbers of papers for facts.

    1. If you start a program in the foreground (with no ampersand), you can suspend that program’s execution and return to the xonsh prompt by pressing Control-Z. This will give control of the terminal back to xonsh, and will keep the program paused in the background.

      Would be useful to have an API for this.

    1. I have had an annoying problem with git and vi. I like to use vim to edit my commit messages, but I’ve been hit with this annoying message every time I write the message and quit vim.

      Thanks for this. I encountered the same issue with OS X 10.10.

      Haven't investigated the issue fully yet but there is definitely a difference in the exit status behavior when launching vim as 'vi' vs. launching it as 'vim'

    1. At various times, such as when a tab is added, Safari will ask you to validate the command. If there is any possibility that the command could be invalid, you should add a listener function for the "validate" event.
    1. Firefox 42: Release and Beta versions of Firefox will not allow unsigned extensions to be installed, with no override.

      Current deadline is 22/09/15 for Firefox beta users and 03/11/15 November for Firefox stable users.

    1. Only Safari Extensions installed from the Safari Extensions Gallery can be updated automatically. Add the following two lines to each extension's dictionary entry within your Update Manifest to allow existing users to update automatically to the latest version.

      In practical terms, this means that submission to the Safari Extensions Gallery is going to be necessary for any extension which is likely to receive regular updates.

    1. We’ve seen some annoying bugs as a result of events being fired twice, or in a circular event chain.

      Update loops are one of the problems that React explicitly aims to solve and Flux explicitly disallows actions triggering other actions to avoid this.

    2. For example, we currently have two components, search and compose, which use Twitter’s typeahead search. Our typeahead data module sends out events like this:

      Mendeley's flight-autocomplete component appears to follow the same event naming scheme

    3. Event namesI’m not sure we’ve got our event-naming nailed as yet. In fact, our naming conventions seem to be widely disagreed upon within our small team. Despite that, we seem to be managing pretty well.

      Useful reference for Flight idioms from TweetDeck

    1. Probably the best explanation I've seen yet on the why and how of a functional approach to UI state management with Redux

    1. In summary:

      1. Class decorators are functions that wrap a constructor function
      2. Property decorators are functions that take a prototype and property name as input and can modify the property
      3. Method decorators are functions that take a prototype, method name and method descriptor as input and return an updated descriptor
    2. let’s implement the logClass decorator..

      This can be simplified slightly to:

      function log(constructor: any) {
          let wrappedConstructor = (...args: any[]) => {
              console.log('creating a new ' + constructor.name, 'with args', JSON.stringify(args));
              let instance: any = Object.create(constructor.prototype);
              constructor.apply(instance, args);
              return instance;
          };
          wrappedConstructor.prototype = constructor.prototype;
          return wrappedConstructor as any;
      }
      
    1. Each of our partners will engage in specific trials. AGU will investigate post-publication peer review in the new open access journal, Earth’s Future. ArXiv will permit selected groups of readers to make and view annotations on arXiv articles, or the formally published versions of the same articles, and support new authentication mechanisms, potentially involving ORCID, that would permit overlay journals to integrate select conversations on arXiv. eLife will implement annotation supporting pre-publication peer-review. This will be incorporated into a new and more flexible revision system that will be created to streamline the editorial review process.

      What's the current status of the arXiv and eLife integrations?

    1. To read opinions about a web page

      There was a Chrome extension published on HN a few days ago that would surface HackerNews discussion related to any given page you were looking at. Randall, was this the kind of thing you had in mind when talking about aggregating annotations in the sidebar?

    2. Pre-installed on browsers

      Have there ever been any discussions in that direction with any browser vendors?

  5. Jul 2015
    1. Firefox procedure is a little bit more complex as you need to use the SDK including cfx which can wrap your extension into an .xpi file.

      Firefox >= 38 can use jpm (Fx 38 is the most recent ESR release)

    1. I hope I can help you realize its ambitions

      I was hoping that I could use comments as a way to have a dialog on the cover letter but I see that email notifications are still on the backlog

    2. personal projects

      The most directly relevant is Passcards, an open-source browser extension for storing credentails and syncing them across devices via Dropbox. This is built in TypeScript using React for the UI.

      It is compatible with the popular commercial 1Password app for iOS and Mac.

    3. C++

      Being able to delve into C++ code can sometimes prove useful even in web projects, to find out why a particular browser is doing something in a certain way.

    4. London React

      In particular, I've given talks on testing React apps and last October, a talk on React's internals - though some of that will be out of date with the recent 0.14 release.

    5. TypeScript

      I chose this early on in order to have good tools for refactoring when the codebase became large and this proved very useful. I would definitely recommend using static analysis tools for JS, though Flow is also now a good option.

    6. learning much about usability in the process

      Including some painful hours watching videos of users trying and failing to use early iterations of particular features.

    7. TypeScript

      I chose TypeScript early on as I knew the codebase was likely to grow fairly large and I wanted to be able to refactor it easily.

      Babel & Flow provide similar benefits but are less mature.

    8. offline sync functionality

      I've also recently implemented offline sync using current web platform features (IndexedDB) for my password manager.

    1. The line breaking algorithm can also be used to correct the line breaks made by the browser. The easiest way to do is to split a text up into lines and adjust the CSS word-spacing property. Unfortunately, Webkit based browsers do not support sub-pixel word-spacing. Alternatively, we can absolute position each word or split the line into segmants with integer word spacing. You can see the latter approach in action on the Flatland line breaking example.

      Notes on how to apply TeX line-breaking algorithm to web content by using CSS word-spacing property

  6. Oct 2014
    1. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP) , pages 1654–1664, October 25-29, 2014, Doha, Qatar. c 2014 Association for Computational Linguistics Refining Word Segmentation Using a Manually Aligned Corpus for Statistical Machine Translation

      Notes on the paper