Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
buddydvd
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
31.
▲
by
buddydvd
14y ago
> I’ve touched on why I find working out in the morning to be especially beneficial, but I would recommend working out at a time where you know you can be consistent; if you try to vary your workout daily according to your schedule you’
32.
▲
by
buddydvd
14y ago
> 7. Put First and Last links on the outside > Nothing is more counter-intuitive than a Last link followed by a Next link. Instead of making the following change like the author suggests: prev first [numbered links] last next
33.
▲
by
buddydvd
14y ago
If you are building your own static library and would like to distribute Nimbus with it, this feature allows you to add a prefix to all Nimbus classes without having you to manually rename them. This lets users of your static lib free to in
34.
▲
by
buddydvd
14y ago
The framework is divided into modules. For each module you include in your static lib (even the ones that gets added indirectly), you need to add its namespace header file. The file you linked to is the namespace header for the Core module.
35.
▲
by
buddydvd
14y ago
I'm not sure how well this works, but Nimbus (iOS framework) lets you embed itself in your own static library with a custom prefix via preprocessor macros. It would helpful if more libraries provide this feature. http://wiki.nimbuskit.info
36.
▲
by
buddydvd
14y ago
This is great. Thanks for the link! The example in the readme suggests that jslim can reduce simple apps combined with jQuery by up 28%. I wonder if it can achieve more if jQuery was modified to let you specify selectors by function calls i
37.
▲
by
buddydvd
14y ago
Can Google Closure Compiler compile an app with jQuery but only include parts of jQuery that the app depends on?
38.
▲
by
buddydvd
14y ago
Here's a blog post that illustrates how Git Subtree works in a visual way: http://psionides.eu/2010/02/04/sharing-code-between-projects... So, to avoid duplicate commits, you'd either have to rebase the main branch or squash the commits b
39.
▲
by
buddydvd
14y ago
You could specify a directory in .gitignore and create a script that clones/pulls the repository of your choosing into that directory.
40.
▲
by
buddydvd
14y ago
The projects I add as submodules are all hosted on Github. For those that require modification, I would fork (mirror) the project, commit the changes to my fork, and add the fork as a submodule to the parent project I'm working on. So, yes,
41.
▲
by
buddydvd
14y ago
Git's submodule feature definitely has rough edges, however, I think the benefits outweigh the cons. One of the best benefits I see is that submodules make embedding forks more manageble. For example, when you include an open source library
42.
▲
by
buddydvd
14y ago
I've ran into situations where my pull requests duplicated effort made by older unmerged pull requests. I know I should've reviewed all the existing pull requests before coding, but repos with more pull requests make that workflow pretty te
43.
▲
by
buddydvd
15y ago
The solution is very clever. However, it is incomplete. In addition to the equally divided markings around the circumference, you also need to know the midpoint of the circle. Without the midpoint, the cuts may still yield unequal slices. F
44.
▲
by
buddydvd
15y ago
I wrote a simple jsfiddle page that show you the current stories in /r/all and their associated ratings as calculated by the hot algorithm: http://jsfiddle.net/6FVd3/embedded/result/ Source: http://jsfiddle.net/6FVd3/ One thing I notice
45.
▲
by
buddydvd
15y ago
Take this code snippet for example: function func(x) { var a, b, c, result = -1; a = getA(x); if (a) { b = getB(a); if (b) { c = getC(b); if (c) { result = calc(c);
46.
▲
by
buddydvd
15y ago
An less-known technique to dealing with nested-ifs is through the use of an one-time loop. Here's an example (in JavaScript): function oneTimeLoopMethod(x) { var result, temp = -1, a, b; do { ... extra processing c
47.
▲
by
buddydvd
15y ago
What about trailing spaces? They need to be escaped by parenthesis?
48.
▲
by
buddydvd
15y ago
The response headers indicates photos are set to expire in exactly 14 days. Does Akamai not honor cache-related headers from the origin URL? If it does, couldn't Facebook just generate URLs that includes an rolling expiration date so that w
49.
▲
by
buddydvd
15y ago
It may smell, but clients that uses URL templates may still be RESTful. For this to work, 1.) the server must decorate the response with the proper resource type identifier, 2.) the client must be able to understand the resource type, and 3
50.
▲
by
buddydvd
15y ago
Your comment should be on top. Everything OP said can easily be done with Chrome's multiple profile feature. I love the fact that I can run _multiple_ incognito sessions at the same time without it being bounded by the number of browsers yo
51.
▲
by
buddydvd
15y ago
And this too: 111111111111111111111111111 / 9 = 12345679012345679012345679
52.
▲
by
buddydvd
15y ago
This HN post is a discussion about data expressions leaner than JSON. I believe the points I've made contributes to it and I've never said such compactness is more preferable. It's merely an observation.
53.
▲
by
buddydvd
15y ago
I not advocating for changing the JSON spec. I'm saying, as a human-readable data format, it could be more compact. Perhaps this observation can be useful to those who are designing a new language.
54.
▲
by
buddydvd
15y ago
Yes, there are certainly more problems. I think the reason why the author thought S-expressions are more compact is because the comparison was made between formatted versions of the expressions (how they would appear in code): ["a", "
55.
▲
by
buddydvd
15y ago
JSON can be more compact if it simply used collapsible spaces to delimit elements within an array and key-value pairs within a dictionary. For example: [1,[2,3],4,{"a":5,"b":6}] // 25 characters can be rewritten as: [1[2 3]4{
56.
▲
by
buddydvd
15y ago
Following the examples in the blog post, seems like the author would translate the following JSON expressions: {'a': 1} {'a': [1]} ['a' 1] ['a' [1]] into this: ('a' 1) Isn't that ambiguous? Or, do they need to
57.
▲
by
buddydvd
15y ago
I've described a solution in a different comment on this thread. For each outbound link on the page, build a link that points to a redirector that accepts two query parameters: current page's canonical URL and outbound link's URL. The redir
58.
▲
by
buddydvd
15y ago
Right, but you can always pass the canonical url to the redirector. That lets you avoid maintaining a whitelist/blacklist of query params. This should be trivial for Quora as most of their pages already contain the meta tag specifying the c
59.
▲
by
buddydvd
15y ago
OP's blog post says Quora is not doing that. It says Quora's redirecting to gigaom.com from http://www.quora.com/_/redirect?url=http%3A%2F%2Fgigaom.com%... instead of http://www.quora.com/What-are-everyday-apps-that-use-cloud-c... . The
60.
▲
by
buddydvd
15y ago
It can be fixed through a double redirect. Basically, redirect the browser to a internal page that redirects to the original page and have that page redirect to the outbound link. For example: Say you're on this page: http://site.com/artic
More ›