Twitter: A Clusterfuck of UI Mistakes - <AUTHOR> http://ivanca.tumblr.com/post/150243684283/twitter-is-a-clusterfuck-of-ui-mistakes <comment><USER2> The worst part about Twitter is finding context for tweets.

It happens so often that I'll stumble across a snarky response, want to know what that was about, but I just can't find a way to find the original tweet that this was obviously a response too. Sometimes clicking a tweet works, sometimes you can scroll up, but often that just doesn't work. Then I click on all the people who are mentioned in the tweet, try to find the context, see that they must have tweeted hundreds of tweets since then, and then I give up...

<comment><USER3> Click on the date. It'll reveal the thread.

Who doesn't love a discoverable UI, right?

</comment></comment><comment><USER4> Facebook's UI is really bad too. If someone links to an image it loads the page with the image, then a second or so later loads the same image in a modal. And if you try to click the image make it bigger it might just close the modal (that's not yet loaded) and take you to the person's timeline.

<comment><USER5> Certainly, Facebook has UI problems but I think there's more going on here.

The thing about the Twitter UI isn't just that it's awkward or ugly but that it makes the platform itself itself bad - bad as in making-the-world-a-worse- place bad.

When people can't ignore references to themselves, when they can only reply with short retorts, it turns Twitter into the shallow, ugly, uncivil platform that it currently is.

<comment><USER6> Or you just make a funny joke and get bored of getting 'lol,' reply notifications you reconsider making such awesome content

</comment></comment></comment><comment><USER7> I have tried to read Twitter a couple of times, but I fail every time and I stopped. For example I'd go to the page of someone like Neil deGrasse Tyson or Richard Dawkins to see what they post, but I see heaps of retweets and answers and general noise and chit-chat totally out of any context. I'd like to see the original tweets by them, but it seems there's no such functionality. Or to sort them by "popularity" or date or something. Nope, can't be done.

<comment><USER8> > Neil deGrasse Tyson or Richard Dawkins

Twitter actually ruined my opinion on these individuals.

Neil deGrasse Tyson writing smug bitchy tweets about slight inaccuracies in Hollywood sci-fi movies. Painted him in an entirely different light to me

Richard Dawkins tweet after tweet of him just arguing with stupid trolls, you're supposed to be a respected academic yet here you are wrestling pigs in the mud because for some reason you feel you have to win every argument.

<comment><USER9> > Richard Dawkins tweet after tweet of him just arguing with stupid trolls, > you're supposed to be a respected academic yet here you are wrestling pigs > in the mud because for some reason you feel you have to win every argument.

The world is full of "stupid trolls". If you ignore them bizarre things would happen like people starting to believe AGAIN that the world is flat.

<comment><USER10> I think that there are enough of internet warriors that someone like Dawkins doesn't have to involve in those arguments.

Also making someone change his mind on the internet most of the times is close to impossible, so it's usually pointless.

<comment><USER9> It's not only that. People making searches can end up finding those tweets. If the only thing that they see is the wrong statement of trolls, they can think that those statements are true. On internet, repetition is assumed as real so if only the wrong things are repeated, then people will accept them as truth.

</comment></comment></comment></comment></comment><comment><USER11> One of the worst bugs with twitter webpage is this. When scrolling down to check overnight tweets on the timeline, and when you have scrolled hundreds of them and you click a regular tweet or a quoted tweet to check responses etc (thankfully quoted tweet opens as a popup lately; it used to open a different page earlier causing pissed_level++) and dismiss the popup, the feed is scrolled back up to the top, and to add to the misery, the tweets in the waiting will be expanded too. You would have to be a regular user of twitter in order to make sense of this and/or empathize.

<comment><USER12> I don't think this is a bug. In the endless quest for eyeballs, they must keep your attention trained on the latest thing. Long attention spans lead to reading articles offsite, and that would reduce eyeball capture...

Am I being too cynical here?

<comment><USER13> It probably begins as a bug, but left it there by the reasons you mentioned. Or saw it as good enough and doesn't care about users who wants to know more than what happened in the last day/week/month.

</comment></comment></comment><comment><USER14> What I don't understand is, how is it possible to have so many widely known designers working for them but have no impact on the core product used by the majority of the users, it's really baffling to me. Anyone care to shed some light?

<comment><USER15> This - I often wonder what they hell they are doing all day. Maybe when they first joined they thought they could change things and did solid work, but after it becomes clear that no one is going to change anything, do you just using your time for freelance work?

</comment></comment><comment><USER16> Another thing I am very confused by is that there is no preview for a tweet. If I wanted to upload a picture, it's unclear how big the pic will appear. Many times I will upload a picture, then post it and see that it's MASSIVE and then immediately delete the tweet. I guess nobody uses the web interface to twitter?

<comment><USER17> That's OK, because the web interface resizes everything to the same size. It's unreasonably hard to click through to a fullscreen "just the jpg ma'am" view.

<comment><USER16> Are you saying the web interface resizes all images to the same size? It doesn't, that's my point.

<comment><USER17> The web interface for reading tweets puts everything in "cards", so regardless of the size when you uploaded it it gets resized into the card on display. Unless you right-click-view-image.

(Just realised - do you mean size in bytes or size in pixels?)

</comment></comment></comment></comment><comment><USER3> Twitter's UI is quite good in fact; it does a solid job of supporting the site's core design purpose as a mostly write-only platform for achieving and sustaining Internet celebrity. I don't really understand what all the fuss is about.

<comment><USER18> I'd argue that you'd call any UI "quite good" after getting used to them. I remember that my first steps with Twitter feel terrible and actually that is sometimes still in the case after browsing it for a longer while.

<comment><USER3> That's kind of the joke. It's not sold as being a megaphone, but when you try to actually use it, you discover that's the only thing it manages not to be terrible at.

</comment></comment></comment><comment><USER19> I wonder if this is a consequence of the modern, "user-story-driven" style of UI development.

I'd claim that, back then, when UI design was considered less important, most UIs were either essentially random - or organized around the manipulation of "virtual objects" that conveniently mapped to the underlying data structures. (Files and folders, emails, DB entities, ...)

Some of that resulted in you getting a sort of UI consistency "for free", simply because the data structure had to be consistent. So you'd offer the "natural" actions for an object to the user (mostly CRUD) without thinking much which use-cases these actions were fulfilling.

In contrast, modern UI design seems to be driven less by abstractions and more by a priority-ordered list of individual use-cases. One consequence of this is that certain features can be missing even though you'd reasonable expect then to be there - because the use-case wasn't decided to be important enough.

</comment><comment><USER20> The biggest UI flaw for me is the picture view on the mobile Twitter-page.

They decided to replace the normal .jpg-link with a custom page, but this custom page is auto-fitted to the screen-width, meaning that you cannot actually zoom in on the picture.

<comment><USER21> I'm not sure you can even do that on desktop Twitter: if you can, I've never found a way to do so. I always end up right-clicking 'Open in new tab' instead.

<comment><USER22> Yes, this is very annoying indeed. Especially if people post comics or images with lots of detail: there's no way to get the full picture. The only way i know is right clicking and selecting 'open image in new tab', which is a hack.

</comment></comment></comment><comment><USER22> If you think the general UI of Twitter is awful, try using it as a media organisation. There's no easy way to share a single account with sharing a password as well, leading to people hijacking the account. Uploading videos is painfully slow, especially if you're used to the speed of YouTube and Facebook. The 'analytics' Twitter provides for videos is a joke: it doesn't show you the tweet attached to your video, so you only get a thumbnail and the name of your account. No way to filter or sort that list as well though.

I think many companies would happily fork over $100 per month to Twitter to have a 'media dashboard' that is as easy to use as the one from Facebook.

<comment><USER23> Have you tried tweetdeck ([http://tweetdeck.twitter.com](http://tweetdeck.twitter.com))? It allows to share an account without disclosing its password.

<comment><USER22> Yeah, i know Tweetdeck does that. But then everyone needs to use Tweetdeck, which doesn't have apps on mobile.

</comment></comment></comment><comment><USER24> Twitter's UI is not just annoying, but it makes it difficult for users to onboard. Most new users are at conferences, watch TV shows, etc... and want to follow a hashtag and see it live.

Now... what is a good way for a new user to do this without overload? I haven't found a good way to explain this without using Tweetdeck and even then it often feels like a terminal command gone loose.

</comment><comment><USER25> Yup, that's why I don't use twitter much. With a 3-character user handle I get a constant stream of totally unrelated mentions from all over the world. Mostly it's users not understanding the difference between @ and # or not getting that usernames on twitter can't have spaces, e.g. @Bob Smith will reach @bob, @bob_smith will never see the tweet.

</comment><comment> martin-adams Recently I found out the harsh effect of this missing feature. I tweeted a quick video showing a defective product to a retailer. Several moments later I saw I had 50 notifications and it didn't stop.

I was the target for online bullying and abuse, notably because those people appear to be haters of the retailer. How effective this was is actually quite fascinating.

I had to go through each notification and block each account that interacted. I even deleted the original tweet, and those they picked on I previously sent.

This was a classic case of bullying, but I do feel the tools were definitely lacking to mute it.

<comment><USER26> People don't realize how it looks on the receiving end. A person @ name searching you will only see tweets, then add on to the flood with "well it's only a few tweets, how is this harassment?". They don't see the flood of retweet/favorite notifications from those mentions.

I had this happen not too long ago when a comedian misunderstood something I said and went on a very public rant at me: [https://medium.com/@RileyKyeden/jen-kirkman-is-your- problema...](https://medium.com/@RileyKyeden/jen-kirkman-is-your-problematic- fave-807e7eefa668)

It was only a few tweets, but it produced hundreds of notifications from the original tweets, replies to quote retweets[1] (and favorite/retweet notifications on those), and replies from other famous people whose feeds are watched closely by fans.

[1] [https://twitter.com/twitter/status/742749353689780224](https://twitter.com/twitter/status/742749353689780224)

<comment> martin-adams Yep, I can totally emphasise what you went though and it's very hard to put under control.

</comment></comment></comment><comment><USER27> > This is probably the most embarrassing feature missing on twitter, meaning > the inability to click a notification and hide it

What would you do with ad? Probably hide it as so would do 95% of other twitter users? Sure, this would be sane behavior for me and a vast majority, but not good for the twitter sales department which is likely to have a hard time anyway.

<comment><USER28> that has nothing to do with what is discussed.

Person with 100k followers accidentally @mentions you. For the next month, your notifications tab will be filled with people retweeting and replying to that tweet. And then random notifications every couple weeks for years related to that tweet.

This has nothing to do with ads.

</comment></comment><comment><USER29> Twitter has also recently started going to greater lengths to lock up images, videos and other media. It used to be easy to download them, now it's next to impossible on mobile and a hassle on desktop.

</comment><comment><USER30> Yep, I have quite a common name, and my twitter handle is my full name. I grabbed this in 2007, so not too early but early enough.

Quite often I get mismentioned, and sometimes if someone big mentions me, Tweetdeck breaks :(.

</comment><comment><USER31> Twitter has had a serious UX problem for ages. I would love to really understand how their UX team functions and the chain of command that led to such a very bad experience.

</comment><comment><USER32> This is what happens when the user is not the customer.

</comment><comment><USER33> It's not just an issue with Twitter. Every time someone visits Canada's Wonderland I get tagged in an Instagram photo.

</comment><comment><USER34> What's the difference between @foo and #foo? Enough said.

<comment><USER35> @foo refers to a user and #foo to a topic. What's the problem?

<comment><USER36> Seems the problem might be a lack of understanding that @ and # are two different characters that might have different meanings.

Kind of like how + and - have different meanings, complete opposites actually, but people just get them confused all the time.

</comment></comment></comment><comment><USER37> Why is twitter still a thing?

It adds no value to my life and is basically a glorified gossip rag at this point.

</comment><comment><USER38> I am in opposite thinking, that they have great UI, but sure everything can be improved

<comment><USER39> "Hello green username."

</comment></comment><comment><USER40> So are UIs of Reddit, Facebook, Craigslist, Amazon, ... a bad, usable UI that people are used to > an academic good UI, that nobody understands/uses.

Ranting about bad UIs reminds me a bit of ranting about tabloids. They are obviously bad, and nobody reads them if asked, but that does not change the fact that they are very popular.

(Please don't use bad UIs as a template if you start fresh, minimalistic is OK)

<comment><USER41> Twitter has way worse UI than Reddit or Amazon. It's flashy and barely functional, as opposed to crude but extremely functional. Whereas reddit pages load instantly, any Twitter page is a 10 megabytes-sized blob of Javascript that slows your browser to a crawl.

<comment><USER42> Reddit is working hard to catch up to Twitter. Have you tried their new mobile site? It's the worst user experience I've encountered in quite a while.

When I go to any page on the site, I get a blank page with an alien in the middle. Quite some time later, the content actually loads. If I tap a link and then go back, it goes through this all over again - and then it doesn't go back to the same scroll position but some arbitrary place.

Finally I found a menu option that let me get the desktop Reddit site. I kept trying Chrome's "Request desktop site" but it didn't work. Turned out I had to use a setting in the Reddit mobile site's own menu for this.

The desktop site is a huge improvement, but with major flaws of its own. The font sizing on mobile is fairly ridiculous - huge page titles and minuscule comment/etc. links - but at least the pages load fast and it behaves like a normal website.

What in the world are they thinking with this new mobile site? If they only fixed up the font sizing in the desktop site it would be perfectly usable on mobile - and _much_ better than their mobile version.

<comment><USER43> Yeah, I'm not too happy with the new mobile version of Reddit. I still use the compact view [1] on my phone, which works fine for everything except moderation. On my tablet I just use the desktop view.

[1] [http://reddit.com/.compact](http://reddit.com/.compact)</comment></comment></comment></comment>


Why Rust closures are somewhat hard - <AUTHOR> https://stevedonovan.github.io/rustifications/2018/08/18/rust-closures-are-hard.html <comment><USER2> Rust decides at compile time how long the data stored in a closure must live. You can create situations where that's hard to define, and the compiler, properly, won't permit that. It's very clever.

(Rust tends to use closures heavily, in places other languages don't. So they need all the performance they can get.)

<comment><USER3> One thing that's always concerned me about Rust is that everyone mononorphizes everything (e.g. closures are always unboxed except in the rare cases where dynamic dispatch is necessary). Hopefully this is a baseless fear, but isn't this a recipe for executable bloat?

<comment><USER4> It can be! And arguably people have leaned too hard on the decisions made in the std as an example: in std, everything is generic so that it can be inlined well, because std APIs underlie everything. At the application layer, this is not obviously what you want.

However, in many cases, a well designed generic API will be able take a trait object in the place of `T`. That way, at the application layer, you can decide to pass trait objects around, reducing code size and - maybe more importantly to you - compile times. cargo does this for example in some places where the performance regression is insignificant but it saves noticeable compile time.

Sometimes libraries accidentally don't set things up so that you can pass either a concrete `T` or a dynamically dispatched trait object to their APIs; we're hoping to find a way of making it less likely for this to go wrong in the future.

<comment><USER5> Something I've been thinking about a lot recently: would there be scope for a compiler mode which used virtual dispatch for generics (as well as trait objects) so as to speed up compile times? (and then you could compile the same code monomorphised for production).

<comment><USER6> It's been proposed before: [https://internals.rust-lang.org/t/idea- polymorphic-baseline-...](https://internals.rust-lang.org/t/idea-polymorphic- baseline-codegen/8313)

Its also fairly common to have code like:

       fn do_it(a: impl AsRef<i32>) {
          let a = a.as_ref();
          // do something with a
        }

That could be instead monomorphised to be

       fn _do_it(a: &i32) {
           // do something with a
       }

       fn do_it(a: impl AsRef<i32>) {
          let a = a.as_ref();
          _do_it(a)
       }

saving the inlining of _do_it's code bloat/generation penalty.

<comment><USER5> Hmm, interesting the Niko thinks that MIR optimisation passes and CraneLift are more likely to happen soon. I so dearly want faster Rust compile times!

</comment></comment></comment></comment></comment></comment><comment><USER7> I always find it funny when people propose adding closures to C. Because the moment you add closures (in the way most languages implement them, not Rust's implementation), you're adding automatic boxing, which implies garbage collection and a runtime. Which basically means you've added objects. Which...sure you could do, but at that point, you're not adding to C, you're just making a new language.

<comment><USER8> Would it be possible to add C++'s implementation to C, or does it rely on other C++ features that C doesn't already support?

<comment><USER9> C does not have `auto`, so you couldn't store closures in local variables.

<comment><USER10> In C, you can use typeof().

      #define max(a,b) \
      ({ typeof (a) _a = (a); \
          typeof (b) _b = (b); \
        _a > _b ? _a : _b; })

[https://gcc.gnu.org/onlinedocs/gcc/Typeof.html](https://gcc.gnu.org/onlinedocs/gcc/Typeof.html)

<comment><USER11> typeof is supported by everything[1] _except_ the C standard. It was rejected in the 1990s and nobody on the committee seems to want to revisit the decision.

To be fair, typeof is not as useful without statement expressions (`({ ... })`), and statement expressions aren't as widely supported.

[1] All the major compilers support it (clang, GCC, IBM, Intel, Microsoft, Solaris, etc), plus or minus underscores in the identifier.

</comment></comment></comment></comment></comment><comment><USER12> So, if you're writing in Rust, why not box everything, most of the time? Pay the cost of dereferencing to make it easier to reason about closures? Save unboxed values for situations where they're either trivial to reason about or you're sure there's a performance problem? Is this regarded as bad form?

(I don't really know Rust, but I'm watching with interest. As my comment may suggest, I'm more familiar with C and Python.)

<comment><USER13> I think the general philosophy of Rust is that programmers should think about the data ownership semantics of their programs. Rather than boxing everything to make it easier to reason about closures, one should strive to write programs that use closures in a way that is easy to reason about.

</comment></comment><comment><USER14> As someone who has recently started learning rust i can safely say closure issues where the hardest and most confusing things to learn how to fight with the borrow checker. This is especially the case since futures are becoming popular and require closures to be useful (obviously.)

This post covers a lot of the things I had to recently learn the "hard" way. Thanks!

</comment><comment><USER15> I really want to like Rust.

But writing a doubly linked list was already shown to be difficult [1], and now closures are too ... It really feels like this is not a language to "get things done". Please let someone prove me wrong.

[1] [https://rcoh.me/posts/rust-linked-list-basically- impossible/](https://rcoh.me/posts/rust-linked-list-basically-impossible/)

<comment><USER16> It is decidedly _not_ a language to get things done. I say this as someone who put himself in the unfortunate position of challenging BurntSushi (author of ripgrep) to a coding duel, bragging that I could get LuaJIT to match his XSV performance ([https://github.com/BurntSushi/xsv](https://github.com/BurntSushi/xsv))

It took hours to figure out how to implement this in rust: [https://github.com/sctb/lumen/blob/master/bin/lumen](https://github.com/sctb/lumen/blob/master/bin/lumen)

If you want to see an "expert" programmer's attempt at making sense of the language, here you go: [https://gist.github.com/shawwn/4d7a89188cac72f3e591f47c84d3c...](https://gist.github.com/shawwn/4d7a89188cac72f3e591f47c84d3ca49)

Now that it's done though, I see why people fall in love with Rust. It's really satisfying seeing Lumen's startup time drop from 200ms to 100ms.

But yes, like -- dude, at one point I just wanted to write a for loop like this, to grab some environment vars:

        let mut lumen_host = "luajit";
        let mut lua_path = "";
        let mut node_path = "";

        for (name, value) in env::vars() {
            if name == "LUMEN_HOST" {
                lumen_host = &value;
            } else if name == "LUA_PATH" {
                lua_path = &value;
            } else if name == "NODE_PATH" {
                node_path = &value;
            }
        }
        println!("{} {} {} {}", bin, lumen_host, lua_path, node_path);

Good luck with that! I'm sure there's a way to coax Rust into please-allow-me- to-just-compile-this, but the borrow checker is a cruel taskmaster. Whatever the syntax is, that's not it, and spending literally an hour trying to figure out how to store an environment variable into a separate variable doesn't feel very productive.

That said, Cargo is amazing. It's truly a wonderful, delightful piece of software. Cargo crates plus a dynamic language seems like a recipe for success.

<comment><USER17> Is there a reason you looped through env::vars() rather than calling env::var on each key you wanted? That'd be much more straightforward:

      let lumen_host = env::var("LUMEN_HOST").unwrap_or(String::from("luajit"));
      let lua_path = env::var("LUA_PATH").unwrap_or(String::new());
      let node_path = env::var("NODE_PATH").unwrap_or(String::new());

<comment><USER16> _Thank you_. I spent ... more time than I'm comfortable admitting trying to figure out how to do that.

Out of curiosity, did you spot any other antipatterns? I'm sure there are a bunch: [https://gist.github.com/shawwn/4d7a89188cac72f3e591f47c84d3c...](https://gist.github.com/shawwn/4d7a89188cac72f3e591f47c84d3ca49)

I poo poo the language a lot, but it's satisfying to get the hang of it.

      fn realpath(path: &str) -> &str {
          unsafe {
              return CStr::from_ptr(
                  libc::realpath(
                      path.as_ptr() as *const i8,
                      0 as *mut i8
                      )).to_str().unwrap();
          }
      }

Curious about that block in particular. I have no idea what I'm doing, so it'd be somewhat shocking if that were idiomatic.

<comment><USER18> > _Thank you. I spent ... more time than I 'm comfortable admitting trying to > figure out how to do that._

The question is why. The relevant examples are everywhere:

[https://doc.rust-lang.org/std/env/fn.var.html](https://doc.rust- lang.org/std/env/fn.var.html)

[https://doc.rust-lang.org/std/env/fn.vars.html](https://doc.rust- lang.org/std/env/fn.vars.html)

[https://doc.rust-lang.org/book/second- edition/ch12-05-workin...](https://doc.rust-lang.org/book/second- edition/ch12-05-working-with-environment-variables.html)

[http://siciarz.net/24-days-rust-environment- variables/](http://siciarz.net/24-days-rust-environment-variables/)

<comment><USER16> FWIW, those four links are already purple for me.

The reason it's difficult is that it simultaneously introduces the concepts of optionals, unwrapping, string processing, variable assignment, and lifetime management. It's not like it's impossible to figure out. I was only saying the workload was similar to "baby's first vi session".

<comment><USER18> That's understandable, but isn't it premature to judge Rust based on such a session?

That would be like criticizing vi based on "baby's first vi session", because "couldn't even exit the editor!".

<comment><USER16> I... am not sure. On one hand, it's instructive for language designers to know what turns out to be a barrier to entry. They're often unexpected things. And what's worse, users usually run into them and then quietly disappear; you almost never get the chance to see what trips newbies up in practice. It wasn't meant as a solid criticism, but more of a cathartic "yes, this language can be _really_ counterintuitive at times." (Rust is in good company. It's the same reason Lisp is unpopular.)

On the other hand, you're absolutely right: the hypothesis is, given two equally-experienced programmers, one of them a Rust aficionado and the other a LuaJIT maniac, the LuaJIT dev will deliver reliable and maintainable software with an order of magnitude less effort. So you're right, that remains to be seen (to put it mildly).

Looking forward to seeing how close I can get to XSV's performance. It's a great benchmark.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER19> If you're interested in writing code for maximum readability, might it be simpler to write for loops more often, rather than tricky type signatures?

<comment><USER20> The problem of a for loop is actually that it's just a for loop.

When you see filter, map, or max_by, you know what the code does right away.

<comment><USER19> Well, mileage varies there. For the most common for loops (equivalent to map or filter), I find it easy to see what they do at a glance. For many collection apis I have to look it up.

<comment><USER20> I guess it's a matter of taste/habit.

</comment></comment></comment></comment><comment><USER21> This may be way too much for this topic, but where do closures get stored?

<comment><USER22> If they are "boxed" they are on the heap, otherwise they are on the stack.

<comment><USER23> Don't they do small object optimization? In C++, implementations of std::function usually do that to avoid allocating for most common cases.

<comment><USER17> Closures don't implicitly box, so any boxing would be done by the user directly, and so that would be up to them.

<comment><USER23> I meant the Box type itself. In C++, std::string and std::function are usually intentionally padded, so that when the data is small enough, it can fit inside the object itself, rather than storing the pointer to heap-allocated storage.

<comment><USER17> A Box'd Fn is two pointers: one to the code, and one to the data. The only way that this would work is if the data was a single usize, which is not likely to be many useful closures. In theory it could happen, I guess...

<comment><USER23> The idea is that you intentionally pad your type with fields that don't do anything other than provide a scratchpad for extra storage, much like over- allocating an array to avoid resizing on append. If the stored data is smaller, those go unused, so if you pick the wrong amount, the overhead is too great. But if you hit the sweet spot, it has very significant perf benefits, not only because it avoids hitting the allocator on copies, but also because of data locality.

BTW, why wouldn't a lambda with a single usize field be common? I thought Rust captures everything by borrow by default; if so, doesn't the implementation simply store a frame pointer inside the lambda, and use it to access the captured variables? It seems like an obvious optimization...

<comment><USER17> Yes, I understand SSO. It's just that these structures are already smaller than String/Vec would be by a third, so it's harder to find something that fits.

> if so, doesn't the implementation simply store a frame pointer inside the > lambda,

Yes. That's what I was talking about. That's why you'd only be able to store one usize inline. You'd be replacing that single pointer with data. String and Vec have double the available space!

(Incidentally, String can't do SSO in Rust due to it exposing the underlying storage; there are SSO strings available in a package if it's significant in your use-case.)

<comment><USER23> But if a lambda capture is already just a single pointer in this case, what exactly is on the heap when it's boxed? Like you said, it's one word for pointer to code, and one word for data. Why can't Box accommodate both directly within itself without heap-allocating? Is it the desire to have sizeof Box be a single word? But then why not offer SSO-enabled Box, or maybe even specifically FnBox, in a separate package, same as with strings?

<comment><USER17> Okay. let's talk about Box.

Box<T> is always a single usize if T is Sized, and two usizes if T is not. T is not sized when it's a trait. If T is Sized, then Box<T> puts the T on the heap, and the Box itself is a pointer to it.

Box<Fn()> is a "trait object" the double pointer. It looks like this:

      pub struct TraitObject {
          pub data: *mut (),
          pub vtable: *mut (),
      }

The first pointer is a pointer to the data, and the second pointer is a pointer to a vtable. So in the Box<Fn()> case, data is the captures, and the vtable is the code.

So when you write code like this:

      // in a function body somewhere
      let x = 5;
      let f = Box::new(|| x);

Rust generates code that looks roughly like this:

      // at item level
      struct Env<'a> {
          x: &'a i32,
      }

      // an impl of Fn for Env, i'm not writing that out

      // in a function body somewhere
      let x = 5;
      let env = Env { x: &x };
      let memory = GlobalAlloc::alloc(..);

      // copy env into memory, i'm not writing that out

      let f = TraitObject {
          data: memory,
          vtable: pointer_to_vtable_im_not_writing_out,
      }

make sense? The Env is on the heap.

Before I move on, It's worth noting that, in the case of a closure which has no captures:

      let f = Box::new(|| 5);

you get:

      // at item level
      struct Env;

      // an impl of Fn for Env, i'm not writing that out

      // in a function body somewhere
      let x = 5;
      let env = Env;
      let memory = GlobalAlloc::alloc(..);

      // copy env into memory, i'm not writing that out

      let f = TraitObject {
          data: memory,
          vtable: pointer_to_vtable_im_not_writing_out,
      }

since Env is a unit struct, it has zero size, and so gets optimized out at compile time, which also ends up removing all of the data stuff, which means it's back to a regular function pointer (fn instead of Fn).

Anyway.

So, if we were to do an SSO-like optimization here, we only have a single usize, the data pointer, to work with. We still need the function pointer, so we can't re-purpose it.

In theory, that would mean that an environment that has a total size of less than usize _could_ be stored inline. It's not clear to me how often this is true, and if it would be worth it. But none of these internal representations are stable, so it's possible for Box<Fn()> at least.

Compare this to std::string. Different compilers implement it differently, but let's look at gcc:

[https://github.com/gcc- mirror/gcc/blob/master/libstdc%2B%2B-...](https://github.com/gcc- mirror/gcc/blob/master/libstdc%2B%2B-v3/include/std/string#L64)

[https://github.com/gcc- mirror/gcc/blob/master/libstdc%2B%2B-...](https://github.com/gcc- mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/basic_string.h#L156-L165)

You've got a pointer to the data, the size, and a union of the buffer vs the capacity. In the end, on a 64 bit system, this is 32 total bytes of space! Box<Fn()> by contrast, is 16 bytes total, and we can only use 8 bytes of that. Additionally, strings often do have individual byte data, but closures, given that they capture by default, have a size of at least 8. _maybe_ a move closure that has a bunch of small numbers in it might make a good fit for some sort of SSO-style optimization here, but environments tend to be bigger and space is smaller than strings.

Does that all make sense?

<comment><USER23> Not quite - that still doesn't explain why there can't be an SSO-optimized FnBox with extra padding that's there specifically to fit the kind of Fn that only needs to store the frame pointer, inline on the stack.

In fact, now I'm even more confused as to why it can't be done generically for Box<Fn>:

> The first pointer is a pointer to the data, and the second pointer is a > pointer to a vtable. So in the Box<Fn()> case, data is the captures, and the > vtable is the code.

If a given lambda can capture via a single frame pointer (because it borrows everything), why can't that frame pointer just be stored directly in the `data` field? Why does it have to indirected, with data pointing to another pointer on the heap?

And if borrow-capturing lambdas don't actually capture via frame pointer, why not?

Or are you saying that lambdas that borrow everything aren't actually all that common? But if they aren't, then why does capture by borrowing reference the default for lambdas?

<comment><USER17> > that still doesn't explain why there can't

There can, you'd have to write it yourself.

> If a given lambda can capture via a single frame pointer (because it borrows > everything), why can't that frame pointer just be stored directly in the > `data` field?

If there's a single thing it's borrowing, then yes, it could. If there's any more than one, it won't fit.

> Or are you saying that lambdas that borrow everything aren't actually all > that common?

I'm saying that closures that borrow _exactly one_ thing aren't actually all that common.

<comment><USER23> I think you're misunderstanding what I mean by "frame pointer".

What I'm saying is that if a lambda is capturing local variables from a single stack frame by borrow (which ensures that it can't outlive them), then it doesn't need individual pointers to every variable. It just needs a pointer to the stack frame where they live, and it can access the individual variables by offset, same as the function to which that frame belongs does. It's compiler magic, of course - i.e. it means that such lambdas don't have a straightforward translation to a regular Rust object. But it's magic that behaves _as if_ you had individual references, so it's a completely transparent optimization except for size of the resulting object.

On Intel architectures, you can think of it as stashing away EBP/RBP.

And lambdas that only capture locals from one frame, and all of them by reference, seems like a very common kind of lambda to me, making that optimization worthwhile.

<comment><USER17> Ah! Yes, I see now. I think that D implements closures this way? I thought you meant the closure's conceptual stack frame.

As for commonality, the most common closures I see are:

* closures which have no environment

* closures that take the environment by move

* everything else

It'd be interesting to analyze crates.io and see though...and how much this would actually save you. I can't think of a time when the closure is only pointing to its parent's stack frame and you _would_ box it. Box<Fn()> is mostly used for returning closures, and there, you'd be using a move closure to take the env by owner.

And even if you do unnecessarily box: [https://play.rust- lang.org/?gist=c16ac5983579d52d4997b3f4425...](https://play.rust- lang.org/?gist=c16ac5983579d52d4997b3f44258748b&version=stable&mode=release&edition=2015)

If you click "show assembly", do_closure_stuff is compiled to:

      playground::do_closure_stuff:
    	  leal	2(%rdi), %eax
    	  retq

It gets entirely optimized away anyway.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER24> Everything in Rust is somewhat hard.

<comment><USER25> ... to get an initial implementation of. It's much easier to read, debug and refactor Rust code than in almost any other language that offers similar resource-efficiency.

<comment><USER24> Ada is way easier to read, debug, maintain, and refactor than Rust. So is the majority of other halfway safe languages (except Haskell, maybe).

<comment><USER25> Halfway-safe languages (including Haskell) that aren't Rust, have a nasty habit of eating memory (and usually CPU time, too) for breakfast, compared to equivalent programs in C, C++ and Rust. That's what I meant by "resource efficiency".</comment></comment></comment></comment>


Ask HN: My 50/50 CEO Co-Founder just fired me. What can I do? - <AUTHOR> I'm a 50/50 Co-Founder in a SAAS startup that we've bootstrapped to nearly 10MM in ARR and growing over 100%/year.
When we set up the company years ago, we split everything down the middle: We each have 50% of the shares, each have one board seat (only 2 total seats), and we've been making joint decisions on everything up until this point. As the business-minded co-founder, my partner took the title of CEO, and I've had the title of CTO since I've been in charge of the product and engineering.
Without warning my Co-Founder told me that he had asked our attorneys and they said that since in my role as CTO I'm an at-will employee, as CEO he decided to terminate my employment. So now I'm still a board member and stock owner, but without a salary to pay the bills.
I didn't know that this was even possible! Has anyone been in a similar situation? What options do I have as a board member and stockholder to fight back? <comment><USER2> You need to get in touch with your lawyer. Not the company's lawyer (who signs their checks?). Don't have one? Now's a great time- head downtown and pick whichever one doesn't already represent your company or your partner.

What your lawyer would probably advise (and definitely don't do this just because I suggested it) is if you have an invention assignment, which says your work product is the company's because the company pays you, issue a notice that your agreement(s) have been breached.

Hopefully you're not in a situation where you've relinquished all password control. If you have shared passwords with the CEO, change them to where they're no longer shared.

Next, you may want to arrange for an indefinite maintenance update on your servers while you get this taken care of. Refer any and all complaints to the CEO and tell your customers that he has the ability to fix it. You're not going to get your cofounder to see your side by being the sane one in the relationship.

One of you has declared war, while the other is trying to decide whether a state of war exists. Trust me, it does, and you lose ground every second you don't marshal your resources to win decisively.

<comment><USER3> > ...You're not going to get your cofounder to see your side by being the sane > one in the relationship ... One of you has declared war, while the other is > trying to decide whether a state of war exists....

100% in agreement

</comment></comment><comment><USER4> CEO thug life - "I just fired the CTO."

I'm sure you're already talking to a lawyer. He or she will be more helpful. It is interesting though for the HN community to know that drama does exist between co-founders. Chose your co-founder wisely!

I wish you all the best.

</comment><comment><USER5> I am curious: do you guys have any dividend/cash-out strategy currently? or is all the profits in the bank and you just take out a salary?

If the latter, consider having a dividend payout in the future if you have no other investors. ie both take out 25% of profits every quarter. This way if your other cofounder fires you - so what? you still get the profits and now uour cofounder has to do all the work and worry about everything!

</comment><comment><USER6> Sounds like there's a lot more to this that has been omitted. Bootstrapped cofounders and one fires the other without warning? And without reason?

</comment><comment><USER7> Talk to a lawyer. Yesterday.

</comment><comment><USER8> ianal. buy him out. let him stay as ceo. what did you do to get fired ?</comment>


Startup School 2012 Videos - <AUTHOR> http://startupschool.org/2012/

<comment><USER2> My favorite talk was the one given by Jessica Livingston. The way she simplified what it takes to be a good entrepreneur, resiliency and drive and the "monsters" you'll meet along the way was amazing. My least favorite moment was Uber's founder talk. I love and use the app but his talk sounded too much like 30 minutes comercial on Uber... A special award to Ben Horowitz for humor and to Robert Scoble who managed to speak (ask a question to Ron) even though he wasn't on the speakers's list :)

<comment><USER3> JL efficiently didn't delve into #1 monster of cofounder disagreements. An insightful point was about the large company corp dev monster.

Another must watch is Joel's talk: deciding and knowing what kind of venture one is in, so that one takes the more appropriate actions when situations arise.

<comment><USER4> Here's the article Joel's talk was based on <http://www.joelonsoftware.com/articles/fog0000000056.html>

Reading it should give you a good overall picture of his talk.

</comment></comment></comment><comment><USER5> My best advice is just go and watch the BOS videos, I have been blown away. Their videos beat any conference on tech entrepreneurship in my opinion. I measure this based on substance. The Clayton Christiansen talk alone is worth more than watching all the startup school 2012 videos! This is just my opinion.

PS: Already a down vote. Be man or woman enough to state your case.

<comment><USER4> <http://businessofsoftware.org/> in case anyone's left wondering.

Videos 2012: <http://businessofsoftware.org/category/video-2/>

<comment><USER6> Unfortunately I don't think those are the videos from 2012. I attended in person, and don't see any of the talks I saw.

</comment></comment></comment><comment><USER7> I think this is the first year that the videos are linked to directly from the startup school page. A much better experience than having to search through justin.tv, youtube, lanyard, etc. to find all of the videos. Also, nice to find the list of speakers on the startup school page, since I think it traditionally has been replaced with the most recent year's list of speakers each year.

</comment><comment><USER8> What's with the shitty video player? Can't even go full-screen? Why not just post the videos on YouTube?

And the quality of the actual video isn't even HD?

<comment><USER9> Guessing it's because of the slides. Is there a platform you suggest for playing embedded YouTube videos and a slide deck at the same time?

<comment><USER10> Uh, why isn't it just slides with a voice over? I don't think seeing Zuckerberg's face is really making anything he says more valuable.

<comment><USER11> You're wrong. Depending on where you look, nonverbal behavior constitutes between 60% and 93% of communication. If I really am interested in a podcast I will always opt for the video-version if it means I can't put it on my iPod and listen to it while doing chores like I could with the audio version.

<comment><USER12> Where does that number come from? It sounds suspiciously made up -- not by you, mind you.

<comment><USER11> wikipedia - body language

<comment><USER12> It looks like the original study dealt only with "communication of feelings and attitudes" i.e. emotional content:

[http://en.wikipedia.org/wiki/Albert_Mehrabian#Misinterpretat...](http://en.wikipedia.org/wiki/Albert_Mehrabian#Misinterpretation)

I don't see any evidence that this applies to communication in general.

</comment></comment></comment></comment></comment></comment></comment><comment><USER13> Gotta say that Startup School 2012 had some really great talks. I had the chance to attend in person and it exceeded my expectation. The speakers shared some great insights and stories about their startups and each one gave a different perspective.

My favorite speaker probably was Joel Spolsky (and his slow, organic growth vs land-grab talk).

I love how Joel used Fog Creek to fund StackExchange's development and now Trello, which both seem to be land-grab businesses. It's almost like Fog Creek is it's own startup incubator now. Maybe a new model of funding/startups?

<comment><USER14> For those who weren't there, Trello was funded by Fog Creek employees investing their bonuses into developing the product.

I thought his slides also added a lot. Very straight forward and clear -- he almost didn't need to speak.

</comment></comment><comment><USER15> For those wondering, just before the 3:00 mark of Mark Zuckerberg's interview, the "Startup School" sign attached to the podium spontaneously fell.

</comment><comment><USER16> "Ben Horowitz (recording unavailable) "

This recording will never be available? I would like to watch his talk...

<comment><USER17> My key takeaway from Horowitz talk was "Don't sip sizzurp (AKA Purple Drank)."

<comment><USER18> Could you explain what does it mean? I'm out of context

</comment></comment></comment><comment><USER19> Thanks for doing this and putting them up, the talks are amazing.

</comment><comment><USER20> The slides are out-of-sync for me, atleast for the Uber video.

<comment><USER21> It's unusable for the uber presentation. They're a full one or two minutes ahead

</comment></comment><comment><USER22> Here are my bite-sized reactions to each talk: [http://blog.squarepoet.com/post/34350209686/startup- school-2...](http://blog.squarepoet.com/post/34350209686/startup-school-2012)

I felt a recurring theme was "don't give up"... so I'll really try to remember that lesson when I hit future roadblocks.

I enjoyed attending and meeting some of you in person. Definitely looking forward to next year's edition!

</comment><comment><USER23> Ben Horowitz (recording unavailable) is a shame, since in my humble opinion he was the best. I just love his attitude, and passion for hip-hop.

</comment><comment><USER24> What is the best way to strike a balance between the speaker and slides while recording/editing a talk?

I find it hard watching talks where only slides got recorded or others where only the speaker gets recorded.

For the latter, I'll normally download slides and use them to move along with talk.

<comment><USER25> I prefer Splitscreen. This is what Google has done for several TechTalks before.

</comment></comment><comment><USER26> Flash required? I'm curious - why? Is it easier to publish videos with a flash wrapper?

<comment><USER27> Maybe to avoid sharing away from the site? My other (half joking) thought is to stay consistent with the considerably dated markup and design that runs through most of the YC sites

</comment></comment><comment><USER28> > Ben Horowitz (recording unavailable)

NOOO! This talk was fabulous!

<comment><USER3> His talk was mainly what he has given before. I found this which is pretty close: [http://www.youtube.com/watch?v=G-LBSqm3xh4&sns=em](http://www.youtube.com/watch?v=G-LBSqm3xh4&sns=em)

</comment></comment><comment><USER9> I'm glad the audio is good because it was pretty crummy that day (at least from the balcony).

I had to strain to hear what the speakers were saying.

Was the volume OK for those on the main level?

<comment><USER29> On the main level it was pretty bad on the right side closest to the stage. The audio speakers sounded muffled, but sounded fine as you stepped further back.

You could tell we couldn't hear anything because no one was laughing when everyone else was.

</comment></comment><comment><USER30> Hacked together a quick script for downloading the videos for viewing offline (requires rtmpdump):

<http://pastebin.com/AxZCgcsF>

</comment><comment><USER31> Aside from maybe Jessica Linvingston's talk, Spolsky's was the only one that said something very interesting to me, even though it was basically 12 years old.

</comment><comment><USER32> The slides are out of sync with the video for me, and the video stops periodically. Is this happening for anyone else?

</comment><comment><USER33> Anywhere to download MP3 or other audio-only versions to listen in the car?

<comment><USER34> I'll make some for you in a couple of hours.

Edit: Where would you like them uploaded to? SoundCloud okay?

</comment></comment><comment><USER35> How to download the videos for viewing offline ?

<comment><USER36> I'm also interested in this.My current internet connection sucks.

</comment></comment><comment><USER37> Very nice talks specially Jessica Livingston.

</comment><comment><USER38> The slides for the talk by Travis are wrong.

</comment><comment><USER39> Flash player?</comment>


Ask PG: Hiding Submitter - <AUTHOR>

There has been some talk recently about voting rings and how to combat them.  As an experiment I think it would be interesting to hide the submitter of the article or waiting until after you have voted on it to display the name of the submitter. <comment><USER2> Would that really get around the voting rings though? I don't think so. I thought that they worked mainly by passing links around via twitter, IM, or email. Hiding the submitter wouldn't solve something like that.

<comment><USER2> Just saw this - it shows a voting ring using links rather than user names: <http://i.imgur.com/4MOZr.jpg>

</comment></comment><comment><USER3> I had heard of the Digg "mafia"/voting rings before, but these latest threads were really the first I had read about it. From my understanding these happen through other channels and not just from a username and thus this wouldn't really change anything regarding them.

Personally, I think usernames are _needed_ because they give HN the personality that it has. There are some people you might disagree with constantly, but you still value their input. Without names, you might not understand where they are coming from. Maybe this is more regarding comments, but sometimes submissions too.

</comment><comment><USER4> There's also a minor personality-cult voting phenomenon at work here. It may just be because some HNers follow the comment threads of high-score or celebrated HNers, but I've noticed some people do get a lot more upvotes for mundane comments than I would expect.

On the other side, there is social aspect - I know a lot of HNers just by their usernames here; knowing a little of the writer's context makes a comment more relevant and interesting.

Perhaps it's worth a short experiment? What if there were a way of identifying within a thread which comments were by the same person?

<comment><AUTHOR> I think you might have misunderstood. I'm suggesting this be done just for submissions, not for comments.

<comment><USER4> Yes, I'm sorry; I did misunderstand. Is story rank only a factor of up/down- votes to the story weighted by time or does it also include a factor based on number, depth, and scores on comments under that story?

</comment></comment></comment><comment><USER5> An easier solution is to remove the points received for stories submitted.</comment>


Show HN: [x] driven development - <AUTHOR> http://devdriven.by/

<comment><AUTHOR> Hi HN Folks. A bit of background on how the site came to be: [http://antrix.net/posts/2013/xdd/](http://antrix.net/posts/2013/xdd/)

I'd appreciate any feedback you have on the site!</comment>


Ask HN: Your best follow-up strategies? - <AUTHOR>

How do you follow-up with people you're waiting for? I'm doing sales for a medical product I built, and the time it takes for a doctor to get back to me just kills me. A lot of follow-up and waiting is required before I finally get the sale.  I often wonder, is there a better way to do this?
So HN, what methods work best for you when following up with a slow-moving organization or person? When waiting for a person to do something, do you just fire an email and forget about it? Or do you find it worth following up from time to time with reminders? How do you do that without getting annoying?
Has anyone experimented with hiring a virtual assistant to do the follow-up work for you? Are there other tools or hacks out there to make the follow-up process easier and find out why a person's taking so long to get back to you?
Your tips are appreciated! (And don't make me follow-up on that! ;-)). <comment><USER2> "do you just fire an email and forget about it?"

If you really care about getting something done, then you're going to need to stay on it. The best way to do it without being annoying is:

1\. To be extremely polite and articulate each time you follow-up as it will not only make people more receptive to in your inquiry, but will help them have a better understanding of what it is you actually need;

2\. Try to secure a "when can I expect to hear from you?" ballpark figure from the parties involved; that way they can set the expectation for when you should hear back from them and you can politely hold them to it;

3\. Give people a reasonable amount of leeway - if the person you're contacting is extremely busy, it might take them weeks to follow up on a simple email. I contacted a CEO of a company which represents a model customer for my own startup service in late March to get some feedback from him; I didn't actually end up speaking to him until yesterday. That's just how it goes with busy people some times - just stay organized, keep a list of all of the people you've contacted and when, and periodically remind them when enough time has passed.

<comment><AUTHOR> Thanks for sharing your tips and experiences. Yeah I guess there's no magical solution. One thing also I find gets people's response is using 'I know you're busy, but...'. Ofcourse I haven't done any A/B testing on that or anything.

<comment><USER2> A/B testing for this sort of thing is probably overthinking it :p, but I get your meaning though

</comment></comment></comment><comment><USER3> I've had a sales rep trying to sell me unit testing software for over a year now. We were much too busy to do a proper evaluation of his product until just recently, and I haven't always returned his phone calls or emails. But I never asked him to stop, because I knew that his product was worth taking a look at. We finally got a chance to do so, and now we'll probably buy it.

Be patient. If they don't give you strong hints to leave them alone, it's okay to keep up the polite inquiries.

</comment><comment><USER4> Doctors have tons of shit, often important, to do all of the time. It's hard to imagine them getting so excited about a product (unless it's a snowmobile or a yacht, which I say from personal experience) that they'll drop something important to respond to your sales pitch.

It would help if I knew what type of medical product you were selling. Is it a device? A tool for front-office stuff? Billing or back-office?

<comment><AUTHOR> I sell cosmetic surgery visualization software that doctors (plastic surgeons) can use to tell patients how they might look like after a cosmetic surgery. It's more in the 'nice to have' than 'must have' realm for doctors, so maybe this is the issue as well.

<comment><USER4> OK, here's an idea (perhaps a really bad one, but whatever). Do what you normally do, but also add in the following: follow up _with the office staff_. Give them a free demo. Ask if any of them want to try the software. But don't let them do it live. Take their photo (or whatever you need) and ask them what they'd want done. Then do it at home (even though you could do it live, don't). Follow up in a few days by emailing the before and after images to that office member and CC the doc.

Again, not sure if this would be effective, but office staff, in my experience, would love to talk about this type of stuff.

<comment><AUTHOR> Thanks, this is a creative idea. So you have experience selling to medical practices from before?

<comment><USER4> I'm a medical student. In college I worked in a private practice office for surgeons (though not plastics). On the wards, I rarely interact with people doing sales (I actively avoid them, no offense) -- though on surgery, it's impossible since they end up being in the OR.

The thing that has surprised me is how much influence the office workers have on the physicians. Since your product has the potential to be fun for the office workers, this could really be an in. If you can get a physician assistant on your side, you've pretty much won the game, IMHO.

If people are offended ("What, you think I need a nose job?") you could switch it up and let office workers modify other office members with consent ("Hah! I want to give John a calf implant!").</comment></comment></comment></comment></comment>


Second Life Bans Gambling Following FBI Investigation - <AUTHOR> http://www.techcrunch.com/2007/07/25/second-life-bans-gambling-following-fbi-investigation/ <comment><USER2> What's next, are they going to take the De Lorean back to 1985 and put the kibosh on gambling in The Bard's Tale?

Ironically it seems the freer virtual worlds of the future will need to in reality be located outside the "land of the free".

<comment><USER2> The funny part is I wrote that before all the news of the DeLorean comeback. I originally wrote "time machine" until I saw BT was 1985, which of course combined with time machine means one thing...</comment></comment>


MVC and DAO Pattern in PHP Books ebook or pdf? - <AUTHOR>

Hi! Guys, i want to learn more about mvc and  dao pattern in php and their bootstrap, where can I find the best books may be in PDF format or ebook? has links pass me please! <comment><USER2> Your best bet would be to pick an MVC framework for PHP and then read the documentation for it. MVC as an architecture isn't all that complicated, but different frameworks may implement slightly differently. Choosing a framework, reading the documentation and playing around with it on your own will help you understand the concept much better than a book.</comment>


LED streetlamp aims to improve public's view of stars - <AUTHOR> http://www.bbc.co.uk/news/technology-22292129

<comment><USER2> Lighting engineer discussing this: [http://www.reddit.com/r/science/comments/1d3hd1/researchers_...](http://www.reddit.com/r/science/comments/1d3hd1/researchers_believe_they_have_come_up_with_a_new/c9mn785)

</comment><comment><USER3> There's another issue not covered by the article, apart from the degree to which the light's emission angles are controlled, and that is spectral lines. Many conventional streetlight designs emit their light along narrow spectral lines, a trait resulting from their gas-discharge design, and those spectral lines prevent spectroscopy (a large part of modern astronomy) from being carried out as it should.

LED lights don't have narrow spectral lines, so they represent an advantage for this reason also.

<comment><USER4> Street lights that emit narrow spectral lines are not a problem at all for spectroscopy, except of course at the line wavelengths. I have a bit of experience here -- a few more than 400 nights observing spectroscopically at Lick Observatory, where we have just a wee bit of light pollution!

All lights, narrow or broad band, present problems for optical broad band imaging.

If we could get all cities to go with low pressure sodium lamps (that only emit at a few wavelengths), astronomers would be very happy. The only problem is that city residents tend to not like the monochromatic look you get from not having a broadband light source. So San Diego, for example, switched to low pressure sodium in the 80's to try to protect the skies for Mt. Palomar. But residents started screaming (it's leading to more crime!) so the city went back to high pressure sodium.

<comment><USER3> Thanks for posting. I would have thought narrow lines would produce the problem that those specific lines would become unavailable for study, or would be freely mixed with the "real" data in confusing ways. It didn't occur to me that they could simply be subtracted in a deterministic way.

On that basis, I might have argued for high pressure sodium (to smear the lines) instead of low pressure, and I would have been quite wrong.

Given these issues, it's no wonder that a mountaintop in Hawaii, and another one in the Atacama desert, are now the preferred locations for optical astronomy.

<comment><USER4> > Thanks for posting. I would have thought narrow lines would produce the > problem that those specific lines would become unavailable for study, or > would be freely mixed with the "real" data in confusing ways. It didn't > occur to me that they could simply be subtracted in a deterministic way.

Your original thought is basically correct: we do lose the ability to do any meaningful work at the wavelengths of the lamp emission lines. But the damage is concentrated at a few wavelengths. So we trade having noise over the entire spectrum for a few really, really noisy pieces of spectrum. It's generally a excellent tradeoff.

But even low pressure sodium lamps have some emission spread over a large wavelength range, so it is becoming increasingly difficult to do optical work near major urban areas. In the long run most of those sites will probably transition to mostly IR work.

</comment></comment></comment></comment><comment><USER5> I'm not so sure that all of the claims are true (or maybe just not well- explained) in that there exist "full cutoff" lights that don't direct light upward. The researchers' light may indeed be an improvement, but it was not made clear to me what it would be over existing full cutoff lights. Based on the illustration, maybe it has more to do with the light not scattering all over the place and therefore not reflecting off objects as much.

It also seems to be an awful lot of "on paper" considering they haven't built a prototype.

Finally, as I was searching for "full cutoff" to make sure I wasn't imagining it, I found this informative website on the subject of light pollution and solutions: [http://www.lrc.rpi.edu/programs/NLPIP/lightingAnswers/lightP...](http://www.lrc.rpi.edu/programs/NLPIP/lightingAnswers/lightPollution/indicatorDirectUplight.asp)

</comment><comment><USER6> I find this story quite strange because there are LED street lights right outside my front door here in Oakland. They went in last year, and it was a bit weird the first time I saw them turned on because the light looked very cold, almost blue compared to the lights that were there previously.

<comment><USER7> They're not saying they've invented LED streetlights, just a new type of them.

</comment></comment><comment><USER8> Are street lights the biggest contributor to light pollution?

<comment><USER4> On Mauna Kea (big island of Hawaii) the biggest sources of light pollution are the airports and harbors.

For the telescopes near big cities, I'm not sure if anybody has worked out the relative contributions of street lights to say billboards or car dealerships or backyard flood lighting. But from standing on the summit of Mt. Hamilton and looking down into the valley it would _seem_ to be mostly street lights

</comment></comment><comment><USER9> Surprised sidewalks aren't mentioned. The "perfect" design shows that the they would need separate lights.</comment>


Show HN: Trailerzzz, a movie trailer every day - <AUTHOR> http://trailerzzz.com/

<comment><AUTHOR> I started to learn HTML, CSS and Javascript a couple of months ago and in order to improve my skills I created my first website focused in movie trailers.

I also wrote a blog post about the creation of Trailerzz: [http://pmcpinto.com/creatingtrailerzzz.html](http://pmcpinto.com/creatingtrailerzzz.html)</comment>


An Introdution to Graphic Design - <AUTHOR> http://observatory.designobserver.com/entry.html?entry=8727

<comment><USER2> I was listening until I got to:

"the 2009 version of the Walmart logo, and anything, ever done in Powerpoint."

... While I admit Walmart's logo isn't exciting or compelling, it's far from 'bad'. And determining that anything ever done with a certain piece of software is 'bad' is so obviously wrong that I don't know where to begin.

If MS Paint can produce beautiful art, Powerpoint presentations can have good graphic design.

I realize that these were likely jokes, but you lose your audience when you go too far. They stop having confidence in the entire rest of your presentation. At this point, I have to suspect every sentence is a joke.</comment>


10 Stops on the Conversion Highway - <AUTHOR> http://blog.hubspot.com/blog/tabid/6307/bid/33453/10-Stops-to-Take-on-the-Road-to-Lead-Generating-Landing-Pages-INFOGRAPHIC.aspx Could be the longest infographic ever. Take a road trip across the USA to learn how to make landing pages. #Epic <comment><USER2> Infographics have pretty much jumped the shark. The metaphor in this one is unnecessary and the entire thing could have been written in a couple of easy to scan paragraphs.</comment>


2012 MacbookAir is unberably slow with Catalina installed - <AUTHOR> is there anything to do? or I have no option but to buy a new computer? <comment><USER2> Downgrade back to Mojave?

</comment><comment><USER3> You could try doing a clean install of Catalina if you didn't already.

</comment><comment><USER4> Install ChromeOS with Linux containers..

</comment><comment><USER5> Snow Leopard was the last good one. Have no backup?</comment>


Elizabeth Warren Releases Medicare for All Plan - <AUTHOR> https://www.axios.com/elizabeth-warren-medicare-for-all-plan-66bb1f85-bef2-40d7-905b-66aba8b2c381.html <comment><USER2> Why _for all_ , rather than _available to all_? It could just be marketing, but the details seem like her plan includes completely eliminating the private "insurance" industry.

But with the amount of money floating around at the private insurance companies, plus all their make-work jerbs, I just don't see them being possible to take on like that in one fell swoop. Rather, such a plan is sure to be jiu-jitsued by the insurance companies similar to how we ended up with Romney^h^h^h^h^h^hObamacare.

Simply provide a competing option based on allowing anyone to buy in to Medicare. People that have access to good private insurers can stick with them, so they lose nothing. The buy-in price could cover the true cost, while still being competitive with the current options for the self-employed, so no budget problem. Big Insurance will always throw up the standard "but we shouldn't have to compete" sob story (see also: Comcraps vs muni fiber), but would lack any real basis for objection rather than dealing with a mortal threat.

I guess this is ultimately just divisive politics. Preaching to a choir that sees coupling increased taxes on the rich as killing two birds with one stone - but dead on arrival to everyone else.

<comment><USER3> Would you like to compete with an entity that doesn't have to make a profit, can lose as much as they want, and is infinitely subsidized?

<comment><USER4> By providing better healthcare, sure.

Most rich people are usually willing to pay good fraction of their net worth to live 10-20 years longer.

<comment><USER5> Wait, are you saying the public option could result in reduced lifetimes compared to top level private insurance? It cannot be that drastic.

<comment><USER6> It seems almost certain with the dawning age of biotechnology right around the corner that private options are going to completely dominate any public options conceived right now.

<comment><USER2> Private _services_ may provide treatment with amazing outcomes, but that doesn't necessarily mean that private payment plans will be needed to financialize those costs.

As a well-off individual, why would you want to give a bunch of money to a company with the same eventual dynamic wherein they decide to not cover the specific treatment you eventually need?

As an insurer, why would you want to be in the position of customers expecting you cover unknown unknowns? If you're aiming to cover boutique treatments, then your risk model becomes _what expensive new treatments are invented_!

Furthermore, once you're talking about that kind of market, there's no need to bundle everything into a single plan. Rather there is a baseline of modern medicine that can be predictably provided (however that is), and then people with more resources can direct paying for hopeful emerging treatments.

</comment></comment></comment></comment></comment></comment><comment><USER7> Link to her actual proposal: [https://medium.com/@teamwarren/ending-the- stranglehold-of-he...](https://medium.com/@teamwarren/ending-the-stranglehold- of-health-care-costs-on-american-families-bf8286b13086)

</comment><comment><USER8> From the Guidelines:

> Off-Topic: Most stories about politics, or crime, or sports, unless they're > evidence of some interesting new phenomenon. Videos of pratfalls or > disasters, or cute animal pictures. If they'd cover it on TV news, it's > probably off-topic.

</comment><comment><AUTHOR> NYT piece has much more info [https://www.nytimes.com/2019/11/01/us/politics/elizabeth- war...](https://www.nytimes.com/2019/11/01/us/politics/elizabeth-warren- medicare-for-all.html)

<comment><USER9> Why does this piece refer to her as Ms. Warren instead of Sen. Warren?

<comment><USER10> This is the Times' chosen style. They almost always refer to people as "Mr." or "Ms." when not using their full name, and rarely use titles. For example, this article repeatedly refers to Bill Clinton as "Mr. Clinton" and Donald Trump as "Mr. Trump": [https://www.nytimes.com/2019/10/31/us/politics/house- impeach...](https://www.nytimes.com/2019/10/31/us/politics/house-impeachment- partisan-vote.html)

</comment></comment></comment><comment><USER11> "Substantially increase funding for the IRS" (according to her own words linked by @mrep)

<comment><USER12> Probably a solid investment that will recoup more than the increase in funding!</comment></comment>


Hello World Not So Easy in Assembly - <AUTHOR> https://towardsdatascience.com/hello-world-not-so-easy-in-assembly-23da6644ff0d <comment><USER2> As one who still has a few programs in the 'archive department' that I wrote in Assembler decades ago, I'd have to agree with this sentiment.

That said, there is nothing better than Assembly if one wants or needs to interface with the hardware at the same level as those electrical/design engineers who actually designed the hardware. That's to say, with Assembler you cannot get any closer to the hardware (unless one's exceptional and can read binary directly).

For a hardware engineer/designer, Assembler can be very useful in certain circumstances where say, certain operands may be causing trouble but which are only visible in an Assembly/Disassembly listing; that is, a higher-level language, by necessity, will obfuscate the troublesome instructions(s). Such instances usually occur in the prototype laboratory and involve all sorts of other tech such as logic analyzers, etc.

Unless you're one of those involved in design at the hardware level (i.e.: one of those who needs to know really detailed engineering stuff at OSI levels 1 and 2 and perhaps even 3) then forget it. Even then—with some special exceptions such as speed sensitive routines, etc.—these days, many projects are just too big to do in Assembler even for hardware engineers. Moreover, with large projects done in Assembler, it's dead easy for one to get lost or be overwhelmed by so much data—thus errors can become commonplace.</comment>


Thousands in Moscow Chant 'Russia Without Putin' - <AUTHOR> http://www.euractiv.com/sections/global-europe/thousands-moscow-chant-russia-without-putin-312528

<comment><USER2> _When reporters asked former world chess champion and Kremlin critic Garry Kasparov who was behind the assassination of opposition figure Boris Nemtsov, he dismissed the question as irrelevant._

 _Whoever did the dirty work, he implied, would have done so only with President Vladimir Putin 's blessing._

 _" Who gave the order to kill Nemtsov? Who knows," Kasparov said. "But this was done not far from the Kremlin and it would have been done by Putin's cronies. Who ordered it? I don't care. Putin must be held responsible for the murder of Boris."_

 _Kasparov's remark gets to the heart of the larger significance of Nemtsov's killing. We don 't yet know who ordered and carried out the hit or why. But the specifics don't matter as much as the signal it sends -- and what it portends._

 _" The message is this," Kasparov said. "We have no allergy to blood and anyone can be killed."_

Putin's 'Hybrid' State Terror

[http://www.rferl.org/content/nemtsov- analysis/26874842.html](http://www.rferl.org/content/nemtsov- analysis/26874842.html)</comment>