My adviser's been poached - <AUTHOR>

I just found out that my adviser is being wooed to teach at another university starting next year, and I'm in a huge predicament because he's the only one in the department I'm currently in who does anything even remotely similar to what I do.  I'm only in the second semester of my PhD, (have no dissertation proposal yet, but do have a general idea of what I'd like to do), but I am already 900% sure this is the person I want to write my dissertation with.  Am I too far along or not far enough along to consider following him to this new university?  Is it rude to even ask him if I could do this?  The deadline for applications for the next academic year has already passed...Am I expected to go and do something else for a year and apply for the next, or should I see if there's a way of being taken in right along with him?  What is the socially acceptable thing to do here?  I don't want to overstep my boundaries, but I don't/can't write this dissertation with anyone else at my current university, and I don't particularly want to begin all over again somewhere else where I would know absolutely no one (adviser included).  Help!  I'm at a loss for the right thing to do... <comment><USER2> You're a PhD student. The default answer is that you can do whatever you want, and administrators will make things work.

I've seen this play out in three different ways: (a) student gets new supervisor, (b) student moves to new university, (c) student stays at old university but keeps the same supervisor in spite of the supervisor moving to a new university (depending in your institution, it may be necessary to get a new "official" supervisor for paperwork-filling-out purposes).

As other people have said, talk to your supervisor.

</comment><comment><USER3> Having been in the same situation, but much later in my PhD program (4th year), I would strongly encourage you to move with the prof, assuming he is willing to continue working with you at the new university. It's very difficult to survive and perform well in a PhD program (and subsequently in an academic career) if you aren't mentored in person by a top notch faculty that works in your area of interest. Good luck with your decision and your studies!

<comment><USER4> Your advice is normally good, but I'm a bit concerned by the fact that the original poster is getting this advice from HN and not the adviser.

In principle, the adviser should have told patty all of this, and made plans with the new school to bring students over. Most of the reasons I can think of for him not to do this (he doesn't care about his students, or dislikes the original poster) are signs that the original poster needs a different adviser.

</comment></comment><comment><USER5> A good adviser is usually more important than the univ you're at, so talk to him, the univ and the other school to figure out what the best route might be. Moving with your adviser to a new school isn't uncommon, so there should be a way to achieve this.

</comment><comment><USER6> You should have a talk with your adviser and discuss your options. If you don't feel comfortable talking with him about this, do you really want him as an adviser for the next several years?

If you really want to work with him, I would follow him. As a condition for moving to another university, I'm sure he could stipulate that he be allowed to bring in some people.

Perhaps you can just be a research assistant for a year.

</comment><comment><USER7> If your adviser thinks highly enough of your work and potential, then he will make suggestions as to how to make it work. On-going collaboration would have to be the go. You don't actually have to sit at his feet to succeed. If on the other hand he isn't encouraging you, then may be it's a case of hero worship and you need to get on with your own work.

</comment><comment><USER8> Praise $deity! When I read this headline I thought your experiment had gone horribly wrong and you'd cooked your adviser in boiling water! _Again!_

</comment><comment><USER9> you should join a compelling startup

</comment><comment><USER9> Option 4. Start a compelling company

</comment><comment><USER10> Only 900% sure? Look, it's a big decision, and there's no room for this kind of wishy-washy fence sitting. I'd wait until you are at least 2000% sure before doing anything you might otherwise regret.</comment>


NASA Software Safety Guidebook (2004) [pdf] - <AUTHOR> http://www.hq.nasa.gov/office/codeq/doctree/871913.pdf <comment><USER2> As a NASA flight software engineer who has created and worked with coding standards for critical software, I would highly recommend Gerard Holzmann's (JPL) Power of 10 Rules [[http://spinroot.com/gerard/pdf/P10.pdf](http://spinroot.com/gerard/pdf/P10.pdf)]. This is a set of the 10 most important (and thus highly restrictive) embedded flight software rules. It gets straight to the point and, at only 6 pages, is much easier to apply to actual software development than this ~400 page tome.

EDIT: Another great point referenced in the Power of 10 rules: a requirement is only valuable as long as you can enforce it. With some exception, if you can't enforce it with a static analysis tool or something of the sort, it might not belong in your coding standards.

</comment><comment><USER3> I don't doubt for a minute that NASA has highly competent programmers who write bulletproof ultra-reliable software, but they didn't get their knowledge or skill from this tedious bureaucratic tome.

After skimming the document for 15 minutes, I didn't find a single thing that would be insightful to experienced software developers or their managers. Things like, "Increased complexity means increased errors at all levels of development." It should be possible to write a useful book about software safety, but this is not it.

<comment><USER4> I think many people fail to understand that safety critical software can't rely on "highly competent programmers". No matter how competent, programmers can't be trusted to write safety critical code.

Safety critical software is all about the process and organization. The process must be so good that you can hire total newbie to write code and none of his sloppy work would get into the final product.

What you need is software engineer who writes 20 lines of code and can then justify each of the 100 lines in a resulting spreadsheet that is full MC/DC code coverage in processor instruction level. Then you need two testing engineers who can do the same for code that others have written. Then you need everyone to go trough every change, justify them, rewrite tests and provide reports.

<comment><USER5> To extrapolate on this the skillset to identify "highly competent programmers" AND populate your organization with them exclusively either does not exist or at least is unreliable enough that it can never be assumed as a permanent state of your organization: as proven by all long-term software projects and the organizations that created them.

<comment><USER6> Including those at NASA.

</comment></comment></comment></comment><comment><USER7> The thing to bear in mind is that not every organisation needs 'NASA-level' quality. IMHO The Capability Maturity Model is a must-read for everyone interested in professional software development. [https://en.wikipedia.org/wiki/Capability_Maturity_Model_Inte...](https://en.wikipedia.org/wiki/Capability_Maturity_Model_Integration)

<comment><USER8> What do I look for in this model if I'm merely employed as a software developer?

Other than the fact you can quantify how developed your employers' processes are.

<comment><USER9> The model is really just an abstract compilation of best practices and probably isn't helpful for just line-level developer. Personal Software Process (PSP), with it's pluses and minuses, is a more concrete implementation aimed at a single developer. You could in theory do it within the framework of your company's development process. Overall it's not that dissimilar from Joel's checklist[1] with an emphasis on metrics.

[1] [http://www.joelonsoftware.com/articles/fog0000000043.html](http://www.joelonsoftware.com/articles/fog0000000043.html)

</comment></comment></comment><comment><USER10> I find this more useful and informative, to be honest (While C specific, it can be adapted for other langauges as well): [http://lars- lab.jpl.nasa.gov/JPL_Coding_Standard_C.pdf](http://lars- lab.jpl.nasa.gov/JPL_Coding_Standard_C.pdf)

</comment><comment><USER11> This actually has a lot of good information. It's just that you have to get to it to know that. The sections talking about methods like OOP are pretty good summary of pro's and con's. The PDF Reader p93 "Good programming practices..." has good ones common in safety-critical embedded & some OS development but that I see almost no other C programmers doing. There's some common advice mixed in. That whole section is worth finding the document as low-level programmers will find at least 5 things they didn't think about. At least.

Section 6.4 (p109) is a nice overview of requirements analysis benefits and types. 184.108.40.206 is high-assurance requirements which most projects don't have. Appendix H checklist is decent. 6.6.3 (p126) covers many useful analysis often done at compiler or type system level in CompSci. Follows with basic, but inadequate, explanation of formal specs.

Section 7.4.2 (p141) goes into all sorts of techniques for fault-tolerance. 7.4.4 (p145) talks language considerations for reducing defects. Following sections are limiting complexity & designing for easy maintenance. If only enterprises and their management read that stuff... 7.5.2 onward talks Design Analysis with examples nicely rating benefit vs effort required. First and interface failure lists plus especially design constraints are good as people overlook some subset of them usually.

Section 8.4 (p169) is where coding & testing practices begin. Quite thorough with cost benefit analysis I mostly agree with on coding side. Remember that requirements & design already knocked out most issues with code basically just implementing a precise spec. That's why some get "Low" rating when, in tossed- together coding, they might otherwise have high impact.

Ch 9 (p179) is main section on testing. It could be subsetted but pp 182-183 is nice, exhaustive list of what to look at. 9.4 (184) nice list of testing types. Nevermind, the latter sections are even better. Section 11.1.4 (p210) on languages, compilers, etc is pretty thorough with a sound, uncommon recommendation on language used. :) CASE tools (pp236) has nice list of capabilities for general, SW tooling worth imitating.

pp264 has list of common, human errors. p273 has list of questions to ask about dependencies, esp 3rd party software.

So, contrary to mysterypie et al, I find the document to have about everything you need to know to write software that either doesn't fail or handles failure well. It's meant to get you started on every aspect so you can follow up on it with specialist texts. It also drops literally hundreds of useful heuristics and list items that help you achieve your goal. Many of them are non-obvious. Quite a few would've prevented failures I see regularly on HN from otherwise competent developers. I'm for trimming the fat out of this thing to make it the reference text on high-assurance system development that it deserves to be. Plus, collecting together with it key information it references (esp specialist guides) so people can selectively look up and master pieces at a time.

<comment><USER12> I also liked that bit (p48): ""Cutting edge" techniques or processes may not be the best choice, unless time and budget exist to allow extensive training of the development and assurance teams. Staying with a well understood process often produces better (i.e. safer and more reliable) software than following the process-of-theyear."

<comment><USER11> Oh yeah! On Schneier's blog, I often post Nick P's Law of Trustworthy Technology: "Don't put your trust in a new method until there's been at least 10 years proving or improving it." Also, "tried and true beats novel or new" if high-integrity development.

</comment></comment></comment><comment><USER13> _Be aware of potential problems if you split control of software configuration management (e.g. having software documents is maintained by a project or company configuration management group, and the source code version control handled by the programmers). It may be difficult to keep the documents (e.g. design) synchronized with the code. Someone with configuration management experience should be "in charge" of the source code, to enforce change control and comprehensive documentation of changes._

Great idea, forbid normal developers from officially changing the source code and let an expert handle this important matter. Don't even think about using a modern VC system, IBM has fully integrated Enterprise SCM(tm) ready for you.

 _Change control is an important part of developing safe software. Arbitrary changes should be avoided. Once a piece of software has reached a level of maturity, it should be subject to a formal change control process. What that leve l of maturity is will vary by group. It could be when the component compiles, when the CSCI (which may contain several components) is completed, or when the whole program is at its first baseline._

Oh, you noticed that this 500 line copy paste function could be replaced by three 80 line functions? Sorry buddy, before you can change this you have to fill out this form in triplicate and what for a decision from three middle managers. Maybe we can fit this change in the next release, but don't get your hopes up.

<comment><USER14> > Oh, you noticed that this 500 line copy paste function could be replaced by > three 80 line functions? Sorry buddy, before you can change this you have to > fill out this form in triplicate and what for a decision from three middle > managers. Maybe we can fit this change in the next release, but don't get > your hopes up.

Because as it turns out, writing mission critical, one-off software is difficult. Touching a piece of code that's firmly embedded in the system could have serious consequences. (Of course, it shouldn't; any mistakes should be caught by testing but we all know how that goes.)

These are rules for a place that makes massive, expensive and dangerous things, not a webdev shop.

<comment><USER15> Until somebody tries to drive a surgical robot using your webdev javascript components...

And don't dismiss the idea: they do use Microsoft Windows in surgical robots (including eye laser robots, which is why I'll never have it).

<comment><USER16> I've worked on such devices before. I don't know how it goes for the surgical robots you mentioned, but _in general_ , this can be made in a sane manner. Um, using a Windows application for the UI. I wouldn't be partial to operating a surgical level through a web interface, but only because of the unpleasant UI latency and the inconvenience of doing anything that's not HTTP from it.

The way this is (normally/sanely) done is that the control code for the robot runs on its own CPU and does all the failsafe, real-time-contrained stuff. The robot's control code doesn't receive control-level instructions, but messages of the form "move to position X,Y,Z" or "move N units on axis Y" (which it validates and, ideally, against which it also has mechanical limits, i.e. the mechanism itself cannot move to an invalid or dangerous position). The application that gets user input and sends these messages doesn't need to be NASA-level stuff as long as it runs on another CPU.

In more recent years, this CPU and the one that runs Windows and the nice interface have been starting to come in the same box (and, more recently, even on the same die), but until not so long ago these were usually separate boxes, connected through serial, USB or Ethernet. This is still common, I've finished the firmware for one such device just a few months ago.

I don't know if you can actually pass through FDA's process with a robot that's running Windows, but frankly, I wouldn't try it. But there's nothing inherently unsafe in running the UI on general-purpose software and hardware, as long as the control code is robust enough in its validation and the interface between the two is correctly designed.</comment></comment></comment></comment>


'05 Annual Performance Review: Albert Einstein - <AUTHOR> http://www.norvig.com/performance-review.html <comment><USER2> This is a hilarious re envisioning of how a young Einstein would have been graded by his boss...especially enjoyed these nuggets:

> You wrote that "A storm broke out in my mind" this year. Let me remind you > that our Employee Assistance Plan (EAP) covers up to three psychiatric > treatments, should you find them necessary.

> You seem to lack a flare for self-promotion. Lucky for us our PR department > stepped in and changed your L/c2 equation into the much more marketable E = > mc2."

</comment><comment><USER3> Something that I find very interesting is that it is probable that some of the patent applications that Einstein evaluated were for methods of synchronizing clocks for railways. This was a pretty big deal at that time, and Einstein was probably in the center of it. His ideas about space and time may not have been so far removed from his occupation as most people assume.

Peter Galison has written quite a bit about this.

<comment><USER4> My first reaction to what you said was "bah, the scale of space and time in which railways operate wouldn't be impacted by Einstein's ideas about space and time." (And they aren't, in a practical sense.)

But then I Googled up this short interview with Galison.[1]

 _Suppose, Einstein reasoned, that you wanted to know what time a train arrived in a train station. Easy enough: you see where the hand of your watch is at the time the engine pulls up alongside you. But what if you wanted to know when a train was pulling into a distant station? How do you know whether an event here is simultaneous with an event there? Einstein insisted that we need a simultaneity - fixing procedure, a definite system of exchanging signals between the stations that would take into account the time it took for the signal to get from one station to another. By pursuing this insight, Einstein discovered that two events that were simultaneous in one frame of reference would not be simultaneous in another. Moreover, since a length measurement involves determining the position of the front and back of an object at the same time, the relativity of simultaneity meant that length was relative as well. By removing the absolutes of space and time, Einstein restructured modern physics._

OP is marginally clever parody but your comment led me to this. So thanks!

[1] [https://history.aip.org/exhibits/einstein/essay-einsteins- ti...](https://history.aip.org/exhibits/einstein/essay-einsteins-time.htm)

</comment></comment><comment><USER5> I thought HN was for "anything that gratifies one's intellectual curiosity"? This isn't an actual performance review, it's just parody.

<comment><USER6> Consider that parody is part of intellectual curiosity.</comment></comment>


All Cars in Norway Will Be 100% Electric by 2025 - <AUTHOR> http://wccftech.com/norway-electric-cars/ <comment><USER2> All _NEW_ cars will be electric by 2025. The entire country will not be. The actual quote:

> "The Norwegian Parliament have decided on a goal that all new cars sold by > 2025 should be zero (electric or hydrogen) or low (plug-in hybrids) > emission"

</comment><comment><USER3> This is certainly ambitious. I wonder what the plans will be for those who won't be close to the infrastructure to support it, eg Farmers, small country towns residents. Will they be exempt?</comment>


Humans should think of sizeof() as a function, says Linus Torvalds - <AUTHOR> https://lkml.org/lkml/2012/7/11/103 <comment><USER2> IIRC, if the argument to sizeof is a type, the parentheses are mandatory, anyway, so using it like it was a function is more consistent.

I think the reason it is not a function from the standard's point of view is that C does not have any builtin functions (unless my memory totally fails me in this case), all functions have to be either defined locally or #included.

<comment><USER3> Another oddity of C that amuses me is the do/while loop without braces:

        int i = 4;
        do
           printf("hey\n");
        while (--i > 0);

Even though do/while is a keyword bracketing pair in C, it still only lets you use a single statement (because nested whiles). So everybody uses braces, and thus it looks quite disturbing without them.

<comment><USER4> _it looks quite disturbing without them_

Remove the newline and it looks ok to me:

        int i = 42;
        do printf("hey\n");
        while (--i > 0);

Another possibility would be:

        int i = 42;
        do printf("hey\n");
            while (--i > 0);

<comment><USER5> Oohh... this would be so good for the underhanded C contest! Just mix is up with the comments which make the `do` look like (assuming good actor) an accidentally wrapped comment.

        /* The following code does something, so here's the
        // explanations of what happens. And here's what we actually
        */ do
        printf("hey\n");

        /* And now just count down */
        while (some_check(--i));

Now spot that in a large file of real code!

<comment><USER6> Sneaky. Most syntax highlighting would make it stick out like a sore thumb, but still, sneaky.

</comment></comment></comment></comment></comment><comment><USER7> I'd like to confess that I'm one of the return() people, and I also do if() even in cases where the language doesn't require it. This behavior isn't borne out of confusion about what is and what isn't a special language construct. Rather, it helps me prop up the illusion that programming is about using a few simple primitives instead of being the chain of compiler directives it actually entails - it's an esthetic choice if not always a logical one.

The thought that if() _could_ just be a lazily-evaluated function taking a code block argument, and that return() _could_ be a way of marking the end result of an expression somehow pleases me.

I think the different expectations about sizeof() come from the artificial distinction between operators and functions, the implication being that in a compiled language the sizeof operator would be a compile-time construct, or barring that, at least a behavior of the type system. On the other hand, there are tons of compiler intrinsics in C/C++ that look exactly like functions but aren't.

<comment><USER8> Doesn't `if` always require parenthesizes?

<comment><USER9> Not even in C. You can have an if condition that is actually a macro that expands with parentheses. For example the macros in ctype.h, so you can actually write

      if islower(c) {
          (..)
      }

<comment><USER4> That's not portable, though: A comforming implementation may very well implement _islower_ as a function call, and you should treat is as such.

</comment></comment></comment></comment><comment><USER10> I respect Linus greatly but the way he to talks to his fellow 'humans' is insanely confrontational, rude and disrespectful. It overshadows his arguments (which are usually very good) and throws people on the defensive. I'm grateful for all he has accomplished and shared with us but I imagine working with him is 'hell'.

<comment><USER11> [http://www.catb.org/esr/faqs/smart- questions.html#keepcool](http://www.catb.org/esr/faqs/smart- questions.html#keepcool)

<comment><USER12> Keep in mind: that's the dipshit that thinks he's the avatar of Pan.

</comment></comment></comment><comment><USER13> I used to write

        return (0);

I.e., with a space. I'm not sure if someone ever told or recommended me to do this, but the reason I did this was consistency with other C statements, because _all_ C statements that take some kind of expression as a parameter (if, for, while) require it to be surrounded by parentheses. So it seemed logical to me to do the same with return. I've stopped doing it now, although some of the old code still lives.

I've seen code by others where there was always a space between the function name and its arguments. _That_ was ugly, and really confused a function call with a statement.

<comment><USER2> I find parens around a return value/expression slightly annoying, but not annoying enough to have a debate over it. It doesn't make the code harder to read, IMHO.

Whitespace between a function name and the arguments _is_ significant, however, because with a function-like macro, there must be _no_ whitespace between the name and the opening parenthesis. I've seen the following code in production code, for example:

      #include <stdlib.h>
      #define free(x) free(x), x = NULL

      free(ptr1); // Macro
      free (ptr2); // Call free(3) directly

(Whether or not such a macro is good idea is a different question entirely, the point is that you can prevent such macro-expansion by using whitespace. Aesthetically, I find it very disturbing, though.)

<comment><USER14> You do need to omit whitespace between the name and the opening parenthesis when defining a functionlike macro, but it doesn't matter when you're calling it.

<comment><USER2> I furiously looked at the C standard (C99, anyway) and the documentation to the gcc preprocessor, and have to admit somewhat embarassedly, that you are right. The gcc preprocessor documentation clearly states:

> "If you use the macro name followed by something other than an open- > parenthesis (after ignoring any spaces, tabs and comments that follow), it > is not a call to the macro, and the preprocessor does not change what you > have written."

Thanks for pointing this out to me!

</comment></comment></comment></comment><comment><USER15> "Quite frankly, if you do this, you should be shot. "

Ah, yes. No comment from Torvalds is complete without a gratuitous ad hominem.

<comment> loup-vaillant This is not an ad hominem argument. This is merely blowing things out of proportion. _This_ would be ad hominem (and non-sequitur):

"You're watching dancing bunnies, and you _dare_ suggest we should remove the parens after sizeof?"

Attack on the person (watching dancing bunnies), used to discredit an unrelated opinion (parens after sizeof).

</comment></comment><comment><USER16> I first learned that sizeof was an operator when I was confused about how it dealt with arrays compared to functions. After I learned it was an operator and not a function things made sense and were (relatively) consistent again. Several commentators here have given other examples where you will be completely thrown off if you believe that '"sizeof()" really _is_ a function.'

The problem with "lies to children" is that they can pile up to the point where people end up becoming completely confused about what's actually happening. As the internal inconsistencies mount, the "simple" lie starts to become a lot more complex than the "complicated" truth.

</comment><comment><USER17> Makes a good C interview question:

        char  c;
        short h;
        int   i;
        char *s;
        1 = sizeof (char)
        2 = sizeof (short)
        4 = sizeof (int)
        4 = sizeof (float)
        8 = sizeof (double)
        1 = sizeof (c)
        2 = sizeof (h)
        4 = sizeof (i)
        4 = sizeof (s)
        4 = sizeof &c
        1 = sizeof c
        2 = sizeof h
        4 = sizeof i
        4 = sizeof s
        1 = sizeof *s
        4 = sizeof &main
        4 = sizeof (sizeof (i))
        4 = sizeof (sizeof i)
        4 = sizeof sizeof i
        4 = sizeof sizeof sizeof i

from: [http://leapsecond.com/tools/size1.c](http://leapsecond.com/tools/size1.c)

</comment><comment><USER18> > Here's an example of a really bad use of "sizeof" that doesn't have the > parenthesis around the argument: sizeof(*p)->member. Quite frankly, if you > do this, you should be shot.

Good ol' Linus

<comment><USER19> I certainly read that the wrong way first time around.

</comment></comment><comment><USER20> (2012)

</comment><comment><USER21> Just as annoying as people not using parens with "typeof()" in JavaScript.

</comment><comment><USER22> Why is this important?

</comment><comment><USER23> > "return()" is in no way a function.

Ah, but in Haskell, `return` is a function, though it shares only a few similarities with with its counterpart in C-like languages.

However, when using continuations or a continuation passing style, the continuation is a function that behaves almost exactly like traditional return when called!

        (define (multiply x y return)
          (return (* x y)))

<comment><USER23> Was there something factually incorrect in my comment?

<comment><USER24> Was there something _relevant_ in your comment?

<comment><USER23> I was pointing out that if you can consider sizeof a function, you can consider return one too.

</comment></comment></comment></comment><comment><USER25> But, I cannot get a function pointer to it, right?

<comment><USER26> It is a function in the mathematics sense, not the C sense.

</comment></comment><comment><USER27> What kind of monsters don't use parentheses on sizeof. Is it the same guys that put { on new lines and have giant comment templates for every one line function.

<comment><USER28> Ah, to join the bikeshedding: { on newlines make imho more sense, the block of code is visually balanced that way. We have high-res screens now, no reason to pretend we're still on 80 char terminals.

But work long enough in either one of those styles, and the other one will start to look strange.

<comment><USER29> What advantage does 'visually balanced' give? That's like saying the letter A is better than B because it's 'stands up better.'

Indentation is how you should identify blocks.

<comment><USER30> Indentation to identify blocks can break down in things like switch statements:

switch( c ) {

       case 'A':
         simple_stuff();
         break;

       case 'B': {
         int temporary_variable = 0;
         complex_stuff( temporary_variable );
     }

To me, the advantage of braces on newlines is it makes it extremely easy to tell where blocks start and end---whether you're using your favorite IDE, or reading the code on a blog, or reading the code with "cat". I actually think it's a case where Python has the design advantage on C (since if you do braces-on-newline consistently enough, you end up duplicating python but with superfluous braces added in).

<comment><USER31> I'm not seeing what the issue here is, besides that this won't compile because of mismatched braces. There is no need to put braces around the contents of a case block. Unless I'm switching on an enum, I rarely find a compelling reason to use switch/case, and there's usually a cleaner way to do it.

<comment><USER32> _" There is no need to put braces around the contents of a case block."_

There is here.

In some dialects, you can only declare a variable at the start of a block. From the perspective of the compiler, a "case block" isn't actually a block, just stuff between labels. In order to declare temporary_variable, it may be necessary to put the braces, and it is probably best practice as temporary_variable may otherwise be exposed to later cases (and in C++, a jump over a variable declaration seems to produce an error).

</comment></comment></comment></comment></comment></comment><comment><USER33> Who the hell doesn't think of `sizeof` as a function?

<comment><USER34> It's an unary operator, with 2 forms:

       sizeof(type)

or

      sizeof expression

but e.g. unlike a function, it doesn't evaluate the expression.

        sizeof(my_function()) doesn't call my_function.

        sizeof(a = 12) doesn't assign 12 to a.

<comment><USER35> So is "sizeof(a = 12)" equivalent to just "sizeof(a)"?

<comment><USER36> Well, `a` could overload the "=" operator, in which case you would get `sizeof(a.operator=(12))`. But as far as pure C goes I believe you are right.

Edit: Via the C99 spec ([http://www.open- std.org/jtc1/sc22/WG14/www/docs/n1256.pdf](http://www.open- std.org/jtc1/sc22/WG14/www/docs/n1256.pdf)).

 _The sizeof operator yields the size (in bytes) of its operand, which may be an expression or the parenthesized name of a type. The size is determined from the type of the operand. The result is an integer. If the type of the operand is a variable length array type, the operand is evaluated; otherwise, the operand is not evaluated and the result is an integer constant._

 _The type of an assignment expression is the type of the left operand unless the left operand has qualified type, in which case it is the unqualified version of the type of the left operand._

So it is indeed the case that `sizeof(a = 12)` is equivalent to `sizeof(a)` in the C world.

<comment><USER37> An interesting result of this (I suppose...) is that if a macro expands an argument twice, and one of those times is an operand for sizeof, you don't need to mention the double expansion in the documentation.

</comment></comment></comment></comment></comment><comment><USER38> Yes, return can be a function. Torvalds hasn't heard of continuations, obviously, where we "return" from a function by invoking a continuation.

We can justify writing return (expr); using the same arguments that justify the sizeof (expr) convention.

The thing is that _in C_ , return isn't a function; there are no continuations.

Similarly, sizeof is an operator, which doesn't reduce its argument expression to a value.

If we are going to make coding conventions based on pretending that C is a different language in which sizeof is a function, then pretending return is a function is also fair game.

<comment><USER39> He is talking about C. Continuations are irrelevant.

<comment><USER38> That point is _clearly_ made in the comment you're replying to, with the additional point that if we are talking about C, then sizeof is an operator, not a function. It doesn't require parentheses, except when its operand is a type expression. No well-considered coding convention requires superfluous parentheses with sizeof, and there are good reasons to ban them.

We should prefer code like:

       type *ptr = malloc(sizeof *ptr);  /* no parens */

to

       type *ptr = malloc(sizeof (type));

In general it's often better to base sizeof on an ordinary expression rather than a type expression.

If we don't use superfluous parentheses on sizeof, we can then look for sizeof followed by an open parenthesis to look for code where sizeof is applied to a type expression.

      sizeof (type)

means "produce me a size_t value based on some arbitary type, without checking that it's related to anything in the surrounding code". It can be as dangerous as a (type) cast.</comment></comment></comment>


Twitter's 2FA implementation is atrocious and dangerous - <AUTHOR> https://twitter.com/sonyasupposedly/status/1153048182466572288 <comment> o-__-o Maybe changes will come now that Jack's account has been hacked? Also, why would they fix this when it gives state actors plausible deniability when breaking accounts.. like the CEO of public companies that may or may not be reading state leaders private communications...

</comment><comment><USER2> And even though they support security keys, they only allow one to be added to your account. Very poor</comment>


Designing a better ballot - <AUTHOR> http://www.37signals.com/svn/posts/1215-designing-a-better-ballot <comment><USER2> Hmmm. From what I've read and heard, India seems to have an effective electronic voting system (Wiki page links to external sources).

<http://en.wikipedia.org/wiki/Indian_voting_machines>

Anyone have any experience or know more about it?</comment>


Ask HN: Advice or representation on possible defamation lawsuit against GitHub? - <AUTHOR> I have an anonymous troll who has been stalking me on social media for over seven years. They follow my accounts and post false and defaming information about me through: Github, Reddit, and even Hacker News.
I requested almost seven years ago that Github remove the defamatory statements posted on their site and they refused. I have requested this again just this month and they also refuse.
Recently, I had a very lucrative job offer revoked the day before I was to start and the exact reason provided by the hiring manager was this defaming and false information which has been posted by this anonymous internet troll on Github.
What are my options here? I'm not looking for a pay day, I just want the materials removed. Github has told me they will refuse to remove the false information without a court order.
I believe the following criteria have been meet, but IANAL:

   - The defendant made a false and defamatory statement concerning the plaintiff;

   - The defendant made an unprivileged publication to a third party; and.

   - The publisher acted at least negligently in publishing the communication.

 Can anyone help? Do any lawyers here want to sue Github? Is there an easy way I can compel Github to remove this libelous information? <comment><USER2> First consultation meeting with a lawyer is usually free and they can tell you how to proceed. Organizing a letter written by a lawyer or a police record is extra work but it sounds like github requires this process. I'd only sue Github once the other options have been exhausted.</comment>


What the 'Vault 7' CIA Leak's Coverage Is Missing - <AUTHOR> https://worthhiding.com/2017/03/07/what-the-vault-7-cia-leaks-coverage-is-missing/ <comment><AUTHOR> Highlights:

> At this point, the only responsible course of action is for the CIA to > notify equipment manufacturers and software developers of the exploits they > are aware of, so that the software can be secured.

...as well as: > The CIA chose to stay silent about vulnerabilities that could be used by hackers from other countries or governments.

and: > Unfortunately, the mainstream media's coverage of this event fails to mention an important consequence of the leak. While its technical disclosures only confirm what industry professionals long suspected (Matt Green, a cryptographer at Johns Hopkins University, said that the list of cyberweapons was "impressive" but not unexpected), they also reveal that details of the cyberweapons circulated among unauthorized individuals, and the existence of the leaks mean that the technical details surrounding the cyberweapons themselves could potentially be in the hands of foreign adversaries.

and to close: > The Vault 7 leak is empirical proof that a backdoor for the government is a vulnerability regardless, and that these tools will inevitably end up in the wrong hands.</comment>


DRM done right: Puppygames - <AUTHOR> http://www.puppygames.net/blog/?p=574

<comment><USER2> The Pepsi Challenge of any DRM scheme is this: Will I end up regretting that I didn't just pirate it instead? (ie: Did the purchase experience leave me with anything less than warm fuzzies, and/or did the product end up being crippled in some way?)

Though hardly bulletproof, or optimal, this particular mechanism clearly passes that test, and should be lauded.

<comment><USER3> Yeah, this happened to me regarding Starcraft 2. I ended up regretting buying it after it took me half a dozen tries just to play single-player with my not- so-good mobile internet connection.

<comment><USER4> Had no problems with starcraft 2 at first, but the real telling moment came when I noticed that I couldn't play single player without first registering my account for offline play with a net connection that I didn't have where I was at the time.

Felt weird having a game I had paid for and installed legit that I was being prevented from playing.

<comment><USER3> Yeah, I forgot about the need to register on battle.net

</comment></comment></comment></comment><comment><USER5> I wonder how long it is going to take the fickle and rabidly cynical usual suspects to realize that "Our DRM / lack of DRM / pseudo-DRM / loud opposition to DRM _is different_ " is, in fact, Marketing 101, and that they hate marketing almost as much as they hate paying for software.

<comment><USER6> I don't mind paying for free software, if I think it's worth it. But I wouldn't take their proprietary software even if you paid me.

<comment><USER7> That's ok. You are not their customer.

</comment></comment></comment><comment><USER8> hello everyone! This is Cas from Puppygames. It's been very interesting reading this thread (thanks ewj for posting!)

A few straight from the horses mouth facts:

I sat down and worked out what our revenues are, and they work out as $750/month over the last 7 years. Out of that, we pay for hosting, advertising, accountancy, and tax, leaving about $400/month and then Chaz and I split the remainder. Chaz just about scrapes a meagre existence in Spain. I live in the UK though so I have to keep on doing a day job (I've got a family to support). So up till now Puppygames has always been part-time! It'd be nice to do it full time.

If you're wondering why we bother at all, well, it's because it's actually a monumental pain in the arse to release two versions of every game - a demo and a full version. It's loads easier just to do a full version which can be unlocked. That's all our "DRM" is, really - just a really simple way of doing unlockable demos which won't go wrong and is practically impossible to not understand.

Also, anyone who thinks that it was a "lot of work" developing the system should probably know... it wasn't. It's really trivial stuff, and most of the hard bits are built in to Java anyway like the public/private key encryption. We're already working our little fingers off making the game, can't afford to spend any more time on unlocking schemes!

It really is utterly trivial for anyone with half a brain to defeat, and even crack and release. It's Java - any fool with JAD and Eclipse can rip it out. But what we're getting at here is... what's the point? The demos are lengthy, the games are cheap, the rights we give you along with the games are exactly the rights you would expect to have and want. They're exactly the rights I expect and want from things I buy, anyway.

Lots of piratey types give all sorts of feeble excuses as to why they get dodgy copies of things but at the end of the day we basically addressed every single one of them except one which is that the games cost too much and you wanted them anyway! Which we're figuring out how to address right now. We tried in the past reducing the prices of the games but discovered they made even less money.

Any suggestions?

<comment><USER9> Excuses is exactly what they are.

The overriding reason people pirate is that they can something for free, so why pay for it?

When I was a poor student I pirated games too, but now that I'm a somewhat well payed software developer I buy pretty much every (mostly indie) game I play (and quite a few I end up not playing) because ~$20 every month or two is simply not an amount of money I will notice missing.

</comment></comment><comment><AUTHOR> The tl;dr bullet points:

1) Sharing with friends and family is allowed, and encouraged

2) Your e-mail is your registration key - when you try to activate on another computer, an activation link is sent to you via e-mail, and you can do this 10 times. After that, you've just got to ask Puppygames for more activations and they'll almost always approve them (I assume the main exception would be if someone was passing around a registration all over the Internet, which is pretty easy to notice if it happens).

3) If anything screws up re: the DRM system, it errs in your favor. In particular, if you haven't registered when you boot the game and you can't reach the server, it will assume that you're good to go, and turn the demo into the full game. It will never shut you down because it can't phone home.

4) The only way the full game gets disabled is if the server tells it that you've asked for a refund (which they always honor).

5) They're aware that 3) and 4) are very easy to game (block the Internet connection once you get your refund), and that's fine, they prefer not to hassle legit users unduly.

IMO, this strikes a pretty good balance - it tends to err on the side of the user while still throwing up a tiny barrier to piracy (pretty much just enough to thwart the casual pirate). To do more is not worth it, because people that will go through the trouble of bypassing the registration process on the demo would probably just find a cracked version anyways if it was any more difficult to do.

Also, I should mention that the demos that Puppygames provides are quite substantial chunks of the full versions - if you've played enough of the demo to reach its limits, then chances are you've been liking the game enough to warrant buying it. I think this is pretty important, it's probably the main reason they have so few refund requests.

Finally, I encourage everyone to check out the game itself at <http://www.puppygames.net/revenge-of-the-titans>, too - Cas and Chaz have always put together really polished and fun games, and it's a shame that they haven't been able to figure out how to sell more of them (Cas was _not_ joking at all with the self-deprecating stuff about people not buying the games, they really are only selling a handful of copies every month). FWIW, I have no relation to either of them, I'm plugging them because I've always liked their games and would hate to see them give up.

</comment><comment><USER10> "Firewall Revenge of the Titans so it can't ever contact Puppygames and get your totally free full game"

Using DRM at all in such a setup looks quite pointless to me.

<comment><USER11> I agree, but what they are describing sounds less like the DRM we've come to know and hate (yes, I know that's the point of the article, but let me explain). When I think of DRM in, say, music purchases, I usually think of some way of restriction. But here the title DRM actually makes sense: it's Digital Rights _Management_. This actually enables the developer to distribute the right to the full version of the game to it's customers, not to restrict them. By that same token things like Valve's Steam allow Valve to distribute games, although on much more restrictive terms. Of course the FSF would completely disagree with any of this, but I would definitely like to hear RMS's take on this particular setup.

I guess the big question is going to be "does this scale?"

<comment><USER12> In the end of any scenario, DRM always means somebody who has rights on your computer over you, the owner.

My computer is mine. I can give others limited access on them in terms of user accounts. However, I will not give myself a user account and give them root.

The pirates can be said for getting things free. They are also more free due to less restrictions on their version of the code.

</comment></comment></comment><comment><USER13> This DRM doesn't do anything; it just seems like extra code to maintain for no reason.

<comment><USER14> They make a big deal about the download having your name and address embedded in it to deter people from spreading their copy all over the net.

And then they said that their demo version will be full version until it contacts the server... And you can download the demo without an account.

They defeated all of their own protections.

</comment></comment><comment><USER15> While I admire their attempt at a different view of the DRM model, how many here have downloaded the game to either play or to at least test their DRM? I for one have, and if that is enough to get me to buy a copy of any of their games, I'd say the DRM (or at least the blog post) is a success.

</comment><comment><USER16> sad they say they aren't doing so well:

"It means if our DRM system breaks, like for example our server melts down with the floods of sales we unfortunately aren't getting, or Puppygames goes completely bust because you buggers aren't buying nearly enough games for us to survive _," ... "_ Hint: you're not :("

<comment><USER3> Well, if they aren't exaggerating with that 5% number. Then it means they are making around $270 per month.

Kind of sad compared with minecraft that made $20k or something in a day.

<comment> c-oreills I'd say Minecraft's more the exception here, not the rule.

Or, turning your comment on its head, Minecraft's income looks absolutely amazing compared to this!

<comment><USER9> Yes, this is far closer to the common indie experience than minecraft.

</comment></comment></comment></comment><comment><USER17> Not really - you _still_ can't script the installation of it, which means that you have to sit and type a bunch of numbers foreach and every single program you want to install.

</comment><comment><USER18> _WAAAAAAAAYYYYYY_ too longwinded. This isn't a marketing message aimed at customers, it's a bit of clever design aimed at the likes of us. It's still massively inconvenient, in that I have to understand their ridiculously complicated scheme in order to understand what I can do with my game. As a rule, people who get angry about DRM aren't the kind of people you'd want as customers even if they did pay for software, and the average user is likely to be more put off by a complex permissive scheme than a simple restrictive scheme. Customers generally don't mind big, bold-face caveats, it's the small print that worries them.

All this is rather beside the point - according to the numbers in that post, they're selling 20 copies a _month_. If you're writing good, attractive games but making so little money, you have much bigger priorities than your DRM scheme. Spend an hour implementing an off-the-shelf watermarking system to give yourself basic legal recourse against wholesale piracy, then get on with the job of selling.

If this is just a hobby then fair enough, I have no right to argue, but if this is supposed to be a business then I really despair.

<comment><AUTHOR> _It's still massively inconvenient, in that I have to understand their ridiculously complicated scheme in order to understand what I can do with my game._

Eh, as you mentioned, this post is aimed at people like us - to the normal end user that's not trying to play the full version for free, there's nothing complex at all. You just download the game, and enter your e-mail address. If you've already bought the thing, then you just have to click a link in an e-mail, otherwise you either play the demo or buy the thing, no surprises. Even sharing with friends is easy, you just enter your e-mail address and it works fine after you click the link.

The other details involve edge cases; perhaps Cas will at some point release some stats, and tell us (for instance) how many people actually activate more than 10 copies of the game. I can't imagine it's very many, and for everyone else, the scheme is trivial.

 _If you're writing good, attractive games but making so little money, you have much bigger priorities than your DRM scheme._

I'd tend to agree with this. The level of polish in their games makes it surprising that they're doing so few sales, so there's probably a lot that could be done marketing-wise to improve things. Of course, I have no idea what these things are, myself. :)

I'm sure Cas would be open to suggestions on this front, I know he's aware of this thread, so by all means, fire away if you've got advice...

</comment></comment><comment><USER19> >Error establishing a database connection

Evidence that there is no such thing as DRM done right?

<comment><USER20> Le cache:

[http://webcache.googleusercontent.com/search?client=opera...](http://webcache.googleusercontent.com/search?client=opera&rls=en- GB&q=cache:http://www.puppygames.net/blog/?p=574&sourceid=opera&ie=utf-8&oe=utf-8)

</comment></comment><comment><USER21> "DRM done right" is an oxymoron.

<comment><USER22> "We succeeded at failing!"

</comment></comment><comment><USER23> That's nice and all, but most games have much more invasive DRM yet they still get pirated. What stops someone from hacking the game to not display their name and to also never check in with the server?

<comment> c-oreills I think their point is "we've left it loose because we trust you".

They say their demos will automatically become the full version if they can't find a Puppygames server on first run. You don't _need_ to hack the game, if you're so inclined to get it for free they've made it easy for you.

They're encouraging a culture of trust between you and them, in the hope you'll thank them for it and actually pay for the game. Not a bad tactic considering some of the piracy figures indie devs have cited. At the end of the day they realise it's more beneficial to keep their paying customers onside rather than slightly inconveniencing those who are going to pirate it anyway.

<comment><USER23> Hey, I'm totally down with that attitude.

My point is that if your DRM is going to be so minimal anyway, why bother? It doesn't seem like this approach is likely to convince very many people to buy the software who wouldn't otherwise, and it surely takes time and resources to set up and run.

<comment> c-oreills I think it plays on the psychology of concession. If you make me a concession then I'm more likely to do you a favour.

They're saying, "We've made DRM, but we don't want to inconvenience our paying users, so the DRM will be incredibly forgiving and infact can be easily circumvented by someone with little technical skill".

I think their potential customers would look at that and be more inclined to buy the games, because it appears they've been done more of a favour when a company cuts back on DRM, even at the expense of their potential income, as opposed to if they simply released the game for free.

</comment></comment></comment></comment><comment><USER24> They should just take all of this out and tout that they are DRM-free. If they trusted the user as they claim, they wouldn't feel like they needed to revert your refunded full game into a demo.

Lots of people would have no problem registering the game to "Sir Pantsy Higginbothom <firstname.lastname@example.com>" and then what good does their little name screen do?

If they always reset your registration count no questions asked, there is no point in even having that there.

It seems like they're trying to strike a balance but I just don't see the point. There's still extra hassle involved here, interestingly much of it is on the publisher himself, and there's no particular benefit for anyone. The publisher gains nothing from these measures because they are so easy to circumvent and they'll just creep out / bother users that registered the copy in their real name. Users gain nothing from these measures because they are almost not there and there's some slight intrusion made after buying 10 games. They don't add anything to the experience, unless you like your name flashing up as one of the intro credits.

So there's really no point to any of this. They should just rip it out and then they could put shiny "DRM-free" buttons all over.

<comment><USER9> You ignore the fact that the purpose of DRM is to minimize piracy, not prevent it completely.

if it introduced even a slight inconvenience in pirating the games it would probably already shave off a nice amount of pirating.

PS: Puppy Games is just one guy trying to make a living from his games, it's not really much of a "company".

<comment><USER25> Is it just one guy now? I know for a while it was at least two, possibly three.

Also, PuppyGames are the people responsible for LWJGL[1], which IMO is the best way to go for making games in Java.

[1] <http://www.lwjgl.org/>

<comment><USER9> AFAIK there is just one programmer, and he is on the LWJGL team but is by no means the only LWJGL developer.

There might be someone else working with him, I couldn't really find anything about it.

EDIT: apparently there are 2 people, Cas & Chaz:

[http://www.javagaming.org/index.php/topic,23005.msg190715.ht...](http://www.javagaming.org/index.php/topic,23005.msg190715.html#msg190715)

<comment><USER25> And in that thread he did confirm they only make $250/month, split two ways. That's sad. I bought their first game years ago (I forgot it's name, but it doesn't appear to be for sale anymore). It was really good.

<comment><USER8> Alien Flux. Thrice cursed. Mention it not.

<comment><USER26> Why?

<comment><USER8> Total failure of a product which did almost everything just exactly wrong. Wasted a year of my life on it before I realised it was a total flop.

<comment><USER9> Sounds like there are some lessons hidden in there...I personally would love hearing the story, a post-mortem of sorts :)

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER27> Sorry if I missed it in the long obfuscated explanation but why? Why bother with DRM at all? Esp ineffectual DRM like theirs.</comment>


Ask HN: How to integrate e-mail into an application - <AUTHOR>

By integrating, i'm referring for example à la Posterous, where a user can send an e-mail to Posterous which converts it into a post.
How is it being done? integration with e-mail servers? Custom daemon?
Inquiring mind wants to know. <comment><USER2> A simple, primitive way would be something like this:

\- connect to the stmp server of the service in question \- log in with your username/password (the server now verifies you have access; it's nothing interesting so far). \- in case one has access, the session is done as usual.

Up until this point, there's nothing else needed but a properly configured SMTP server which can authenticate against whatever database you have.

Past this point, the email would get transferred to a program, like procmail, which processes the e-mail. It digs out the contents, and whatever other meta- information it needs.

Then uses the service's API to post the message.

This is an easy way to do it, but it doesn't scale all that well. However, it's fairly simple, and can be used as a learning tool.

<comment><AUTHOR> nice, thanks</comment></comment>


TextCraft, Slack as old-school MUD client - <AUTHOR> https://textcraft.co/ <comment><USER2> A MUD thread!!

<comment>Time for my yearly MUD mystery call-out!<comment>

MUD fans, possibly only in the NW in the late 90s - did you ever play a MUD that had a _replica of Garfield High School in Seattle_ in it, complete with teachers, rooms, etc? I am desperately hoping it is archived somewhere!

</comment></comment></comment><comment><USER3> For those wanting to just look at a list of MUDs in a nice clean format, check out: [http://mudstats.com](http://mudstats.com)

It can be filtered by genre, players on now, max within last 30 days, etc. At this moment it says "There are currently 832 active MUDs listed."

It uses the Mud Server Status Protocol (MSSP) to get its information, which was created because: "MUD listings are often out dated and lack accurate information. Verifying that the one submitting a new MUD is a member of the MUD's administration can be quite tedious as well."

Also the sidebar at [http://www.reddit.com/r/mud](http://www.reddit.com/r/mud) has a lot of other MUD related links.

</comment><comment> azza-bazoo This is such an awesome, anachronistic mix of the shiny new and the internet of yore.

It's a shame MUDs expect you to be constantly interacting, I keep being slow and having them time out on me (then having to _;;reset_ to revive the session ...)

<comment><USER4> Social MU*s usually have a keepalive option that does some silent character exchange in the background with the client every so often to keep the connection open.

<comment><AUTHOR> Hmm, do you have a specific example? (Of the MUD and client?)

<comment><USER5> Parent is most likely referring to the telnet GOAHEAD character and its related SUPPRESS GOAHEAD protocol: [https://tools.ietf.org/html/rfc858](https://tools.ietf.org/html/rfc858)

I am the author of a MUD client for iOS[0] that, like most other clients, will capture and silently discard the GOAHEAD character. GOAHEAD is most common on MUSHes but I've seen them in a few MUDs as well.

[0] [https://itunes.apple.com/us/app/mudrammer-a-modern-mud- clien...](https://itunes.apple.com/us/app/mudrammer-a-modern-mud- client/id597157072?mt=8)

</comment></comment></comment></comment><comment><USER6> Damn. They didn't include MUME, one of the oldest active MUDs and based on LotR (and a game I've played for twenty years, in fact meeting my wife through that game): [http://www.mume.org](http://www.mume.org)

<comment> y-satellite Would also like to give some props to Discworld MUD, which served as both my introduction to MUDs and to the Discworld book series. Still hanging in there, and being actively developed, almost 25 years after it was founded. It sports one of the smartest command parsers I've encountered in any MUD.

<comment><AUTHOR> I added Discworld to TextCraft.

</comment></comment></comment><comment><USER7> I just logged in to the only living AberMUD I could find, and Moses is still logged in.

I don't know why, but this pleases me a great deal.

</comment><comment><USER8> Also [http://www.mudportal.com/](http://www.mudportal.com/)

<comment><USER9> Can't forget Mud Connector. They've been around since '94

[http://www.mudconnect.com](http://www.mudconnect.com)

<comment><AUTHOR> Great thanks. I'll add links to the homepage.

</comment></comment></comment><comment><USER10> Fun stuff. I definitely spent far too much time playing Revenge of the Jedi throughout high school and college it is a wonder I still graduated.

While I learned how to type faster in general by playing, my wpm for stuff like 'k boba' was off the charts.

</comment><comment><USER4> Thinking about it, I wonder if any MUD codebases have WebSockets support. It'd be interesting to see a full-featured client as a single web page.

<comment><USER11> I was recently considering writing a MUD-like multiplayer text adventure game in Clojure and Clojurescript that used RethinkDB change feeds over WebSockets (through the excellent sente library).

Not quite what you're asking for though.

Maybe if I get some time in the coming weeks I'll give it a shot.

<comment><USER4> >Not quite what you're asking for though.

WebSockets support, so that plain Javascript in a browser can connect to the server without having to wrap in node-webkit or use Java or whatever.

</comment></comment></comment><comment><USER12> Good memories... I still remember when I first connected to GenericMUD, back when it was run out of the pulmonary labs at UBC. AOD, you done good.

</comment><comment><USER13> Muddog/VargonMud forever.</comment>


College Isn't and Shouldn't Be the Best Years of Your Life - <AUTHOR> http://www.davidxia.com/2012/01/college-isnt-and-shouldnt-be-the-best-years-of-your-life/

<comment><USER2> I'm in college, and it's been the best two years of my life. While I'm excited for what my future holds, there's something appealing about the little responsibility students have.

I took last semester off to work with a startup in SF, and it was an amazing experience. It taught me that I should in fact cherish my time at school because of the little responsibility we really do have on campus.

</comment><comment><USER3> It is the best years of your life. Why? It's the easiest time to make friends and meet women your own age. You can do this later in life, but it's more difficult because everyone is doing their own thing.</comment>


Android Splintering? - <AUTHOR> http://www.tbray.org/ongoing/When/200x/2009/11/20/Android-Splintering

<comment><USER2> _If you're using elaborately graphical screens you could do that in such a way as to be broken by a different screen shape, but it seems to me that with just a little work you can keep that from happening.

Oh, and the executable file format is Dalvik bytecodes; independent of the underlying hardware._

That's pretty much the reality of J2ME too, and that's not worked out too well according to what I've heard.</comment>


How Nokia benefited from going Windows Phone vs Android - <AUTHOR> http://wmpoweruser.com/how-nokia-benefited-from-going-windows-phone-vs-android

<comment><USER2> Oh man, here is a passage from the Forbes article they cite:

"Nokia's faith in Windows Phone seems to be paying off for now. The company continues to not only dominate the Windows Phone market but also take away market share from rivals such as Samsung and HTC, according to a recently released report by AdDuplex. The usage stats for April show that Nokia has increased its share of the Windows Phone market to 80%, up from about 78% a month ago."

I suppose I should take pride in the fact I'm the most handsome man in my car most days.

</comment><comment><USER2> Wow. I want some of what they are smoking.

Had Nokia mixed their ecosystem in with Google's at an earlier stage of the development of Android, Nokia might well be where Samsung is now, or have a big slice of that pie.

It is galling to read justifications like "Nokia does not have Samsung's vertical integration" when the reason is parts of that had to be thrown overboard to prevent collapse. Nokia still has more software capability than Samsung.

Android scales down to low-end hardware pretty well, and Nokia would have had a successor to S40, too. When the S40 business gets hit by the onslaught of very inexpensive Androids from China, the game is pretty much up for Nokia.

Nokia started from a position of commanding, unassailable dominance. Analysts called Nokia "Tier Zero" of the mobile device business. The platform may have been burning, but the result of subsequent decisions has been that it has become a charred remnant.

</comment><comment><USER3> More shrill desperation. The floor's huddled ears behind the closed door chews their forefinger tittering over Steve's vitriolic expletives and .... yes! There it it is! Throwing and breaking things!</comment>


The Management Engine: an attack on computer users' freedom - <AUTHOR> https://www.fsf.org/blogs/sysadmin/the-management-engine-an-attack-on-computer-users-freedom <comment><USER2> I just found this note that suggests the AMD PSP (ME equivalent) can be disabled, officially, and not as a hack:

[https://www.phoronix.com/scan.php?page=news_item&px=AMD- PSP-...](https://www.phoronix.com/scan.php?page=news_item&px=AMD-PSP-Disable- Option)

If so, AMD is looking relatively good compared to Intel these days. Can't say I'd mind some more competition.

</comment><comment><USER3> It attacks the users' freedom? Good! The owner of the computer should be in ultimate control, not the user. Buy your own computer if you don't like it.

<comment><USER4> not sure if this is sarcasm but even if you buy your own it comes with IME

<comment><USER3> So? After you buy the machine, you can choose your own password for the Management Engine, and also disable the remote configuration. The owner has ultimate control of the machine, but the user (for example, an employee, a student, or some random jerk at a public library) does not. That's how it should be, but the article rails against it.</comment></comment></comment>


Someone found a way to bypass Windows 7 Extended Security Updates checks - <AUTHOR> https://www.ghacks.net/2019/12/07/someone-found-a-way-to-bypass-windows-7-extended-security-updates-checks/ <comment><USER2> I'm one of those users holding on to Windows 7 as long as possible, and I'm really glad that people are also interested and motivated to keep it running for as long as possible.

But I recently got a new laptop, a Ryzen 3550H with the Vega 8 iGPU, and then had to discover, that a) there aren't any drivers for Vega 8 for Windows 7 and b) my laptop's firmware doesn't provide any legacy BIOS emulation required to get Windows 7 running (explicitly: INT10H and VBIOS are required by the fallback Windows 7 graphics driver (VGA.sys), which also runs during setup and PE [0]).

I'm glad I recently still got Windows 7 onto desktop, 2nd-gen Ryzen platforms, but I fear that that was one of the last modern PC platforms to be able to run Windows 7.

My new laptop now has Windows 10, because I'm currently developing some windows applications, but once I'm done with that, it's over to Linux.

This was my first own PC with Windows 10, and I thought I might have a change of heart, but it's truly quite terrible. Subjectively, it doesn't feel like a PC with an OS anymore, more like an advanced XBOX with mouse and keyboard.

[0]: [http://reboot.pro/topic/21108-install-windows-7-at-uefi- grap...](http://reboot.pro/topic/21108-install-windows-7-at-uefi-graphics- output-protocol-gop-hardware/)

EDIT: ...but if anyone finds out how to get Windows 7's VGA.sys working with GOP or knows a 3rd party alternative to it, I'm all ears!

<comment><USER3> I love 10 (as far as Windows goes). 8 was a flop, but in my opinion 10 is a slam-dunk. It is to 7 what 7 was to XP. Other than the annoying thing where your profile has to be tied to an online account, I don't understand why anyone is still holding out.

<comment><USER2> I read about the tying to an online account, and also read that keeping the PC offline while installing is a useful remedy.

Which I did, so at least my Windows 10 installation is a "local" installation.

But when you stop to think about it: Are we living in a sane world, when I have to "fool" my PC/OS in order to get it to act in a certain kind of way? That, in a nutshell, is my biggest gripe with Windows 10. I have no problems with _the defaults_ being made to accustom the computer illiterate, but you should allow power users to do whatever they want to a their PCs, and this is what MS doesn't allow (anymore, or at least, not in ways that they previously allowed).

Since you asked, the following may be a bit non-conformant to HN standards, so I'll set it in quotes, it's my post/rant on FB venting my initial frustrations with Windows 10: ""Why does less information fit on my laptop despite it having the same resolution as my desktop? OMFG, who the fuck resetted my display scaling?"

"Oh, defaulting to 'public network' is nice. Finally, some common sense. Let's check out the firewall... _every Microsoft app has an exception_ ...well, I'll retract that again. Also, every app I installed now has an exception on public and not on private, so I have to not only add the exception on private, but remove it on public too. At least Windows 7 asked me each time, so this shit wouldn't happen. Wooo! More grinding. Thanks, Bill!"

"Can I add shortcuts to the start menu? NOPE! THIS IS NOW OUR ADVERTISING SPACE!"

"My computer on the desktop, I need that. Where is that option? _Looks, looks, looks and gives up_ Fine then, I'll just create a shortcut if there's no 'real' 'My Computer' for the desktop. It kinda works (but no 'Manage' option on right-click, since it's a user shortcut, not a system one). But it feels like a step back. Why did MS remove 'My Computer'? Oh, because USE THE FUCKING CLOUD YOU MORON! MANAGING YOUR OWN DATA IS SO 1998! WHY WOULD YOU NEED ANYTHING OTHER THAN ONEDRIVE (which is preinstalled, but fortunately still, uninstallable)?"

If Windows 10 would behave like Windows 7 with the extra features (newer UI, UEFI, that stuff), I would've welcomed it, hell, with the company I wouldn't even bat an eye to pay for retail copies. But no, they didn't decide to do a new Windows, they decided to turn your PC into an advanced XBOX. Fuck you! Stop being so DISRUPTIVE TECHONOLOGY and just create good operating systems, FFS. But it's too late now.

And so it goes."

<comment><USER4> > "My computer on the desktop, I need that. Where is that option? _Looks, > looks, looks and gives up_.

One of the biggest problems with Windows 10 is the dual nature of Settings vs. Control Panel which has made simple things like this that aren't directly on the new interface yet much harder to find.

To get My Computer back on the desktop:

\- Right-click on Desktop and select Personalize

\- Click Theme on the left

\- Scroll down past pretty much everything to "Related Settings"

\- Click the "Desktop icon settings" text

\- Tick "Computer"

<comment><USER5> The dual Settings and Control Panel interfaces is such a stupid problem.

Microsoft should not have introduced Settings until it was ready to move over _all_ first party functionality.

Having one control panel with outdated visuals is much better than having two separate control panels (one of which _still_ has outdated visuals).

<comment><USER4> It's not even split like "normal settings" vs. "power user", which would at least make a small amount of sense. e.g. Mouse pointer speed isn't in the new Settings yet.

</comment></comment></comment></comment></comment></comment><comment><USER6> Long time lurker here, but I had to create an account to voice my opinion:

I am a really happy Windows 10 user! Please, don't judge what others (dis)like and make sweeping generalizations.

Many of the issues you mentioned can be addressed (even if imperfectly by your standard). For example, you can pause updates for over a month, then when that time is up, pause again right away. I always get to choose when my computers update.

And Windows 10 comes with many improvements over Windows 7. [0][1] Some highlights for me:

\- Full boot in under 10 seconds (with an SSD)

\- Dark theme

\- Windows Sandbox (to run un-trusted/one-off apps in a light VM)

\- Multiple desktops

\- Support for new hardware innovations: NVMe, High DPI, HDR, Raytracing

But it is fine if you don't consider these improvements as important enough over the cons of Windows 10. Just don't pretend that they don't exist.

[0]: [https://en.wikipedia.org/wiki/Features_new_to_Windows_8](https://en.wikipedia.org/wiki/Features_new_to_Windows_8)

[1]: [https://en.wikipedia.org/wiki/Features_new_to_Windows_10](https://en.wikipedia.org/wiki/Features_new_to_Windows_10)

<comment><USER7> > \- Full boot in under 10 seconds (with an SSD)

And then 45 minutes of updates: 15 in the foreground, and then 30 in the background, during which the laptop is still basically unusable (it can take up to 2 minutes for a CTRL-ALT-DEL to come into effect...) despite pretending to be active. Great.

<comment><USER2> Also, that's hardly a feature of Windows 10, more of your SSD and UEFI, as well as the fact that the Windows 10 default doesn't really shutdown anymore, it's now actually a form of hibernation: [https://www.howtogeek.com/349114/shutting-down-doesnt- fully-...](https://www.howtogeek.com/349114/shutting-down-doesnt-fully-shut- down-windows-10-but-restarting-it-does/)

Also, FWIW, I've a laptop with Win7 and an mSATA SSD, booting in legacy BIOS mode with the "No GUI boot" option, and it's there in 10 seconds, too.

</comment></comment></comment><comment><USER8> Ugh. One thing that drives me nuts is the fact that Microsoft makes it very difficult to use drivers written for the previous release on the new release.

I remember Windows 3.1 ".386" drivers that weren't compatible with Windows 95 that introduced ".VXD" drivers compatible up to Windows ME.

I remember NT 4 drivers becoming incompatible with XP that introduced WDM. XP drivers stopped being compatible with Vista that introduced WDF architecture for drivers. If I recall correctly, it should still be possible to run pre-WDF NT drivers on Vista.

However, every single release starting with Vista uses the same WDF driver architecture. I am puzzled why can't I use Vista drivers on Windows 10 without resorting to hacks.

That is my biggest problem with Microsoft - unless the vendor elects to re- release code flagging the new release as supported, my hardware effectively is tied to Windows life span.

</comment><comment><USER9> It's weird that Microsoft appears incapable of implement a server-side check that blocks you unless you are eligible to receive paid upgrades.

<comment><USER10> I think this only bypasses the "check" on software compatibility and the like, and then only for the test update that was released for free. You're still required to pay or you won't actually get those future updates from M$.

</comment></comment><comment><USER11> On my iPhone this page reloads a couple of times per second and is impossible to scroll or read.

</comment><comment><USER12> Windows 7 is older than Windows XP was when 7 was released. Think about that.

<comment><USER13> And if WinXP had support for DX11 and more than 4GB of RAM, I'd gladly stay on it.

Software shouldn't be developed for development's sake.

<comment><USER14> And improved filesystem support and an improved CPU scheduler and a redesigned security model and a new network stack and an accelerated compositor for larger/faster displays to work and DPI awareness and proper support for SSDs and UEFI boot and...

Point being by the time you actually make XP into something modern it turns into the thing you think you hate.

<comment><USER15> He probably meant the interface. If it was Windows XP with the same interface and the same functionality, but with those added low-level features you mentioned, it would be a great hit of an OS today.

<comment><USER16> remember when search actually worked? Miss that dog...</comment></comment></comment></comment></comment>


The Craft of Text Editing: Emacs for the Modern World (1999) - <AUTHOR> http://www.finseth.com/craft/index.html <comment><USER2> This might be more accurately titled "The Craft of Making Text Editors." It is mostly not about Emacs, rather about more abstract ideas around user interface (see the quaint Joystick section) and text editing:

> This model is the basic two-dimensional form. Instead of editing a line, the > user is editing in a quarter-plane, with the origin usually in the upper- > left corner. Conceptually, the user can move freely in the two-dimensional > quadrant. In practice, the editor usually only stores the non-blank > portions, as storing an infinite-quadrant's worth of data can be > prohibitively expensive. Some systems may impose fixed upper bounds on the > width or length of the quadrant.

Sure, that's fine I guess, but this doesn't help me understand how to use or program Emacs. And most of the code is in C, not Elisp.

<comment><USER3> As I recall, most of the work Craig did on this book was from the early-to-mid 1980s, before GNU Emacs (or at least before it became popular). In fact, I believe it grew out of his B.S. thesis, written in 1980.

Anyway, not every programmable editor is programmed in Elisp.

</comment></comment><comment><USER4> After having used Emacs exclusively at work for a few years, I am in the process of switching to Sublime Text full time. ST delivers solidly on the excellent concepts that Emacs helped pioneer, including multiple cursors and using generic text buffers for every task. Plus it made the smart move of making ido-mode built-in (and improving its algorithm greatly in my experience).

<comment><USER5> What is a text buffer? I use Sublime exclusively and I never "got" emacs and I just assumed it had something to do with me not knowing what text buffers are and where to access them in emacs.

<comment><USER6> Emacs has a bunch of jargon that takes some getting used to.

A buffer is a file opened in the editor. The cursor is called the point, the text selection is called the region and is the text between mark and point. You open files by "finding" them. A pane in the editor is called a window.

Cut is called kill, paste is called yank, and there is no single simple jargon for copy - it's killing without deleting the text.

<comment><USER7> A buffer doesn't have to correspond to a file, e.g. "built-in" stuff like _Messages_ or _Help_ or _scratch_. I often "C-x b asdlkfj RET" to create a new "scratch" buffer for quickly jotting down something or transforming something. I can of course save that buffer to file, or I can just kill it.

When coding elisp, you often use the (with-temp-buffer …) macro to do more or less the same thing :-)

Also, several buffers can correspond to one file: "C-x 4 c" runs clone- indirect-buffer-other-window which creates two views on one and the same file. This is not the same as splitting the window: The two buffers can each have their own, different narrowings applied. Say you have two functions defined in one file, they're almost the same, so you want to compare them. Now, clone the buffer, narrow the first buffer to the first function, the second to the second, and now you can run ediff on the two buffers :-) Or you can even open the same file in different major modes at the same time …

</comment></comment></comment></comment><comment><USER8> I read this book in college and was captivated. Not terribly long, but fascinating for learning how the insides of our tools work (or could work better).</comment>


'PUBG' developer plans three month sprint to 'fix the game' - <AUTHOR> https://www.engadget.com/2018/08/08/pubg-developer-three-month-fix-game/ <comment><AUTHOR> As a developer and business owner, there are some interesting lessons to be gleaned from this story:

1) long time incumbent has its lunch eaten by exciting new product

2) publicizing a release date to hold the product and team to a fixed time window ( no slips.. or at least the public backlash on it would be fairly loud )

3) yet, incumbent has a passionate and die hard fan base(users) and supporters that want to see it succeed even in the face of a better(?) product. lots of good will built up here, but will it be enough to see it through this 'fix everything sprint'

interesting to see where this goes. Fortnite certainly seems to have won all the attention and glamour as the new kid on the block, and seems pretty solidly entrenched now. They might not be entirely the same game, but there's no question they're often compared and contrasted heavily. It couldn't have felt great for the PUBG team when Fortnite's battle royale mode launched and exploded. Good luck to the team on trying to retake the market!

<comment><USER2> while they obviously have a lot in common i think fortnite is a game for a younger audience while pubg is better suited to die hard FPS players

</comment></comment><comment><USER2> aka, now that the crate and key system has been built (=revenue) we can get back to the game!</comment>


Are You a Sociopath? - <AUTHOR> http://bigthink.com/devil-in-the-data/are-you-a-sociopath

<comment><USER2> No, but again, sociopathy is currently more an insult than a clearly defined "disorder".

</comment><comment><USER3> nice TED video on this topic by Jon Ronson: Strange answers to the psychopath test : [http://www.youtube.com/watch?v=xYemnKEKx0c](http://www.youtube.com/watch?v=xYemnKEKx0c)</comment>


Scroll Anchoring in Firefox 66 - <AUTHOR> https://hacks.mozilla.org/2019/03/scroll-anchoring-in-firefox-66/ <comment><USER2> It doesn't sound like it from the article, but I wish other scrollbar misbehavior was included in this work. Scroll wheels and touch are not the only way people scroll! I wish they would also work on the broken scrollbar behavior when content is added to page while the scrollbar handle is being dragged. For example, pages which append new batches of content as you approach the bottom.

The symptom is that it treats the scrollbar position as a ratio of page length, and as the page length changes, the viewport is suddenly warped to a new position at the same ratio of the new page size. To fix this, I think it should continue to use the old page length to calculate scroll position until you release the drag. You won't always be able to scroll past the previous end of page in one movement, but the content visible in the viewport should remain coherently related to your drag motions.

I recognize that something has to be made inconsistent in the ratio-based scrollbar UX if the page length changes. I think having the scrollbar handle jump away from the mouse cursor on drag-release would be much less annoying than having the viewport jump around on each DOM edit. You can continue reading what you were reading and only be distracted when you need to go find the handle again to scroll further down, much like if you accidentally let your mouse drift out of the scrollbar and then released the drag.

<comment><USER3> Indeed; they made tabs work similarly a long time ago (tabs do not resize when you close a tab until you move your mouse away) and this made closing tabs so much better. Infinite scrolling on sites is so painful when using the scrollbar.

</comment></comment><comment><USER4> I always wanted this. Kudos to the Firefox team.

</comment><comment><USER5> When will they fix the PgDown/PgUp button with sites that have those annoying high-z-index menu and sharing bars?

</comment><comment><USER6> All great, but won't sites with ads simply opt out, effectively defeating the point of this feature?

<comment><USER7> There isn't really an incentive to opt out. The constant referencing of ads is a bit misleading. It's just that ads happen to very often be the slowest loading content on the page, which causes lots of annoying reflows. Really it's any image, video, or any kind of embedded element whose size is not known during the initial page render. Ads just happen to be a serial offender for this, because they are typically served by 3rd party networks, so the page cannot reserve a particular bounding box as is usually done with images.

It's not that sites are intentionally scrolling ads into view. In the rare cases where they do that, scroll anchoring won't make any difference anyway. Usually what happens is that the content just changes position randomly, whether or not the ad is even within the viewport.

<comment><USER8> The weird thing is it used to be less of a problem, because people used the damned height and width attributes in the img element. So the browser could calculate the dimensions before and lay the document out correctly before the slow loading images came in.

Now people largely ignore them, use publishing tools that don't bother, and dynamically build pages with garbage scripts instead of having a sane document already marked up.

</comment></comment></comment><comment> black-tea I've wanted this to be a thing for about 20 years! Back then I didn't understand how it could be so difficult. Well, I guess I still don't. But I'm glad it's finally happening in my lifetime.

</comment><comment> alok-g This is great! Pages usually jump up and down multiple times.

I need one more thing. Prevent the same jump up/down behavior when using infinite scoll. E.g. if you use scoll bar to scroll down, new content apprearing changes the page height, making the scroll bar recalculate its position, and the whole thing jumps.

Likewise, when I press the browser back button tp go back to the page with infinite scroll, it is only hard to find the point on that oage where I was.

</comment><comment><USER9> I think I'd rather prefer not having the opt-out option. Although ultimately I feel like if you're malicious enough, you can fool the algorithm to produce the behaviour that you're looking for.

Good work nonetheless.

<comment><USER10> The need/audience for the opt-out option is for websites with legit behavior that is broken by the guesswork involved in scroll anchoring implementations. If a site wants to be "malicious" towards their users, there are myriad ways to do that already.

</comment></comment><comment><USER11> >Have you ever had this experience before?

No because I use ad blockers religiously.</comment>


Ask HN: Best practices for importing in mass from a REST api/cloud service? - <AUTHOR> <comment><USER2> Respect the rate limit. :)</comment>


When Non-Scientists Contribute: To "Science", or to "Paywall Science"? - <AUTHOR> http://thinkinghard.com/blog/DontContributeToPaywallScience.html <comment><USER2> > In some cases, members of the general public may think they are contributing > to "Science", but actually they are contributing more specifically to > "Paywall Science".

There are other options:

1) contributing to corporate science, which never gets published outside of internal journals but may end up influence what the company does.

2) the not-for-profit equivalent of 'corporate science'

3) contributing to "file drawer" science, of work which isn't novel enough for a journal to accept

For an example of all three, consider when the general public contributes information about dietary habits, where the company/not-for-profit decides to not promote X as a dietary aid because it doesn't seem to do anything, and where no journal would publish it because negative results are boring.

> In all these cases, I think that those people contributing to Science would > not be happy if they realized up-front that their contributions are actually > supporting Paywall Science.

No, I don't think that's the case. Plenty of people do exactly that. Look at all the people who send their DNA samples in to for-profit sequence companies, who publish some of the results but who also turn around and sell aggregated information to others.

Look at those who contribute their body to science, where it might be used to train doctors rather than produce publishable papers.

Look at those who volunteer for drug trials for for-profit industries.

> Are donations to scientific charities tax-deductible if those donations are > used to support the creation of Paywall Science?

Some scientific organizations have a mailing list or a publication for members only. One is 'Chemical & Engineering News'. These publications can include scientifically useful information. I can point to papers which cite C&EN, for example, even though it's not a traditional peer reviewed source.

Do these sort of newsletters count as 'Paywall Science'? If so, should they be eliminated? If not, why not?</comment>


A Hidden Cost of Javascript [updated] - <AUTHOR> http://carlos.bueno.org/2010/02/measuring-javascript-parse-and-load.html?v=2

<comment><USER2> JS loading is slow in FF, but the real killer is anything DOM related. On large pages this is measured in seconds not milliseconds. The worst part is that it scales non-linearly with # of DOM nodes on the page, # of DOM nodes loaded in other tabs in FF, how long it's been running and who knows what else.

The longer FF works on improvements on benchmarks on which it is already fast, the more market share Chrome will take by making fast things that actually matter.

<comment><USER3> I agree 100% and have been complaining about exactly this for a long time (e.g. <http://news.ycombinator.com/item?id=325742>). The fact that IE is the whipping-boy of the web community has caused Firefox to get more of a free ride than it deserves. That will eventually change.

</comment></comment><comment><USER4> Sorta looks to me to confirm something we already knew, V8 blows everything else away.

</comment><comment><AUTHOR> The exact versions of the browsers are available when you mouse over the column headers.

</comment><comment><USER5> Chrome is exceptionally fast, apparently.

<comment><AUTHOR> It does appear fast, but I'm withholding judgement. I'm not certain if it's doing caching tricks or whether their parser really is 10x faster. It certainly is CPU-bound, which is as good as it gets, and it's more stable in terms of memory use.

See this graph: <http://carlos.bueno.org/images/chrome-cliff.png>

</comment></comment><comment><USER6> Some really nice timing graphs at the end there.

</comment><comment><USER7> It's notable how little FF improved between 3.5 and 3.6.

<comment><USER8> The big improvements in JS performance in 3.6 were in regex, GC, and tracing.

Edit: details at [http://hacks.mozilla.org/2010/01/javascript-speedups-in- fire...](http://hacks.mozilla.org/2010/01/javascript-speedups-in-firefox-3-6/)</comment></comment>