skysight-inc/HackerNews huggingface dataset:
Things I found interesting:
* typedefs are discouraged in many cases
* goto is acceptable for common-function-exit code
* 8 tab-based spaces per indent

I agree with the first two. Careful goto use can be like a destructor for a function. 8 spaces per indent seems excessive to me; esp using tabs since spaces are guaranteed to appear the same in every sane code editor. Although I do love the idea of all my code maxing at 3 indents.

Suggested ~48 line max for function length is also cool. The easiest way for me to force myself to code cleanly is to stick to short files and functions.
C++ has the same issues.

To add another example, binary only distributions (e.g. some commercial software) bring their dependencies with them, meaning that you have to use roughly the same environment (compiler version, stl) to use them.

Libraries work a lot better in VM languages.
Money Making Ideas
Google adwords to make money online fast
Google adwords to make money online fast ! No doubt you can make money online. There are various ways to make money online. But if you are looking for instant money then google adwords is the best option for you.
Other uses of C besides low level programming is:

1. Building static libraries.
2. Building so and dll.
3. Binding those so/dll with higher level languages like Ruby, Python, Perl and PHP.

That is my main use of C these days. I always write the IO, user interface code in higher level languages and put all processing code in a so or dll written in C.
From your linked article:

Naming is easy.

I think that statement is rather ironic, given the nature of this submission.
Parsing C++ in Python with Clang
Argh, this is so often overlooked. NULL POINTER DEREFERENCE IS A POSSIBLE SECURITY HOLE. Sorry about the shouting, I've gone through this so much I feel like my brain is going to explode. Here, read this: http://lwn.net/Articles/360328/

Don't trust NULL pointer dereference. Even in user code -- it puts you in bad habits.
You're a stud.
How likely would it be that there was a near-extinction event and the reduction in the gene pool somehow caused this?
Thanks, I had no idea about that. Looks like I can start using the site again. =)
In addition, C++ has a whole pile of other problems too.
Even ignoring the possibility of out-of-memory crashes, null pointer bugs can lead to memory corruption and code execution and have been popular targets in recent years: http://www.google.com/search?sourceid=chrome&ie=UTF-8...

Edit: http://flashmypassion.blogspot.com/2008/04/this-new-vulnerab... is a copy of a blog post (which seems to be missing from the Matasano chargen; odd) about Mark Dowd's crazy Flash null-pointer vuln. The first comment from Dino Dai Zovi (another crazy good security researcher) is very relevant:

> Oh, the sweet sweet vindication. I remember an argument that I have had twice in the last several years about whether one should check the return value of malloc. I argued that it should always be done for two reasons: Reading address zero might crash, but not necessarily zero-plus-offset and because a compare register to zero is so free performance-wise that it isn’t even funny.

> Guess who was arguing the contrary

Edit #2: tptacek's responses on the thread are quite interesting, and I agree. These are your friends:

void *safe_malloc(size_t size) { void *ptr = malloc(size); if(ptr == NULL) abort(); return ptr; }
#define safe_free(ptr) do { if((ptr) != NULL) { free(ptr); (ptr) = NULL; } } while(0)
From what I've seen of the Facebook data export, which was a little while ago now it's pretty much just a token effort to get people off their backs. If they really cared about this aspect, and they don't because max lock in is their goal, they would either provide proper formats that other services can plug into like csv, json or xml or provide an api which users could authorize 3rd parties to access their data to export.

Also can you truly delete your Facebook account? As I understand the process if you log back in it is restored meaning that they don't remove the data?
> Oh my god so many configuration settings!

There are many alternatives for you that offer 1click build/deployment.
It seems like there should be an even simpler way to create an intent link than with a form. Something like

<a action="http://webintents.org/share"
type="text/uri-list"
data="http://kittens.com">Share Me!</a>

Presumably browsers would also be at leisure to provide access to intents in their native interface, like a share button right on the toolbar.

The intent choosing UI is a thorny issue. I dislike forcing the user to respond to install dialogs or limiting them to intents they have previously installed. I think my ideal browser would silently remember all the intents it has seen. When it needs me to choose one, it shows me a list of candidates I have used before (as intents), padded to some pleasant length by candidates most often visited (directly). If not all candidates fit, a "More..." option expands the list to completion.

Some sites will want to be certain that intents they invoke can be handled by all users. So, maybe they should be able to suggest some services to be appended to the user's (possibly empty) list.

Making the action field a URI could create some interesting politics. I can imagine the action space being fragmented along company lines e.g. http://facebook.com/like vs http://google.com/plusone vs http://twitter.com/tweet etc. A flat namespace might encourage more reuse of actions and less creation of new ones. But maybe I'm just being paranoid.
When your second sentence is: "Play me a tiny violin ;-)" it isn't just idly chattering. It comes across as extremely petty and derogatory.
On that note, I see you are going for real old fundamentals. puts() is in your _first_ example. While learning core library stuff is important for C, I think you should make sure to make absolutely NO reference to anything deprecated or mildly dangerous. After all, your book is for noobs, and we all want C to look good.
I'm skeptical that it will be an alternative to K&R 2nd ed but nonetheless I'm interested in the result.
Show HN: TextFromMe - easily send bulk text messages
This is a little side project I did for work. I had to send out text messages to a large collection of people who were registered to vote for my company at a conference. I did this because I couldn't find anything out there that was quite this simple. Since it was useful to me, I wrap it up as a service for general use, and now I bring it to you so you can provide me with valuable feedback.
Good thing the parents of this vision-impaired 9-year-old did not buy her a Chromebook because (uniquely among browsers of my experience) when you make the type big, Chrome does not "reflow" the text to fit in the window, but rather makes you scroll horizontally back and forth for every line of text.
Screen Patterns for Rich Internet Applications
> I personally have no idea why this stuff hits this site that often.

May I clue you in? You create interesting quality projects like Mongrel, Mongrel2, Tir, and LPTHW. You are also entertaining.

If that's self-promotion, let's have more of it.
I was expecting OTCC to stand for “One True C Compiler”, as in the One True Brace Style. I’m glad its actual full name isn’t so hubristic as that.
Heatmaps, usability testing, live analytics for $7.99
Movement to Abolish Corporate Personhood Gaining Traction | Common Dreams
Move to Amend: coalition to abolish corporate personhood
Horror of horror: it works with Blackberry's browser.
In the US the corruptors don't have to bribe the Media. They OWN the media. And they are working to own and control the Internet. (See ATT/T-Mobile merger for the next step)
Valuable Tips in Winning that Government Project
Don't see an argument here. One could also use your theorem to arrive to the exactly opposite conclusion: AI will happen and will eat your lunch, therefore there will be no free lunch.
GPE Series Part I: How to Win That Government Contract
"the hidden volumes will still stick out like a sore thumb and clearly be encrypted data"

I thought that was the entire point of the hidden volume... that from outside you can't tell there is a hidden volume? And that from inside the fail-safe, you still can't tell there's a hidden volume? I may simply be mistaken.

---

Uh, I think you're missing the point of how the plausible deinability works. The point is that under duress you can acknowledge that it's a TrueCrypt volume, and open it up without at all exposing the hidden volume inside. It's like having a treasure chest with a false bottom where you store your good. The fact that it can't differentiate the location of hidden volumes is... paramount.

A "hidden volume" does not mean a truecrypt volume disguised to look like a normal windows file which is what this program looks for...
"Danger" minus the negative connotations is best pronounced "power".
Hey swies, I have some tangentially related feedback. I've always had ninite.com bookmarked since I found it, and the other day I was going through and sorting my bookmarks; when ninite.com loaded, I was immediately thrown off. From what I recall, the site's design used to be dark and looked very simple and professional to me; as soon as I saw this light-blue design with the "Featured in..." on the right, I thought "oh, no, the site was sold and became some park domain from the 90s...". It's weird, after that initial reaction, as soon as I read anything on the page, it was clear that everything was normal; the more I look at the design, the more I think everything looks fine and there's nothing bad about the design. But I definitely had that reaction and almost turned away from the site on the quick, and thought that feedback might be useful. At the very least, I think you should consider redesigning how the "Featured in..." is displayed; when it's a bunch of logos as one .png, it looks like a big ad and is a big turnoff until you notice what it's saying. I think something laid out more dynamically than within a box that stands out from the rest of the background would do a lot of good.
Odd. I just tested on Chrome/OSX (with ⌘+ and ⌘-) and the text seems to reflow fine here. Is that a ChromeOS-specific bug?

And actually, reflow is nonexistent on Safari/iOS, which is one of my biggest gripes with it.
If you're thinking of arrays as second class citizens, you're thinking of the language incorrectly. Rather you should realize there are no arrays, only pointers to chunks of memory and arithmetic operations.
You still have to trust them that they do not transmit your keys elsewhere and that they really do use the same crypto code thy open-sourced.

I am not saying that you can't trust Dropbox. Quite on the contrary. But if you give your key to some unknown entity, you have to trust them. You can choose to trust their claims about what they do with it, but there is ultimately no guarantee.
I think I have some good years left :-)

You sure do pal. Thank you for the inspiration.
Sure he's a dick, but you know he's a dick.
As the other commenter said you can just click on a circle to see shares only from those people. Also, the shares from the people that have added you to their circles appear in Incoming (there's also a link at the top of the stream for Incoming)
Getting it or not is one thing, but I'd advocate keelhauling anyone who wrote that sort of thing in production.

The "notational convenience" is more obnoxious than anything. But, then, I'm not particularly a fan of terseness for the sake of being terse.
I wish I could read C code like this. I really want to, but where do I begin. If someone could point out that would be very helpful.
Also, the PNG image is 24 bits per channel, obviously unnecessary for this kind of project. Taken down to 8 colors it loses no effective detail, and the size is dropped to 2.6 kb, or perhaps smaller after gzip.
You're right in a way - TrueCrypt fills empty space in its volumes with random data, and hidden volumes fill that space, and will appear random as well (being encrypted).

The question is whether, upon finding a volume which is vastly oversized compared to the non-hidden data, you believe that there are no hidden volumes. If your hidden volume is small relative to your normally-encrypted volume, your believable deniability is much better. But if the important stuff is all on the hidden volume...
You should stop thinking everyone is attacking you. I think you'd be happier.

Really though, there's no content here. The fact it's been voted to #1 on hackernews shows just how bad things are.

Items should be upvoted on their merit, rather than who did them. Someone writing another book about programming C isn't newsworthy.
I've looked at the video here: http://www.inspectlet.com/tour/custommetrics - the app plays back every user session as it happened, you can actually see exactly how the user moved his mouse on the screen. pretty cool. worth the look.
Nice, but to get a bit more "meta", this also confirms the "Top 100 leaders" group within Apple, presumably this is "Apple University".
Watch Bad Teacher Online 
Watch Bad Teacher Online
In Bad Teacher gleefully crude comedy unladylike pleasures such as alcohol-guzzling, swearing at children and is an average, because, well, you can be, Cameron Diaz, the game of his inner thug. It 'a good thing.
There are so many, in fact, that choosing one becomes a confusing array of choices in itself.
Http://yogeshrk.blogspot.com/2011/07/Google-adwords-to-make-money-online.html
What a ridiculously over-exaggerated title. An iPad helps a girl with albanism to read and Steve responds with a charactaristically short email saying thanks and can I share this with leaders at Apple. There is nothing wrong with his response or desire to share this with others who are likely directly involved with the design and production of iPads, iOS, etc., but it is a far cry from showing any inspiration.
I've been wondering lately if Google killed Wave prematurely. If they'd polished the interface a bit more, Google+ notifications would've solved the problem of updates. They could also have dropped bot and widget support into Huddle. Imagine a robot that could parse a "what's for lunch" comment into a sort of multi-user UrbanSpoon widget with voting/vetos/suggestions/etc.
Even if mainframe computers hadn't been available, it would have been done like the Manhattan Project was, by many human computers at electro-mechanical calculators. Slide rules are to imprecise for actual orbital calculations.
I work at Google. An invite form was sent to employees prior to launch.
Fixing Windows Pains - tips for speeding up your PC
I've done a bit of this in Haskell, and it can be remarkably clean. It can also be a right pain, though.
Except that the excerpt you posted is the new, modified version after all the furor.

http://hardware.slashdot.org/story/11/07/02/0515218/Dropbox-...

Compare the above version to this new form: "This license is solely to enable us to technically administer, display, and operate the Services"

It would appear that you didn't look into the issue at all before jumping to the defense of your main service provider. Is this the level of diligence we can expect from your product?

But, hey, welcome to the party.
I caught a cab from downtown san francisco to the mission last week, and the cab driver used square.

He pulled out his phone, plugged in an adapter, ran the card through, I tipped, confirmed the total and signed with my finger on the touchscreen.

It was the quickest card transaction I have ever had in a cab.

I asked him if it was square, it was.
I asked him if it was better. He pointed to the reader attached to the meter, "this charges me ten percent"; he pointed to his phone, "this charges me three".

I usually pay cash for cabs, so i don't know how widespread this is, but cab drivers love talking on cellphones, and are hustling to make money. If this is a legitimate advantage, then square could clean up on the metropolitan cab market alone.
Thank you guys for all your suggestions.
The problem with regards to names is simply overrated. I personally have 000fff.org (Black&White) and I have no problem attracting visitors.

People click links, most only click one time in their life and never get back. For those who end up using it they will take the time to either bookmark it the browsers history will most often be enough. Would it be better with an easy to decipher name? Sure. But it's not a law.

Good product is what matter.
My testing was done on OS X too.

Display resolution: 1024 x 768 -- still the most common resolution according to some browser-string stats discussed here a couple of months ago and the resolution of the iPad, the device being discussed in the OP.

Web page: http://lesswrong.com/lw/6dm/

Since Chrome might have remembered a text-size preference from a previous visit to the site, execute ⌘0 ("Reset"). Execute ⌘+ twice. Notice that the text runs past the right end of the window.

(Sorry to hear that Safari on iOS also does not reflow text. Safari 5 on OS X does.)
1st startup below 25 is irrational exuberance.
The DropBox hoopla shows the downside of writing your terms in a readable language: people actually read them out of curiosity.

And since people have no clue how to interpret the legal bits that are necessarily included if you don't want to be sued into oblivion, they completely misunderstand them.

So the lesson is: keep your T&Cs cryptic, unintelligible, long, boring, etc - so that people don't read them. This way you can put whatever you want in them, including potentially nasty clauses (unlike the clause we're discussing here), since no one will read it anyway.
I'm not so sure about that. The devil's in the details - you might think you know something well enough to skip it, but get caught out later.
Ask HN: What types of math should I study for software engineering?
What are the mathematical systems that most strongly reflect the problems and solutions of software engineering?
So how do you code an AJAX Web page?
http://www.computerworld.com/s/article/print/9002170/So_how_...
I'm an interested novice in this field. Would it perhaps be possible to do some genetic algorithms on the starting parameters themselves? I'm not sure how the fitness rules would be set, but it could be based around number of life forms, speciation rate, or maybe if humans viewing the results of each run preferred certain sets more than others?
Dont fucking mod me down. The author claims that this is the paragraph that caused the furor:

We sometimes need your permission to do what you ask us to do with your stuff (for example, hosting, making public, or sharing your files). By submitting your stuff to the Services, you grant us (and those we work with to provide the Services) worldwide, non-exclusive, royalty-free, sublicenseable rights to use, copy, distribute, prepare derivative works (such as translations or format conversions) of, perform, or publicly display that stuff to the extent reasonably necessary for the Service. This license is solely to enable us to technically administer, display, and operate the Services. You must ensure you have the rights you need to grant us that permission. [Emphasis added]

When in fact this is the modified version that was posted after the furor. The original version is this:

By submitting your stuff to the Services, you grant us (and those we work with to provide the Services) worldwide, non-exclusive, royalty-free, sublicenseable rights to use, copy, distribute, prepare derivative works (such as translations or format conversions) of, perform, or publicly display that stuff to the extent we think it necessary for the Service.

Significantly different. And it was changed for a reason.
find main() and follow the parts that interest you - that's how I start with reading a new codebase
Who is the original author of "I would never join a country club that would have me as a member"? Bill Gates?
Speaking of entertaining, yes he is. If you want an accessible and funny introduction to this man, check out this clip from "Examined Life": http://www.youtube.com/watch?v=iGCfiv1xtoU
You don't even need to add attributes for the core behavior:

<a href="http://webintents.org/share?type=text%2Furi-list&data=http%3A%2F%2Fkittens.com">Share Me!</a>

Add a microformat/microdata attribute to provide a browser hint if desired (for native browser supports or browser extension) and you're done:

<a intent href="http://webintents.org/share?type=text%2Furi-list&data=http%3A%2F%2Fkittens.com">Share Me!</a>
GIF Sound: "A revolutionary and innovative service to add sound to a GIF."
Facebook has had my whole social graph for years and can't even get it together to show me one single advert I care about. It's just not that useful a set of info.

Google+ is getting more of a public social graph. I'll watch investors and traders, startup-types, media, local digeratii. What evil do you think it's going to do with that? It's a message board with some semi-private messages and maybe a spark or two. If it hasn't figured out my 'likes' by now then certainly an extra spark isn't going to flip the switch. Many of the messages are public anyway, like Twitter. Much of the social graph is public - you can see who I follow and who follows me, like Twitter. Google could already max out the evil with the Twitter social graph if it wanted to.

Google has my credit card number, my email (all of it), my location, my _email_ social graph, and my multi-year search history. What it already has dwarfs a few extra messages. Adding a bit of public social graph just isn't going to turn it into Skynet.

Edit: my friends and family will largely stay on Facebook. It's a nice safe place and I've set it up to be pretty secure. G+, well, that'll be my personal Twitter equivalent with hopefully a bit more bandwidth. I like the threads. Twitter I'll keep for my company's persona.
Yes, what happened to the IOCCC?
Ah, I love virtual machines/cpus :] Some weeks ago I found out that you can create pointers to goto labels in C (gcc and clang that is - it's a non standard extension afaik).

I then implemented a super small subset of the 6502 to test how messy the code would like:

https://github.com/jsz/6502/blob/master/vm/cpu.c

I don't know if I should like it or not :)
iPhone camera app with hosted pages for twitter sharing
Yes, the Manhattan Project number crunching was mostly done by humans on mechanical calculators. There were some electromechanical machines available to them.

After the war, though, some of the calculations for the "super" - the Hydrogen Bomb - were done on electronic machines. In particular, there was a concern that the Super might ignite the atmosphere and the calculations to check that were a bit much for rooms full of people coordinated by pneumatic tubes.
Apple: revising the definition of Pro
People can switch to bing, but that doesn't mean advertisers can (unless they are trying for an obviously suboptimal choice). Only Google search has ad volume and broad scope sufficient for most of those spending the bulk of search advertising $.

Advertisers are google's real customers.
Javascript encryption
Stuxnet Source Code Released Online - Download Now
Mathematical logic, Combinatorics, Graph Theory and Probability Theory.

for computer graphics and networks do Linear Algebra and Group Theory, Geometry and Calculus.
Bad news for Windows Phone 7 - consumer interest is waning
He is not criticising you; he's criticising what others that undertook this kind of project have done.
I don't understand.

Nanopond is a "corewar style" evolvable instruction set based virtual machine written in C.

What? I know what core wars is, BTW. So this is a VM to do something similar? But then the programs should be evolving, not the instruction set...
You are on one of the best connected communities, want an invite to G+ and haven't put your email in your profile?

And no there isn't any good way to do that, yet.
Apple database hacked with SQL injection by Anonymous
Really hate to be, that guy but this was posted almost a year ago and got ~200pts.

http://news.ycombinator.com/item?id=1921197