I'm more interested in how imgur survives since they serve up far more bandwidth that reddit does and their own advertising and community efforts are pretty young relatively, not to mention hotlinks bypass that entirely.
Imgur uses the free/extremely cheap CDN Cloudflare. Same with 4chan. The vast majority of Imgur's content gets served at the CDN layer so Imgur doesn't have to pay for that bandwidth.
moot (of 4chan) said a while back that Cloudflare is one of the main reasons 4chan is still around these days.
CloudFlare told me that using them to host images/media isn't allowed. That they do the CDN bits for websites, but not to do excessive non-webpage stuff. Their ToS says something like that.
CDNs don't host the files, your servers do. They cache copies of the files across their CDN network and serve the files from their cache until the cache expires, then they go and get the file from you again to rebuild their cache.
As a practical example, you might have an image on your webserver. When it goes viral on reddit, the request for the image hits the CDN first, not your servers (that's why they call it reverse proxying), they see that they don't have a cached version of the file, or their cached version has expired, so the CDN sends a request to your server, copies the file, and then proceeds to serve that file from their cache for the next million user requests or until the cache is set to expire (usually 24 or so hours, more than long enough for the traffic hitting your image url to die down).
Basically, the CDN made it so your actual servers (and thus your host bandwidth bill) served one request. Not 1 million requests.
Now typically you will foot the bandwidth bill for the CDN as well, but Cloudflare has a tiered pricing structure that is well below the rest of the competition. See moot (owner of 4chan) talk about cost savings here: https://news.ycombinator.com/item?id=6682324
There must have been some misunderstanding/miscommunication, if not then Cloudflare has pivoted their business significantly from what my understanding of it was (granted I haven't researched them in over a year).
Media is the primary purpose for CDNs. The performance boost comes from a global network caching the media files so when requests are made for the resources, the end user downloads the media from the nearest CDN node instead of your server that is potentially on the other side of the world. It doesn't matter quite so much to have non-media (such as the page html) served locally because the size of an html page is generally significantly smaller than the media embedded in the page.
From the small amount of research I've done on the Cloudflare service just now, it doesn't seem very transparent how exactly it works. I've found information on 4chan and imgur using them to serve billions of CDN requests, but others saying don't rely on their CDN. So who knows, maybe it's on a case by case basis.
...Additionally, the purpose of CloudFlare's Service is to proxy web content, not store data. Using an account primarily as an online storage space, including the storage or caching of a disproportionate percentage of pictures, movies, audio files, or other non-HTML content, is prohibited...
As far as I can tell they go by intent. Hosting a few images and videos for your page is one thing. Hosting an imageboard or video streaming site is another.
Bandwidth have been going down for years. I don't think they release numbers but the community in imgur is pretty active. There's a lot of people browsing imgur directly (they have a voting system, comments...) and know nothing about reddit.
They have a lot of direct traffic to compensate for the cheap hotlinking.
I think your blog post was bad. First of all, they have really unobtrusive advertising so it's a non-issue to start with. Second of all, it's their money paying for the traffic so how they choose to respond to HTTP requests is up to them. If people don't like it, they stop using imgur. If people don't mind, all is ok, imgur get their revenue and users get their cat pics.
Not to mention a surprisingly large amount of people don't know what Reddit Enhancement Suite is - so they're going directly to the Imgur page when viewing.
I constantly wonder about this....and I was willing to pay them for an account -- which they they axed and made it free for all. How can that be sustainable, how?!
I imagine they will run at a loss until they can monetize effectively like reddit. I know everyone tells us that reddit is not profitable but they are selling their front page to advertisers quietly.
I recently saw a front page post that was just a Taco Bell sign that was 20 years old. A fluff bullshit post with little discernable value. Now I don't suggest that the user paid to post it, that sort of stuff would be found out quickly, but it was up voted enough to get it into the hot\rising queue and by virtue of appearing there it made it to the front page.
We know that in the early days the admins/founders used fake accounts to simulate activity on the site and I not imagine that has changed. So they use these accounts to boost up votes and almost guarantee a front page position.
They are also happy to remove front page posts that advertisers don't like e.g sears
another interesting fact is that reddit just last week released api functionality to access reddits cache of all thumbnails and native resolution of post images on their own infrastructure.
Of course they've must have cached thumbnails before but this seems like a giant expansion that must consume rather much resources... or maybe they did this before and just didn't expose the functionality, but it seems tied to their new mobile webpage
Reddit is owned by a billion dollar company, and does not need to be profitable. Especially with all the marketing going through the front page every single day, it's an advertisers paradise. I don't think they're hurting for money.
Contrary to popular belief Reddit is not some grass-roots operations.
It is an interesting definition of independent - they are still owned by another company, and have a minority on the board of directors.
Sure, they are off-leash now, and have been for years. And that may even be the long-term intent. But if someone owns you, they can always change the status quo.
> Reddit is owned by a billion dollar company, and does not need to be profitable.
Tell that to Myspace. A property as expensive as reddit has to have a clear road to profitability or it's going to get the axe. Conde Nast isn't running a charity.
> It's pretty easy for the very small minority of people who don't want cookies to disable them in their browser.
No it's not. At least for Firefox, the cookie preferences feature has been neglected for years. It's hidden beyond an increasing number of clicks and has long standing bugs (for instance, my whitelist of sites I allow cookies from is wiped each time Firefox upgrades)
> Also it's pretty easy for any website that wants to track you, to track you using something other than cookies.
The specific law (details are slightly different in each European country) I'm familiar with concerns storing and processing identifying information. For various reasons, everybody focused exclusively on HTTP cookies, but tracking using, say, ETAGs would fall under the same requirement of notifying the users as far as I know.
At least for Firefox, the cookie preferences feature has been neglected for years. It's hidden beyond an increasing number of clicks and has long standing bugs (for instance, my whitelist of sites I allow cookies from is wiped each time Firefox upgrades)
I think the fact that they're actually making it harder with each new UI revision - and trying to make it go away in some sense - is a sign that their interests are not aligned with those of their users' desire for privacy. It's not so surprising, really, as their revenue largely comes from an ad-supported search engine, and so they would not want to be defeating ad-networks' tracking by making cookie management/blocking easier...
That's not a really fair assumption - I recall the stated reason for this change (and the removal of another few checkboxes, like ones that disable javascript and images globally) is that idiot users would turn it off for some reason, and then complain that sites don't work right.
As much as I hate the idea of protecting people from themselves, there's some merit to this.
Or, they're not putting it front and centre because it's a feature only used by a limited number of (power) users, and generally only set once after install and never looked at again?
If you are in the UK, please vote to withdraw from the EU. This sort of meddling into every minute detail of our lives is only going to get worse. (See also banning vacuum cleaners and light bulbs). Also checkout cars that aren't powerful enough to go up hills due to trying to meet EU emission laws.
I'm not picking on you, but it's amazing how quickly Americans (not saying you're from the US) forget economic events that happened only a few years back.
There are many places in the US where housing prices haven't come close to the peak in 2007. I knew several folks who lost a ton of money ($100K+) on real estate back then. It seems like all of those concerns have evaporated in the last 8 years.
My parents bought a 2-family in Milwaukee in 1980 for around $30,000. They sold it in 1988 for around $30,000. It's still worth around $30,000, if it's still standing and maintained.
And Milwaukee is not, by a long shot, Detroit— it's still barely below its peak population. Wages have declined, however— an average young person when my parents were young would make the same amount of money as in San Francisco: http://www.theatlantic.com/business/archive/2015/02/for-grea...
(All of these numbers are nominal dollars— the house has significantly declined in real value.)
"Property will always increase over the long term"
what makes you think this is the case?
for all the singularity and robot economy talk on here, if give those things have even a small chance of occurring, over 30 years that adds significant risk to real estate values across the United States
that's essentially like the factory in town going out of business across most of the country
Can you not see the typos possible with this? The less characters you use for something, the more error prone. There's a reason we don't write in regular expression syntax.
Who on earth would really write that? Surely you'd use the optional braces to make it clearer:
a => { return b <= 7; }
Sure you can write it without that, but only if you want to write willfully unclear code to annoy people, like writing an entire function body on one line. Just because you can do that doesn't mean that functions are inherently unclear.
Just make it a => (a <= 7), that is perfectly fine for me. (I replaced the b with an a, otherwise it looks pretty pointless or maybe a strange closure hack.)
If the function `foo` is defined as taking a function as its first argument (or even more precisely, a function which takes a number and returns a number), and you try to give it a boolean, then the static type checker will yell at you, and you'll just as easily find out as that fnuction typo.
Spend a half decade writing Perl and you'll develop an eye for minute details like that.
People aren't kidding when they say Perl looks like line noise, but you get used to it and can find your way through even a dizzying regular expression with relative ease over time.
You can get used to it, but if it takes 5 years to get reliable at parsing line noise then that many more programmers are struggling with it at any given time. Why shouldn't languages try to help rather than hinder for 5 years?
C++, by way of example, is extremely complicated and wickedly unforgiving. JavaScript, even at its most surreal, is nowhere near that.
Suggesting that things like => are "too confusing" for JavaScript is to suggest that people that write JavaScript are too dumb to handle it. Is that what you're implying here?
Some programmers write in one language, but many write in several. Having the same shorthand available in JavaScript as in C# is a big deal, it makes things feel better. Being able to apply what you've learned in one domain directly to another is more efficient than having some ridiculously quirky JavaScript-only way of doing something.
That some people will abuse it or be confused is a problem that can be overcome with a little bit of learning. It's not a big deal.
What the heck is the second one supposed to mean? At first it looks a bit like low <= x <= high but with one comparison operator in the wrong direction. I guess it will first compare a and b evaluating to a boolean value, then implicitly convert this result to an integer and finally compare that to 7 again yielding a boolean value. If you write code like that confusion with the arrow notation is one of your smaller problems.
EDIT: Now I got your point - you could accidentally assign a boolean value to a variable when you intended to create a function. One word - compile time type checking. Okay, four, Übersetzungszeittypprüfung in German.
This is a very wrong way of reasoning about probability. The chance that a coin will at some point land on heads does not decrease with the number of flips.
mmmm, I haven't considered this case... I personally preferred the Coffeescript version like this: a->b<=7 which even without spaces is clearer but maybe they had something incompatible with it.
The actual functionality of the first is swallowed in visual noise (function, return). Yes, it's something new to learn for Javascript programmers, but it's useful and makes the meaning of code clearer.
That's not even touching on the this-binding element, which is also incredibly useful in common Javascript code.
Just eliminating the words "function" and "return" doesn't make the code clearer. Anyone competent with Javascript can easily read the first form. The difference in time to read the expression may not even be measurable. If you want to argue that it makes the code neater that's fine, but the meaning is not made clearer by the substitution of sigils for words.
> Anyone competent with Javascript can easily read the first form
And anyone competent with any language implementing map can easily read:
users.map(user => user.name);
...without having to do any "skimming over" the noise. It's not a big difference, you're right, but it's the kind of little thing that, when you let it build up over time, gives you the "write-everything-in-triplicate" feel of Java 6.
Further, you have to be intimately familiar with Javascript to understand why this is necessary:
function fetchUserData(){
var self = this;
userService.fetchAllUsers()
.then(function(fetchedUsers){ self.users = fetchedUsers; });
}
or even this:
function fetchUserData(){
userService.fetchAllUsers()
.then(function(fetchedUsers){ this.users = fetchedUsers; }.bind(this));
}
as opposed to simply writing:
function fetchUserData(){
userService.fetchAllUsers()
.then(fetchedUsers => this.users = fetchedUsers);
}
As has been pointed out though, that is not the primary thing that arrow functions give you. They're really there to avoid having to manually bind functions in order to maintain execution context or use the old `var self = this; function(){/.../}` workaround.
I've been doing ES6 for several months now. Not once have I mistook `=>` for `>=`. Not once have I made a typo when I wanted an arrow function.
Of course any syntax can be abused in such a way to create ugly code. But if I compare
[1, 2, 3].map( a => a * a ); // [1, 4, 9]
to
[1, 2, 3].map(function(a) { return a * a; });
I prefer the former. It's more concise, and strips off a lot of visual noise, and I think it's more readable (the intent isn't wrapped in lots of boilerplate).
That doesn't mean one can't write horrible code with the arrow form. Of course you can. Furthermore, it's not necessarily something you should use all the time, because it's not completely analogous to a normal `function` because it binds `this` lexically. Which means `function` isn't going away any time soon, especially if you need to bind them dynamically.
In short: use the best (syntactic) tool for the job. There are use cases where the arrow makes sense semantically, and there are cases where it doesn't. Use as appropriate, as one should always do.
Actually that code example is hard to read because your variables are called 'foo' and 'a' and you've chosen not to include white space around your operators.
The lambda function is a foundational construct in computer science (1936), and it is often written using an arrow. Hipster fluff it is not.
You are trolling, but arrow functions (unlike those defined with the function keyword) also bind this to that of the enclosing scope. The results in more intuitive behavior in most cases and less explicit bindings.
shrug it's still just code. It still does exactly the same thing as previous javascript code. Syntax changes are pretty boring IMHO, and as I said personally, I find this one much harder to read, more prone to errors, typos and confusion.
At some point things have to stop being called "syntax changes". Just because you can represent the same operation by pressing more keys doesn't mean that it's not useful to add an abstraction on top of it to ease cognitive load, otherwise we'd all be programming with switches.
I think a better argument would have been that adding something that appears to just be a shorthand for writing functions is a potential footgun to language newcomers, but I think that argument is still relatively weak.
At point have stop called . Just you represent same by more doesn't that not to an on of to cognitive , otherwise all programming switches.
My point is, removing "function" and "return" from the syntax, won't necessary easy cognitive load, at least not for senior JavaScript coders. It will save bandwidth though! :P
Javascript has first-class functions and anonymous functions, but so do lots of imperative languages, and there are plenty of other reasons to see Javascript as an imperative language. The reason we end up writing many anonymous functions is because we are using interfaces like foo.map(...) instead of interfaces like for-loops which take a block as a body (because Javascript for-loops are unbearably clumsy, e.g. iterating over properties instead of elements).
You find it harder to read because you're not used to it, that's all. Once you absorb the syntax it'll feel more native, and you'll format it in a fashion that makes it easier for you to absorb at a glance.
That's indeed pretty fun. In practice however this is much simpler:
let sqr = x => Math.pow(x, 2)
let distance = (p1, p2) => Math.sqrt(sqr(p2.x - p1.x) + sqr(p2.y - p1.y))
const zero = Object.freeze({x: 0, y: 0})
let byX = points.slice().sort((p1, p2) => p1.x - p2.x)
let byStartDistance = points.slice
.sort((p1, p2) => distance(p1, zero) - distance(p2, zero))
It's not nearly as composable, sure, but I think almost everyone would understand it much faster. The curried `distance` would also be a bit annoying to reuse in other contexts where you'd have to write `distance(p1)(p2)` instead of the idiomatic (at least now; idioms can change) `distance(p1, p2)`.
That said, the arrow function is a massive win in both examples. I've been using it for a while and never had any issue mistaking it with <= or >=. The linter would probably catch it anyway.
Your parent post skimmed over an important detail, it's not just a new syntax, it's new type of anonymous function with a new type of scope. It's more like:
With a conventional taxi company, if something bad happens, you deal with the taxi company, get compensation, etc etc
With Uber, they wash their hands of it and say it's all the individual drivers fault. So now the drivers have to deal with any bad stuff, and their insurance companies as well.
This is Uber, pushing the risk onto drivers, so it can make more money.
>With a conventional taxi company, if something bad happens, you deal with the taxi company, get compensation, etc etc
In many places, if something bad happens with your taxi ride, you're still dealing with just the taxi driver. They are independent contractors in many places.
I'm not sure what the makeup is of employees vs. independent contractors, but they are definitely out there in significant numbers. In NYC, for example, most are independent contractors, and this has resulted in a whole mess of problems ( http://nypost.com/2015/01/22/1-5m-in-taxi-drivers-money-held... )
pro tip: If you don't want to cover your own liability, don't drive for Uber. I have to have liability insurance for my office, $50/mo or whatever. I could have chosen to forgo it but that would have been stupid wouldn't it?
This isn't the core language changing though. This is people who are new to javascript coming to it and deciding they all must write their "hello world" framework / extension.
Most of it is just superfluous fluff that doesn't actually do anything but change the syntax to something they perceive as fundamentally better, when it's just a matter of taste and fashion.
I'm not sure it's purely a matter of taste and fashion.
Let's say I make a new language called javascript++.
Instead of having `function` be a keyword, I chose `functioooooooooooooooooooooooooooon`. Based on their syntaxes, do you find one fundamentally better?
Well clearly "function" is "better", because it's less prone to typos, easier to read, and makes more sense. But if you can make a good argument to go with "functioooooooooooooooooooooooooooon" then go for it.
Isn't everything available on youtube for free these days? Or radio etc. I can't imagine paying for music. Unless it's an extremely rare CD I can't find anywhere else.
I pay Spotify for usability and UX. Google Music might be couple of euros cheaper but the UI is worse (especially on mobile). Piracy and saving files to different devices takes time and effort, streaming is easy. Hunting down good quality uploads and creating playlists based on albums on Youtube? No way.
I had to use Google Music as the wifi at my old work, which was supplied by the local uni, had blocked Spotify.
This means I'm pretty invested in it right now, but god damn they just totally fucked up the desktop interface too with a material redesign. Everytime you open it, you have to click the burger icon just to see the menu. You can no longer view your present playlist in a permanent window, only in a popup. I add a lot of artists to my thumbs up playlist on a whim and then listen to it on shuffle, so like to see what I just listened to/is coming up. And now it's loads of clicking instead of an alt-tab. All the artist photos are now inexplicably circles making it hard to distinguish them by scanning.
Google cannot design anything. They keep getting worse, even as they employ designers. Everything they touch recently they make the UX worse in their quest to turn everything into a tablet interface, aka material.
I would agree with this. I have a Samsung tablet from last year (yes, an entire 6 months ago) and in that time Google has introduced the hamburger menu everywhere, and the "swipe from the left" navigation item.
The physical menu button on the device DOES NOTHING in these apps. It's stupid - why not map menu to the hamburger menu? Or are they confused about whether menu should open the hamburger or the side navigation?
When I bought my TMobile G1 (yes, classic eh) it had menu, home, and back. Then, they introduced a "search" button on the HTC Desire and it lasted until the Motorola Atrix I had. Yet in that time, it stopped doing anything in certain apps.
After that, they completely binned it.
Now the buttons are being made even more redundant. I wish they would make their mind up and not rewrite the UI guidelines every Google I/O. It's STUPID.
I think this Samsung is the last Google device I will buy - now that iOS does split screen, I may jump ship (but I will miss this stylus). At least things run smoothly (Google Maps in 3D on a Samsung quad core is jerky and SLOW; it's worse on the 8 core).
Google hasn't been using the menu button for many generations.
It went away with the Galaxy Nexus, and since that you've had the Nexus 4, Nexus 5 and Nexus 6. Seeing that they release one per year, that's 4 years ago.
Blame Samsung for still keeping a button layout that doesn't apply to android since the original 4.0 came out.
Very informative, thanks! In that case I will direct my rage at Samsung for including it, but also at lazy app developers who fail to map MENU PHYSICAL BUTTON to the hamburger menu.
I think a lot depends on what your income level is. If you have any interest in music, having a well curated music service is trivially worth $10/month, particularly to avoid the hassle of trying to track down good tracks of what you are interested in, deal with ads, etc...
And, the good news is that as paid-for-streaming starts to take off, it creates an ongoing revenue model for artists, ensuring that the labels/artists have incentives to create great new music.
And, between Pandora, Spotify, Tidal, Beats/Apple Music, Rhapsody, Rdio, google Music, Apple Radio Stations, Beats 1, iheartradio (ironically, my favorite) - lots of competition.
For some people curation and editorial responsibility is considered a valuable feature. Time spent hunting for freebies is time I could spend otherwise - i.e. saving me time to find the thing I want is something that provides me value that I am willing to pay for.
Radio doesn't have options, and has ads (as does youtube but I can block them). I can't play youtube efficiently and safely while driving, and it's a much higher drain on battery life and bandwidth. My main use case for spotify is driving music, followed by curated playlists while coding or gaming
The sound quality on youtube is really bad, the UI is worse and you waste bandwidth on video. It's also missing features such as shuffle play and defining what is in the upcoming queue. It is also a stand alone application so it you don't need to run your web browser.