Better HN
topnewbestaskshowjobs
Log inSign up

rtpg

21,281 karma · joined Nov 23, 2012 (14y ago) · 6,748 submissions

real name: Raphael

blog: https://rtpg.co

email: raphael at above domain

Submissions

comment 12y ago · link · parent

the admin stuff is really killer, but I think the ORM deserves mention as well (see my rant).

comment 12y ago · link · parent

Django has loads of goodies, but for me, by far, the ORM is my favorite part.

RDB managment is the biggest snorefest in all of software development. There are some times where you have to figure out some crazy select or whatever, but for the most part it's annoying, easy to break, and it takes forever. Django lets me not think about it at all (granted, I'm not writing crazy search things either).

When I started trying out Play Framework (for Scala, because I love type checking) I was absolutely shocked at the lack of an ORM. DB managment is the most boilerplate-y aspect of writing some CRUD, and Play decides not to help you with it.

Their arguments are about "control" and how somehow "SQL is the best DSL" (http://www.playframework.com/documentation/2.0.1/ScalaAnorm).

>val id: Int = SQL("insert into City(name, country) values ({name}, {country}") .on("Cambridge", "New Zealand").executeInsert()

Who could possibly think this "DSL" is 'better' than something like

>City("Cambridge","New Zealand").save()

/endrant

I really like ORMs, and django has the distinction of having the best ORM in my book. I sincerely hope Django would never be reduced to Flask, because I care a lot more about having DB management work without me ripping my hair out than having routes or being able to put everything in one file.

EDIT: for context, I don't ever have to do complicated things with databases, mainly tedious ones, which is probably why my vision of the world might be slightly different than yours.

comment 12y ago · link · parent

I think most design patterns and 'best practices' exist because, without them being explicit, people will tend to do the opposite. Obviously, there are always use cases where going against the pattern might make sense. But you should be able to justify it.

Would you rather have mostly short functions with a couple long ones or the opposite?

comment 12y ago · link · parent

despite all that inflation bitcoin's volatility is a lot higher.

comment 12y ago · link · parent

Women entrepreneurs are relevant because there is (at least in general media) a recognition that there are a lot of negative stimuli towards women (especially when young) aiming to be entrepreneurs. Everyone needs role models.

French entrepeneurs are relevant maybe to counter the idea that France doesn't know how to innovate. I'm not sure how relevant ebay's guy is as an example. As someone who did something similar (Born in France, went to US for elementary school and middle school, back in france for HS Uni) I feel more american than french.

comment 12y ago · link · parent

if there are enough bids out there, you could do everything more or less instantaneously. I doublt there are 700kBTC worth of bids out there, but probably $20k

comment 12y ago · link · parent

I'm surprised that someone can simultaneously acknowledge how neat the solution for the $10 kettle is, and then say that "the magic is gone". Seeing this increases the magic for me.

comment 12y ago · link · parent

I figured that out later on, that I should probably not think of ruby as functional ( my brain hardwires no parentheses languages to functional languages I think). After which the experience becomes slightly less frustrating

comment 12y ago · link · parent

Those are not nearly enough for someone to exist out of the pit of despair.

Obviously someone against these services will probably think it's too much. Welcome to politics

comment 12y ago · link · parent

For those who haven't yet, I'd highly recommend reading "Steve Jobs", the biography by Isaacson. It portrays pretty much all of these events like Woz describes them, and is a very complete portrait of Jobs. Woz' status at HP as referenced isn't really covered, but his actions during the Apple I and II launches are pretty complete.

EDIT: I'd like to point out that this book covers everything, up to Jobs death, and is about Jobs, not Apple. There's obviously a lot about Apple, but a good amount about Pixar ,NeXT, and Jobs' personal life as well. A great biography IMO, but it's not much about technology.

comment 12y ago · link · parent

didn't even know that.

BTW the people on #haskell are quite active, and nice :)

(maybe a pointless counter-example, I once went onto #ruby, and asked about an easy way to make a function name refer to a function( to be able to do things like list map f easily, without the superflous do |x| f x end ), and I got yelled at because I was trying to write "non-ruby code".

comment 12y ago · link · parent

This is a nice theory, a narrative that might be difficult to prove in practice, however.

On a more meta-level, though, people's political opinions influence their interpretation of statistics, so even if you did prove this ROI, cognitive disonance will fight you extremely hardly. Instead of trying to convince people who are against any form of wealth distribution, it's 1% as difficult to convice the people on the fence (of whom there are also 10x more) , those who are ok with some distribution, that this is a pretty effective replacement/complement for current services.

comment 12y ago · link · parent

Haskell, by its lazy evaluation, is basically a macro-only language, and people seem to be doing fine in that end of the world.

Granted, space leak issues are pretty difficult to analyse, so it makes the language seem hard to use in practice, but that's because all the low-hanging fruit like type errors are solved by how the language is designed, so you only end up with the hard bugs.

6194.

Programming Style and Your Brain (2011)(youtube.com ↗)

3 points · by rtpg · 12y ago · discuss

comment 12y ago · link · parent

This sort of realization is the first step to realizing that you really shouldn't be writing javascript like java/C++. It makes things feel a lot nicer when you start really thinking in JS. I'd recommend checking out Crockford's "Crockford on Javascript" series for some good intro on thinking about Javascript (http://www.youtube.com/watch?v=JxAXlJEmNMg). Section 3 is where you really start talking about JS.

For a good counter-example, check out a lot of google's JS libs (in all their giant module goodness).

comment 12y ago · link · parent

FreeBSD can now address 4 TB of memory, can't wait for us to hit that limit on personal machines

comment 12y ago · link · parent

It seems to be the classic "security through obscurity" instance.

comment 12y ago · link · parent

slightly offtopic but I find charging to have the 'right' to have a file in two different file formats to be slightly insulting. $5 for a binary flag?

comment 12y ago · link · parent

I have a really hard time understanding what APL-likes are useful for. I guess I don't do a lot of stuff with big vectors, but I feel like it would be hard to structure code (maybe you don't need to?)

comment 12y ago · link · parent

This is a non-proof based only off of notational styles.

Let s be a series , with s_n = sum (1 to n, 1) = n if S3 exists (i.e. lim n->infinity s_n exists), then the series (s-s) (where (s-s)_n = s_n - s_n) converges , and it converges towards S3 - S3 (=0).

> = (1 + 1 + 1 + 1 ...) - (0 + 1 + 1 + 1 ...) the series whose sum he's describing here is not (s-s), but another one entirely : u where u_1 = s_1, u_n+1= s_n+1-s_n

These are different series, so it is entirely reasonable for them to converge at different values, 1 doesn't equal 0.

The "real" reason this result isn't what we think it is(apart from "infinite sums are different" argument, which is a non-answer):

>Step 1: Let S = 1 + 2 + 3 + 4 ... What you're doing here firstly, is saying that "I assume that this sum converges, let S be the value it converges to".

So you end up proving (if the other steps weren't also flawed) that S = -1/12, all you're saying is that if the sum exists, then it is -1/12.

The issue here depends on what sort of thing you're working on. The "classic" definition of a limit (convergence of a series) does not work here, because you can prove that for all n, the sum of n numbers will always be at least -1/12 away from -1/12 (on account of it being positive), so it can't converge to -1/12 (hence S not existing).

However, there are techniques for assigning limits to divergent sums. these summability methods will give the same result as the classic analysis for convergent series, but will also give values for some divergent series.

It is similar to analytic continuation( f(x) doesn't exist, but a limit exists in x both from the left and to the right (named y), so we sometimes say that f(x)=y ), in that it allows us to extend the resolution domain slightly. But the classic definition no longer works.

The one used here is zeta function regularization, which consists in the following:

you have a series a , and a function Za(s) = (1/a1^s)+(1/a2^s)+(1/a3^s)+(1/a4^s)+.....

Za is only defined for certain values of s depending on the series. But for a serie representing a convergent sum, we know that Za(-1)= a1+a2+a3+... exists. So this method will give the same limit for convergent sums as the classical method.

For a series with a diverging sum (a_n)=n, Za(-1) doesn't exist, but the limit in -1 exists from both ends (by analytic continuation), so we extend the domain of Za to -1 by the value of this "limit" : -1/12

The article mentions Ramanujan summation, but Zeta regularization is actually a much more useful tool. In

comment 12y ago · link · parent

What could actually be a neat expirement would be going the other way: building some software, and then selling it off (like this) but at a really low bid (like, starting off at $5). You could probably use it to slightly guage how much your code+support might be worth. Would at least make an interesting serie of blog posts.

comment 12y ago · link · parent

actually the thing that surprises me more is the conflict in interest between AWS and Amazon Cloud Drive... I wonder how easily Dropbox could migrate.

comment 12y ago · link · parent

Has the relationship between the government and the press really changed that much? The pentagon papers happened before, and the gov't didn't much like that.

Civil rights have definitely gotten worse in the past 15 years, but I'd say they're still better than before 1978 (when FISA was written). Before things like the FISA, the executive was pretty free to do almost anything (and did, see Hoover). As a long term trend, civil rights have been increasing, not decreasing. We've made mistakes that we need to roll back, but acting like this is the fall of the United States as we know it is pretty myopic (people have been predicting the fall of the United State since the 1800s), and not putting much faith into our institutions (which aren't the worst).

comment 12y ago · link · parent

>NSLs remain nearly untouched.

this is the single most dangerous thing about current law enforcement. NSLs completely subvert any recourse to the judiciary without immense risk to yourself. Luckily most judges seem to agree on the ridiculousness of NSLs , and are trying to whittle down the power they have.

comment 12y ago · link · parent

from what I recall most of the data programs wouldn't keep stuff after 5 years, but that's slightly pedanting (on your "50 years" comment).

He could ask congress to pass laws, but he's the executive, and considering the executive's contempt for all things from congress, down to the right of congress to check the executive's use of the military (http://en.wikipedia.org/wiki/War_Powers_Resolution#Questions...), one can't hope for too much. At the very least, these executive orders being put into place means that he's signaling Congress that he wouldn't necessarily be against rollbacks of certain points.

If you want a law passed, ask Congress.

comment 12y ago · link · parent

I can't possibly imagine that the 1000000 lines of code couldn't be replaced piecemeal (in giant blocks). Then again, I've never seen 1000000 lines of code.

comment 12y ago · link · parent

I can understand trains a bit more: you can do other things. But driving is a slightly active experience, and at least you can sleep in the train if you need to.

comment 12y ago · link · parent

People spending 6 hours a day driving, I can't imagine that being good for anyone. I'm trying to find a way to say this without sounding obnoxious (it's their choice, after all), but the reasoning is so strange for some of these ("I drive 6 hours a day so I can run on the beach"? Just drive to the beach to run then?)

comment 12y ago · link · parent

Even if you aren't concerned for your safety, you being safer can lead to a better life anyways (see car, health insurance).

comment 12y ago · link · parent

While it might be hard to defend the incumbent taxi industry, and Uber generally seems to be a "good thing" (not convinced that surge pricing is worthwhile however, I don't think that drivers are reactive enough that increasing price will increase supply when its needed, plus the backwards bending labor curve, but I digress). There might be some reasons for regulating taxis, but things like the medallion systems seem to have been a failure.

Hotels are a different matter entirely: firstly, hotels are usually already pretty correctly priced, and services are usually good (in my experience at least). Secondly, the reasons for hotel regulation are still pretty relevant:

- I don't want my neighbor to sublet constantly, and have people run around. The commons (hallways and stuff) will probably get degraded, and my life will be generally shittier (see various stories about subletters).

- On a more maco-level, with things like rent control, subletting makes the supply even more constrained. Between getting rid of subletting and getting rid of rent control, I'd rather get rid of rent control, but in the meantime subletting is also kind of awful.

airbnb's disruption is not uncontroversial

1
206207208
225