Benchmarks of Cache-Friendly Data Structures in C++ - <AUTHOR> https://tylerayoung.com/2019/01/29/benchmarks-of-cache-friendly-data-structures-in-c/ <comment><USER2> > Lookup in the ArrayMap is shockingly slow at large data sizes—again, I don't > have a good explanation for why this is.

Probably because it's doing a binary search over a large array? I wouldn't expect that to be particularly fast with large arrays, since large array + binary search == lots of cache misses.

There is a way (the name escapes me unfortunately) to order the items of the array such that for N items, the item that would be at index N/2 in a sorted array is at index 0, then the items that would be at N/4 and 3N/4 are at indexes 1 and 2, and so on which of course is much more cache-friendly when doing a binary search.

<comment><USER3> The issue is not just that it's 'slow', but that it's frequently slower even than std::map. My suspicion is that the issue is its use of power-of-2 sizes, which is a terrible idea for binary search because it causes cache line aliasing. This is discussed in a lot of detail by Paul Khuong.

[https://www.pvk.ca/Blog/2012/07/30/binary-search-is-a- pathol...](https://www.pvk.ca/Blog/2012/07/30/binary-search-is-a-pathological- case-for-caches/)

> Even without that hurdle, the slowdown caused by aliasing between cache > lines when executing binary searches on vectors of (nearly-)power-of-two > sizes is alarming. The ratio of runtimes between the classic binary search > and the offset quaternary search is on the order of two to ten, depending on > the test case.

The approaches there are likely to give significant speedups.

<comment><USER4> Yeah, in my past experience if my sizes for my B-tree were too close to powers of 2 the performance would tank. Adjusting them to be no where near a power of two and also not take up too many cache lines was the ticket for me.

</comment></comment></comment><comment><USER5> > And unlike with vectors, I don't know that I've ever come across code that > retained map iterators…

I've done this once. The thing I was trying to do was have multiple threads write to a std::unordered_map in such a way that each thread would write to its allocated "bucket" and nothing else (roughly, each thread would "own" map[thread_id] as a somewhat convoluted "thread local storage" which would then be collected and operated on at some point in the future from the "master" thread). It turns out that to the only way to actually do this in a standards-compliant way is to grab an iterator pointing to map.find(thread_id) prior to starting and use for subsequent modifications of the value, since using the subscript operator is apparently not guaranteed to be thread safe for associative containers.

<comment><USER6> The subscript operator can modify the map if the key if the is not present, so it is not constitute and thus formally not thread safe even if you are sure the key is always present. At and find are always constitute so you can use those instead; no need to cache iterators.

<comment><USER5> > The subscript operator can modify the map if the key if the is not present, > so it is not constitute and thus formally not thread safe even if you are > sure the key is always present.

Yeah, I know why it is unsafe in general, but I don't see why the C++ standard can't specify that operations that don't invalidate iterators are legal to perform in a concurrent manner provided they touch disjoint memory locations (for associative containers, subscripting is defined to be one such operator, as long as rehashing does not occur like in this case).

> At and find are always constitute so you can use those instead; no need to > cache iterators.

Now that you mention it, I could have just called find every time. I guess I'm too used to it being O(n) for other collections and avoided it somewhat irrationally ;)

<comment><USER6> The wording could be changed. I guess it is just an issue of the committee only having ago items time; as there are alternatives here getting the correct wording right is not a priority so the fallback to const/non-cons thread safety guarantees is sufficient.

</comment></comment></comment></comment><comment><USER7> People like to talk about C++ giving complete control over memory layout, but there's one very important cache-relevant technique that I've not seen done transparently: "column based storage".

That is, if you have class foo { int x, y, z; }, and make an array or vector of them, then they will normally be laid out in that order. For locality, you might want to have all X be together - ie, three separate arrays of X, Y and Z.

<comment><USER8> To be fair, the same is true of Rust. The issue is that with column-based storage you can't have pointers/references to individual structs within the vector. You need to use indexes.

<comment><USER9> The thing is, in modern C++ you can fake a wrapper to access it like a pointer or reference.

Of course it will not be high performance, but it can be done. (E .g. Eigen library.)

<comment><USER10> Why wouldn't an implementation along these lines be performant?

      template<typename... Ts>
      class SoA : public tuple<vector<Ts>...> {
              // ...
              template<size_t... Is>
              tuple<Ts&...> subscript(size_t i, index_sequence<Is...>) {
                      return {get<Is>(*this)[i]...};
              }
      public:
              // ...
              auto operator[](size_t i) {
                      return subscript(i, index_sequence_for<Ts...>{});
              }
      };

</comment></comment></comment></comment><comment><USER11> The std::deque is also another useful 'hybrid' container that performs close to std::vector or better in some cases when you need to 'grow' the container without reallocating memory so many times. But the only good cache friendly implementation seems to be in clang libc++ (memory is allocated in 4KiB blocks). MSVC's deque implementation is horrible (8 byte blocks) and GCC's is also not that great (512 byte blocks).

<comment><USER12> 8 bytes??? Are you sure you don't mean 8 * sizeof(class)? That's just ridiculous.

Regardless it would be nice if one could specify the block size as an argument. I suppose I could write my own allocator, but it's just too much hassle for such a simple thing as storage.

<comment><USER11> If I remember correctly, in MSVC implementation if sizeof(T) is greater than 8 bytes then each 'block' is just one element (also blocks aren't contiguous). So effectively, MSVC implementation is useless.

Boost does have a a deque container where you can specify the block size using type traits, but from my experience boost's deque wasn't such a good implementation performance wise.

But Clang's libc++ implementation is very good performance wise and even beat std::vector in some cases.

<comment><USER13> How would you even link to the next block with just 8 bytes...

<comment><USER6> There is no next pointer in a deque block; the pointers to each block are in a separate vector.

</comment></comment></comment></comment></comment><comment><USER14> Maybe in a logarithmic plot this would look differently, but it seems to me that std::vector performs quite well in particular for few elements. So why would I bother with smallVector if simple std::vector is on par in their (supposed) prime discipline?

<comment><USER15> Vector can be slow if you create and destroy them a lot, since they allocate. You can work around to some extent by providing a custom allocator, but using something like SmallVector or absl::InlinedVector can be much faster when the N is known.

<comment><USER9> Or if it's fully static size, just use std::array. You'd be surprised how often people use known static size or static max size vectors instead.

<comment><USER10> Yeah, that's one of my biggest pet peeves when looking at other people's code (along with unnecessary dynamic allocations in general). One of the reasons I perhaps irrationally still prefer C++ to Rust is the pervasive use of dynamic arrays of known static size in the latter's documentation, and how it makes fixed-size arrays much less ergonomic to use than dynamic arrays.

</comment></comment></comment></comment><comment><USER16> I'd love to see also comparison with B-trees ([https://code.google.com/archive/p/cpp- btree/](https://code.google.com/archive/p/cpp-btree/)). In my tests done a few years ago this implementation was faster than std::map. And my guess is the reason of it is better use of cache.

<comment><USER13> std::map is usually implemented as a Red-black tree. Which is basically a B-tree with branching factor 2. This is less cache friendly than higher branching factors, so it's entirely expected to be slower than B-trees. On the upside, it offers stable pointers which higher branching factors cannot offer.

</comment></comment><comment><USER13> > llvm::SmallVector [...] this class preallocates some amount of data (the > actual size of which is configurable via a template parameter) locally on > the stack, and only performs a (slow!) heap allocation if the container > grows beyond that size. Because malloc is slow, and traversing a pointer to > get to your data is slow, the SSO heap storage is a double-win.

But you need to "traverse" a pointer for a stack-allocated array just as well! So it's mainly that in some cases this class helps forgo a malloc, which I am not sure is that much of win, especially given that this implementation is another class that requires more (and more complicated!) object code...

What I think might be better in many situations is preallocating the dynamic array so that it doesn't need to be preallocated each time the function is called. The preallocated array can be a function parameter (or object member, for OOP weenies :>), or simply a global variable.

<comment><USER17> > But you need to "traverse" a pointer for a stack-allocated array just as > well!

By the time you traverse this pointer, its pointed-to memory location is almost certainly already in your L1 cpu cache since you are accessing this pointer from its parent struct, while for std::vector it can be in any random place in your memory.

In my own code, using smallvector judicously makes _drastic_ performance differences and allows to forego an immense amount of memory allocations.

<comment><USER13> Yes, the cache issue is why I was suggesting to instead just exercise a little more control about where the heap allocated array is actually located. Choosing a longer lifetime for the array than the lifetime of the function that uses the array, one might already have achieved that the thing is cached. Another option could be to require a temporary array argument from the caller. Or (as someone else suggested) delegating that problem to the GC (which I assume might be able to use "young generation" memory).

<comment><AUTHOR> In my experience, the big benefit from the SSO vector comes from making it the default and making it easy to use. If I emailed my team to ask them to rethink all their short-lived vectors, no one would change anything... but if I say "prefer this SSO vector to the std one," they can actually adopt that without significantly changing the way they write code. It's as much a social problem and developer productivity problem as it is about what's actually best.

<comment><USER13> I think you could email them to rethink whether short-lived things are in general a good idea with regards to a) performance b) maintainability/overseeability/debuggability/flexibility.

IMHO short-lived by default is a wrong practice, and it's mostly a consequence of the misaplied ideology that everything should have as tiny a lexical scope as possible (e.g. make stack variables where possible). And it's a consequence of OOP thinking, where there isn't really a concept of "memory you can use when you need it" but only "objects that are always constructed". And whenever an object comes into or out of existence, work must be done to make that transition official!

If matters were as simple as using SSO vectors by default (or almost always), then new languages would choose SSO optimized datastructures almost everywhere. But is it actually the case that almost all data fits in arrays of length < 16 or so? I don't think so, and using SSO data structures causes more complicated object code and is _slower_ in the larger cases.

</comment></comment></comment></comment></comment><comment><USER18> How does DenseMap compare to, say hashbrown (in Rust) or SwissTable (in C++) by Google?

<comment><AUTHOR> I don't have the know-how to write a Rust comparison (I'd happily accept a pull request from someone who does!), but I can take a to-do to add SwissTable benchmarks. :)</comment></comment>


Cooking Up A New Social Blog - For Loners - <AUTHOR> http://www.fonerbooks.com/2010/03/cooking-up-new-social-blog-for-loners.html

<comment><USER2> I think this is an intriguing idea for a blog and will add it to my small list of reads. I look forward to giving it a chance.

</comment><comment><USER3> Off topic, but the article mentions the following Blogger change, which I'd missed:

 _As the Blogger deadline for cutting off FTP access for blogs like mine nears_

Google search turns up:

[http://buzz.blogger.com/2010/01/important-note-to-ftp- users....](http://buzz.blogger.com/2010/01/important-note-to-ftp-users.html)</comment>


Ask HN: Would you pay for a sales course? - <AUTHOR> Hey all, I'm a sales leader in SF, and professional sales consultant. I've been constantly asked by clients/network to put together very specific online courses (technical founders that want to learn the basics of selling, recent sales hires that want to become the best on their team, etc).
Currently debating between launching for the 1st course: * Breaking into Tech Sales * Prospecting and Cold Calling * Closing and Selling B2B SaaS * Sales Management and Team Structure * Sales 101 (general overview of a little of everything)
Question: Is there a sales subject you would like to learn about? Would you pay? Why or why not? Thanks! <comment><USER2> I think some combo of "Breaking into tech sales"; "Closing and Selling B2B SaaS" and "Sales 101" would interest me.</comment>


Flow Charts - <AUTHOR> http://neil.fraser.name/news/2013/02/23/ <comment><USER2> I wouldn't say I use them often (and when I do, it's usually some form of business process modeling rather than software control flow) but I don't think it's quite fair to assert that flowcharts became obsolete with punch-cards.

At they very least they are a useful "language" to describe program-like logic to non-programmers. That includes beginner programmers, as others have noted, but also includes interested non-technical parties. In my experience it is the best way to explain/document convoluted decision trees to non-programmers.

More broadly, I hear a lot of complaints about UML and other diagrammatic ways to design or describe programs. I don't really get it. I mean, I understand why one might think that the formal UML language is complicated and convoluted (because it is that) and why one might think it fails to live up to the promise of a visual way to specify/write software (because it does fail to do that), but surely I'm not the only one who just drops most of the formalism and uses a pseudo-UML format to communicate (and sometimes even reason about) software design? How do you sketch programs without some UML-like notation? (I suspect UML was partially a formalization of existing ways to sketch programs to begin with.)

</comment><comment><USER3> Funny, the more my job involves explaining to developers what is needed rather than coding it myself, the more I tend to fall back on flowcharts and diagrams to describe the higher level business processes.

I'm all in favor of agile direct communication with the client, but one decent flowchart can save spending hours in meetings trying to get everyone to understand what the problem is we need to solve.

Although no longer needed to design every little detail of the code flow, it's still pretty much an essential skill to have in software development.

<comment><USER4> The main problem with flowcharts for programming is that flowcharts are procedural, whereas much of what we do in programming is declarative: the flowchart describes more how to do something than what has to be done (at some level).

Of course, this depends on at which level the flowchart is drawn.

</comment></comment><comment><USER5> Slightly off-topic, but I remember doing flow charts in college back in 2008. I hated it. Everyone hated it. It was boring, awkward, and confusing, especially for those of my classmates who had never written actual code before.

The assignment was to break down everyday activities (e.g. brushing your teeth) into atomic steps, and have conditionals and loops in there. Not only was it unclear how granular the steps were supposed to be, but I also thought that this is probably the lamest, most uncool way to introduce someone to programming.

At another college they used Scratch for that, which was a whole lot more fun, because it makes it easy to avoid syntax errors, draw graphics, get instant feedback, and have a nice visualization of the program flow/structure.

And those god-damn Nassi–Shneiderman diagrams. Ugh.

</comment><comment><USER6> "But what will most certainly be forgotten is there was a generation of students in the 1980s and 1990s who were encouraged to use flow charts, long after the reason for using them had disappeared."

I don't know if I entirely agree with his conclusion. The smartest people I know code with a pen and paper. When they're on the bus or subway. When relaxing, or thinking carefully while away from a computer.

Those who program in the shower and then write it down after before they forget. Analogue programming tools (pan/paper) are great tools.

I thought the article was going to end with him pointing out that he found a great practice that we can all benefit from now. Planning code ahead of time is still better than typing away, we're just not forced to do it anymore.

</comment><comment><USER7> Amusing that this takes place in Saigon. My mom is from there and her knowledge of COBOL is why she still has a programming job today

<comment><USER8> You are the first adult guy I heard of who has a mother who is a programmer. Just realized that.

I can't talk with my parents about my daily work, having a mom like that must be awesome.

<comment><USER2> Note that Lisp, COBOL, Fortran and Algol were all invented more then 50 years ago (incidently, 3 of the 4 are still moderately common).

A programmer working in the 1970s or 1980s could easily have a child 20 to 30 years old now. I can't readily find the BLS Handbook of labor Statistics from the period online, but there must have been quite a few of them/us by the mid-1980s.

<comment><USER9> _incidently, 3 of the 4 are still moderately common_

I assume you're talking about Algol as the one not in _moderately common_. But the lisps, cobol and fortran in use today generally isn't the same as 50 years ago (maaaybe legacy cobol/fortran stuff is?) - especially the lisps used today (mostly common lisp, scheme and new lisps like clojure) are very different from what they were 50 years ago to the degree that they are really entirely different languages. I'd go so far as to say that lisp is not moderately common anymore, but that languages called Scheme, Common Lisp, Clojure etc are. Saying that Lisp is still moderately common due to these languages is no different than saying that Algol _is_ still moderately common - or rather, Algol dialects known as C, Ada, Java, C# and so on are.

<comment><USER2> "I don't know what language engineers will use in the future, but I know they'll call it Fortran."

(A famous quote, but a quick Google doesn't yield a definitive attribution for it.)

Yes, Algol was what I meant as the odd one out. Your point is well taken, although I think this implies more that Algol is among the living than that modern Lisp/COBOL/Fortran are completely divorced from their first-generation ancestry. (To be clear, I read your comment as agreeing with me here, I'm just highlighting the distinction.)

<comment><USER9> Yes, I wasn't _really_ disagreeing, but it irks me a bit how a lot of people talk about languages (usually Lisp) as if it were the exact same language that was created 60 years ago that's in use today despite that they have evolved significantly over time and yet the Algol-derived languages are treated completely independently as entirely new entities altogether. Someone mentioned this on HN a day or two ago too.

It would be wrong to say that Lisp/COBOL/Fortran are divorced from their first-generation ancestry. I think a lot of people talk about Lisp as if its still the same language because on the surface it looks like that way: the syntax is mostly still intact and the core values (conses, lists, homoiconicity, macros) are all still these, yet Scheme is still a different beast from Common Lisp, Clojure, Emacs Lisp and what Zeta Lisp was. Algol- derived languages, since they have much more complex syntax than s-expressions, have much more varied syntax and therefore _look_ like very different languages, though they still have a lot of semantics in common with algol.

So I think what I'm saying is (at Least for Lisp and Algol - I don't know enough about COBOL and Fortran to know how different they now are from 50 years ago) in neither of these cases are the languages in use today the same languages that were in use 50 years ago, but that both families of languages have descendants in common use today which can be clearly traced to their first-generation ancestry.

</comment></comment></comment></comment></comment></comment><comment><USER10> Lest we forget "computer" and "compiler" were once job descriptions, and (if I'm not mistaken) the "coder" was the person who punched the cards while the "programmer" was the person who fed those cards into the card reader. Timesharing systems and teletypes changed everything.

Software developers often talk about how automation changes peoples' lives but sometimes forget how much of their own industry was disrupted by automation.

</comment><comment><USER11> Not sure why the use of COBOL is written in the past tense given that it is still widely used.

I cut my teeth on both COBOL and flowcharts and still find the latter immensely useful for working out logical flows in my code.

Much better to work out the foundations before cutting the code. Leads to higher quality in my opinion.

</comment><comment><USER12> The classes were for beginner programmers. It's a good idea for them to sketch out a rough idea of their program before they start coding so they can get clear in their head things like what loops to use.

Note that I suggest an informal sketch, rather than strict flowcharts with definitions for each box shape etc.

There are other paper-planning tools too. Jackson Structured Programming is one. (<https://en.wikipedia.org/wiki/Jackson_structured_programming>)

I'd be interested to know if new programmers would still find this kind of thing useful, or if it's just confusing?

</comment><comment><USER13> I think that there is still value in teaching flow charts to beginner coders. It'll get you used to pen and paper reasoning and they are very conductive to better design and architecture, when done at a higher level.

</comment><comment><USER14> As a kid, flow charts were a good way to 'write' a program without having to learn a language. Also flowcharts were a nice precursor to FSM diagrams.

</comment><comment><USER15> FTA "COBOL code was written on paper, sent to a punch operator, who would type the punch cards"

Nitpick. When I learned COBOL in 1990 we had terminals, typed the code like gentlemen.

What they taught us was 1) flowchart the process 2) write it out by hand on graph paper 3) type it up.

I still use flowcharts. Not all the time, and not well: that kind of thing works much better on fan-fold paper!

But it helps me keep the logic I had in mind as I bang out code.

</comment><comment><USER16> Those are great pictures, but the claim that drawing flow charts saved time in the punch card era doesn't make sense to me. My bet is that, then as now, good programmers soon discovered that they were a waste, favored only by textbook writers and managers. They are a non-programmer's idea of what a program ought to look like. There have always been far more powerful tools to work with in the absence of a keyboard, like pencil and paper—not to mention just plain thinking.

There are many programmers around who worked with punch cards. I have often heard them emphasize how important it was to get your program right the first time, because compile time was so lengthy and scarce. But I've never heard one say "that's why it was important to draw a flow chart first". If they had, I'd remember; it would have been such a surprise!

Some HNers must have been programming in those days. I'd like to hear from them about this.

</comment><comment><USER17> I recently read Weinberg's _Psychology of Computer Programming_ , which was written at about the time that time-sharing operating systems (like Unix) began to push out batch computing systems. This is exactly the sort of thing he was concerned about.

When you have a long turnaround time for feedback, you get a strong incentive to "desk check" before you send off your work.

</comment><comment><USER18> If you cannot describe your algorithm on a paper... it will be difficult to debug this code afterwards.

</comment><comment><USER19> Thanks for posting this. It always puzzled me when I was in college; what was the usefulness of flow charts. Instructors seemed unnaturally fixated on them. Now that I am an instructor, I occasionally find them useful on the whiteboard, but that's about it.

</comment><comment><USER20> I still have my flowchart stencils and a couple of pads of gridded report and display paper from my COBOL classes... I need to clean my office.

</comment><comment><USER21> Interesting to see crossed Øs rather than zeroes.

</comment><comment><USER22> Hopefully this one day becomes the case with UML.</comment>


Blogging With Emacs - <AUTHOR> http://twitch.nervestaple.com/2011/10/09/blogging_with_emacs/

<comment><USER2> I wrote org-jekyll to blog from org-mode, and have been using emacs to produce all my sites ever since:

<http://juanreyero.com/open/org-jekyll/>

The problem I was trying to solve with org-jekyll was separating more or less static content, generated with standard org-publish, from blog posts, generated by org-jekyll and going to the _posts directory (and thus being part of the feed generation, etc). I haven't kept up with org-mode development lately, there might be easier ways to do it now.

</comment><comment><USER3> For more information on bloggin from Org-mode, see <http://orgmode.org/worg/org-blog-wiki.html>

Also, the many options available in Org-mode projects make jekyll nearly superfluous (e.g., things like site wide css/js and page templates are baked in), see <http://orgmode.org/manual/Publishing.html>

</comment><comment><USER4> Org-mode always seems cool but I have never really gotten around to trying it out. What I find myself needing lately is a universal input system that lets me send it data from emacs, web, email, and mobile, as well as easy review and categorization and all that jazz. Ideally I'd be able to take that and directly reference it in an emacs buffer while I write a blog post or something.

Any ideas?

<comment><USER2> In OSX it's not too hard to set up with orgmode. This will allow you to easily link to mail:

(require 'org-mac-message)

(global-set-key (read-kbd-macro "C-c C-x m") 'org-mac-message-insert-selected)

I find that the easiest way to categorize email, especially when I need to generate a todo item from it (to be later ignored among way too many todo items), is to link to it from an org-mode buffer.

There are tools for referencing directly to whatever is in your browser, check out org-mac-protocol (<https://github.com/claviclaws/org-mac-protocol>).

There's also an iphone app that allows input from your iphone and easy syncing with emacs and orgmode, <http://mobileorg.ncogni.to/>.

<comment><USER4> That iPhone app looks cool. I was thinking more along the lines of being able to email a special address and it automatically getting appended to an org buffer, or something like that.

</comment></comment></comment><comment><USER5> I just stick with Emacs for composing posts. Format them with Markdown and copy from my Emacs buffer into Wordpress. Simple enough for me. All the files are on Github, so I guess I could create a plug-in to pull from Github into Wordpress, but after spending an hour writing an article, spending two seconds hitting cutting and pasting isn't a significant waste of time.

</comment><comment><USER6> "up to you to generate the quality content that only you can generate"

Surely there's a more elegant way to state that. One that doesn't use the words "generate" and "content".

<comment><USER7> Ick, it looks that much worse when someone is quoting me! Consider me duly shamed for that absolutely awful sentence.

</comment></comment><comment><USER8> Having Vi burned into my muscle memory since the 80's I could never use (literally) emacs for more than 30seconds without inevitably random "i"'s, some "/regx", etc embedded in my text - (that and the RMI inducing ctl-meta- esc-alt-x'ing thing ;))

I love Jekyll/Octopress - but my tool chain of choice for post writing is...

IA -> Marked -> jekyll/s3cmd with a tripwire script -> s3 -> cloudfront

Write - save - blam.

RB

</comment><comment><USER9> You can also use github repositories to actually serve up your blog if you use jekyll! I run my blog using this setup + github and it works pretty well.

<comment><USER10> You can even point domains at these, so that GitHub hosts your content but it's all under your domain name.

</comment></comment><comment><USER11> If you just want to use org-mode with Octopress this is how: [http://jaderholm.com/blog/blog/2011/09/26/blogging-with- org-...](http://jaderholm.com/blog/blog/2011/09/26/blogging-with-org-mode-and- octopress/)

</comment><comment><USER12> There is also this org2blog(<https://github.com/punchagan/org2blog>) which lets you publish directly from Emacs' org-mode to WordPress blogs.

</comment><comment><USER13> It seems to me this article would be better titled as 'Blogging with Jekyll' as Jekyll seems to be the time it spends most of its time on.

<comment><USER7> That is a good point. When I started this post, my goal was to put something together that would let me write the articles from Emacs and easily get them out on the internets. It turned out that the Jekyll part took much more time than the Org Mode part.

</comment></comment><comment><USER14> As a side note, the author has a very beautiful color scheme on the screenshot. I suspect the Solarized scheme.

<comment><USER7> That is correct! I'm using sellout's Solarized color theme for Emacs[0]. It's also available in the Marmalade[1] repository under "color-theme-solarized".

[0] <https://github.com/sellout/emacs-color-theme-solarized>

[1] <http://marmalade-repo.org/>

<comment><USER14> For me it conflicts with the Gnome Terminal Solarized theme though. I had to switch to GTK Emacs (from emacs -nw) to get the color scheme to work. But it looks fantastic now :)

</comment></comment></comment><comment><USER15> org-mode is the gateway drug for emacs and in my opinion, one of the things that makes emacs great. A user, Carsten Dominik had a need for someone, hacked some elisp and it grew into something awesome. It's still one of my favorite pieces of software.</comment>


Where do weatherbug, foreca get their data from?  - <AUTHOR>

Especially for countries like India? Is this data available for free? Thx! <comment><USER2> "...WeatherBug manages and operates the world's largest proprietary weather network with over 8,000 WeatherBug Tracking Stations and more than 1,000 cameras strategically placed..." <http://weather.weatherbug.com/about-us.html>

I'm not sure where foreca gets its data from.

There are a few weather APIs on programmableweb

</comment><comment><USER3> India Meteorological Department? <http://www.imd.gov.in/>

Netwings? <http://www.netwingsinfotech.com/weather-data-services.html>

<comment><AUTHOR> Both of these services have over 2K stations in India. IMD doesnt seem to have more than 300 of them.</comment></comment>


Disrupting Internet Access Is a Human Rights Violation, UN Says - <AUTHOR> http://thinkprogress.org/world/2016/07/01/3795026/un-affirms-online-rights/ <comment><USER2> I'm wondering... what _isn 't_ a human right these days...</comment>


Scala books being published at quite a rate - <AUTHOR> http://capecoder.wordpress.com/2012/05/06/scala-books-being-published-at-quite-a-rate/

<comment><USER2> I tried really hard to like Scala. I bought a few Scala books about the same time I also started buying Clojure books and put effort into learning both languages. For me, Clojure became a nice addition to using Java, Ruby, and Common Lisp. Scala didn't.

I hope that I don't sound lazy, but: Clojure was simply a lot less effort to get productive with.

<comment><USER3> Clojure brings a REPL, which is a huge bonus to productivity with the JVM ecosystem.

It also brings a simple syntax (verb stuff more stuff), and some easy ways to extend and interact with libraries such as SWING.

<comment><USER4> Scala also provides a REPL

<comment><USER5> It is certainly weird how this traffic of badly informed Lispers preaching their language in unrelated language topics has increased in the last few months...

Did some people just not get Rich Hickey's memo or are they unable to drop their old Common Lisp habits?

</comment></comment></comment></comment><comment><USER6> Working on a Scala book is probably be easier than improving the compiler, ecosystem, etc.</comment>


Is It Basketball, or Socialism? - <AUTHOR> https://www.nytimes.com/2020/06/29/opinion/income-inequality-nba-socialism.html <comment><AUTHOR> The NY Times looks at how the NBA keeps rich teams from using their wealth advantage to rig the sytem in order to keep the league competitive, and uses that as a lense to look at income inequality and the role of redistributive policies in America in creating a fair playing field.

<comment><USER2> kyrie irving made waves asserting that the players could form their own league and keep all the profits for themselves.

he elides how difficult that would be, even for a bunch of millionaires, in the face of a bigger bunch of billionaires and the massive power structures behind them, but i applaud him for having the gall to put it on the table.

it takes the likes of an extraordinary talent like michael jordan to break the color barrier of nba owners, whereas white folks can just inherit teams and/or the wealth to buy them.</comment></comment>


Apple adds U2 SOI removal webpage - <AUTHOR> http://www.bbc.co.uk/news/technology-29208540

<comment><AUTHOR> I would just like to point-out that there's incredible phishing opportunities with this. The page asks for iCloud username + password, and is a 'hot' news topic.</comment>


VNC Viewer for iOS 3.9.0 – An Apology - <AUTHOR> https://help.realvnc.com/hc/en-us/articles/360007363278-VNC-Viewer-for-iOS-3-9-0-an-apology <comment><AUTHOR> For context, VNC Viewer iOS Version 3.9.0 released yesterday April 2, 2020 and is still the current version on the app store. This is the changelog:

VNC Viewer for iOS 3.9.0 released This is a release of VNC Viewer for iOS devices, used to control remote devices running a VNC server. Search "RealVNC" in the app store.

This is a small update, but an important one. For our users who are connecting to non-RealVNC servers, a subscription to VNC Viewer for iOS is now required for an ad-free, smooth connection. You will see a prompt on your screen with two options: watch an ad or subscribe.</comment>


Kashmir's new status could bring West Bank-like demographic change (2019) - <AUTHOR> https://www.washingtonpost.com/world/2019/08/08/kashmirs-new-status-could-bring-demographic-change-drawing-comparisons-west-bank/ <comment><USER2> If WaPo was any less hinduphobic and slightly more honest, the headline would have been "Finally Justice for Kashmiri Hindus who were brutally driven out of their own homeland by Islamic extremists backed by pakistan"

Justice For Victims of Kashmiri Hindu genocide.</comment>


Show HN: A DNS over HTTPS proxy in 80 lines of Golang - <AUTHOR> https://github.com/satran/dohproxy <comment><USER2> I've been running doh-client from [https://github.com/m13253/dns-over- https](https://github.com/m13253/dns-over-https) on my EdgeMax router, listening on localhost with dnsmasq listening on its LAN interface and configured to use doh-client. I have doh-client pointed at Google's name service. It's worked quite well since I set it up a few months back.

Cloudflare's lack of EDNS0 Client Subnet makes it a non-starter for me. In my past experience that totally breaks AppleTV streaming from Akamai.

</comment><comment><USER3> This will only work with DoH servers which support the UDP-wire format. Cloudflare supports the UDP-wire format. Google does not.

<comment><AUTHOR> The RFC doesn't state any other format. I believe google servers are not complaint yet.

<comment><USER4> IIRC Google's implementation is more of a "DNS as JSON over HTTPS" while the RFC standardizes "DNS wire format over HTTPS".

I believe Google implement theirs first but I also think using the RFC format is easier (as evidenced by the OP tunnel)

<comment><USER3> There is no RFC. There is an internet draft making its way through the DNS over HTTPS working group.

The current draft requires support of the application/dns-message media type which is basically an standard dns request base64 encoded. The draft also allows for other media type but does not define them.

Although the Google implementation isn't compliant with the draft since it significantly pre-dates efforts to standardize dns over https, a draft compliant server can accept and return JSON formatted queries.

I will agree that the dns-message format is easier in the case of a traditional dns resolver but it is not easier in all cases. JSON is easier for a web app to produce and consume which is the use case the Google dns over https project was originally designed to address.</comment></comment></comment></comment>


Software Defined Radio based on DVB-T USB sticks - <AUTHOR> http://sdr.osmocom.org/trac/wiki/rtl-sdr

<comment><USER2> How does it effect Per Vices, the Y-combinator graduate?</comment>


PSD to HTML is not dead - <AUTHOR> http://xhtmlized.com/blog/psd-to-html-is-not-dead/ <comment><USER3> This is a high-brow flame war. The last post bothered me, and this one bothers me all the same. Let's cut the shit for a minute and examine the lay of the land.

"PSD to HTML is dead" panders well to developers. But it doesn't make it true. Let's dig a little deeper into why a developer may want to believe that the incredible toolset contained within Photoshop is completely useless and unnecessary: _The inability to use Photoshop._

No one is slicing and cropping a PSD into images anymore. If there are still some who believe that, you need to spend some time talking to designers and front-end web developers. There's really no excuse for this misinformation.

I'm not arguing _for_ Photoshop here. I'm arguing for a design _reference point_ – something that has been created by a (web/UI) designer, for the purposes of _reference_. It can be a piece of paper, Photoshop, etc. Photoshop makes it easy to manipulate a design. That's it – the central reason for using Photoshop. Moving divs around, adjusting CSS or erasing pencil off a piece of paper is never going to be as efficient as clicking on a layer and moving, resizing it, etc. That's just the reality of why Photoshop is used. This "debate" is reckless abandonment of logic, or simply passive-aggressive anti- design irreverence.

When a front-end/UI developer has a reference for their layouts, it allows them to skip over "where does this go?" and get to their _actual_ job. Some developers are agile enough to extrapolate other form factors based on how the design is structured. Some developers need a desktop, mobile, and tablet design to reference. At the end of the day, _no one is slicing images_. I am just trying to understand what the actual argument is.

I can only assume that most would agree that an architectural design is essential for constructing a building. Are we really arguing that we don't need a solid foundation to start building from?

<comment><USER4> tl;dr Use Sketch if you're on a Mac

I agree with most of your points except this:

>>Moving divs around, adjusting CSS or erasing pencil off a piece of paper is never going to be as efficient as clicking on a layer and moving, resizing it, etc.

As a visual designer and front-end developer (that knows Photoshop very well), code is actually far more efficient for modern UI's. It's much better organized than the PS layer model, CSS gives you tremendous reach with your changes (especially with SASS/LESS), and Developer Tools (or Firebug) give you amazing reactivity.

However, that being said, the designer must have both design skills and coding skills, which aren't, and shouldn't both be a requirement for the position. The most creative and best graphic designers _tend_ to not know code well enough to become more efficient with it than their traditional layout tools.

The best middle ground for "thinking for UI" and quality graphic design is Sketch. Sketch eliminates 80% of the stuff you never use in PS for web design and adds the features you didn't know you wanted. Its styling options reflect the styling options of CSS. I can't recommend it highly enough.

Honestly, unless you have some very complex personnel issues, every web designer should be using Sketch over Photoshop (and maybe use Photoshop for image manipulation).

<comment><USER5> I LOVE Sketch. It's so good. What's lacking are proper video tutorials for complex things and different subjects. I'd love to see an hour long video of someone vectoring something or designing a mobile app from start to finish.

Started using Sketch a few weeks back, never went back to Photoshop.

When I design, I usually just have livereload running with my website on my right monitor and code in my left. Ctrl+S = refreshes the site = very easy to develop with just html/css.

</comment></comment></comment><comment><USER6> The problem seems to be how "PSD to HTML" is defined. The old definition of PSD to HTML frankly may have died about the time we stopped using tables to create designs in HTML.

In the yesteryears _" graphic"_ designers designed pixel perfect designs in Photoshop and expected _web designers_ to convert these to xhtml/css.

It was a royal pain in the ass. I have been on both ends of this.

But things are very different now, the old definition of "PSD to HTML" has died or rather evolved.

I still create the first drafts of the desktop design in Photoshop, its simply easier to do when you'd like to try various designs. But hand code it from there. No more splicing etc.

This process also makes it easier for me to visualize the code structure for mobile first(in my mind).

</comment><comment><USER7> Says the company whose entire business model is built around PSD to HTML conversion.

Sometimes one works better than the other for a project's specific needs. And vice versa. What we _are_ needing to get past is pixel-perfect design, however.

<comment> johnx123-up Not sure if it is dead or alive. But, the business is extremely challenging with players like cssilize. they charge peanuts with pms and automated quality checks.

<comment><USER8> Pay peanuts you get monkeys.

They charge $19 PER PAGE just to have "permission" to remove their name. That should be all the proof you need of their business model.

If you need more though, the "$39 a page" actually ends up being $254 a page, if you want..

* responsive.. * tested/compatible with Chrome, Safari or Opera... * accessible * commented css * commented markup * using a css grid framework * html5 * microformats * speed optimisation * sprites * a favicon * PERMISSION TO REMOVE THEIR NAME FROM THE PAGE

This is why people think "PSD to HTML" services are a thing of the past - operators who are stuck in the past and think using modern standards is a reason to charge 2x or 3x the stated price. Seriously look at their pricing page - they add the per-page price again just to use HTML5 instead of XHTML Transitional, and again to use a CSS grid framework.

<comment> johnx123-up FWIW, I had a very good personal experience with CSSilize in last 2 companies here. I can understand why they charge $19 to remove their name (it is a very good marketing strategy, IMHO). But, they're still cheaper with additional $19 and efficient (for instance, the real time updates and ability to "control" the project through their pms are really mesmerizing)

</comment></comment></comment></comment><comment><USER9> So some folks like doing it one way, others like doing it another. Both groups think their way is better, and can give arguments in their favour.

In reality, the right decision comes down to the project goals, the deadlines, the budget, the resources, the staff, and many other factors.

This whole 'debate' has about as much depth as "should I put ketchup or barbecue sauce on my chips?".

<comment><USER10> Top comment. None of this _really_ matters. Your craft, is your craft, is _your_ craft.

More on this (from a programming perspective): [http://vimeo.com/54042336](http://vimeo.com/54042336)

</comment></comment><comment><USER11> A designer I work with hands me AI files that I'm then meant to convert to a WordPress theme. She knows near zero about coding. It's a nightmare and I'm constantly in battle of functionality and her wanting things pixel perfect. The worst is that she hands over the designs to the clients who do not understand that it will not be pixel perfect and many things will change.

<comment><USER12> Hey, that's 90% of my business. At least it is an Ai file and you can pull SVGs out of it if that's your thing. You're right that it's no fun.

At some point, I decided that I'm okay with that battle (there's a lack folks who have both the skills and the masochistic willingness to do it, and I charge a relative lot for the service).

That said, I've been finding that a) designers who still really care about "pixel perfectness across devices" but don't know how to code usually aren't all that great (so I see fewer of them as move to better projects) and b) the ones that are really good also have an understanding about how the finished product should feel and will change across devices/screens sizes/etc (and what kinds of crap I might need to add because they have missed or omitted some functionality.

I've found it really helpful that the poorer designers can't think about the edge cases (or even to send a post archive or 404 page, in the case of WP sites), so I end up just doing whatever, and then iterating based on my own preferences... if they really don't like it, it's not my fault, they just send a design.

It's still all a pain in the ass, but at least I work remotely, for a few hours, and get paid okay... I just have to be okay with folks telling me to fix the "horrible looking mistakes" I did intentionally but which don't match their (non-obvious, often poorly thought-out) aesthetic bends.

</comment></comment><comment><USER13> The definition of PSD to HTML used is just too lose. PSD to HTML will never be dead because images are the best medium to exchange visual ideas. Which, in the case of Web, are translated to HTML. So yeah, we will be using PSDs and translating them HTML in some way or another for the foreseeable future. Simply the good designers are evolving and more aware of what's doable, what's doable but pain in the ass to do, and what's not doable. And that's enough. I don't expect, and don't want, the designer to give me the design in HTML/CSS unless he/she is an expert in them for a bunch of reasons.

I believe that more or less sums up the sensationalist headlines.

</comment><comment><USER14> Look, designers can stick to making the website look amazing in photoshop, but let the engineers actually tell you what's possible or not using simple, responsive practices. Don't expect pixel perfect, do expect lean websites built to last.

<comment><USER15> It is always fun to discuss with customers that expect pixel perfect designs, to the point that they actually measure them it all browsers specified on the contract.

Thankfully, I am not the one usually sitting in those meetings.

<comment><USER16> But what pixel perfect means in fact? That it looks as it was supposed to. If I'm a designer and design something which looks perfect, do I want a coder to alter this perfect look to something ugly?

Ideally pixel perfect is replaced with "looks perfect" and designer works closely with coder to achieve perfect look on various devices and resolutions. But I don't think coder should make assumptions how the coded design can differentiate from the original design (unless they have very good aesthetics feeling).

<comment><USER15> Well, on those meetings means that someone on the customer side had the wonderfull job of using an on screen pixel ruler and counted the exact number of pixels.

Pixel count not the same as on the PSD image, across all targeted browsers? No money, even if it is only 1 pixel.

As ridiculous as it sounds, I do know a few of such cases.

</comment></comment></comment></comment><comment><USER17> Now that we finally have effects like shadows, gradients, and rounded corners in CSS, the trend is towards flat design. Some webpage layouts I made ten years ago look surprisingly modern again.

</comment><comment><USER18> The typical PSD to HTML approach will evolve over time to {insert-tool}2 HTML. Since web design was a big boost for Photoshop over the years, Adobe is not going to let that audience disappear without a fight. Their Edge tools, such as Reflow ([http://html.adobe.com/edge/reflow/](http://html.adobe.com/edge/reflow/)) are the response to this trend.

Although typical all-in-one design/developers might prefer mocking-up and developing in straight HTML/CSS, there will always be a large audience that prefers visual tools. The opportunity is there for other companies to fill this need--Sketch.app comes to mind. Frameworks such as Bootstrap, Foundation, Skeleton, etc. also fill some of the demand.

Responsive design is still new to many and designers will still use Photoshop for quite a while.

</comment><comment><USER19> > Adobe is trying to overcome Photoshop's limitations for modern web design.

So Adobe has realized that PSD to HTML workflow is dying and tries to develop tools for the modern web workflow to stay relevant. I don't get how this argument supports author's assessment.

On the other hand external services like xhtmlized are a great way to push a website out of the door when you're an agency rooted in marketing/visual design and need to add a website to the package to get the deal. Your designers do the design, then a professional service like this will make the final product orders of magnitude better than what you could achieve without internal dev team.

<comment><USER8> The argument is that having a dedicated design stage before converting to templates/app/etc is still valid. Just because that button in the PSD is a rasterized gradient, doesn't mean the resulting page will have an image - <USER2> it does mean the developers writing the HTML CSS and JS have a solid design to work from, that the client has already approved.

Do you somehow think that because the PSD to HTML process starts with a PSD file that the output is necessarily going to be a) fixed dimensions and b) lots of images? If so, I have some news for you...

<comment><USER19> Converting PSDs to HTML/CSS has been my job for the past ten years. The "PSD that client has already approved" is part of the problem, because what's been approved is a picture of the website which may be very close to reality under some circumstances, but not necessarily what's going to be rendered on an ancient corporate workstation with IE7 which, by coincidence, is what the client uses to test the website.

Now the workflow slowly evolves and Photoshop mock-ups are still part of it, but what the client accepts is the visual style, mood, UX, content strategy etc. The design team provides style guides, graphical assets, some key components. The UX team may provide a clickable prototype or just sketches of individual pages. Front-end devs build HTML/CSS components, then individual page templates which are usually integrated with server-side logic and filled with content. Everyone can be involved at any stage so it's not a typical waterfall process, rather combining the expertise of different professionals to deliver the best product.

</comment></comment></comment><comment><USER20> Personally, I feel like the author is trying to suggest that something like Photoshop is an easier way to build a UI due to the somewhat drag-and-drop nature as well as the instant ability to view the result. Right now, I think both of these are trumped by modern tools: CSS's exactness and variety of properties now allow for more precise design decisions in terms of layout and structure, and its actually faster to develop in the browser iteratively using the DevTools, being able to see the final product.

</comment><comment><USER15> What about those IT departments that do Powerpoint to HTML? :)

<comment><USER12> LOL, but I'm working on a web application whose only graphical reference is PPT... and I've done it before. Bizarre, but I suppose it's better than having a scan of a sketch on a napkin from a bar.

</comment></comment><comment><USER21> >do we really think that Adobe isn't aware that Photoshop is becoming less suitable for modern web development process? Do we think that they will just sit there and watch their flag-ship and de-facto standard in web design become a plain photo editor?...All these actions show that Adobe is trying to overcome Photoshop's limitations for modern web design.

If your business depends on Adobe's competence you may want to have a contingency plan.

</comment><comment><USER22> Hahaha. Someone feels threatened. I guess they will always ave business with those who can make gradient buttons in Photoshop, but not the actual CSS for it.

</comment><comment><USER23> So it's just pining for the Fjords? No - it's dead and responsive and mobile load times in the graphic heavy sites it produced have killed it.

<comment><USER8> Did you even read the linked post?

Modern "PSD to HTML" is not about slicing up an image to create image based templates any more than it is about table based layouts.

</comment></comment><comment><USER24> The concept of psd to html is dumb from the start.

I would not hire one translator to translate from Russian to English, when the Translator only barely understands English, and one other second translator who Fixes the first translators work.

</comment><comment><USER25> If you are designer looking to get off the 'PSD to HTML' train, this is the perfect resource for you:

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

</comment><comment><USER26> What is needed I think is some sort of visual design tool, maybe not full WYSIWYG which respects and understands template languages rather than bulldozing everything.

<comment><USER13> IMHO, frameworks such as Bootstrap would fit your definition of WYSIWYG pretty well.

<comment><USER26> What I'm thinking of would be a visual editor that works with things like bootstrap.

<comment><USER20> [http://divshot.com](http://divshot.com) is a good tool, and it integrates with its own hosting platform as well at [http://divshot.io](http://divshot.io)

</comment></comment></comment></comment><comment><USER27> [http://snugug.github.io/designing-the-modern- web/#/](http://snugug.github.io/designing-the-modern-web/#/)

<comment><USER8> I assume that is from a talk/presentation somewhere?

Frankly those slides are nothing but a series of buzzwords and catch phrases - why even both to publish it, if any useful content is lost without the author adding content verbally. (S)He did add content verbally, right?

</comment></comment><comment><USER28> Eew, it's like they're bringing back Dreamweaver with all those code generators.

</comment><comment><USER29> Sorry to disagree, but it is dead, at least to me.

</comment><comment><USER30> Blog posts about PSD to HTML are not dead.

</comment><comment><USER31> Some necrophobes earn their own fates.

</comment><comment><USER32> I wish it would die.

<comment><USER33> xD</comment></comment>


EU Parliament committee votes against air passenger data sharing bill - <AUTHOR> http://www.cio.co.uk/news/compliance/eu-committee-votes-against-air-passenger-data-sharing-bill/

<comment><USER2> "Idealalogical dogma" is a strange way to describe personal privacy.</comment>


Replaced JS with HTTP request - <AUTHOR> https://github.com/jsdelivr/jsdelivr.com/commit/c958acc742a1bb8d2966ff48a09632284e1dfa05

<comment><USER2> I'm very wary about loading JS from random CDNs. In my opinion, the negative aspects outweigh the benefits by far:

      - The CDN gets to decide *what* code is delivered to *which* users. Could be a prime target for, say, another FERRETCANNON.
      - If the CDN is compromised, so is your site.
      - If an attacker on a local network manages to inject poisoned cache data into requests for said CDN, your site is compromised.
      - All of your visitors are disclosed to the CDN owner.
      - If the CDN goes down, your site does so, too. Note that the inverse doesn't apply: the CDNs superior availability has no positive effect on your site.
      - Loading from another host may cause an unnecessary DNS lookup and will cause an unnecessary TLS connection.

<comment><USER3> What is FERRETCANNON?

<comment><USER4> I'll take stupid NSA codenames[1] for 10 points, please, Alex.

[1] [http://www.theatlantic.com/technology/archive/2013/10/how- th...](http://www.theatlantic.com/technology/archive/2013/10/how-the-nsa- thinks-about-secrecy-and-risk/280258/)

</comment></comment></comment><comment><USER5> The link title is missing the operative word "single". It's about changing the number of requests, not the type of request.

<comment><AUTHOR> I know. I am 100% sure I copy pasted the title from git but it somehow changed by itself.

<comment><USER6> HN changes titles to match the source title

<comment><USER7> But the source title is in fact more precise this time: "Replaced js with 1 single HTTP request".

</comment></comment></comment></comment><comment><USER8> Doesn't this defeat one of the purposes of Javascript CDNs, that the user already has the exact url cached on their machine?

<comment><USER9> I'd say it's more like a tradeoff than defeating the purpose.

And not as much of a tradeoff if a lot of nearby visitors have also visited the same site, or users visit it frequently.

</comment></comment><comment><USER10> What would be cool is <script sha="2afdb28d" name="angular.js" version="1.2.10" src="xxx"></script>

This would mean that browser can essentially cache the exact version of the script from _any_ source, verify it with a hash, and still have a fallback URL to download it from.

<comment><USER11> But then the game would be to find an hash collision with a malicious code :)

<comment><USER12> It should definitely require the full hash. And to make it generic...

<script hash="sha-1/fa26be19de6bff93f70bc2308434e4a440bbad02" name="firstname.lastname@example.com" src="xxx"></script>

The name attribute would be purely aesthetic, so no reason for a version attribute. SHA-1 is good enough for git content-addressed-storage, it's good enough for browsers.

</comment></comment></comment><comment><USER13> In my opinion Google Hosted Libraries[1] are the best way to go if you're serving "big" commonly used JavaScript libraries to folks.

One of the major upsides is that it's so heavily used, that a user probably already has it cached in their browser. At least that's the idea, not sure of actual numbers.

[1]: [https://developers.google.com/speed/libraries/devguide](https://developers.google.com/speed/libraries/devguide)

<comment><USER14> And we add another nail in the "decentralized" web's coffin and give Google even more data.

Hosting a 32kb library yourself shouldn't be that hard in the days of 50mbps+ LTE mobile internet.

<comment><USER15> I agree with this sentiment.

For development purposes ('grab the latest version, from Google because it's convenient') I'd go with Google, for a production deployment not so much.

</comment></comment></comment><comment><USER16> Ah, the mythical HTTP batch GET.

Last time I tried this, I ran into the problems of 1) unbounded URL length breaking down in old browsers, routers, etc. and 2) hobbled caching. (And also going against the grain of REST.)

I'd be interested if anyone has actually done something like this successfully. Did you have the issues I did? Was it worth it?

<comment><USER17> I don't think getting "batch" resources is against REST, Fielding himself stated that it's not a problem as long as the URL for the batch is consistent -- the batches are just separate resources, although they might have special semantics to the client.

</comment></comment><comment><USER18> This defeats the purpose of defer and async [1]

[1] [https://developer.mozilla.org/en- US/docs/Web/HTML/Element/sc...](https://developer.mozilla.org/en- US/docs/Web/HTML/Element/script)

<comment><USER19> How so? It's the same as the old HTML, but with fewer round-trips.

<comment><USER20> defer and async are about eliminating round trip latency by opening multiple simultaneous http connections. Multiple TCP streams are sometimes faster than one. (I say sometimes, because negotiating a new connection has an overhead)

<comment><USER21> But then they are not loaded in sync. That's not the purpose here. Works for some situations.

</comment></comment></comment></comment><comment><USER22> Great, but instead, I'll take parallel files over SPDY, any day.</comment>


Ask HN: How to quantify that a team is overworked - <AUTHOR> As the title says, my team has way too much on our plate and I am trying to make the case for hiring another developer, but I'm struggling to find a way to quantify the problem for management.<p>Any advice or strategies that have worked well for others? <comment><USER2> I give a talk on programmer productivity a few times a year, and measuring it (related to this) is very hard. That said, there are a few things worth keeping an eye on.

The biggest is turnover. Are people quitting because of workload or general dissatisfaction? Turnover is crazy expensive (I should know, I'm in staffing.)

You have others related to technical debt, which is what you get when people are overworked.

\- Estimate accuracy (estimate vs. actual). Are you increasingly surprised at how long things take?

\- average hours per issue (not great, but worth keeping an eye on)

This assumes you've got good practices like issue tracking, estimates, etc.

</comment><comment><USER3> Some relevant numbers could be:

\- size of backlog

\- overtime

\- time new requests spend in queue

\- cost of delays to the business

<comment><USER4> A lot of those sound like good proxies for technical debt too.

</comment></comment><comment><USER5> If you're into it, do an Agile/XP planning & estimation workflow. You can show that you are being requested to do 30 points of work per week but only achieving 20 points.

<comment><AUTHOR> Our development process is currently fairly unstructured. I think this would be a good way to get a better picture of how we're spending our time, but I'm worried about introducing too much overhead.

<comment><USER6> Would adding structure help in managing the work better?

It can become difficult to convince management of hiring (paying) more people when there are improvements that should be made first.

</comment></comment></comment><comment><USER7> One simple way to measure it is with a feedback loop.

For example if the company starts paying all developers time and a half for hours beyond forty per week then it is practical to measure the amount that the developers work in dollars/pounds/pesos and compare that measurement to the dollars/pounds/pesos hiring another developer would require.

</comment><comment><USER8> My team for essentially solved this problem by using a time tracker. I highly recommend trying out toggl

</comment><comment><USER6> \- Determine who you need to convince on this matter

\- Find out what metrics they care about (time lost, money lost, potentially employees lost, clients lost).

\- Formulate your proposal in a way that emphasises how those metrics will improve by hiring more developers.</comment>


Ask HN: Hacker News for blockchain and related technologies? - <AUTHOR> I saw some older submissions that reference crypto.study but it seems that one is dead. Is something like this out there? <comment><USER2> [https://cryptopanic.com/](https://cryptopanic.com/) is a nice concept, definitely could use some more activity though.

</comment><comment><USER3> Why? Is there that much going on?</comment>


Nest Cams now try to detect if that thing moving around your house is a person - <AUTHOR> https://techcrunch.com/2016/07/14/nest-cams-can-now-try-to-detect-if-that-thing-moving-around-your-house-is-a-person <comment><USER2> I wrote something like this a few weeks ago to detect which animal is at the door:

[https://medium.com/@LastZactionHero/zookeeper-identify- pets-...](https://medium.com/@LastZactionHero/zookeeper-identify-pets-with- neural-networks-6a039f85b2e3)

</comment><comment><USER3> Okay so i'll have to dress up like a household object during my next breakins, anybody know where you can buy a Halloween rumba outfit? :)

</comment><comment><USER4> Open the Door Hal, its my spouse, she wants in.

> Im sorry, but your true love is allready home.

Turns down the heat in the stairwell.

Do we really have to humilate burglars into prentending to be dogs?</comment>


Deep Neural Networks Improve Radiologists' Performance in Breast Cancer Scan - <AUTHOR> https://medium.com/@jasonphang/deep-neural-networks-improve-radiologists-performance-in-breast-cancer-screening-565eb2bd3c9f <comment><USER2> code and trained model: [https://github.com/nyukat/breast_cancer_classifier/blob/mast...](https://github.com/nyukat/breast_cancer_classifier/blob/master/README.md)

, not full dataset.</comment>


The Night the US Bombed a Chinese Embassy - <AUTHOR> https://www.bbc.com/news/world-europe-48134881 <comment><USER2> If - and this is a very, _very_ big if - if the US bombed the Chinese Embassy deliberately, what would be their motive? What would they stand to gain by destroying the embassy?</comment>


Ask HN: Did GitHub just change the default link color? - <AUTHOR> Did Github switch from a lightweight blue/gray to blue/purple link color? The folder icon also changed. Why the strong colors? <comment><USER2> My eyes feel kinda uncomfortable after looking at it, perhaps they are just playing with designs

</comment><comment><USER3> Yep, they're now using a darker blue. At first I thought it was flux :D

</comment><comment><USER4> Yes, looks like they made colors throughout the site more vibrant. The new colors are slightly straining to look at, especially with brightness at 100%. Maybe I'm crazy?

<comment><USER5> You're not crazy. I think the people who want such colors (which I'm guessing is a very small minority) should use a custom css, instead of straining the eyes of the majority of users.

</comment></comment><comment><USER6> This change is so frustrating, I can barely look at these blue links. What is happening in Github, did they just launched a new UED head?

</comment><comment><USER7> Yeah, they had such nice colors for so long. All of a sudden they subtly tweaked all the colors to be awful :(

</comment><comment><USER8> Lots of small incremental changes; buttons, inputs and textareas (different hover/focus styles), ... Not surprising considering they rolled out the new header not too long ago.

</comment><comment><USER9> I thought there was something wrong happened on my monitor.

</comment><comment><USER10> The new green color in pull requests kind hurting my eyes.

</comment><comment><USER11> I'd just upgraded to Sierra and wasn't sure if color profiles for monitor had changed or something.

</comment><comment><USER12> This is awful. How did they come up with that?.. Reminds me of pre-Web2.0 internet.

</comment><comment><USER13> Horrible. What's happening to github!

</comment><comment><USER14> Flash on my eyes, when I opened github today.

<comment><USER15> Me to.

How can we ask them get back the previous color.

Thank you.

</comment></comment><comment><USER16> what have they done. This looks like a party blue.

</comment><comment><USER17> current web design trend is using the most annoying / eye hurting colors possible.

</comment><comment><USER18> Just thought the same thing.

</comment><comment><USER19> GitHub should fire their style engineer immediately.

This color scheme is literally XP.

<comment><USER20> c'mon why so serious, it's so easy to ask to fire someone. Do you really think the style engineer just pushed the update all by himself without anyone taking a look at it?

<comment><USER21> I see no other explanation.</comment></comment></comment>


The oddball history of the 80/20 rule - <AUTHOR> http://blog.emphatic.co/you-know-all-those-things-you-think-you-should-do-you-dont?utm_source=HN&utm_medium=Sub&utm_campaign=429HN1

<comment><USER2> With the URL "[http://...?utm_source=HN&utm_medium=Sub&utm_campaign=429HN1"](http://...?utm_source=HN&utm_medium=Sub&utm_campaign=429HN1"), I have the funny feeling someone wants to see how useful HN is for getting traffic.

The earlier link from interpares to emphatic.co also something which looks like tracking information.</comment>


The Future of APM (2020) - <AUTHOR> https://haydenjames.io/asked-apm-companies-about-the-future-of-apm/ <comment><USER2> And not a single mention of honeycomb.io</comment>


Ask HN: Are My iOS Launch Goals Too Crazy or Not Crazy Enough? - <AUTHOR>

I'm planning on launching my bootstrapped social app on iOS in September and wanted to share my goals for the first couple of months and get opinions on whether the goals are too crazy or not crazy enough.
End of 1st Week = 25,000 Downloads Reached.
End of 1st Month = 100,000 Downloads Reached.
End of 1st Month = Hit 10,000 Daily Active Users.
End of 2nd Month = 250,000 Downloads Reached.
End of 2nd Month = Break into Top 20 in Music Category at least once.
The app will be free and the initial marketing budget is $10,000. I plan to hit these goals by running a targeted Facebook Mobile App Install Ads campaign, running a Cross-Promotion campaign using http://Taqdaq.com, a Twitter Mobile Install campaign, hitting social media as hard as I can, and reaching out to the relevant members of the press who cover this type of app.
If some or all of those goals are achieved, are those numbers that would interest any Angels in today's climate? Thanks! <comment><USER2> you crazy. Try hitting 1000 in the first month and retaining 1k mau 3 months in.

<comment><AUTHOR> :-) So then it sounds like if I do hit those crazy goals, it would be something that could pique the interest of angel investors?

<comment><USER2> Can't hurt. But there's no guarantees.</comment></comment></comment>


Alfa: An Alternative to Redux or Mobx - <AUTHOR> https://github.com/lsm/alfa/blob/master/README.md <comment><USER2> Looks interesting - Apart from not requiring an additional file, what are the main improvements over connect()ing state to containers with redux?

Edit. isn't updating the store on internal state (albeit not via setState, but it's functionally the same) change essentially 2way data binding? One of the things I hated most about knockout.js was funky state stuff when arbitrary components were asynchronously updating common state .

Am on my phonio tho so I may well have missed something critical here!

</comment><comment><AUTHOR> 30 seconds Gif demo:

[https://github.com/lsm/alfa/blob/master/docs/alfa.gif](https://github.com/lsm/alfa/blob/master/docs/alfa.gif)</comment>


BBC Worldwide Labs: A Mentoring Scheme for UK Startups - <AUTHOR> http://thenextweb.com/uk/2012/06/16/bbc-worldwide-to-launch-labs-a-mentoring-scheme-for-uk-digital-media-startups/ <comment><USER2> Great to see this. The BBC's overdue - my startup received funding from 4iP, Channel 4's creative fund, but looks like this is going to be a little more involved. Hurrah for one more option for creative UK startups!</comment>


Just Run - <AUTHOR> http://justrun.co/

<comment><USER2> I like the message, except for the fact that it limits itself to _young_ entrepreneurs.

</comment><comment><USER3> Just remembered Forrest Gump.</comment>


The Internet of Kafkaesque Things - <AUTHOR> https://www.aclu.org/blog/technology-and-liberty/internet-kafkaesque-things

<comment><USER2> FTA:

        Just one example: a federal judge haunted by a
        55-year-sentence he was forced to give a 24-year-old
        convicted of three marijuana sales.

And from a link in the sentence above[1]:

        "I do think about Angelos," said Paul Cassell,
        a now-retired federal judge in the Utah circuit.
        "I sometimes drive near the prison where he's held,
        and I think, 'Gosh he shouldn't be there.
        Certainly not as long as I had to send him there.
        ... That wasn't the right thing to do.
        The system forced me to do it."

Notably, this is the same system he remained a part of for a few more years, until finally quitting in 2007 because of low judicial pay[2], as opposed to, y'know, making a principled stand against unjust minimum sentencing requirements.

Cassell also mentions that Angelos' incarceration puts a significant burden on taxpayers:

        "I thought the sentence was utterly unjust to
        Weldon Angelos, but also unjust to the taxpayer"

And yet, he's still a proponent of capital punishment[3], which costs taxpayers even more than imprisonment for life[4].

[1] [http://abcnews.go.com/US/federal-judge-regrets-55-year- marij...](http://abcnews.go.com/US/federal-judge-regrets-55-year-marijuana- sentence/story?id=28869467)

[2] [http://blogs.wsj.com/law/2007/09/21/judge-paul-cassell- resig...](http://blogs.wsj.com/law/2007/09/21/judge-paul-cassell-resigning/)

[3] [https://web.archive.org/web/20150107005109/http://www.reuter...](https://web.archive.org/web/20150107005109/http://www.reuters.com/article/2015/01/06/us- andrew-lawsuit-dershowitz-idUSKBN0KF0DH20150106)

[4] [http://www.deathpenaltyinfo.org/costs-death- penalty](http://www.deathpenaltyinfo.org/costs-death-penalty)

<comment><USER3> > as opposed to, y'know, making a principled stand against unjust minimum > sentencing requirements.

While occasionally highly effective, it should be remembered that falling on your sword is not generally an effective way to make a significant difference in a large system.

What do you think the judge should have done, bearing in mind that resigning in protest would almost certainly have resulted in little but his replacement?

<comment><USER2> A Bush 43 appointee and former Scalia clerk resigning in protest over what he sees as unjust sentencing, and perhaps working for the ACLU, like Steve Schmidt did on same-sex marriage would have sent a powerful message and also perhaps done some good by virtue of having a clearly very skilled legal practitioner working to change laws he found wrong.

<comment><USER3> It would have sent a very powerful message to those already listening and looking to agree with it. It would not have sent a meaningful message to most, who would have never encountered this hypothetical message.

<comment><USER4> That is generally the nature of "powerful messages". If you're advocating change, most of that time will be spent talking to people that don't, won't listen. If not, change would already have happened.

<comment><USER3> That's not the nature of activism, friend. If you're spending most of your time talking to people who don't or won't listen, it's because you aren't communicating effectively. People listen when you communicate effectively.

That said, do not ever confuse people listening for people agreeing. They are very different things. Just because someone honestly listens to you does not mean they will come to agree with you.

Also, people listen when you are willing to listen to them. Too many "conversations" are thinly veiled preaching.

</comment></comment></comment></comment></comment></comment><comment><USER5> _Bureaucracies are constituted by humans, however, and not all humans cower in the illusory shelter of objective process. As a result, bureaucracies often have something that computers do not: logical escape valves. When the inevitable cases arise that break the logic of the bureaucratic machine, these escape valves can provide crucial relief from its heartless and implacable nature. Every voicemail system needs the option to press zero. Escape valves may take the form of appeals processes, or higher-level administrators who are empowered to make exceptions to the rules, or evolved cultural practices within an organization. Sometimes they might consist of nothing more than individual clerks who have the freedom to fix dumb results by breaking the rules. In some cases this is perceived as a failure—after all, making an exception to a rule in order to treat an individual fairly diminishes the qualities of predictability and control that make a bureaucratic machine so valuable to those at the top. And these pockets of discretion can also leave room for bad results such as racial discrimination. But overall they rescue bureaucracies from being completely mindless, in a way that computers cannot be (at least yet)._

I wonder what the best way to add an "escape valve" like this to a computer system would be. A chat box where you can talk to a human who has administrative power over the computer system? A way to write freeform text that someone will read later?

<comment> rkuykendall-com > A way to write freeform text that someone will read later?

I find including your email address prominently on the website works this way. Even though there is a bug tracker and forums, the "Send me an email" link on one of my webapps has been fantastic. Talking with people can uncover bugs and solve simple problems you otherwise would have missed. But normally, you just get to talk to someone using your website, which is even better!

</comment></comment><comment><USER6> I didn't like much about _Elysium_ but found the parole "officer" depicted to be both eerie and prescient.</comment>


How Language Influences Emotion - <AUTHOR> http://www.theatlantic.com/health/archive/2015/12/the-book-of-human-emotions-language-feelings/420978/?utm_source=SFFB&single_page=true <comment><USER2> I think it's pretty well established that different languages create different personalities within individual, and that includes emotions. Ever noticed how it's easy to express certain things in one language, but difficult in another, even you technically know how to do it? That's the reason why.

<comment><USER3> "Well established" is a strong statement:

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

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

In short, current consensus is that there is some relation to language and it's role in shaping thought, but the extent is not nearly as great as the strong Sapir-Whorf hypothesis originally posited.

<comment><USER2> Well I meant the "weak" version, which states language only influences thoughts and stuff. Which I would still say is a personality change. Thank you for links, though.

</comment></comment></comment><comment><USER4> Interesting read. Thanks for sharing.

Has me thinking about how language in the workplace influences emotion. What workplace emotions have you all experienced? "Looks like somebody has a case of the Mondays..."

Would defining workplace emotions be a good thing? Does it lead to more productivity? How could this affect engagement?

</comment><comment><USER5> There's recent computational research in this area for images too:

[http://arxiv.org/abs/1508.03868](http://arxiv.org/abs/1508.03868)</comment>