Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
urbanautomaton
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
urbanautomaton
14y ago
I don't think "media type" is synonymous with "data format". For example, IANA considers atomcat+xml and atomsvc+xml to be distinct media types [1], despite them both being XML, and there are 406 other XML-based media types in that list. [1
32.
▲
by
urbanautomaton
14y ago
I personally prefer this approach - certainly if the changes you're making are only to the representation of your resources, then (assuming they can't be made purely additively, i.e. without breaking existing clients) simply making a new co
33.
▲
by
urbanautomaton
14y ago
> If it's so easy to fix the system, people would have already done it. This doesn't follow at all. The difficulty of fixing a system is just one possible reason it might remain as it does; regulatory capture is another, as is well-fina
34.
▲
by
urbanautomaton
14y ago
My preference is to have the base factories set everything that is needed for the generated record to be valid, and nothing more. If your User model validates the presence of the account, then the account association should be set - if not,
35.
▲
by
urbanautomaton
14y ago
Remember to ensure that your build strategy is set on all associations if you want this to work, e.g. FactoryGirl.define do factory :user do association :account, :strategy => :build end end Otherwise when you bui
36.
▲
by
urbanautomaton
14y ago
If I could upvote the parent any harder, it would hit orbit. If you need a complex network of collaborators to test a method, the answer is not to obscure the creation of those collaborators, it's to refactor so that each object talks only
37.
▲
by
urbanautomaton
14y ago
Ah, technically correct - the best kind of correct. :-) Anyway, I agree with pretty much everything you say. As I mentioned elsewhere in this thread, we've gone down a pub-sub event system for handling our generic post-action tasks. The con
38.
▲
by
urbanautomaton
14y ago
I'll post something about it soon - while the changes were wide-ranging for us (because these post-action tasks were initially scattered throughout our app), the extra infrastructure required was really pretty minimal. Most of the actual ti
39.
▲
by
urbanautomaton
14y ago
He's not using the model to render the view, though, he's using it to queue up a future asynchronous request to the relevant mail "controller".
40.
▲
by
urbanautomaton
14y ago
Absolutely agreed - better to make these things explicit somewhere rather than having your business logic implicitly handled by something directly coupled to your persistence layer (with the exception of data integrity tasks as mentioned by
41.
▲
by
urbanautomaton
15y ago
Perhaps a footnote could mention that this style really is possible in modern regexp implementations? I see chapter 20 is inked in to cover verbose regexps with comments (which is great!), but the current text could give the impression that
42.
▲
by
urbanautomaton
15y ago
Right. But that's not the only reason to write tests, and presumably if your tests were giving you false positives, you'd want to note and address that. If "are my tests telling me when my software fails?" is a valid question to ask oneself
43.
▲
by
urbanautomaton
15y ago
> For example it's paramount to test your software, but whether this is TDD or not is secondary. If you don't examine your motivations for writing tests, and evaluate whether they're being fulfilled, how do you know their necessity is p
44.
▲
by
urbanautomaton
15y ago
Is it common practice to register anonymous accounts to explain why you've downvoted someone? "anonmouse" doesn't have sufficient karma to downvote anything, so clearly isn't your regular account. You appear willing to downvote others over
45.
▲
by
urbanautomaton
15y ago
I was responding specifically to the somewhat alarming claim that faith in the operation of one's IDE is a substitute for regularly running tests. I wasn't denying that automated refactoring tools are nice to have; they obviously are. Regar
46.
▲
by
urbanautomaton
15y ago
> Being able to trust the tool to have made the change correctly is invaluable in this process; it avoids a full unit test suite run after each step, and significantly speeds up major refactoring work. If your unit tests aren't fast eno
47.
▲
by
urbanautomaton
15y ago
Others have pointed out that the SLA isn't an issue. As for the separate service thing, there was a recent transition that was supposed to rectify this, merging the Apps and regular accounts services. The page you link to is about the need
48.
▲
by
urbanautomaton
15y ago
There is not a single mention of either unit tests or "reusing components in other frameworks" in the original article. Did you read it?
49.
▲
by
urbanautomaton
15y ago
You should try to avoid subverting a framework's conventions if you're going to use it, sure, but Rails' helpers seem more like an absence of convention. They're a dumping ground for methods that are crying out to be properly structured.
50.
▲
by
urbanautomaton
15y ago
Hi athst, Thanks for your comment and questions. We went with "sportspeople" because our research showed it was regarded as meaning "people who do sport" in the most places - in the UK, for instance, "athletes" is often (but not always) int
51.
▲
by
urbanautomaton
15y ago
Good suggestion, thanks. :-)
52.
▲
by
urbanautomaton
15y ago
Hi dadads, thanks for your comment. Our userbase has expanded from an early base of friends and family, then through active seeding within carefully picked sports communities, and moved forwards with a great response from users themselves;
53.
▲
by
urbanautomaton
15y ago
Ah right - we weren't aware of the ranking penalty. Previous "rate my startup" submissions were pretty universally non-linked ones, so we went with that, assuming direct links were specifically frowned upon for these posts for some reason.
54.
▲
by
urbanautomaton
15y ago
They're auto-generated, and aren't enabled in "ask HN" OPs (as I understand it, at least). I guess this is to prevent people link-spamming... (Edit - thanks for providing one. I'm another dev at Tribesports, by the way.)