3,901 karma · joined May 23, 2008 (18y ago) · 1,250 submissions
Director at Lambda Cambridge (https://lambdacambridge.com)
I offer software contracting and technical consulting services.
I am especially proficient in Javascript, Java, C#, Python and Ruby, but have completed projects in pretty much every modern commercial language as well as many academic ones.
I can also offer technical and team consulting, where I can help your developers with design and architecture, as well as process, tools, and how you work, either on a one-off or recurring basis.
Previously:
Head of Technology at Firefly – http://fireflylearning.com
Head of Development at Unifyo
PhD in Computer Science at the University of Cambridge, UK
Intern at Google London working on Swiffy, the mad but
cool Flash-to-HTML5 converter
Experience in a wide variety of languages and environments,
including low-level networking, web development,
hardware design, and security.comment 14y ago · link · parent
If you regularly search for the same stuff with binary search in a large array, at some size limit your set-associative caches will run out due to aliasing. At that point your data is then never in the cache, even though you could only be accessing 30 or 40 different words of memory.
comment 14y ago · link · parent
My point was that OAuth 2 improved in a number of ways for clients and is at least as flexible for the issuer as OAuth 1, so I think the author is just disturbed by the trust of SSL for security, and the crappy, slow standardisation process, and ended up going overboard.
comment 14y ago · link · parent
Firstly, reducing the burden of tricky and unnecessary crypto code on the client is useful.
Secondly, some of the article's points don't even make sense, like saying tokens are necessarily unbounded, which isn't true. The issuer can easily include the client_id in the token and check for its revocation when used, as it did in OAuth 1. The same is true for self-encoding: clients don't have to issue self-encoded tokens and can instead issue unique id-style tokens with long expiry times. As for refresh, that's unfortunate but issuers could easily work around it if the OAuth 1 way was preferable.
In short, OAuth 2 is simpler to implement for the client in exchange for being slightly harder on the issuer, whilst also being more flexible. Yes, it relies on SSL for security. So does your bank.
comment 14y ago · link · parent
There's one thing I think you've got wrong in the example: by having functions bound to the same event (addStatus and clearInput), you paint yourself into a corner with Backbone, where you can only bind one function declaratively. However, your solution of clearing the input whenever a status is added is wrong, since (conceptually) the status collection may add statuses whenever it likes for whatever reason, but now doing so will erase the user's input box. Suppose this evolved into a realtime twitter-like thing – you would get hard to understand bug reports of people's input "disappearing".
(Moralising: It's important not to let architecture astronautics distract form the actual logic of the program.) When the NewStatusView successfully adds a status, it should be responsible for clearing its input ready for reuse. The call to clearInput belongs at the end of addStatus. A further argument for this is that it will eventually have to move into a success callback of the collection add, for example when a banned list of words in statuses lives on the server, or you actually broadcast the statuses.
Don't know why I felt compelled to make such a long comment; hope it makes a great reason even better.
comment 14y ago · link · parent
It's not the quantity or proportion of negativity coming from people that's important; it's how accurate and actionable their feedback is in making your company better.
comment 14y ago · link · parent
The real problem is the device stores the password, so the real defence is the tamperproof-ness of the device, not whether you can be tricked or coerced into outputting the sequence.
comment 14y ago · link · parent
Available here: http://www.cl.cam.ac.uk/~mgk25/ieee02-optical.pdf
Pretty amazing that this actually works, just using a high-speed photo-sensor – and doesn't even require line of sight, a reflection off a wall is enough. Unfortunately, I don't think it will work on LCD screens.
comment 14y ago · link · parent
comment 14y ago · link · parent
631 if (thisObj->classInfo() == &JSArray::s_info && !asArray(thisObj)->inSparseMode()) {
that only non-arrays, or arrays in some kind of "sparse" mode are sorted inefficiently.I'm not sure what sparse mode is, but let's try my Raymond Chen inspired psychic powers: if you assign a[0]=1 and a[1000000]=2, you don't want a 1 to 999999 to be stored, so an array like that will end up in a sparse mode which functions more like a hash table keyed by integers.
The same applies to non-arrays: since they aren't true arrays, they won't be stored in the blessed, contiguous way that the sort routine is expecting, so a slower access method has to be used.
Now, fast sorting is presumably written assuming the array is in a contiguous array. Since in sparse mode the array isn't like that, we aren't on the fast path, so it doesn't matter if we are slow, and correctness and special cases are more important, hence the simple selection sort algorithm.
Note also that line 633, 635 and 637 further specialise the fast path into three cases: a default sort with no user-defined comparator, a sort based on a built-in numerical comparator, and a more general sort using a user-defined comparator. (EDIT: The functions called on 633, 635 and 637 are defined in http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/r... from line 1409 onwards, and use quicksort or mergesort, except in the general case which uses an AVL tree, which feels odd but I'm sure there was a reason.)
TL;DR: This only applies to certain arrays; the performance is generally fine else someone would have noticed by now; if you are sorting array-like things or sparse arrays regularly, profile to discover if this is a problem for you.
comment 14y ago · link · parent
Interesting it is written by a doctor about medical environments, but works for any complex system.
The essay is reproduced in Web Operations by John Allspaw and Jesse Robbins with a web ops spin on it, and is also available online at http://www.ctlab.org/documents/How%20Complex%20Systems%20Fai...
comment 14y ago · link · parent
Indeed, that is how git works in general – recording changes as immutable commits, and having one or more heads which point to the new immutable commit.
comment 14y ago · link · parent
Because the business is supposed to be an entity in its own right, you have to value the founder's contribution somehow in deciding whether it is profitable. One way might be to consider what the salary would be to hire someone to take it over such that it continues to produce the same revenue. Another way might be to pay the founders their living expenses (ramen-profitable.) But discounting the cost of the founders working on it to zero? As the article says, that is meaningless.
It's like the old joke: Q: How can you quickly make a million dollars? A: Invest two million dollars in $TOPICAL_RISKY_ACTIVITY
If you hack it together on weekends and with no oversight it is reliably making a $100 more than hosting a month and will do for the foreseeable future, it's profitable (albeit at a small level and not necessarily sustainable).
But if you're living off savings and working full time on it, and it's making $1000 dollars a month, its not profitable.
comment 14y ago · link · parent
AltDragonBox could be exactly that -- day and night cancel, except for symbols when its constellation is rising, in which case they divide, except for odd numbered Fridays in a leap year. Oh, and do it with numbers instead of day/night symbols.
comment 14y ago · link · parent
A hash is fixed, but at a long length. Now, because of geometric growth, the shorter lengths are basically irrelevant (since there are 10s times more 19 character passwords than 18 character ones, 100s or 1000s times more 19 than 17, and so on)
On the second point, yes, exactly, you need a word list of all hexadecimal strings of length x. Again, in the case of MD5 (128 bits), this is all the 32 character hexadecimal strings (since 32 characters * 4 bits per hexadecimal character is 128 bits). Such a list has a length of 2 to the power of 128 by definition - 340282366920938463463374607431768211456 items (about 10^38).
Making a list 10^38 items long is not impossible since that's well below the number of atoms in the earth (about 10^50). It is probably impractical however. Suppose you could store the numbers in iron (the most abundant element), you'd need to store each item of the list in about 0.01 nanograms.
comment 14y ago · link · parent
Same for validations, foreign keys, primary keys, indexes, enumerations, etc. (/rant)
comment 14y ago · link · parent
But it's still not a real problem since 128 bits of entropy is unguessable in the lifetime of the universe (checking 2^64 hashes a second, which is obscenely many – perhaps every processor on the planet dedicated to the task would be enough – covers 5% of the search space in 34 billion years.)
comment 14y ago · link · parent
It's sort of the Anthropic principle: you could only notice that if such blogs existed, and such blogs could only exist if you read them, so you've answered your own question.
comment 14y ago · link · parent
comment 14y ago · link · parent
The world is full of experts in disinformation, and they're not the graduates of a short University course on History that couldn't even fool reddit (no offense redditors!)
They are politicians, lobbyists, campaigners of all political stripes, bureaucrats, journalists, historians etc. Knowing how to sort the wheat from the chaff (and knowing it necessary to do so) is half the point of education, especially in History. And that's what the professor is helping achieve, not a systematic destruction of the written word through a single demonstration as part of a 3 credit University course. Experts at disinformation my hat!