Super secret easter egg: http://twitter.github.com/?larry=25 (Shh! Secret!)
Twitter launches new GitHub page
21–30 of 31 posts
Re: Twitter launches new GitHub page
#22Re: Twitter launches new GitHub page
#23https://github.com/twitter/time_constants - Time constants, in seconds, so you don't have to use slow ActiveSupport helpers
Seriously?? Just look at the freaking source code: https://github.com/twitter/time_constants/blob/master/lib/ti... - Luckily, it appears that it is generated.
I realize that Ruby is slow and all (we experience it daily), but holy crap people. I also realize that Twitter is a mega scale business, but at what point does this kind of library become a good idea?
Re: Twitter launches new GitHub page
#24Re: Twitter launches new GitHub page
#25Re: Twitter launches new GitHub page
#26How does that new hip saying go? "WAT?" https://github.com/twitter/time_constants - Time constants, in seconds, so you don't have to use slow ActiveSupport helpers Seriously?? Just look at the freaking source code: https://github.com/twitter/time_constants/blob/master/lib/ti... - Luckily, it appears that it is generated. I realize that Ruby is slow and all (we experience it daily), but holy crap people. I also realiz…
Re: Twitter launches new GitHub page
#27How does that new hip saying go? "WAT?" https://github.com/twitter/time_constants - Time constants, in seconds, so you don't have to use slow ActiveSupport helpers Seriously?? Just look at the freaking source code: https://github.com/twitter/time_constants/blob/master/lib/ti... - Luckily, it appears that it is generated. I realize that Ruby is slow and all (we experience it daily), but holy crap people. I also realiz…
I see absolutely nothing wrong with this. It replaces a slow way to write human-readable intervals with a fast way. How is that a bad thing?
It may be more performant to set time ranges as constants, but you will get in to trouble unless you know exactly what you are doing. The people at Twitter who wrote the code will be aware of the trade-offs they have made, but what happens when Jo Random developer forks it on GitHub without thinking it through because "it's fast and Twitter use it - it must be good!"
For example:
T_1_MONTH = 2592000
Not all months have 30 days. T_1_SOLAR_YEAR = 31558150
A solar year, is (roughly) 31556925.25218 seconds[1].[1]http://www.wolframalpha.com/input/?i=seconds+in+a+solar+year
Re: Twitter launches new GitHub page
#28Earlier quoted context omitted.
I see absolutely nothing wrong with this. It replaces a slow way to write human-readable intervals with a fast way. How is that a bad thing?
Because it is wrong. Time is a difficult problem to solve, it doesn't move at a constant rate, the length of days and years change. You simply cannot set a constant and have it be "correct". It may be more performant to set time ranges as constants, but you will get in to trouble unless you know exactly what you are doing. The people at Twitter who wrote the code will be aware of the trade-offs they have made, but wh…
"Difficult for novices to use incorrectly" is a good feature for code to have, but it's not the highest good, and its absence does not mean that the code is bad.
Re: Twitter launches new GitHub page
#29Earlier quoted context omitted.
Most of the "forks" are forks from Twitter employees' personal repos that were created before things got consolidated under Twitter's account. A few aren't and are called out as such. Which ones are missing proper attribution?
None of them, if you click through. I just looked at the list and thought to myself, "Twitter released Mustache.js? They also released webrat? No.. that does not make much sense." and did not realize until I clicked through to those repos and checked to see if it was a fork. I'm not suggesting Twitter is doing a Bad Thing(tm). I just think we under-appreciate those that create and release open source software and tha…
Re: Twitter launches new GitHub page
#30How does that new hip saying go? "WAT?" https://github.com/twitter/time_constants - Time constants, in seconds, so you don't have to use slow ActiveSupport helpers Seriously?? Just look at the freaking source code: https://github.com/twitter/time_constants/blob/master/lib/ti... - Luckily, it appears that it is generated. I realize that Ruby is slow and all (we experience it daily), but holy crap people. I also realiz…
I see absolutely nothing wrong with this. It replaces a slow way to write human-readable intervals with a fast way. How is that a bad thing?
Instead of writing `foo(3.days)` they are writing `foo(T_3_DAYS)` with this library. Instead, why not just create a constant `BAR_DURATION = 3.days.in_seconds` and then write `foo(BAR_DURATION)`.
Problem solved.