Better HN
topnewbestaskshowjobs
Log inSign up

Robin_Message

3,901 karma · joined May 23, 2008 (18y ago) · 1,250 submissions

Email: robin at lambdacambridge.com

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.
Submissions

comment 14y ago · link · parent

I love the sentence "i did not cross check from net that whether the content was plagiarized or not". Well, no, the content on the net is not plagiarized – the plagiarism is in copy-pasting it.

comment 14y ago · link · parent

This looks great, but unfortunately it doesn't actually play for me. Soundcloud works fine for me (Chromium on Ubuntu), any reason why it wouldn't play?

comment 14y ago · link · parent

Ahem. It depends on the workload.

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

I could have been clearer. It's not the crypto primitives that are tricky - as people say, HMAC is a library. It's the need to assemble a irritating number of parameters and build a signature of the correct ones for each call, and provide nonces, and I don't know what else but it depends on me not to screw it up and its too big for me to be confident of that, and I'm not sure I trust library authors. Granted, it's not rocket surgery and there are libraries, but OAuth 2 for a client is literally 25 lines of code – look at https://developers.facebook.com/docs/authentication/server-s... – so I don't care if someone can implement HMAC in 12 lines of code.

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

And now we have N+1 standards.

comment 14y ago · link · parent

Yes, that would be great, as I'm not sure there are any good docs on writing a OAuth provider.

comment 14y ago · link · parent

Hang on a minute, from where I'm standing as a client developer OAuth 2 is much better than OAuth 1.

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

I like the tutorial style and I wanted to show something like this to someone, so that's really cool.

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

I think the trick is to distinguish between unhelpfully negative people and useful negative feedback. As an entrepreneur, you need both motivation (which positive feedback is good for) and information about your customers/business (which is ultimately negative, no matter what Edison-like spin you put on it, since the parts to improve are the parts you're currently doing wrong.)

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

Hopefully stress means that you won't be able to do it properly anyway, which means coercion is useless.

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

You're thinking of Optical Time-Domain Eavesdropping Risks of CRT Displays by Markus G. Kuhn in Proceedings of the 2002 IEEE Symposium on Security and Privacy, Berkeley, California, 12–15 May 2002.

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

That would make performance worse, since webkit already uses what looks like standard library quicksort or mergesort, which I'd count at 0 lines of code. (Although they also use an AVL tree for sorting some things, I'm not sure why, or why the AVL tree code lives in the "wtf" source directory. It's all in http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/r... from line 1409 onwards)

comment 14y ago · link · parent

It appears to me from the line:

    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

By downvoting you in order to show disagreement, it looks like the consensus is quite eloquently explaining why it thinks you are wrong.

comment 14y ago · link · parent

You can adopt a convention (like #tag) and then search/filter cards with that tag pretty easily. It's not built in tagging support, but I'm not sure if GTD actually requires more than that.

comment 14y ago · link · parent

I believe Paul is using "random" (in particular, "random access") in the programming sense of "arbitrary" – the interview is there to dig deeper into the bits they are interested in/concerned about.

comment 14y ago · link · parent

Ah, I understand what you mean now - Google deliberately redirect to their own site on http in order to "leak" that information in the referrer header. So we're both right, I just didn't understand you, sorry.

comment 14y ago · link · parent

"How complex systems fail" by Dr. Richard Cook makes exactly this point – all complex systems are, by definition, running in a degraded mode, with catastrophe just around the corner. They are keep up through a series of gambles – and you never hear about the good ones.

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

The courts could presumably bar the douchebag bar.

comment 14y ago · link · parent

That is just an efficient way to store the original object and linked list of diffs to get to the current object (assuming accessing the current object is more popular). Note that if you store the original and the diffs, those things are all immutable.

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

Surely there is no refer on a cross-domain navigation from an HTTPS site [1], and so the magic string won't make it there either.

[1] If there was, this could leak, for example, session ID in URL, which would be very bad on a supposedly secure site.

comment 14y ago · link · parent

The point is that a business (at least from this point of view) is an entity in its own right. The founders are a bit like a life-support machine – if you switch them off, does the business die? (Of course, even a profitable business might die if the business can't hire some people to replace the founders.)

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

I assume that's why they got both cable and DSL, although depending on how things work out they might still run in the same trench.

comment 14y ago · link · parent

OT: There's a great bit in Neal Stephenson's Anathem where these monk-like scientists are made to copy out subtly wrong mathematics and scientific proofs as a punishment.

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

Sorry, I missed this, but hopefully you will see it.

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

(rant) Since Rails devs don't appear to believe in databases (and to be fair, if I was targeting MySQL version 3 I'm not sure I would believe in them much either), they don't bother using database features for binding. Instead having their own half baked (well, it 90% baked now, but it still has the occasional squishy bit) binding system.

Same for validations, foreign keys, primary keys, indexes, enumerations, etc. (/rant)

comment 14y ago · link · parent

Re the gut feeling – this is only a problem if the password has significantly more entropy than the hash. So, worst case MD5 (128 bits), this is potentially bad for people with printable ASCII (97 chars) longer than 19 characters.

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

Proof by contradiction: You'll never read the blogs of people who failed to make a passive income by having a blog about making a passive income by having a blog about passive income, because you reading such a failed blog would imply that blog had a readership and would therefore make money off advertising so it wouldn't be a failed blog. QED.

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

Obligatory xkcd refernce: http://xkcd.com/978/

comment 14y ago · link · parent

Snipping some insults in return and focusing on the issue here: "graduates, all experts at disinformation" — snort!?!?

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!

1
232425
42