What is a decibel? - <AUTHOR> https://tomhazledine.com/what-is-a-decibel-anyway/ <comment><USER2> A small nit-pick: >The highest possible level of sound produced by audio equipment is 0 dBFS.

...is only applicable to audio equipment operating solely on digital signals. Humans don't hear digital signals, we hear pressure changes, so at some point, those digital signals need to be transformed into analog voltage signals to drive pressure transducers (loudspeakers). Those analog voltages are measured by a different reference, a standardized voltage, as opposed to the absolute max of a digital scale. Analog voltages are commonly specified in dBV or dBu (0 references of 1 volt and ~0.775 volts, respectively).

The majority of the pro audio gear I've seen interacts with analog signals. So at some point in a piece of gear that handles both analog and digital signals, you're going to have to define a reference point between your digital and analog levels. This can vary from one piece of equipment to the next. The professional audio gear worth it's salt that I've seen can handle analog signal levels of +18dBu or more. Consumer and pro-sumer audio gear have lower limits, and can vary wildly. So 0dBFS signal going into your USB audio interface might come out as a +16dBu analog signal, while the same digital signal going into a professional mixing console might come out as a +24dBu analog signal.

Edit: Grammar and spelling

<comment><USER3> That's a great point. The piece was written from a very web-centric point of view. Even though I used analogue mixing desks as my jumping off point, I only really looked at decibels in a digital context.

In fact, all the digital VU meters I've looked at do account for positive values, so I definitely shouldn't have breezed over that aspect so quickly.

<comment><USER4> This varies from product to product; for example, meters in Pro Tools are labeled directly in DBFS[1]. So are Yamaha digital mixers (at least the LS9 and M7 - not sure about the newer ones).

On the other hand, the Allen & Heath GLD has its meters labeled differently, and I'm not quite sure what they're referenced to (they go up to +12). This can be a bit frustrating, since I never know how close I am to digital clipping, but in practice I aim to get everything around 0 dB on the meters and I have at least 12 dB of headroom.

Wikipedia has a neat list[2] of different analog reference levels for 0 dBFS.

1: Pro Tools metering - [http://i.imgur.com/YcUBR6H.png](http://i.imgur.com/YcUBR6H.png)

2: [https://en.wikipedia.org/wiki/DBFS#Analog_levels](https://en.wikipedia.org/wiki/DBFS#Analog_levels)

</comment></comment></comment><comment><USER5> "a dimensionless way to compare values that vary dramatically on a linear scale" ?

So many people totally omit the reference measure, which drives me abolutely batty, particularly when we're talking about sound.

In air, dB SPL is referenced to 20 micropascals. In water, it's 1 micropascal, so the medium matters.

Since loudness is a psychophysical percept, it's also dirty pool to speak of loudness in this way. Intensity can be quantified, loudness varies by listener.

<comment><USER6> > _Since loudness is a psychophysical percept, it 's also dirty pool to speak > of loudness in this way._

It's worth noting that there are standards for loudness as well.

For example: The FCC broadcast spec for commercials uses ITU 1770, which involves a filter. The resulting measurement is then labeled in units of dB LKFS. (LK are filter params, which are fixed by the spec, FS is full-scale, ie this is done digitally. (As an aside, video streaming could sure use some more uniformity for its inline commercials too.))

<comment><USER7> I've noticed very recently that Youtube started to play commercials louder than whatever I was watching. I don't remember google stooping to such tricks ever before,

<comment><USER6> > I don't remember google stooping to such tricks ever before

I kinda doubt that anyone has consciously tried to make the commercials louder than the content. It's a tough problem to get right: The television industry has been at it a lot longer, and they still barely make it work. The digital outlets still seem to be finding their footing on this issue.

FD: My biz delivers commercial content to TV, digital and cable outlets (and we normalize the audio). Normalization used to be a bit of a black art, but failure to get the audio levels right results in FCC fines to the stations, so you have to work hard to make it happen.

<comment><USER8> > _I kinda doubt that anyone has consciously tried to make the commercials > louder than the content. It 's a tough problem to get right: The television > industry has been at it a lot longer, and they still barely make it work._

right, that's why commercials are _consistently_ louder than the "content".

<comment><USER5> [https://arstechnica.com/tech-policy/2010/09/super-loud-tv- co...](https://arstechnica.com/tech-policy/2010/09/super-loud-tv-commercials- one-step-closer-to-extinction/)

7 years later..

</comment></comment></comment></comment></comment></comment><comment><USER9> That text mentions that dB is relative, but misses how the values are defined. A simple definition could be:

\- If we are talking about dB in context of amplitude 6dB more means twice as much amplitude, 6dB less (or -6dB) means half the amplitude.

\- If we are talking about dB in context of power 3dB more means twice as much power, 3dB less (or -3dB) means half the power.

dB is often also used to measure attenuation instead of gain. Here a positive dB value would actually mean less output compared to reference value.

And: For dB values often a suffix is used, to denote to what the value is relative to. E.g. dBV is relative to 1V, dbm is relative to 1 milliwatt.

<comment><USER10> What you said is kinda confusing so I'm gonna clarify

3dB = √2 which is the amplitude ratio which is equivalent to doubling the power, since power is square proportional to amplitude

6dB = 2, so a 6dB increase in power would be doubling the power, and a 6dB increase in amplitude would be 4x the power

a negative dB is just the reciprocal of the radio, so -6dB is equal to 1/2

<comment><USER11> > _6dB = 2, so a 6dB increase in power would be doubling the power_

Pretty sure this part isn't right. Decibels are about power ratios, not amplitude ratios. 10 dB is a power ratio of 10, so 20 dB is an amplitude ratio of 10. 6 dB is a power ratio of 10^(6/10) ≈ 3.981 or an amplitude ratio of 10^(3/10) ≈ 1.995.), while 3 dB is a power ratio of 1.995 or an amplitude ratio of 1.413.

(It's probably sometimes defined so that 3 dB is a power ratio of exactly 2, making 30 dB 1024 instead of 1000.)

<comment><USER10> Yes I was wrong about the 6dB. That's a quadrupling of the power, not a doubling. It's twice the amplitude.

Unfortunately I can't edit my comment.

</comment></comment></comment></comment><comment><USER12> Great write up and balancing the relativity of decibels to frequency and environmental conditions is basically what audio engineers do all day.

In high school long ago I used to compete in Car Audio SPL competitions. Whenever we would compare notes about who has the highest readings, we would always reference spl at what frequency and where it was measured (windshield, kick panel or dash).

This is largely because in a pure SPL "Drag race" competitors typically compete on a single frequency rather than a song for example. It was instructive to compare frequency and spl because some cars resonant frequencies (fs) were better suited to different fs values of drivers (speakers) and then further down the line certain amplifiers optimized certain frequencies, down to understanding which MOSFETs they used.

So it was all about finding and matching the fs of your car, the drivers and the amps and then how much power you could push at once to make the whole system resonate the most optimally at a certain focal point in the car. Really mind boggling maths and physics when you really get down to it.

If anyone is interested in going deeper, John Hilliard did some amazing research into decibel understanding and managing SPL as part of the Apollo project. Basically he's the guy that made sure that the sound from the Saturn 5 engines didn't bounce off the deck and destroy the rocket on lift off.

<comment><USER13> Could you supply a reference for John Hilliard's research?

</comment></comment><comment><USER14> Google cache: [http://webcache.googleusercontent.com/search?q=cache%3Ahttps...](http://webcache.googleusercontent.com/search?q=cache%3Ahttps%3A%2F%2Ftomhazledine.com%2Fwhat- is-a-decibel-anyway%2F&oq=cache%3Ahttps%3A%2F%2Ftomhazledine.com%2Fwhat-is-a- decibel-anyway%2F&aqs=chrome..69i57j69i58.824j0j4&sourceid=chrome&ie=UTF-8)

</comment><comment><USER15> All of that (which was quite interesting), yet he doesn't actually say what a decibel is. It is:

• 0.1 bel

• +/-1 bel = +/-10 dB = factor of 10 increase/decrease in power

<comment> GuB-42 The bel is never used in practice.

Although I am probably wrong, I always thought that "decibel" actually meant "decimal bel" because it represents a decimal logarithm and that the "bel" unit was devised as an afterthought to fit the SI prefix.

Still, it is a good way to remember that 10 dB = multiply by 10, because "deci" means 10.

<comment><USER6> > and that the "bel" unit was devised as an afterthought to fit the SI prefix.

It's named after Alexander Graham Bell, in 1928 at Bell Labs. [https://en.wikipedia.org/wiki/Decibel#History](https://en.wikipedia.org/wiki/Decibel#History) (Yes I worked there, it was part of indoctrination training... :)

> because "deci" means 10.

Really, it means 1/10\. ("Deca" is 10.)

</comment></comment></comment><comment><USER16> Ossmann's 'Software Defined Radio with HackRF' lesson 3 - Decibel:

[https://www.youtube.com/watch?v=J1FbhBqBYLM](https://www.youtube.com/watch?v=J1FbhBqBYLM)

</comment><comment><USER17> The wikipedia article is also very informative. I recently had to learn about dBV (decibel volts) when trying to understand the spec sheet for a MEMS microphone.

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

<comment><USER18> I got intimately familiar with that page and sources while trying to extend Boost.Units with Decibel support. Bit of a nightmare, in the end I just hardcoded in support for dBm?[VW]?

</comment></comment><comment><USER19> The sound of mysql crashing is about 10 decibels.

</comment><comment><USER20> It's a tenth of a bel, right...? :-)</comment>


90% of Python in 90 Minutes (2013) - <AUTHOR> http://www.slideshare.net/MattHarrison4/learn-90 <comment><USER2> Just noticed this on my commute home (author of slides).

This is an old and condensed version of corporate training that I run. Typically the training runs for some 4 days. If you want a more modern version of this material (that you can submit your PR's to), check out my Python 3.6 reference[0].

If you have any questions, fire away, and I'll do my best to answer them.

[0]- [https://github.com/mattharrison/Tiny- Python-3.6-Notebook](https://github.com/mattharrison/Tiny-Python-3.6-Notebook)

<comment><USER3> Is there any other way to support you? I don't really need any more physical books.

<comment><USER4> Why not purchase it and give it away?

<comment><USER5> Specifically, you could give it away to a local library :)

</comment></comment></comment></comment><comment><USER6> That's nowhere near 90% of Python. It's strange because everyone thinks Python is an easy language to learn, but that's not True at all. It's easy to pick up and be productive with it in a very short time, yes, but the interpreter has so much going on you can't learn everything in years. If you happen to learn everything about protocols, the interpreter gotchas, there is the standard library which is also huge, and if you got everything in it, there is the ecosystem, which is so large nobody can know about every package. And I did not talked about the whole new world of Python3, asyncio and the whole old world of Twisted.

<comment><USER7> > If you happen to learn everything about protocols, the interpreter gotchas, > there is the standard library which is also huge, and if you got everything > in it, there is the ecosystem, which is so large nobody can know about every > package.

I don't think the library and packages are part of the language though. Just like there is a 'C' without a standard library there is Python 'the language'.

As for the 90%, 90% of the code you write is boring and simple. The one thing I really missed in the slides was list comprehensions, presumably they are in the '10%', but I use them all the time.

<comment><USER2> Yeah, these slides were for a long conference talk that introduced the basic syntax of Python to developers who weren't familiar with Python.

(List) comprehensions are super cool, as are generators, decorators, etc, but there just wasn't enough time to cover that. Plus, as you say most code is boring, and you can get by with the material in this deck.

</comment></comment></comment><comment><USER8> I send people here for a summary: [http://web2py.com/books/default/chapter/29/02/the-python- lan...](http://web2py.com/books/default/chapter/29/02/the-python-language)

Then in a few more minutes can learn a framwework and be programming: [http://web2py.com/books/default/chapter/29/01/introduction](http://web2py.com/books/default/chapter/29/01/introduction)

</comment><comment><USER9> From slide 32:

> (In Python 3 // is integer division)

I find it clearer to describe this behavior as "floor" division. You might think "integer division" would have the same results as python 3's `int(a / b)` when `a` and `b` are ints, but, no, this is not the case. I never could quite understand why all the hub-bub about "integer division" and why it should change from python 2 to python 3 because the behavior seemed natural and similar to the native integer division on most processors. Indeed its behavior is astonishingly different with negative numbers.

        $ python2 -c 'print 2/3, -2/3, int(-2./3.)'
        0 -1 0
        $ python3 -c 'print(2//3, -2//3, int(-2.//3.))'
        0 -1 -1
        $ python3 -c 'print(2/3, -2/3, int(-2./3.))'
        0.6666666666666666 -0.6666666666666666 0

<comment><USER10> The term "integer division" comes from the fact that Python 2 a/b is the same as Python 3 a//b if a and b are integers.

It's not the same as int(a/b), because like most languages int() rounds toward zero, and unlike most languages Python division rounds down.

100% agreed that "floor division" is a better description (e.g. it covers floats too).

<comment><USER11> > like most languages int() rounds toward zero, and unlike most languages > Python division rounds down

As someone who only occasionally needs to manipulate python, and someone who rarely needs to do integer arithmetic on negative numbers (beyond addition/subtraction) this caused me to do a double-take.

I'd always just assumed that languages that treat floats and integers separately would always round integer division towards zero, but TIL python rounds to the left on the number line.

It's really true! Turns out it's true in ruby, too:

-5 / 4 == -2

How 'bout that. Anyone know what other languages treat integer division in this way?

<comment><USER12> In both cases, b * (a // b) + a % b = a, which is often a behavior that you want.

In some other languages, the % operator (IMO wrongly) takes the sign of a, making it more like a "remainder" operator than a "modulo" operator, whereas in Python % (IMO correctly) takes the sign of b.

I also agree that this should be thought of as "floor division" rather than "integer division" though.

</comment></comment></comment></comment><comment><USER13> Learning Python is easy but learning how to use Python well isn't. However, learning to use Python well pays great dividends and so the experience is worthwhile.

<comment><USER2> Hence, when I'm doing a corporate training, this material takes about three days to cover.

</comment></comment><comment><USER14> I guess if learning 90% of something takes 90 minutes, the remaining 10% will take 10 years.

<comment><USER15> And that is where problems start with keen and eager junior developers who think by knowing the 90% they really know the 100%.

<comment><USER16> Unfortunately here in HN we constantly upvote those junior developer's Medium posts.

<comment><USER7> Blinking LED now in Node.js.

</comment></comment></comment></comment><comment><USER17> I really love the learnxinyminutes project. If anyone doesnt know it here is the Link:

[https://learnxinyminutes.com/](https://learnxinyminutes.com/)

It is kind of the same approach to the beginning of a new language.

Here is the direct link for the python3 source: [https://learnxinyminutes.com/docs/python3/](https://learnxinyminutes.com/docs/python3/)

</comment><comment><USER18> This seems like a less-polished version of 'Learn X in Y Minutes'.

Dropping phrases like "REPL" and "PEP" and only defining what they stand for doesn't really explain what they are. And the explanation of dunder methods at first seemed to suggest there are only 2.

And calling this 90% of Python is really misleading. It's not even 90% of the syntax, let alone the whole language.

</comment><comment><USER19> You could easily reduce that ten fold, most of the slides contain little information. Every developer already knows that you can add integers, combine booleans with and, and have alternatives with if and else. Or how lists and maps work. No need to repeat this in such detail, just list the type names, keywords and operators.

Instead focus on what is special about Python like indentation and colons, slicing, __iter__, arbitrary precision integers, ... This are the important things, otherwise you can not really say you know much about Python because it is generic stuff that applies to most languages under the sun.

<comment><USER7> You can just skip the slides you already know.

Everybody has a different level of proficiency as a developer and a guide like this is aimed at a beginner, not at a seasoned developer. Since you don't know their background it doesn't hurt to repeat already familiar stuff because it is easy to move past that quickly if you already know it, but it would be a lot harder to make sense of the package if you so much as miss one or two simple steps or elements.

For me one of the take-aways was the negative stride in a slice, I had not seen that yet and a couple of clever tricks such as 'dir' and 'help'. I've been doing nothing but python lately, and going through the whole deck to stop at the things I didn't know yet took only a couple of minutes.

</comment></comment><comment><USER20> Although this ignores most of the differences between Python 2 vs 3, note that there will be differences in iterables, classes, and print functions. Feel free to comment if you aware of any more.

<comment><USER21> Generally projects that suffer from the str/bytes/unicode mess is the hardest to port in my experience as 2to3 can't really help.

Also relative/absolute imports can cause some confusing bugs.

<comment><USER22> That's because the programmer needs to make the choice of whether the data is text or just bytes. I suppose you could write a tool to infer that choice, but it wouldn't be perfectly accurate.

<comment><USER23> And see if that choice lines up with the v3 compatible version of any libraries they are using. Ones that touch the data anyway.

</comment></comment></comment></comment><comment><USER24> About slide 51: "No Multi-line comments"

You can use triple-quote strings as multi-line comments: [https://twitter.com/gvanrossum/status/112670605505077248](https://twitter.com/gvanrossum/status/112670605505077248)

</comment><comment><USER25> This is a nice little presentation! Although I wish there was a "context switching" guide that highlights the main differences between all of the languages. After working in Julia or Python for 8 hours, I switch to JavaScript and suddenly forget how strings work. I wish there was a giant table with all of the main differences between the major languages listed so I can glance at it quickly and be on my way.

<comment><USER7> That's my main reason for thinking really long and hard about what eco-systems to invest in. I've settled on Python and Erlang for now and I really hope that that bet will pay off. Everything else except for Java seems transient to me.

</comment></comment><comment><USER26> Why are these books always focused on a fast learning principle? I really don't think anything useful can be made from 90 minutes of quick reading. It's a great refresher for people that didn't work with the language for a while. Now I remember python's annoying indents.

<comment><USER27> Its potentially valuable for anyone who needs to do some quick work in Python. There are quite a lot of little Python scripts I work with, even though I mostly do Ruby. I don't need (nor do I want to) become a Pythonista just to make some edits now and again.

</comment></comment><comment><USER28> > l.extend(12)

...For a list "l": that is wrong, "extend" expects an iterable, not an int.

<comment><USER29> It's l2 (another list), not 12.

<comment><USER30> A clear case where the "Readability counts." principle from "The Zen of Python" applies.

</comment></comment></comment><comment><USER7> Super useful, would be nice as anki deck.</comment>


Crimson Tidings: The primordial color gets its due - <AUTHOR> http://www.weeklystandard.com/crimson-tidings/article/2008479 <comment><USER2> This article was confusing, and I didn't understand exactly what I was reading until I noticed the Amazon link at the bottom.

<comment><USER3> The website's layout certainly didn't help either.</comment></comment>


Ask HN: Are you able to actually get work done? If so, how? - <AUTHOR> I'm a WFH veteran, and I am even struggling to stay focused. The mental health toll from the news and rapid change has been a bit overwhelming, and it's difficult to ignore the daily updates given that I work in tech. It's increasingly feeling like a grind to keep going. Am I the only one feeling this way? <comment><USER2> Yes, it's not easy to be productive with the current events unfolding into unknown directions(pandemic, financial, food, wfh, etc). I am not a WFH veteran and only recently started to work form home and so far I dont find it too easy. I'd say if I put in 3-4 hours of solid work I'd call it a day. If I happen to put in 8 consecutive hours of work, next day is ok to do less and relax more. I worked from home in the past and I found it to be horrible until I discovered that if i went to a public space like a Starbucks or other cafe things were a lot more bearable. Not sure how long this pandemic situation will last but Im already thinking I'll be less productive than in the office because I have more privacy there than at home. I have a 2 year old so im kindof getting a break when not at home.

Also we live in a tiny one bedroom apt in NYC. Setup kindof sucks but it is what it is. I dont even have any external monitor so I struggle on a 14" lenovo laptop. The situation caught me completely unprepared...

</comment><comment><USER3> I haven't gotten a damn thing done in about a week. You're not alone.</comment>


IPhone 3GS Feature Guide - <AUTHOR> http://i.gizmodo.com/5283099/iphone-3gs-complete-feature-guide

<comment><USER2> Given that you'll pay at least $50/month for iPhone service, who wouldn't go for the $199 3GS over the $99 current model? The feature set seems huge and interesting to just about anyone -- who doesn't want battery life and speed? The nature of the service contract practically guarantees that iPhone buyers aren't horribly price-conscious when making purchases. So, of those likely to buy, who won't value the new model at at least $100 more than the old one?

<comment><USER3> Having a crappy option makes the more expensive options seem like a better deal.

<comment><USER4> i think there's a lot of retail evidence to suggest this is true. its also true in the reverse (a high priced item placed next to a midrange item will help the midrange item sell better than if it were placed alone)

</comment></comment></comment><comment><USER5> The only extra thing I was expecting was a higher res screen. I guess they decided that would be too disruptive to the developers.

<comment><USER6> Unfortunately, the iPhone SDK is hard-coded to the existing screen size in a lot of ways. For example, most apps contain a Default.png that is displayed while the app is loading, which is exactly 320x480 pixels in size.

It's just a matter of time before Apple releases an iPhone-like device with a different screen size, but when they do, it will be a painful transition.

<comment><USER7> They just had the perfect oppertunity to make that transition with the change to iPhone OS X 3.0, so that is no excuse.

<comment><USER8> It could be argued that the introduction of the new device would be the perfect opportunity. Having resolution-independent apps isn't going to help when the physical size of the screen changes. I think the UI changes going from a 3.5" screen to a 7-9" screen are going to be bigger than the changes to increase pixel density on the same size screen.

</comment></comment></comment></comment><comment><USER9> Looks great... anyone want to buy my 3G?

<comment><USER10> With the 8gb 3G phones selling new for $99 bucks, you're going to be in a tough spot. When the 3G came out, a bunch of people at my office got rid of our old iPhones by unlocking them first. Every single one we sold went to someone on T-Mobile.

<comment><USER11> Agreed. As a miserable Verizon customer, I would love me an unlocked iPhone 3G.

<comment><USER12> Does Apple sell a CDMA-based iPhone anywhere in the world?

<comment><USER13> No, sadly. All GSM. :(</comment></comment></comment></comment></comment>


Is it in the Public Domain? handbook (2014) - <AUTHOR> https://www.law.berkeley.edu/article/the-samuelson-clinic-releases-is-it-in-the-public-domain-handbook/ <comment><USER2> I'll save everyone some time:

No, it's not in the public domain. The copyright was renewed for another 1 million years. Make your own. :)

</comment><comment><USER3> Very interesting and worth checking out for those in the education or even promotional fields.</comment>


San Francisco Orders Property Owner to Build Exact Replica of Demolished Home - <AUTHOR> http://reason.com/blog/2018/12/17/san-francisco-orders-property-owner-to-b <comment><USER2> _San Franciscan city officials have a hard time letting go of the past._

No - the _Reason_ crowd has a hard time understanding the concept of a democratically controlled city planning process.

And in this particular case - the very concept of rule of law, it would seem.

<comment><USER3> Either way it seems another reason why San Francisco should be abandoned to the homeless.

It isn't that libertarians or the people the libertarians they are opposing are right or wrong. It is that San Francisco is stuck in an impasse between these kinds of people and it's astonishing that people are still going there because of this.

I remember going to Dreamforce and reading Marc Beniof's book boasting about how he ran a business illegally out of his house, and then Gavin Newsom comes on stage and says how Marc represents everything great about San Francisco and don't you know they have an app to help the homeless...

For instance, look at how Brendan Eich got kicked out of Mozilla. It's not him or the gay community, it's that California has an unholy combination of people who give money to conservative causes and people who are militant about being gay. Had Mozilla ran an office in any other city in the world this wouldn't have happened; in San Francisco if it had not been that it would have been something else.

Mozilla likes to talk about inclusion but the one kind of inclusion they won't consider is opening an office in some city like Chicago or St. Louis or something.

A city that can't solve the slightest problem of its own doesn't have anything to say about how other people could solve their problems and should not be in a leadership position -- at most they are going to export chaos to the rest of the world.

<comment><USER2> _A city that can 't solve the slightest problem of its own ..._

To get back to the original subject - it seems that the matter of the illegally demolished house was, in fact...

solved quite elegantly.</comment></comment></comment>


Docker Jumpstart - <AUTHOR> https://github.com/odewahn/docker-jumpstart/

<comment><USER2> The short introduction on that tutorial is much better than that actual docker site and 10-15 min interactive tutorial on what docker actually is and what it can be used for. A note to other developers, it's a good idea to not use some language without first defining the word... Especially if it's an overloaded term.

<comment><USER3> Agreed, it's a nice intro. I still think the hardest part is understanding how docker fits into the bigger picture. I think I've more or less figured it out on my own, but I struggled with e.g. do I want my source built in the image or mounted as a volume?

<comment><USER4> If you're loading the source from outside, aren't you losing the advantages of immutability of the Docker container? Suddenly the same image may have different behaviours depending on the state of the code outside.

<comment><USER5> That's why you want to use volumes for mutable data such as your source code repo - you isolate the changing parts and keep the containers static.

<comment><USER4> But if the source is mutable data, what isn't? Everything eventually mutates - dependencies have updates, configurations change, etc. Isn't the point of images that you "freeze" a static release that can be deployed everywhere?

It seems that by that point you've lost the advantage of using images; if parts of the system must be loaded outside of the container, it seems you might as well simply use a configuration manager to install the stuff and then run LXC/LXD containers instead of using images at all.

<comment><USER6> I know, I'm a little late to this party, but just in case anyone is still around... :)

For me, mounting my local app files as a volume is useful during development since it keeps the workflow fast. I don't have to rebuild the image every time I want to try the app out, I get to use the new code without delay.

If I were deploying as a container, I presume my build process would check the app out of git and build the image based on that fresh checkout. I'm just using Docker as a convenient way of simulating my production environment (dev'ing on Ubuntu 15.04, but deploying to Debian 7), and still be able to iterate rapidly.

<comment><USER4> Ah, fair enough, I was really thinking about shared, deployable images. I suppose this use case makes sense.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> I never really got to play extensively with Docker mainly because I have found the setup of OS X not quite friendly. While I understand the value of Docker, basically booting up a VMware/VirtualBox image was faster for my own use.

I'll have to give boot2docker a try to see if it is changing things. Having a good guide will definitely help.

<comment><USER8> Give Docker Machine a try [https://docs.docker.com/machine/](https://docs.docker.com/machine/)

      Machine makes it really easy to create Docker hosts on your
      computer, on cloud providers and inside your own data center.
      It creates servers, installs Docker on them, then configures
      the Docker client to talk to them.

Kitematic is another option [https://kitematic.com](https://kitematic.com)

<comment><AUTHOR> For some reason, when using docker machine on a mac, the VM always fails to start and freezes at the "VM starting" phase. For this reason, I've had to switch back to boot2docker.

<comment><USER9> Super sorry to hear - we've had some issues with VirtualBox around networking and some setups we didn't anticipate -- Would be really appreciative if you'd give the latest 0.3.0 release candidate a whirl and see if it fixes the issue for you: [https://github.com/docker/machine/releases](https://github.com/docker/machine/releases).

<comment><AUTHOR> Yes, It looks like it has been fixed. I tried creating multiple VMS ( dev, staging ) a few times, and It worked properly. Thanks.

Edit: I tried v0.3.0-rc2

</comment></comment></comment></comment></comment><comment><USER10> When you start playing around with docker and come to the area where you start to see that many things that should be very easy start to be really complicated, then you should take a look at lxc and the upcoming lxd and compare.

</comment><comment><USER11> Huh, the "Images and layers" section is 404'ing.

Edit: ah, here it is - [https://github.com/odewahn/docker- jumpstart/blob/master/publ...](https://github.com/odewahn/docker- jumpstart/blob/master/public/docker-images.md)

Edit: filed a PR

</comment><comment><USER12> Is docker ready for production? Is someone using it on real production environments? Most recipes at Docker Registy are a mess, and with plenty of bugs

<comment><USER13> I guess it depends on what you want to do.. I stopped caring and looking at docker after reading this: [http://iops.io/blog/docker- hype/](http://iops.io/blog/docker-hype/)

Using btrfs as cow is not ready for production (yet and likely not in the near future) - believing otherwise made the last few feeks quite miserable.

<comment><USER4> _Using btrfs as cow is not ready for production_

Yes, but it's not like they don't warn people. From the Docker docs:

 _" This backend is pretty fast, however btrfs is still maturing and is not considered production ready for heavy write loads. Mounting /var/lib/docker on a different filesystem than the rest of your system is recommended in order to limit the impact of filesystem corruption. You would also want to mount the volume directory /var/lib/docker/vfs/ on a standard XFS or EXT4 filesystem to ensure container data is protected."_

</comment></comment></comment><comment><USER14> Docker doesn't actually use LXC anymore.

</comment><comment><AUTHOR> Anybody wanting to try out Docker + GoLang + AWS Beanstalk, I've made a sample app / guide here - [https://github.com/OrganicCoffeeNepal/DockerBeanstalkSample](https://github.com/OrganicCoffeeNepal/DockerBeanstalkSample)

<comment><USER15> Thanks for the link.

Is Beanstalk worth it? Is it cheaper than an ec2 instance?

<comment><AUTHOR> I haven't done any systematic comparison to tell which one's cheaper. AWS allows 1 year of free tier service, so I'm using that. What I like about Beanstalk is that it's extremely easy to deploy updates. Just commit the changes and execute eb deploy. Setting up a new environment via. CLI is also a breeze.

</comment></comment></comment><comment><USER16> The new Nitrous Pro ([https://pro.nitrous.io](https://pro.nitrous.io)) has a docker template you can use if you don't feel like installing boot2docker locally.

There's also a bunch of advanced docker options you can check out:

[http://docs.nitrous.io/v1.0/docs/advanced-container- manageme...](http://docs.nitrous.io/v1.0/docs/advanced-container-management- options)

Would be a good compliment to the docker jumpstart manual.

</comment><comment><USER17> There is some outdated information on this site for boot2docker on Mac OS X.

1\. You need to set more than just tcp://ip:2376. You need to run

$ eval $(boot2docker shellinit)

to also set vars for DOCKER_CERT_PATH

2\. In order to get proper forwarding from your host Mac OS X to your boot2docker-vm, you use -P as a command line option for any containers you 'run'.

Bonus docker gotcha:

docker containers can't make fsync() calls on shared folders between your Mac and the boot2docker-vm. This means a lot of database software can't use a shared folder to store a database.

<comment><USER18> It's all a little outdated - 9 months is a long time in the Docker world.

<comment><USER17> 9 months is a 1/3 of its lifetime!

</comment></comment></comment><comment><USER19> "Unlike a true VM, a docker container does not also require a host OS"

Shouldn't that be guest OS?

<comment><USER20> Docker on bare metal would be pretty nice though.

<comment><USER21> Probably the closest you'll get is this: [http://rancher.com/rancher- os/](http://rancher.com/rancher-os/)</comment></comment></comment>


iPhone 8 - <AUTHOR> https://www.apple.com/iphone-8/ <comment><USER2> This may sound like the most ridiculous criticism, but I was really disappointed that the iPhone still uses the lightning charger port and not USB-C. Every other device charges with it including Apple's own laptops. Though seeing how long they take to adopt some features that seem standard to android users (like 4G LTE and wireless charging) in their smartphones, I guess this is to be expected.

<comment><USER3> It's very valid criticism. I was hoping that with the move to Qi for wireless, Apple would also move to USB-C for wired charging. It's ridiculous that you can buy a new iPhone and a new Macbook pro and they need a USB to lightning adapter to connect to each other.

<comment><USER4> It's pretty silly, Apple used to pay attention to details like this. But, how often do people plug their phones into their computers these days? Speaking for myself, it's probably been a couple of years since I last did that.

<comment><USER5> I do so when I need to charge it anywhere outside home. I don't bring a power adapter, just the cable.

Also, for those who have USB-C laptops, it would mean one-cable to rule them all -- even if they don't plug the phone into the laptop itself.

</comment></comment></comment></comment><comment><USER6> Neat, wireless charging, exactly like I had on my Nexus 5, around 5 years ago :) The best thing about the iPhone 8 is that it might finally make wireless chargers more commonplace, they are extremely convenient as Android users have been trying to tell for years.

Here's another one trick Apple might want to pick up on: I own both an iPhone 7 and a Nexus 6P, and the fingerprint sensor being in the middle of the back on 6P is unquestionably a better choice (Samsung messes up the placement). You can pick up the phone, unlock, and pull down the notification shade in one single natural motion. Maybe a few years from now...

<comment><USER7> Wireless charging will only work if it's everywhere. This new iPhone (and all future models) will make sure it catches on.

McDonalds and Starbucks _will_ have Qi charging tables by the end of next year.

<comment><USER8> Starbucks has had wireless chargers for a long time in most Bay Area stores. However, these are usually PMA chargers -- not Qi.

I have never been able to charge my Nexus devices which only have Qi at Starbucks, however my new Galaxy S8 which supports both Qi and PMA work at Starbucks just fine!

This does unfortunately mean that new iPhone won't work at Starbucks locations unless they replace the hardware.

<comment><USER9> In the past 6 months, I've seen all of that hardware disappear. Can't find a Starbucks offering the power mats in the tables anymore (and the circle dongles you would have to plug in).

<comment><USER10> The Starbucks in the Hillsdale Mall has power mats in the table.

</comment></comment></comment></comment></comment><comment><USER11> It was interesting to see how Apple tried to market the fact that you have to look at the phone for FaceID to work. I see that as a hassle, not a feature.

<comment><USER12> I don't think it went far enough. Consider the circumstance where an office or agent wants your phone unlocked. Your passcode is protected, your thumbprint is currently in debate, but holding your phone to your face? If that just always unlocked your phone without any sort of interaction from you? That's an uncomfortable level of privacy loss.

<comment><USER13> They did say you have to look directly at the phone. If looking away is enough to prevent it from unlocking, that doesn't seem too bad.

<comment><USER14> Effectively you'll need to have your head on the table if you're ever detained, or be closing your eyes shut and not able to walk, or waving your head around. Any of those could be seen as not complying with police.

<comment><USER15> Just as not providing your thumb would.

</comment></comment></comment></comment></comment><comment><USER16> This is a pretty phone -- but I really wish they'd make a smaller phone around the size of the 5S with the option to change the resolution (e.g. LittleBrother in Cydia).

My 5S is slowly dying -- but I can't find a good replacement (new or used) that can be jailbroken. For me its the perfect phone, but I'm an extremely light phone user (email, phone, imessage, Simon Tatham's Net and Galaxy puzzles).

I guess I was hoping that they'd update the SE.

Dear Google, please build a native desktop client for one of your many SMS apps. -

<comment><USER17> I'm happily using the iPhone SE. I switched from an iPhone 6 because I like the form factor of the iPhone 5. I too wish that they would update the SE, but in all honesty it is powerful enough with the right camera specs and it is a perfect traveler camera... For now, I'm staying put. I also still love using the headphone jack.

<comment><USER16> This is fantastic. I'm definitely going the SE route. It seems that with most new designs of Apple hardware there is a design choice I actively want to avoid -- e.g. lack of headphone jack with the new phones, the bar on the MBPs.

A week or two ago a few dead spots started happening with my 5S. I can do _most_ things, but I can't use the delete button when entering a phone number, and a certain row in Net can't be moved (this is my main concern...)

Now, if I can only find one on 9.3.3 I will be in paradise.

</comment></comment></comment><comment><USER18> Who wants an all-glass phone? I get that the designers want this, but do actual users really want something so fragile? I've only ever had phones with plastic or metal backs, and I've never bemoaned the fact that they weren't breakable enough.

<comment><USER19> iPhone 4S was my first and favorite smartphone. Glass front/back with a metal edge.

Back when phones were hand-sized they were a lot harder to drop.

<comment><USER20> iPhone 4/4S design was awesome.

It's funny how Apple is calling this an all-new glass design when other phones on the market have a similar design and Apple themselves had this design five years ago.

<comment><USER21> > all-new glass design

It's technically true, it is all new. No other phone was the same (just very very damn similar). Yes, it's a cheap marketing phrase that's meaningless, kinda par for the course with an Apple keynote.

</comment></comment></comment></comment><comment><USER22> I was in tech when iPhone came out, the original one. I thought that they might make money but to a tiny, tiny percent of people. Boy was I wrong...in some countries an iPhone costs like 6 months of net-salary, yet they buy it. Status symbol, you don't know I'm a "loser" making $150 a month, but you know that I have an iPhone.

So I'm willing to trust that Apple knows what they do. Of course they will know what they do....until they don't :)

<comment><USER23> > Status symbol, you don't know I'm a "loser" making $150 a month, but you > know that I have an iPhone.

So very sad. Generally you see this with people that can afford it the least. $999 for the base model is just ridiculous. Next year Apple will offer the "first ever", "incredible" 10 year amortization on the iPhone XI. Soon they will reach price parity with the MBP and one could have apple gear or a down payment on a nice house Phoenix.

<comment><USER24> > $999 for the base model is just ridiculous.

Why? It's not the "base model" it's the lowest capacity of the absolute highest end phone in the lineup, which now comprises five different phones at much more reasonable price points.

So your argument is basically that no phone should be that expensive? I can't speak for anyone else but I hate that. What is wrong with a super-premium phone? If anything phones are frustratingly constrained by their price point.

People use them in the way they used laptops 10 years ago, they're your central communication hub and for many people their secondary or even primary computer. What's wrong with having a high end option for those that use their phone more than everything else.

I'm buying the iPhone X day one. Why wouldn't I? I haven't upgraded my desktop, laptop, gaming PC, tablet, or smartwatch in 2-4 years, but that's because I don't use any of those things even close to as much as I use my phone.

If I'm spending multiple hours a day every day using something, you'd better believe it should be the best one available. If you don't feel that way, there are four other iPhone options and countless Android options at your disposal.

<comment><USER25> >If I'm spending multiple hours a day every day using something

Yikes.

</comment></comment></comment></comment><comment><USER26> >All battery claims depend on network configuration and many other factors; actual results will vary.

They may not be the only offenders but it bugs me that the tech specs don't tell you the battery capacity in mAH. Instead they give a relative number of hours and compare to previous phones. Those aren't tech specs, they're claims-- which they can say in fine print are unreliable.

<comment><USER27> On the other hand, a capacity in mAH is not the _only_ spec about battery life they should provide. Each new phone tends to consume more battery, due to new processors, bigger screens, or other factors, so an indication of typical battery life is useful.

<comment><USER28> Not always. The newer Qualcomm chips consume significantly less battery due to changing to 14nm and 10nm processes.

Switching to OLED (as Apple did) also increases battery life.

</comment></comment></comment><comment><USER29> First Apple SoC using their own GPU design, no more PowerVR IP.

<comment><USER30> And still pushing Metal...

</comment></comment><comment><USER31> No update to the SE? My wife has been holding on to her 4S for a long time because she thinks the 4.7" model is too big.

<comment><USER32> Nope, unless one counts dropping the price.

However since it was released in March many Apple-watchers expect any updated version to also be released in the Spring as well. (This seems more likely now since Apple didn't kill the iPhone SE)

</comment></comment><comment><USER33> Doesn't seem like a huge improvement over the 7 - I guess they're trying to put all the focus on the X, but it'll be curious to see where they go from here.

<comment><USER34> I like the neural processor. More things being local is nice.

</comment></comment><comment><USER35> I'm disappointed that this doesn't support any of the 600mhz spectrum that is now coming online. This actually provides a fairly strong reason not to upgrade, since anyone buying a phone this year is going to miss out on this functionality next year unless they want to upgrade after only a year.

<comment><USER36> I don't think Qualcomm/Intel are ready to ship 600mhz chips at scale yet (is probably the issue)? That's what's suggested by a cursory googling

</comment></comment><comment><USER37> The memory is finally enough even on the base model (64/256). I know a couple people who bought the lowest before (16gb) and it was painful. They'd actually swap apps in and out.

Solid upgrade. I'll hang onto my 6s and my wired headphone ways a bit longer though.

<comment><USER38> I'd argue that 64GB is not enough. I was surprised to see that level of memory.

I imagine 4K video at 60fps would eat up a lot of that 64GB.

<comment><USER39> 4k video using hevc actually helps cut size down a lot. 64 is still not very much but should be good enough for most people, especially if they rely on icloud.

</comment></comment></comment><comment><USER40> So many people already complaining of iPhone X black strip, how they overlook something so basic?

<comment><USER41> I was ok with it until they played a video clip and it played it with the (partial) black strip.

<comment><USER42> Same. I think you can get used to the notch itself but if you're watching a video fullscreen then they _really_ need to fill in the rest so it's a solid black bar versus it obscuring part of the actual video.

</comment></comment></comment><comment><USER43> Does a case block the wireless charging?

<comment><USER44> It needs to be a thin one. Wireless charging usually requires the device to be within a couple millimeters.

</comment></comment><comment><USER45> The only thing my S7 Edge lacks compared to this is the telephoto lens.

<comment><USER44> Well, there's iOS for one…

</comment></comment><comment><USER46> They said water resistant, but can I drop it in pool and still use it?

<comment><USER47> I bet they still don't cover water damage.

<comment><USER46> That's what I'm afraid of. I have the 6s Plus right now and when going swimming with kids and recording stuff, I'm always terrified of dropping the phone into the water. Yet, the apple watch can be submerged fine.

<comment><USER48> 6S wasn't rated as water resistant, only 7 was.

</comment></comment></comment></comment><comment><USER49> This 8/X split is confusing me. Is one supposed to be higher/lower end? Or are they just different?

<comment><USER50> X is the flagship phone, and it's implied that it's the beginning of a new line of phones (the same way OS X was the beginning of a new line of operating systems, breaking with MacOS 9). 8 is the latest generation of the traditional iPhone line, succeeding the iPhone 7.

</comment></comment><comment><USER51> Do people still get excited about phones? It seems they are pretty much commodity now. I haven't seen anything really interesting over the last few years.

<comment><USER13> I am shocked that this is the top comment. It's entirely negative and has nothing useful to say.

The fact that this post is on the front page pretty strongly implies that people care, doesn't it? We live with our phones with us practically 24/7\. If you're a dev, surely that's still exciting.

</comment></comment><comment><USER52> Yes, the planet got destroyed, but for a beautiful moment in time we created a talking poo app.

<comment><USER44> Are you trying to make a reference to the environment here? iPhone is one of the most environmentally friendly phones you can buy.

<comment><USER53> Unfortunately, the most environmentally friendly phone is still a horrible polluter because it is purposefully built to justify an upgrade each year, as required to survive in our beautiful free market.

</comment></comment></comment><comment><USER54> No reintroduction of the headphone jack? Apple seems completely detached from the reality of what the trend setters actually desire.

Needlessly locking customers to Apple-only ecosystem of hardware since iPhone 7, Apple now signals clueless consumption rather than high-status to me.

Will be interesting to see what happens with the upcoming arrival of Pixel2.

 _Edit_ Why the downvotes? If you disagree I'd prefer (and be interested) to hear how I'm wrong, rather than drive-by downvotes with no communication.

<comment><USER21> 1) if you have Bluetooth headphones, they just work. Any brand.

2) if you prefer wired headphones, they just work too using the contents of the box your phone came in.

Seriously, you act like Apple released a smartphone without a screen. Grow up!

<comment><USER55> I'm about to buy my _third_ Apple Lighting to 3.5mm adapter since last September, so yes it "works", but I don't have to pretend that this flimsy junk is how it should be.

<comment><USER56> Why do't you just open a warranty claim and have Apple send you a new one? Takes about 60 seconds on the website or in the apple support app.

<comment><USER55> I can make a warranty claim for the original headphones (which did break within about 6 months of use) themselves online, and pay $33 until I send the broken ones back. As far as I know there's no online process for replacing the adapter. I could take it to the Apple Store and probably get either replaced at no upfront cost, but that's a two hour drive for me, and none of these options solve the problem of Apple selling accessories that aren't remotely reliable enough to justify their price tags.

<comment><USER21> I have no vested interest other than trying to be helpful, but this is the top rated adapter I saw on Amazon and it's less than $10 w/ prime: [https://www.amazon.com/dp/B074Z471T7](https://www.amazon.com/dp/B074Z471T7)

<comment><USER55> Added it to my cart, thanks!

</comment></comment></comment></comment></comment></comment></comment><comment><USER57> The good model -- with TouchID. Buy this one, not that FaceID crap.

<comment><USER58> and you have to watch to iphone now in order to unlock it. with touchid it was unnecessary.

</comment></comment><comment><USER59> 21.26MB is quite a high price for a single webpage. That's what's so obnoxious about the Apple website; it's a huge amount of marketing and huge images.

<comment><USER60> You realize this page is specifically for marketing right? Would you prefer they just posted a .txt?

</comment></comment><comment><USER58> Why are all smartphones so thick and heavy nowadays??? Even my 3 years old iPhone 5S is 7.6mm and weights 112 gramms. New model is 7.3mm and weights 150 gramm. It is worse than a 3 years old model!!!

<comment><USER56> What do you expect them to fill them with, marshmallow fluff? The 8 and the 5s have incredibly different dimensions, and batteries, screens, etc all have mass...

</comment></comment><comment><USER61> So basically android of three years ago?

<comment><USER7> Whoa, Qualcomm really had some awesome processors 3 years ago!

Oh. Wait.

</comment></comment><comment><USER62> I'm so underwhelm right now... They are giving so much marketing to wireless charging, seriously?? that's $11 on amazon years ago!! FaceID, hasn't Microsoft and Android been experimenting with that for quite a while now? Apart from what has been motioned here already... can I just find a facebook picture of the person and unlock the phone!?

I miss the days when Android imitated apple...

<comment><USER30> The "picture of person" attack works for basic version of facial recognition, like the one Google or Samsung have been doing for ages (though I think both now allow you to require a moving face with blinking or whatever).

What Apple (and Microsoft via Hello) are doing is a little more interesting, and they're actually capturing a 3D model of the face, using an IR projector that works a bit like the Kinect did. They feed that model into an on-device hardware accelerated machine learning engine to do the recognition, and the results are substantially more robust than the traditional 2D versions.

Personally, I'm still not entirely sold on using _any_ kind of biometrics to unlock my device, but this does represent an interesting improvement.

I'm more interested in just having that machine learning hardware readily available and built into every new phone, it will be really interesting to see what devs do with it.

<comment><USER7> Biometrics is always better than no passcode, using just a finger or 3D face model is a major hurdle for your basic phone thief.

If your threat model includes state actors, then you shouldn't be using any of these. Also start to toughen up your body for rubber hose crypto :)</comment></comment></comment>


Yak shaving - <AUTHOR> http://www.catb.org/jargon/html/Y/yak-shaving.html <comment><USER2> Seth Godin has a better explanation:

[http://sethgodin.typepad.com/seths_blog/2005/03/dont_shave_t...](http://sethgodin.typepad.com/seths_blog/2005/03/dont_shave_that.html)

<comment><AUTHOR> Now submitted as a separate item: <http://news.ycombinator.com/item?id=4034034>

I wonder if it will fare better than this one, which was flagged into oblivion quite quickly. The Godin article at least makes explicit the connection with startups, which I thought would be obvious enough for people to make the connection. Clearly I was wrong.

<comment><USER2> It's also very, very old. Perhaps not worthy of HN at all ;) At least the catb one didn't have a timestamp. The SG one kinda pokes it in your face.

<comment><AUTHOR> True, but I _constantly_ run into "hackers" who don't know the term. It happened again today, and that's why I sought it out and submitted it.</comment></comment></comment></comment>


Ask HN: To SPA or Not to SPA? (Existing Product) - <AUTHOR> 	Backstory: We've got an existing SaaS product, chugging along with the Django templating engine and an old Bootstrap template bought for $20 several years ago. We're a growing team of mostly backend developers, and now have this nice and fancy 2018 re-design of our dashboard lying in front of us that we need to implement for several reasons (current design is not easily extendable as it was not custom made for our requirements, everyone complains that it looks old and feels chunky, etc..).
We have several options:
Hire an experienced frontend developer (that's comfortable with a framework such as React), and have that person tag team with someone from the backend to create an API + SPA.
Pros: Decoupled approach makes things easier/quicker to develop the product further as everyone just concentrates on what they do best.
Cons: Going will be slow as no backend API exists at this point AND we will have to support 2 applications going forward. The complete responsibility of the frontend will lie with the sole frontend developer now and in the future, as we will always be a backend heavy team that will not be able to help with the frontend if necessary.
2. Hire a mid-level frontend developer: stick with Django templates, get frontend dev to upgrade current template to latest bootstrap(or whatever works and is popular these days), and implement new design.
Pros: No API needed, backend team can continue working on product roadmap. Will have to support only 1 app. Backend devs will be comfortable fixing bugs/supporting frontend code if necessary.
Cons: Lose out on super cool new frontend tech(?), oldschool approach ?
3. Hire an experienced frontend developer and do a hybrid approach (page-as-a-component ? https://hackernoon.com/reconciling-djangos-mvc-templates-with-react-components-3aa986cf510a)
I'd love to hear from someone that grew a project and a team and had to face a similar decision.
Thanks in advance! <comment><USER2> Separate the two concerns:

1) UI/UX need to be updated. 2) Should we turn our backend into an SPA?

They are independent of each other. You can do them at separate times in different chronological order or at the same time.

Your customers care about issue #1, from what you mentioned.

Issue #2 is optional. Your customers use your product because of the benefits it brings them, not because of the presence or absence of a bit of flicker when moving from page to page. With the use of Cloudflare or CloudFront, that flicker should not bother anyone on a mission to get work done. Therefore, you will have to consider the benefits of removing that flicker versus the costs:

\- A React or Angular developer will cost more than a vanilla frontend developer \- You will add one new type of employee (frontend engineer), and you'll have to worry how to source a new one when the current one quits or gets fired. \- The work will probably end up taking two or three times the time and money, as is typical in software engineering.

PS: I don't pass your test for a target adviser: > "grew a project and a team and had to face a similar decision"

Joining this group ([https://www.meetup.com/ctoschool/](https://www.meetup.com/ctoschool/)) and asking nicely in the discussion section might yield more/better answers.</comment>


Is the following scenario possible? - <AUTHOR> Just wanted to run a scenario by the community about Bitcoin price drop.<p>We all know that the institutional money is coming this weekend building up to the 18th. Is it possible that someone who would like to keep them away, or 'scare' the banks could have dumped a small chunk of their coins to freak out the banks? As some sort of a warning, or the  message: "You guys have no idea what you're getting into" <comment><USER2> Anything is possible, but it sounds like that would just create a dip for them to buy into.</comment>


Google Native Client grows out of research phase - <AUTHOR> http://news.cnet.com/8301-17939_109-10262619-2.html?tag=newsEditorsPicksArea.0

<comment><USER2> the comments over at cnet are very ill-informed.

native client allows you to run x86 assembly code (from a c compiler or even handwritten) at native speed. that is: no vmmon, but truly native! this is very different from JIT compilation or other "high performance" runtime environments.

<http://code.google.com/p/nativeclient/>

combining this with o3d (<http://code.google.com/apis/o3d/>), high performance javascript and the html5 apis, will make this an extremely powerful platform.

only downside: the security model is rather hard to prove.

<comment><USER3> Not only those. If the native client is a go, then we have no need for any desktop applications on x86 systems, no more dll hell on client side running x86 code.

This technology maybe the stone that kills Microsoft.

\-- edit -- probably we still need browser and IDE and debugger on desktop. It is hard to imagine developers wants to use web apps. But maybe we will run even a disassembler in browser...

<comment><USER4> Well, minus anything that would violate security policy. Which is actually most current desktop apps.

<comment><USER3> Yes, you are right. to access local file system. But if you read the porting guide of native client, you know there is not local file system any more. The only data they can access is same origin files.

And it seems there is no reason we need to keep files in the long run, if you buy into the hype from cloud computing.

But I guess that will be another 20 years...

</comment></comment></comment></comment><comment><USER5> Ok, I read the article and perhaps this may come across as naive but isn't that what Flash more or less is already? Aside from the fact that Flash is designed more visual animations, it certainly does have an application-style framework (Flex)... one has to wonder what is the Goog bringing here that's different/better?

<comment><USER6> The two technologies are quite different.

Flash is a platform for executing ActionScript code within a VM with a very specific feature set. It's not very fast.

NaCl is a means of executing binary code in a sandboxed environment. This means you can write an app in whatever language you like, and take full advantage of the host CPU's power. It has the potential to bring the power and functionality of desktop apps to the web, literally.

<comment><USER7> Even better: you can potentially take a desktop application that you've already written, and run it via NaCl.

No need to rewrite into Flash.

<comment><USER8> So, this is a download-manager with a heuristic malware scanner builtin and the "execute after download"-box permanently ticked?

Time to sell some of these GOOG shares.

</comment></comment></comment></comment><comment><USER9> "Satisfied that its security underpinnings are solid"....

Wait a minute, I thought they were rather thoroughly smacked down on security? ([http://www.matasano.com/log/1674/the-security- implications-o...](http://www.matasano.com/log/1674/the-security-implications- of-google-native-client/))

</comment><comment><USER10> I remember this approach when it was called Active-X..</comment>


ET deals: Save on Dell's Inspiron 15R Special Edition laptop - <AUTHOR> http://www.extremetech.com/deals/134315-et-deals-save-on-dells-inspiron-15r-special-edition-laptop?utm_source=rss&utm_medium=rss&utm_campaign=et-deals-save-on-dells-inspiron-15r-special-edition-laptop <comment><USER2> Wow you guys are going to spam affiliate links as well as all your articles?</comment>


Alexa and Google Home expose users to vishing and eavesdropping - <AUTHOR> https://srlabs.de/bites/smart-spies/ <comment><USER2> If Amazon's Ring is partnering with LE[1], and from what I understand, in some circumstances providing access to customer-produced data even when customers refuse requests, it doesn't seem too unreasonable to have suspicions.

1\. [https://www.vice.com/en_us/article/43kga3/amazon-is- coaching...](https://www.vice.com/en_us/article/43kga3/amazon-is-coaching- cops-on-how-to-obtain-surveillance-footage-without-a-warrant?xyz)

2\. [https://www.eff.org/deeplinks/2019/08/five-concerns-about- am...](https://www.eff.org/deeplinks/2019/08/five-concerns-about-amazon-rings- deals-police)

Edit to append link and quote:

Quote: _However, he noted, there is a workaround if a resident happens to reject a police request. If the community member doesn't want to supply a Ring video that seems vital to a local law enforcement investigation, police can contact Amazon, which will then essentially "subpoena" the video._

Link: [https://www.govtech.com/security/Amazons-Ring-Video- Camera-A...](https://www.govtech.com/security/Amazons-Ring-Video-Camera- Alarms-Privacy-Advocates.html)

<comment><USER3> That seems like a strange workaround. Wouldn't the burden of proof to subpoena to Amazon be the same as a warrant to the user?

<comment><USER4> Amazon owns the video, not the user, so you only need a warrant if they demand one. They're also free to not require one.

<comment><USER3> That makes sense, although it's not a subpoena in that case. It's just Amazon voluntarily cooperating. However, I'm not a fan of such voluntary cooperation. I think a company's default response should be, "We'll help you in every way possible once there is a warrant."

I mean, something like this should be viewed in the context of comparable IRL vendors. If I rent a 3rd-party storage unit from U-Haul or similar, a warrant is generally required.

(one exception I found was a case where police, on-site, witnessed a drug deal. They then used the defendant's key to open their unit without a warrant. It was judged lawful, that finding drugs and keycard on the defendant was sufficient probably cause. That makes sense, given that if police witness you in front of your house, or car, etc selling drugs, that would be sufficient as well to search.) [0]

[https://www.govinfo.gov/content/pkg/USCOURTS- ilnd-1_14-cr-00...](https://www.govinfo.gov/content/pkg/USCOURTS- ilnd-1_14-cr-00696/pdf/USCOURTS-ilnd-1_14-cr-00696-0.pdf)

</comment></comment></comment></comment><comment><USER5> > _It is possible to ask for sensitive data such as the user's password from > any voice app._

Newsflash: computing device with the capability for user interaction can request information that you might not want to give it.

In other words, how is this situation different from any software running on any other type of computing device?

<comment><USER6> It's not really any different -- changing server behavior after app review is possible for any server-based app. The one thing they exploited that is unique, though, is that when a user talks to a smart device, they generally don't know at any given time if their commands are going to Google/Amazon or are being passed to Google/Amazon _and_ the third-party developer.

As far as many users are concerned, they're talking to Alexa. The third party app is Alexa, too.

And because of the opaque single-dimensional nature of voice interfaces, even a savvy user doesn't know who's really receiving their intent -- there are enough glitches where you think you're sending to the active skill, but you're back in Alexa's lobby again, so the inverse case the researchers are playing with is a good vector.

I think they could solve some of this because Amazon/Google are gatekeepers -- they get user input no matter where it goes -- they could easily automate detecting anomalous user input and flag for review (that would of course miss the first victims, but it's better than nothing).

I think the "Who's listening?" part is a little harder to solve. Maybe by forcing the third party app to always announce itself as itself? But that does add some friction to the "experience" they want to provide...however, a little friction is better if it means protecting your users.

<comment><USER6> Okay, just thought of something here — force third party apps to use a different voice.

Developers (on Alexa, at least) can optionally do this now with SSML, but making it a requirement would be an audio cue to users that the "actor" has changed — without adding any delay to the interaction.

</comment></comment></comment><comment><USER7> > Amazon or Google review the security of the voice app before it is > published. We change the functionality after this review, which does not > prompt a second round review

How is this not a massive red flag?

<comment><USER8> I don't know for sure about Google, but with Alexa skills are simply implemented as a web service. There is no way for Amazon to know that you've deployed new code on your web service. There are a lot of limits to what you can change though, the prompts / intents are specified in a manifest you have to upload. But what the device _does_ for an existing intent, and the responses it sends, can be changed without their knowledge.

<comment><USER7> I just can't believe that people actually pay to have these things in their houses. Or maybe, sadly, I can.

<comment><USER8> A smartphone has a much larger attack surface and far more snooping capability.

</comment></comment></comment></comment><comment><USER9> TIL "vishing" is a word.

If like me you were wondering what it meant:

"Vishing is the telephone equivalent of phishing. It is described as the act of using the telephone in an attempt to scam the user into surrendering private information that will be used for identity theft."

<comment><USER10> This makes no sense. Phishing comes from phreak + fishing, but the "ph" in phreak is already from the word phone (phone + freak) -- so the ph in "phishing" already comes from the word phone! The telephone version of phishing should be... "phishing."

But thanks for the explanation.

<comment><USER11> Disclaimer: I'm not a linguist, and this word was new to me. FWIW, I inferred something like "v for voice interface". IMHO the "ph" in "phishing", despite the etymology, has lost any meaningful semantic connection to "phone" per se. So this new term might seem redundant or circular in its derivation, while still being a valid / useful addition to the lexicon. (shrug)

</comment></comment></comment><comment><USER12> Do these devices record all the time or only after the trigger word (they would need to be always listening for the trigger word) until the end of the statement?

<comment><USER13> The more important question is: _how_ do we know whether these devices (or a particular subset of them) record all the time or only after the trigger word?

<comment><USER14> By

a) viewing what they store via their log tools (though this isn't guaranteed to show everything, ie if they are recording everything they couldhide)

b) monitoring outbound network connections

<comment><USER15> Neither of those things are indicative. Secretly recorded things could be hidden from logs and bundle up recordings with normal voice queries on the network calls.

</comment></comment></comment></comment><comment><USER16> Im not a fan of devices actively listening and sending snippets (if not all the info) back to home base.

My simple solution is to not use these kind of devices.

</comment><comment><USER17> All hardware with a microphone (or speaker since it too can be used as a mic) needs a hardware switch to disable ... Which will only land once open hardware Linux mobiles take off in next year or two ... Until then I just assume nothing is private

<comment><USER11> Please forgive (and remedy?) my ignorance, but are you saying all hardware speakers can be used as microphones?

<comment><USER18> Yep! If you want to try this, you can plug any speaker with a 3.5 mm output into a mic input and speak into it. It'll probably be faint, but it usually works.

[https://security.stackexchange.com/questions/154343/can-a- sp...](https://security.stackexchange.com/questions/154343/can-a-speaker-be- used-as-a-microphone)

<comment><USER19> Microphone-less headphones are a great way to test this phenomenon. If you have them handy, just plug them into the mic port and talk. IIRC only one earpiece in a stereo set connects with a mono microphone jack.

</comment></comment></comment></comment><comment><USER20> Google allows you to change an app after Play Store approval without a second review? If so, well that's your problem right there.</comment>


Thwarted Linux backdoor hints at smarter hacks (2003) - <AUTHOR> http://www.securityfocus.com/news/7388 <comment><USER2> Great to see that this has devolved into a religious argument about code syntax... well done the pedantic few, but you guys are missing the bigger picture

Like:

1). Have there been any other backdoors surreptitiously slipped in that nobody _has_ noticed?

2). Is Linux Kernel really as secure as everyone thinks it is?

I'd spend more time scouring the code looking for other backdoors and securing those than worrying about a holy war on the merits of Yoda Comparisons [Which by the way I think suck. Use a compiler that errors out or warns on assignment found where comparison is expected, code is meant to be human readable, so make it so.]

The joy about Linux being open source is that you can get your fingers and minds in the code and even if Torvalds had put in a back door at the behest of some government entity or other, it wouldn't matter - you guys have the power (and ability) to close that door. So if I were you, I'd spend more time doing that and less time bitching about other coders' syntax preferences that may not match your own.

<comment><USER3> Linus doesn't have to put government collusion in the source. Look how he strong-armed using the hardware Intel RNG recently. That's microcode you'll never see. Is this collusion? Who knows, but trusting hardware makes code reviews useless.

<comment><USER4> Correct me if I'm wrong but /dev/random gathers entropy from a number of sources including CPU RNG. If your CPU was owned it wouldn't matter. I run entropy gathering daemons especially for virtualized systems. VMs don't have enough hardware entropy and software like vpn clients will get stuck waiting for data from /dev/random.

There are a number of ways to add entropy. I've used egd and haveged. Use them. It can't hurt.

I suppose you could not load microcode on boot. I've never tried.

</comment></comment></comment><comment><USER5> Here's the actual code: [http://lwn.net/Articles/57135/](http://lwn.net/Articles/57135/) Made use of the difference between == and = in C.

This was done by going around the normal channels to get code into the kernel. Someone attacked the CVS server directly and modified the code: [http://lkml.indiana.edu/hypermail/linux/kernel/0311.0/0621.h...](http://lkml.indiana.edu/hypermail/linux/kernel/0311.0/0621.html)

<comment><USER6> I don't think that is easily overlooked. Maybe, if there had only been one conditional, but the different '==' and '=' are jarring to me.

OTOH, I'm a pretty slow code reader and look at "pattern" and "flow" of code at least as much as I attempt to understand meaning. Probably why I'm so anal about style, indentation, and vertical white space.

</comment></comment><comment><USER7> And this is why you write it like this when you use C:

       (0 == current->uid)

Rather than

       (current->uid == 0) // or (current->uid = 0) in this case.

Impossible to make an assignment to a numeric lvalue. Easy to spot, easy to audit in a diff.

<comment><USER8> Thanks for this.

I don't actually use C, although I know a few languages with C-like syntax (Java, JS, AS2.0) and I'm learning Go & planning to learn D.

This small change will be really helpful in all these languages. Even if I never make this error again it will help stop people who alter my code from making this error.

Perhaps they should teach it in more programming textbooks, as I've not come across it in anything from HeadFirst to online tutorials to Deitel & Deitel.

<comment><USER9> It's not necessary in Java (though it's still a common habit). Assignment to a non-boolean is impossible in an if statement in Java, and you can make the compiler warn you about accidental assignments.

<comment><USER10> Still, assigning a boolean rather than comparing it is still possible and, possibly, a source of bugs.

</comment></comment></comment></comment><comment><USER11> Not familiar with Linux kernel development practices, but wouldn't have any semi-capable static analysis tool caught this?

<comment><USER12> Yes, nowadays gcc warns you about assignments in conditionals if you enabled it (e.g. with -Wall). But it probably didn't in 2003.

<comment><USER13> This assignment is wrapped in parentheses. GCC will not issue a warning.

</comment></comment></comment><comment><USER14> Original thread: [http://marc.info/?t=106806555100004&r=1&w=2](http://marc.info/?t=106806555100004&r=1&w=2)</comment>


History of Gun Control - <AUTHOR> http://www.theatlantic.com/magazine/archive/2011/09/the-secret-history-of-guns/308608/1/

<comment><USER2> Interesting parallels to drug prohibition -- also largely promoted (initially) on overtly racist grounds (keeping blacks/mexicans/chinamen with their evil cocaine/marijuana/heroin away from white women/children). Then, additional justifications from public health or public safety grounds, which largely stand on their own as arguments today. (I'm willing to accept that many guns and many drugs might have worse consequences than if they were never invented) And leaky prohibition today, where the majority of problems are caused by the illegal drugs or illegal guns, but some problems caused by legal guns and legal drugs too.

Maybe it's just that each is a powerful technology.

Maybe the next powerful technologies will be 3d printers, drones, desktop chemical synthesis, cryptography, and the Internet.</comment>


Hands on with USB Type C: Reversible USB Connectors - <AUTHOR> http://www.anandtech.com/show/8518/hands-on-with-usb-type-c-reversible-usb-connectors

<comment><USER2> This is definitely a step in the right direction (ref: reversible) but it still looks quite fiddly. Like micro-USB. A tight tiny connection within which the plug has to be perfectly face-on to get it in.

That's one area where Apple's Lightning design doesn't get enough credit. The socket on Lightning is larger than the thing you're plugging into it, so if you're slightly misaligned no problem, and you can definitely plug it in without looking.

Micro-USB has an on-going issue with the plugs breaking when people fiddle about trying to get them into an almost identically sized socket. Seems like that is something the 3.1/USB-C standard could have attempted to solve.

Having the socket act like a funnel to guide the connector in just makes rational sense. You still get a good solid connection at the end but it is a LOT easier to plug A into B without looking.

<comment><USER3> >Micro-USB has an on-going issue with the plugs breaking

i believe this was actually one of the design goals of Micro-USB, and the reason it replaced mini-usb. People treat their devices terribly, and the end of a cable sticking out of a device gets a lot of force put on it. Mini-USB was designed to be tough enough to handle this, and was a pretty robust connector, however the devices that OEMs were integrating Mini-USB ports into weren't necessarily built to a high standard. So people torque their cables and break things inside their devices. Better to break a $6 cable than a $100+ device.

Apple can get away with a strong connector on lightning cables because they can make sure that the internal connector is correspondingly well-built. The USB forum doesn't have that control.

</comment></comment><comment><USER4> Reversible, at last! But why not make it a shallow, magnetic end piece similar to Apple's newest laptop power connectors? You just push the end of the cable close to the socket and it pops into place. Rock it up or down to detach it. That's the way it ought to work -- non-intrusive, break-resistant, and dead simple. Easier for sight-impaired people (or all the rest of us who are suffering near vision damage from too much device usage!)

<comment><USER5> I can imagine trying to keep a magnetic connector in place while using the device in the bed (with all the connector nudging and cable stretching that entails) annoying.

<comment><USER6> It's actually really nice not just for plugging it in but _because_ it pops out instead of stressing or breaking your cable / device.

</comment></comment></comment><comment><USER7> Does having a PCI-E tunnel mean we might see high-resolution USB 3.1 docks that aren't stuck with proprietary, encrypted, DisplayLink protocols, and thus, open source support?

Because I'd sure love that.

<comment><USER8> But before that, does having a PCI-E tunnel mean that you have to turn off the USB protocol? Or can you use both at the same time? How many pins are necessary to transmit a basic (no power, just data) PCI-E 1x? And 4x, which would be the minimum viable for gaming? I'm interested to know more about this PCI-E tunnel thing.

</comment></comment><comment><USER9> This is amazing! It's good to see USB technology keeping step with storage speeds. Imagine putting a SSD in a 3.1 enclosure.

<comment><USER8> Also, no more external power required for external 3.5" HDD! It can provide 12V.</comment></comment>


The First Security Engineer's 100-day Checklist - <AUTHOR> https://www.sqreen.io/checklists/security-engineer-checklist <comment><AUTHOR> Being the first security engineer in a startup that already operates for a few months or even years can be quite daunting. Starting up security is hard. Starting security in a company that has already gathered a huge security debt is even harder. This security checklist aims to help security engineers and CISOs in early stage companies to prioritize their efforts in the first months of their new job.

Any security engineers that were in this situation? Do not hesitate to share your feedback!</comment>


Improving TruffleRuby Performance - <AUTHOR> http://nirvdrum.com/2017/05/30/a-systematic-approach-to-improving-truffleruby-performance.html <comment><USER2> TruffleRuby looks really promising for those who like Ruby but would also like better performance.

Whats the easiest way to install it these days ?

Last time I thought of installing it, it required signing up for an account on the Oracle website simply to be allowed to download it, at which point I abandoned my attempt.

<comment><USER3> I think the easiest way so far is still the Oracle website:

[http://www.oracle.com/technetwork/oracle-labs/program- langua...](http://www.oracle.com/technetwork/oracle-labs/program- languages/downloads/index.html)

It has release 0.23 from a few days ago.

I think the home-brew recipe is not so recent (but may be wrong here).

</comment></comment><comment><USER4> I am always impressed by the IGV of graal/truffle to see how code is compiled. Really looking forward to JVM-9/JVMCI general availability so it becomes easier to play with truffle.

</comment><comment><USER5> I'm kind of confused about the difference between TruffleRuby and JRuby. Are they... using different VMs? If anyone can point to a blog post explaining the difference, that'd be helpful. I'm mainly a Ruby dev and know little about the JVM or GraalVM.

Aaaaalso, how does this compare to Eclipse Ruby+OMR?

[https://github.com/rubyomr-preview/ruby](https://github.com/rubyomr- preview/ruby)

<comment><AUTHOR> TruffleRuby and JRuby are two different projects. The history is a bit confusing. TruffleRuby was originally its own project internal to Oracle Labs. It was open-sourced and merged into JRuby as an alternative runtime, called JRuby+Truffle, and shipped with the JRuby 9K releases, activated by a special flag. As JRuby and JRuby+Truffle both kept evolving, it really became two separate projects within the same repository. So, at the end of 2016 we rolled JRuby+Truffle back out of JRuby into its own project, now called TruffleRuby.

Both JRuby & TruffleRuby are written in Java and target the JVM. JRuby now has its own IR for performing Ruby-level optimizations and it targets the JVM's invokedynamic system. TruffleRuby uses the Truffle self-optimizing AST framework [1] to implement its runtime and relies on integration with the Graal compiler to produce fast code via partial evaluation. Graal is a new compiler for the JVM written in Java. However, you need a JVMCI-enabled JVM to activate Graal. JVMCI is a new feature in Java 9, but we have a backport package available for Java 8 on the Oracle Technology Network (OTN) [3].

In addition, we ship a package with multiple Truffle languages and a Graal- enabled JVM in a package we call GraalVM. You can download that from OTN as well. That package also ships with a builder for the Substrate VM, which allows you to build an ahead-of-time compiled static binary of the various Truffle languages [4].

So, both JRuby and TruffleRuby target the JVM but they currently use different JITs. There's nothing stopping JRuby from using Graal, and indeed they've been looking at it, but they likely will continue using invokedynamic rather than Truffle.

Eclipse Ruby+OMR is a completely different project looking to take some VM components IBM has developed and integrate them with MRI. Since they're actually running MRI rather than a completely new project, they have 100% compatibility with Ruby, but they also have to operate within the confines of MRI's internal design.

[1] -- [https://github.com/graalvm/graal/tree/master/truffle](https://github.com/graalvm/graal/tree/master/truffle)

[2] -- [https://github.com/graalvm/graal/tree/master/compiler](https://github.com/graalvm/graal/tree/master/compiler)

[3] -- [http://www.oracle.com/technetwork/oracle-labs/program- langua...](http://www.oracle.com/technetwork/oracle-labs/program- languages/downloads/index.html)

[4] -- [http://nirvdrum.com/2017/02/15/truffleruby-on-the- substrate-...](http://nirvdrum.com/2017/02/15/truffleruby-on-the-substrate- vm.html)

<comment><USER6> Thx, does anyone know what is happening on the OMR front? Since it has been very quiet ever since it was first announced.

Also wondering, for Truffle / GraalVM / SubstrateVM, how far are we from testing in production? I keep thinking TruffleRuby is Nightly / Beta and if i remember correctly, does not run Rails ( yet ) ?

<comment><AUTHOR> > Thx, does anyone know what is happening on the OMR front? Since it has been > very quiet ever since it was first announced.

I don't know if there's a more official channel, but I follow Matthew Gaudet's tweets (@MattStudies). He provides periodic updates and provides links to talks and such.

> Also wondering, for Truffle / GraalVM / SubstrateVM, how far are we from > testing in production? I keep thinking TruffleRuby is Nightly / Beta and if > i remember correctly, does not run Rails ( yet ) ?

We're not at the point where we recommend anyone run it in production. We do actually run a sizable portion of Rails, but since the DB adapters are all C extensions we can't really run those yet, which practically means we can't run Rails. The distinction is we're able to run with things like the pure Ruby PostgreSQL gem (postgres-pr) and the pure Redis gem (redis).

We're making some very good progress on our C extension support. We've just recently made a successful HTTPS request running MRI's OpenSSL extension by way of Sulong [1], which is an LLVM bitcode interpreter for Graal.

If you're interested in casually following what we're up to, we now have a Twitter handle (@TruffleRuby). Or, you could always watch the GitHub project [2], since it is open source.

[1] -- [https://github.com/graalvm/sulong](https://github.com/graalvm/sulong)

[2] -- [https://github.com/graalvm/truffleruby](https://github.com/graalvm/truffleruby)

</comment></comment></comment></comment><comment><USER7> Not knowing the internals of Array#size implementation / Array data structure, but my first thought would be whether Array#empty? could just check for the presence of at least one element (i.e. stop at the first), rather than checking whether the size of a large array is equal to zero.

<comment><AUTHOR> While there's no requirement that a Ruby Array is implemented as an array in the implementation language (C, C++, Java, etc.), in practice it is in all the Ruby implementations. In order to traverse an array, you need to know the length so you can ensure your array index is in bounds. I.e., to read the first element of an array, you'll need to read the size anyway. That being the case, you would want to compare the size to 0 because comparing ints is much faster than reading from memory.</comment></comment>


Ask HN: How to find office hours or startup mentorship? - <AUTHOR> Our two-man startup may be visiting Cupertino (and SFO) soon for Startup School 2016 and we were thinking of connecting with mentors while we were out there. Any suggestions would be appreciated! <comment><USER2> The most responsive people are likely going to be early stage founders (pre-A). Message them on LinkedIn or via email and try to get a coffee chat with them. Do this by letting them know their time isn't going to waste and what you want to talk about. This helped us a lot in the early days.

Note: IMHO most people want to help, but they want to make sure their time is wasted

</comment><comment><USER3> The most effective means that I've found is building relationships with people who are slightly ahead of where you're at around your area.

You could do it remotely and in fact one of my mentors is remote but generally, building that type of relationship that makes someone want to regularly spend time with you takes at least a dozen 1:1 conversations, a relationship.</comment>


Improving Go's 'container/list' - <AUTHOR> https://idea.popcount.org/2014-02-28-improving-containerlist/ <comment><USER2> Standard name for this type of linked list is the "intrusive linked list". There's an implementation for it in boost for c++ and here's another article about it: [http://www.codeofhonor.com/blog/avoiding-game-crashes- relate...](http://www.codeofhonor.com/blog/avoiding-game-crashes-related-to- linked-lists)

<comment><USER3> I don't know if Boost's intrustive containers are necessarily quite the same as an internal linked list. std::list<T> is internal but not intrustive; the difference between the three is something like…

external:

        class Node<T> {
            Node *next;
            T *item;
        }

internal:

        class Node<T> {
            Node *next;
            T item;
        }

intrusive:

        typedef T Node<T>;
        class <T> {
            Node *next;
            // members of T
        };

(Though I suppose you could consider intrusive a type of internal linked list, and the middle representation is then also a type of internal linked list ("non-intrusive"?).)

The intrusive one allows the linked list to avoid memory allocations, and hold objects that are not copy- or move-able. The Boost page has a good table on the differences[1].

I'm actually not sure how much I agree w/ the codeofhorror article. They present the difference between a std::list holding raw pointers and an intrusive list with the title "Avoiding Game Crashes…"; if you want to avoid crashes, std::list<T> or std::list<std::unique_ptr<T>> (or even a shared_ptr, if appropriate); Of course std::list<T*> is error prone!

[1]: [http://www.boost.org/doc/libs/1_55_0/doc/html/intrusive/intr...](http://www.boost.org/doc/libs/1_55_0/doc/html/intrusive/intrusive_vs_nontrusive.html#intrusive.intrusive_vs_nontrusive.properties_of_intrusive)

</comment></comment><comment><USER4> this article has a 28th-feb-2014 date, which suggests that the author used ver: 1.2 for measurements.

with a bunch of quite far-reaching changes f.e. runtime being re-written in go itself, fully precise gc (resulting in smaller heaps), elimination of segmented stacks, change in implementation of interface values etc. in version 1.4 of go, it would be instructive to compare how these observations /conclusions hold.

</comment><comment><USER5> At least in my favorite problem domain, mathematical computation, reusable unboxed data structures are a huge win! That said, sometimes theres also a large use case to pointer formulations, namely preserving sharing for a complicate value like a proof!

Both are valuable tools, and having decent reusable support for both is a wonderful thing.

</comment><comment><USER6> Hmmmm. It's considered an anti-pattern to use list at all in Go, the typical style is that one should prefer using a slice with append. List is there as a relic from early go, and is around for compatibility. I guess improving the sitting code is good though.

<comment><USER7> Linked lists and arrays / slices are two totally different data structures with different applications: Removing objects from (anything but the end of) arrays / slices is expensive. If this is a common operation, linked list might be prefarable. This is not a language issue. At my day job, I manipulate lists a lot, this would not be faesable at all with arrays/slices.

Edit: this is a simplified, but typical example of my problem space: [http://tex.stackexchange.com/a/233489/243](http://tex.stackexchange.com/a/233489/243) Traversing a list and manipulate the list entries by adding other items to the list.

<comment><USER8> Computer architecture being what it is now, though, it has been observed recently that a lot of uses of linked lists are still faster with arrays/vectors, _even if you do the "expensive" operations with them_.

Point here not being "you're wrong", because you're still right in at least some cases, but that benchmarking can be called for if you're really choosing them for _performance_ because the expense of cache misses and the way linked lists verge on the pathological case for cache misses (not _quite_ , you do stand a chance the next element is in cache and possibly even the next element of RAM, but over time it's not a very good chance) means that arrays can win more often than you would naively think due to the fact linked lists take a rather staggeringly large constant factor nowadays, and it can take rather a lot of using their O(1) advantages to make up for it. This is totally a reachable bar, just, less than you might think.

[http://www.codeproject.com/Articles/340797/Why-you-should- ne...](http://www.codeproject.com/Articles/340797/Why-you-should-never-ever- EVER-use-linked-list-in)

[https://www.youtube.com/watch?v=YQs6IC- vgmo](https://www.youtube.com/watch?v=YQs6IC-vgmo)

(Note that for instance the second video computes a bit of a pathological case where you have to traverse to find where to insert. In some cases, you will for some reason or other already have that point in hand, which is one of the things that indicates linked lists may be useful; if you always have that case linked lists could still win. But the point should still be taken that vectors/arrays can be way faster than you'd think.)

Of course, if you're using a dynamic scripting language where everything's guaranteed boxed and there's no hope of keeping things local anyhow, well, you might as well take whatever makes the algorithms easier.

</comment></comment></comment><comment><USER9> Sorry, but I just wonder wouldn't this pointer to self structure prevent garbage collection?

<comment><USER10> Reference cycles aren't a problem for GCs because any objects that aren't reachable from a root set of nodes are considered garbage and get collected. (I only read part of the article, but hopefully that answers your question...)

<comment><USER11> To clarify, they aren't a problem for mark/sweep GCs. Reference counting can be considered a form of GC.</comment></comment></comment>