Better HN
topnewbestaskshowjobs
Log inSign up

wfunction

3,901 karma · joined Oct 15, 2012 (14y ago) · 1,547 submissions

Submissions

comment 12y ago · link · parent

Huh? If you dump data you miss events. Imagine if Process Monitor decided to suddenly dump half of the system calls it monitored. Wouldn't that be ridiculous? For a general event-tracing system, there have to be more options provided. Maybe it wouldn't matter so much for context-switching per se, but for a ton of other types of events you really need to track each and every event.

comment 12y ago · link · parent

> That sort of thing is not rocket science

Uh, for starters, the buffer doesn't have infinite size. It will overflow. What is the system supposed to do here? There are a million possibilities (discard old data, discard new data, allocate more memory, write to a file, call a callback, return an error, stall the rest of the system or halt the clock, etc.); some make sense, some don't. Between those that do, the user needs to be able to choose the best option -- and the time-sensitive nature of the log means you can't just do whatever pleases you; you have to make sure you don't deadlock the system. That's not by any means a trivial task, and I'd bet the reason you think it's so easy is that you haven't actually tried it.

comment 12y ago · link · parent

> OpenSSL [...has...] documentation

Did you really praise OpenSSL for its documentation? Honestly, until now I thought it was the de facto example of poor documentation.

comment 12y ago · link · parent

"The API is simple because the problem it’s solving is trivial."

I beg to differ -- as ridiculous as the API interface may be, the problem it's solving is most certainly not even close to being trivial. High-performance logging for something as low-level as the thread scheduler is not something you can write in your sleep.

comment 12y ago · link · parent

Your math doesn't even make sense. 10% of the enrollees should result in 10% of the top 5%, aka 10% of the entire list. Never mind whether your numbers are even correct.

comment 12y ago · link · parent

Thank you!

comment 12y ago · link · parent

"Here's a small (auto-)reduced testcase for this specific issue"

Do you happen to know how that is done? How is a test case "auto"-reduced? I've never done that before.

comment 12y ago · link · parent

Mind blown indeed. But don't these need special CPU instructions? Which x86 instructions do this? (Or is this done through a special hardware pin on the CPU?)

comment 12y ago · link · parent

Is there no queue for the arbiter?

comment 12y ago · link · parent

Anyone know if there is similar data available (for any city) that actually includes real-world routes, rather than just endpoints?

comment 12y ago · link · parent

Yeah, I think the models need to be recent terrorist attacks, not potential ones that people can dream of on a whim. Kind of like how judges work reactively, they don't make rulings on cases they haven't seen yet.

comment 12y ago · link · parent

I think if some terrorist actually did try to poison the food supply like that, it could very well make you become a suspect for that too. Except I don't recall anything famous like that actually having happened in the recent past (correct me if I'm wrong).

comment 12y ago · link · parent

There's part of the story missing: how did he jump from "Have you been to Boston?" to the security guards reporting him?

No reason not to believe him per se, but if he's trying to be persuasive he needs to paint a fuller picture and explain what let him make the connection, not suddenly jump to conclusions like that.

comment 12y ago · link · parent

You think the guard knew it was the largest piece of copyrighted art work? You think he even considered it artwork, and that's what he was paid to guard? I think he probably thought of it as what it was: a large gas tank.

comment 12y ago · link · parent

Not sure if I agree or disagree here, but if I was a security guard and saw someone photographing a natural gas tank, the thought would at least cross my mind that maybe he's planning to do something not so nice with that picture. (If you don't get what I'm saying, it could very well have been that he was taking a picture to figure out the best places to detonate bombs at.) It's a valid cause for concern, and it's not like I'd go ahead and check Wikipedia on the spot. And of course if I report it to the police, it's their job to follow up (but nicely). Maybe I shouldn't report it in the first place, but then that's my fault, not law enforcement's.

comment 12y ago · link · parent

Sorry?

comment 12y ago · link · parent

Notice I never even mentioned the phrase "literate programming" when responding to you? It's because I'm not trying to debate programming philosophy here, I'm trying to address a practical/immediate concern of the OP. I can debate with you day and night about what programming methodology is best, but that's not what the question here has been about, and I'm doing my best not to divert the discussion into a different direction.

The debate has been about why the OP's code was considered poor by the employer, and I think putting too many comments might have been such a reason. Whether or not you think putting too many comments is good or bad is orthogonal to whether or not it might have been a reason for rejecting the OP as a candidate. I think it's a reason for avoiding hiring the OP (see my previous discussion about productivity and wasting time writing comments), and whether you feel it's actually justified by some "good" coding methodology is orthogonal to whether or not the employer might have used the same rationale as me, and that's all I'm trying to address here. If you feel the employer's rationale was unjustified or crazy, then so be it; that doesn't mean the employer couldn't have had this thought process anyway.

comment 12y ago · link · parent

Well in that case, there's nothing crazy about it. If I can hire someone whose code is reasonably self-explanatory vs. someone who puts comments all over their code (whether or not it's self-explanatory), I'm certainly not going to choose the second one over the first one, not sure about you.

comment 12y ago · link · parent

Well, quantity can be measured in different ways. I didn't say "your (individual) comments are too long"; I said "you have too many comments" (aka the total length of your comments is comparable to the total length of your code... i.e., your source files are on average more comments than code). Too many comments (even short ones) is generally bad; they make the code harder to read, not easier. A few long comments are generally good. I feel like you were addressing a different point than I was making.

comment 12y ago · link · parent

I think you might've misunderstood what I'm saying. It's perfectly fine to have complex functions commented as much as necessary; heck, it's totally fine to have your comments be 100x as long your function when the function is actually hard to understand.

What's not OK is commenting ALL of your code, especially not to such an extent where the comments are actually longer than the code size on average. (!) Some stuff just has to be self-explanatory, period -- that's a fact, not a meme. If you can't make the simplest code self-explanatory, then I'm sorry but you simply can't code as well as someone who can. And if you're going to comment everything, then you're also wasting valuable time that someone who didn't need to do so would've spent writing actual code and getting more done.

comment 12y ago · link · parent

A more important principle than "abstract everything away" is "write only what you need". You don't always need abstraction.

comment 12y ago · link · parent

1. When your comments are longer than your code, either you're putting in too many comments, or your code is too hard to read. (The former seems to be the case here.)

2. Why is the spacing convention all over the place in some files? https://github.com/m4nuC/memGame/blob/master/app/controllers... https://github.com/m4nuC/memGame/blob/master/app/database/mi...

3. Why are there so many folders that only have .gitignore's inside them? In fact, why are there so many folders at all?

4. In my glances at some of your files I didn't find a single function with a lot of "meat" inside it, so it doesn't show much about your ability to write something that actually does something.

comment 12y ago · link · parent

The way it was for me was that I only "got" the hang of the ternary operator once I learned what a multiplexer is and how it's implemented. Before that, it was something I used now and then (certainly didn't have any trouble understanding it or anything like that), but I never thought about it as some way to channel data through based on a condition. I just always thought of it as some handy form of conditional evaluation. Things "clicked" a lot when I learned about how digital hardware and muxes works.

1194.

RIES – Find Algebraic Equations, Given Their Solution(mrob.com ↗)

1 points · by wfunction · 12y ago · discuss

comment 12y ago · link · parent

Reminds me: anyone know why envelopes delivered by USPS sometimes have small (< 1cm long) and consistent tears along their edges sometimes? Why does the post office do this?

comment 12y ago · link · parent

I had a question in case you might happen to know -- why does the site require email addresses?

comment 12y ago · link · parent

Yes, here: https://news.ycombinator.com/item?id=7926256
1
394041
52