CSS Absolute Centering - <AUTHOR> http://codepen.io/shshaw/full/gEiDt <comment><USER3> I have just started doing web programming in the last month after several years of applications programming.

It feels like to me, and someone please tell me why I'm wrong, that the amount of hackery that goes into making webpages look the way web designers want them to is astounding. I google for solutions to various problems and the top rated comment on StackOverflow says "...there isn't a good way to do this in CSS, but here is this hack...".

I feel like somewhere in the universal programming ether there exists a beautiful unification of HTML, CSS, and JS that doesn't rely on any ugly hackery, and it's just waiting to be found and start a brave new world of web programming...

<comment><USER4> I'd love to know why just using tables is wrong.

The user gets what they want, the designer gets what they want, and the only people unhappy are some purists.

why? what about this is wrong?

<comment><USER5> I would have agreed with you maybe 2-3 years ago from a pragmatic standpoint, but the most compelling reason now for not using tables for layout is that they're not compatible with responsive web design. Table cells don't stack and can't be reconfigured like block-level elements.

You can get away with using "display: table-cell;" and the like inside components that are independent of responsive requirements, though.

</comment></comment></comment><comment><USER6> Just in case anyone's unaware... it's entirely possible to vertically center elements of _variable_ height too in pure CSS... it's just "unsemantic", because it relies on the fact that only table cells have "vertical- align:middle".

But that's how I center every one of my "modal dialogs" on a site -- the whole modal dialog is inside a
 with position:fixed and top/bottom/left/right:0. Then, just give the  a "vertical-align:middle", and then put your desired visible dialog
 inside it.

It's annoying to have to wrap something inside of a

 just to vertically center something, but it sure beats using JavaScript to do it. (You might be able to do it just with the display:table-cell property too, but it's been a long time since I checked browser compatibility.)

<comment><USER7>
      > It's annoying to have to wrap something inside of a
      >

 just to vertically center something

And you dont have to. Because your container does not have to be a table, and you don't need cells and rows. Just use display: (table|table-cell). See for an example: [http://css-tricks.com/centering-in-the-unknown/](http://css- tricks.com/centering-in-the-unknown/)

It is not OK to use table and friends in you HTML just for styling purposes. It's totally OK to use display: table* in your CSS, because CSS has no semantics, its purpose is styling.

<comment><USER8> Why is it not okay to use tables for styling purposes? Why is it okay to use multiple nested divs, but not the table/tr/td tags? Are there any practical reasons, besides the goal of making the markup more 'semantic'? Are there any screen readers that can't handle table tags? Or do some crawlers choke on tables?

I keep hearing this dogma, don't use tables for layout, but nobody has ever explained to me why it is a problem in practice.

<comment><USER9> Being "semantic" (your quotes) is not an abstract concept or dogma. This discussion has been exhausted as far back as 2005. A more practical explanation:

HTML is meant to be parsed and interpreted by machines too, with no visual representation. Tags are meta-data about their content. A 'table' element says "I contain tabular data", and user agents will make lots of assumptions based on that. One of the consequences of this is you'll be giving bad data to search engine bots, that's why it's bad for SEO.

HTML is also meant to be used by non-visual interpreters, like screen readers. Assistive technology is not only for the legally blind; visual impairment affects 20-30% of the world's population. We don't see high user %s because they just most won't bother, it's too hard, sites' HTML is broken, it is easier to have somebody look it up for you.

Going on a little more over semantics, there are rules for what elements can contain each other, so that a structure can be inferred based on headings and hierarchy. By not following the rules you are wreaking havoc on this, and preventing aforementioned bots and screen readers from providing meaningful navigation and context for your page.

We were supposed to have a _semantic web_ by now, where every piece of information was annotated with meaningful meta-data, allowing for context- aware applications (add this commenter on facebook; where can I buy this product?; add this event to my calendar). Turns out it's damn hard to get everyone to use markup correctly, or even agree to common formats.

<comment><USER10> > Being "semantic" (your quotes) is not an abstract concept or dogma. This > discussion has been exhausted as far back as 2005

No it really wasn't. A small group of people managed to make it orthodoxy and in the intervening years very few of the supposed benefits have materialised.

In the meantime the same arguments that it is pie-in-the-sky have persisted and events have supported them.

The argument isn't even internally consistent as in the real world people are debating one kind of tag soup vs another. If the only way to create a particular appearance is either using several wrapper divs or a table then you're splitting hairs.

 vs

Is that a semantic difference worth fighting for?

The real gains in the semantic web have come from small targeted blocks of metadata and natural language processing. Not waiting around for everyone to figure out
 vs
 correctly.

<clarification> I'm not arguing against the benefits of semantic markup - <USER2> that a lot of the hand-wavey "this is semantic and this isn't" advice that gets thrown around is either nonsense or adds such a microscopic amount of semantic information that it's not actually providing any benefit to anyone. The real test is to list actual benefits for actual user agents.</clarification>

<comment><USER11> Tables have a well(ish) defined semantics that you're breaking. Those semantics give rise to real practice benefits like navigating via column and row with screen readers or hinting how best to split a table up into multiple pages when printing.

Practically, the way it's ended up, the semantics of a div is "some stuff". It's evolved into the go-to method to hide a multitude of styling sins. I don't think there's anything hugely hypocritical in limiting any ugly semanticless hacks to a single generic container like divs.

Put as much as you can into semantic markup, and then anything else you really can't fit into that, favour using div soup over breaking the semantics of another tag.

<comment><USER12> What about inline elements inside divs? Even the semantic correctness crusaders freely resort to abuse of  and .

HTML lacks extensibility. If you want to move beyond classical typography you have to make heinous compromises, and there is no reason
 should be specially exempt.

<comment><USER11> I agree we have to make compromises because HTML has huge shortcomings. My point, and the point of a lot of people advocating semantic markup, is that if you have to resort to hacks, prefer lots of uly generic containers like divs and spans to misusing things that have better defined semantics that are actually of use to people, like tables. I can't think of anything you can do with tables that you can't do with an ugly mess of divs and a little compromise in cross-browser consistency.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER13> It confuses me that you have to specify things in terms of margins, I understand how that is technically correct but surely something like alignment: center should just align to the center of the parent element?

I've spent hours in the past the past getting correct centring behaviour in CSS, then tried by just putting the whole thing inside  and had it work immediately in all browsers. But apparently that's "cheating".

<comment><USER14> Cheating according to who? Surely not your website's users?

It's the standards makers' fault. Needing to center something on either the x or y axis relative to the parent is as common a scenario as you can get.

<comment><USER13> Well technically the center tag is deprecated so any browser could simply drop support for it (as they did with <blink> in a future version and break the site.

</comment></comment></comment><comment><USER15> OMG, just use a table! It's not semantic but no one will die and your mom will still love you, I promise! And if you are using haml/jade/handlebars whatever it is so insanely easy to create a little mixin or whatever to keep your code clean.

Articles about how to do this should be summarized like this: "Vertical centering hard/hacky/messy unless you just put it in a table. So put it in a table".

(I do realize the article says this).

BTW, regarding the argument about the damage of using tables wrt screen readers, google themselves used tables to layout very basic buttons on their landing page until very recently. If you use it sparingly and just for this purpose, screen readers will do just fine. Now, using tables for other types of layout can and will break screen readers but a full old-school table-based layout is a long way from having a single TD to center stuff.

</comment><comment><USER16> I haven't done any front end web work so I'm confused by this. Can someone please explain why it is noteworthy? It seems strange to me that something as simple as centring a box should require special attention. Why aren't such tasks trivial beginner stuff?

<comment><USER17> Centering content of unknown dimensions (and since the user is ultimately in control of font size this happens often) vertically is surpringly difficult to do if you want to support legacy browsers. It's a common pain point. There are others, but this one is particularly vexing (esp. to newcomers to CSS) because it seems, at first glance, like it should be easy.

</comment></comment><comment><USER18> Can someone paste the code somewhere else please? The linked website is broken. And yes, I have Javascript enabled. But it's probably using localStorage (with no graceful degradation), which I won't allow. Is this becoming a thing? Either you give up your privacy, or you can't surf the web anymore?

<comment><USER19>
      margin: auto;
      position: absolute;
      top: 0; left: 0; bottom: 0; right: 0;

The JavaScript console error I see is:

      Blocked a frame with origin "http://s.codepen.io"
      from accessing a frame with origin "http://codepen.io".
      Protocols, domains, and ports must match.

localStorage.keys is null, thus the page does not appear to be using localStorage.

How is localStorage a significant privacy concern? My understanding is that websites only have access to the keys stored by that particular domain.

</comment></comment><comment><USER20> When CSS reached a certain point, using tables for layout suddenly became evil. CSS was like some strange measure of your salt as a frontend dev. Very Emperor's New Clothes type stuff.

But, I can remember trying projects with tableless design at that point, and absolutely beating my head against a brick wall attempting things in CSS that required almost zero thought with tables. Then, I'd finally get it right in one browser only to find that it looked like garbage in another.

It was like having a toolbox with a hammer that I couldn't use, instead being forced to nail everything with a screwdriver. And it wasn't just that I was accustomed to tables. They were easier and more natural. When you think about it, layout is nearly always grid-like.

So, I confess that there were times when I said screw it and reverted to tables. I'd solve problems that weren't working after hours of trying with CSS in literally minutes.

And the challenge with CSS is still apparent. Here we are all of these years later, still trying to do something as simple and frequently necessary as center things vertically which, BTW, doesn't work in my stock Android browser.

CSS is a bloated, convoluted mess and just too much work for simple things. That's why I have always found it somewhat draconian that people insisted on CSS as if it didn't have its own significant issues. If there were a tag that operated just like tables, but indicated layout or, as I think someone else suggested, a simple attribute to mark a table as layout vs row/column data, most of the semantic/SEO problems could be solved.

For that matter, I am not convinced that we should be so bent on having html pull double duty as the source for semantic data _and_ the source for a presentation engine's rendering. Maybe a different approach altogether could be more liberating and efficient on both fronts.

<comment><USER21> Though I agree in some respects, I've been a convert of CSS since the beginning. My reason, floats for wrapping elements depending on screen size. You can't do that with a table.

<comment><USER20> > _floats for wrapping elements depending on screen size_

Not sure exactly what you mean here. Are you talking about floating divs to wrap elements to the next visual "row" for smaller screen sizes, as in responsive design?

Because I don't find this necessary very often in practice, and certainly not nearly as often as the tons of other general layout that's required. Not to mention, of course, that you can still use divs where "needed".

BTW, on a side note, the jury is still out on responsive design for me. Or, at least as I have frequently seen it practiced today. For instance, many times a site with sidebars (including nav) will wrap the sidebars on smaller displays such that content, nav, etc. are all lined up in one vertical column. Not very appealing or usable IMO.

I really believe that how we treat designing to different formats will change and this responsive wave will pass. And, while I know there are other reasons to wrap elements, I do think responsive design is responsible for a good bit of it.

<comment><USER12> People still use floats to make the sidebars stack up on narrow browsers? I thought they mostly went back to tables years ago.

<comment><USER20> I think it's still very common. In fact, tableless design is still very much the mantra from what I see.

But, you're right: tables can be used for the same.

Not something I've done much either way. I just don't think its a nice effect. Guess it's just a style preference.

</comment></comment></comment></comment></comment><comment><USER22> Does it seem a bit off to anyone else in chrome?

[http://www.imgur.com/7JA69Ty.png](http://www.imgur.com/7JA69Ty.png)

Or is the browser chrome considered usable real estate.

<comment><USER19> You are correct, it is off by the height of the bar at the bottom of the window. It uses fixed positioning -- not absolute positioning as was prescribed in the hack. Also he sets the modal height to 50%. The CSS of the demo is not the CSS of the write-up.

<comment><USER23> This !!!!

You can also do this

position: relative; margin-top: 50%; transform: translateY(-50%);

<comment><USER19> You can, if you don't mind it breaking in IE < 9.

</comment></comment></comment></comment><comment><USER24> Why is such basic css hyped so much? Can someone technically explain it? Is the ratio of HN folks that need Web 101 greater than the ratio of people who need Startup advice, including technical and architecture solutions? (Been doing dev+webdev for >13y)

<comment><USER25> This article isn't basic css, it's a discovery of a simpler way to do a somewhat common layout task.

But overall your point is fair: HN has a lot of people (including me) with weak front-end skills.

<comment><USER26> It's not a new discovery. I've been using this for over a year...

</comment></comment></comment><comment><USER27> The fact that something so simple needs to be explained as "a thing" or "a trick", many years after HTML5 even came out, feels like a disgusting frontend failure.

</comment><comment><USER28> Pretty nifty trick, but I think undoubtedly the best is the transform 2D method detailed in this CSS-Tricks article: [http://css-tricks.com/centering- percentage-widthheight-eleme...](http://css-tricks.com/centering-percentage- widthheight-elements/) — You don't need to know the height or the width, and the great thing is transform2d's are supported in most browsers that matter. If you're smart and have dropped IE8 support, then all browsers are mostly covered and is definitely a lot nicer/neater than needing a height/width or using display:table and display:table-cell hacks.

If IE8 and down matters, then there are polyfills available for this functionality.

</comment><comment><USER29> I have written about a much better (IMHO) solution that does not need the height be declared and does not use tables.

[https://news.ycombinator.com/item?id=6193203](https://news.ycombinator.com/item?id=6193203)

</comment><comment><USER30> Very nice. When I actually stop to think about it, it's amazing to me that this is not immediately easy to do. Things like this give credence to Bret Victor's most recent talk.

</comment><comment><USER31> HTML/CSS is generally quite flexible when it comes to operations on text. No surprise since it was its intended purpose to be a format for documents.

Making any layouts and god forbid centering elements has always been a headache for me. Even by looking at the CSS examples provided by the link my first thought is how random they all seem and how ugly they are not to mention difficult to remember and use. There should be a single way to center an element. It should be an obvious operation given how important and common it is.

Some very useful CSS properties might take a lot of code and be hard to implement in native GUI toolkits like floats, overflow, height/width with percents, text wrapping etc. This is a sweet spot where HTML/CSS shines.

I have been playing with QML lately and decided to implement the Dialog (Absolute center within viewport) that pops after visiting the linked page just for comparison:

Here's the dialog equivalent that just fills the entire screen of an application done with QtQuick 2.0 for Desktop.

[http://pastebin.com/mnN3Zr6N](http://pastebin.com/mnN3Zr6N)

Layouting is easily done by anchors. Filling a rectangle to match a parent's container, centering an element inside a parent, etc. Other containers such as Rows, Columns or Grids are also provided. Property bindings are used for centering the dialog even if the viewport changes. Text wrapping is also done explicitly and binding was necessary to limit text width to the ScrollView for it to work.

One big difference compared to CSS is that by looking at the source I can see at glance what the layout structure is and what might be happening with the element.

Another cool thing about QML is that it's as simple as taking the code, creating a new file 'Dialog.qml', adding a few properties, a signal and some functions and we get a reusable standalone component:

[http://pastebin.com/CSbxrnK3](http://pastebin.com/CSbxrnK3)

that is very convinient to use:

[http://pastebin.com/XKnhW4wN](http://pastebin.com/XKnhW4wN)

result: [http://i.minus.com/iGTQhAxP55bBP.gif](http://i.minus.com/iGTQhAxP55bBP.gif) (3MB gif)

<comment><USER9> How is that better than CSS?

[http://jsbin.com/ezocec/1/edit](http://jsbin.com/ezocec/1/edit) (25 lines counting the HTML)

CSS has columns and grids, custom text wrapping. These features are available now in >90% of browsers. The `.dialog` class can be used as component without any changes, and we have things like component.io and browserify to package them up with behaviour.

result: [http://cl.ly/2w1o3h0i1t0r](http://cl.ly/2w1o3h0i1t0r)

<comment><USER31> Sure, at this point HTML/CSS has grown to accomodate many features. But there's a lot of ugly and non-obvious cruft that has been inherited over the ages and it won't change soon.

Perhaps a tool can bundle resources, but in the end it's still going to be inserted into the DOM and can potentially clash with other code since everything lives in a global namespace. There's also the problem of competing tools and the dilemma of which one to choose. Any other additional library that is meant to augment/fix HTML/CSS is another dependency that can cause problems and needs to be maintained.

QML is meant to be extensive. Not happy with how the drop shadow works? Write your own shader that does it the way you want it. Feeling that there's some primitive like an Ellipse missing? You can write your own in C++ and expose it to QML easily. In fact you can expose any native code to QML.

With HTML/CSS you are constrained to the environment it works in.

QML supports components, animations, transitions, particles, states, bindings, i18n and much more. It's also very smooth, qml is hardware accelerated. In the case of CSS so you get some hardware acceleration only for animating properties like translation, etc.

Here's the dialog I posted before which I changed to support states and transitions and also added an inline shader and particle emitter:

[http://pastebin.com/hh7xARTS](http://pastebin.com/hh7xARTS)

[http://i.minus.com/iATg82IRCaMa9.gif](http://i.minus.com/iATg82IRCaMa9.gif) (result 4MB gif)

As it can be seen it's highly declarative and it basically contains no javascript logic at all besides setting the states.

Of course a lot of such features are available indirectly in HTML/CSS by piggybacking on third party libraries/frameworks, but wouldn't HTML be so much nicer if it were designed with those things in mind from the very beginning?

<comment><USER9> Now you're pushing it, but it's getting there :)

Shadow DOM is the specification that will fix the collision/cascading issue, making it possible to isolate components. You can now write your own shaders, use custom masks/clipping etc, and of course, SVG for unlimited vector shapes. If that's not enough, write your own graphics layer with WebGL or Canvas.

[http://jsbin.com/ezocec/3/edit](http://jsbin.com/ezocec/3/edit)

[http://cl.ly/1q1b0T0n0l0u](http://cl.ly/1q1b0T0n0l0u)

Now around ~80% less code.

This is a fun but pointless showdown of course, these are technologies born worlds apart, with different audiences, purposes and constraints. HTML appeared in 1990, with the sole purpose of marking up hypertext, grew organically and has a hundred other interoperability concerns; QML showed up in 2009 (?), twenty years later, and was designed to solve specific problems. I'm certain the web wouldn't have grown as fast if it didn't have a stack as accessible as html/css.

</comment></comment></comment></comment><comment><USER32> This is interesting but I don't like it. It's a quirky non-idiomatic hack. Using vertical-align/line-height/inline-block is equally-effective and IMHO conceptual and readable/self-documenting.

Details: [http://jsfiddle.net/uy64k/6/](http://jsfiddle.net/uy64k/6/)

This requires no extra markup, but it does require the font-size and line- height to be reset.

</comment><comment><USER33> We use this same technique in Firefox to center images when viewing them standalone, inspect [http://www.elizabethtownfamily.com/wp- content/uploads/2012/0...](http://www.elizabethtownfamily.com/wp- content/uploads/2012/09/African_Elephant_Transparent.png) to see for yourself :)

</comment><comment><USER34> Don't forget to sacrifice at least one goat, if you want cross-platform, standards-compliant code.

</comment><comment><USER35> I came up with a similar solution a while back [1]

[1] [http://stackoverflow.com/questions/5009864/using-all-four- po...](http://stackoverflow.com/questions/5009864/using-all-four-positioning- parameters-with-positionabsolute-is-this-acceptabl)

</comment><comment><USER36> Vertically centering dialog boxes in a window is a minor pet peeve of mine. Boxes should be slightly above center.

If I recall correctly, the original Mac UI guidelines specified that the midpoint of the box should be 1/3 the distance from the top.

</comment><comment><USER37> What is performance loss/gain compared to Javascript solution of this problem?

<comment><USER38> There's an infinite performance gain for browsers that have javascript turned off or use noscript.

Other than that, I'd say that doing this kind of stuff in CSS would by default be much faster in a web page context.

<comment><USER37> What if I don't want fixed dimensions? Maybe media queries could help a bit, but Javascript usage seems to be inevitable.

ps. I didn't mean pure javascript solution anyway:)

<comment><USER39> If you don't care about older browsers [1], you can use Flexbox to do all sorts of dynamic, fluid positioning.

[1] [http://caniuse.com/flexbox](http://caniuse.com/flexbox) \- it's in the current version of all browsers (some still prefixed).

</comment></comment></comment></comment><comment><USER40> Those CSS class names are unacceptable. (:grin:)

</comment><comment><USER41> Doesn't work with NoScript. Bad example.

<comment><USER25> Huh? This solution doesn't use any javascript.

<comment><USER42> Regardless, with ScriptSafe (Chrome) enabled, all I see is a blank page.

I've got to enable assets. and s.codepen.io to see the page rendered.

That appears to be due to the use of an iframe from s.codepen.io for the content.

</comment></comment></comment><comment><USER43> It's a shame that we need to hack layouts to work with language designed for changing fonts and colors.

</comment><comment><USER44> It's still impossible if you'd like to center a div that resizes itself depending on the content.

<comment><USER45> nope, consider: [http://codepen.io/KatieK2/pen/ucwgi](http://codepen.io/KatieK2/pen/ucwgi) or [http://jsbin.com/uqutol/3/edit](http://jsbin.com/uqutol/3/edit)

These have intrinsically sized (autosized) boxes that vertically and horizontally center in some container.

</comment></comment><comment><USER46> not sure how people who "know CSS" can work without knowing this...

<comment><USER47> There are other ways to center elems, and once you learn another such way (and it consistently works for you), is there any point in researching alternatives?

</comment></comment><comment><USER48> There is anything new here ?

</comment><comment><USER49> Why do you need this to center a box in css? It can be done without this too.

</comment><comment><USER50> How is this related to hacking now again?

</comment><comment><USER51> this is good</comment>


Ask HN: Java tools for clone detection and removal? - <AUTHOR> <comment><AUTHOR> In their paper, "Clone Detection Using Abstract Syntax Trees"[1], the authors wrote, "While cloning may be unstructured, it is commonplace and unlikely to disappear via fiat. Its very commonness suggests we should offer programmers tools that allow them to use implementations of abstractions without breaking encapsulation."

It seems deep learning would lend itself towards semi- or fully-automated code refactoring tools, such as:

* [http://www.semdesigns.com/Products/Clone/index.html](http://www.semdesigns.com/Products/Clone/index.html)

* [https://github.com/JnRouvignac/AutoRefactor](https://github.com/JnRouvignac/AutoRefactor)

What other tools are available, preferably open source and IDE-independent, that can help eliminate duplicated Java code?

[1]: [http://www.eecs.yorku.ca/course_archive/2004-05/F/6431/Resea...](http://www.eecs.yorku.ca/course_archive/2004-05/F/6431/ResearchPapers/Baxter.pdf)</comment>


Ask HN: Have you migrated from Go to Rust? - <AUTHOR> Our current codebase is written in Go, mostly web servers, middleware and queue workers. Some of Rust strengths (memory safety, concurrency, absence of GC) look well suited for our problem domain. We currently have the opportunity to overhaul part of our system to reduce some legacy technical debt, so I'm wondering if it makes sense to rewrite in Rust. I'm not looking to solve a specific technical challenge. Just curious. So, if you migrated from Go to Rust, I would love to hear about your experience. <comment><USER2> [I use Go and love Rust]

Go has all those things except "absence of GC." It you're more careful you can eliminate a lot of reallocations (e.g. make sure to use capacity param whenever known).

What is the nature of "legacy technical debt" and how would it be better/different with Rust?

</comment><comment><USER3> Isn't concurrency a strength of Go? Does your current implementation perform well?

You do not put forward any good reason to make the huge effort that rewriting a production system in another language entails.</comment>


Are your GitHub's data safe? - <AUTHOR> http://intothesymmetry.blogspot.com/2014/08/are-your-githubs-data-save.html

<comment><AUTHOR> I hope Firefox will also implement nosniff</comment>


Ask HN: How many patents do you need to license? - <AUTHOR>

Assume your company has endless capital to invest in building a new mobile phone, but you own no strategic patents that could be cross licensed. Your plan is to design and manufacture all of your own hardware components (processor, graphics, memory, GSM/CDMA, display, accelerometers, USB, ...) and software (OS, drivers, touch interface, voice control, video, ...) with all of it based industry standard interfaces and technologies.
Since you're building all of your own parts rather than buying them from licensed vendors, you are legally required to pay for patent licenses on everything. For example, to have MPEG support, you'll need to license the patent portfolio of the MPEG_LA group. To use DDR memory, you'll have to license a bunch of patents. To use an ARM processor, you'll need to license a bunch of patents from Arm Inc. GSM? CDMA? Slide to unlock? And so on...
Patent licensing terms (costs) are typically not public information, so no one can really guess how much all of the patent licenses will cost. Also, assume you actually can license the needed patents for some fee rather than being simply forbidden from implementing them.
The question remains, how many patents would you need to license to build your own mobile phone from scratch?
If you know the number of patents needed for any specific chunk of tech, or you even have a rough guess, then please post the number.
I guess another way to phrase the question would be, how many patents are required for typical mobile phones we buy? <comment><AUTHOR> The MPEG-2 Patent Portfolio License as of April 1, 2013.

<http://www.mpegla.com/main/programs/m2/Documents/m2-att1.pdf>.

$ grep -E '^[A-Z]{2} [0-9P]' pat_mpeg2.txt | wc -l 1033 $ grep -i Expired pat_mpeg2.txt | wc -l 579 $ grep -i Expires pat_mpeg2.txt | wc -l 50

The MPEG-4 Visual Patent Portfolio License as of April 1, 2013.

[http://www.mpegla.com/main/programs/M4V/Documents/m4v-att1.p...](http://www.mpegla.com/main/programs/M4V/Documents/m4v-att1.pdf)

      $ grep -E '^[A-Z]{2} ' pat_mpeg4v.txt | wc -l
        1297
      $ grep -i 'Expired' pat_mpeg4v.txt | wc -l
         178
      $ grep -i 'Expires' pat_mpeg4v.txt | wc -l
          22

The MPEG-2 Systems Patent Portfolio License as of April 1, 2013.

[http://www.mpegla.com/main/programs/m2s/Documents/m2s-att1.p...](http://www.mpegla.com/main/programs/m2s/Documents/m2s-att1.pdf)

      $ grep -E '^[A-Z]{2} ' pat_mpeg2s.txt  | wc -l
         240
      $ grep -i 'Expires' pat_mpeg2s.txt  | wc -l
           1
      $ grep -i 'Expired' pat_mpeg2s.txt  | wc -l
          48

The MPEG-4 Systems Patent Portfolio License as of April 1, 2013.

[http://www.mpegla.com/main/programs/M4S/Documents/m4s-att1.p...](http://www.mpegla.com/main/programs/M4S/Documents/m4s-att1.pdf)

      $ grep -E '^[A-Z]{2} ' pat_mpeg4s.txt  | wc -l
          68
      $ grep -i 'Expires' pat_mpeg4s.txt  | wc -l
           0
      $ grep -i 'Expired' pat_mpeg4s.txt  | wc -l
          14

The AVC (h.264 - MPEG_LA) Patent Portfolio License as of February 1, 2013.

[http://www.mpegla.com/main/programs/avc/Documents/avc- att1.p...](http://www.mpegla.com/main/programs/avc/Documents/avc-att1.pdf)

      $ grep -E '^[A-Z]{2} ' pat_mpeg_h264.txt  | wc -l
        2958
      $ grep -i 'Expires' pat_mpeg_h264.txt  | wc -l
           4
      $ grep -i 'Expired' pat_mpeg_h264.txt  | wc -l
         109

Though these are the patent pools available for licensing from MPEG_LA, I haven't deduped the lists, and I'm sure there are some duplicates. I'm mostly looking for rough numbers. I'm not trying to pick on MPEG_LA, but they just happened to be first on the list.

</comment><comment><USER2> 'Drummond says: "A smartphone might involve as many as 250,000 (largely questionable) patent claims"' [http://www.guardian.co.uk/technology/2011/aug/04/apple- paten...](http://www.guardian.co.uk/technology/2011/aug/04/apple-patents- android-expensive-google)

David Drummond is Google's chief legal officer.</comment>


Those niggling last little bits of a project - <AUTHOR> http://jacquesmattheij.com/Those+niggling+last+little+bits+of+a+project <comment><USER3> Ahh yes, the first 90% takes 90% of the time, then the last 10% _also_ takes 90% of the time...(welcome to my life!)

</comment><comment> cool-RR You describe this as a "shortcoming" of yours. I don't think it's a shortcoming, I think you got it exactly right. People who always have to get everything 100% right are the ones who need to change their ways.

<comment><USER4> Depends on how you define 100% right.

</comment></comment><comment><USER5> I always get this incling that the last bit (somewhere around the 10-20% mark) of a project by size (i.e. tickets), takes about 50% of the time. Or the same amount of time as a project has took so far.

Complete unscientific incling, but seems to hold out a lot of the time - <USER2> you HAVE to finish things.

</comment><comment><USER6> > So, for the last 30 days, my mission has been to finish stuff. It's amazing > how much change this one small item has made, every day, both 'in real life' > as well as in all the online stuff it looks like there is a way to reach > that 100% complete state after all.

Strange - I set a very similar goal a month ago. Actually, two goals. One is to finish stuff.

The other is I want to become "prolific" in general - I want to do a hell of a lot of stuff at 60% good, and make a sequel if the 60% good version is a hit.

I just saw this today:

> The main theory proposed by Simonton is that creative genius is simply a > product of random and possibly unrelated ideas being combined in an > interesting way through the combinatorial process. Simonton then makes a > series of assumptions. From his theory and the assumptions, he concludes the > existence of the equal-odds rule, which has been supported by empirical > data. The equal-odds rule says that the average publication of any > particular scientist does not have any statistically different chance of > having more of an impact than any other scientist's average publication. In > other words, those scientists who create publications with the most impact, > also create publications with the least impact, and when great publications > that make a huge impact are created, it is just a result of "trying" enough > times. This is an indication that chance plays a larger role in scientific > creativity than previously theorized.

Submitted it here but it didn't take: <http://news.ycombinator.com/item?id=1487777>

I'd like to finish more, but I'd also like to ship more stuff when it's 60%. I'm using 60% in the sense of, "When you're 90% done, you're half finished." I'd like to put a fast coat of paint on 90% done/half-finished stuff and get it out the door, then be on to the next thing.

Edit: I think wanting to finish things and being comfortable calling something finished at 60-90% done are basically two sides of the same coin, they're both ways to eliminate this feeling:

> That way I can stop worrying about still having to do all that stuff too.

So you can either take immediate, decisive action to fix something, or you can be comfortable ignoring it knowing that you're doing a hell of a lot of valuable stuff good enough, and giving yourself a blessing for shipping the good enough version _and moving on without letting it bother you_.</comment>


Ask HN:Want to Learn Objective C/Cocoa - No Previous Coding Knowledge - <AUTHOR>

So i couldn't find a training institute in miles to learn Programing for OS X/Iphone. Have no previous experience in coding. Have only added bookmarks from previous HN discussions.oh by the way my first post here.:) and you guys are just great! <comment><USER2> I recommend the following books:

Cocoa Programming for Mac OS X: <http://my.safaribooksonline.com/9780321562739>

Programming in Objective-C 2.0, Second Edition: <http://my.safaribooksonline.com/9780321605559>

Ironically, while the first book has a more thorough discussion of Cocoa, the second book is the one with the iPhone section. Get both; they complement each other.

</comment><comment><USER3> There is a 'Learn Series' from APRESS 'Learn C on the Mac', 'Learn Objective-C on the Mac', 'Learn Cocoa on the Mac', and finally 'Beginning iPhone Development: Exploring the iPhone SDK'. Apple also has very good documentation on their developers site.</comment>


Brilliance – f.lux for Philips Hue bulbs - <AUTHOR> http://brilliance.website/ <comment><USER2> This sounds awesome, but I'm not 100% sure what to expect. Like, what does the "Weather" setting look like vs the "time of day" setting and the "northern lights" setting? Do you plan on adding photos and/or videos to the site with examples of how it works?

<comment><AUTHOR> I'm working on a video, just requires a bit of setup since a time lapse video is needed to capture what is happening with the app. The different times of day and weather influence are all fairly mild since the app is designed to be used every day.

</comment></comment><comment><USER3> This would be neat if it didn't require you to leave your computer (mac) running. I only have a laptop that I always carry with me. Now get me something I can run on one of my headless machines and I'd pay but I don't have an anyways on mac unfortunately.

<comment><USER4> If one of those headless machines is running Linux, this script [1] says it will control Hue using Redshift [2].

[1] [https://github.com/jonls/redshift/issues/189](https://github.com/jonls/redshift/issues/189) (the Gist in the comment)

[2] [http://jonls.dk/redshift/](http://jonls.dk/redshift/)

Edit:

There's also this, which is a bit more polished: [https://github.com/deuxpi/redshift-hue](https://github.com/deuxpi/redshift- hue)

And this, which even has a GUI! [https://github.com/poinck/lampe](https://github.com/poinck/lampe)

<comment><USER3> Thank you for that link!

</comment></comment></comment><comment><USER5> This great! Any plans to bringing this to Android/PC?

</comment><comment><USER6> Hopefully you add support for LIFX as well!

<comment><AUTHOR> Coming in the first update, I just need to purchase some LIFX bulbs for testing first!

<comment><USER6> LIFX will for sure will give you some free ones, I'm sure!

</comment></comment></comment><comment><USER7> Why not just link directly to the App Store?</comment>


Show HN: I'm writing the Modular JavaScript book series - <AUTHOR> https://mjavascript.com/ <comment><USER2> Why is it that if I try to unlock a chapter with a tweet it wants access to:

Read Tweets from your timeline.

See who you follow, and follow new people.

Update your profile.

Post Tweets for you.

Seems a little excessive. Edit: Link to screenshot - [http://imgur.com/a/rAO0d](http://imgur.com/a/rAO0d)

<comment><AUTHOR> Author here. Excellent question! That's because Twitter doesn't offer fine- grained control over what permissions you request.

The website that asks for that stuff is open-source[1], though, so you can take a look at what it does (just send out a single tweet).

If you still feel uneasy about granting me access to tweet through your account, that's perfectly understandable, and I have two options that may work for you:

\- Revoke access right after you authorize the app. The tweet will still be sent out, and you will still keep your access to the HTML chapters. Since I don't get access to your DMs, there's no harm nor potential harm done.

\- Just read the book on GitHub[2]. It isn't as pretty as the HTML version, but it works well enough and alleviates your security concerns.

[1]: [http://github.com/ponyfoo/ponyfoo](http://github.com/ponyfoo/ponyfoo)

[2]: [https://github.com/mjavascript/practical- es6](https://github.com/mjavascript/practical-es6)

<comment><USER3> I'm not sure that the benefit of _sending_ out a few Tweets outweighs the ill will among the book's potential audience _requesting_ Twitter account access creates. It seems like a distraction based on the 'Twitter thing' dominating the discussion here in lieu of a conversation about the book's content and value to the reader.

Personally, I'm more likely to give attention to someone's organic Tweet than autogenerated marketing because it implies that the book is good at being a book. I don't really care about books that are good at social media and SEO.

In purely product terms, company's that care more about their brand than my 'brand' don't garner a high level of trust.

Good luck.

<comment><AUTHOR> I'm not a company, and besides four comments on HN, there's been over 400 people sharing a single tweet to get access to the HTML version of the book.

Considering that I'm giving five books away entirely for free, asking for a single tweet isn't that high of a bar, to be honest. I don't mind a few people being annoyed by it, particularly because I can point those people to GitHub and be done with it :)

</comment></comment></comment></comment><comment><USER4> I think it looks like a cool series of books.

I also hate that you describe it as "free to read" but then require me to give you access to my Twitter account in order to read it. I don't know you, and I don't want to give you access to update my Twitter profile or post Tweets on my behalf. (Yes, I know, then just pay for the book.)

<comment><USER5> The book is also on Github without any required Twitter auth!

[https://github.com/mjavascript/practical- es6](https://github.com/mjavascript/practical-es6)

</comment></comment><comment><USER6> Is there a reason you don't make a book dedicated to just dealing with grunt, gulp, browserify, babel, web pack, etc. instead of splitting some of each between ES6 and Universal JavaScript?

<comment><AUTHOR> Author here. Good question!

I made a book just like that before[1]. The decision to split the books was a conscious one. In writing JavaScript Application Design, I found that very different concepts ended up being tied together for no good reason other than being on the same book.

The series, instead, clusters all the ES6+ teaching on its first book. This leaves me open to assuming ES6+ knowledge across the rest of the series, being able to use ES6+ language features in my prose, etc. At the same time, while tooling may be relevant to deployments and maybe testing, it's only tangentially relevant to proper application design, which is the subject matter of books 2 & 3.

[1]: [https://ponyfoo.com/books/javascript-application- design](https://ponyfoo.com/books/javascript-application-design)

</comment></comment><comment><USER7> I'd really want to check out the series. The twitter paywall is the only blocker.

<comment><AUTHOR> Author here. You can just read the book on GitHub[1], no tweetwall involved. It isn't as pretty as the HTML version, but it works well enough and alleviates your security concerns.

[1]: [https://github.com/mjavascript/practical- es6](https://github.com/mjavascript/practical-es6)

<comment><USER8> At least for me, security isn't the concern. The problem is that I have no idea what I'm recommending. Have you considered letting users read a bit before asking for the Tweet?

I've been a PonyFoo reader for a long time. You're obviously a talented guy. But I still want to get an idea of what you have produced before tweeting about it.

That said, I'm very much looking forward to "Mastering Modular JavaScript" and "Deploying Modern JavaScript Apps"! :) I'm sure you know better than most that the internet is full of unappreciative haters, but keep up the fantastic work. There are many of us who have benefited from your writing in amazing ways.

</comment></comment></comment><comment><USER9> Is the color palette for the site utterly bizarre or is my sense of these things just off?

<comment><USER10> To me it looks different than the standard "grey text on white background with lots of whitespace and a few basic and/or muted colors" style that you see on the vast majority of websites these days, and I think it's great!

That's the thing about design -- there is no one right answer, rather it's about reinforcing the overall vibe or message of a particular site... in this case I think the color choice conveys a sense of fun and whimsy.

</comment></comment><comment><USER11> Wait, what? O'Reilly books are being crowdfunded now?</comment>


Covid-19 forced Airbnb to rethink its product offerings - <AUTHOR> https://techcrunch.com/2020/04/24/covid-19-forced-airbnb-to-rethink-its-product-offerings-heres-some-of-what-it-came-up-with/ <comment><USER2> My biggest gripe with AirBnb is the search functionality. Sure, you are a premium product, so you can price gouge my millennial bank account all you want. But at least give me the functionality that I need. As a software engineer, I need a place with good wifi. Hosts always claim to have wifi, but no indication of quality. Before I knew how to be a super user, it wasn't uncommon to show up to a listing that claimed to have wifi and only find out that it was coming from the building next door and you could only pick up a signal while standing up in the shower tub.

The most reliable way to find out who actually had good wifi was by searching the reviews for the term "wifi". However, AirBnb refuses to implement the ability to filter your results by terms inside review. They claim that it's because it's too technically difficult to implement this. I am no search guru, but I have fired up an Elastic Search instance to make a-one-to many relationship searchable back in my day without too many issues. I guess AirBnb's "scale" is just too awesome to to do this? I mean damn... google indexed the whole internet. You can't index your own reviews?

Then, a few months ago, I noticed that AirBnb got rid of even the search functionality on the individual listing page, so now the only way to search a listing's reviews for the word "wifi" is to go to the listing, infinite scroll the list of reviews for a few minutes to load all of them onto the page, and then use the browser's search tool.

<comment><USER3> Yep, I've been burned by this a few times. Now, I ask them what their internet speeds are and if there are any dead zones in the apartment.

</comment></comment><comment><USER4> There was an article in NYT that was discussed here a couple months ago that talked about early employees losing their equity is AirBnB didn't go public by 2020. Does anyone know more details about that?

</comment><comment><USER5> Pivoting into these more "essential" reasons for renting, like wanting to isolate from family, seems like a smart move, so long as AirBnB hosts are taking the necessary precautions to make their properties suitable for self- quarantine. Certainly a better option isolation-wise than, say, a hotel (even if you decline room service - and room service actually recognizes that you've declined it - the rooms are in close proximity to one another, often have some degree of shared air, and the lack of a usable kitchen means having to break quarantine if you want to eat anything other than microwaved food). I'd imagine partnering with local/state/national governments to provide housing for people being specifically quarantined would be another good use for AirBnB in a similar vein.

Another legit non-tourism-related use case I can see still being relevant is for people needing temporary housing, whether due to moving into an area or because of foreclosure/eviction or some other reason why they don't have permanent housing. I don't know what the process of renting or buying a home looks like with social distancing (thankfully I moved right before the outbreak and didn't have the "fun" time of finding out for myself), but I can't imagine it's particularly easy or quick. And likewise, while you'd hope that banks and landlords would have the slightest bit of human decency and be a bit lenient on late mortgage/rent payments, I strongly suspect there are plenty of assholes out there.

</comment><comment><USER6> they're short-term doomed. long-term, (2021+) -> time will tell.

what they're planning now to do is to invent completly new business, utilising assets they have at hand (relations with hosts, but this is it).

their 'online experiences' is a lesson on 'wishful thinking' or 'painting the grass green'. Quoting article: "we have nearly 100 hosts offering experiences online and thousands more who've offered to host experiences".

Let me remind them, that they have at least THREE..FOUR ORDERS OF MAGNITUDE bigger hosts number (problem 1), there is no space in youtube/twitch area for that amount of content creators (problem 2), and most hosts can't do it (problem 3).

<comment><USER7> I wonder what knock on effects there will be for this part of the economy. How many towns and cities have a significant chunk of real estate that was purchased exclusively for Airbnb rentals that may eventually get foreclosed as a result of this? What will be the impact to surrounding real estate markets?

<comment><USER8> Seems like it would only be positive if more housing became available for locals?

For myself, I'm hoping Airbnb go bankrupt. In my mind, they're similar to Uber in that their only true innovation is a willingness to disregard local laws.

</comment></comment></comment><comment><USER9> Airbnb must be making ZERO dollars right now. Wonder how long they can survive in this situation. They sure have a lot of funding but they were close to going public and returning money to their investors. If this continues they will need to raise more cash and that round is going to be severely discounted.

In general I am not sure how their business will pan out over the next year or so.

<comment><USER10> Not zero dollars, but certainly less. I'm in an Airbnb in The Canary Islands, and will be through at least May. When I found out the lockdown was happening, I scrambled to rent Airbnbs thru May because I didn't have a place to return to, and staying in Spain felt safer to me than returning to the USA.

<comment><USER11> > staying in Spain felt safer to me than returning to the USA

Because of better adherence to social distancing rules? Are you a SWE working remotely?

<comment><USER10> Yes to both.

</comment></comment></comment></comment><comment><USER12> > TC: Are these spaces being offered at no cost?

> AS: They are donated or offered at reduced pricing.

This decision was made by the market, not by AirBnB, because they can't get anywhere near your former price.

> AS: Yes, like "Sangria mixing with Pedro," which is a cocktail mixing show

This isn't going to work.

AirBnb's sole "value" proposition was exploiting a regulatory loophole to allow offering accommodation that has:

\- lower to no safety inspection

\- zoned in residential spaces often with angry neighbours

Does it have another idea like this, that allows them to extract value created by the community?

I don't see any.

</comment><comment><USER13> Gotta give them some credit though for pretty rapidly releasing their "experiences" [i]. 𝖮̶𝖽̶𝖽̶ ̶𝗍̶𝗁̶𝖺̶𝗍̶ ̶𝗍̶𝗁̶𝗂̶𝗌̶ ̶𝖺̶𝗋̶𝗍̶𝗂̶𝖼̶𝗅̶𝖾̶ ̶𝖽̶𝗈̶𝖾̶𝗌̶𝗇̶'̶𝗍̶ ̶𝖾̶𝗏̶𝖾̶𝗇̶ ̶𝗆̶𝖾̶𝗇̶𝗍̶𝗂̶𝗈̶𝗇̶ ̶𝗂̶𝗍̶.̶

I'm highly unlikely to use the service but I still think it shows they can respond quickly to radical events.

[i] [https://www.airbnb.ca/s/experiences/online](https://www.airbnb.ca/s/experiences/online)

<comment><USER14> > Gotta give them some credit though for pretty rapidly releasing their > "experiences" [i]. Odd that this article doesn't even mention it.

This is discussed in the text of the very first question in the article

<comment><USER13> Ouch. Thanks for the correction.

</comment></comment></comment><comment><USER15> hotels rooms in bali are $200 per month now

five stars hotel like westin sells a 2days voucher for 1mil rupiah (~70 usd), valid until dec 31, 2021.

<comment><USER16> Is there a way to buy these vouchers online?

</comment></comment><comment><USER17> Staying in sub-par accomodation with no standards, or potentially sharing it with an awkward host; who likes to talk about their vegan diet and pet pug, or with wifi spy cameras, is not really a product offering.

Sure they have disrupted the property market and inflated rent and property prices already, which are now ironically crashing a little bit.

Support good hotels and chains, who hire and invest in great staff.

<comment><USER18> Yeah no thanks on staying at hotels where you have hundreds of people going through it and underpaid maids who "clean" tons of rooms a day. Sure that is really safe in this environment.

<comment><USER19> Haha, last Airbnb I had was mega cheap and the mattress smelled of dried piss. The hosts were nice but god I hated staying there in an extreme way, felt very unsafe.

Hotels (short of the "accommodation" in Chung King Mansions) have never made me feel this way...

<comment><USER20> It's up to you, the renter, to vet your host and rental to the best of your ability. Maybe don't pick a "mega cheap" place next time? I've used AirBnB tons of times and cannot relate even a little with all the complaints in this thread (and other HN threads).

<comment><USER21> My rule of thumb is I only use AirBnB in areas where there's a good selection of options. AirBnBs in the middle of nowhere tend to be miserable because there's no competition.

</comment></comment></comment></comment></comment><comment><USER22> Airbnb has always figured out clever ways to screw the hosts. When I first hosted guests were much more polite and clean. The last few years the ones I've gotten have been pretty messy and more likely to break house rules.

<comment><USER23> I'm not sure I understand how these are related? It's not as if they're intentionally sending you bad guests to torment you as a "clever way" to screw you...

<comment><USER24> More likely this is a version of the "Eternal September" problem. Early adopters of Airbnb were more likely to be "true believers" of the idealized vision of a kind/generous host matched with adventurous/courteous guests, but this vision gets diluted over time as the userbase grows. Once Airbnb reached true ubiquity, the general user population is just looking for a good deal and isn't nearly as savvy or as committed to the original ideals; this applies to both hosts and guests, of course.

It's impossible to scale a platform to 10s/100s/1000s millions without finding an ever-lowering lowest common denominator.

<comment><USER23> I think the interesting thing now is that, at least personally, I'm willing to pay hotel-level rates to stay at somewhere run by one of those "true believers". I know one of the things I look for is someone who's got a lot of reviews/a long history, but also seems to be renting just one space (or multiple rooms in the same house). I'm not looking for a deal - if I wanted to be cheap and central and social, I'd stay at a hostel. I'm totally willing to pay a bit more to stay somewhere with a host that cares.</comment></comment></comment></comment>


Google INTERCAL style guide - <AUTHOR> http://cadie.googlecode.com/svn/trunk/INTERCAL-style-guide.html

<comment><USER2> Can't we just wait until 4/1? Do they expect a few days for this to trickle through the blogsphere?

<comment><USER3> This is from last year.

<comment><USER2> Argh. I hate this day on the internet.</comment></comment></comment>


Join Bitcasa right now - <AUTHOR> https://portal.bitcasa.com/invited/a968d7cf7f764af9b619341c40f2f39f/

<comment><USER2> Is this the "we're thinking about a product" page or the "we have a product you can start using now" page? I can't tell... the question not answered is "when?"

This led me to pay slightly more attention and notice the pretty background pegging my CPU. It does look nice though.</comment>


On-demand cloud music - a new era - <AUTHOR> http://www.mercurynews.com/business/ci_17691275?nclick_check=1

<comment><USER2> This article quotes a lot of self-serving executives who run subscription music services predicting they will be the next big thing but haven't they been predicting that since about 2001 and aren't Rhapsody and its brethren already offering something pretty similar that is only mildly popular? Don't believe the hype.

<comment><USER3> The difference now is far greater access. With smartphones in everyone's pocket and TV boxes that connect to these services the whole thing becomes a lot more compelling.

As someone who doesn't work for any of these companies I can tell you there's truth to what they're saying. My Mog subscription has caused my iTunes spending to all but disappear.</comment></comment>


What do skateboarding and global health have in common? - <AUTHOR> https://www.gatesfoundation.org/TheOptimist/Articles/skateboarding-empowers-youth-to-lead-healthy-lives <comment><USER2> I have such a deep love for skateboarding. I go through bouts of depression that seemingly nothing can pull me out of, but stepping on my board always parts the clouds.

But, it's tricky. Partaking in it and becoming so wrapped up in its subculture can pull a kid, if left without proper mentors, into a very self-destructive world. At least that's been my experience. It's a world of extremes, both physically and behaviorally. I've seen the subculture (well, its negative sides) destroy a few people in my 25 years as a skateboarder.

I on the other hand, much like the article highlights for these kids, have no idea where I would be if not for skateboarding. I truly believe it saved me. It kept me active and pushing (pun!) towards a goal my entire adolescence, when academic pursuits meant nothing. Without it I likely would have fallen into something more destructive and anti-social.

That aside the lessons I see it imparting on kids are hard to find in team- based sports. Self-reliance, learning how to mute the fear and self-doubt in your inner monologue, persistence...these are hard lessons to get in one sitting, but they're ever-present in skating.

<comment><USER3> As a middle aged man I use skateboarding solely for exercise and the dopamine rush. If I went to the gym I would be bored to tears. I go to the skate park and just pump around in the bowl as hard as I can for a few hours. It's great. I'm on the carve and grind program.

<comment><USER2> Ah, I like that. I actually try to go to the gym to keep my leg strength up _for_ skateboarding. I partially blame my passion for programming (i.e. sitting for long stretches of time) for it. Realistically, I know it's partially my age catching up with me, though, I'd rather not admit that ;).

</comment></comment></comment><comment><USER4> Love skateboarding. I'm not good, but I still enjoy it. Skate videos are truly works of art. After trying to skate and even just pop an ollie, you truly realize the amount of skill and work goes into these videos. It's so easy to just get lost in these, the different skate spots, the crazy antics, and just the immersion in a different person's world.

[https://youtu.be/F2Ew-i8a7cg](https://youtu.be/F2Ew-i8a7cg)

<comment><USER5> I have NEVER been good at skateboarding, but what I found and loved very swiftly was the openness to trying and failing. From the outside it can look scary and intimidating but I only found people friendly, welcoming once you try something. Everyone in skateboarding fails, and fails multiple times before achieving what they wanted to do - and they celebrate that failure - which I found very refreshing.

This year I took my young son to a skate park to play on his scooter and loved how welcoming all the people there way. YMMV but my experience has always been positive.

</comment></comment><comment><USER6> It's a lot easier to go downhill than to go up.

<comment><USER7> Although, going downhill often ends up hurting more.</comment></comment>


Running Your Life with Emacs - <AUTHOR> https://keyholesoftware.com/2019/01/30/running-your-life-with-emacs/ <comment><USER2> I love Emacs but earn my living in Visual Studio writing C# code for e-commerce sites and vendor integrations, etc (same business for years). I use Emacs on my vps (quite a bit, actually) and used Emacs extensively until 15 years ago or so when I started doing .net for a living. VS Code is an excellent editor on Windows for non-IDE tasks and I find way less resistance just going with that over shoehornng Emacs into my process.

However, I'm open to suggestions. I tried using Emacs key bindings in vs.net but this can have it's own issues. What I'd really like is to replace Visual Studio with Emacs.

Does anyone have a guide for doing that (so debugging and msbuild inside Emacs + something resembling solution explorer, I guess)?

</comment><comment><USER3> I love Emacs, but I think a bit of dyslexia or association crept in, since I read it as "Ruining Your Life with Emacs"!

I am always in Emacs at some point, but I am now using 4coder [1] a lot due to moving back a lot to C, and I love the sparseness of it. You can code it in C/C++ too. It's not the OS Emacs is, but it's nice to have a contrast.

[1] [https://4coder.handmade.network/](https://4coder.handmade.network/)

</comment><comment><USER4> I'm not even a programmer (not professionally), but I "run my life" with Emacs and love it. Email with Gnus, writing and project management with Org. I used to use BBDB for contact management, then wrote a replacement package called EBDB. I also wrote a glue-code package for all three called Gnorb, and need very little else out of my computer. Being able to treat nearly everything I do as text, which I manipulate with the same interface, is a joy. As a package author I'm probably running a net deficit of time-spent-writing-Elisp vs time- saved-through-efficiency, but I enjoyed the hell out of it.

The two things I balk at are the terminal, and web browsing. I've tried text- based web browsing off-and-on over the years, but the inconvenience has overcome even my love of Emacs/Stockholm Syndrome. As for the terminal... I just can't help feeling like it's an added layer of buffering, and for what? And there always seemed to be some glitches in screen rendering... So I demure, despite cursing tmux's copy/paste mechanisms at least once a day.

Emacs, Firefox and xterm are usually the only three GUI programs running on my machine.

<comment><USER2> If you haven't checked out exwm, it might be worth a look. You can use Emacs commands to manage windows, etc.

Re shell cut and paste - I've often piped the shell output into a file open in Emacs, you then just revert the buffer and you've got it there (rather than cut and paste from the terminal window).</comment></comment>


Show HN: nvlope.com, your mailbox with an API - <AUTHOR> http://nvlope.com <comment><USER2> > We want to be able to add new features that would exceed the scope of IMAP. > Further, the current mail stack was just not built for a good mobile > experience, and it's complexity provides a considerable barrier for emerging > mobile clients. We want to cut off the legacy baggage and keep the entry > barrier for users and developers as low as possible.

What new features? Current email infrastructure already implements everything mentioned on this page. There's mention of the "limitations" of IMAP and SMTP but it seems specious. Reading email is a pretty well solved problem now, and I think every popular language has libraries for IMAP and SMTP.

On the topic of IMAP's performance on mobile: there is an installed base of millions who use IMAP for their mail on their phones. There are many, many good email clients for Android (I recommend K-9 Mail, which is FOSS) and they work great. Presumably it is the same for iOS.

If they write a nice HTTP API for reading mail inboxes, that will probably be a nice option for people who for some reason can't or don't want to use IMAP, but there really is nothing here to move mail forward.

Mailpile is a lot more interesting (webmail and privacy features): [https://www.mailpile.is/](https://www.mailpile.is/)

<comment><AUTHOR> Well, could you add instant messaging functionality to IMAP? Can you manage multiple inboxes with one IMAP account? Can you do server side threading with IMAP? Can you manage attachments and messages separately with IMAP? Can you upload attachments NOT using base64 using SMTP/IMAP? Can you use labels with IMAP? Can you manage multiple domains under IMAP? etc.

As for iOS client's there are exactly 3 that come to mind. Gmail, Apple Mail and Sparrow (discontinued).

We realize that this product is not for everyone - but for those who want a zero config, hassle free product.

Mailpile is for an entirely different audience.

<comment><USER3> _As for iOS client 's there are exactly 3 that come to mind. Gmail, Apple Mail and Sparrow (discontinued)._

There's a good reason for that- Apple won't let you check a mail server on the client side. So you have to do what Mailbox did and set up huge server infrastructure to check people's e-mail then send push notifications. It makes it a _lot_ more difficult than just making a client app.

<comment><USER4> So, the "solution" is to have your users set up a .forward-filter that pings a web service on new mail? Then have a really simple status server that simply replies with number of new mails since last check (or something along those lines...) - and have your email client poll (and reset) that counter... would give a few false-positives, but probably be better than having to poll an actual (variety of) IMAP/POP3-servers.

(This obviously won't work for most end-users, sadly)

</comment></comment></comment></comment><comment><USER5> Google's products have been sapping my desire to build things. It used to be that we had to build our own tools to do thing like edit code, send email with a quick workflow, etc. Not so any longer.

I've found a Gmail-based email workflow that work really well for me (and requires no browser extensions or custom code). I now own a Chromecast that allows me to play music and video on my home AV system. It just works, out of the box.

This looks really compelling if I was the kind of hacker that still hacked tools. These days I hack my workflow and use existing tools because they've gotten really good.

</comment><comment><USER6> The (minor) bad first: your landing page is utterly broken without JavaScript (I use NoScript, and while I whitelist most sites, a broken page before setting that still leaves a bad taste if there's no reason for it to break), and I can't see anything you do on it that couldn't at least gracefully fall back. At the very least, if you wish to require JavaScript, you might want to say upfront there that it'll be required.

As for the good: I'm liking a lot of where you say you want to go with nvlope, and I can't say I particularly enjoy IMAP, from working with it, so your planned API is more than a few steps up. :)

Can't wait to see how things develop!

</comment><comment><USER7> This is really cool! Are you building both the mail provider layer and the UI? (Not clear from the description.) Are you running your own mail relays?

I've actually been working on a new email platform with some friends for the past few months. Our stuff sits on top of IMAP, so you can use it with existing accounts like Gmail or Yahoo!, and the UI is super hackable AngularJS. It's kind of like Rails/Meteor for email.

We're going to open source it in January/February, but looking for folks to try it early while we're still writing docs. (Including OP!) Feel free to ping me-- we're also going to ship it as a docker container so it's super easy to deploy on whatever provider.

Sorry if I'm hijacking this thread! I just figured some folks here might be interested. :)

Death to IMAP!

<comment><AUTHOR> Yes, we run the mail and api servers ourselves.

</comment></comment><comment><USER8> Like the idea of normalizing email behind a web API, but don't see how this can survive if there is any credible open-source alternative. I can't imagine that the number of people wanting to write email clients is that large - unless you consider bespoke applications that have some email functionality to be a custom client.

In fact, if I had to guess, I'd bet a late night convo that went: "You know, any sufficiently advanced application gets email," "Then we should build and sell an email backend SaaS!" "Yeah!" And then the splash page went up and you started hacking.

Good luck with this anyway.

<comment><USER9> Yes I wrote something similar, presenting a JSON API on the folders in ~/Maildir for all the local users of a server.

It only does the basic things:

      * Listing folders/Maildirs.
      * Retrieving messages from a named folder.

I didn't have a compelling use for it, but I was curious about whether it would make sense to base my mail-client on an API rather than the filesystem. (In the end my mail-client only reads/writes to ~/Maildir and I avoided the API step in the middle.)

</comment></comment><comment><USER10> This sounds like an awesome idea, and a product I'd definitely use.

Just a tip though - I had to read halfway down the page just to find out what nvlope.com _IS_ (an email client with an API). "It's time to move email forward." is a nice sentiment, but it really doesn't explain your product at all. You should think about adding a short descriptive tagline that actually explains it before listing out a raft of features.

</comment><comment><USER11> Love where this is headed. Could you comment on security with nvlope? I'm curious in particular about two-factor auth, but anymore insight would be great.

<comment><USER12> It looks like the mail exchanger is (currently) hosted on Digital Ocean in New York.

They also use CloudFlare in front of the site, which means all your webmail or API traffic will be subject to inspection and logging by a company based in the US.

</comment></comment><comment><USER4> I welcome new projects into the email space -- especially those that contribute something to the open conversation around email. Sadly you only offer an api -- not an open server I can run myself -- but if your api turns out to be reasonable -- that is a perfectly fine contribution!

I've been thinking on the email a lot the past few years(!) -- and I see we all come to similar conclusions separately, me (just thinking), the author of sup[s] with heliotrope[h] -- and mailpile[1] and now nvlope -- building on top of IMAP probably isn't the best way forward, unless part of your goal is to support IMAP clients. Another interesting (for the architecture and data modelling at least) project is dbmail[d].

It will be interesting to see if codifying a json/rest api for email will be useful in the end or not -- I certainly see how one could build an android client on top of it -- I'm not convinced IMAP doesn't offer a better off- line/cache story though.

At any rate, I'll be storing mail on my own server, so a service like this isn't really for me -- but as I said -- I certainly appreciate seeing some battle tested public apis. They will offer some insight into what kind of design and architectural lessons you've drawn so far, making a responsive email service that is centred around search and labels.

Wonder a bit about the "file management" feature -- it sounds like a bit of a mis-feature to me. And I don't get the markdown composition -- do you then send the markdown as the text-part? Then again, I never did get this fascination for html-email. Maybe it's just getting (perfectly serious) business responses prefixed with "my responses are in blue" and the like.

[s] [http://supmua.org/](http://supmua.org/)

[h] [https://github.com/sup-heliotrope/heliotrope](https://github.com/sup- heliotrope/heliotrope)

[d] [http://dbmail.org/](http://dbmail.org/)

[1] Note, mailpile supports IMAP -- but not between the front-end (web) client and the back-end(http) mail client. Obviously all email systems needs to deal with email, so at some point someone must speak smtp for ingestion, and there might very well be pop/imap between the "back-end part of the front-end" and whichever server mails lands on via smtp. Or not.

<comment><AUTHOR> Markdown is a client feature. We send markdown as text and converted as html. If you look at the API there are just text and html fields [http://developer.nvlope.com/v1/mail/send/](http://developer.nvlope.com/v1/mail/send/)

</comment></comment><comment><USER13> Looks cool, but it hijacks my browser history with the "Signing In..." page which doesn't seem to do anything.

On a side note, I'd recommend making the link to the API documentation more prominent than a link mention in the write-up, as it is the core part of the service.

<comment><AUTHOR> Yes, we should definitely change that. Thanks.

</comment></comment><comment><USER14> You going to go enterprise with this? That is, "mailboxes for your website." Would pay for that. Currently most email providers only send messages. I can get that from Amazon. What I can't get is an inbox for users which I have some control over too.

<comment><AUTHOR> Not sure if I completely understood your requirements, but you can add several custom domains (number depends on the plan) to your account, create mailboxes and aliases for them and can send and receive from those addresses as well.

Those are added to your account and can be accessed as individual mailboxes or via the unified inbox. They are not separate accounts with separate logins. Enterprise grade account management would be a feature to add at some point in the future.

</comment></comment><comment><USER15> Guys, that's exactly what we need! Just launch now, seriously. Building a backend for an email client is such a pain and I can imagine how this could save lives. But we'd love to be able to put it on our servers. Good luck and hope to try it out soon!

</comment><comment> mck- Just letting you know that the landing page is broken on mobile

</comment><comment><USER16> I'm getting a security warning in FF when subscribing to the newsletter:

[http://imgur.com/bMo0G4z](http://imgur.com/bMo0G4z)

<comment><AUTHOR> Thanks for the tip

</comment></comment><comment><USER17> Enterprise option to keep it on our own servers and I'm sold. (Policy forbids SaaS and the like)</comment>


Cortera: Turning The Business Credit Rating Industry Upside Down - <AUTHOR> http://larrycheng.com/2009/09/22/cortera-turning-the-business-credit-rating-industry-upside-down/

<comment><USER2> Something similar I have been thinking about for a while; credit rating for businesses by consumers. Right now, we have ratings, which are basically meaningless -- companies are not punished for being poorly rated. (Look at AT&T, everyone hates them, yet they keep paying their iPhone bills.)

I want to get a critical mass of consumers so that poorly-behaving businesses can be punished. If bank foo makes it a habit of not answering customer support emails, then the base of consumers moves their accounts elsewhere. (Bank foo does this to us; if your personal credit rating is below a certain value, they won't offer their services to you.)

Sadly, I don't think this will ever work. Companies pay people millions to get rid of bad customers, but consumers are happy to be jerked around if it's less effort than not being jerked around. Too bad.

<comment><USER3> "At its most basic level, Cortera's service enables any business to rate any other business on how they pay their bills."

This isn't really a consumer issue. It doesn't reflect customer service, just reliability in re bill-paying.

<comment><USER2> Hence the first few words of my post; "something similar". The similarity is in the distributed and open nature of the data collection, instead of three opaque credit bureaus.

</comment></comment></comment><comment><USER4> I just ran a check on a publicly traded company that has about 300 employees and several millions in annual sales. The company information Cortera showed was plain wrong - under 5 employees, under 500k sales. It did however want $3 for further information.

If they can't get the basic information right, how reliable is their crowd- sourced data ?</comment>