Is URL shortening bad for the web? - <AUTHOR>

I see more and more sites doing the URL shortening services. They're pretty popular because of things like Twitter, text messaging, etc. But, is this good for the internet? Most of the shortening services are not content-aware; the URLs are just obfuscated and as short as possible. Just wanted to see what everyone thinks about these services and how they'll change the way we link to thinks. <comment><USER2> If you believe that a) links are good for the web, and b) everything disappears at some point, then link shortening services are bad for the web.

A shortened link will disappear when (not if) the shortening service disappears. If that is sooner than the site it was linking to disappeared, then it's a net negative for the web.

Link shortening services for the domain they live on are slightly less bad, since their lifespan is somewhat more likely to be equal to that of the destinations of the links (although it's still likely they'll live shorter).

<comment><AUTHOR> I didn't even think about that aspect. That makes them seem even worse than I had really thought.

</comment></comment><comment><USER3> While another comment argued otherwise, I would claim that link shortening could be considered worthwhile DUE to the analytic features available, at least from the perspective of the poster.

That's ultimately what the argument comes down to: perspective. From the perspective of the poster, link shortening allows for a larger dissemination coupled with analytics. From the perspective of the web, link shortening creates a problem for the future (as they begin to break).

<comment><USER4> I actually agreed the analytics were good :) just that many would argue from a privacy perspective

</comment></comment><comment><USER4> I don't really see how they are bad for the web, a shortened link is still a link, reading Tim-bernes Lee today (<http://bit.ly/dhfd2S>) he emphasized the importance of links and links from anywhere to anywhere rather than walled gardens like Facebook or iTunes. In fact increasing amount of internet connectivity is on mobile devices and with the smaller space and harder to use keyboard shorter links are essential. As you say it would be imposibble to use a service like twitter to its full effect without link shortening.

One downside could be the extra tracking and analytics URL shortening services provide, and people could see this as an invasion of their privacy. Personal belief is that there is so much tracking in the form of web analytics that goes on on the internet anyway that URL shortening is hardly making a difference. It has also provided some businesses like bit.ly with a way of generating revenue and creating jobs and for bloggers and people like me who do like to share what I find interesting on Twitter or Facebook with a way of seeing if anyone is actually reading what I have shared

<comment><USER5> They're usually considered bad for the web because, if the shortening service goes away any hyperlink that used the shortener instantly breaks.

Dead links are a fact of life on the web, but it's the idea that one domain- name going away would break links to thousands of different domains that unsettles people.

<comment><USER4> Fair point, but is this not just a reason for sites to register their own URL shortener? e.g. if you shorten something from techcrunch or read write web it shortens to their domain rather than bit.ly etc. Alternative is to also use goo.gl for more stability

</comment></comment></comment><comment><USER6> It's another example of artificial scarcity, a phenomenon that is prevalent in many aspects of our society. Twitter and mobile carriers have gone to great lengths and scales to artificially inflate the value of a byte of data.

<comment><USER7> The economist in me loves this explanation. Any articles on it?

<comment><USER6> No, it's my personal interpretation of the demand for short URLs. But there were lots of articles when they started jacking the prices of SMS: <http://gthing.net/the-true-price-of-sms-messages>

Twitter is basically the same idea but applied to blog posts, and that is what created the market for short URLs.

</comment></comment></comment><comment><USER8> URL shortening is just a pun. The web is unchanged except that certain long URLs can be referenced with a shortened, more compact name. The longer, cumbersome name is still there. Guessing long and complex URLs is not a common modality of use for the web. Search and links rule.

The persistence issue is a big more complex since the validity of a link depends upon a third party. Shortened links are ephemeral like everything else on the web and may not always be a good choice.

</comment><comment><USER9> I find these services appropriate only if;

\- Used in a web app to share a link, or to brand the shareable link. i.e. shareable URL for each email newsletter promotion.

\- Able to gather stats like a statcounter, who are the referrer, browsers, keywords, etc.</comment>


NASA Satellites Unlock Secret to Northern India's Vanishing Water (2009) - <AUTHOR> http://www.nasa.gov/topics/earth/features/india_water.html <comment><USER2> This isn't news. My parents have a farm in northern Rajasthan. They use only groundwater for irrigation. Every few years since the early 80s, they've had to dig deeper and deeper wells because the wells keep running dry.

On the other hand, in Western Rajasthan, due to the canal coming down from Punjab, the groundwater is only a few feet deep in places; the land has become waterlogged.

</comment><comment><USER3> Appears to be a 2009 article. Nonetheless it is a fact that people keep forgetting about. Our focus continues to be on the monsoon. If none, blame the gods. If it rains...enjoy. Harvesting, what?

<comment><USER4> yea from august 12 2009.

just saw elsewhere in news on April 3 2016 Uma Bharti/govt decided they will do something about water issues, only if the monsoon is light...

i dont think they are still understanding the problem ~6 years later.

other sources say israel is going to help india on water management?

and then if you want a more recent article on the matter: [http://www.bbc.com/news/world-asia- india-35888535](http://www.bbc.com/news/world-asia-india-35888535)

</comment></comment><comment><USER5> Man this is so depressing. I wonder why Indian media focuses on other useless issue s when there is a huge crisis along the way...

<comment><AUTHOR> They just create crisis and other issues to divert the attention of people.

</comment></comment><comment><USER6> it's mind-blowing how they can measures such subtle changes in the earth's gravitational field, AND they're already using this to acquire practical data

</comment><comment><USER7> Even South Indian agricultural practices are not much different. As of now there is big water shortage in Hyderabad and I think South India also will also showup in NASA's next year pictures. Very depressing, and lets hope this will ring some bells and wake up some people.

</comment><comment><USER8> I don't know why NASA is tracking these levels in India, but this is a huge wakeup call for the region and will help prevent a potential crisis (including economic crisis for India). These regions constitute a majority of agricultural regions in India.

<comment><USER9> "I don't know why NASA is tracking these levels in India"

Because's it's basically in their job description? [https://www.nasa.gov/offices/ogc/about/space_act1.html#POLIC...](https://www.nasa.gov/offices/ogc/about/space_act1.html#POLICY)

"...Objectives of Aeronautical and Space Activities. The aeronautical and space activities of the United States shall be conducted so as to contribute materially to one or more of the following objectives:

1) The expansion of human knowledge of the Earth and of phenomena in the atmosphere and space. ..."

</comment></comment><comment><USER10> The article is about 7 years old , couldn't find any recent data or study on the matter ??

<comment><USER11> More recent work by a portion of that same team, with much more information: [http://www.jpl.nasa.gov/news/news.php?feature=4626](http://www.jpl.nasa.gov/news/news.php?feature=4626)

GRACE has opened up this whole area over the last few years. It's very hard to monitor groundwater, even well data is not that usable for various reasons.</comment></comment>


Reducing Risk for Misdiagnosis of Gifted Children - <AUTHOR> http://www.psychologytoday.com/blog/creative-synthesis/201201/many-ages-once

<comment><AUTHOR> _"Giftedness is 'asynchronous development' in which advanced cognitive abilities and heightened intensity combine to create inner experiences and awareness that are qualitatively different from the norm. This asynchrony increases with higher intellectual capacity. The uniqueness of the gifted renders them particularly vulnerable and requires modifications in parenting, teaching, and counseling in order for them to develop optimally."_

Our education system, especially No Child Left Behind, is likely to squash a lot of gifted talent because it demands conformity.

I wonder how giftedness presents itself in adults? What are traits we'd see in (clinically) gifted adults that become developers? And do we need to treat these individuals differently to allow them to achieve to their potential? Sorry, more questions than answers.</comment>


WhatsApp Encryption Is a Good Start, but Businesses Need More Security - <AUTHOR> http://nuro.im/whatsapp-encryption-businesses-need-security/ <comment><USER2> 1- serve your content over HTTPS ...</comment>


Show HN: Convert Font Awesome Icons to PNG Image - <AUTHOR> https://fa2png.app <comment><AUTHOR> I used [https://fa2png.io](https://fa2png.io) a lot previously, but it seems the website got hijacked by someone else since last month. I have since made a replacement for it, hope you find this useful!

</comment><comment><USER2> Nice, easy and useful. A like from me</comment>


Show HN: Auto-Cluster RabbitMQ with AWS Autoscaling Groups - <AUTHOR> http://aweber.github.io/rabbitmq-autocluster/ <comment><USER2> RabbitMQ is a great tool, but you should always test your deployment with a tool like Jepsen. Rabbit has historically had issues with multi-node clusters related to split-brains and dropping ack'd messages following network partitions. In contrast, I've had very few issues using Rabbit shovels, a store-and-foreword plugin:

[https://www.rabbitmq.com/shovel.html](https://www.rabbitmq.com/shovel.html)

ps: s/foreword/forward/

</comment><comment><USER3> Looks like a helpful project.

Having said that the clustering is often not the hard part with rabbit, well configuring it at least.

The more difficult issues are keeping it clustered amidst your typical day of network hiccups in cloud environments, as rabbit can be sensitive, preventing mnesia from going out to lunch, and as far as scaling goes certainly it can't go without mention proper planning, including queue HA strategies and ownership.

Since rabbit doesn't just scale each queue across all boxes in a way that distributes load, a smart team will use several queues carefully plotted onto specific hosts that own each queue and carefully replicate that to a small number of other rabbits but certainly not more than a small amount of other hosts and never the whole cluster.

For these reasons I have to think that this would be a nice addiction to aid in setting up clusters and maintaining a fleet size, actually scaling and operating a high volume rabbit cluster this would only be a small tool in the toolbox however.

Without knowing the whole picture of what kind of workload birthed this approach it makes me nervous to think rabbit would be managed by autoscale, prone to its deciding it wants to replace pieces of the cluster at any time, different high volume queues landing on different hosts, mnesia deciding it doesn't want to play ball anymore etc..

Possibly it's for very volatile workloads, none of the queues are HA, and this plugin forcefully does a hard reset of rabbit to recluster it when something goes awry?

<comment><AUTHOR> Our use case is not for scaling the cluster up and down, but rather for ensuring cluster size and stability. When AWS nodes randomly go away or are retired, etc, the autoscaling group will ensure that we keep N nodes in the cluster and they're up and running by using ELB health checking.

This is the first version that has the destructive action of removing nodes from a cluster when they disappear and even then it's behind two different config variables: One to turn cluster health checking on and the other to actually do something when bad nodes are noticed. Bad nodes being nodes that are no longer visible in the service discovery backend and no longer pingable by the cluster.

<comment><USER3> So if you have an ASG of 4 nodes and one goes down, how do you know that the traffic will land on the right node? What if that node is really busy? When the new machine comes up automatically does the system migrate queue ownership to it? Is there a time when the system can be partially unavailable?

Possibly most importantly would be, how are you routing queues to hosts and how is the platform load balanced. Using ELB and a tcp listener is a great way to throw away performance with clustered rabbit, not to mention adding a ceiling as to how wide the cluster can get.

<comment><AUTHOR> In our case, we use queues in ha-mode:all and queue ownership isn't as much of an issue there. Our biggest limiter for some of our workloads is actually message size, not velocity. That may change in the future.

You're absolutely correct re load balancing for high-performance/ceilings/etc. It's not a huge issue for our use, but I can how it can be for others. In my previous environment, for example, it was absolutely critical.

I'm sure this tool isn't for everyone, for us it was about making cluster startup easier and letting RabbitMQ handle that instead of a configuration management system like Chef/etc.

For example, our test environment is torn down every night on an autoscaling schedule and rebuilt in the morning. Not having to worry about config management for starting up a new RabbitMQ cluster on demand is a nice feature. :)

Thanks for pointing out the clear (and accurate) concerns one must consider when running RabbitMQ @ scale. It sounds your experiences are similar to my own with where the gotchas can be.</comment></comment></comment></comment>


Ask HN: If anyone could help me here, I cant find and article I read here - <AUTHOR>

The article had to do with modern slavery. Cant seem to find it using searchyc.com <comment><USER2> <http://www.foreignpolicy.com/story/cms.php?story_id=4173>

Is this it? Behind a paywall now, but you can probably get it somehow. I searched for human slavery across comments on searchyc.

<comment><AUTHOR> Yeah, this is the one! Thanks :D

</comment></comment><comment><USER3> Maybe this one, found by a site-restricted Google search:

<http://news.ycombinator.com/item?id=550719>

<comment><AUTHOR> Thanks, but its not that one. :P It had to do with the possibility of being able to buy a person at caribbean islands for USD $500.

<comment><USER4> Was it about a book entitled "A Crime So Monstrous"?

</comment></comment></comment><comment><USER5> Maybe this one: <http://abcnews.go.com/Nightline/Story?id=5326508></comment>


"Disclaimer" vs. "disclosure" - <AUTHOR> https://english.stackexchange.com/questions/115850/disclaimer-vs-disclosure <comment><AUTHOR> Disclaimer is probably the word I see misused most often on HN.

A simple rule of thumb: unless your statement is appearing at the end of political ad or work of fiction, you most likely want to use "disclosure."

More simply: just leave the word out and make your statement. You can write "I work for company X" without putting "disclosure:" in front.</comment>


Logo redesigns of 2010 - <AUTHOR> http://www.pixelonomics.com/30-logo-redesigns-2010/

<comment><AUTHOR> Is Google good enough to be featured here?</comment>


All about java.util.Date - <AUTHOR> https://codeblog.jonskeet.uk/2017/04/23/all-about-java-util-date/ <comment><USER4> I think the article gets at this, but the biggest "eureka" I had was when I realized that java.util.Date is _just_ sugar around a long value (ms since the epoch). Thus, wherever you use a Date, if you would NOT consider using a long there, then Date is the wrong choice. E.g. timestamp for log entry records - yeah, makes sense. Days on a schedule app - definitely wrong choice.

Of course, as the article and other commenters have said, just use jodatime or the Java 8 equivalent.

<comment><USER5> Or just use a long...

<comment><USER6> Before Java 8 and Jodatime, it was better to use java.util.Date than a long, for type-checking and self-documentation.

If a function accepts a java.util.Date and you pass an id of some database object by mistake, you'll get a compile error. If the function accepts a long you won't.

If a function accepts a java.util.Date and the parameter is called "start" you know it accepts an instant in time, if it accepts a long you might think it could be something else.

Yes, the class is terribly named, but before there was Java 8 and Jodatime, it was better to use it than a long.

<comment><USER7> It is not always a good idea to box primitives so that you can have compiler point out mistakes. Yes, it is good for developer once or twice, but end user will suffer performance hog forever.

<comment><USER8> Modern JVMs are pretty good at optimizing away the overhead of boxing primitives. So don't throw away the advantages of type checking unless you have hard evidence of an actual performance problem.

</comment></comment></comment></comment></comment><comment><USER9> I'll never understand why they thought 0-based months made sense, but then used 1-based days and 1900-based years. Even if C did it. Almost feel like I can hear the committee:

"Meh it's only a Date class, no one will really use it, will they? Billy already committed the code for 0-based months. Who here does _not_ think of January as month zero?"

 _feet nervously scuffing carpet_

"Right, settled! Moving on, company picnic is on the 1st of 0 next year (96)".

<comment><USER10>
        > I'll never understand why they thought 0-based
        > months made sense, but then used 1-based days
        > and 1900-based years. Even if C did it[...]

Java, Perl etc. all copied this pattern from localtime() in C. In all of these languages it's idiomatic to write something like:

        printf("%s %d, %d\n", mnames[mon], mday, year);

To print out e.g. "January 6, 78". The reason month days aren't zero based is obvious, usually when you use them you aren't going to have go through a lookup table, whereas nobody calls January "0" or "1", so you'll always need a lookup table.

Indexing months by 1 would mean declaring the "mnames" array would be the un- idoimatic:

        char *mname[] = { NULL, "Jan", ... };

Instead of:

        char *mname[] = { "Jan", ... };

Or you'd need to use the latter form and do lookups by mnames[mon - 1] instead of mnames[mon].

The reason you have to add 1900 to the year is that when C was made it was standard for software to use two-digit years, and if you told some of C's designers back in the 70s that we'd still be using & discussing these APIs in 2017 they'd probably have laughed at you.

Of course sometimes you need to use month indexes themselves, e.g. if you wanted to print out 1978-01-06 in a log file:

        printf("%d-%d-%d...\n", year + 1900, mon + 1, mday, ...);

But such are the trade-offs of low-level API design. I guess C's designers took the inherent idiomaticness of zero-based indexes & expectation that the common case would to print out month names over such use-cases.

<comment><USER11> > whereas nobody calls January "0" or "1"

Eh, in many locales it's idiomatic to refer to months by number, not by name, especially in the "short form" of a date. So you end up having to add one to the month number. But of course when they made C they didn't think about internationalization either...

</comment></comment></comment><comment><USER12> _How do I convert a Date to a different time zone? You don't – because a Date doesn't have a time zone._

There's something about this, and the way we think about dates, which makes it very hard for some people to understand. Some people get it immediately, others never will. Not wanting to sound superior (I think the Date object seems almost designed to foster this confusion), but I've lost count of the number of times I've spent a long time explaining this, and then at the end of it all the person still says something like, "OK, well we'll just use this GMT Date then."

<comment><USER13> For me, the moment the penny dropped was the realisation that "Timezone" is a presentation layer issue. _i.e._ it's not something you should concern yourself with until you're rendering it to be read by a human. Otherwise just using some well-defined simple convention such as epoch-time is fine throughout your application. There are exceptions such as doing date- calculations and such, but I extend my rule of thumb such that these kinds of things should be converting _from_ epoch time (e.g. to `Calendar`) for the calculation and then back again.

<comment><USER14> I agree, I find it a well working convention to use UTC times for everything in an app, and convert to local time zone only at the time of display when formatting the date as a string.

<comment><USER15> Unless you are dealing with recurring events that happen at a specific time of day, in which case you need to know the local timezone to avoid off-by-one- hour errors if daylight savings kicks in.

<comment><USER14> Yes, I'm sure the use cases I've had to deal with have been very simple to start with.

</comment></comment></comment></comment></comment><comment><USER16> _So how do computers represent instants? They typically store an amount of time before or after a particular instant which is effectively an origin. Many systems use the Unix epoch, which is the instant represented in the Gregorian calendar in UTC as midnight at the start of January 1st 1970. That doesn't mean the epoch is inherently "in" UTC – the Unix epoch could equally well be defined as "the instant at which it was 7pm on December 31st 1969 in New York"._

A thousand times yes. I see many developers confused by this. The Unix epoch is not inherently specific to UTC, it just happens to have a round date when described in that time zone. Seconds (or milliseconds) since the Unix epoch is a unit _without timezone_.

<comment><USER17> You say "it just happens" as if it's a coincidence. It was a deliberate choice.

<comment><USER18> And timezones are a completely orthogonal issue if you note that epoch is defined as "midnight at the start of January 1st 1970" _in UTC_.

</comment></comment></comment><comment><USER19> Several years ago I answered a question on StackOverflow "what's wrong with the date and time api in Java"

[http://stackoverflow.com/questions/1969442/whats-wrong- with-...](http://stackoverflow.com/questions/1969442/whats-wrong-with-java- date-time-api/1969651#1969651)

Considering how long ago it was answered, it took a /long/ time for the Java 8 replacement to come on board and give some sanity back to Java date computations.

<comment><USER20> It took a long time for Java to fix anything before Java 8.

The Sun-Oracle changeover sort of crippled change in the Java language for almost a decade.

<comment><USER21> Java 8 was released 5 years after the Sun Oracle acquisition. What do you mean by decade?

</comment></comment></comment><comment><USER22> For many years my advice to other java devs has been to avoid using java.util.Date and Oracle date columns where possible - for all the reasons given in the article, but generally because they don't always do what you expect.

The reason is that these dates encapsulates one concept of date (a point in time), and devs often try to use it for another (the legal date).

A legal date is fixed. It also has no time zone, but in a different way - <USER2> will not look different when viewed from another timezone. I was born on the opposite side of the world to where I live. The DOB on my passport didn't change, as I moved around the world.

Too often the user inputs a legal date. Software translates this to a point in time so it can be stored in one of these dates, the TZ info is lost, and before you know it the software is displaying a date other than that input. A bug is filed, a dev investigates and hacks code to add one hour, the bug is closed, and another opened when we pass into daylight saving.

It doesn't have to be like this - even MS Excel knows to just use a day count.

<comment><USER23> I am not using Java but I am right now making a booking system. I am storing local time (with Offset) and the timezone identifier such as "Europe/London".

How does using Day Count help?

<comment><USER22> Sorry for being oblique.

A day count is just the number of days since some arbitary point. Say today is 42849, tomorrow is 42850, etc.. If the user enters the 24th April 2017, you store 42849. When you read it back 42849 is always displayed as 24th April 2017.

There is no magic - you could just store 3 integers, or a formatted string say "20170424". Anything that doesn't involve timezones.

Perhaps, with your programming language you don't get the same issues, but to use java.util.Date you have to parse this into a number of milliseconds since 1 Jan 1970. You might round it down to midnight at the start of the day - <USER3> the end. You might select midnight according to local time (with or without daylight saving), you might use UTC, or you might unwittingly leave it to the machine. To persist this to a DB you might use some ORM mapping like Hibernate - which without careful configuration may also make some assumptions about timezone, and Oracle might do the same. By the time the value is read back, your date may not be the same one entered - and this may not show up until you pass into daylight saving.

<comment><USER23> Not at all, I was genuinely curious. Thanks for the detailed response, I understand what you were getting at.

</comment></comment></comment></comment><comment><USER24> The misleading name is the worst misfeature. I've had to explain to at least half a dozen coworkers that Date is not a date, but a timestamp. Some people just refuse to believe it, perhaps because they trust the Java designers more than me, as you normally should.

Often they persist in thinking "it's just a more detailed date, 17:08, April 23 is still April 23".

Then I have to explain that every Date object is on two different real dates. That's a _big_ struggle for many.

</comment><comment><USER25> This confused me with Foundation's Date class as well. I think it's really important to have abstractions that are really clear. Like for example I had to represent Open Hours for business and wanted a way to represent 4pm on Monday. That's surprisingly hard (in Swift and Java) because the APIs want you to realize the complexity of Time. But I don't care. I want an abstraction that says "Yup it's Monday at 4pm in Santa Clara". I think better Date and Time libraries that deal with more user facing things would be great.

<comment><USER26> `NSDate` used to support creation from a "natural language" phrase: [https://developer.apple.com/reference/foundation/nsdate/1415...](https://developer.apple.com/reference/foundation/nsdate/1415776-date)

It was deprecated recently, however.

<comment><USER27> Even further back, there was an NSCalendarDate class that was supposed to represent the human concept of a date. IIRC they got rid of it because they felt like it muddled presentational concerns with data structure concerns. It was pretty convenient, though.

<comment><USER26> Yep, I had to do a bit of fuddling around with DateComponents and it was _painful_.

</comment></comment></comment></comment><comment><USER18> Tangential, but one of the best sources I've seen on issues with times and dates is Eric Naggum's "The Long, Painful History of Time".

[http://naggum.no/lugm-time.html](http://naggum.no/lugm-time.html)

Notably, besides outlining the complexity of the domain, the article also serves as explanation of decisions made by author in implementing local-time, a popular date/time library for Common Lisp.

</comment><comment><USER28> _It doesn't have a calendar system._

Hopefully this won't come off as mere quibbling about terminology, but to me it makes more sense to say that it _does_ have a calendar system, it's just that it isn't any of the ones humans use. When I write "April 23, 2017 6:04pm CDT", the calendar system is Gregorian. If I were to write the integer value underlying a java.util.Date, I would argue the calendar system is Unix Epoch.

Both are systems that pick out arbitrary points in history (year 1 AD or midnight January 1, 1970) to base numbers off of. Both have rules on how you manipulate those numbers and what values mean.

If someone persists in asking what the time zone is for a java.util.Date, I would probably tell them that, more or less, it has _its own_ time zone. This isn't quite true, but it's close because time zones are basically parameters for parameterized calendar types, so a time zone kind of implies a calendar.

Anyway, the point is that thinking of it as its own calendar system hopefully makes it clear that it stands on its own.

<comment><USER29> So this isn't super exact in the common usage of calendars, in part because calendars are usually implicitly fixed to a timezone (hence Google Calendar asking to change your calendar's timezone).

For example, December 25th might be Christmas, but you cannot define two Dates that "delineate" Christmas in the world, because the start time is different dependent on the time zone.

While this is kinda pedantic to Earth calendars, it's also the kind of problem that most commonly causes issues in our programming.

You can do "if date < christmas", but it most likely won't do what you want it to do if your program is meant to run in many timezones.

<comment><USER30> _For example, December 25th might be Christmas_

Except in countries where "Christmas" tends to refer December 24th and December 25th is "Christmas Day".

<comment><USER13> Indeed - in this case you're talking about _locale_ rather than _timezone_.

</comment></comment></comment></comment><comment><USER31> Javascript seems to have many (if not all) of the same issues. I learnt this firsthand a while ago when I knew nothing about these issues and just assumed that getting the Date of a particular time instant would be an easy task. See rant below:

[https://github.com/jonhoo/wp2ghost/pull/8#discussion_r847977...](https://github.com/jonhoo/wp2ghost/pull/8#discussion_r84797728)

</comment><comment><USER32> One similar thing that's always bothered me conventionally. Why is it `System.arraycopy()` and not `System.arrayCopy()`?

<comment><USER33> actually, why not System.copyArray(). arraycopy() suggests that the method returns a copy of the array ( sorted() vs sort() )

</comment></comment><comment><USER34> The discussion around monotonic time in golang is one of the most indepth discussion around time handling that I ever saw. Not sure if java covers all these scenarios.

[https://github.com/golang/go/issues/12914](https://github.com/golang/go/issues/12914)

</comment><comment><USER35> The story I've heard was the java.util.Date was written by an intern at Sun.

I think that would explain a lot.

<comment><USER36> Actually the First author mentioned in the source is ... James Gosling!

[http://grepcode.com/file/repository.grepcode.com/java/root/j...](http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/Date.java)

</comment></comment><comment><USER37> A relic of 90s programming. Perhaps we can take a moment to realise we are not just doomed to reinvent things that were done properly in the 70s. Looking back there were plenty of things that were just poorly thought out and this was one of them.

<comment><USER35> My very first job out of university involved the Y2K bug. Believe me, things weren't done properly in the 1970s (note the 4 figure date there. The scars are real...)

</comment></comment><comment><USER38> While the content is spot on, I disagree about the title - it's more of an introduction than an 'all about'. You understand it best if you already know how to (not) use java.util.Date...

</comment><comment><USER39> TLDR: It sucks balls use Jodatime

Edit: I was wrong my bad

<comment><USER40> > Note that from Java SE 8 onwards, users are asked to migrate to java.time > (JSR-310) - a core part of the JDK which replaces this project.

[http://www.joda.org/joda-time/](http://www.joda.org/joda-time/)

<comment><USER41> So basically a joda-like sane api was included as a JSR, making joda obsolete?

Are there any such plans for .NET and NodaTime? They have a more "everything is a package"-philosophy these days, but sensible dates and times really ought to be right in the corlib, especially since the _bad_ dates and time apis are already there.

<comment><USER42> I've mentioned a few times to MS folks that I'd be very happy for the mscorlib team to make Noda Time redundant. They haven't bitten yet though.</comment></comment></comment></comment>


The power and decline of imagination - <AUTHOR> http://experimentgarden.blogspot.com/2009/07/power-and-decline-of-imagination.html

<comment><USER2> This is not exactly a novel viewpoint (and, yes, that is somewhat ironic), but it is presented very well here. I especially liked the admonition to "do something that no one has ever done before". This is the kind of thing I love seeing on HN. Thanks for sharing.

</comment><comment><USER3> I am pleasantly surprised to see one of my own articles on here which I did not submit myself. I'm glad someone liked it enough to submit it.

Thanks HN.</comment>


Balsamiq 2.2 is here - <AUTHOR> http://blogs.balsamiq.com/product/2012/09/09/balsamiq2-2/ <comment><USER2> Holy moly. Maybe I'm a latecomer, but never tried this before. Now after a quick 5 minutes I'm searching for the credit card. I hate you guys.

I believe I hold the cynicism record on HN and even I'm impressed.

<comment><USER3> Balsamiq is a tool you don't think about needing, but when you find it, it fits like a glove and you wonder how things ever got done before it.

Moreover, Peldi's blog is frequently featured here on HN, and he writes cogently and about interesting things. These posts, in particular, struck a chord with me: <http://blogs.balsamiq.com/peldi/2011/09/07/policies/>

<comment><USER4> Yeah, there really is no comparison when it comes to wireframing. In terms of creating client deliverables and complete documentation we export the wires to PNGs and place them in an InDesign template we have.

The template allows us to add an extra layer of notation and InDesigns file linking capabilities makes updates/changes a snap.

I had hoped that myBalsamiq would fix these issues but alas it did not. It works for collaborative, iterative team work but falls down flat for big 'Sprint 0' planning. Maybe one day it will get there but it needs to add some features to hit scratch that itch.

Now, whether or not that is in their big picture plan is up in the air. It did take them this long to get rid of the 'sketchiness'.

<comment><USER5> Hi mattyfo, Peldi from balsamiq here. We have not really attacked the commenting feature in myBalsamiq yet, what we have in regards to commenting is really MVP at this point. We'll do it right, stick with us! ;)

</comment></comment></comment></comment><comment><USER6> I was a fan of Basalmiq (it's a terrific tool), but since learning to prototype in Keynote, I've not used it.

Here's something to get you started if you're a Mac user, and have Keynote: [http://blog.amirkhella.com/2010/06/16/how-to-prototype- inter...](http://blog.amirkhella.com/2010/06/16/how-to-prototype-interactive- ipad-applications-in-30-minutes-or-less-using-apple-keynote/)

I especially like using Keynote for higher-fidelity mockups, which I find is essential for mobile development...

<comment><USER7> I think you are mixing two different concepts.

Balsamiq is about creating wireframes. Wireframes are there especially to not mimic too much the "final" product so that you can concentrate more on the feature an flow aspect without suffering of the interference that the visual elements could create.

Keynote, at least the way you are using it, is to create mockups. Mockups are there to crystalize (or invalidate) the ideas expressed in the wireframes together with the branding you are creating for your application.

<comment><USER8> I agree with the distinction, but the product itself is called _Balsamiq Mockups_ :)

<comment><USER5> I should have called it Balsamiq Wireframes, but I figured it out when it was too late to change it...oh well. :)

</comment></comment></comment></comment><comment><USER9> I wonder if Peldi has plans to move Balsamiq off of Adobe Air. Given the recent pivots Adobe has made regarding Flash, there seems to be some risk with sticking with Adobe Air in the long term.

<comment><USER5> Let's just say we're paying careful attention for now...

</comment></comment><comment><USER10> Congrats to the Balsamiq team! To anyone who isn't using Balsamiq yet, do it-- an astoundingly useful bit of software. It's difficult to convey just how valuable this tool is for anyone that makes software/website for people to use.

The fact that everyone at the company is friendly and helpful and awesome is a _significant_ bonus.

</comment><comment><USER11> I've been using Balsamiq for 2+ years. I use it a lot for mobile apps. Unfortunately, Balsamiq has been painful to use lately for mocking up mobile screens. It doesn't have the latest mobile ui elements so I have to build them up from scratch. This update doesn't change this.

There's a market for an easier way to mockup mobile app screens and Balsamiq is barely addressing this segment right now. I am waiting for the day a new product comes out specifically designed for mocking up mobile apps.

<comment><USER12> Blueprint on iPad if you're talking about iOS. Not sure for Android.

<comment><USER12> By the way, Balsamiq could be killer on the ipad. It already has a fun and tactile feel that fits the ipad perfectly. To Balsamiq: imo, you guys should just ditch flash and use your vision to make something much better in c/obj-c that includes lots of mobile and tablet components in addition to web. You'd have a ton of customers.

<comment><USER13> We are a bunch of indie developers who felt exactly this way! So, we cranked out a tablet app (both iPad and Android) that lets you import Balsamiq bmml files onto your device and edit/present your screens. Please feel free to take it out for a spin here: <http://www.mockups.me/wireframes/tablet.html> \- any feedback is appreciated!

</comment></comment></comment></comment><comment><USER14> I had been a big Balsamiq fan, especially because of the low fidelity, but have since moved to Mock Flow which seems to work better for teams and multi- page designs.

</comment><comment><USER15> Looks like a great update! I've always loved how Balsamiq didn't give options for the skinning of the mockups as it made it easy to say no to clients that wanted to spend more time on that. However, I can see how that would be a popular request and it seems like they integrated it very well into the app.

</comment><comment><USER16> myBalsamiq is by far the most simple/cost-effective tool I've used for wireframing. Being distributed with version control was particularly unique and helpful, as far as potential competitors go.

As a random usability thing, they also handle renewal notifications without being annoying. I don't need an email every hour that my subscription is expiring, and the earth doesn't shatter once it does. If I decide not to renew, I can still download all the mockups I made when I had the subscription. If I decide I need to get back into the program, a couple clicks and I'm back in for $12/mo. Small stuff like that makes feel like they're not trying to suck every penny out of me, which is why I don't hesitate to go back to them when I need to.

</comment><comment><USER17> It would be a wonderful day for managers of the world if Balsamiq was acquired by Microsoft and integrated into Powerpoint. My brain hurts just imagining the avalanche of meetings with playable mockups; would it be good or bad?

<comment><USER18> I'm worried that Microsoft's corporate processes would slowly squeeze every drop of innovation out of it, and leave it as a shadow of its former self.

</comment></comment><comment><USER19> Balsamiq has forever been my favourite wireframing tool, it offers great power with great simplicity. But as the blogpost states, the interface was a little "messy".

My favourite wireframing tool just became beter! Way to go team balsamiq!

</comment><comment><USER20> Love Balsamiq! I've been doing mockups for my site redesign and it's been great for showing my ideas to people and not just pitching. Can't wait to try the new one.

</comment><comment><USER21> I'll throw in a plug for Mockflow - another AIR-based prototyping tool, but I, personally, found it a bit more flexible.

Antetype looks pretty amazing - sadly I'm on a PC. :(

</comment><comment><USER22> Minor gripe (otherwise, loving it): Dont love the grey background behind all the elements. Black text on it just doesnt read well.

</comment><comment><USER23> Wish it had vector support, Balsamiq images look really blurry in scaled PDF documents on retina displays :(

</comment><comment><USER24> Love the new skin - still has a wireframe feel, but looks much cleaner.

</comment><comment><USER25> Awesome! Just updated and already liking the new UX...</comment>


Bitcoin Exchange Receives First License in New York State - <AUTHOR> http://www.nytimes.com/2015/05/08/business/dealbook/bitcoin-exchange-receives-first-license-in-new-york-state.html?ref=dealbook <comment><USER2> Read their terms. They're explicitly front-running. Price data on the public site is delayed (they don't say by how much), but "market makers" can buy faster access.

Their FDIC insurance as a trust company covers only US dollars, not Bitcoins. Bitcoins are uninsured.

If you have a disagreement with the exchange part of the company, you have to go to binding arbitration in Singapore.

<comment><USER3> How does one ensure Bitcoins?

<comment><USER4> At the rate agreed upon by the purchaser and insurance provider. The considerations are different than those of insuring gold or dollars, but to an actuary, they're all just probabilities.

<comment><USER5> I think the question was more, _with whom_ does one ensure Bitcoins? Has any insurance provider stepped up and said that they have a solid-enough picture of Bitcoin's risks to know what premium to charge?

<comment><USER6> Many of the big web-wallet providers, exchanges, and other custodians insure their customers' Bitcoin holdings against theft. Their insurers include Aon (who insure Coinbase), Lloyd's (Elliptic), Marsh (Circle), and XL Catlin (BitGo).

</comment></comment></comment></comment></comment><comment><USER7> This is huge for the itBit team; they've been cranking away on this quietly for a couple of years at least; it's been expensive and time consuming. Congrats.

</comment><comment><USER8> There's an error in the first paragraph of this article. A New York license allows one to operate legally in New York only, not the entire country.

<comment><USER9> It looks like this is a banking charter and not a money transmitter license (?)

<comment><USER8> I thought that was possible but it's inconsistent with everything else I know. I think it's the reporter's misunderstanding of what a money transmission license is, though I'm happy to be corrected if anyone can find proof that a BitLicense suddenly shifted from being a modified MTL to a bank charter after the comment period... It seems like the FDIC would have a lot to say about that; also it would be totally insane to start handing out state bank charters to virtual currency operators when typical money transmitters don't qualify due to their [much lower] risk profile.

<comment><USER10> See here: [http://www.dfs.ny.gov/about/press2015/pr1505071.htm](http://www.dfs.ny.gov/about/press2015/pr1505071.htm)

<comment><USER8> This definitely raises more questions than it answers. Can a typical money transmitter just pretend to handle Bitcoin as well and magically exempt itself from the state money transmission framework? Do other states consider this kind of trust company to be a bank or a money transmitter? What does FinCEN think?

<comment><USER3> >>Can a typical money transmitter just pretend to handle Bitcoin as well and magically exempt itself from the state money transmission framework?

It has restrictions and depending on how the Trust was constructed, it may not be applicable in other states for certain transmission activities.

>>Do other states consider this kind of trust company to be a bank or a money transmitter?

They evaluate what the Trust was built for,and what the company wants to do in their state, and evaluate whether there is a delta or overlap.

>>What does FinCEN think?

no diff, still have BSA/AML obligations and commitments.

</comment></comment></comment></comment></comment></comment><comment><USER11> It kind of sucks that Bitcoin being the poster-boy for free, anonymous currency free of government is still being pestered by governments.

I guess Uncle Sam wants his cut!

<comment><USER12> Bitcoin is not anonymous; every transaction is recorded and public.

<comment><USER13> >Bitcoin is not anonymous by default; every transaction is recorded and public.

<comment><USER14> Bitcoin is more _pseudonymous_ than anonymous: you can trace the transactions of an identity, but there's nothing inherent about that identity that links it back to IRL unless theres additional information</comment></comment></comment></comment>


Gangnam Style breaks YouTube viewer count - <AUTHOR> https://plus.google.com/+youtube/posts/BUXfdWqu86Q <comment><USER2> Can't quite tell if this is a joke, but here's a related "story about a bug" from Doug Crockford [0]:

        I made a bug once, and I need to tell you about it.  So, in 2001, I wrote a
        reference library for JSON, in Java, and in it, I had this line

            private int index

        that created a variable called "index" which counted the number of characters in
        the JSON text that we were parsing, and it was used to produce an error message.
        Last year, I got a bug report from somebody.  It turns out that they had a JSON
        text which was several gigabytes in size, and they had a syntax error past two
        gigabytes, and my JSON library did not properly report where the error was — it
        was off by two gigabytes, which, that's kind of a big error, isn't it?  And the
        reason was, I used an int.

        Now, I can justify my choice in doing that.  At the time that I did it, two
        gigabytes was a really big disk drive, and my use of JSON still is very small
        messages.  My JSON messages are rarely bigger than a couple of K.  And — a
        couple gigs, yeah that's about a thousand times bigger than I need, I should be
        all right.  No, turns out it wasn't enough.

        You might think well, one bug in 12 years you're doing pretty good.  And I'm
        saying no, that's not good enough.  I want my programs to be perfect.  I don't
        want anything to go wrong.  And in this case it went wrong simply because *Java
        gave me a choice that I didn't need, and I made the wrong choice*.

[0] [https://www.youtube.com/watch?v=bo36MrBfTk4&t=38m](https://www.youtube.com/watch?v=bo36MrBfTk4&t=38m)

EDIT: is there a reference for formatting comments? I've never been able to find one.

<comment><USER3> He did not need the choice but others do. And he is wrong when he says it makes no difference whether you use a byte or eight of them. Yes, it will take the same amount of time to add two of them but it will also cost eight times more cache space and memory bandwidth to move them around. It may not be an issue if you have a single number or ten of them but it certainly becomes one if you have an array with millions or billions of them.

<comment><USER4> There are use cases where you need the choice, but most people do not need the choice.

Most programs written in the real world (enterprise-y Java apps) do not need strong control on GC, choice of integer types, or many other things offered to them. Reducing choice will increase code/tool quality.

I think that we should make the uncommon choice reallllly hard to put into place. Make it a pain to configure the GC, give specific integer types really long names. Just stop people from premature optimization and leave these tools to people who know what they're doing.

<comment><USER3> If you are unable to make good decision between different number types you better don't write software, IMHO. How do you reason about the operations you apply to your data if you are ignorant of the possible values?

<comment><USER4> I write software, and the amount of times I even have to explicitly manipulate numbers in a given week is very close to zero. Even iteration is done through iterators instead of indexes, so writing a plus sign is done pretty sparingly.

Data manipulation beyond "pull out of database" or "submit user input to database" is a lot rarer in enterprise software like this than in scientific computing. I'm not saying it's bad to be aware of it, but software is more than numbers.

<comment><USER3> I develop enterprise software, too, and I definitely think it matters there, too. You better make sure your database columns have the correct number type or you will get in trouble if your inventory numbers or monetary values start showing rounding errors.

<comment><USER5> You are comparing two different types of numbers.

What was originally compared was different sized integral types.

What you are comparing is two numeric types that have a large semantic gulf (fractions vs integers).

So your point is disingenuous in the context of the former.

<comment><USER3> I just wanted to address your point that enterprise software does usually not involve dealing with numbers.

When it comes to integers you are right - signed and 32 bits is a viable choice in north of 90 % of all cases. And when I wrote you should be able to make good decision about the number type to use I was already thinking of all the number types, however I did not express this well. But then I really don't see a lot of difference between being able to choose between integer, floating point and decimal types on the one hand and various integer types on the other hand.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> The interesting meta-point though is that an audience of 20 million viewers is a big hit [1] so a billion views is 20M people watching it 50 times or, 200M people watching it 5 times. And 2 billion views is double that.

Put in perspective that is probably in excess the number of times the most favored "I Love Lucy" show has been seen. Or put another way, you've got a music video with the same eyeball impact as the highest rated television show ever.

That says to me that either advertising on Youtube is a bargain or advertising on TV is way over priced :-)

[1] [http://tvbythenumbers.zap2it.com/2014/02/10/the-walking- dead...](http://tvbythenumbers.zap2it.com/2014/02/10/the-walking-dead-mid- season-premiere-delivers-15-8-million-viewers/235855/)

[2] [http://en.wikipedia.org/wiki/I_Love_Lucy](http://en.wikipedia.org/wiki/I_Love_Lucy)

<comment><USER7> Or advertising on TV seriously under-represents the total number of impressions over time through alternate consumption streams. Right now, supposedly "unpopular" shows are cancelled, and then immediately get a successful Kickstarter from what turns out to be millions of fans who happened to be watching only through Netflix, or iTunes, or DVD box sets.

(Of course, none of these streams show the same ads the original broadcast does—but if you're a clever ad agency, you're already doing product-placement instead of interstitials most of the time anyway.)

<comment><USER8> > Right now, supposedly "unpopular" shows are cancelled, and then immediately > get a successful Kickstarter from what turns out to be millions of fans who > happened to be watching only through Netflix, or iTunes, or DVD box sets.

Can you name any examples of this?

The closest thing I can think of is Veronica Mars which was Kickstarted many years later and raised ~5 million dollars from 91,000 backers to make a single movie.

I think perhaps the "alternate consumption streams" viewers are not as lucrative as you think.

<comment><USER9> > _The closest thing I can think of is Veronica Mars which was Kickstarted > many years later and raised ~5 million dollars from 91,000 backers to make a > single movie._

That everyone regretted backing.

<comment><USER10> [citation needed]

<comment><USER9> Or you can just watch the movie.

<comment><USER11> I read a few reviews of the movie when it came out. All were positive.

The movie may not be good (my personal opinion), but clearly it met expectations.

<comment><USER12> It was fan service. I think it pleased all the backers. As a standalone, it was not a great movie, but I don't think it was supposed to be.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER13> Should have gone with unsigned ints, YouTube!

EDIT: Which is the solution they apparently implemented, converting signed to unsigned at some higher layer.

<comment><USER14> From the Google C++ Style Guide:

 _" You should not use the unsigned integer types such as uint32_t, unless there is a valid reason such as representing a bit pattern rather than a number, or you need defined overflow modulo 2^N. In particular, do not use unsigned types to say a number will never be negative. Instead, use assertions for this."_ [0]

[0]: [http://google- styleguide.googlecode.com/svn/trunk/cppguide.h...](http://google- styleguide.googlecode.com/svn/trunk/cppguide.html#Integer_Types)

<comment><USER15> From the coolgeek style guide:

"Never use a signed type for a number that can never be negative"

One of my pet peeves is developers using int (instead of unsigned ints) for primary keys in database tables.

<comment><USER16> +1. Everytime I see _for(int i=0;...;i++)_ I wonder why we have developed this habit of defaulting all int as signed and consider uint as taboo (most coding guidelines asks not to use them unless "you know what you are doing"). Most of the time we use integers for counting and so uint should have been more natural. I did this in one of my libraries I was writing from scratch and I was happy for a while but then I got in to trouble because there is lot of code out there with interfaces expecting signed ints even though they should using uint. So ultimately the legacy forced me back to default again at using signed int.

<comment><USER17> Well, in my case, from time to time I have to do these stuff:

        for (int i = x.size() - 1; i >= 0; i--) ...
        for (int i = 0; i < x.size() - 1; i++) if (x[i] < x[i+1]) ...

Both will blow up badly with unsigned ints.

(Well, to be fair, both will blow up with signed ints if x.size() is greater than 2G, so it's a matter of expectations.)

<comment><USER18>
      for( size_t i = x.size(); i-- > 0; ) ...

<comment><USER19> Now i is no longer an index, it's index-plus-one.

<comment><USER20> No, it's not. The check is done before the loop, so i has the correct value inside the loop.

Still, the trick makes it look suspect and that's an argument against using it.

<comment><USER18> > Still, the trick makes it look suspect and that's an argument against using > it.

This is true. The code is confusing to people not used to it. A workaround could be to hide this code inside a macro, so people not interested in digging into the code would take the macro's word:

      #define REVERSE_LOOP( x, i ) for( size_t i = x.size(); i-- > 0; )

But unfortunately, that doesn't help with the fear that people has against unsigned types.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER21> When youtube launched in April, 2005, the initial source code was based on another completely unrelated website that I had worked on before, written in PHP and running on Apache and MySQL. It's always fascinating how implementations of complex systems evolve.

<comment><USER22> What was the original site for?

<comment><USER23> Maybe some sort of exchange site for Magic the Gathering cards?

</comment></comment></comment><comment><USER24> I love that they added an easter egg to the actual video. If you hover over the counter, it briefly shows you the negative overflow value.

[https://www.youtube.com/watch?v=9bZkp7q19f0](https://www.youtube.com/watch?v=9bZkp7q19f0)

EDIT: I just realized that YouTube also posted a comment to that effect just below the video. :P

</comment><comment><USER25> The interesting question to me is why this particular video is so wildly popular. I don't generally go in for music videos, but I find this one fascinating and have watched it a dozen times. I read an article that tried to explain to non-Koreans like me the meaning of it all, and apparently there are several layers of parody and social satire. I think I love it for its combination of attitude, surrealism, bizarre humor, and self-mockery, plus the music that seems to fit magically.

<comment><USER26> The explanations of Korean parody/satire are largely irrelevant to its success given its popularity elsewhere, surely? I think it's the bizarre visuals that had it spread (why I tweeted it when it first emerged), then catchiness plus a repeatable dance move. It's the Macarena of its time in that regard.

Being Korean might've given it crossover appeal into much of Asia? Just a guess.

<comment><USER27> > The explanations of Korean parody/satire are largely irrelevant to its > success given its popularity elsewhere, surely?

I think they gave people who would otherwise have looked down on a silly craze an excuse to enjoy the video.

</comment></comment></comment><comment><USER18> Next milestone: 19th January 2038 03:14:07 GMT

<comment><USER28> Ah, So many systems going to fail on that day for using epoch with 32 bit.

<comment><USER29> Aren't most Linux servers already 64 bit? And we aren't even close to 2020.

I'm sure some software will need to be re-written between now and 2038, but I don't think it will be quite as bad as Y2K just because that was only a 15 year gap (Sometimes less), whereas this is over 24 years.

I just think a lot of software will be naturally replaced between now and then. And while there will be a slight mad scramble to fix stuff at the last minute, I don't think it is Y2K-2.

<comment><USER30> It'll definitely be interesting to see how many 32-bit embedded systems remain in use in 2038 - and what effect the overflow will have on their functionality. [https://en.wikipedia.org/wiki/Year_2038_problem#Vulnerable_s...](https://en.wikipedia.org/wiki/Year_2038_problem#Vulnerable_systems)

<comment><USER31> Just as many as all of the 8-bit systems in use today. There is no need, in the vast majority of cases, for wide data busses in embedded applications. 16-bit is going to die out, though, like the 4-bit and bitslice processors.

</comment></comment></comment></comment></comment><comment><USER32> Mea culpa. I can't remember why I didn't fix that when I reloaded the entire schema. At least I widened the video ids.

</comment><comment><USER33> This is a minor problem. In the 1980s, the number of tradable things with ticker symbols in US markets passed 32767, and some new issues had to be delayed until it was fixed.

</comment><comment><USER34> Nifty example. Billionaires, trillion dollar budges, billion-view celebrities, fast CPUs, and large memories: all reasons I am done with 32 bit architectures (old article of mine, but only on large memories [http://www.win- vector.com/blog/2012/09/i-am-done-with-32-bit...](http://www.win- vector.com/blog/2012/09/i-am-done-with-32-bit-machines/) ).

<comment><USER35> 32-bit architectures have nothing to do with the size of different data types that have existed forever. We had 64-bit longs in 8-bit cpus.

Also, there are perfectly valid applications that require numbers of 8, 16, 32 or 64 bits (or variable encodings with arbitrary precision). Petabytes, embedded microcontrollers, etc.

<comment><USER34> Sorry I was unclear. 32 bits architecture can mean a lot of different things (buss sizes, address word sizes, and so on). Mostly I am done with small pointers (having to use segments to address all of your memory, or not being able to memory-map a disk sucks) and small counters (only being able to put signed 32 bit integers into a collection sucks).

</comment></comment></comment><comment><USER36> I saw this a few days ago, at first I thought it was an easter egg on youtube's part - saying "so many views we overflow!"

But it's real?! It seems incredibly absurd that it could actually overflow, how are signed values useful for a count of views? How are you going to have negative views?

<comment><USER37> Java doesn't have unsigned integer types. Google is mostly a Java shop.

<comment><USER38> That is mostly false.

</comment></comment></comment><comment><USER39> It looks like it also broke the formatting on the number of the viewers: "2151501252". This string does not have thousands separators.

Direct link to the video: [https://www.youtube.com/watch?v=9bZkp7q19f0](https://www.youtube.com/watch?v=9bZkp7q19f0)

<comment><USER40> It's a joke. Hover your mouse over it to see why ;-)

</comment></comment><comment><USER41> Wow, this is cool. One video was able to exceed a 32 bit integer thus requiring a change to a 64 bit integer, all caused by one man and one video.

<comment><USER42> It's just a 2 billion limit crossed, 32 bits can count up to 4 billion. Afterwards, they certainly don't have to change to 64-bits, just add a few bits more.

<comment><USER43> there's no reason to pick any number between 33 and 63

<comment><USER42> If you do it at home, for your 10 videos, there isn't. At youtube scale, they certainly can benefit in having different number of bits in storage and transit and in the CPU. Only on the CPU, and only if you actually want to use the value in calculations the 64 bits is best step after 32. See also discussion here: [https://news.ycombinator.com/item?id=8691291](https://news.ycombinator.com/item?id=8691291)

</comment></comment></comment></comment><comment><USER44> I'd be curious to know how they discovered it. Were they monitoring it? Did someone report it? Did an alarm trigger? ...

</comment><comment><USER45> Why the hell would you want to store a counter as a signed int in the first place ?

<comment><USER46> Java?

</comment></comment><comment><USER47> There is Easter Egg in the video counter. Hover with your mouse. [https://www.youtube.com/watch?v=9bZkp7q19f0](https://www.youtube.com/watch?v=9bZkp7q19f0)

</comment><comment><USER48> unbelievable

</comment><comment><USER49> I will always upvote anything related to Gangnam Style. Always.

</comment><comment><USER50> Am I the only one who thinks that Google is posting this bug(!) just to make the Google plus post popular ?

<comment><USER26> Probably not the only reason, but it'd be a bonus viral thing for Google+ and YouTube.

</comment></comment><comment><USER51> uint_32 strikes again! And one day we'll stop using it in favor of int_64, and all unique identifiers will be string, and all will be well.

I remember when Twitter had rolled over their tweet ID's because they were using an int type that was too short. Should have gone with variable length strings to avoid that problem.

<comment><USER52> Var-length strings are often too slow to manipulate and store. Better choice to use a fixed but large (64-bit) integer.

<comment><USER53> Or just use a GUID.

<comment><USER29> That's 16 bytes instead of 8 bytes for a uint64 that still grants you 18,446,744,073,709,551,615 variations. Seems overkill, particularly if you actually generate GUIDs "correctly" in which case you've allocated 16 bytes but will only ever use a sub-set of them[0].

[0] [https://en.wikipedia.org/wiki/Globally_unique_identifier#Alg...](https://en.wikipedia.org/wiki/Globally_unique_identifier#Algorithm)

<comment><USER54> Isnt mongodb using "hashes" for ids by the way? I wonder how efficient it is and why they chose to do that.

<comment><USER55> They're not hashes. There's a few things embedded in the ObjectId (from the docs - [http://docs.mongodb.org/manual/reference/object- id/](http://docs.mongodb.org/manual/reference/object-id/)):

      ObjectId is a 12-byte BSON type, constructed using:

      a 4-byte value representing the seconds since the Unix epoch,
      a 3-byte machine identifier,
      a 2-byte process id, and
      a 3-byte counter, starting with a random value.

You can actually convert the _id to/from a timestamp, which lets you do cool things like never keep a timestamp field (you can convert a datetime to an ObjectId and use that for comparison).

<comment><USER56> If the 4 bytes are unsigned, then did they just intentionally introduce a year 2038 problem?

12 bytes is enough to just store a random value, with low chance of collisions until you've got around 100 trillion items. It confuses me why anyone would want to waste bytes of an ID on low entropy values like machine and process ID.

Or any combination of high res time plus random works nicely.

OTOH, Mongo's not exactly been a bastion of engineering excellence.

</comment></comment></comment></comment></comment></comment></comment><comment><USER57> Every time i check the most viewed videos on YouTube i get depressed and lose all faith in humanity. Landing on a comet gets you 250K views, anouncing the discovery of the higgs gets you less than 100K, latest twerking video or PewDiePie 2M at least...

<comment><USER58> Have you considered that the repeat viewing value of the Higgs boson announcement diminishes rapidly?

<comment><USER59> Not sure why the pessimistic poster is being downvoted. Factoring for repeat viewers, it is sad how little society values scientific achievements. That said, I was up in the wee hours of the morning watching the LHSC start up and probably put more than 20 views on that song. Have ye hope :D

<comment><USER60> One is little news report about recent scientific finding (that you don't even need to watch since there are tons of other better sources of that) with viral entertainment video, which is specifically made to get as many viewers as possible. These are not of the same type to be compared.</comment></comment></comment></comment>