skysight-inc/HackerNews huggingface dataset:
The lazy function technique can easily become an example of bad coding practice. Code needs to be easy to read, understand, and maintain. In most cases solution 2 is good enough, in all cases it's much simpler.

Advanced techniques should only be used when there is a clear justification to sacrifice simplicity. It is disastrous when developers use so-called "advanced" technique only to entertain themselves and show-off.

You are judged not by the niftyness of your code, but by the availability, maintainability, stability and functionality of your system as a whole.
It's also amusing that they're trying to take down an advertisement. The whole purpose of ads is to be seen by people, for free.
Me too.

There's a Hacker News meetup in NYC and a few tech meetups which are pretty interesting.

You can email me at myusername @ gmail if you want to chat.
Thanks for the ejohn's link. I've been reading his new book, and this pretty much all the code that he shows there. (as far as I've read)
I don't think this is a realistic example and it especially does not draw any attention to the reasons why people think they can get away with texting. The real nature of texting while driving is that you perceive a specific period of time during which it will be safe to accomplish a very familiar, tactile task. You text during the times you perceive safety (for example, at a stoplight) and focus on driving otherwise, performing only the simplest of phone tasks when driving is more difficult. The danger is as much that those predictions about the road fail and you're not as good at the phone tasks as you think, than the raw inability to multitask.

This test was unrealistic because the road challenges were almost entirely unpredictable, and because using the phone involved learning something new (I can in fact accomplish a number of tasks on my phone without even looking at the display). The phone in the example required a great deal more attention than I have to give to a typical text message.
I was using the OP's count of 96000 messages.
My 5 yo daughter loves Zebra Paint.
They're all liars. ;)

I actually happen to love perl and have written 10's of thousands of lines of perl. I just do not always claim to know why it works :)
I'm not sure how the example could make the assertion fail; I think that the point is that if 3.3 is treated as a long double by the compiler, then the result of x*3.3 will be a long double, which is more precise than the double returned by foo; but, regardless of how bar1 and bar2 are compiled, they both make a call to foo() which returns a double. Is it the case then that the behavior depends on how foo is compiled? I don't see how else the 80-bit result could propagate to the test for equality.
Actually the World Intellectual Property Organization Copyright Treaty is the more applicable one :) (it's an extension to the Berne treaty to make it cover software). Unfortunately whilst both treaties are very specific in some aspects they are unchallenged very unspecific in other important areas.

Also; they establish a civil crime not a criminal one. Theft laws may still apply here in the UK, as it is I know the only massive obstacle to infringement as theft (here in the UK) is the final article - all about the intention to deprive permanently. There are movements by certain pressure groups to get it clarified where the line is drawn.

And anyway - the point the video is trying to make is that it is a "moral" theft. I think it's fair to say the copyright holder has the right to say they feel that morally a "pirate" is "stealing" from them :)

(Im not defending them or the video - or trying to suggest it should be theft)
Yeah - I had the same reaction. In the defense of the OP, the title comes straight from the article...

Like you, I'm skeptical that the author of the article is going to connect with their audience by choosing a title like that.
Our product idea tackles the analysis of massive amounts of data. Thus, we require relatively high computing power, data storage and bandwidth, and a rich, interactive UI. Consequently, we are going for a more traditional desktop app approach.

IMO, there's nothing wrong with either web, desktop, mobile, or whatever, which is why I don't understand the web vs. desktop wars that sometimes rage around here. Just use the right tool for the job.
Calling the least mean square fit function in the linpack library used to go into an infinite loop occasionally. I tracked it down to some very dusty FORTRAN code in the linpack kernel, which gfortran42 compiles incorrectly. Adding -ffloat-store to the compile flags for that library fixed it.
How do you dent a concrete floor with a robot ?
Number 6 is terrible -- hacking together html from strings is just not the right away to do it. He should be generating the DOM elements and appending/nesting the generated elements appropriately, not concatenating a messy string.
Ugh. That's as bad as some of the programs I've re-written to leverage SQL. Way too many resultset/for loop combos that took hours to run in Java or C# that turned into seconds with a little set-based thinking.
reason that package management feels so integrated on Linux is that Everything Is A Package, including the system components. This works because, usually, every required for a Linux system is open-source and free-as-in-beer.

On OSX, on the other hand, many things that people want to install are closed-source, for-pay apps. Having different installation and management for those than for open-source packages is what makes fink/macports et all feel like ghettos.

A "real" package management system for OSX would be more like a package store: it would allow you to install both free and paid apps, and handle upgrading/installing dependencies/uninstalling them equally well. It would also need to be able to detect and "absorb" responsibility for any apps you installed from DMGs.

Of course, once such a system was created, Apple would very likely buy it and integrate it with Software Update.
I agree that its very hard to determine whether the problem is the content of the sites (Politics ect.) or the visitors to them. As much as I'm against complicating HN with sister sites and categories I think that if nothing else it would be an interesting experiment. If it were developed I would certainly check it out and I think that if it was set up similarly to HN it might work. I feel that the best thing to do is set a sister forum up as a beta limited to HN users with a certain karma level (Although I recognize that this would probably exclude me) and see what happens. The only way to know what would happen is to try it. If it doesn't work and the site degenerates into a reddit than most users from HN will stop visiting it and it falls apart; if it works than it can it be opened to a wider array of users. I say try it.
I don't want to be a wet blanket, but I'm guessing that once the novelty wears off, most people will return to their habit of taking the escalator.

I realize that this probably isn't a permanent installation, but someone did this in a more permanent fashion at a building near me, and people spent a lot of time playing on the stairs when they first went in, but now most people are back to using the elevator.
heh, which SQL? they're all different :-/

I wouldn't consider someone a SQL "master" unless they had worked extensively with several dialects and could compare the differences between them.
The list was compiled in response to a list of tech blogs that OMITTED women, to highlight female geeks (also) worthy of note.
s/Software Update/iTunes
I was working on a C++ daemon process that communicated over a TCP socket. At the time, we were using the Poco library's facilities to do the standard daemon startup stuff (get rid of the controlling pty, point standard fds to /dev/null, etc). Anyway, one of our field installations wasn't working, so I took a look. It turned out that the communications over the TCP socket weren't working -- where the client process expected a few header bytes containing the message length, it was getting wacky values. I tried a bunch of stuff, and in the end, I displayed the header as ASCII, and it showed up as "SQL: INS". This blew me away; this looked like some debugging output that normally goes to standard output when the process wasn't running in daemon mode.

As it turns out, the Poco library didn't read Steven's UNIX book all that closely, and they closed all of the file descriptors when turning a process into a daemon, instead of reopening them to point to /dev/null. So, standard output was closed, and its file descriptor was reused for the TCP socket. Of course, things like "cout" always assume that standard output is at a particular descriptor, so all the standard output from the program was getting written to the TCP socket.

Boy, that was confusing.
Which is one of my pet gripes with SQL, that the default is to affect all records on update, that should have been:

UPDATE tablename SET xxx='newvalue' WHERE ALLRECORDS;

Or something to that effect.
I'm going to have to complain about the absence of Smalltalk on this list. But for the sake of my reputation, I am not going to complain about the fact that VB is not in the list.
Yeah, really depends on your application.

ActiveScaffold is really for admin-side straight to the DB stuff. We use it for our admin interface and it works great up until you want something more than basic CRUD.

Hobo looks a little like rails generators on crack.
Monty weighs 160 lbs, and at the time had an over-designed metal piece for its neck. A sensor failed and it faceplanted, taking a 1 cm deep chunk out of the concrete. It's still there, under some carpet.
I use a similar technique when the number of optional arguments get out of control (i.e. if there is more than one optional argument). If you want to tight control, you can take advantage of the fact that a variable that is a function, the length member specifies the number of arguments declared as in:

(function(a,b,c){}).length == 3

Using that knowledge, you can do this at the top of a function:

if(arguments.callee.length > arguments.length){
throw "Required Parameter Missing";
}
I had one of these too. I had to UPDATE a line of a few customers order's logs on a production server. The database was huge (several million lines).

After a few seconds I thought it was taking too much time only to realise I forgot one AND in the WHERE... I struggled with the backup but managed to get the data back just after the first call.
Not offended. Nothing to worry about.

You were having a conversation with a lot of hidden assumptions and definitions that were not clear to me -- to me, that's "out there". I was unable to gather anything useful from your stream, and that always interests me. It's a chance to either prove or disprove my own assumptions and definitions.

If you say things are not big, and I provide examples of where they are big, and then you throw away my examples, we're done. I can't well argue with myself, and unless you put forward a working definition of what "big" is we don't have anywhere to go.

I see the change in China as very incremental, done under duress, and done to the least amount possible in order to maintain control. Perhaps that's uncharitable of me but that's my current viewpoint. In the U.S., on the other hand, we seem willing and able to make change on a whim. We get tired of one set of philosophies and switch off to another every so often.

Now you can certainly argue that the underlying drivers of the U.S/, commercialism, haven't changed any, and that this lack of change means an underlying common theme in governance. But I think that begins to dilute the conversation so much as to make it meaningless -- and once again, you have me arguing with myself.
It's misguided like most things in the "War against Piracy". The people who really suffer are the ones who legally purchased the DVD. Most DVDs you download have those things stripped out. Same with games and applications.
Why on earth would they go out of their way to omit people because of gender, that's just plain stupid.
yes - really cheap. I paid about £65 I think

It doesn't seem to be widely known about - I only found out about it from comments on a forum - so I'm returning the favour :-) . Its made a big difference to my setup.
Online tool to save URLs via bookmark
A cool site that allows to save my visited URLs when I wanted to read later
Ooh, that's a dangerous, dangerous path. It's well known that adding financial incentives can have all sorts of negative side-effects.

Beyond the obvious "gaming the system" problems, there is the well-known fact that paying people to do what they should want to do by themselves can have strong negative effects on motivation. Once the payments stop, his son will probably feel like he's being wronged because his dad's not paying him to play football anymore, and turn his back on it. Net result is the opposite of what he was trying to achieve.
I ran a smallish linux distro on the 'Slug', with a USB audio port as a media player. It was a bit of a cabling mess though, but it did work (usb hub attached to the slug to give it more ports).
Why I Love Venture Capital(ists) Too
Or rule of thumb, you can write a significant amount of code in the language:

(a) without reference to the web or your reference books.

(b) with a minimum amount of syntax errors
Unfortunately, if you are adding a lot of elements, your performance can really suffer by creating DOM elements. It helps if you "createDocumentFragment" but as far as I know, shoving a big string into the non-standard innerHTML member is still the fasted way to add a lot of content.
Aye, that's a genuine oversight, apologies. Smalltalk added.

VB = BASIC, which is there.

There are many other structured basics besides visual basic (GFA Basic, BBC Basic and a whole slew of others).
On Gem Forking
- smalltalk
yeah, that's one of the enhancements we plan to make.
if you search for "with:public yc" you'll find a wave with fellow ycers and yours truly
"At the expense of" is an interesting way of putting it, aren't we all here specifically because HN is more exclusive with a more select group of users? Aren't exclusivity and selectivity the very goals we seek? And isn't HN becoming truly popular and thus generic and shallow exactly what we seek to prevent?
returning a double can be optimized into returning an 80-bit result in a register. If this happens with bar1 but not bar2, then you get different results.
I have my doubts, but my wife has successfully used hypnosis to quit smoking and get over a fear of the dentist. I think it's placebo, but I don't tell her that -- if it works for her, I don't want to risk undermining the effect.
Fortunately the other 95% has been solved several times over: dpkg, RPM, pacman, etc. Why bother writing another package manager for OSX? I'm puzzled.

Of course, the real problem is that building and maintaining a large package tree takes a ton of effort, and it's not very interesting work. I think that this is the real reason why package management is lacking on OS X--no one has any financial incentive to make it better. With Canonical and Red Hat, they literally have no product without a healthy package tree. So they pay a lot of people to package software. There is no corresponding situation in OS X. The vast majority of their users don't give a hoot, so Apple is not interested.

I think there is a modest but extremely unglamorous business opportunity here. Get a healthy FOSS package tree going for all arches on OS X and charge people $1 a month for access. (AFAICT this is allowed by the GPL: http://www.gnu.org/licenses/gpl-faq.html#DoesTheGPLAllowDown...)
I don't think he should reject it. Rejecting it would be an insult and spur unnecessary controversy. He should accept it with grace and move on.
A bit more browsing and I found that you CAN post a question for discussion already.

So my new suggestion is to add an option to delete your own suggestions from the suggestions threads :)
Is it me? I watched it, and can't figure out when the actual impact was.
What does "totally" accomplish in the sentence above? Am I the only one that finds the very frequent abuse of this word annoying?
Exactly. He's conditioning his son to whine about all kinds of stuff so he'll get money in order to perform.

School grades and so on. I'm really not sure if this is smart. Such tricks work both ways.

I've sent my son to karate, I never had to 'push' him there (or bribe him) and if he didn't want to do it any more then that would be fine with me, even though it is beneficial to him.

There are plenty of choices, and if you can only get your child to do what should come natural because of a monetary incentive then that will come back in some way in the future.
The threat of vilifying anyone who commits any sin -- no matter how ethically good their average performance -- is that it decreases the incentive to strive for good behavior.

There's a huge perception gap between being perfect and being very good, but it often seems the perception gap between being very good and no good at all is surprisingly small.

Given that it's nearly impossible for a very large company to be perfect all the time, it becomes easier to give up trying so hard to be very good.
http://docs.python.org/tutorial/introduction.html#lists
winningham@gwave
New Calculations Suggest Universe May be Closer to Heat Death
Sure doesn't look that heavy, maybe I'm misjudging the scale here, I'll have another look at that video.

Nice balancing by the way, smooth dampening.

Edit: Ah yes, now I see it, that's a small scope and a lab powersupply in the background, I estimated the size off by a lot.

I figured the whole thing was about a foot tall or so, sorry!
According to Penn and Teller, there's not nearly as much power as advertised. I don't want to link to copyrighted material, so here's a link to a google search: http://video.google.com/videosearch?hl=en&safe=off&q...
Best eye-opener I had on JavaScript is Douglas Crockford's site. www.crockford.com. Many folks here probably know of it, but if you've never perused that site you're missing something good.
signedlongint
Fortunately the other 95% has been solved several times over: dpkg, RPM, pacman, etc. Why bother writing another package manager for OSX? I'm puzzled.

MacPorts can actually generate dpkg, rpm, and even Installer.app packages, but there hasn't been the resources or interest in maintaining a tree of binary packages. There has also been work into creating a dpkg-alternative via xar.

Fink produces dpkg packages as well, but has resource constraints in producing up-to-date trees of binaries.

I think there is a modest but extremely unglamorous business opportunity here ...

Definitely allowed, but could you prevent users from simply copying your packages to an open repository (ala CentOS vs RedHat)?
He is not your employee, he is your son. If he doesn't want to play football, he shouldn't play football. It is not the obligation of our children to make us proud. Frankly, this is just fraked up.
I've done almost this exact thing. The "run only the SQL that's highlighted" feautre is handy, but it can cause serious bad juju on a production box.

Unfortunately, in my case, I ended up having to rebuild all the data from week-old backups and transaction logs.
here is a much more effective ad on why you shouldn't text while driving

http://www.youtube.com/watch?v=R0LCmStIw9E
How ravelry scales to 10 million requests using Rails
> without reference to the web or your reference books.

That's one of my main gripes with Java. Without an IDE you are essentially blind. The language itself is reasonably easy, but before you really grok those libraries takes forever.

And I really do not like IDEs, but when working in Java I almost have to.

The library and API's are just enormous.
... except when MySQL's replication just fails. On more than one occasion, our DBAs have had to ask engineering what to do about records which differ between the master and some slaves. Something about updates failing at the slaves after they committed on the master, which as far as I'm concerned shouldn't ever, ever, ever be possible.
I agree.

I started a company that has nothing to do with the web at all. After a few years, it has done quite well.

It seems that many believe here that the only form of entrepreneurship worth pursuing is web-based apps, or, failing that, a technology-oriented company.

But many startups do quite well by innovating with business processes, targeting inefficient industries, or offering more traditional but innovative products to underserved consumers or businesses.

For example, furniture seller Design Within Reach beat the pants off their VC funded online competitors in the late 90s, using the massive innovation of a paper catalogue. This worked because the furniture industry had extremely poor customer service, and they figured out how to fix that by being an excellent reseller; they knew that "being online" was not a magic pill.
That might be relevant if you want to continually add many elements to the DOM, but that's rarely the case in most web applications. The benefit of using strings to shave milliseconds is heavily outweighed by the unreadable, error-prone code created when one tries to shoehorn markup into a concatenated string.
How do you define worst?

How about most widespread? Once while trying to debug a CPAN module I figured out that if $condition was false then Perl had a bug causing

my $foo = $bar if $condition;

to leave $foo with whatever value it had on the previous function call. (The exact behavior is more complex than that, but that's a good first approximation.) I then made the mistake of reporting this in a way that made it clear that

my $foo if 0;

was a static variable. Cue years of people like me trying to get the bug fixed and other people trying to keep it around. In the meantime EVERY large Perl codebase that I've looked in has had this idiom somewhere and it has caused hard to notice and reproduce bugs.

How about worst damage to a system? Due to a typo I once caused my employer to send the Bloomberg's ftp system every large file that it had ever sent. Since it sent a large file every day, this crashed their ftp server, meaning that a number of feed providers for Bloomberg didn't have their feeds update that day. I implemented no less than 3 fixes that day, any one of which would keep the same mistake from causing a problem in the future.

How about most (initially) bizarre? Debugging a webpage that a co-worker produced where, depending on the browser window size, you couldn't type into the form. The bug turned out to be a div that had been made invisible but left on top of the page. At the wrong window size it was in front of the form, so you couldn't click on the form elements behind it. (I figured this out by first recreating it with static HTML, then using binary search to figure out what parts of the page I could whack and still reproduce it until I had a minimal example. Then it was trivial to solve.)
It's great to broaden one's thought processes to relate to all kinds of startups.

I'd be curious to know who's working on non-software startups. Tim Ferriss got started with an energy/vitamin supplement.
> What gets my goat a bit is that you see attacks on Guantanamo for breaking the Geneva Convention (or even, as here, that it is as shocking as the Nazi mass murders!) -- and when it is pointed out that is a non-serious argument, there is never an answer.

Answering straw men was never a requirement. You made that link, it never was in what I wrote.
The Kelly Criterion is controversial (proponents of utility theory hate it) but has been used in financial situations (see: "The Kelly Criterion and the Stock Market" Louis M Rotando, Edward O Thorp, The American Mathematical Monthly (1992) vol. 99 (10) pp. 922-931). Now no system can make money unless the underlying game is favorable to the player (which is why "system" has a bad name). Also the Kelly System can be used with portfolios- it is appropriate when you are investing in anti-correlated instruments (like stocks and bonds at the same time).