Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Xion
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
61.
▲
by
Xion
14y ago
It would seem that loop bookkeeping dominates execution time here. Without it, I get quite different results: >>> timeit.timeit("'%s' % i", setup="i = 42", number=1000000) 0.31799793243408203 >>> timeit
62.
▲
by
Xion
14y ago
Python code optimization is actually tricky ground where analogies from other languages (like C/C++) don't necessarily apply. One of the more surprising results (esp. for non-pythonists) is the fact that string formatting: s = "%s" %
63.
▲
by
Xion
14y ago
> What I find most fascinating about this is that our conscious minds are not very good at thinking about exponential growth. I thought about it too, and come up with idea that some equivalent of Weber-Fechner law [1] might be working a
64.
▲
by
Xion
14y ago
This looks more like 4chan to me.
65.
▲
by
Xion
14y ago
Bringing up quotes with game-specific terminology without proper context - like "I got deeper into assassination" - makes me wonder how you could twist the perception of, say, programming in a similar way. Maybe "She puts children on a tree
66.
▲
by
Xion
14y ago
You also need templates to make it possible to invoke a function on parameters of unrelated types.
67.
▲
by
Xion
14y ago
Even with this addendum, there is a grey zone: reversed_string = string[::-1] Is it just using the equivalent, or a new implementation?
68.
▲
by
Xion
14y ago
He might be also alluding to recent (~few months) influx of Rails and Node.js related stories.
69.
▲
by
Xion
14y ago
Precisely. The Ruby solution author quotes as ideal and impressive seems way overblown to me. And I don't buy that ,,it would probably be dismissed as “overly complex” by younger programmers'' because it is exactly what I would consider per
70.
▲
by
Xion
14y ago
> But he isn't going to go start a company tomorrow that will revolutionise the way we communicate. Maybe he won't do that because he thinks he doesn't have enough time left to properly grow such a company, to see it flourish and observ
71.
▲
by
Xion
14y ago
It creates just one jQuery object to wrap the entire array of DOM nodes. Afterwards, .html() is essentially innerHTML [1], provided jQuery can use it directly (otherwise it has to create DOM nodes by itself). [1] https://github.com/jquery/
72.
▲
by
Xion
14y ago
It's absolutely brilliant. And besides improving your code-typing speed, it's also a nice way to get a hang of all different languages you might want to delve into. Alternatively, you can also polish your muscle memory on all the thousands
73.
▲
by
Xion
14y ago
This is not a JSON parser, it's a tokenizer. From a parser I'd expect at least acknowledgement of the basic key-value association. It doesn't say that it's not useful. It's just that for anything non-trivial, you'd need to supplement this l
74.
▲
by
Xion
14y ago
Unfortunately, this doesn't take into account the fact that stuff you keep in your development repository is almost never identical to stuff you want on your deployment server. There are files you keep in the former but not necessarily want
75.
▲
by
Xion
14y ago
> (...) the colors are different: the flashy red/yellow has been replaced by a classy green/black two years ago. I believe it's the same case pretty much in whole Europe. In all countries I've been to for the last two years or so (Polan
76.
▲
by
Xion
14y ago
Sometimes the logging is not enough, and you cannot isolate the case to prepare appropriate unit test. Just few days ago I had a strange problem with the order of imports in Python at the border of my code and external library (Celery). The
77.
▲
You ask why I need to talk about women in the Python community?
(roguelynn.com)
2 points
by
Xion
14y ago
|
0 comments
78.
▲
by
Xion
14y ago
While the idea seems decent, it completely forgets about CSS preprocessors (LESS/SASS). When using one, the original 'source' stylesheets usually don't even make it into deployment server, for they are just used to build final CSS. Even if
79.
▲
by
Xion
14y ago
> QuickCheck and JUnit have different purposes. QuickCheck is not a unit testing framework. Indeed. What I meant was that basically: P(HaskellCodeCorrect|Compile+QC+UnitTest) =~= P(OtherCodeCorrect|Compile+UnitTest) while the d
80.
▲
by
Xion
14y ago
That's not very surprising; Haskell's type system is really that ridiculously powerful. But I suspect many hackers working with other languages would be able to state the equivalent: "I released a library which I only unit-tested, without w
81.
▲
by
Xion
14y ago
While it doesn't cover all the relationship status changes, the Break-up Notifier ( http://www.breakupnotifier.com/ ) provides part of that functionality. Arguably the most useful part :)
82.
▲
by
Xion
14y ago
The idea seems pretty redundant (Last.fm anyone?) but the landing page is just awesome!
83.
▲
by
Xion
14y ago
Even without the question of ATLAS vs. CMS, awarding a Nobel Prize for this will be rather challenging. At most three people can share it according to the rules, and there were literally hundreds of scientists involved in this discovery. Th
84.
▲
by
Xion
14y ago
The self-signed SSL certificate causes Firefox to scream security issue. You might want to fix that.
85.
▲
by
Xion
14y ago
The proponents of tau that cite the ubiquity of the 2pi factor in maths seem to forget that it's an exceedingly huge swath of knowledge and thus any notion of ubiquity might as well be moot, or totally dependent on the region of maths this
86.
▲
by
Xion
14y ago
Looks like the author has partially succumbed to Hello World Fallacy. His first extremely simple experiment (I'm reluctant to call it 'app') was successful and he is extrapolating this in slightly too optimistic direction.
87.
▲
by
Xion
14y ago
> It's far easier to make a cut at "no logic apart from boolean checks" and then use a proper client-side framework such as backbone (...) That works if you are fine with offsetting all (or most) of your presentation logic to client sid
88.
▲
by
Xion
14y ago
Python has lambdas and functions as first-order values since the beginning.
89.
▲
by
Xion
14y ago
The best strategy seems to be incremental editing. Post a short and to-the-point answer first and then edit it to expand and add finer points. This way your answer is already competing with others even as you write it (properly). It feels s
90.
▲
by
Xion
14y ago
I couldn't agree more with what this guy is saying. But, mobile applications aren't actually the worst offenders here. At the very least, both platforms have their guidelines for developers to follow if they want to make their apps consiste
More ›