skysight-inc/HackerNews huggingface dataset:
I used to work with someone who would start writing a function or module by writing their code as comments.

# First we iterate over the directory and get a list of files to process
...
# Then we process them

This "pseudo-code" would then be filled in by the actual source code ei intended to write. And once ei was done the comments would stay in and be checked in for code review.

Nothing was more tedious to read. It's like having a narrator tell you exactly what each character is going to say right before they say it. It is quite maddening to this reader and I had to constantly review this sort of code.

I had to politely approach the person writing this code and explain this to them. Comments are not for describing what can already be read. One's code should be written in such a way as to inform a programmer maintaining the code to its purpose and utility. That means short, single-purpose functions, conventions, idioms, and all of that. But it also means that comments should only be used when you're going against convention or doing something hack-ish on purpose.

I saw fewer lines of comments until a fresh, new young team member joined...
Intention is all well and good, but imprecise. It also is not accurate to suggest that what is written is what is intended. One of the best ways I know of to describe intent is with tests. Not only do well written tests describe exactly what is being done, but it also tests to enforce this. There is no mistake about what it expected and intended.

A comment, on the other hand, cannot be trusted. Ignoring the fact that it could simply be out of date and wrong, your interpretation of intent might not the same as the person writing it. A lot of this might be because you simply don't share the same context. After all, when this comment was written has a context beyond the location of the code.
I agree, but unfortunately they're also necessary in circumstances, hopefully rare, when your ability to choose your own names is otherwise constrained for whatever reason - a configuration file, or a framework dictating conventions, for example. If you have have to do something complex, and there's absolutely, positively no way to explain it in code, then comments are appropriate. Otherwise, the impulse is misguided.
Cisco VP Vows to Make Hunting Secret-Leaker His ‘Hobby’
co.ck
NoSQL Dev Room at FOSDEM 2013
Once you do something, you keep on doing it. Check out what happened to Peter Popoff after James Randi and Johnny Carson busted him in the 80's. http://www.youtube.com/watch?v=KYdlX_Wn1K4
Or, alternatively, do all that, without getting caught, to drive traffic, until you are a household name and get acquired by everyone's favorite advertising multinational. Then everyone'll forget your humble beginnings.
OP make a good point that comments help to make your intent more clear, while the code itself just explains what the program does. Very good reason to have some comments here and there.

But I'm with Toshiro - test your damn code! Testing first brings all the benefits of commenting and more:

Tests help document and clarify your intent. They convey your assumptions, expectations, and show you exactly how methods are expected to behave when you run the test.

3 months later when you're adding new features, a failing test tells you that you introduced a bug before you ever run the new code.

That said, comments have a place in the tests themselves. Much better than scattering comments all around the code base.

The other place for comments is in the version control. Make small, frequent commits and set up your version control so that it forces you to comment each time.

When you're doing these things, comments in other parts of the code are just redundant and noisy.
Ding ding ding, now, that is proof :).

They might encrypt it with a passphrase but that's almost equally as bad. Good job on noticing!
Show HN: Orbital physics game in Node.js #nodeknockout
Sure, its a cleaning business that cleans offices. Its not really the business i'm buying, its the rounds from an existing cleaning business that does other things like windows and carpets etc.

The existing owner is the hardest working guy i've met, used to be in the Army so has a proper work ethic. Thing is, hes not very good with people, hes got an abrasive personality, which doesnt bother me at all but i can see how its not good for managing people, and hes fully aware of this and doesnt want to manage people either. He currently does all the rounds himself for a total of a 60 hour work week in addition to his other things. I've already made hires to take over this and i'll manage them. Its going to be hard work to begin with but its an automatable system.

After expenses, it should generate £20k-£25k a year which is enough for me to live on frugally. I'll ideally expand it to generate more over the next year though. I'm paying less than the yearly profit to buy it as well, so its a damn good deal.
you see, I wrote a python script which chugs through SCOWL (a dictionary..) with certain constraints to help me win the endgames, and I felt bad. This feels, somehow worse (although at least this hack is obvious to your opponent, mine was more covert.)
This is just standard contracting where you apply for jobs that only last a certain length of time. This isn't uncommon in the UK IT industry.

I notice some Americans will call freelancing contracting even though they mean two very different things over here.

As a contractor, you generally have several years of experience in a technology (let's say Oracle ATG ecommerce platform). Companies that want to implement ATG may not want to hire a full time and permanent group of Software Engineers as building software is not there business, instead, they will hire a contracting firm, someone like IBM, Oracle or Accenture. These firms send people to the client to work in the new implementation on contracts that could last from 1 month to 12 months (for example).

Sometimes companies and consultancies will hire independent consultants (like the parent poster) who will join a company for a just a few months / until the project is done then they will go and join a new company so on and so forth.

Contractors generally charge per day (a good friend of mine charges £500 per day) and they have no employee benefits.

It's a tough market but if you have the right skills (tech and otherwise) you can earn yourself some very good money.

Some Americans think that there freelancing efforts are the same as contracting. This may be the case in some instances but a lot of the time I see people claiming that you don't need much experience go contracting and it's easy work to get if you try hard etc etc. These are usually Americans that are getting confused between the professional service offering that is contracting and the low value informal work they do which I would call freelancing.

EDIT: the parent just told us he was talking about a cleaning business. What I have described is IT contracting.
Personally I appreciate good "how" comments for algorithm implementations in C++, where the implementation in code isn't as clear as a (perhaps less efficient) pseudo-code version in the comments. "How" comments are just as valid as "why" comments, and the parent comment illustrates that "copy-comments giving no more information or intuition than the code" are worthless, which is why I don't have comments every 3-7 (not even every 20) lines like the submission suggests.
MODÜNYA Bİ DÜNYA MOBİLYA
MODÜNYA

Bİ DÜNYA MOBİLYA...

6000 m2 kapalı alanda kalite ve deneyimde öncü, mühendis ve mimar kadrosu, profesyonel personeli ile Modünya Türkiye’nin en kapsamlı makine parkurlarından birine sahiptir.

Modünya Münferit veya toplu işlerinizde çözüm ortagı olmak amacıyla yola çıktı.

Ofis mobilyası, okul mobilyası, laboratuar, ve daha bi dünya mobilyayı siz Hayal edin, biz üretelim...

.

Modünya has one of the most extensive machine park in Turkey with its distinguished architecture, engineer and administrative staff on 6000 m2 covered area. Modünya commenced with the aim to be your solution partner in collective or individual partner.

Office Furniture, School Furniture, Laboratories and more furnitures that you imagine we produce…
"I don't touch type" and "I still hit the 120 WPM sweetspot" does not compute.
I've been using chaplinjs as a backbone architecture for my last couple side projects and I really like it.

https://github.com/chaplinjs/chaplin

Simplified router, subviews, model binding techniques like described in the OP are all helpfully baked in.
I'm not self-employed, so I have to follow the general guidelines laid down by others with respect to employment. This includes working 5 days a week for the full year.

I have other flexibilitties associated with my job, like flexible work hours, telecommuting and open vacation policy, but it doesn't change the expectation of me being in the office 5 days a week as a general rule of thumb.
Ask HN: Applying to jobs for after graduation, any advice?
I've recently started looking for a job to begin after I graduate university (with a computer science degree), and I thought it would be best to start early. I spent the previous year working in an internship position, and I will graduate at the end of April (about 6 months). I expect that most companies that put up job postings are looking for someone now though. While there are a few larger companies that hire students in advance (like Microsoft and Google), I wonder if I'm wasting my time by applying for jobs now. I've also been somewhat picky in the job that I want, I feel that I'd rather work somewhere that I can grow in an area I'm interested in, rather than just get a job for the sake of earning money.

I believe getting work doing something I enjoy, and growing through work experience would be optimal for my future, but I've even thought of attempting freelance work just to ensure I'm doing what I want to do after I graduate (which I haven't even really narrowed down yet, more so I know what I don't want to do). I wonder if I would be better off just getting a job anywhere I can, but worry that it will not lead me down a path I would be happy with. Perhaps I'm naive thinking that I can get everything I want after finishing University, but at the same time I feel that it's an achievable goal and I'd like to set myself up as best as possible to grow. I'm not opposed to moving pretty much anywhere in North America, and am not too concerned about my salary either (within reason).

Any advice for me, HN?
Transparent, sprayable solar film developed at UCLA
How to use Bing Maps for 'fun' geo-stalking
The core physics are run on the server and synced to the client 30 times a second while particle physics are handled on the frontend.

feel free to vote for us if you like it ;)
Gistie, an open source git-based pastebin
AFAIK, IE8 still had one process per Window, not per tab. It changed in IE9.
I had a similar email when I joined InVision but unfortunately it gave a very creepy feeling.

----

Subject: Your insights?

Hi again,

I think you signed up a couple weeks ago now...

How has your team been liking InVision so far? Any new ideas on ways we can make our product even better?

Write me back, I would love to hear from you...

P.S. Did you know about the UX Toolkits section? You can download a bunch of totally FREE high quality UI widgets and stencils -- and we're adding new ones all the time. Check it out: https://projects.invisionapp.com/resources/

Thanks!
-- Clark Valberg
There are always two teams: home, and everyone else.
Y Combinator application process
Hi everyone,

We are new to ycombinator and just wonder if anyone've heard back from ycombinator about the application. We applied for this funding cycle and haven't received any email from ycombinator so we were worried if we miss anything. We weren't able to access our application either. The only contact info that we provide is the email address on our profile. Do we need to provide phone number when we submit the application?

Thank you for your help!
Best,
Damien
Or about the music and movie industry?
Agree completely

C# 11 years of experience
I'm a fan of this book ... partly because of the philosophy and partly because of the profanity: thefuckitlife.com

(no commercial interest)
Until someone comes to do major rework and your tests take ten times longer to change than the code. It happens - a lot. Badly structured tests are worse than no tests to the extent that it's often cheaper to throw the lot away and write new tests - turning what should have been a simple "change the class hierarchy without changing the public interface" into "oh god every single test relied on the detail of the class hierarchy". No, they SHOULDN'T have. But they DID. And I get to fix it. Again. A particular anti-pattern I am observing right now is the "immutable interface, mutable implementation" approach. Every single test in 6 different sub-projects appears to want to create "special snowflakes" for testing, but was written to mutate an implementation which no longer exists. Days of extra work needed to figure out what the intent of the test was (no comments, because tests are self documenting, right? Sure they are.) and then re-write it using builder interfaces in the hope that this will save some poor sod (probably me) the trouble the second/third/fourth rewrite.

Be a better damn developer. Tests don't deserve cut and paste hell any more than your actual production does.
Recursive Virality: How SurveyMonkey, MailChimp etc. run renewable user invites
Yes excactly!!!
A friend of mine who uses SharePoint at work has mentioned its peculiar habit of occasionally inserting “millions of whitespace characters” in source files. Perhaps this is related.
Next Hacker News DC Meetup is Tomorrow (Nov. 13)
"thousands of lines and zero comments merry christmas and a happy bus accident"

http://theprofoundprogrammer.com/post/27214842818/text-thous...
Is IcoMoon based on http://fontello.com/ by any chance?
I guess you can say that. There will be lots of MS bits in, once the site goes up :D
ATT & Verizon abandoning copper. Could cities benefit?
Mentioning poor, useless Quora when the topic is billion dollar companies makes me laugh.
Strange. If I do this here all I get is “Empty commit message” for every change.
40hrs a week, bad location with a bad market, even worse for one that tries to be into ruby, innovation instead of the 'common path', have some debt

+ some more 18hrs a week of trying to grow out of the 40hrs+debt... can't work less otherwise it means dropping the tombstone on the dream of a satisfying life(moving to another country or bigger economic centers here could do too but health issues in family impede me). Sucks.
PengPod, A Dual-Booting Android and Linux Tablet
1) Because if I'm not working, there's a huge list of things that I should be doing. We've got family arriving in a month for the Christmas season. If I wasn't feel working I'd either be prepping for that or feeling guilty for not prepping for that. Doing a certain amount of physical work is a great antidote for the stresses of a desk job, but more than that is just work.

2) Money is addictive. My wife hates getting called for work at 3AM. But those calls pay so well for very little work that it's hard for her to take her name off the call list.

3) The fear that if you always say "no" to requests, you'll stop getting requests.
Explaining an RPM oddity
Really awesome post. Thanks for compiling this.

You need to keep the date in mind when reading this though. More recent years will over-represent fast growers, underrepresent slow growers and include more speculative valuations (ie some companies will eventually exist the list).

Give 2010 another few years and it could be a completely different list. The 1998 list OTOH will probably stay pretty much the same.
How can we better in-app mobile advertisement?
How Much Would You Pay to Never See an Online Ad Again?
There's an huge requirement for comments in C# that isn't needed in java - that of describing what exceptions a method may throw. This is probably also the place where comments are ignored most of the time too - I literally cannot count the number of times I've seen programmers failing to catch obvious exceptions, even in the framework libraries.
Some of us do :)
I've just recently been thinking about "working" 20-30 hours a week, so I have time to work on some projects of my own. I find there are two main obstacles to reducing my paid "work" load.

1. I currently rely on contract work, and I find that I don't have contacts that want to employ a contractor for 20-30 hours a week, or even a set of contractors who want to employ for a combined 20-30 hours a week. Usually when people hire contractors, they want something done as soon as possible, without distractions.

To obtain my desired work hours per week, I will have to greatly extend my contacts list. Which I should do anyway, but it won't happen overnight.

2. Health insurance. I have mild schizophrenia which, untreated, makes it hard for me to reason logically. With the proper medication and care I remain gainfully employed as a dev/sysadmin/devops role. On top of that I have Tourette syndrome.

Insurance for anyone with these kinds of pre-existing conditions is expensive; laws changed such that very soon they won't be able to _deny_ it to me, but they can price it as high as they like. Despite having substantial savings, long periods of not having any income is out of the question for me. Therefore, either traditional corporate employment, or full-time contract work at a high enough wage to pay for high-quality insurance, are the way to go.

I don't mention these things in a "waaaa, waaaaa, I'm so helpless" way--far from it. I've attained more than the average person in my career, in terms of skills and pay.

Rather, I think people on this site forget sometimes that not everyone is suited to risk it all on a startup, and not everyone is cut out to be an entrepreneur, and not everyone has to be an A+++++ level developer to get by, and it's not a sin to seek some stability.
path.py is a must have, I am amazed how often it's being rediscovered, despite the fact that I try to advertise it whenever it's relevant. But it's quite old at this point, maybe we should be more excited about efforts like this one: http://www.python.org/dev/peps/pep-0428/
A post-mortem after this bug is fixed would be interesting, I don't see how 2MB of NULL characters should be different from a random <img>.
I do work less. And it's the best thing that has ever happened to me. Can't imagine myself going back to 9-to-5. I usually work up to 4 hours a day / night, and I do it when I really feel I'm up to it. The rest of the time is mine. I don't need a watch. I don't need a calendar. I don't care what day of week it is. And it's fantastic. I like to take a day or two or three or a week or a month break now and again.

So, I suppose it's only up to finding an employer who would accept you working like this or working for yourself. Either way is good.
Of course they are similar, they both stole the concept from Lisp.
oh. and erlang is not event-loop based. it has preemptive multitasking for its threads. so it is not as necessary in erlang than it is in node.
This is why I'm a big fan of TDD. You're basically commenting your code in your tests without having to comment the actual code.
I enjoy writing every day around the clock anyway. If I write on my own it's a hack, it I team up with a designer, it's a good looking hack, if I team up with a company I have designers, marketing, testers, servers/clouds, a large user base, a brand, etc. - so you can see why I often prefer to write for a company anyway. Throw in equity, options, rev shares...well then I'm improving something I own any time I put extra time in anyway, not just going for a bigger bonus.
Is PyQuery fast? The whole premise of the first point was that BeautifulSoup was too slow, but then he didn't provide a comparison between them.
Fantastic!!! Inspired and motivating!!!
So the key to success is to launch your company exactly 3 month after a successful one! :)
Internet Explorer uses processes but may opt to pack more than one tab into a single process to reduce system load by too many processes.

Funnily enough it publicly supported isolated tabs before Chrome did (in a beta release of IE8) :-)
From what I remember, Bret originally said some things about teaching programming with this visual interactive stuff, resig&khan academy went and actually implemented something, saying that it was inspired by Bret and then Bret wrote his big post saying that what resig & khan academy did wasn't quite what we had in mind.

When I saw the talk I understood it as more of "resig implemented the interactive paradigm" then "resig implemented the things in learnable programming"
IE has tab processes and a UI process – the tab processes can handle more than one tab and do so on slower systems.
I share your sensibilities. But I work with consumers of statistical analysis on a daily basis, and it is an unfortunately common to put stars next to parameters that are statistically significant at the 5% level. And many people treat that star or lack thereof as a very serious indication of whether the parameter is "meaningful."

I have even seen a slide presentation by consultants with a business practice of dropping all variables with p>.05, and re-estimating the model (doing this repeatedly until all variables have p>0.05).

The reliance on p-value thresholds is heartbreaking.
How Eastern And Western Cultures Tackle Learning
n Eastern cultures, Stigler says, it's just assumed that struggle is a predictable part of the learning process. Everyone is expected to struggle in the process of learning, and so struggling becomes a chance to show that you, the student, have what it takes emotionally to resolve the problem by persisting through that struggle
Is JavaScript the Future of Programming?
The framework documentation is very good in that regard, though.
Yeah, exactly what you described is what i do with my main tech skillset. :)
Samsung turns screws on Apple, hikes A6 processor price 20%
Writing a good novel is pretty hard to do, why are people not just republishing old ones?
> Systemd is much better for Desktop uses. The major reason is that it is fully designed to support hotplug.

This is exactly why upstart was invented, long before systemd existed.

> Which is something you have to constantly deal with on Desktop/Laptop systems. Disks are plugged in, Network connection isn't ready, and so on. It is also much faster and has a lot of other nice features. The lack of systemd support in *Ubuntu might be the reason for me to switch to another distribution for my Desktop.

Ubuntu uses upstart, which handles everything that you have specified just fine. You may well have a good reason to switch away, but you have failed to state your case here.
Imagine "torrents ... done properly".

Imagine some kind of worldwide system, without a central server and dedicated administrator, distributed among a large, constantly changing conglomeration of servers that store and forward messages to one another.

In your dreams!
// NOTE: Workaround for a bug in the framework
// foo will crash if you foo before bar.
// Here we bar with a null value, which prevents the crash
bar(NULL);
If you have two equally competent candidates, hire both. It's surprisingly difficult to find good programmers though, so ending up with 2 awesome candidates to choose from is unlikely.
It should really start with an 'X', like the other commodities. (e.g. gold is 'XAU', silver is 'XAG').

'XBC' makes sense to me.
Somebody fall asleep on the keyboard right after the if(userAgent == Opera) :)
Meet The Patent Troll Suing Hundreds Of Companies For Encrypting Web Traffic
If you click on the big red logo you go to the demo. http://demo.says.do
Kent man arrested after picture of burning poppy posted on internet
Can you say "slippery slope"? I thought you could.
Hacking attempts will pass one billion in Q4 2012
TypeCatcher: The Best Font Fetcher For Ubuntu