HNHacker News
TopNewBestAskShowJobs

callum85

5,586 karma · joined December 1, 2011

twitter.com/callumlocke
submissionscomments
callum85··on React.js Introduction for People Who Know Just Enough JQuery
You can polyfill it in those browsers. Just use polyfill.io, or if you prefer, manually feature-detect it and if necessary load Github's fetch polyfill, which is good: https://github.com/github/fetch
callum85··on Commit messages are not titles
Ah OK I see what I call "what" you call "why".

"otherwise comments get outdated easily" - not mine. If this is a problem, it's a problem that needs fixing, not a reason to comment less.

"extract that piece of code into a method" Sometimes, yes, but you can overdo this and end up with a fragmented codebase that is harder to follow.

This is an old debate, and there are books on either side. My preference is something approaching Knuth's literate programming.

callum85··on A Tube map of the London Underground that's more useful than the 'official' one
Who gets confused by that? It's obviously just a diagram, not a real 'map'. Of course it's not going to look the same as a geographical map.
callum85··on Commit messages are not titles
But if the commit message says what happened, then you don't need to read diffs to find out what happened. Reading an English sentence is easier than reading code diffs, and also you can read a bunch of sentences in list form (eg, git log).

I'm not saying you don't need to include the 'why', I'm saying there is value just in the 'what'.

As for code comments that just 'explain something obvious'... I have no problem with comments that simply summarise, in English, what the next few lines do. It means I can skim through a file just reading the comments, until I find the part I want to debug/modify/understand in more detail. Also, if you can sum up some code with a sentence then there's a good chance it makes sense, so it's a good quality check.

callum85··on Robots are leaving the factory floor and heading for your desk – and your job
"Will robots cause unemployment or... increased leisure time for humans?"

These aren't mutually exclusive.

callum85··on The Amazing Disappearing BSD License (2005)
I think you're right. Even just writing a readme that says "you can use this software for X" is effectively a claim that it's fit for a given purpose, which I guess might open you up to damages claims.

But I agree with trying to get rid of cruft from OS licences. I think the ISC one seems like the best balance.

callum85··on How to Become a Great JavaScript Developer
I'm using ES6 classes (and even parts of ES7) extensively in production today, and it's not nonstandard junk, and it's definitely made the language better.
callum85··on DuckDuckGo on CNBC: We’ve grown 600% since NSA surveillance news broke
My bad, I skipped through and missed the chart.

(It's at 1:05)

callum85··on DuckDuckGo on CNBC: We’ve grown 600% since NSA surveillance news broke
The NSA news broke a long time ago and 600% over that period doesn't sound like outlandish growth for a startup. Or maybe it is, I don't know. It would be good to see this figure over time on a chart, then we could see if there is any change in growth rate.
callum85··on Google: 90% of our engineers use the software you wrote (Homebrew), but...
> If you can't do it, you probably don't understand recursion

No, I can't do it (don't even understand the question) but I certainly understand what recursion is, and can solve problems and make things work far more reliably than many of the more academic programmers I have worked with.

callum85··on The next generation of spreadsheets will be a database
I've wanted something like this for years. So many times I've tried to use a Google spreadsheet to store data, because I needed the web-based UI and mobile access... but it never works out well, because it's just not a relational database. Airtable seems to get it right.

Also, the API docs being automatically customised per-table is awesome.

callum85··on Can a Font Make Us Believe Something Is True?
Not really. It says the findings are fascinating/interesting, and I'm saying they are not.
callum85··on Can a Font Make Us Believe Something Is True?
“It’s absurd to think that we would be nudged by one typeface over another, into believing something to be true. Something disturbing about it, I’d go so far to say.”

It's really not disturbing.

It's obvious that the way something is presented can affect your judgement about things like the motives (or credibility or even identity) of the person saying it, and it's obvious that this will in turn affect whether you believe what you're being told. Things like tone of voice, choice of words, and typeface all have an effect.

Why does it surprise people that the manner in which you communicate can affect how likely people are to believe what you're saying?

callum85··on John Nash's letters to the NSA (1955) [pdf]
I can't find anything online supporting this.
callum85··on Unison: a next-generation programming platform
This isn't a 'Show HN'.
callum85··on ShellCheck: linter for shell scripts
Plugins for Sublime Text and Atom:

https://github.com/SublimeLinter/SublimeLinter-shellcheck https://atom.io/packages/linter-shellcheck

callum85··on x*sin(y)
Can an admin update to this link please (it won't let me change it now):

https://www.google.com/search?q=x*sin(y)

callum85··on Why we will not be registering easydns.sucks
I didn't downvote you!

I didn't say it was a free pass to do anything. You can't lie about the company, for example. But that would be libel, not trademark infringement. As long as it's obvious to consumers that your use of the trademark is not on behalf of or authorised by the company, then it's not trademark infringement.

And yes, simply adding "sucks" would pretty much always be a free pass against trademark infringement , except in really contrived scenarios, like if the trademark was a brand of vacuum cleaners :)

That said, the Dumb Starbucks example is interesting, I think that's in a grey area, the kind of edge case you're talking about. Starbucks might well be able to demonstrate that some customers thought it was official (albeit obscure) marketing effort by them, especially because it's a coffee shop.

callum85··on Why we will not be registering easydns.sucks
You don't need a court ruling to allow you to do something. It's the other way round.

Of course it's fine to market a series of magazines called "_____ sucks". It's just expressing an opinion. Trademark law doesn't come into it, unless the trademark owner can prove that consumers might reasonably think your use of their trademark is somehow authorised or affiliated with them. In the case of "____ sucks", that would be self-evidently not the case.

callum85··on Why we will not be registering easydns.sucks
You're allowed to criticize any company you like (as long as you don't lie), and you can even profit by doing so. For example, media companies can sell newspapers containing negative reviews of trademarked companies, and make money from it.

For trademark infringement, there has to be "likelihood of confusion", i.e. your use of their trademark could lead to people thinking that your goods/services originated from the trademark owner. In the case of someone explicitly critisizing a company, this could never be argued.

callum85··on Why we will not be registering easydns.sucks
> However, if there was an easy mnemonic like "just add .sucks to the end of a name" to find the bad things about $NAME then the game would change. It'd be easier for people to organize and oppose companies than anything else imaginable.

That sounds far fetched. There would be no consistency in the kind of sites you'd get, no way for this to develop into a mnemonic. It would never become such a 'thing' that it could compete with the status quo – that you can just google for negative stuff about any company or person and get multiple, relevant results (instead of just the ravings of one particular random person who had a grievance).

callum85··on Announcing Git Large File Storage
Can someone explain to me what problem this solves in layman's terms... How are version control systems are "impractical" for large files?

Or to put another way, what problems will I run into if I just commit large media files without using this?

callum85··on CSS Framework for Dummies
Third party components (date pickers etc.) wouldn't know about the 'explicit' class so it would be up to the user to add this class to all non-semantic tables to 'undo' the Tacit CSS, but they won't know which components output such tables... This is supposed to be a drop-in 'make the page look nice' thing.
callum85··on ES6 generators in depth
Here is another deep explanation of generators, by Kyle Simpson:

https://github.com/getify/You-Dont-Know-JS/blob/master/async...

Both of them are really good, and come at it from slightly different angles.

callum85··on ES6 generators in depth
I don't think googling is much of an issue here. Unless you're talking about the very first occasion that someone sees "function*", then OK, they can't google for that easily... But they can google "function with astersik" or something and they'll find out it's called a "generator", and use that in future.
callum85··on ES6 generators in depth
This can't be about backwards compatibility. If it was, they wouldn't have been able to add 'yield, 'await' etc.

I don't agree the keyword "generator" would have been ideal. It wouldn't work when using 'enhanced object literals' [1], where you can declare a method without even using the keyword "function". In this case, if you want the method to be a generator, you can just put an asterisk in front of its name, so it's consistent with the "function*" syntax.

[1] https://babeljs.io/docs/learn-es6/#enhanced-object-literals

callum85··on Code Keyboards
I don't look at it while coding, but what about when you need to adjust the volume when watching a film?
callum85··on Rich client side web apps gone too far (2014)
> Honest question, is this really possible?

Yes, loads of things work without JS. You can use Wikipedia, even to edit articles, with JS disabled – it's all simple HTML forms. JS just makes the experience smoother (adding buttons to help with WikiText formatting, etc).

Most content and shopping websites work fine without JS. You asked how do you fire off AJAX requests without JS? You don't. You just design your app so it basically works as a set of HTML pages connected by hyperlinks and form submissions. Then you add JS to enhance things.

> Apparently I've missed a whole area of web development if this is all possible with no Javascript.

Yes you have. When I started (~12 years ago), JS was only used for little whizzy effects here and there, not much else. Then JS started becoming more viable due to prototype and jQuery, but it was always the most flakey part of web development, and we learned to use it cautiously as an optional layer of enhancement. You couldn't rely on it always working. It was a way to 'differentiate' your site, not a serious building block.

Now, everything has changed, JS is everywhere and we tend to call things 'apps' more than 'sites'. I spend 70% of my day writing JS. I'm not sure if I agree with the JS-bashing sentiment of the article. But I do think it's still good practice to design your app so it delivers your core content/functionality without JS. Most stuff (blogs, e-commerce, forums, etc) can be built like this. (Admittedly some things like p2p streaming apps just can't.) Then you can use JS to enhance things, like enhancing your basic search form with as-you-type suggestions. This approach makes your codebase more structurally sound and less entangled, and makes your app more resilient.

callum85··on “We have decided not to integrate the Dart VM into Chrome”
> the resulting JS is said to be more performant than raw JS.

This claim always bugged me. The output of dart2js is raw JS. Same with CoffeeScript (which makes a similar claim). So these claims are totally reliant on parameters that haven't been defined, ie. what constitutes "equivalent" handwritten code?

callum85··on New JavaScript techniques for rapid page loads
> Best practice is to always add [async] or [defer] attributes.

Can you give a reference for that?

HTML5 Boilerplate, Yeoman's generator-webapp and Google's Web Starter Kit do not come with these script attributes OOTB.

EDIT: ha I just noticed your username. Maybe you can tell me why those projects don't come with async script tags?

← PreviousPage 2 of 7Next →