SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Christchurch, New Zealand
    104 Post(s)
    4 Thread(s)

    This Week in JavaScript - 14 April 2014

    Welcome to your weekly update of JavaScript news and goodies.

    Getting started

    Understanding "this" keyword
    Array.sort() should not be used to shuffle an array
    Front-end Developer Tools


    Write code every day
    10 Crucial Habits for JavaScript Developers & Designers


    Fastclick - Eliminate lag in mobile browsers
    Touchy - A highly configurable jQuery touch library
    10 fresh JavaScript/jQuery plugins you should definitely check out
    JayData - A unified data access library for JavaScript
    Stickyalert - A tiny sticky alert bar plugin


    Enter the World of Node.js
    A collection of asynchronous patterns for nodejs and browsers


    Cleverstack - A modular way to create your Angular & Node web apps
    JavaScript Promises: handle repeatedly rejected requests
    AngularStrap v2.0 - enables seamless integration of Twitter Bootstrap 3.0+ into your AngularJS 1.2+ app
    Building the 2048 game in AngularJS
    Get Your Hands Dirty Refactoring in AngularJS

    Cool stuffs

    Hide secret messages in your tweets (or any text) with steg-of-the-dump.js
    Untrusted (game) - The continuing adventures of Dr Eval

    So what are your thoughts on the latest going-ons in the world of JavaScript? Are Angular or other frameworks taking your interest? Are these libraries of much use for you? And are you writing code every day?
    We'd be glad to hear your opinions.

    Please PM us if you have anything of interest for the next issue, and happy reading! - Paul & Pullo
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Sydney, NSW, Australia
    25 Post(s)
    1 Thread(s)
    Using sort to shuffle arrays is a common mistake. I probably didn't help things by publishing that approach on many years ago when I was publishing different comparisons and overlooked the issues with that one.

    It almost works for shuffling an array randomly if you choose a value somewhere between 0.75 and 0.8 rather than 0.5 but finding the exact figure where there is not at least a slight bias one way or the other is not something that can easily be done via experimenting.
    Stephen J Chapman, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts