HNHacker News
TopNewBestAskShowJobs

efaref

1,217 karma · joined July 16, 2014

submissionscomments
efaref··on PM of Singapore Shares His C++ Sudoku Solver Source Code
He's using integers as sets of (small) integers,

    int Possibles = Block[BlockIndex] & Row[RowIndex] & Col[ColIndex];
    while (Possibles) {
        int valbit = Possibles & (-Possibles); // Lowest 1 bit in Possibles
        Possibles &= ~valbit;
        Entry[Square] = valbit;
        Block[BlockIndex] &= ~valbit;
        Row[RowIndex] &= ~valbit;
        Col[ColIndex] &= ~valbit;
is more generally:

    set<int> possibles = block[block_index].intersect(row[row_index]).intersect(col[col_index]);
    while (!possibles.is_empty())
    {
        int value = possibles.pop();
        entry[square] = value;
        block[block_index].remove(value);
        row[row_index].remove(value);
        col[col_index].remove(value);
efaref··on Uber banned in Portugal
Apparently being better than the competition is anti-competitive.
efaref··on Valve shuts down paid mod system after pressure from gamers
And okayed by Valve.
efaref··on “DBus is seriously screwed up”
You answered it yourself. It lacks efficient multicast.

What dbus really needs is an efficient kernel-level capability-aware multicast IPC mechanism, and a total rewrite of the user-space daemon to not be rubbish.

All the user-space daemon needs to do is provide a registration point for other processes to find and connect to each other via (existing) unicast or (new) multicast mechanisms.

My initial thoughts were that kdbus /was/ that IPC mechanism, but it sounds like that might not actually be true.

efaref··on Women preferred 2:1 over men for STEM faculty positions
“Efforts to combat formerly widespread sexism in hiring appear to have succeeded,”

Interesting conclusion.

efaref··on A Modest Proposal: C++ Resyntaxed [pdf]
Uh.. isn't that just Object Pascal syntax?
efaref··on Less is more: language features
Yet another article that misses the point of "goto considered harmful."

The way "goto" is used in modern C (named breaks and defined function escape routes) is perfectly acceptable. Newer languages include these features in the language, in much the same way that C encoded structured "goto"s as "while" loops and "if" statements.

Dijkstra was complaining about unstructured programming compared to structured programming.

efaref··on Memoize – a replacement for make relying on strace
Every few years someone tries to reinvent make, and they usually end up with some unholy mess that complicates build systems or causes maintenance nightmares, and is never quite as good.

It turns out that make's syntax is actually quite simple and appropriate if you take a day or so to learn it properly. It's such a fantastic tool that if its syntax was really that problematic, someone would have created a new syntax front-end to GNU make by now. The fact that they haven't speaks volumes: by the time you learn enough to be able to do it, you realise you can't really come up with anything better.

efaref··on The Personal Software Process Body of Knowledge
As a software engineer, this document annoys me. I don't know if it's how it's intended, but it feels like a bunch of nosy document-writers pointing down at software engineers saying "you're all shit, and we're going to tell you why".

First, I reject the premise that software is poor quality when compared to other engineering disciplines. Software is immensely more complicated than any other field of engineering ever imagined. The space shuttle, commonly referred to as the most complex machine ever built, has around 2.5 million parts. The Linux kernel alone has over 16 million source lines of code. It's an order of magnitude more complex than the SPACE SHUTTLE!. And even given that difference in complexity, disasters and problems occur still in the physical engineering world.

I think the reason why people have a perception that software is bad, is because, perversely, most of the time, it's really good. It's so magical that I can, with a device in my pocket, call up the latest sporting results for a game happening on the other side of the planet with only a few seconds delay, and perhaps even see video footage of it happening - all this enabled, it should be clear, by millions and millions of lines of software - that I can't even conceive of all the things that went right to get that far if the youtube app crashes for some unforeseen reason. The magic stopped, ergo software is crap.

The document then goes on to attempt to define a process for developing software. What is lists is a bit laughable:

1. Planning: Produce a plan to do the work. 2. Development: Perform the work. a. Define the requirements (see 4.2.2) b. Design the program c. Review the design and fix all defects d. Code the program e. Review the code and fix all defects f. Build or compile and fix all defects g. Test the program and fix all defects 3. Postmortem.

Anyone who's ever done software development, will tell you that the order for these is something like:

2b, 2a, 2b, 2d, 2c, oh - someone's asking for sizings, better do some 1 - 2d, 2c, 2d, 2b, 2a, 2d...

Trying to develop software in a process-oriented fashion is doomed to failure, because developing software is the act of creating processes for a computer to execute. If it were possible to define a software development process, we could get someone to write it up in C, or Python, or whatever, and then just kick back and let the computer do the development for us! Heck, if we take the extra time to code in PV and EV calculations, it'll have a working progress bar too!

[|||||||||||||__________] Coding... (50%)

That being said, these elements of the "process" are useful as a taxonomy for the kinds of activities that must be performed as part of software development, and if you fail to do any of them, you will likely produce inferior quality software. But listing them in a regimented fashion, or trying to follow them as a "process", simply does not work.

But in the end there's an awful lot of waffle in what amounts to a pretty impenetrable document. There's got to be a better way to codify what we actually do when we develop good software. Not what we think we do, or wish we did, or claim we do to sound impressive.

Edit: grammar.

efaref··on Linux Code of Conflict
Whenever someone says "There are too many [white people|men] in XXX", it sounds like there's an implicit "... so we should kill some of them" in my head. That's how offensive it sounds to me.
efaref··on Linux Code of Conflict
The distinction that is important in my mind is:

* This code is bad; vs. * You are [A named person is] a worthless person.

The first is fine and a healthy part of software development. In a casual environment like open source development on the internet, it can be said with humour, with venom, with fervour, with sarcasm, or with hyperbole. Don't take it personally, even if happens to be code that you wrote. It's not a personal flaw of yours if everything that comes out of your keyboard is not instantly the best code ever written. Calm your ego. Use it to become better, stronger.

The second is a personal attack and is not acceptable.

Some people don't seem to be able to tell the difference, and treat the first as the second. Furthermore, since they can't tell the difference, they often react by doing the second (e.g. "Linus is a shithead for saying that and should go die in a fire"). I find that offensive.

efaref··on Linux Code of Conflict
I guess the answer is to just continue ignoring and censoring people whose opinions we don't like. I'm cool with that.
efaref··on Linux Code of Conflict
People seem to think that you should not be allowed to do something if someone else finds it rude or immoral.

I think censoring people like Linus when they are clearly using hyperbole or other figures of speech is rude and immoral.

Now what do we do?

efaref··on C Questions and Answers
Indeed. I guess his title is correct for him, at least.
efaref··on C Questions and Answers
I've worked on a system where NULL mapped to valid memory. (It was an embedded system, so the memory map was custom and bizarre). Of course, insanity ensued when new programmers worked on it.
efaref··on How One Stupid Tweet Blew Up Justine Sacco’s Life
Sounds like victim-blaming to me.

If only she wasn't wearing /that dress/ in public...

efaref··on How One Stupid Tweet Blew Up Justine Sacco’s Life
Except she wasn't being racist, she was being sarcastic about racism.

And in any case, no crime deserves the horrific public shaming she got.

efaref··on How One Stupid Tweet Blew Up Justine Sacco’s Life
Exactly. I thought hacker news was a relatively smart crowd, but it seems there are people in this thread that don't even get that.

"Stop the planet. I want to get off."

efaref··on How One Stupid Tweet Blew Up Justine Sacco’s Life
The tweet is clearly a quip about western white privilege. Her tweet caused no harm, but the blithering mass of bullying social justice warriors continually ruins lives.
efaref··on How Spelling Keeps Kids From Learning
I really don't understand why educators persist in trying to teach English reading and writing phonetically. It's not a phonetic language, so surely it is harmful to pretend that it is and lie to children about it.

Children learning Chinese can learn the Chinese character set through rote, and there's no reason why we can't be honest and accept that English learners have to do the same, too.

efaref··on UK to allow babies from three people
I really hate this sensational "from three people" thing.

It's a mitochondria transplant.

We don't start calling people "frankenstein's monsters" because they've had a lung transplant, even though that technically makes them a "person from FOUR people!" Shock!

efaref··on Arthur C. Clarke Predicts the Internet and PC (1974)
Most people only really use their computer as a terminal to connect (via HTTP) to a computer somewhere else (facebook.com).
efaref··on Tim Cook Speaks Up
Of course, Turing was one of many. But he was one, and that's enough to make the homophobes run for the hills.
efaref··on Tim Cook Speaks Up
If they won't buy Apple products because the CEO is gay, they probably shouldn't buy any computers at all, seeing as the entire field is built on the work of a gay man.
efaref··on Copywrong
> “address” (which you can’t G.P.S.)

You very much can GPS an internet address:

http://www.geoiptool.com/en/?ip=www.newyorker.com

efaref··on The Debian init system general resolution returns
Debian's sysvinit script wrappers were not in any way simple.
efaref··on Helping my students overcome command-line bullshittery
A computer science professor complaining about command-line "bullshittery" is like an astrophysicist complaining about telescope "bullshittery". C'mon, it's the 21st century, we should just be able to take a rocket to other planets!
efaref··on A look at the Apple ‘Skankphone’, built before the original iPhone release
Am I allowed to admit that I secretly love that UI? So simple. So clean.
efaref··on Sile, a typesetting system inspired by TeX and InDesign
It can't even get consistent line spacing in the table of contents. See http://imgur.com/ejg2FTS
efaref··on A surge of p-values between 0.040 and 0.049 in recent decades [pdf]
I think it's generally frowned upon to do percentages of percentages.

For example: An increase from 70 bananas to 86 bananas is an increase of 16 bananas, or 22 per cent.

But an increase from 70 per cent to 86 per cent is an increase of 16 per cent.

← PreviousPage 11 of 12Next →