FlowType: font-size and line-height based on element width - <AUTHOR> http://simplefocus.com/flowtype/ <comment><USER2> _PLEASE_ do not use this.

Yes, the ideal ("most legible") width for a column of text is ~60 characters, no question. But that's _only once you 've chosen the most legible font size_.

You're supposed to adjust your column width to fit an appropriate number of characters, not adjust the font size to your column width! Adjusting the font size is completely backwards, and worst of all, _it 's breaking my browser zoom_, so it's terrible for usability.

This is a cool demo, but absolutely _not_ something to be used in production. (Sorry to be so negative about it, but the whole project seems based on a misunderstanding of an important design principle.)

<comment><USER3> As a web designer, I despair of users upping the font size and screwing up the words-per-line. Which is why I like Safari's iOS-like pinch-zoom feature. I do wish all browsers would move in that direction and in the end disallow users to arbitrarily up font sizes.

That said, crazygringo's point is valid insofar as people do up their font sizes as a matter of course.

<comment><USER4> Yes, those silly people with bad vision.

<comment><USER5> Zoom good, font size increasing bad.

<comment><USER6> In your opinion.

Most users probably don't want to spend their life panning around a page to see what's going on.

</comment></comment></comment></comment></comment><comment><USER7> I don't know why all the negative comments here. Just because this solution doesn't fit any of your use cases, it doesn't mean it's a bad solution.

There was once I worked on a web app, which was supposed to be viewed on viewports as small as a laptop to viewports as big as a four 57" TVs strung together. Back then, I had to come up with something similar to this to make the content of the TVs visible from a distance. This library would have come really handy back then.

</comment><comment><USER8> The line-height part of this is unnecessary / duplicates css behavior. No need to use px. Just set the line-height to the ratio you want in css.

       p { line-height: 1.45; }

and you're done.

<comment><USER9> Neat. In case anyone else is curious about this: [http://meyerweb.com/eric/thoughts/2006/02/08/unitless- line-h...](http://meyerweb.com/eric/thoughts/2006/02/08/unitless-line- heights/)

</comment></comment><comment><USER10> This is entirely the wrong solution to a problem that doesn't even exist. In actual fact the problem is fonts are too small on my mobile devices so I'm constantly zooming in... why would I want my on screen text to start off a couple of pixels high?

Also, the whole notion (and seemingly a sub-trend of responsive design) of page content (fonts/images) scaling to try and maintain structure when the page is resized is naive to the point of being ridiculous.

</comment><comment><USER11> So on small screens this will make the font even smaller.

This is the wrong solutions.

There is a reason why 16pt is the standard font-size. And its no problem to design a responsive website with columns that use 'between 45 and 75 characters per line'.

<comment><USER12> What exactly makes you say 16pt is the standard font size?

For instance, the comment threads on HN are at 12px (9pt), and are entirely legible for me.

<comment><USER11> I was referring to the default font size in browsers.

<comment><USER12> At least for my Windows Chrome, the default font size is 16px, not pt. 16pt corresponds to roughly 20px on my (Windows default) settings.

</comment></comment></comment></comment><comment><USER13> I think this is pretty cool (and I like the slider-demo!), but it's clearly developed for laptops and mobile devices. On a bigger monitor the website is essentially unreadable. A 29px font for the body copy is a bit outrageous.

I like the idea, but I don't think fully automatic font scaling is the way to go. Mapping resolution to font size (which is essentially what the Javascript magic does) doesn't work because resolution doesn't mean much anymore. An HD tablet and a 27" monitor have the same resolution but demand completely different text sizes because you sit so much farther away from a desktop monitor.

So for the time being I think the best way to go is to create a mostly fluid layout and to write custom CSS for manual adjustments to make sure it looks good on smartphones, tablets, laptops and desktop monitors.

</comment><comment><USER14> Seems like a reasonable solution until vmin/vmax/vh/vw are more widely supported.

<comment><USER15> They're pretty well-supported now, I did my blog's entire CSS in vw units.

The only major browser that apparently doesn't support vw is Android stock browser (Chrome on Android does support it). Even my PS Vita browser supports the units.

However, not all CSS styles support viewport units. border-width, a few others. But you can define the doc's font-size in vw (font-size: 1vw;) and then use rem units everywhere to get around those few compatibility issues. (It works.)

</comment></comment><comment><USER16> The script can be extremely useful and the concerns raised regarding readability can be overcome using the min and max width. If you adjust line height in conjunction with font-size and font selection, text can be readable from 12pt and up, even at 10pt.

</comment><comment><USER17> Why this kind of functionality hasn't been part of the HTML standard from day one boggles the mind. There are many good use cases for this. You don't have to use it for everything, btw, even just having it adjust a header could be useful.

</comment><comment><USER18> > Ideally, the most legible typography contains between 45 and 75 characters > per line.

The demo impressively shows, that this is not the case for narrow viewports. However, the idea is great.

<comment><USER19> Don't forget it has "Thresholds" param.

</comment></comment><comment><USER20> This seems pretty cool but is an absolute nightmare for people like myself who require Ctrl + Scroll zoom all the time for accessibility.

</comment><comment><USER21> I really hate when libraries blindly assume that you are going to be using jQuery and make zero mention of that as a dependency.

<comment><USER22> The file is named flowtype.jQuery.js and you call it with $(selector).flowtype();? What made you think it wasn't a jQuery plugin?

</comment></comment><comment><USER23> Another solution in search of a problem that doesn't exist. If your viewer has a small screen REDUCE YOUR CONTENT. You probably have lots of waffle you don't need anyway. Conversely if they have more screen real estate than brain cells and expand their window to 2000px+ they are stupid. Don't encourage them.

</comment><comment> mck- > This is difficult to accomplish for all screen widths with only CSS media- > queries.

Couldn't you do it with viewport units?

</comment><comment><USER24> Love it. This is great for some very specific use cases (thinking about wall displays / large dashboards). It is definitely NOT for accessibility or for the bulk of text on most web pages.

Not every library / tool has to be universally applicable to be useful.

</comment><comment><USER25> different but cleaner readability trick for blocks containing text, with css: max-width:62em

<comment><USER26> Absolutely agree. This is the right way how medium to long block of text should be styled. Except 62ex, not em, IMO.

</comment></comment><comment><USER27> This seems to break browser zoom, so while it is a neat feature, it is not worth having at the cost of accessibility.

</comment><comment><USER28> Seems like a decent idea. Though it seemed to have far too few characters per line on the low end of the slider.

</comment><comment><USER29> Nice hack, but a accessibility failure. Now the users with poor sight can't increase the font size.

<comment><USER30> I had to bump the demo site up to about 200% to start to see increases, but was definitely able to increase the text size.

</comment></comment><comment><USER31> This would be a nice user script / bookmarklet, but I don't think websites (except for Readability-type apps) will ever need this. Proper responsive design and usability testing are the correct solution, not this... "hack". But since we're at HACKernews after all, cool effort and props for a very comfortable + practical landing page! Kudos!

</comment><comment><USER32> Just getting started with CSS - Are there any "golden ratio" typography generators?

</comment><comment><USER33> This is exactly what I've been looking for a number of times before but was too stupid to hack together myself. Makes sense to me.

</comment><comment><USER34> simple, yet awesome

</comment><comment><USER35> This is nice, but you'll see some alphabets or words would get wrapped into new lines when the _element_ (.demo-type) is resized. It's a minor but subtle effect.

You might want to revisit how the font-size (and line-height) do not always remain in perfect sync to the element-width. What we've here is the ratio of font-size over width-of-the-element. Since font-size doesn't depict width of the font accurately, a percentage change in it doesn't reflect proportionally to revised width of the element(.demo-type). Hope this helps.

We call this _resolution stationary rendering_ internally and use it in our product: [https://bubbleideas.com/letters/the-tiger-by-sir-william- bla...](https://bubbleideas.com/letters/the-tiger-by-sir-william-blake)</comment>


Cocktails in a Collector's Museum: Lisbon's Most Curious Bar (2014) - <AUTHOR> https://www.messynessychic.com/2014/12/10/cocktails-in-a-collectors-museum-lisbons-most-curious-bar/ <comment><USER2> It is really worth a visit if you are going out in Lisbon.</comment>


Creator of Temple OS, Terry Davis, Has Passed Away - <AUTHOR> http://templeos.org/ <comment><USER2> [https://news.ycombinator.com/item?id=17912618](https://news.ycombinator.com/item?id=17912618)</comment>


Analysis of three ways to build an online media business to $50m in revenues - <AUTHOR> http://lsvp.wordpress.com/2007/02/26/three-ways-to-build-an-online-media-business-to-50m-in-revenue/ <comment><USER2> Nice article Jeremy. My answer though is none of the above.

First, most social networks make just as much money off selling data as they do from ads.

Second, all the ads you mention fall into the same category. That is, the product being advertised potentially creates value for the user. So basically the user has to click on the link and buy the product.

The most profitable advertising is the type where the ad itself creates value for the user, in addition to the product being advertised. For example, music videos on MTV.

Unfortunately all of the social networks in existence today are monetized under the traditional model.

The startup I'm currently working on (kitchen table phase) is a social networking thing that actually allows users to manipulate advertising spatially in three dimensions. Of course the user's perspective is completely different, all they see is how the website makes their life easier (and gets them laid) and not how its being monetized.

</comment><comment><USER3> When you have a lot of committed users that frequent its always possible to come up with strategies that dont involve just the normal advertising channels. e.g. suicidegirls sells branded merchandise and bebo is getting into parnerships with amazon and ebay. So this article is a bit simplistic and I think you could make $50m revenues with a lot less users than it dictates.</comment>


Ask HN: Feedback about HN itself. What do you think? - <AUTHOR>

I like the content of this site, but I also have a few suggestions, based on a few months as a regular visitor:
1) Make internal links smarter. If I read a page for 10 minutes and then click "next" I often get an error. Not an error page. Just the error text. I actually got this error when trying to submit this post.
2) Please implement a "collapse" button on all 1st-level comments. In big conversations I want to skip to the next comment when I am not interested. I don't want to scroll slowly down the page to find it.
3) Please add a "Show" tab to the main navigation, similar to "Ask". If anybody needs a little extra exposure, it's the people who are releasing new stuff.
4) Make the voting buttons bigger, and allow "undo". I think you'll agree that "tiny disappearing buttons" doesn't have that "awesome UX" ring to it. Especially when they are the primary user action that fuels the function of the site.
5) I see that "saved stories" is a possibility in my profile, but I have yet to find the button/link that allows me to save stories. Does it exist?
6) You're gonna hate this one, but I really wish there was a way to see when someone has replied to my comments. i.e. — Notifications. I would gladly sacrifice the "threads" and "comments" pages for a tab that has something similar but only relevant to me.
7) Does karma have any effect on anything, or is it just gamification? I can't see the scores of comments or people in context, therefore they are useless to me. My own karma points have more use as a notification (if it goes up, something happened) than anything else. If karma creates influence... a little info somewhere would be awesome (in my "dashboard" maybe?).
Thank you. <comment><USER2> People generally get shat on when they give suggestions for improving the site. At this point everyone has accepted that it is what it is and made up reasons why it's a good thing. "It filters out the people we wouldn't want here", which is weird because we all love good design and will argue about proper implementations.

Anyhow, I haven't been around for long but it seems like there is one guy running the show that has no interest in updating this website. It's a silly side project for him. Personally, I think it's time he lets his baby fly and get a couple trusted contributors and make some changes. (Which is hard for me to say because I just wrote scrapers for the site...)

<comment><USER3> "It filters out the people we wouldn't want here", I got downvoted for calling this reason dumb. Maybe not the best thing to say but I really think that is a bad excuse.

<comment><USER2> Agreed. Really bad excuse, and since there's been like 5 posts like yours in the last month (not to mention a couple dozen apps, CSS alterations, and alternate sites for viewing it) the people who aren't content aren't just leaving. We're here because we love the articles, content and people but the website itself is kind of a disaster.

</comment></comment></comment><comment><USER4> 1) This is due to the page structure and how it's cached. Many people complain about it.

2) That might be nice. Does anyone have this as a browser extension? I know there's a few to make HN a bit more readable (I don't use any)

3) "Ask" I believe is simply submitting a story without a link. By convention we prefix with "Show HN" or "Ask HN"

4) Indeed, tiny voting buttons. See greasemonkey/browser extensions/whatever to customize site.

5) Upvoting a story puts it in "Saved Stories"

6) I think there's a 3rd party site for comment replies.

7) At ~500 karma, you get downvote privileges. I think Karma also affects your placement on the page. We used to be able to see karma points next to names for posts other than your own, but PG turned that off and I believe overall it's improved discussions (there's some data for this).

See the "Feature Request" link at the bottom: <http://news.ycombinator.com/item?id=4982388>

<comment><AUTHOR> If an upvote is a save, that's a good idea (it's a good feedback loop) but that definitely should be communicated somewhere when you register. If nobody knows that it sort of kills the thought behind it.

</comment></comment><comment><USER5> <http://hnnotify.com/> for notifications re replies, via email. been testing it a few weeks; works great.

<comment><USER3> Notifications via email. That would just annoy me. It's the first thing I switch off (if I can) on sites that do it.

</comment></comment><comment><USER6> 1\. Structural issue, something to do with HN running off flat files on one machine.

2\. _shrug_

3\. No comment.

4\. PG has said that he wants to add undo, but doesn't think it's a big enough deal to patch it.

5\. All upvoted stories are saved automatically.

6\. That would be nice.

7\. Supposedly it skews the ranking algorithm in your favor. At 500 you get the downvote.</comment>


Hard-Coded Google Search Results - <AUTHOR> http://www.benedelman.org/hardcoding/

<comment><USER2> Uh, what? Do you really think Google's special results at the top are "organic"? Of course they aren't, they are trying to put the most useful information at the top of the page. No conspiracy there...

I noticed in all the posted screenshots that while Google does link to itself from time to time, it also links to alternatives. In the health example, it linked to Google Health, but also the Mayo Clinic and WebMD. This is just an example of Google trying to provide the most useful answer to the question you typed in. Not a conspiracy :)

Flagged for senseless Google hate.

</comment><comment><USER3> Why is this written as a sensationalist exposé when it is plain as day that Google is doing this?

Almost all of these examples are Google serving non-webpage metadata alongside SERPs and are clearly delineated as such. Personally, it doesn't bother me in the least that they use their own databases to serve this metadata rather than agnostically linking to competitors.

<comment><USER4> I posted a comment not too long ago, implying that Google modifies results when it suits them and I received a lot of downvotes. The comment was snarky, but I've talked to a lot of people that really buy into the "Don't be evil" mantra and think Google's results are never hand edited.

</comment></comment><comment><USER5> None of these are search results. The search results are in a list in a strictly defined format. These are guesses at meaning that go _above_ them, just like ads go to the side.

<http://www.google.com/search?q=2%2B2></comment>


Learn Python 3 the Hard Way - <AUTHOR> https://learnpythonthehardway.org/python3/ <comment><USER3> This guy has a very stranger way to promote his job.

He firstly said that Py3 sucks and he can't teach it... and now he is teaching it ;-)

[0] [https://learnpythonthehardway.org/book/nopython3.html](https://learnpythonthehardway.org/book/nopython3.html)

<comment><USER4> Which turned into a big internet fight, and he changed his mind.

It's good to see people willing to change the way they do things, especially when that means publicly contradicting their former selves and with such an intense personality. It's oddly inspiring.

<comment><USER5> I think Zed was in the majority when it came to Py3. He kind of comes off as a jerk due to his personality, but I really like his approach and he always makes me think. I might not agree with him but he certainly is not boring. Looking at Pandas which is a R like library. Wes wrote his book in Py2 and did not have any desire for Py3.

I moved from Python mostly to using R, Racket and Haxe for my other side projects. This infighting just left a bad taste in my mouth and started seeing greener pastures, which for once in my life were in fact greener. I still love Python but I don't use it much due to community drama.

<comment><USER6> Don't blame the community for that. Blame Guido and the core development team. The community at-large weren't rallying for breaking changes to the language. GvR wanted that, it's "his" language afterall. Of course some of the community are more conservative and were willing to more quickly fall in line to goosestep with the core team on Python3. So the tension stems from the Python3 folks having extreme disdain for all the Python2 users and codebases.

I agree with you though, it's what got me looking towards other tech like Node, Go, Elixir. I can look past it all except for the fact they got 'unicode by default' wrong. They should simply do what Go does, everything is a bytestring with assumed encoding as UTF8. What they have today is ridiculous and needs changed before I could embrace Python3+.

<comment><USER7> There were definitely people wanting unicode support, which was the breaking feature.

They supported python 2 for years and year after the release of this, don't know how you can even mention the word goosestep in this context.

<comment><USER6> I can't understand what's going on with the Python community for folks to even make statements like yours. It has to be an influx of new Python developers who started on 3.

Python2 has unicode support. Python2 already had (better) async IO with Gevent (Tornado is also there). There's just nothing there with Python3 except what I can only describe as propaganda from the Python Software Foundation that has led to outright ignorance with many users.

 _Some_ people wanted "unicode strings by default". Which Python3 does have, but they even got that wrong. The general consensus on how to handle this correctly is to make everything a bytestring and assume the encoding as being UTF8 by default. Then like Python2, it just works.

<comment><USER8> > The general consensus on how to handle this correctly is to make everything > a bytestring and assume the encoding as being UTF8 by default.

Whose "general consensus"? It's certainly not the approach adopted by the vast majority of mainstream general-purpose programming languages out there.

<comment><USER6> You mean most of the mainstream, genpurpose languages in usage today which were initially designed 20-50 years ago. And those which don't actively look for opportunities to shoot themselves in the face with sidestepping changes to break the language? Then no, not that consensus.

But if you were to find any sensible designer of new language with skyrocketing, runaway popularity- such as Rob Pike, they'll tell you differently. Or even Guido van Rossum, if he were to be honest with you. While Pike's colleagues at Bell Labs like Dennis Ritchie may not have designed C this way for obvious reasons, they did design Go that way.

<comment><USER8> So now it's the consensus of "sensible designers of new languages". Where "sensible" is very subjective, and I have a feeling that your definition of it would basically presuppose agreeing with your conceptual view of strings, begging the question.

Aside from Go, can you give any other examples? Swift is obviously in the "new language" category (more so than Go, anyway), and yet it didn't go down that path.

<comment><USER6> Well, do your research and come to your own conclusions. Most people are going to agree that UTF8 is the way to go. You can advocate something else, since you seem to take affront to my opposition to Python3's Microsoft-oriented implementation.

If you know anything about Swift, it was designed with a primary goal to being a smooth transition from and interop with ObjC so like other legacy implementations (such as CPython3), it had sacrifices that limited how forward-looking it could be.

<comment><USER8> I'm not at all opposed to UTF-8 as internal encoding for strings. But that's completely different and orthogonal to what you're talking about, which is whether strings and byte arrays should be one and the same thing semantically, and represented by the same type, or by compatible types that are used interchangeably.

I want my strings to be strings - that is, an object for which it is _guaranteed_ that enumerating codepoints always succeeds (and, consequently, any operation that requires valid codepoints, like e.g. case-insensitive comparison, also succeeds). This is not the case for "just assume a bytearray is UTF-8 if used in string context", which is why I consider this model broken on the abstraction level. It's kinda similar to languages that don't distinguish between strings and numbers, and interpret any numeric-looking string as number in the appropriate context.

FWIW, the string implementation in Python 3 supports UTF-8 representation. And it could probably be changed to use that as the primary canonical representation, only generating other ones if and when they're requested.

<comment><USER6> A default UTF8 string-type has to be allowed to be used interchangeably with bytestrings since ASCII is a valid subset. Your string type shouldn't be spellchecking nor checking for complete sentences either. What comes in, comes in. Validate it elsewhere.

Thus Go's strings don't potentially fail your desire for a guarantee anymore than anything else would assuming UTF8. They're unicode-by-default, which was the whole point to Python3 but Go has it too in a more elegant way. That's the beauty to UTF8 by default, you can pass it valid UTF8 or ASCII since it's a subset, the context of which it's being received is up to you. If you're expecting bytes it works, if you're expecting unicode codepoints that works. There's no reason to get your hands dirty with encodings unless you need to decode UTF16 etc first. If there is still a concern about data validation, that's up to you not your string type to throw an exception.

<comment><USER8> > A default UTF8 string-type has to be allowed to be used interchangeably with > bytestrings since ASCII is a valid subset.

This only works in one direction. Sure, any valid UTF-8 is a bytestring. But not every bytestring is valid UTF-8. "Use interchangeably" implies the ability to substitute in both directions, which violates LSP.

> What comes in, comes in. Validate it elsewhere.

I have a problem with that. It's explicitly against the fail-fast design philosophy, whereby invalid input should be detected and acted upon as early as possible. First, because failing early helps identify the true origin of the error. And second because there's a category of subtle bugs where invalid input can be combined or processed in ways that make it valid-but-nonsensical, and as a result there are no reported errors at all, just quiet incorrect behavior.

Any language that has Unicode strings can handle ASCII just fine, since ASCII is a strict subset of UTF-8 - that doesn't require the encoding of the strings to be UTF-8. For languages that use a different encoding, it would mean that ASCII gets re-encoded into whatever the language uses, but this is largely an implementation detail.

Of course, if you're reading a source that is not necessarily in any Unicode encoding (UTF-8 or otherwise), and that may be non-string data, and you just need to pass the data through - well then, that's exactly what bytestrings are there for. The fact that you cannot easily mix them with strings (again, even if they're UTF-8-encoded) is a benefit in this case, because such mixing only makes sense if the bytestring is itself properly encoded. If it's not, you just silently get garbage. Using two different types at the input/output boundary makes it clear what assumptions can be made about every particular bit of input.

<comment><USER6> I understand your position. This is a longstanding debate within the PL community, as you know. I've considered that stance before but I have to say thanks for stating it so well because it's given me pause. I can't say I agree but you're not "wrong". I agree with the fail-fast concept but disagree that's the place to do it. A strict fail-fast diehard probably shouldn't even be using Python, IMO. I don't have anything else useful to add because this is simply a engineering design philosophy difference. We both think our own conclusions are better of course but I appreciate you detailing yours. Good chat, upvoted.

<comment><USER8> I agree that this is a difference caused by different basic premises, and irreconcilable without surrendering one of those premises.

And yes, you're right that Python is probably not a good example of ideologically pure fast-fail in general, simply because of its dynamic typing - so that part of argument is not really strong in that particular context.

(Side note: don't you find it amusing that between the two languages that we're discussing here, the one that is statically typed - Go - chose to be more relaxed about its strings in the type system, while the one that is dynamically typed - Python - chose to be more strict?)

The key takeaway, I think, is that there is no general consensus on this. As you say, "this is a longstanding debate within the PL community" (and not just the topics we touched upon, but the more broad design of strings - there's also the Ruby take on it, for example, where string is bytes + encoding).

My broader take, encoding aside, is that strings are actually _not sufficiently_ high-level in most modern languages (including Python). I really want to get away from the notion of string as a container of anything, even Unicode code points, and instead treat it as an opaque representation of text that has various _views_ exposing things like code points, glyphs, bytes in various encodings etc. But none of those things should be promoted as the primary view of what a string _is_ \- and, consequently, you shouldn't be able to write things like `s[i]` or `for ch in s`.

The reason is that I find that the ability to index either bytes or codepoints, while useful, has this unfortunate trait that it often gives right results on limited inputs (e.g. ASCII only, or UCS2 only, or no combining characters) while being wrong in general. When it's accessible via shorthand "default" syntax that doesn't make it explicit, people use it because that's what they notice first, and without thinking about what their mode of access implies. Then they throw inputs that are common for them (e.g. ASCII for Americans, Latin-1 for Western Europeans), observe that it works correctly, and conclude that it's correct (even though it's not).

If they are, instead, forced to explicitly spell out access mode - <USER2> `s.get_code_point(i)` and `for ch in s.code_points()` - they have to at least stop and think what a "code point" even is, how it's different from various other explicit options that they have there (like `s.get_glyph(i)`), and which one is more suitable to the task at hand.

And if we assume that all strings are sequences of bytes in UTF-8, the same point would also apply to those bytes - i.e. I'd still expect `s[i]` to _not_ work, and having to write something like `s.get_byte(i)` or `for b in s.bytes()` - for all the same reasons.

<comment><USER6> It's worth nothing that I think Python's success and simplicity came from the ease of use and flexibility. It should have Go's strings. You have a point there. The type annotations are really jumping the shark too, it's just no longer the language that once made so much sense.

On the consensus on bytestrings assumed as UTF8, there's only 1 new language without legacy baggage that has skyrocketing popularity and it has bytestrings assumed as UTF8. Everyone I've surveyed says that's no coincidence, including members of the Python core dev team. So that's where I'm seeing consensus on the string issue. While Python3 has struggled and folks are rightly irritated. Because some were irresponsible everyone has to pay, that's not really how I viewed Python's strengths prior to 3.x. Zed said it best but it really was one of the best examples of how dynamic typing can be fun.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> >I've standardized on this version of Python because it has a new improved string formatting system that is easier to use than the previous 4 (or 3, I forget, there were many)

Wait, is this seriously the only advantage you see to Python 3, Zed?

<comment><USER10> Maybe in the context of the book it is a major reason.

Strings are ubiquitous to programming. I'd argue that it's even more for first time programmers. Zed wanted something that would be easy to use.

(ASCII) Strings formatting is more important to beginners than unicode support, new style classes by default, iterators in range()/enumerate()/etc. , the new division operator, etc.

I haven't recommended his book to beginners because it was stuck in Python 2. But I have to agree that Python 2 had some stuff that was more "newbie- friendly" than Python 3

<comment><USER11>
      > But I have to agree that Python 2 had some stuff that was more "newbie-friendly" than Python 3

What stuff, out of interest?

Also I suspect that a _huge_ proportion of newcomer's got very confused as to why 3/2 == 1.

<comment><USER10> Yes. But that is easy to explain. "It always rounds down"

Of the top of my head come the range/enumerate/zip returns. They are really useful and needed to teach "pythonic Python". But it's hard to explain that it doesn't return a list. "It returns an iterator, that is lazy, and you need to call 'list()' on it to use it as a list..." You get my point.

You fall to a "just do like I told you. You'll get it later." that plagues a lot of other languages when being taught to newbies.

But I never said that Python 3 is less "newbie-friendly" than Python 2...

<comment><USER12> > Yes. But that is easy to explain. "It always rounds down"

The explanation is easy, but it isn't _simple_.

With respect, "It always rounds down" is a terrible explanation. It explains the apparent behavior of the / operated in Python 2, but it does not really explain _why_. A better explanation is that the Python is both dynamically- and strongly-typed and that / does integer division on integers and "true" division on floats. For the newbie who understands these concepts, this is a far more useful explanation and metaphor; and for the newbie who doesn't, he has to learn somewhere, and frankly the / operator is not a bad example.

<comment><USER13> _> / does integer division on integers and "true" division on floats._

Floats don't really get true division either:

[https://docs.python.org/3/tutorial/floatingpoint.html](https://docs.python.org/3/tutorial/floatingpoint.html)

And as it happens, I once explained a related problem with round() to Zed Shaw on Twitter:

[https://twitter.com/zedshaw/status/777780480737357824](https://twitter.com/zedshaw/status/777780480737357824)

<comment><USER14> This is one reason why I go out of my way to avoid floats and instead use Decimal whenever I need to support non-integral numbers.

(and from playing around with Perl 6, I love how decimal literals are of type Rat instead of Num; I wish Python decided to do something similar in Python 3)

Edit in response to Zed's question, in 3.6 I always just do:

        print(f'{foo:.2f}')

Works with Decimals and floats.

<comment><USER13> Yeah, I'm pretty sure he'll turn up his nose at that solution as well.

For purposes of teaching the language to a beginner, he wants literals being rounded or divided to "just work" in a way that is unsurprising to those beginners, and there isn't any way to achieve that unless the default type of a number with a decimal point is Decimal rather than float (which isn't at all likely to happen).

The closest we are likely to get to that ideal is by introducing a Decimal literal like 0d2.125, riffing off the Hex and Octal literals (eg. 0xDEADB33F, 0o76510).

P.S., unless I am mistaken, you're just truncating the float, not actually rounding it

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER15> If this is anything like his Learn C book, I'll pass. Was a waste of money as he came off incredibly arrogant and fumbled through it.

<comment><USER16> At least the original LPtHW was quite a fundamentally different book from his learning C book. The C book was aimed at people who knew at least the basics of programming in some other language and wanted to learn C, while the Python book was more aimed people who had never programmed at all.

</comment></comment><comment><USER17> Not hard enough. Try [https://lectures.quantecon.org/py/](https://lectures.quantecon.org/py/)

<comment> happy-go-lucky Is that for quants? Seems to be good. Thanks for the link.

<comment><USER18> No kidding. Thorough, too...the PDF for the Python lectures is 862 pages!

<comment> happy-go-lucky That's great. In fact I submitted it here at [https://news.ycombinator.com/item?id=13724295](https://news.ycombinator.com/item?id=13724295)

</comment></comment></comment></comment><comment><USER19> Zed lost his credence. It's hard to take him seriously after what he's said in the past. Besides, the book is rather light on content.

<comment><USER20> It's actually harmful to point newbies towards his work. There are much better resources that have been proven in practice to work better.

<comment><USER21> Such as?

<comment><USER22> well, you can go with the _actual python tutorial_ for one. Or the literally dozens of intro to python books put out by No Starch, O'Reilly, Packt, Wiley, etc. You can also go with some of the classics like Swaroops' Byte of Python, or any of the college lecture notes. I hesitate to suggest this, but its worth saying, the book that Zed shit on to launch his little franchise is still actually usable (especially just to read the code examples) and was a much much much better book in terms of pedagogy then his tedious, arrogant offerings.

<comment><USER23> Yea...flipped through Zed's book. It seemed alright, but Python Programming for the Absolute Beginner is an amazing piece of work. Crystal clear, and you get to build fun little text games.

</comment></comment></comment></comment></comment><comment><USER24> Related: I love this book's teaching style, and found it very much resonated with me - starting from zero, step by step, iteratively learning and building on previous lessons.

Can anyone suggest something similar for learning Scala?

<comment><USER25> The canonical source for learning Scala from scratch (at least, when I was learning a couple of years ago) is the Coursera course by Martin Odersky, one of the language's founders. It appears that the course has grown somewhat, but you can still find part 1 here: [https://www.coursera.org/learn/progfun1](https://www.coursera.org/learn/progfun1)

<comment><USER24> I took the course - unfortunately, and to be honest, it didn't have the approachability and "fun" of Zed's books. To me - it felt very dry, academic, and quickly became a chore to complete rather than a joy. I need the version aimed for "C- python programmer" / newbie rather than "eager CS student" or "experienced Java dev".

</comment></comment></comment><comment><USER26> You'll either love or hate his style but one thing you should note is that popular current production distributions are pegged on older versions (eg Ubuntu 16.04 has Python 3.5, Debian Jessie has 3.4.

If you're a purist and don't want to maintain your own build of Python (or trust an external PPA), I'd aim at 3.5.

That said, this is about learning... But you'll need to learn not to use f-strings if you want to use it on a current-generation LTS distribution.

<comment><USER27> 3.6 is in the repos for yakkety as a beta, and upcoming release on zesty. Unfortunately it will likely not be the default Py 3.x until the "aardvark" release.

<comment><USER26> I'd advise against using 9m support distributions in production though. It's a super pain in the arse to have to do major upgrades that often.

<comment><USER27> 9m?

<comment><USER26> Sorry. Nine months. That's all the non-LTS versions get.

</comment></comment></comment></comment></comment><comment> happy-go-lucky _Python 3.x is the present and future of the language_

<comment><USER23> A language I use daily and love, but one that will end up a dead-end I fear long-term. So much is going the way of speed now.

<comment><USER28> I doubt that. Most of the cited competitors to python are either seriously flawed (e.g. go) or aren't really competing on the same turf (e.g. rust/haskell).

<comment><USER29> Speaking as someone who really loves Haskell -- let's be real, it's not serious competition against Python or Rust, same turf or not. It's a fantastic language for numerical computing and its applications, and for compilers/parsers, but it's never going to be as easy to use for the layman as an imperative language.

As someone who's used Go and who has some mixed feelings about it, I'm curious -- what do you find flawed in it?

<comment><USER28> >what do you find flawed in it?

* Package management

* The weird and approach to exception handling (which leads to overly verbose code)

* Lack of generics (which leads to overly verbose and somewhat hacky code)

* Vastly smaller 3rd party ecosystem

I think it works well for a very small subset of sysops-style problems (small servers, small command line tools, etc.) especially since it easily compiles into one small, portable binary, but outside of that it flounders.

<comment><USER29> Thanks for following up! Those are some of my gripes with the language too. The vendoring system/would-be package manager especially has caused me hours of headaches, and I'm glad to hear I'm not the only one who considers it broken.

</comment></comment></comment></comment></comment></comment><comment><USER30> If you are a complete beginner in python, I would rather suggest this for python3 - www.openbookproject.net/thinkcs/python/english3e

</comment><comment><USER31> I would basically avoid this simply by reading his idea of what makes good educational content: tests, repetition, memorization and boring predetermined projects. If you know anything about educational theory, you will quickly discover that constructivist education, or constructionism as Seymour Papert coined, is a way more effective and motivational way to learn computer science and coding. There are basic understandings of computering which is beyond specific language, eg loops or logic. You are not doing yourself any favors by memorizing the entire syntax of a language. This happens while you do personal and engaging coding projects.

</comment><comment> jorge-fundido I tell people to `ipython; %magic`. For all of python's faults, that REPL is the gold standard and makes for a nice way to learn the language.

</comment><comment><USER6> Python3 folks act so daft about his Turing-complete comments. ZS knows what Turing complete is and means. He was clearly trolling, saying in essence, "if the CPython team can't create interop between CPython2 and 3 code then they really botched the job.. Python3 bytecode is Turing incomplete. What a fail."

And then people attempt to troll him saying he doesn't know what Turing complete is. Perhaps they really don't understand what they're even responding to, that's what it appears. Or it's just a willful attack because they "like Python3". Unfortunately with Python3 this is what the Python community has been slowly devolving into, what comes off as a bunch of trolls/kids or ridiculous adults.

<comment><USER32> 1\. I'd really like to see proof that the people he was trolling actually existed, and if they did exist, a coherent explanation of why beginners to Python needed to be exposed to the arguments of said people through trolling.

2\. Zed can troll people, and that's totally OK, but the "like Python 3" people can't troll him or counter-troll him, because it's turning the Python community into trollville. I'm guessing like sort of how Rails is a ghetto.

<comment><USER33> > I'd really like to see proof that the people he was trolling actually > existed

See the user of this parent comment.

<comment><USER32> I have never asserted that Python 3 can never run Python 2. The claim is that Zed trolled some imaginary people who said this.

</comment></comment></comment></comment><comment><USER34> [https://learnpythonthehardway.org/book/nopython3.html](https://learnpythonthehardway.org/book/nopython3.html) >This document serves as a collection of reasons why beginners should avoid Python 3 as of November 22nd, 2016.

This is the first thing I get when searching "Learn python3 hard way" in Google. Maybe it's time to update this page :)

I didn't enjoy the python2 book too much, but I'll give this one a try.

</comment><comment><USER35> Knew it was coming, but still kinda annoying _right_ in the middle:

[https://josharcher.uk/categories/lpthw/](https://josharcher.uk/categories/lpthw/)

</comment><comment><USER36> The hard way is still the easy way though. Python is simple to learn :)

</comment><comment><USER37> In your opinion which one is better? Learn Python the hard way or Dive into Python 3

[http://www.diveintopython3.net](http://www.diveintopython3.net)

<comment><USER38> A lot of people dislike Zed Shaw's books (the author of Learn ___ the Hard Way) for various reasons, and he has posted some things online that serious call into question his credibility (namely, claiming that Python 3 is not Turing complete).

Dive into Python 3 is a good book. I used it to supplement my CS classes in early college. There are some other good book suggestions on the sidebar of [https://www.reddit.com/r/Python/](https://www.reddit.com/r/Python/) . In particular, I've heard good things about "Automate the Boring Stuff with Python".

<comment><USER22> Its a great book, that still has relevance, amazingly. Theres also the fact that he feels like its necessary to shit on anyone who disagrees with him...or, anyone at all actually. The trolling thing is lame, and a total waste of peoples time, like, for example, when he literally ate something in the middle of his lecture at Pycon, as if he somehow couldn't find the time to eat a candy bar in the elevator. I literally worked Pycon, and I can guarantee you that speakers, and pretty much anyone else, can find the two minutes to choke down an orange or whatever before the go up to speak. Its his persona, which he uses to get notoriety, which he uses to get work.

</comment></comment></comment><comment><USER39> Learn Python The Hard Way was the first programming book I ever read. Beats the hell out of codeacademy and all that other shit.

</comment><comment><USER40> is this complete or a work in progress, because if you try to buy, you can still only buy the 3rd edition (with a free upgrade to 4th edition)

so to be clear, is the online version complete, and only the pdf and videos are missing, or even the online version is still work in progress

</comment><comment><USER41> Does anyone have any advice from where to go after beginner/intermediate python? I can hack together a program with the functionality I want, but frequently it's pretty verbose and the architecture gets creaky as the complexity increases...

<comment><USER42> I'd suggest [http://www.obeythetestinggoat.com/](http://www.obeythetestinggoat.com/) if you're looking to use Python for web development.

</comment></comment><comment><USER43> For a beginner who wants to learn Python, which one is better — 2 or 3?

<comment><USER44> 3\. When you need to work with a 2 code base the learning curve won't be big at all. Whereas if you start with 2 and then move to 3 you will have to unlearn a bunch of stuff which is just a waste of time. Start with 3 and then learn just the differences in 2 when/if you need them.

<comment><USER12> Agreed. Just as a for-instance: In Python 2, the parenthesis on a print call are optional. In Python 3, they're not. Going from 3 to 2 you probably won't even notice. Going from 2 to 3... To this day I often fail to type those parenthesis.

</comment></comment></comment><comment><USER45> Would a tutorial like this really be worse if it used realistic situations?

</comment><comment><USER46> I'm not sure I would recommend learning Python to anyone these days. Go is just so much nicer and almost as easy, and also avoids the inevitable GIL & speed problems.

<comment><USER47> If you are doing AI, machine learning, it's all Python. Other language support yes, but python is it. Alexa does not support Go.

> [https://www.tensorflow.org/](https://www.tensorflow.org/)

<comment><USER48> You mean the API that you are calling is in Python. I think the heavy lifting is mostly C/C++.</comment></comment></comment>


MapReduce is not functional programming - <AUTHOR> https://medium.com/@jkff/mapreduce-is-not-functional-programming-39109a4ba7b2#.xg2litvsp <comment><USER2> I like languages that let me write a sub-routine when that makes sense and a function when that makes sense.</comment>


Show HN: PyOrbs – A Lightweight Pipenv Alternative - <AUTHOR> https://pyorbs.wbrp.ch/docs/1.0.1/ <comment><USER2> I do understand why not Pipenv/virtualenv/venv (though some are under the hood)

I don't understand why not conda. It's so much more fearureful and useful than every other python package and environment manager i've used.

That said, looks great - I do like alternatives, and I likely missed a use case in which it excels.

<comment><AUTHOR> Thanks for the feedback! There's indeed many tools that try to solve the issues related to virtual environment management – I also reviewed quite a few before writing my own little tool. Although I mostly used virtualenvwrapper before, Conda seems to be also lacking a feature that I wanted, which is lockfile management. I usually have separate requirements files for different use cases (running tests, building docs, running in production) – freezing these and managing the lockfiles manually has always been a hassle. This is one of the areas which is much simpler with pyorbs. Another feature that I value is the automatic environment activation in new terminal tabs, which saves me some typing every now and then too.

<comment><USER2> Thanks! Will keep a close watch</comment></comment></comment>


Telescope - awesome testing framework for Lua - <AUTHOR> http://telescope.luaforge.net/ <comment><USER2> What's not clear from the project page is what I can do to mock the host application - since Lua is primarily an embedded language, it doesn't help to have setup, teardown and asserts if I can't say "and this host-function should return (X)"</comment>


Kickstarting Flask on Ubuntu - <AUTHOR> https://realpython.com/blog/python/kickstarting-flask-on-ubuntu-setup-and-deployment#.VE5XGteOtsB.hackernews <comment><USER2> It's cool and detailed, but I really don't think the author should be running the app server with root privileges. It's a really bad thing, especially if you're putting together a tutorial.

<comment><AUTHOR> Author, here.

I updated this to show how to

1\. Add a new user 2\. Set up the config/flask project/git hooks/etc. with that new user

</comment></comment><comment><USER3> Great intro. I'm a Django developer myself, and getting things going with a new framework (even if it is in the same language) can be tough.</comment>


Ask HN: Is your significant other supportive of your entrepreneurial tendencies? - <AUTHOR> <comment><USER2> Unfortunately not and it sucks. Anytime I spend on my endeavours is considered a waste of time by her and it is difficult. She started out somewhat supportive but success has been elusive and faith has been lost over time so there is a feeling of having let both of us down. She wishes I'd focus on my job and do well in the corporate world but it's not what I want. Here's hoping (with some reason) to 2017 being the year I turn it around.

<comment><USER3> People put a lot of emphasis on success. I've seen the "need to succeed" destroy more projects and motivation than anything else.

I know someone who would be really interested in working on projects, enjoys programming, and so on, be very reluctant to take up projects that seem "iffy" with regards to financial success.

My point: being ruined financially by a project is one thing. It's another to program for fun. You can spin up a project for fun, as long as it isn't wrecking your bank account, and not have to worry if it's going to succeed.

<comment><USER2> I'm starting to think emphasis on success is necessary. It's something I have not had before, I tend to work on projects because I find them interesting or I believe they should exist because they are useful. I've always maintained a job at the same time so financial ruin is never a risk. The problem with this approach is it leads to any spare time outside of the paying job being consumed with projects/entrepreneurial pursuits which is the source of the friction, not enough of my time to go to the wife/family creating the perception of me being very selfish. Ideally you want to see some traction and then ditch the job, doing so before would add additional stress due to lack of income. However getting to traction while having a job is extremely hard. Ideally you want to move in with the parents or do this when you're young to make it easier on yourself and your significant other.

<comment><USER4> Remember, an extroverted engineer stares at OTHER people's shoes when he talks.

</comment></comment></comment></comment><comment><USER5> Yes, with some reservations. We met as one part-time business was failing, although he brainstormed ideas with me to try to make it work, and even came into the office on a few occasions to help out. He was supportive for four years, while I was getting a half-time masters degree, and while I wrote technical books (at the same time as a full time job and half-time degree!).

Although recently I said, only partly joking, "maybe I should go to law school..." and he was like (only partly joking) "Do you WANT a divorce?" So he does have limits!

But he's always been supportive of me flying to conferences, giving talks, running workshops, not being there in the evenings because I'm busy with one thing or another. He's even taking a few days off in January to go to a conference in Texas with me (he's not technical, so he doesn't actually go to my talks, but he can keep himself occupied around town, and we turn it into a mini-vacation in the evenings).

I give up a lot of weekends to freelance work, and we've discussed the possibility of me starting another business -- he's totally on board with it, _despite_ the fact that I tried it once already and failed, AND having experienced firsthand how much time it takes and how much it will disrupt our lives. He doesn't understand most of what I do, and was never interested in understanding it (I've offered to teach him how to program, or show him code I'm working on -- he's always like "nah, that's your job"), but I couldn't ask for a more supportive husband for the things that really matter.

</comment><comment><USER6> Not significant other but my family does not seem particularly supportive.

The concept of taking risks and sacrifices today for potential future benefits is completely foreign to them.

Pretty irritating. I don't have anyone cheering for me. It seems they are just waiting for me to any day announce that I have chained myself to another cushy office desk job and collecting the chunky pay check.

Just recently I had to break it down for my mother. I'll cut it short but basically I told her "If you are someone with a bunch of money you can invest it all in low-risk government bonds and wait for 50 years or you could show up at the casino and gamble it all in one game. They are the opposite ends of the risk spectrum. Never taking any risk is just as bad as taking huge crazy risks like gambling all your life in a game of poker. There's some middle ground. You gotta take a few shots while you have the time.".

</comment><comment><USER7> Yes, but not without any tension. When we met it was implicitly agreed that I need time to build my own things on my free time, something she understand and appreciate. She does react when it becomes too much, which is great, because sometimes I do loose the track of time. But in general, yes.

</comment><comment><USER8> It's early for me, but so far she has been behind me 100%. She supported me quitting my FT job that brought in 75% of our income when our first child had just been born to switch to freelancing. I think the key here is that the benefits of this change weren't just felt by me: not only did our income (security) go up, but I had more time to support her in child-rearing efforts and was generally a happier person, so I think these benefits earned trust for the next steps.

She is now also supporting me in dialing-down my freelancing efforts (and therefore our income) to focus on bootstrapping a small startup, even as we now have two young children. Outcome unknown, but I keep her posted and we talk about the business (ideas, ups, downs) on a regular basis.

That said, I myself am a very risk-averse person and we both are the kinds of people that have always lived frugally or "within our means". This means that, as a family, we have a very low "burn rate" and our runway on savings is very long. So the "risk" of failure is not really that high. We both know that if disaster struck (and yes, we have insurance too), I could get a 9-5 job almost instantly (as much as that might suck).

I think one thing to remember is that your spouse is only going to support you as long as your decisions benefit _both_ of you (in the long run, at least). You want more time to work on a side-project? What are you going to change in your life so that your spouse is also getting some benefit?

Anyone wanting to delve a bit more into this type of relationship, I recommend listening to the Zen Founder podcast ([http://zenfounder.com](http://zenfounder.com)). Rob Walling (Startups for the Rest of Us, Microconf, and someone who's insight and opinion I respect greatly) and his wife Sherry talk about a lot of founder issues, but I find that the candid back and forth between them gives you a great look inside their relationship dynamic. They don't always agree, but they _trust_ each other. That's what counts the most.

</comment><comment><USER9> Yes, I share us much as I can with my wife, so far she gives the best entrepreneurial advises.

</comment><comment><USER10> Yes, my wife and my son have been supporting me throughout the 3 startup exits I have overseen. They have sacrificed a lot of time and effort to support me. In return, I have earned enough money that none of us will ever have to work again.

I love having a supportive family.

</comment><comment><USER11> Sort of. She isn't adverse to the idea of me making money doing what I love and I'm not looking for giant profits, just enough to cover monthly expenses (though I'm not opposed to making more, I'm just keeping it real at this point). That being said, she doesn't want me to spend any of our money. My company bank account has the short lived freelance work I've done, which I'm running out of. It is hard to do things to drive traffic without money so I have to get creative

</comment><comment><USER12> She wasn't. Then I sold a thing I did and it paid off our house and invested a whole lot of money so that we don't have to care much about our retirement funds.

It wasn't a huge amount of money (about 10m SEKR, in my opinion vastly overpriced) but considering it was a thing I did just for fun in the beginning I am more than happy with the end result.</comment>


A Conversation with John Knoll (1998) - <AUTHOR> http://www.drdobbs.com/a-conversation-with-john-knoll/184410606

<comment><USER2> "As a visual-effects supervisor for Industrial Light & Magic, John Knoll lives on the bleeding-edge of computer graphics. With his brother Tom, he also created the PhotoShop image-processing software."</comment>


Why are women unwilling to contribute to wikipedia? - <AUTHOR> http://www.nytimes.com/roomfordebate/2011/02/02/where-are-the-women-in-wikipedia/the-antisocial-factor

<comment><USER3> I think that article is wayy off and the title of this thread is teetering in the same direction. Nothing about that article explicitly says anything about women being "unwilling" to contribute to Wikipedia.

I used to spend a lot of time editing and contributing to certain articles, but notice what I said, "spend a lot of time." Sure, you can quickly fix spelling and grammatical errors, but to really do anything useful on the site takes more time. I'd easily spend a few hours a week (depending on what else I had to do) during college editing articles.

But, for every woman that has time to do that, there are plenty that don't (think of women who still operate according to traditional gender expectations --taking care of family, etc.). This is not to say that men don't have other demands on their time, however. The author misses the mark entirely when it comes to that aspect, though. You'd only know that if at some point you've spent any time contributing at all. I'd have to wonder if the author ever has...

Plus, I don't think we should be so quick to throw gender on top of everything as a reason why something has or hasn't happened. I could be wrong, but I really don't believe that the average Wikipedia visitor even really pays attention to who wrote any given article, much less going so far as to find out whether they were a male, female, or any variant.

<comment><AUTHOR> _Nothing about that article explicitly says anything about women being "unwilling" to contribute to Wikipedia._

The authors all implicitly agree that unwillingness is the reason. Logically, there are only two reasons women would not contribute - inability and unwillingness.

They speculate various reasons why women are unwilling - <USER2> disproportionately dislike the neutral point of view, they prefer a walled garden, they dislike edit wars or hacker elitism, or they dislike "anti- social" behavior such as sitting at home writing a wikipedia article.

They never once suggest inability as the reason women don't contribute.

</comment></comment><comment><USER4> I've heard it stated (and I can't remember where) that the major difference between the social behavior of women and men online is that women tend to use social networks to extend existing real world relationships, and men tend to use social networks to replace or substitute for real world relationships.

Like any generalization, I can think of plenty of counterexamples and exceptions, but as a general statement it kind of rings true for me.</comment>


Work Doesn't Happen at the Computer - <AUTHOR> https://thesweetsetup.com/work-doesnt-happen-at-the-computer/ <comment><USER2> >> 3: Work on the most mentally-demanding tasks first. Once you've narrowed your list down to what is mission critical, start with the hardest one.

No. Just no. I learned this in a past life working in the film industry and apply it daily in the military. If you have three things that must happen in a day, do the easy tasks _first_ , especially where these tasks involve multiple people and/or equipment.

Think of what happens if you start with the hard task. Little problems happen. Delays stack up. The quest for perfection stretches the one task into the entire day. Soon the sun is going down and you haven't accomplished anything. If you start with the simple things those little problems are easier to solve. On a film set this is why the big action shot, the complicated bar scene with the moving camera and twenty extras, happens at the end of the day. The core team warms up by doing the easy two-person dialogue scenes early in the morning. When it is time for the harder tasks all the equipment has already done its thing. You know all the necessary people are present and ready. And the looming deadline means there is a sense of urgency in the air. Everyone wants to go home and so puts maximum effort into making that final shot work in as few takes as possible.

<comment><USER3> Heh my experience is the opposite - I could spend all day doing really an unlimited number of easy tasks, and never get to that one hard task. Telling myself lies like 'just one more easy one...' along the way.

> Think of what happens if you start with the hard task. Little problems > happen. Delays stack up.

Well yeah... if there's likely to be delays in the hard task then I want them started as soon as possible so there is time for the delay to be cleared and I can do other easy things in the delay time. If I start at 1630 and then there's a delay, then the task isn't done on that day.

<comment><USER2> It depends on the complexity and number of people/equipment. I want those little delays to impact as few people as possible. Say the camera team is missing some equipment. I want that delay to happen on the little shot, the task requiring the fewest number of people. By doing the little shot early in the morning I will discover and solve that delay then, before the big complicated task. Do the complicated shot first and I have a hundred people standing around waiting on the camera team. But if you are just one person setting there own schedule such strategy might not matter.

<comment><USER3> I guess on a production you have a finite set of 'jobs', easy or otherwise, in the shots that you have on your list.

In my work there is an infinite number of easy but still reasonably productive things I could do.

</comment></comment></comment></comment><comment><USER4> I have always said this.

For many years working at a large defense contractor (SAIC, now called Leidos) I only worked 32 hours a week, and when at work, I would often talk co-workers into taking walks around La Jolla Cove, near of office, when we had to plan work, discuss problems or improvements with our software, etc. That was decades ago, and I feel that it was the correct strategy for getting valuable work done and making a positive impact.

A little off topic, but I have been exploring ways to spend much less time at my computers, easier for me to do now that I am (mostly) retired. As an experiment, I have been using a high compute capacity VPS and a small iPad Pro to write code examples and do some of the actual writing for a second edition of a book [1]. I find that I do even more thinking away from any device, usually while hiking or walking around the block. I do cheat and occasionally plug my iPad into a large high resolution monitor that my mosh client takes great advantage of. +1 for Mosh + tmux + a VPS far more powerful than a laptop.

[1] [https://leanpub.com/hy-lisp-python/](https://leanpub.com/hy-lisp-python/)

</comment><comment><USER5> I recognize that the following is a total HN classic offtpic nitpick, but _damn_ I can't even begin to imagine how heavy life must weigh if each day, you feel obliged to "win the day". To consider even the concept of a day a struggle, an adversary to beat. That sounds just immeasurably depressing to me.

<comment><USER6> I'm a pretty driven, productive person by nature, so I don't need advice on how to fight the day like a battle. I do still struggle with getting sucked into devices, but it takes the form of work eating up all my relaxation time.

Maybe I need advice on how to collaborate with the day, so that me and the day can get to know each other, enjoy each other's company, and become more than the sum of our parts.

</comment></comment><comment><USER3> > Now the assumption is that the only place work gets done is at a computer.

This is an extremely office-centric view of the world. Most people's work is not like this.

</comment><comment><USER7> Like all these posts, what works for one is likely not the same as what works for another - find your own system and stick with it.

<comment><USER8> Yeah. I don't like how the tone of this article is "you should do X" instead of "X works for me, look maybe parts will work for you"

</comment></comment><comment><USER9> Doing the following has helped me in the past: 1\. Print out calendar view of the day (Outlook for Windows has a printable view that shows your calendar for the day and to do items) 2\. Write down a prioritized list of tasks if they're not already there 3\. Write down on your calendar when you're going to do them</comment>


Ask HN: How do you deal with email spam? - <AUTHOR>

Say you had subscribed for some xyz.com and now they have started selling your email and you receive mail from some wxy.com?
I caught many such spam using google's easter egg. (firstname.lastname@example.com)
Catching such people is a bit easy. But how to report them? And how to take control over them?
Plus how to send someone email with from email@example.com? So that we can catch if someone whom we sent mail is spamming us. <comment><USER2> Gmail allows you to setup an alias to send mail out from a different from address. [https://support.google.com/mail/answer/22370?hl=en](https://support.google.com/mail/answer/22370?hl=en)

Reporting them is more difficult. If it's a known/legit company that is sending the spam like Target or Sears for example, usually you can forward the message with headers to email@example.com. You can also look in the headers for a complaint address.

Next you can look for who the provider is that the domain is using and send the complaint to them.

If its a fly by night spammer, there isn't too much you can do.</comment>


Ask HN: Is Optimizing for Engagement Ethical? - <AUTHOR> <comment><USER2> Dpends what you mean by optimising for engagement. Taking games as an example, that could theoretically mean multiple things:

1\. That you're making a really good game with a compelling core gameplay loop that keeps people coming back because of how enjoyable it is to play, and which has few if any awkward barriers in the UX department. That's fine, and I'd say it's perfectly ethical.

2\. On the other hand, if you're making a manipulative, pay to win, lootbox and microtransaction stuffed piece of crap (like many mobile games) and its only optimised for engagement in the sense its trying to pressure users to keep playing, then no, that probably wouldn't be ethical.

So it depends really. A well designed, usable system that people want to keep using because of how much easier it makes their life/how much more fun it is to play around with is fine, but one which tries to manipulate them with dark patterns and psychological tricks is not.

</comment><comment><USER3> who cares at this point</comment>


Cucumber Tony vs. Cucumber, getting trolled. A lesson in Internet etiquette - <AUTHOR> https://discuss.cucumberwifi.io/t/cucumber-vs-cucumber-tony-getting-trolled-a-lesson-in-internet-etiquette/1654 <comment><AUTHOR> As unfortunate lesson to learn, I hope others can benefit from our mistake.

I know a few other companies who've had trademark issues recently. Seemingly, it's quite simple (and affordable) to avoid.

Anyone else had problems with this? Advice about changing name, github repos etc?</comment>


Exxon CEO sues against fracking in his own backyard - <AUTHOR> http://www.forbes.com/sites/rickungar/2014/02/22/exxon-ceo-profits-huge-as-americas-largest-natural-gas-producer-but-frack-it-in-his-own-backyard-and-he-sues/print/ <comment><USER2> By the way, another problem they recently discovered is that states are ignoring or not properly doing air quality testing around fracking and some seriously bad chemicals are being released into the air.

It is insane how we are going gung-ho into this with basically the whole USA as a testing ground, so what if it causes cancer clusters a decade later, the wells and the owners will be long gone.

<comment><USER3> It's also wreaking geopolitical havoc. The USA now have a lot of cheap energy available. Good for them. Bad for the green energy revolution in Europe.

<comment><USER4> How so exactly? Less research funding? Offsetting the global prices making it cheaper in euro therefore more expensive to go green? Just curious. I wouldn't have thought it would be that big of a deal.

I also wouldn't call fracking cheap in any sense of the word, far more expensive than liquid oil extraction and the repercussions of it are at least somewhat unknown so far. (Yeah yeah I know its totally safe if you do it right and Exxon et al are soo trustworthy when it comes to this stuff.)

<comment><USER5> It's amazing to me how people keep being so ignorant about the likely most troubling issue for the next two centuries. Climate prognosis for the next 80 years keeps getting worse. The most recent studies suggest one degree of warming _per decade_ _on average_ , assuming that _CO2 production levels out just about now_. Until humans are CO2 balanced, every ton we blow into the atmosphere simply keeps raising temperature with some time delay. 8 degrees warming on average worldwide means that some outlier regions, potentially the ones where raising temperatures are the most damaging, will see a temperature increase of 15 degrees.

We're the frog inside the heating pot, except we even steer the gas burner - and we're still discussing which way to cook ourselves would be the most economical.

<comment><USER4> I was halfway through my post when I reworded it to avoid this point. Not really sure how hn likes the doom talk yet, but seeing as you brought it up.. I watched a ted talk a while back where the speaker basically laid it out like this:

2 degrees c = screwy weather patterns, extreme storms

4 degrees c = sea level rise, no real seasons anymore, just a big swinging mess from extreme drought to extreme storms

6 degrees c = mad max

8 degrees c, he basically said humans were long gone at this point.

Remember, 1 degree average = massive localised changes.

Hmm now that I've written all this, I'm not sure, were you speaking in celsius or fahrenheit?

edit, specified celcius, also I think this may have been the guy but not quite the same talk [https://www.youtube.com/watch?v=pznsPkJy2x8](https://www.youtube.com/watch?v=pznsPkJy2x8)

<comment><USER5> I was talking Celsius / Kelvin. I'm assuming the speaker was referring to Fahrenheit - I'm thinking mankind as a whole might be able to survive +8 degree K iff we find efficient synthetic food sources that work in such a climate (which I assume we will) - however it would probably be at a fraction of the population we have today - whether our civilization could survive an indirect genocide on a global scale to have the infrastructure to do this is another question.

edit: re your edit: if it's true that +6 degrees sets perpetual heating mechanisms in motion which lead to +12 degrees by 2300 (as suggested in the ted talk), yes, we probably wouldn't survive +8 in the long run. it's damn scary, really - if we screw this up in the next 20 years, we basically damn the whole planet.

<comment><USER6> You mean, mankind might survive +8 degrees F (about +4.5 deg celcius)

<comment><USER5> I meant Celsius, but see my edit - I have to revise that guess. Given that +6 degree C will probably cause runaway warming processes to initiate (which I wasn't thinking about before), surviving for even a few more centuries suddenly becomes a tough order.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> The actual lawsuit isn't against fracking itself. It is to prevent construction of a 160 water tower that would be used to fill trucks with water for fracking and other oil/gas exploration activities and this is in violation of the existing zoning ordinances in the ranching community in which he lives.

While it appears a subtle distinction to those looking for an example of glaring hypocrisy, would it be any different if he (and his other rancher neighbors) were protesting a construction of a 160ft water tower intended for some other purpose?

<comment><USER8> You do know that there are no communities that have zoning ordinances allowing 160ft water towers, right?

So there's always a variance of some sort involved if fracking is done near any residential community, but I don't think that's stopped the guy or Dick before. I still think the hypocrite card can quite validly be played here.

<comment><USER7> So I can just build my own privately owned 160ft industrial structure wherever I want?

<comment><USER9> In Texas? IANAL, let alone a Texas attorney but [http://www.bhlaw.net/articles/basics_of_zoning_in_texas.pdf](http://www.bhlaw.net/articles/basics_of_zoning_in_texas.pdf) seems to say yes.

<comment><USER7> Seriously? IANAL or a Texas attorney either but I can read...

Page 4...Section 211.003..."The governing body of a municipality may regulate...the height, number of stories, and size of buildings and other structures"

</comment></comment></comment></comment></comment><comment><USER10> Just some food for thought here....Many proponents of green energy (e.g., the Kennedys) in the form of wind farms throughout the Midwest put up a huge fight when plans for a wind farm off of Nantucket Sound got a little too close to home for them as well. This doesn't excuse the behavior taking place here, but it happens on both sides of the aisle.

<comment><USER11> Funny, I was just thinking of that when I read this article. This isn't really so much a matter of hypocritical energy company CEOs as much as it is a reflection on the behaviors of the rich and privileged.

<comment><USER12> I'd say it's the behavior of humans: selfishness is in our nature.

The same situation plays out time and again with cellphone towers. People bitch about poor coverage, but as soon as a tower is going to be installed in _their_ neighbourhood... :-)

Similarly, people buy houses under the foot of airport runways, complain about the noise, and eventually the airports close...

(NIMBY: Not in my backyard)

<comment><USER11> I agree completely. It's _almost_ humorous (I've been guilty of thinking some of these before sooooo...)

Though, I do wonder if it isn't completely selfishness, including instead a pinch of _resistance to change_ as part of the social recipe that drives us. In some of my other comments, I've suggested it's entirely greed or selfish motivations, but reflecting on my own experiences, resistance to change fits the bill fairly well. (Excepting financial motivation as partial to the cause, mind you.)

We are creatures of habit, after all.

</comment></comment></comment></comment><comment><USER13> >You see, while Tillerson believes that the inevitable noise pollution that accompanies the fracking process—not to mention the potential for water contamination and other dangerous side-effects even when it is done safely (and some would strenuously argue that it is not possible to frack safely)— is of no real significance when it affects someone else's neighborhood, he surely thinks it to be a pretty big deal when someone dares to get involved in fracking in Rex Tillerson's neighborhood.

I'm 99% certain it's about decreased land values, not any possible environmental issues.

<comment><USER14> I can't tell if you are being serious or not.

Environmental issues include visual and noise pollution of the property and town. There is no clear line between 'pollution' that is bad for your health and 'pollution' that is just there descreasing the value of your land.

<comment><USER11> > There is no clear line between 'pollution' that is bad for your health and > 'pollution' that is just there descreasing the value of your land.

It seems you're commenting solely to split hairs. I think Puer is right.

In Mr. Tillerson's case, it's almost certainly a matter of land value. And probably a little selfishness, i.e. "not in my backyard." Indeed, I wouldn't be surprised if his concern was _strictly_ a matter of worth and the dollar value of his property.

<comment><USER15> And all the "little people" whose land value is negatively impacted? They don't count?

At least this "big guy" can afford to live somewhere else.

Imagine having the environmental concerns, and not being able to sell and get away from them.

<comment><USER11> > And all the "little people" whose land value is negatively impacted? They > don't count?

I don't see where I said this. I'm not even sure _what_ you're arguing with me over.

The point is pretty clear, I think. It has more to do with this individual's greed and probably very little (if any) to do with environmental concerns.

</comment></comment></comment></comment></comment><comment><USER16> I would hope that anyone in any other community fighting fracking would reference this lawsuit as evidence that Oil and its executives believe there are situations where they shouldn't be allowed access, at the least.

</comment><comment><USER17> You can't make this up. Priceless.

</comment><comment><USER18> Unpalatable but unsurprising hypocrisy.

</comment><comment><USER19> Scary. This is what happens when people in power don't care if the system looks legitimate or not.

</comment><comment><USER20> What a fracking joke! Hypocrisy at it's finest folks! This shows just how out of touch the 1% are with the 99%. ExxonMobil has bullied those cites, counties & homeowners that have tried to sue them to stop projects like the one Mr. Tillerson is so outraged about!!! So basically isn't he sorta just suing himself? People like this don't care about safety regulations, EPA regulations or people in general. It's the mighty dollar they have a relationship with! Watch as he uses his money to support a Tea Turd Candidate that wants less government, like The EPA to further their Fracking Cause. Gullible citizens that support their hand picked candidates do this by telling what you want hear not what the candidates are planning on doing once elected. These vultures just like the Koch Brothers don't care about these citizens they just want someone(candidate & special interest groups) to do their dirty work. They bankroll and fund the crap of their hand picked candidates campaigns all the while hiding in the shadows. They never speak in public or news interviews because people will do it for them. So my Question Is: "don't those supporting their idelogy & views realize their supporting something that is against their(your) best interest?"Wake up these slime balls are buying government to further their agenda. They want no regulations so they can deepen their pockets. They could care less about your home, land, town, city, county or state. Just read about the growing number of earthquakes in Oklahoma! If you vote for their candidates these scum support then you CAN NOT whine or moan once a well, water tower, pipeline or project like this runs right through your community! THINK!!!!' Think before voting this mid-election 2014. They could give a FRACK about your livelihood.</comment>


Actuatr: Open Your Data To Developers Instantly - <AUTHOR> http://www.actuatr.com/

<comment><USER2> 1\. Thanks for pointing out elev.at - nice service. I hadn't seen that. Nice that it makes an API out of stuff that's already on the web. 2\. Feedback link should not cover anything if your screen width is >~960px. Anyone else having a problem? 3\. Wonder if '/' is confusing other people. I'll ask around... 4\. Eek.. that's what happens when you grab a name and use it. I'm not married to it but I'll have to keep it at least for this competition. 5\. Yep right now the upload limit is 100k so I can monitor and manage the load in the early days but that is going to change soon.

</comment><comment><USER3> As this involves dealing with data sources, flows, and presentation, Actuatr may get some scrutiny from the reporting/reporting-services company Actuate (see <http://www.actuate.com>)..

</comment><comment><AUTHOR> Similar to elev.at (<http://elev.at/>), it's a way of converting legacy & proprietary data formats to a web-accessible version.

</comment><comment><USER4> The 'Feedback' link on the left covers the main content for me in FF 3.5.5 on 32bit Vista.

</comment><comment><USER5> silly little detail - the "/" between options top right made me think it was a breadcrumbs style path. gave me one of those "wtf? that can't be right. oh... right." moments (which is probably not a good thing).

</comment><comment><USER6> does it really only allow you to upload 100k of data?</comment>


Academic Exercise: Estimating Cost of Bandwith and Colocation Services for Startup - <AUTHOR>

I'm putting together a business plan for an internet startup as part of a management class, which requires a complete budget and balance sheet. The planned site is a subscription based fashion advice service, looking to attract ~10,000-17,000 users in the first year (stifle your laughter, I'm in a group with a bunch of fashionistas). Clearly a large portion of operating expenses will come from bandwidth and server costs. This seems like such a basic question, but I'm having difficulty finding resources that could provide a rough ballpark figure for what such a site would cost on the server side. I've been away from IT for several years and really have no idea what this might require. Could someone point me in the direction of some rough numbers? <comment><USER2> Google for amazon monthly calculator . If you can estimate a web page size, which is pretty easy, the calculator will give you a good ballpark number.</comment>


Apple facing back taxes running into billions over Ireland deal - <AUTHOR> http://www.theguardian.com/business/2016/aug/29/brussels-ruling-could-hit-apple-with-billions-of-euros-in-back-taxes?CMP=Share_AndroidApp_Submit_to_HN <comment><USER2> Good thing this is being investigated. Tax dodging harms everyone. And of course, Apple is not the only company using imaginative tax arrangements in Ireland to minimize their tax payments.

<comment><USER3> High taxes harms everyone also, this will only harm Ireland tho.

<comment><USER2> The corporate tax rate in Ireland is 12.5%, which is quite low in comparison. If we allow a system where large companies end up paying less than their fair share, this gives them an unfair advantage (e.g. Starbucks vs. family owned coffee shop). Create a fair tax system first, then lower tax rates for everyone (if possible).

</comment></comment></comment><comment><USER3> Looks like Ireland is going to be next to leave the EU.

<comment><USER4> Which of course would make it useless as the tax location for the EU branches of international companies, which is at least some of their value proposition.</comment></comment>


Comptia #CyberMonday deal spinner appears Rigged - <AUTHOR> Waited for cyber monday in hopes to get a sweet deal on a certification voucher from comptia but was disapointed this morning. Had to contact them directly for the following link and after a little testing the best I saw was 10% off which isnt a very good promo when you can get that any time of the year from any of there training partners or approved study materials, or a google search of coupon code websites.
Id be interested to hear if anyone gets something different that 10% off when testing this promo spinner game they posted. Seems the game is rigged but I could be wrong.
https://certification.comptia.org/cybermonday <comment><USER2> I got 10% (of course). It's powered by [https://www.wheelofpopups.com/](https://www.wheelofpopups.com/) and one of the features is you can set the probability of each item.

<comment><USER2> Below the raw deobfuscated data. 100% probability to get the "10% off".

                    "segmentValuesArray": [{
                        "probability": 100,
                        "type": "string",
                        "value": "10% off exams",
                        "win": true,
                        "userData": {
                            "wheel_text_win_title": "Hurrah! You've hit 10% off exams. Lucky day!",
                            "wheel_text_win_description": "Please make sure to copy the following discount code to be able to use it on checkout.",
                            "wheel_coupon": "ITCareers10",
                            "wheel_text_coupon_button": "Continue & use discount"
                        }
                    }, {
                        "probability": 0,
                        "type": "string",
                        "value": "Almost",
                        "win": false
                    }, {
                        "probability": 0,
                        "type": "string",
                        "value": "15% off exams",
                        "win": true,
                        "userData": {
                            "wheel_text_win_title": "Hurrah! You've hit 15% off exams. Lucky day!",
                            "wheel_text_win_description": "Please make sure to copy the following discount code to be able to use it on checkout.",
                            "wheel_coupon": null,
                            "wheel_text_coupon_button": "Continue & use discount"
                        }
                    }, {
                        "probability": 0,
                        "type": "string",
                        "value": "No luck today",
                        "win": false
                    }, {
                        "probability": 0,
                        "type": "string",
                        "value": "20% off exams",
                        "win": true,
                        "userData": {
                            "wheel_text_win_title": "Hurrah! You've hit 20% off exams. Lucky day!",
                            "wheel_text_win_description": "Please make sure to copy the following discount code to be able to use it on checkout.",
                            "wheel_coupon": null,
                            "wheel_text_coupon_button": "Continue & use discount"
                        }
                    }, {
                        "probability": 0,
                        "type": "string",
                        "value": "Next time",
                        "win": false
                    }, {
                        "probability": 0,
                        "type": "string",
                        "value": "25% off exams",
                        "win": true,
                        "userData": {
                            "wheel_text_win_title": "Hurrah! You've hit 25% off exams. Lucky day!",
                            "wheel_text_win_description": "Please make sure to copy the following discount code to be able to use it on checkout.",
                            "wheel_coupon": null,
                            "wheel_text_coupon_button": "Continue & use discount"
                        }
                    }, {
                        "probability": 0,
                        "type": "string",
                        "value": "Nope",
                        "win": false
                    }, {
                        "probability": 0,
                        "type": "string",
                        "value": "30% off exams",
                        "win": true,
                        "userData": {
                            "wheel_text_win_title": "Hurrah! You've hit 30% off exams. Lucky day!",
                            "wheel_text_win_description": "Please make sure to copy the following discount code to be able to use it on checkout.",
                            "wheel_coupon": null,
                            "wheel_text_coupon_button": "Continue & use discount"
                        }
                    }, {
                        "probability": 0,
                        "type": "string",
                        "value": "Sorry!",
                        "win": false
                    }, {
                        "probability": 0,
                        "type": "string",
                        "value": "35% off exams",
                        "win": true,
                        "userData": {
                            "wheel_text_win_title": "Hurrah! You've hit 35% off exams. Lucky day!",
                            "wheel_text_win_description": "Please make sure to copy the following discount code to be able to use it on checkout.",
                            "wheel_coupon": null,
                            "wheel_text_coupon_button": "Continue & use discount"
                        }
                    }, {
                        "probability": 0,
                        "type": "string",
                        "value": "Nothing",
                        "win": false
                    }],

<comment><AUTHOR> Thanks for that info. I figured it was heavily weighted for the 10% off but it appears it was the only possibility. I tested 10 for 10 before giving up.</comment></comment></comment>