skysight-inc/HackerNews huggingface dataset:
Beyond just the obvious "this is a bad way to design things" message, another good takeaway is just the fact that most OO-design tutorials/discussions/books use the worst possible examples that teach people bad habits.

When done well, the useful part of OO design is encapsulation and data-hiding, not inheritance, but everyone gets hung up on inheritance because it's easy to cobble together "is-a" examples from real-world-like things, which just trains people to abuse the model.

In the real world outside OO-design books and freshman CS classes people don't have separate classes for different shapes, they just have "Polygon" or whatever the graphics buffer requires. And no one has separate subtypes of "AbstractVehicle" for "PassengerCar" and "Motorcycle" and "CommercialTruck," they just have a "Vehicle" class with a bunch of data on it and rely on the client code knowing what to do with that data.
Google filed a patent for offshore data centers last year...
http://www.datacenterknowledge.com/archives/2008/09/06/googl...
I would like to mock propose the following idea: A Debugger License. Like a driver's license, you have to have a certain amount of experience and qualification to operate a debugger. Improper use of your debugger may incur fines and penalties up to the revocation of your license.

Licensing should involve operational demonstration of design capacity, testing, and reasoning. After passing the initial phase of licensing, you may operate the debugger under supervision to learn the full spectrum of debugger capabilities (no point using a tool poorly, after all).
[/tongue:cheek]

I don't really blame people for using debuggers badly though. They're one of the few practical coding tools that time is actually spent on in university classes. In my experience, we were expected to use them to understand the operation of the stack frame and heap in decoding a program especially built around having funny tricks. To throw back to my analogy, it's a bit like teaching a new driver how to do a powerslide before teaching them to obey stop signs.
The point is to demonstrate to others that you are knowledgeable of the news as reported by reputable sources.
> No they can't - this version wouldn't short circuit evaluation, which is completely the wrong behavior. Map would have to apply the predicate to every element of the list before any/all kicked in.

Just use the lazy map itertools.imap (or Python 3, where `map` is lazy) or replace listcomps by gencomps, any & all take any iterable if you're worried about that. Stop creating problems where there is none.
The first answer that came to my mind is: money and fulfillment.

PS: How do I link words in HN? I meant to link 'fulfillment' to http://harmanjit.blogspot.com/2009/04/on-fulfillment.html
I would trust him because I've been following his career since 2005, and I think that, in addition to being passionate, a nice guy, and very smart, I think he's well-suited to being a VC. He seems to have a good mix of interests in technology, entrepreneurship, marketing, and politics.

If I was in the market for a VC (or an investor, as he is until he gets Lowercase off the ground), he would be up there with some other investors with more years of experience, because he's been learning at a very quick pace and in a way that gives him perspective--by speaking, meeting founders, and making small investments.
Can you test for browser type and make the upvote glyph larger if the browser is on a mobile device (e.g.iPhone)?
...but last commit was in April.
If the method isn't final, I would consider the possibility of implementation differences in subclasses. I am trying to think of a case where it would cause a problem, and most of those involve methods that probably ought to be in the Rectangle class anyway (and thus could be overridden in square).

To me the cleanest solution is :

setDimensions(height, width)

where the contract for square enforces the equality of height and width.
This book appears to be pretty poor: their main argument is that we need more PR people to 'inform' the public about science.

Given that ridiculously exaggerated press releases, written by PR people - which become the basis for overblown media stories with titles like 'cure for cancer discovered' or 'scientists find fat gene' - are probably a large factor responsible for the skepticism that a lot of people have for science, I'd say we actually need less PR people.
http://godrops.com/ is a really good one I found a few weeks ago too (maybe even from here). You don't have to wait as with this one and you can do searches, etc. That said, I haven't found any worth buying yet but I'm surprised at how cool some of them are.
Bing pops with visual search
Deletion can be much slower than file creation when the files are hundreds of mb too!

Worst of all, "rm -R" runs right into XFS's most pathological case -- it's doing tons of metadata reads while it unlinks files, and XFS shoves a lock in every orifice.
success, failure, performance and ability are all easier to measure in physical engineering disciplines than in software.
"Another is that it’s possible to give the sides negative lengths."

Is that really a problem that needs fixing? Also the with/height problem - one could argue the fault would lie with the code that tries to do both...

A while ago I had a realization as to what defines the Java developer mindset: it is fear driven development (FDD).

(Taking Java as an example because it is the only world I know a little bit better).

Maybe sometimes FDD is being called for, or maybe it really is the superior development style. Personally, I am quite sick of it, and it definitely makes it harder to get things done in my opinion.
Interesting. If HN ever decides to go the database route, sqlite might be a good fit since it's relatively simple and everything is stored as a single file.
The Web Ecology Project is publishing its own research online now, and getting a good bit of attention for it: http://www.webecologyproject.org/
PG would be number 1 by almost a 2:1 margin if he were on the list (he has 50,000+ karma, vs. 27,000 for nickb). The software explicitly blocks him (and has since HN was released), presumably as a way to make the site feel like a community and not his personal vanity site.
The reason application developers haven't been using fsync() is because it's ridiculously slow on ext.
Well, the problem in my opinion is, that a square is a rectangle, indeed. However, this is not square is-a rectangle;, but rather: square is-a rectangle with rectangle.height == rectangle.width;

This is overall something I have been pondering (and recently planning and implementing) to extend the standard object orientation: adjectives (opposed to 'nouns' (objects) and 'verbs' (methods)).

An adjective would simply describe a noun furhter and simplify a dispatch inside a method depending on the state of an object.

Some pseudosyntax from the current state of ideas would go like this:

adjective_group rectangle_type(R) {
if(R.width == R.height) {
return square;
} else if(R.width * 4 = R.height * 3) {
return widescreen;
}
}

draw(square rectangle R) {
// specialized draw for squares
}
draw(widescreen rectangle R) {
// specialized draw for widescreen rectangles
}
draw(rectangle R) {
// general drawing method for rectangles
}

This goes pretty deep if one starts to think about it:
* Buffers: empty, full, something in between
* Abstract syntax trees: well-typed, ill-typed
* Accounts: banned, active, moderator, admin

Basically, it simplifies the pattern

method(object) {
if (predicate_1(object.state)) {
// stuff
} else if(predicate_2(object.state)) {
// other stuff
} else {
// default stuff
}
}

I am just currently working on a dispatch mechanism which is at least a bit intuitive :)
Why I quit playing Foursquare
This "never eat alone" or http://tablesurfing.com/ may work better in big cities to match people who want to go eat on a specific restaurant.
The war file and swank shouldn't be mutually exclusive, I just haven't bothered with a .war because by default Compojure starts Jetty itself, and I didn't want to bother with compiling the .war and restarting the server to test changes. Once you get addicted to reloading code from your IDE, you don't want to go back. :-)
How do they deliver your copy of the pad to you?
I see what your getting at. But this whole example is a setup. Let me go through some of your arguments to show just how easily they can be turned.

1 - "you would not expect that two out of nine of your collection also changed its height."

If two of them were Squares, I would expect height and width to mirror each other. Your saying you wouldn't expect it. Well, that is a problem if two different programmers using the same classes have two different views of the object's behavior. This can happen with any implementation of any class.

2 - "If you have cached computations that depend on the rectangles' height"

Your violating encapsulation of the object's attributes by "caching" this data elsewhere. If you need to do such things, this is what MVC was invented to handle: an attribute changes, it fires an event and dependents refresh themselves, caches invalidate, etc.

3 - "The Square class could have been written much later than her code"

Its still a Square (by my definition). The new Squares she has are still Rectangles too. Why did this programmer assume that changing a rectangle's length would never effect its width? This invalid assumption could have been made prior or after the introduction of Squares.

In short, the original argument is bad because almost everyone agrees about the behavior of a Square. Key to use of any code is agreement on how it works. For example, If I use jQuery and can't wrap my mind on how John Resig thinks I should be using his library, its my problem.
I wonder if the people that do it, think there is some conspiracy, where pg secretly monitors all upvote history, and if he sees you didn't upvote a YC story, or one of his comments, then you get disqualified from getting into YC.

Nah something like that is stupid....

...he probably wrote a script to do it for him.
Opster: Pythonic option parsing
I don't use Ruby on Rails, because -- honestly -- I'm not quite sure what Ruby on Rails means. Does it mean using a Mac and TextMate like that guy in those cool screencasts? Does it mean Ruby, the language? I don't care about that. Does it mean Rails, the framework? I don't really understand the appeal. The other day it took me several hours to get Ruby and Rails running with Apache, then several hours to get Redmine working, and the end result is that it's dog slow, eats up all the VPS' memory, while all the app is supposed to be doing is putting 100 byte bug reports into Mysql and listing them 10 at a time. The biggest problem seems to be that "the Rails way" is to say "disk is free, memory is free, cpu is free, bandwidth is free, yo mama is free", the end result is stuff that is not a lot of code but still bloatware in terms of resource consumption.

Cheers!
So 100000 people need a unit converter on their phone? Seriously? I "need" one perhaps once a year, and then I just use Google (which would be available on an iPhone, too). (Need as in "hmm, gee, I wonder what x is in y", not as in "oh my god, I need to know this ASAP!!!").

I think there is another story hidden there - taptaptap has become so famous that people just buy whatever they put out there. Good for them, but hardly something to draw parallels from.
Very cool move. Especially coming form a big company like this, and indeed it was a smart move to "design" this part of Google as a stand-alone team instead to delegate every other team to take care about data IO.
I develop java applications on Windows. Within my company there are at least 3 other software engineers that are doing web development targeted towards deployments that are not on windows servers that still use windows as development boxes. We also do this by choice.

If you are familiar with Windows XP then it is a fairly stable, simple, and reliable OS.
yea, i think thats a close interpretation! thanks!
That's a pretty ignorant statement. Domain names can go a long way towards achieving great search rankings, which is why the better .net and .org domains sell for 10's of thousands of dollars. Though, I would agree that for those types of meaningless web 2.0 names you better get the .com, since all the marketing you do to build your brand will be pushing lot of direct traffic to someone else's domain.
Can this be selected by mountpoint at /etc/fstab ?
> OOP abstractions can sometimes be masochistic!

You think?

The article is a train wreck of analysis piled on the train wreck of "OO Design", which is itself a train wreck of an attempt to promote reuse by modeling code with data types, which is itself a train wreck of an attempt to imagine what hypothetical programmers in some hypothetical universe might find "useful" as masturbatory aids, hypothetically speaking. (This is not actually true - OO[D] is really an attempt to commoditize programming.) Most of the comments here are just dumping more trains on the pile. The abstraction shitheap is so high at this point that we can barely even remember that we are supposed to be solving some kind of actual problem.

The best part of the article is when the author acknowledges that the code might not actually need to be thread safe and so avoids wasting his time with that particular assumption. There is nothing else to be salvaged. A square is not a rectangle? Goodbye mathematics - what is the point of a type system again? More to the point: what planet are the users of this API from? Obviously not this one, and just as obviously no one knows or cares. Not ONCE does the author stop to wonder what services the actual users actually need; it's only about what this guy thinks MIGHT comply with some random "design" rules. One wonders if the users even exist as anything other than just another abstraction, and wondering about what problems those users might actually be trying to solve is right out.

Object Oriented Design can be seen as a case of reusing a cliche and butchering it at the same time, with the cliche being the shooting of ones self in the foot, and the butchery being the placement of said foot squarely upon the face of beauty immediately before pulling the trigger.
masochism is deriving pleasure from what would be considered pain by the majority. I think we should hope that us humans have a predisposition to seek pleasure (even when veiled in apparent pain). have you ever read A New Earth by Eckhart Tolle?
Ask HN: SQL AND Flat File?
I was just thinking, how quick it would be to store the actual data of an application in a flat file.

Now, you can't just go storing everything in a flat file... sometimes sorts and searches are required, and to go through directories and files recursively could be a pain.

Now, imagine, you stored all your searchable data in a database, and had a pointer field, that pointed to a data file?

This would be very specific per app, however- so long as all my searchable data is stored in the database, why should I store the actual data in a database?

(Locking aside) it would be faster, I am sure... but how much, worth doing it?
Antarctica's hidden plumbing revealed
thanks cesare, that's very interesting! It really resonates with what I attempted to articulate in the post.
that's what i meant. .orgs and .nets surely are worth a lot for the SEO potential thanks to the weight search engines place on domain text.
Three Basic Human Needs Startups Meet
You seems misunderstood what I meant.

If there is petroleum oil in Mars or Venus. It make the abiogenic petroleum oil more possible be universal.
I've seen firsthand the waits and the bureaucracy of some of these immigration documents.

I can tolerate waiting; while frustrating, that's not the real issue. But it's hard to just live a normal life in limbo, with all the implicit threats. Your documents are tied to your job, so switching jobs will risk, at minimum, starting from scratch; and there is a chance of denial and deportation at every turn. You are also not immune to layoffs, so this can blow up in your face without warning, giving you a very short period of time to fix it. And in the end, even if you survive all the hoop jumps, there is still a chance you will be denied the documents that you've been waiting years to receive.

Compare this to somebody just wanting to do essentially the same work in their home country, where they probably can, minus all the bullshit. This is why the U.S. is in danger: because immigrants can only take so much, and at some point, they simply will move all their ideas and capital back home.
The article is interesting in suggesting that comprehensive immigration reform is a political landmine for this administration, as it has been for previous administrations. A founder visa would be an interesting incremental change, especially favored by the readership of HN. Testimony in Congress before passing such a new law would surely bring up the issue of what happens when a start-up firm fails, as many do.

A press notice for pg is of course interesting to readers of HN, and it will be one more proof of his notability (no longer doubted) on Wikipedia.
Tell HN: Paul Graham on TC50 panel, streaming live
-- honestly --
I don't use .NET because:

* I am cheap, there are free stuff that are excellent and free

* I don't trust Windows as a server environment - 1) because of inherited public perception of it 2) lack of experience

* I have a perception of mono as poor .NET clone

most probable reason is no. 1
But it's hard to just live a normal life in limbo, with all the implicit threats.

Do immigrants have in all cases a home country to go back to with a better trade-off in this regard than the United States? As long as some countries are sufficiently lousily governed, the United States will always have a ready supply of some kinds of immigrants. The article's point is correct that persons who are able to set up new businesses with new technologies probably have better capacity to shop for a country to live in than most migrants.
To have "a creative outlet that supports me financially" -pretty much sums it up for me.

If I just wanted money, I'd just focus my energies on my current job/career.
It's not for nothing Google took 8 months to port Chrome to Linux. Porting can't be this simple.
The front page would be empty until people started upvoting from the new page.

Comments would be ranked purely reverse-chronological until people started voting.

It'd be less disruptive to the front of the site than another revisiting of 'Erlang sure is interesting'. Past threads would slowly be mined for re-karma as they were re-submitted and found in google searches.
I'm going to be nit-picky here, but this should really have been described as Church encoding in JavaScript.
Geeking with Greg: Experiments and performance at Google and Microsoft
I suspect that it has less to do with CloudKick's current capabilities and more to do with its potential. As soon as I get a chance, I'm going to sit down with melito to get more of a tour of Sliceapp.

The potential possibility for me to stage apps and deployment necessities SOMEWHERE and spool that up across any number of servers / datacenters / hosting providers is a VERY tempting idea indeed.

That I could potentially change hosting providers for my app without downtime is an idea I think a LOT of people could get behind.

CloudKick and Sliceapp are in-roads to that level of capability, and if executed well enough, could literally change the way we think of hosting forever.
This just comes down to the difference between identity that changes with mutation, and identity which is constant with mutation.

All squares are rectangles. Some rectangles are squares. If the object used to represent squares and rectangles is mutable in width and height, then its squareness cannot be immutably associated with its identity, and thus cannot be encoded as a type, since objects in static languages have immutably associated types.

There's some deep point about naming objects after their attributes, without paying attention to whether the attributes may change. Experienced programmers know this well, but laypeople don't need to make the distinction often as their language usage is usually only temporary, not needing to account for changes over time. It's the statement that must always be true, when all the right qualifiers and conditions have been included, that's hard to make.
IPhone Gets .Net App Development
I was kinda assuming you'd pay the first month's rent while you got all your stuff moved in, then steal it and sail the seas, hijacking nuclear submarines.
It isn't because programming is too young, it's because programming is commercial. OOP retardation is new thing, it's not something we've been trying to do forever are are just now realizing is problematic. It was pushed by manager types who just wanted as many reports as possible and something that let them divide arbitrarily simple jobs among all of them, and it was allowed to grow by a class of programmers who didn't know any better because they were taught just enough to churn out the sort of programs that industry figured it needed. Now it's everywhere and even people who known it's crap just have to deal with it to get anything done.
I can export. Can I erase?
Apple Open-Sources Grand Central Dispatch (Snow Leopard Multithreading)
Absolutely. Reminds me of this:

http://www.theregister.co.uk/2007/05/29/william_davies_ask_v...

Ask.com's terribly misguided advertising campaign.
One way the general public is kept scientifically illiterate is from locking up scientific journal articles behind subscription walls.

When peer-reviewed science articles are on lock down, and pseudoscience webpages can freely proliferate on the Internet, pseudoscience wins.
I personally think that the newspaper folks are participating in a form of mass delusion when they talk up efforts like this with optimism. Micropayments is extremely hard to get right - if it worked the way it should, I'd treat it like a small hole in my pocked, an annoyance, and would likely plug it. Most realistic to me seems some kind of ISP fund. And there's no way for the papers to seriously collude to squash all free competition.
I'm a traditionalist Catholic.
This should probably be a poll.
I agree. You can't have a rectangle with a null width, so why should you be able to instantiate one?
There's something American going on here. You can't mention that a 400lb person is fat in that person's presence, and you can't say that your product might not be better than the iPhone. We know both things to be true, but we're not supposed to say it.
Wait, I missed the newsletter: what don't we like about optparse?
PostgreSQL stores everything in flat files too (on Windows, in a directory like "C:\Program Files\PostgreSQL\8.1\data\base\100929"), and I'm guessing MySQL would too.
Yes, X11 is backwards compatible and that's been really great for the Linux desktop. But the article bashes Windows for rapidly introducing new APIs even though the old ones remain compatible; I'm just pointing out that Linux does that too.

As for the audio situation, the problem is sharing between multiple apps. ALSA sucks at it so "sound servers" were invented but they caused more problems than they solved. Now it seems like every distro has a different sound solution, and meanwhile OSS was never removed from the kernel so you can't even rely on ALSA always being there.

The filesystem problem can't be blamed wholly on apps or kernel devs; IMHO the problem really lies in POSIX which doesn't specify a way to achieve what app developers need in a way that can also be easily implemented in the kernel with good performance. I would argue that the behaviors app developers were using became a de facto part of POSIX and the way kernel devs broke them was irresponsible even if it didn't break the letter of the standard. Contrast with Microsoft which goes far, far out of its way to avoid breaking apps even when they flagrantly violate good practices (there are some great examples on The Old New Thing: http://blogs.msdn.com/oldnewthing/ ).