skysight-inc/HackerNews huggingface dataset:
can we have an example of one of your long functions as to what it does?

Sure. main() in http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/portsnap/... is over 400 lines long, and it

* Looks up a server's DNS entries,

* Connects to the server (trying multiple addresses if necessary),

* Constructs HTTP requests and sends them to the server,

* If less than one HTTP request is pending, blocks until it can finish writing a request,

* Reads HTTP response headers,

* Reads an HTTP response body and writes the data to disk,

* Prints a status line,

* if the server sent an HTTP/1.1 response, loops back to the top to continue sending more requests and reading more responses using the same TCP connection,

* and if the connection broke, closes it and loops back to the top to open a new connection and continue downloading.

I separated out the bits which could usefully be put into their own functions (e.g., constructing an HTTP request, or reading a \r\n terminated line from a socket), but there was no point dividing up the rest.
Slightly tangential, but I think "Premature optimization is the root of all evil." is the most misquoted statement in the history of computer science. Most importantly, people tend to misinterpret "premature" to mean "any time before the software is done" or similar.

I can't even count the number of times where I've worked on or watched a project where performance is important and the following series of events occurs:

1. Module is designed with that quote in mind: it must be simple to implement and performance is unimportant. Note that this isn't a prototype: this is a plan for the actual final product.

2. Module is built and finished, then submitted for a review. The reviewers, knowing the importance of performance for this module, point out a number of ways that the module is extremely suboptimal.

3. Because of the assumptions so heavily ingrained into the module, implementing these performance improvements--which could have been foreseen as necessary far earlier--requires a near-complete rewrite of a large part of the module.

It's exactly as if we finished our software and our customer decided that his requirements were actually totally different--except in this situation, it's entirely our fault, because performance was a requirement and we ignored it because we didn't want to optimize "prematurely". If you want performance, you have to design with performance in mind; if you don't, and then decide later you want performance, the cost of your earlier decision is magnified a hundredfold.

I have almost never seen that quote used correctly.
Substandard Printing Will Ruin Your Image
Every business today has to fight a serious competition irrespective of the niche to which it belongs. You will have to make sure that you are using all possible marketing strategies to boost your sales level. When every business is trying to survive the effects of recession, the competition level is soaring high. Added to this, the overall consumer buying capacity is coming down drastically. All these make marketing a tough battle.
I don't offer phone support for Tarsnap; but I do offer email, twitter, and IRC support. It all depends on what sort of users you have -- I'm quite fortunate in that Tarsnap has very technically competent users.
We're targeting churches, and those who work there aren't that technically savvy, so I think offering phone support would help quite a bit.
HN Suggestion: "add comment and upvote" button?
I often comment on a submission and forget to give it an upvote. Implementing a button at the bottom of the comment form that said "add comment and upvote" would allow people to comment and upvote an item in one click.
How Geeks (and Non-Geeks) Can Help Iranians Online
Strings. Python allows you to manipulate an object's structure through the __dict__ field (as far as I can remember), and dir() also returns strings. They are ad hoc symbols.
It's not the inventor who claims that but a New York Chef: Manuel Trevino.
We're targeting churches, and those who work there aren't that technically savvy

I have no idea what your startup is, but are you sure that you're going to be dealing with people who are working at churches, rather than congregation members who volunteer? Most community organizations -- churches, kids sports teams, amateur orchestras, etc -- will include someone who is technically savvy, even if the priest / coach / conductor / etc. doesn't know how to use a computer.
Mountain View requires phone systems to pass fire inspection in office buildings. Employees generally need a system by which to contact emergency services.

Labor laws in some jurisdictions cover employee expectations by the employer. If the employer is shown to have arbitrary expectations of their employees (like "soft hours" or flexible work schedules), those expectations need to be somewhere in writing or you can get in big trouble. I've heard of engineering firms being totally screwed (into bankruptcy) by overzealous labor law enforcement when it was discovered that they, for example, had policies like "work whenever and however you want, as long as you get your job done."
People become "super-connected" when they've earned a lot of people's trust or respect.

Can't imagine why this Pratt guy is having difficulties with that.
The Curious Incident of the Dog in the Night-Time. by Mark Haddon (http://www.amazon.com/Curious-Incident-Dog-Night-Time/dp/140...) - engaging story written from the point of view of an austistic teenager. One of my favorite characters in any book I've ever read.

Crashing Through by Robert Kurson (http://www.amazon.com/gp/product/0812973682/ref=ox_ya_oh_pro...) - inspiring story of sight restoration to a lifelong blind man. Fascinating exploration on vision, learning, and a lot of other stuff we take for granted.

The Tao of Pooh by Benjamin Hoff (http://www.amazon.com/gp/product/0140067477/ref=ox_ya_oh_pro...) - Taoism and Winnie the Pooh. 'nuff said.

Life Entrepreneurs by Christopher Gergen and Gregg Vanourek (http://www.amazon.com/gp/product/0787988626/ref=ox_ya_oh_pro...) - applying and expanding the principles of entrepreneurship to your life as a whole, not just your business.

Revolutionary Road by Richard Yates (http://www.amazon.com/gp/product/0307454622/ref=ox_ya_oh_pro...) - I thought the movie was great, and this book is great too, in a different way. The writing is clean and evocative, the dialogue is provoking and realistic. I'm a fan of Richard Yates after reading this book.
Is the cost of JNI really that high? I'm curious--I haven't used it myself, but a client of mine is using it in a very latency-sensitive Java applet that uses JNI to call libavcodec to decode a video stream and then immediately display it through Java's own native libraries, so I would think the cost isn't that high.
Born to Run

A book which touches on how we evolved to be super distance runners and "persistence" hunters.
Revelation Space, by Alastair Reynolds - Quirky sci-fi novel with a xenoarchaeology angle

Hunters of Dune, by Brian Herbert & Kevin J. Anderson - I'm not recommending this one on the basis of the writing. I'd recommend it only to those who read all of Frank Herbert's original Dune series and have been hanging in suspense ever since because the cliffhanger ending of Chapterhouse Dune was never resolved due to Frank's untimely death. They based the book on Frank's outline, but it clearly would have been a better book if it had been written by Frank. Nonetheless, it is satisfying to resolve the unanswered questions: Who the heck are these Honored Matres and what were they running away from?

Labyrinths: Selected Stories & Other Writings, by Jorges Luis Borges - This is kind of a quirky collection of short stories that are all mindbenders of one variety or another. The best description I can give of Borges is that reading him is kind of like solving puzzles.

Across the Nightingale Floor: Tales of the Otori, by Lain Hearn - Historical fiction set in feudal Japan with lords and their retainers, assassins, etc.

The Lost Symbol, by Dan Brown - If you liked The Da Vinci Code or Angels & Demons, you'll probably like this one as well. While Dan Brown will probably never write anything that matches the utter genius of Umberto Eco's Foucault's Pendulum, he is entertaining in his own way and worth a read.
yeah, the comments make me think that we got a little carried away with the schadenfreude aspect. but i'd argue that this type of posting does serve a real purpose. now i know not to have anything to do with pdxcell, for example.
Kauai Real Estate MLS
Kauai Real Estate MLS Search, Statistics and Information. Get the latest information about Land, Homes &amp; Condos for Sale on Kauai, Hawaii.
Can you please not submit this kind of crap here?

Most of us come here, at hacker news, because our interest in what we expect to read from this site is very specific and narrow.

To find and discuss a more general topic we go to sites like reddit/digg/slashdot.

Even though occasional important world events like MJ's death are not frowned upon here, pls don't take it as an excuse that anything and everything goes.

Thanks.
The Human Animal is another fantastic book by the same author. Morris really has a fascinating perspective on human behavior and its biological origins.
sp332 please have a seat right over here at digg.com
I'm sure that most people would be happy to call any number(not mobile), provided they really need the support.
I just got a new laptop and I must say ati has come a long way since I had my 9600 from them, (I am using fglrx and ubuntu karmic)
Wow, that's one of those emails that he should have put in a drawer for a day and then torn up without ever sending it.
Anathem, by Neal Stephenson

Consider Phlebas, by Iain M. Banks

Selfish Gene, by Richard Dawkins

Business Stripped Bare, by Richard Branson

Programming Collective Intelligence, by Toby Segaran

Zen and Art of Motorcycle Maintenance, by Robert Pirsig
Maybe you could do a phone support by request, pretty much everyone knows and can email these days and those that want phone support need only email you a number and a time that they can be reached. (Running a dedicated phone support system can build up quickly and offer more problems than it solves)
I wouldn't use this, but I also wish others wouldn't either, as it changes the market in which I live by further lowering the quality standards deemed acceptable in the marketplace. It's not about being closed minded.

Its existence also dramatically increases the likelihood that I'll have to eat a pancake from a can at some point in the future.
Bjelkeman's (Swedish) pancakes/crepes, serves two:

3 eggs

6 dl milk

3 dl wheat flour

1 table spoon sugar

1 tea spoon salt

1/2 dl cooking oil (I use olive oil)

100 g butter

If you cook electric, start warming the frying pans. I normally fry on 7 (out of 10). Mix the eggs. Add half the milk. Add the flour. Whisk together until smooth. Add the sugar, salt and remainder of the milk. Add the oil. Mix until the batter is smooth.

About now the pans should be warm. Put a tea spoon of butter in each pan, spread it out in the pan. Add about a cup of batter (or so) to each pan. When the batter is congealed on the top of the pancake, use a long thin spatula to turn the pancake over. It should be yellow/golden brown on the fried side. Wait a minute. The pancake is done. Repeat from beginning of paragraph until out of batter.

Serve with sweats or savoury as you prefer. Blueberries, ice cream, sugar and butter, strawberry jam, are my favourite toppings.

All in all you can do this, with a bit of practice, from a standing start in 20 minutes. And the pancakes are superior to anything you will buy in a pack or a box. Promise.

Notes:

1) can easily be scaled to fit, 1 egg = 2 dl milk = 1 dl flour

2) dl = decilitre 1/10 litre (about a small coffee cup)
The Book of Basketball by Bill Simmons. I love basketball. And Bill Simmons.
Personally, I tend to restrict functions to 1 screen length. This is not based on any good programming practices list, it's just that I like being able to see the entire function in one view.
I am not trying to compete or brag but I read 22 books last year and just finished my first book this year (75% read before 1st Jan): http://dl.dropbox.com/u/578454/Screen%20shot%202010-01-01%20...

I am a slow reader and I do have quite a bit more free time than most people (I work from home). I read very slowly but I have patience to read over long period. This year I hope to read around 30 books, if things goes according to plan.

I used to be a serious reader, but last 10 years or so (before 2009) I was completely out of touch with books (besides academic reading). Thanks to this women (http://www.readallday.org/) I got inspired to read again.
The real cost of JNI is when you hotspot crash and take out the entire JVM instance (say your servlet and all your Tomcat instance as well)

I don't like anything calling out to JNI unless it's the only sane way and it's been heavily tested.
Twist action plastic promotional pens
Twist Action Plastic Promotional Pens are a popular choice as promotional gifts. Only Pens has a wide range of twist action printed promotional pens

starting from as low as 8p each. Order online or contact us on 0845 2572396.
It's $15m in revenues, he would have made much less.
Use Skype-In with Skype-Forwarding to your normal phone. Skype will forward to 5 different phones at the same time, and whoever picks up first gets the call. So it's convenient when you have other people who could answer the call.
If you want to, you can add some carbonated water.
...Maybe not quite as fast, but fast enough for me...

Given how fast computers are these days, the powerful standard libraries high level languages give you and the fact that bugs per line is constant regardless of language - high level languages start to look pretty good. Programs don't need to be fast as possible, they just need to be fast enough.
I'm also a fairly new programmer (I've only been programming seriously for about a year and a half), and I've been learning Clojure on the side. So far all I've done was a few Euler problems and played with some Java interop (Swing graphics and so on) but it's been a worthwhile experience.
If you want to use an 800 number, but with GV capabilities, then use Phone.com where you can fine a number that is relevant to your business - www.Phone.com.
Bible says it's an abomination when a slave becomes a king. It has to do with neuvo richeness and no class. Michael Jackson had someone carry his umbrella.

On a side note, you wouldn't call an ugly man a saint because he didn't commit adultery... The poor people most likely to be vocal about banker's pay are definitely likely to be the very ones who would act worse than the bankers. "Do not covet"
That is very kind of you.

It would be great if more researchers did some pieces like this from time to time.

Things are going very fast right now and it is creating a large gap in general awareness as to what is happening.

This is true not only for the general public, but also for researchers with different specializations. I think there is also room for a more technical version of this kind of essay to serve like a cross-specialization review paper.
The main problem with learning a new language(new as in, recently made, immature, etc.) is that it's (usually) hard to get anything done in the new language because you will probably be the first person to try writing whatever kind of code you're writing. Tools and libraries will be missing, compiler bugs will surface, etc. So it's hard to be productive, and hard to find the motivation to use the language in the first place, when you could just use familiar Brand X and all its conveniences.

But you can learn a lot if you participate in the community, even if it's just to read the compiler mailing list. If it's active and there's strong interest in the language, some great discussions will appear.
I find it interesting to read that every single one of his criticisms of JGit would not need to apply to a C# implementation. Unsigned types, unmanaged memory allocation (Marshal.Alloc), unsafe code with pointers, native P/Invoke access, value types (e.g. fixed arrays for his SHA-1 point), and an IDisposable convention for managing all the unmanaged trickery, C# has pretty much all the needed features.

When optimizing C# for space use in particular (which ends up being a time optimization for I/O heavy loads), I've leaned heavily on arrays of structs, and even bit-packed arrays (e.g. an Int32 array storing 14-bit integers, packed so that they don't align on index boundaries).

Programming at the level of C in C# loses most of the benefits, of course, but at least you can hide the optimizations behind pretty APIs, and write the non-critical parts in terms of an easier to work with lower layer.
Thank you all for the great feedback!

1) You're right, but the boxes (and columns of numbers) are probably going to disappear in the next version. Maybe we'll have sliders or radio buttons to adjust between "Important" and "Don't care" for some properties.

2) Real substring searches are not supported because they are expensive. But your example is supported: type "debate" in the second keyword input field for suffix matches.
Another thing to keep in mind before optimizing is the 80/20 rule. Usually only a small part of the program (20%) needs optimizing.

Of course one needs actual performance numbers (via profiling for example) before knowing what to optimize. There is nothing worse than faith-based performance assumptions. I have seen months being wasted re-writing code in a lower level language to "make things faster" only to find out that it didn't make a difference, the code was disk or network bound and not CPU bound.
Fotoxx 9.2 su LinuX
It's really not that strange that inheritance is taxed. People get emotional about it because of death is involved. But in the end it's a matter of money changing hands - even if one of them is cold.
Well, the fact that it says that something "premature" is causing a problem seems to me to mean that it's actually a tautology. It's like saying kids are immature; but of course, what is more of the nature of an immature person than a child?

So yes, optimizations that are made before they should have been made, should not be made. It tells us little about optimizations other than that there is a time for which they are premature, and doing them at that time is premature.
Home insurance leads
Now Get your Home insurance leads which provides you the added benefit of real time direct delivery of leads. Quality guaranteed
Obligatory, the maven adoption curve:

http://tech.puredanger.com/2009/01/28/maven-adoption-curve
It certainly is compared to an ipod touch, which seems to be the appropriate comparison wrt a tablet for walk-and-compute scenarios. It is also rather unwieldy, IMHO, due to the large screen size. I prefer my Toshiba Portege; it's both lighter and smaller in the dimensions that I care about.
If you liked "The Selfish Gene" you might also consider reading Kevin Davies' Cracking the Genome. The book describes the race to sequencing the full human genome and the implications of that research. Fascinating.

Made me wish I had taken biology...
Yes, a person must be born on U.S. soil to become president.
The advantage of learning new languages is that you can take what you learn from them and apply them to languages that you already know and use often. For instance, when I first learned Io, I was exposed to functions like map and select. I had never known that languages I used often also had them, like PHP and Javascript, but since becoming familiar with those functions, the number of times I use a for loop in my code is almost zero. Same thing with anonymous functions, once I figured them out I was using them all the time. The broader your knowledge is, the more opportunities you will be presented with to apply it.
Per year, with over 30% yearly growth. He could sell it for twice that.
From the last line:

"But, JGit performs reasonably well; well enough that
we use internally at Google as a git server."

Rings the 'good enough' bell to me.
TechCrunch List Of Top Tech Products 2009
> That's a detail of genuine interest to anyone trying to make a related product outside the scope of the patent, or a similar product after the patent expires.

This is the very purpose of patents. To speed up innovation by forcing people to share their research in exchange for a limited monopoly. I find it both hilarious and scary that you find something special in this patent application.
>> "why Java is not as fast as C"

Not actually true in reality. Modern JVMs can make on the fly optimizations based on the runtime profile, which would need to be done by hand in C.

As said elsewhere though, Java excels when used for long running tasks - servers - backends etc where it can optimize for the long term. It doesn't excel when you try and start up the jvm loads of times for quick individual jobs.

I don't understand why people are optimizing source control :/ fast vs fast meh I don't think it's an issue really.
While I'd never claim Java is comparable to C, I'd like to note that the C codebase has, by their admission, 4 years of work in it. I'd be surprised if the JGit codebase isn't much faster in 3/4 years.
I've been playing around with Twilio for the past two days and I could already recommend it. It took me about about two hours to get it working well enough to make my own phone ring using their API. And of that the second hour was because I was confused, my number is international and it needed special permissions to call that. Now after two days I know how to make recordings, set up conference calls etc., so easy and powerful. I have a toll-free number in the US now ($5/month, $0.05/minute) just because I wanted to play with one.
Avoiding Mistakes - Assured Way to Recover from Link Building Mistakes
The power of the Internet has given rise to a number of advantages and innovations that is being used in the field of online marketing. Among those innovations, the most radicle one is Link Building.
Android and Facebook Apps. Rails should still be hot.
Slightly off topic now, but I really don't understand how a nation like the US eats so much cheese, yet simply cannot make cheese :/ It's horrible depressing tasteless mush.

I wonder if there's a specific reason you can't get real cheese in the US.
Mag+ Prototype for a Digital Magazine
clearly need a hacker news group to show the world how hard we work :)
Of course, managed languages can buy you other things, such as inlining indirect method calls by rewriting the call site (polymorphic inline caching), dynamic profile-guided optimization, not to mention the fact that garbage collection is often faster than manual deallocation, depending on the nature of the problem and the pattern of allocations. (Of course, design of managed applications can benefit greatly from awareness of how the GC works).

WRT SIMD operators, I'll point you to Mono.Simd.
The post specifically mentiones Java's implementation of memory mapped files, Java's lack of value types and Java's lack of unsigned types. These are very different areas but none of them can be solved by on the fly optimizations or longer running processes.
Me too, but some people need it.
You don't need 64bit to take advantage of 4GB+. Only really necessary if you want to address 4GB+ at the same time in the same process.
'Modern JVMs can make on the fly optimizations based on the runtime profile'

That's something I've heard ever since hotspot came out, but it's not a silver bullet to beating C/C++ etc. Here are some server tests. Some are comparable, some are definitely not:
http://shootout.alioth.debian.org/u64q/java.php