phase_9 | 5 years ago | on: “Find Satoshi” PerplexCity puzzle solved
phase_9's comments
phase_9 | 10 years ago | on: React Makes You Sad?
phase_9 | 11 years ago | on: TypeScript: New Compiler and Moving to GitHub
phase_9 | 12 years ago | on: Exploring an alternative to git-subtree
I've been under the impression that using an artifact management tool such as Apache Ivy or Bower provides a more manageable and scalable solution, especially in projects with 20+ developers.
How does the solution proposed by the author compare? Does it compliment a managed artefact based solution?
phase_9 | 12 years ago | on: Args.js – Optional and Default parameters for JavaScript
For me; one of the "joys" of coding JavaScript is the expressiveness that comes with a dynamic languages; should you throw an ArgumentError when your function that expects a number is invoked with a String? Maybe - sure it can help catch problems early and effectively "stop-the-line" in your public API, but then again it will probably end up throwing the classic `TypeError: Object foo has no method 'bar'` for you anyway.
For "public" methods which form part of an API (especially when that API is going to be shared outside of my team) I try to make my functions handle failure early (before they delegate off to the "private" internal methods), even better if the public methods can repair any unexpected usage, ie:
function convertToHex(value) {
var result;
if (typeof value !== "number") {
result = convertToHex(parseInt(value, 10));
}
else {
result = "0x" + value.toString(16);
}
return result;
}
Also, with regards to default argument values, I've always felt the "native" JavaScript approach was fairly compact and descriptive when required: function doFoo(bar) {
bar = (bar !== undefined) ? bar : "default_value";
}
[0] http://en.wikipedia.org/wiki/Duck_typingphase_9 | 12 years ago | on: How I got a root shell in my NAS, 0day inside
phase_9 | 13 years ago | on: Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart
[1] http://en.wikipedia.org/wiki/ActionScript#ActionScript_3.0
[2] http://blogs.msdn.com/b/ie/archive/2007/10/30/ecmascript-3-a...
phase_9 | 13 years ago | on: My review of the Surface Pro
Text only link for TFA: http://www.google.com/gwt/x?u=http%3A%2F%2Ftiamat.tsotech.co...
phase_9 | 13 years ago | on: Show HN: jQuery-Mustache Plugin
phase_9 | 13 years ago | on: Google Nexus 4: Nearly flawless
phase_9 | 13 years ago | on: Rsvp.js
phase_9 | 13 years ago | on: Flowplayer 5.0.0
phase_9 | 13 years ago | on: WebRTC is almost here, and it will change the web
Just saying :)
For those down-voting me; I find this attitude very strange. If the tools were present in another widely deployed runtime, but were heavily under utilised then why are people getting so excited about them this time around?
I guess some people just love to hate Flash.
phase_9 | 13 years ago | on: Security questions are salt
Also, on the same subject, it's the "all you need is your memory" bit that makes me smile. If you could rely on your memory then why would you need to have these hashing functions in the first place? (:
[1] http://portableapps.com/apps/utilities/keepass_portable/
phase_9 | 13 years ago | on: Security questions are salt
Just store your "random" Security Question answers alongside the login credentials - they'll be encrypted safely.
--
phase_9 | 13 years ago | on: Important Security Update (Battle.net user information compromised)
phase_9 | 13 years ago | on: Backbone Aura Developer Preview
I can understand the lack of documentation, but I balk at the fact that framework developers wouldn't use TDD to guide the development :(
phase_9 | 13 years ago | on: Change your Last.fm password
phase_9 | 13 years ago | on: Change your Last.fm password
I get the impression this is going to be a bit of a PITA, but with the rate these sites are being breached it's probably a sensible move.
phase_9 | 14 years ago | on: Chromebox