Estimates are broken. We've just fixed them for you - <AUTHOR> https://aboutfiveminutes.com/ <comment><USER2> Never read and understood JP Lewis' "Large Limits to Software Estimation", eh?

[http://scribblethink.org/Work/kcsest.pdf](http://scribblethink.org/Work/kcsest.pdf) [http://scribblethink.org/Work/Softestim/softestim.html](http://scribblethink.org/Work/Softestim/softestim.html)

It's hard to outwit Goedel and Tarski on this stuff.

<comment><AUTHOR> Amazing, thank you. I haven't read it, but definitely, will.

Obviously, there won't be a strictly mathematical solution. Neither optimal one. We can try to create something that is good enough for a limited set of problems, though. If it works at least in half cases, then I'm happy.

I don't think we can create a methodology or magic something. But having a repository of estimates for similar projects could be great.</comment></comment>


What is a foreign language worth? (2014) - <AUTHOR> http://www.economist.com/blogs/prospero/2014/03/language-study <comment><AUTHOR> As a Brit living in Spain I hasten to add that although the financial business case to learn castellano doesn't stack up, it enriched my life immensely.

¡No todo es dinero, tronco!</comment>


'Quirkyalone' is Still Alone - <AUTHOR> http://mobile.nytimes.com/2015/09/20/fashion/modern-love-quirkyalone-is-still-alone.html?_r=0 <comment><USER2> A mean but honest assessment of the people the author describes, author included: crippled by cognitive dissonance, confusing their unwillingness to negotiate or compromise with _passion_ or _drive_ and engrossed with the movie or novel that is their overly dramatized lives. They just need a solemn pop song to kick in whenever someone rebukes them. Maybe an enterprising developer could make an app for that.

I know people like this - they add drama where it isn't needed, over analyze and romanticize simple interactions preventing them from forming a trusting and therefore stable relationship. You can almost see the imaginary cameras they think are following them throughout life, the star of their own reality TV show.

Their expectations for what a relationship should be are so contorted and highly-strung that they're doomed to failure from the beginning. Thankfully they seem to attract each other and form a layer of social sediment separated from the bedrock that is practical people. Best of luck to them.

<comment><USER3> "bridget jones" was a great fictional exploration of this sort of mindset, i thought.

<comment><USER4> Book Bridget Jones even more so than film Bridget Jones.

</comment></comment></comment><comment><USER5> I have a rather subjective and irrational opinion about this topic, but so are most opinions when it comes to human relationships. I'm from a working class family, and grew up in an European culture that has somewhat particular views on romance. I've lived in San Francisco for about 5 years now, dating my fair share of people similar to the ones described in the article; including a relationship that lasted a bit over 3 years and ended last spring.

Those kinds of people (typically upper middle class Americans born in the 1980s or later) are so in love with themselves that they just have no room for falling in love with anyone else. It's easier to waste time on Tinder while obsessing about the best place to go for overpriced brunch and then cry about it to your therapist while your friends tell you that "omg you're the best in the world, of course you shouldn't settle for anything", than to pursue deeper, more meaningful interests and relationships.

My very unscientific and cynical view of that is that modern consumerist American culture is reaching the paroxysm of fuckery, encouraging everyone to treat their relationships and fellow humans as fungible goods that should be swapped out for this year's new, better, shinier model. My solution has just been to just not waste my time with people whose life tends to exhibit the patterns described in the article.

If you too belong to the higher upper middle class but can't stand that kind of crap, go volunteer and meet people from outside of your social strata. I've been dating someone from a very different, non western culture for the past month or two, whose struggles include more than just what they're going to post on their blog next, and it's a breath of fresh air in comparison.

YMMV.

<comment><USER6> > I've lived in San Francisco for about 5 years now

I don't think I would want to equate living in SF or NYC as being what the rest of the United States is like as a whole. It would be like assuming people in France are all like Parisians (which they aren't).

Being a born and raised US Citizen for roughly 30 years, I don't think I would want to live in either city for an extended period of time, but that's just my perspective. Nice places to visit, but not where I'd want to live.

<comment><USER7> Both San Francisco and New York also have weird dating scenes due to gender imbalance among singles (SF and NY have opposite imbalances). These imbalances tend to cause desperation among the excess supply / low demand gender, and unwillingness to settle in the excess demand / low supply gender.

</comment></comment></comment><comment><USER8> > We marvel at how most people, including many who seem less datable than us, > successfully manage this simple trick — maintaining relationships — that we > can't seem to pull off.

Dead giveaway at "seem less datable than us".

It's called the option value of remaining single. People who perceive themselves as a catch often wait too long. Because, after all, almost every choice is imperfect in some way. And the more perfect the other may seem (according to "datability"), the more they too may be prone to overestimating the option value of remaining single.

So really it's self-centered melodrama.

<comment><USER9> Also 'waiting for a catch' doesn't work if you're a straight woman: like it or not, woman are evaluated for their beauty as much as men are for their wallets.

</comment></comment><comment><USER10> Being alone should be a respected lifestyle choice or affectional preference.

If a person would rather be partnered, then there's usually some issue with the "quirks." You can't swim out of your lane.

</comment><comment><USER11> I'm concerned by the dismissive comments in this thread (which at time of writing is all the top-level ones). What the author says would be _consistent_ with the self-centered drama queen everyone is assuming the author is, but that's hardly the only interpretation of what she says. Is a little benefit of the doubt to much to ask?

The pains of being single often come up here, and to my memory such articles usually receive a positive response. Perhaps it is no coincidence that they are usually from the male point of view?

<comment><USER12> She is he, the author is Tim Kreider.

<comment><USER13> ... and if you've read his book, the problem most certainly _is_ him - and he knows it.</comment></comment></comment>


Ask HN: Should I Learn Python? - <AUTHOR> Hi, I am reinventing myself to be a web and app programmer at the ripe old age of 36. I am done with CSS and HTML.
I now have to learn a scripting language. Which one should I choose between Ruby, Python, and PHP?
Thanks <comment><USER3> When I was choosing between Python and Ruby a couple of years ago, I chose Python.

To me it seems to be more universal - Ruby is (IMO) mostly used for web development, and Python is also rather widely used in other areas - <USER2> sciences (via NumPy/SciPy), sysadmin work and for various scripting purposes (in gaming, for instance).

By now I also got some experience with Django, and was also picking up Javascript recently. Can't comment on the amount of work available in Python compared to Ruby, just don't know the Ruby market, but for Python/Django there's quite enough freelance work via elance/odesk. Not sure if you'd get to $2-3k per month right away, but that's sure doable once you get some experience.

On the other hand, you have the advantage of being able to look for clients locally, and I only worked remotely - living in Russia now. Seems local rates in Australia (and other first world countries) are higher than in online market.

Seconding the importance of Javascript. I picked it up months after I started with Python, but starting with it earlier would've been a good idea for sure.

Again, most freelance work involves at least some frontend part, and if you're familiar with HTML/CSS/JS, even without Python, there's always something to do. Also there are quite some offers for Google Apps work, scripting GMail/GDocs/GCal - that's Javascript again.

Disagree on PHP requirement - didn't touch it yet, don't want to, have enough work (and some more people to talk to when I have time).

Feel free to drop me an email - egor.ryabkov at gmail - if you'd like to chat. Best of luck!

<comment><AUTHOR> Thanks Egor! This is where I stand now. 1\. Working knowledge of CSS and HTML 2\. Aptitude for programming.

This is what I am going to do

1\. Learn JavaScript and then jQuery. I am aiming at becoming comfortable with JS and jQuery in 3 months. 2\. After 2 months I will start creating and selling simple templates (like e-mail templates and HTML website templates) on Themeforest.com. In 3 months I will start developing templates based on Twitter BootStrap 3\. I will continue to polish my front end web dev skills from month # 4 to month # 6. 4\. If my templates start generating a revenue of $600+ from month # 6 onwards I will be a very happy man. 600 bucks will take care of my family's monthly expenses.

5\. If this financial goal is met I will learn Python. At this stage I will also start spending more time programming 7-8 hours a day and will gradually come out of my freelance writing (pays a measly $3-$10 and hour) and Internet marketing gigs.

Thanks for sharing your contact.

<comment><USER3> Wait, when you spoke of $2-3k/month, did you mean active or passive income? Because I was speaking of active one - as in, you directly exchange your time for money.

Can't comment on your plan wrt template selling, but it seems you might start earning money faster if you get right to freelancing; though it's up to you, of course.

Speaking of timeline - in my opinion, it might be more optimal to target real- life tasks and not some deadlines: that is, instead of saying "I'll spend 3 months learning JS and then will start creating templates" you might just do the tutorial, maybe make a couple small projects to get comfortable a bit. Then pick some task - like a template, or just browse freelance sites, pick a job you like and use it as a target - start doing it and then see whether your skills are up to it or not. If not, learn more until you get there.

And speaking of money - from what I saw on elance, $10/hr is about minimum for Python/JS, that'll get you people who can barely speak English. Around $15 is not impossible for a person with a bit of experience, and from then on... well, that's a whole different story here, about marketing, client network, connections, self-promotion etc etc. Though, again, for the first couple of jobs there your main goal should be not getting high rates, but actually winning these jobs and creating some reputation.

So to sum it up - why exclude yourself from development freelancing for 6+ months? And relying on templates sales looks a bit risky to me, direct freelance will get you income faster. Though passive income sure is great, so in the end it's for you to decide.

Oh, and seconding jQuery. It's great.

</comment></comment></comment><comment><USER4> Additionally, is Python 2 or 3 currently a better choice for new Python developers that want to potentially release a new project?

I've noticed that some of the highly recommended Python libraries are still not Python 3 compatible. This makes the choice a bit harder to judge from somebody who isn't experienced with the direction of the ecosystem.

<comment><USER5> For newcomers I always suggest learning Python 2 first mostly because it is easier to find libraries and/or resources for Python 2. Also, I found it very easy to learn Python 3's differences after knowing the previous version.

</comment></comment><comment><USER6> I was able to pick up Python pretty effortlessly (coming from a zero programming experience background) through Udacity's search engine course. If you're coming from little or no experience, you can easily pick up on Python. Like everything else, it just takes time to get used to.

If you happen to go the Python route, here are a few resources that helped me:

Udacity's Search Engine Course <https://www.udacity.com/course/cs101>

Google's AppEngine (for Python development) <https://developers.google.com/appengine/>

Django - Web Framework for Python <https://www.djangoproject.com/>

</comment><comment><USER7> This could be biased as it's the route I took.

I'd get familiar with all three. I'd start with PHP. It's ease of deployment will delay the sysadmin stuff that you'll end up learning anyway. Then I'd go to Ruby. Trying PHP first will make you appreciate Ruby and Python more.

When I'm interviewing people, experience in a number of languages is something I look for. A good programmer is a good programmer. Seeing and understanding the ways that different languages have implemented similar concepts makes you form an opinion and see that there are better ways to skin that cat.

<comment><AUTHOR> I appreciate what you are saying. I have seen great programmers who can learn and start serious programming in a new language within a month.

</comment></comment><comment><USER8> The choice between Ruby and Python is something of a matter of taste. For what it's worth, Ruby on Rails appears to be more popular than Python's Django (though a quick search didn't give me any current numbers). In present day web development there is really no getting away from PHP, so you should learn it whether you choose Python or Ruby; same goes for JavaScript.

To make it easier to answer your question you should provide more background on your past programming and general computer experience.

<comment><USER9> Your comment is spot on. I'm a Django fan, but there are more jobs asking for RoR experience and way more asking for PHP and even .NET experience. The PHP and .NET tend to be less "sexy" jobs, but nonetheless are salaried jobs with benefits so they might be very ideal depending on where a person is at in their life.

Replying to your comment in addition to upvoting felt necessary because it often seems like on Hacker News that less than 1% use anything other than the latest tech. That is not true.

</comment></comment><comment><USER10> Do you know JavaScript yet? That's essential for front-end development, and if you get pretty good at it you can use it serverside with Node.js

<comment><AUTHOR> I have not learnt JavaScript yet. I can spending only 3-4 hours every day learning how to program. Will it be a better idea to learn JavaScript before picking up server side scripting.

Since I can do server side with Node.js do you think it is a good idea to learn only JS for the time being?

Since I have to support my family I cannot spend more than 5 hours a day.

Thanks

<comment><USER11> Javascript is essential for any web developer no matter what server side technology they use. I would highly recommend learning Javascript first.

<comment><AUTHOR> Thanks for the input. I have started learning JS. I am going through JS guide on developer.mozilla.org.

</comment></comment></comment></comment><comment><USER12> reinventing yourself and wanting to be a fulltime employee? Or reinventing yourself with the aim of freelancing, or even running a consultancy.

I would say that there is (at 5 hours a day with a family) a fairly long learning curve to get to the point where you have learnt enough python/javascript then built something with it to prove your chops and then got a FT job.

You _might_ be able to learn enough in 3-6 months to have someone take a chance on a 36 yearold junior programmer. But we are an ageist sexist industry.

So, if you are done with CSS / HTML but do not feel a burning need to program (you would have felt it by now), then yes I suggest you learn to program, always good, but instead try finding a decent programmer whom you enjoy working with (I would guess you have met some) - and then set up a side project of freelancing yourself and him/her to local businesses or SF startups.

Maybe start with local businesses, build up the working rapport. (Try charging retainers!)

If you just want a change, maybe running a side business that might one day become a FT operation is it.

<comment><AUTHOR> Thanks for the advice. I do plan to work as a freelancer and with local businesses. I also want to create some cool website templates and sell them on themeforest.net etc.

Do you think making 2000-3000 bucks a month feasible by selling themes? I saved wisely during my financial services days and if I can reach $2000 per month figure then I will focus 100% on programming.

Once again thanks for the advice.

<comment><USER12> 2K on themes - I have no idea but I suspect not - its a competitive marketplace.

I think you _can_ make 2000 USD a month by creating tools for your local businesses.

Here is my suggestion: go buy a list of businesses in your area for about 200 USD. You will get something like 5000 businesses for that in suburban area.

Split them into industry, and find their websites (most likely provided as the email addresses). Visit each site in an industry and work out which ones are just brochures and whoch ones actually take money online (customer signin, has visa paypal on page)

Now you have two groups. The brochure-ware group you can approach with examples from the other group saying "your competitors are doing this online - want me to help?"

The second group you can approach with "Do you know how many customers visited your site - and I can improve this"

(bonus points for actually dividing this group into those who have google analytics and those who dont)

No one pays for cool themes anymore (well 20 bucks is not really paying). People will pay through the nose if you up their sales.

Try looking at www.kalzumeus.com for an intro.

<comment><AUTHOR> Sounds like a good idea. I will do this for 3 months and measure my performance.

I agree with your point that it is easier to charge money when the problem being solved is business critical.

<comment><USER12> post your results here in three months :-)

<comment><AUTHOR> Will do that! If it works I will buy you a beer!

</comment></comment></comment></comment></comment></comment><comment><USER13> I can't speak directly to Ruby or Python, because I haven't used them.

But, you can't go wrong with PHP for web programming. Look at the number of people using it.

</comment><comment><AUTHOR> Hi,

Thanks for your inputs. I really appreciate you guys taking out time. This is what I am planning to do.

1\. Learn JavaScript and then jQuery. I am aiming at becoming comfortable with JS and jQuery in 3 months.

2\. After 2 months I will start creating and selling simple templates (like e-mail templates and HTML website templates) on Themeforest.com. In 3 months I will start developing templates based on Twitter BootStrap

3\. I will continue to polish my front end web dev skills from month # 4 to month # 6.

4\. If my templates start generating a revenue of $600+ from month # 6 onwards I will be a very happy man. 600 bucks will take care of my family's monthly expenses.

5\. If this financial goal is met I will learn Python. At this stage I will also start spending more time programming 7-8 hours a day and will gradually come out of my freelance writing (pays a measly $3-$10 and hour) and Internet marketing gigs.</comment>


Tanzania becomes the latest country to use Zipline drones for medical deliveries - <AUTHOR> https://www.iafrikan.com/2017/08/31/tanzania-becomes-the-latest-country-to-use-zipline-drones-for-medical-supplies-deliveries/ <comment><USER3> This service has already been running in Rwanda since 2016 with positive results. [0]

It's great to see other countries trying out this form of delivery, as rural roads in Africa can be quite bad.

I'm interested to see if this trial is successful in Tanzania, given that it's geographically much larger than Rwanda and has a much lower population density.

Tanzania: 47.5 persons/km^2 [1]

Rwanda: 445 persons/km^2 [2]

Rwanda is more dense by an order of magnitude.

[0] [http://www.bbc.com/news/technology-37646474](http://www.bbc.com/news/technology-37646474)

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

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

<comment><USER4> I hadn't heard of this service before - all very interesting. I found another article on Wired [1] that gives a good overview.

It's unlikely to be an issue in the wide open spaces of these countries - <USER2> an autonomous equivalent of the ATC system for drones will be needed when Amazon et al. start doing these deliveries in first world cities. Do you know of any companies working on this problem?

[1] [https://www.wired.com/2016/05/zipline-drones- rwanda/](https://www.wired.com/2016/05/zipline-drones-rwanda/)

<comment><USER5> There seem to be some people working on ATC for drones. Google, NASA, "experts at Nanyang Technological University and the Civil Aviation Authority of Singapore" etc [https://www.google.co.uk/search?q=ATC+system+for+drones](https://www.google.co.uk/search?q=ATC+system+for+drones)

It's quite interesting technically. Regular ATC works by keeping flights quite far apart and separated by 1000ft or more in barometric altitude which wouldn't work with delivery dones but maybe you could use phone style gps location. It's not considered reliable enough for airliners but might be acceptable for drones.

<comment><USER6> Yes, the work at Google, NASA, and the FAA comes to mind. They are very aware of the need for handling this for the delivery space. With drones, as you pointed out, the flight path "conflicts" are much smaller. There are no wingtip vortices, and the drones take up much smaller physical space. The flights also start and stop much more rapidly. Right now, my impression is that the FAA is not equipped to process a major increase in flight path data with different flight conflict characteristics. Especially when the flight's round trips include a takeoff and landing. There are no "air corridors" in drone delivery, since below 400 feet, many more obstacles go into a flight path, and every house becomes its own airport.

As for drone GPS, there are VERY high accuracy options available using RTK. Especially RTK over satellite with systems from Trimble and Leica coming to mind. These are typically used in terrestrial survey and allow very high degrees of confidence in the physical location of the drones. I don't believe RTK works for planes, but it is in commercial use in drones all over. s

</comment></comment></comment></comment><comment><USER7> The company I work for, LLamasoft, works with Zipline to model and optimize their supply chain. We did a press release Aug 30th, if anyone is curious. Fortunately we have had support for different modes of transport for a long time, so adopting drones into our model was trivial.

[https://www.llamasoft.com/llamasoft-supports-zipline- improve...](https://www.llamasoft.com/llamasoft-supports-zipline-improve- performance-public-health-supply-chains-using-drones/)

</comment><comment><USER8> In the video the drone dropped the package on the roof using a small parachute. Many buildings shown there seem to have those walled flat roofs which are accessible via stairs which is also popular in the middle east.

That seems to be a critical part for implementing this in an urban delivery system. People will likely need to install some sort of out-of-reach delivery chute on their roof or some sort of box on the buildings to prevent theft.

It will make it more expensive to implement but I can't see how deliveries would work without some sort of on-the-ground infrastructure like this.

But when it does happen though it will be glorious.

<comment><USER9> I think flying drones for home delivery will be the new flying car. I think autonomous road vehicle is the future for cities with an attempt to deliver to the home and then to a central pick up.

Reason is money. UPS or the USPS can do it if Amazon and Walmart don't beat them first. Salaries and benefits are the biggest slice of the pie for expenses.

<comment><USER8> Are automated ground based vehicles really going to out perform automated flight based ones?

I can see that for large packages (~50% of current parcel delivery?) but that still leaves all standard envelope based mail and smaller package. Such as books by Amazon or the very broad group of various daily products people would START purchasing online if they could get same day delivery.

If we look merely at how things work _now_ \- yes - I believe what you're saying makes the most sense. Because it's merely a big optimization of the current systems.

But I believe this downplays the innovation that very fast same-day delivery of packages (within a few hours even) that drones could provide. It would seriously expand the scope of services businesses like UPS and Fedex can provide.

Suddenly pharmacies, drug dealers, restaurants, local bakeries, convenience stores, gas stations, liquor/wine stores, etc, etc have a new retail venue.

Why stop at the busy gas station to fill your cars tank before the daily commute when you can wake up to a prepaid jerry can in your drone box?

I'd bet the answer will likely be a combination of both with a much higher volume in the drone delivery side.

</comment></comment></comment><comment><USER10> At last a real use for drones. And also drones and launch systems well designed for the duty.

<comment><USER11> FWIW, multirotors and RC aircraft with camera systems have been in use in the US for search and rescue operations for years.

</comment></comment><comment><USER12> There might be other startup opportunities here. Our postal service at least has this where they has to deliver letters 5 days of week and cost can be pretty high [https://translate.google.com/translate?sl=auto&tl=en&js=y&pr...](https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=https%3A%2F%2Fwww.posti.fi%2Fprivate- news%2Ftiedotteet%2F2016%2F20161003_posti-toteuttaa-5-paivaista-yleispalvelua- turun-saaristossa.html&edit-text=&act=url)

<comment><USER13> It sounds like this is more a political issue rather than a technological issue.

</comment></comment><comment><USER14> This is really a great application for quick transportation to a remote zone, which is so crucial in remote areas. But I can't help think that for each 'good' application, there might be dozens that are not so beneficial, for example : Drugs and Arms delivery across border, just to name few ....

I have nothing against the technology, I'm just really curious about it's more 'nefarious' uses.

<comment><USER15> Any technology can be used in ways the inventor had not intended, and possibly would not wish.

</comment></comment><comment><USER16> According to zipline website [0], there will be 4 stations, Mwanza, Geita, Mbeya and Dodoma. Looking on maps, Geita and Mwanza are really close to each other, moreover looks like at least third of potentially covered land around Mwanza is water. Wonder what is the reason behind this.

[0] [http://www.flyzipline.com/service/](http://www.flyzipline.com/service/)

</comment><comment><USER17> While I liks the drone idea, I have to be pedantic here:

 _But that mission can be a challenge during emergencies, times of unexpected demand, bad weather, or for small but critical orders._

Um 2-3 out of those four will not be improved by drones!

 _Using drones for just-in-time deliveries will allow us to provide health facilities with complete access to vital medical products no matter the circumstance," concluded Bwanakunu._

Including bad weather eh?

<comment><USER18> Yes, including some bad weather scenarios. Drones are likely not great in torrential rain, but things like flooding and fog shouldn't be issues for them whereas they would for drivers.

Emergencies (presumably political or military) will bring challenges of their own (since drones could conceivably be doing espionage and might be shot at), but can be routed around, and for times of unexpected demand it's a lot cheaper to store and launch many drones than it is to whistle up many trucks and drivers.

OF course the use case is limited at present due to payload limitations and so forth, but is there anyone who doesn't expect that to keep improving?

</comment></comment><comment><USER19> There is a relevant drone competition called the UAV Challenge Medical Express where teams have to retrieve a blood sample from a remote location. [https://uavchallenge.org/medical-express/](https://uavchallenge.org/medical- express/)

</comment><comment><USER20> Is there more extensive description of what the Medical items delivered actually are? I guess it's mostly just blood?

<comment><USER21> It's not _just_ blood, but that's a large portion of it. Flying out supplies really makes sense when you consider material that needs to be refrigerated (like blood). Rural African roads during wet season can be outright unusable; moving stuff can be a matter of weeks just to move something a few miles.

</comment></comment><comment><USER22> Tanzania launches the world's largest 2015/16 drone-hype VC funding delivery service

<comment><USER23> What if, instead, we reached the "slope of enlightenment" and these are useful applications that will lead to the plateau of productivity?

<comment><USER24> >the plateau of productivity

Google title for a book. Start a kickstarter and get rich $$$.

<comment><USER25> [https://en.wikipedia.org/wiki/Hype_cycle](https://en.wikipedia.org/wiki/Hype_cycle)

</comment></comment></comment></comment><comment><USER26> This title "...latest..." threw me off a bit. Somehow associated "last" with that. Yet I have no problem when it comes to "latest tech", "latest research". Weird.</comment>


Why Does Win32 Even Have Fibers? - <AUTHOR> http://blogs.msdn.com/larryosterman/archive/2005/01/05/347314.aspx

<comment> a-priori So am I right that "fiber" is just the Microsoft word for "green thread"?

<comment><USER2> A more direct parallel is a posix thread with it's scope set to PTHREAD_SCOPE_PROCESS. Solaris has something called a "light weight process" which is also the same thing. A green thread is a thread running within a virtual machine.

This article is also slightly inaccurate in saying that you CAN'T call API calls that block from a fiber. You can make the calls but it will block all of your fibers / process level threads which may not be what you want.

"fiber" is just Microsoft's marketing term for threads scheduled at the process level.

<comment><AUTHOR> Well, "fiber" is just the API's name for a user thread. Calling it a "marketing term" seems unfair -- it is just a piece of technical jargon.

<comment><USER2> If it's just an API term then why don't they just call it a "user thread"? Microsoft calls other wise standard things by different names to make people who don't know any better think that their skill only applys to Microsoft products.

ie: Microsoft calls their implementation of a LDAP server "Active Directory" even though they are essentially the same thing.

It's not a question of fairness it's a question of facts. You're the one reading it with a negative connotation that implies unfairness.

<comment><AUTHOR> _If it's just an API term then why don't they just call it a "user thread"?_

Because that might be confused with other user thread implementations? It is also significantly more awkward than "fiber".

 _Microsoft calls their implementation of a LDAP server "Active Directory" even though they are essentially the same thing._

Not really; AD does a lot more than just LDAP (e.g. Kerberos, DNS).

</comment></comment></comment></comment></comment><comment><USER3> Ok. So I'm a SQL Server DBA and I've heard about fibers before (with regard to SQL Server configuration), but not to any great extent as far as technical details go.

A interesting read.</comment>


Google to start sending search traffic to fast-loading AMP articles in Feb 2016 - <AUTHOR> http://venturebeat.com/2015/12/09/google-will-start-sending-search-traffic-to-fast-loading-amp-news-articles-in-february-2016/ <comment><USER2> ok, lets take a look at [https://www.ampproject.org/](https://www.ampproject.org/) which is a valid amp document.

      page speed insights
      https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.ampproject.org%2F
      mobile 68/100
      desktop 59/100

      webpagetest.org
      https://www.webpagetest.org/result/151214_DW_X81/
      first byte: 0.225s
      start render: 0.816s
      speed index: 3396

compare it to one of my sites where we did some speed optimization (wordpress based / responsive design)

      page speed insights
      https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fwww.veganblatt.com%2Fnatuerliche-antibiotika
      mobile 71/100 (mostly thx to jquery)
      desktop 90/100

      page speed insights
      https://www.webpagetest.org/result/151214_4T_X91/
      first byte:0.145s
      start render: 0.712s
      speed index: 797

Amp is not per-se fast(er). But for this, they crippled HTML5, basically want us to forgo responsive design (responsive is not (only) about mobile), oh, and buy into another google dependency.

and why? just because publishers are too lazy to make sites fast, and too dependent on third party crap (ads & an unbelievable amount of other crap).

As a publisher and user, I hope Amp succeeds in disrupting the way publishers publish mobile.

As a developer: OMFG, they throw the baby out with the bathwater. (they = Google, baby = html5, bathwater = internet)

</comment><comment><USER3> Seems a fairly pointless tech to risk upsetting regulators over. What's the deal? "Use our <silly tech> or lose your ranking!"

<comment><USER4> I'm surprised you're getting downvoted, because this seems like a valid criticism and was the first to pop into my head as well.

How is this not anti-competitive? Google is favoring the ranking of sites that use its own tech. According to the AMP docs on third-party components [0], only 5 ad networks are supported, most of them Google-owned.

[0] [https://www.ampproject.org/docs/guides/third_party_component...](https://www.ampproject.org/docs/guides/third_party_components.html)

<comment><USER5> >AMP supports loading the bootstrap iframe that is used to load ads from a custom domain such as your own domain.

according to [https://www.ampproject.org/docs/reference/amp- ad.html](https://www.ampproject.org/docs/reference/amp-ad.html)

</comment></comment></comment><comment><USER5> No TLS requirement (that I can find). That's a shame. If they're going to be forcing publishers to get their shit together, you would think they would at least add basic TLS (if not full http/2.0 or something). I suppose since it's going through their CDN it's encrypted when it reaches the end user, but there's still the connection from their CDN to the publisher

</comment><comment><USER6> Don't publishers themselves have control over their own page? Between this and Facebook's Instant Articles, should it be clear to publishers that their 2 largest source of referral traffic is telling them their site is too slow. What am I missing here, why aren't publishers seeing the light?

</comment><comment><USER7> Previous discussion on AMP: [https://news.ycombinator.com/item?id=10507902](https://news.ycombinator.com/item?id=10507902)

If nothing else, this seems to be making publishers rethink the cost of adding extra stuff on to content, which will hopefully be good for users.

</comment><comment><USER8> Interesting that they do this via partnerships with news outlets etc.

Last year they adapted search rankings to get everyone producing mobile- friendly pages. They could have done the same here. Great for getting the web forward, but it's a bit mafia like. "Nice 1st search result you have there, would be a shame if something happened to it...". I would like if it they used this again to get other things on everyone's prio list: IPv6, HTTP/2.0, page load time. It's a bit of a nuclear weapon, but it gets things moving.

More on topic: I have the strange feeling that AMP will somehow help them to "inline" the search results like they currently do with wikipedia etc.. That way your site becomes just a data source for Google, they're not actually driving traffic to it.

<comment><USER9> This is where my questions drift to as well. What is the strategic play here? With FB's Instant Articles it is obvious they want to keep users on the FB platform and eventually tighten the noose on publishers while avoiding any ad blockers. Can't say I blame them.

Not totally clear on what the end game is with Google here. They make a substantial portion of their revenue from the display inventory these publishers provide.

\--EDIT--

Just found an article that does a great job answering some of these questions.

[http://highscalability.com/blog/2015/12/14/does-amp- counter-...](http://highscalability.com/blog/2015/12/14/does-amp-counter-an- existential-threat-to-google.html)

</comment></comment><comment><USER10> WAP 4.0

(at least AMP reminds me of WML and WAP, that we had on Nokia/Siemens/Ericson cell phones 15 years ago)

<comment><USER2> more like cHTML 2.0 [https://en.wikipedia.org/wiki/C-HTML](https://en.wikipedia.org/wiki/C-HTML)

</comment></comment><comment><USER11> Just curious, I've been through the documentation a few times. Is there any kind of special sitemap we are going to have to do for each page. For instance lets say we have:

[http://www.example.com/normal-page.html](http://www.example.com/normal- page.html)

and AMP enabled:

htpp://www.example.com/normal-page.html?ampenabled=1

I realize a lot of people are going to do this with dynamic URLs or plugins, will Google just crawl these on their own?

Also does anyone have any ideas for menus in AMP pages? SO far all the solutions I've seen don't have menus. I'd hate to see all this extra traffic and no way for visitors to browse other pages.

<comment><USER12> AMP versions have their own meta tag.

<link rel="amphtml" href="AMP-URL">

It's not very well documented.

</comment></comment><comment><USER13> Does this differ significantly in principle from the proxy-compression that Opera Mini has been doing since ~2006?

[https://en.wikipedia.org/wiki/Opera_Mini#Functionality](https://en.wikipedia.org/wiki/Opera_Mini#Functionality)

Or is it primarily a new/better/alternative implementation of the same idea [probably it was also done by someone else before OperaMini...]

</comment><comment><USER14> Is it ironic that the AMP build is currently claiming to be broken?

[https://github.com/ampproject/amphtml](https://github.com/ampproject/amphtml)

Or that it makes pages faster to load by adding a Javascript library?

<comment><USER7> If publishers behaved themselves then adding Javascript for optimization would be odd, but they don't behave: [http://www.nytimes.com/interactive/2015/10/01/business/cost-...](http://www.nytimes.com/interactive/2015/10/01/business/cost- of-mobile-ads.html?_r=0) ...but overall I agree it does feel strange to have worked to hard to have highly capable browsers and then only use a tiny subset of functionality.

From: [https://www.ampproject.org/docs/get_started/about- amp.html](https://www.ampproject.org/docs/get_started/about-amp.html)

      AMP JS

      The AMP JS library implements all of AMP's best performance practices, manages resource loading and gives you the custom tags mentioned above, all to ensure a fast rendering of your page.

      Among the biggest optimizations is the fact that it makes everything that comes from external resources asynchronous, so nothing in the page can block anything from rendering.

      Other performance techniques include the sandboxing of all iframes, the pre-calculation of the layout of every element on page before resources are loaded and the disabling of slow CSS selectors.

      To learn more about not just the optimizations but the limitations, read the AMP HTML specification.</comment></comment>


Ask PG: Add other top-level domains to HN's domain list. - <AUTHOR>

It seems like whenever I type a comment or self post that includes a domain like www.somewebaddress.io the HN servers don't recognize/display this as a link. Is there a list of domain codes that the server recognizes, and is there a way to add new ones in? This will probably be a lot more relevant when the new domains from ICANN start making their appearance too. <comment><USER2> URLs in self-posts are not turned into links. URLs in comments are. There's no domain filtering in this code AFAIK.

Your URL in the earlier comment wasn't turned into a link because it wasn't a link, you just typed a bare domain without the protocol --

[http://www.somewebaddress.io](http://www.somewebaddress.io) not www.somewebaddress.io

<comment><AUTHOR> They have to be turned into <a> links somehow. I feel like the server recognizes links and creates the proper HTML tags when generating the page.

<comment><USER2> Yes, the server recognizes links and creates the proper HTML tags. It does so by looking for properly formed URLs in the text, and does not check domains against any list. My comment was both an answer and an example -- the [http://www.somewebaddress.io](http://www.somewebaddress.io) in it was turned into a link while www.somewebaddress.io was not. Perhaps that's unclear through whatever app you're reading this on.

<comment><AUTHOR> Ahh, I was under the impression that just typing www.google.com would come back correctly vs. having to put the http(s):// in front.

I figured that a .io link was somehow different than a .com as far as link checking goes. Maybe www. should be added to the regex?</comment></comment></comment></comment>


Scientists see signs of lasting immunity to Covid-19, even after mild infections - <AUTHOR> https://www.nytimes.com/2020/08/16/health/coronavirus-immunity-antibodies.html <comment><USER2> Big deal if true.

Initially I was of the mindset of open up at pace that keep hospitals not overwhelmed. Herd immunity would gradually set in.

We could get on with our lives as it would be just another cold / influenza style strain.

All the articles about reinfection rates were very scary. As it would mean years or decades of massive disruption.

<comment><USER3> We just spent a decade worth of cash in three months, so there will definitely still be a decade of disruption.

<comment><USER4> Yeah having been born in the early 90s, it's not a great feeling to have been through 4 recessions in my lifetime already. The amount of money that has been spent in the last few months all but cements the idea in my mind that Social Security won't be a thing by the time I'm retired.

<comment><USER3> Recessions are not necessarily bad, but spending generational wealth in months is definitely bad. This is why free markets are important, the government is putting trying to stem bleeding it created with bandaids to problems that cannot be solved by intervention. Like in medicine at the hospital, the intervention cascade. Once you mess with a homeoestatic system, it cannot exist without life support.

<comment><USER5> And yet, life will go on.</comment></comment></comment></comment></comment>


New Experimental Chrome Dev Tool – CSS Overview - <AUTHOR> https://youtu.be/T05MBbDz5FU <comment><USER2> Great to normalize all the debt accumulated over years of fiddling with the stylesheets.</comment>


Simple Rules 'Bootstrap' the Laws of Physics - <AUTHOR> https://www.quantamagazine.org/how-simple-rules-bootstrap-the-laws-of-physics-20191209/ <comment><USER2> The content of the article is very interesting and worth reading, but the framing feels circular. Some laws of nature are fundamental and other laws are inevitable consequences of those laws. If the inevitable laws were not inevitable, then they would be fundamental. As our knowledge and explanatory power grows, some laws that first appeared fundamental have been explained in terms of deeper laws, but we must still ask why the deeper laws exist.

<comment><USER3> I agree with this. I've always found theories of everything to be unsatisfying in this way, because they never explain how the laws of physics got the way they are.

Assuming the existence of some abstraction called spin to derive the fundamental forces is a great exercise in internal consistency, but hardly meets any definition of "bootstrapping" as I understand the term.

The only theory I've ever encountered that passes this smell test to me is the mathematical universe hypothesis[0] because it's intuitive to me that math just "is" in some sense and does not require any upstream mechanisms or assumptions. As far as I'm concerned, if you have to assume the existence of anything whatsoever, it's not bootstrapping.

[0] [https://en.wikipedia.org/wiki/Mathematical_universe_hypothes...](https://en.wikipedia.org/wiki/Mathematical_universe_hypothesis)

<comment><USER4> As to how the laws got where they are Lee Smolin and Roberto Ungar say that it's possible they were not always the way they are and that they evolved spontaneously over time. And that the spontaneity just is the way things are i.e. there's no explanation for it. At least that's my recollection from reading their book.

[https://en.m.wikipedia.org/wiki/The_Singular_Universe_and_th...](https://en.m.wikipedia.org/wiki/The_Singular_Universe_and_the_Reality_of_Time)

The other explanation seems to be the multiverse. i.e. we just got a random set of self consistent laws. Again there seems to be no explanation as to why or how the multiverse came to be, is there?

<comment><USER3> > not always the way they are and that they evolved spontaneously over time

But how did they get any way at all? How and why do they evolve?

> multiverse. i.e. we just got a random set of self consistent laws.

This raises even more questions. Why are there any multiverses with any laws at all? From where did the stuff in the multiverses come from? What initiated this chain of multiverse creation, or why is it inevitable?

A bootstrapping theory would explain why anything is inevitable, or why there is something rather than nothing. Otherwise it is just a low-level physics theory.

<comment><USER5> I don't think what you're asking for is possible, and the answer lies more in the realm of philosophy than in physics.

You can always keep asking the question 'why?' At some point, either you have just accept something as fundamental, or the answer justifies itself, or you have an infinite regress of whys.

<comment><USER3> I agree with this generally, but I don't think questions like "why are the laws of physics the way they are" are obviously questions for philosophers only and I'm not simply asking "why?"

Only very low-level ontological questions meet this criteria, like "why is there something rather than nothing," but even then, I am open to the possibility that there are reasonable explanations for these things that we just can't articulate yet.

</comment></comment></comment></comment></comment></comment><comment><USER6> > When bootstrapping, physicists determine how elementary particles with > different amounts of "spin," or intrinsic angular momentum, can consistently > behave. In doing this, they rediscover the four fundamental forces that > shape the universe.

They have derived gravity through quantum mechanics? What rock have I been living under?

<comment><USER7> Not a physicist by any means, but from the article it talks about gravity in the context of the graviton (as one plausible solution to the problem mentioned). Which is still hypothetical, so it's not like they've proven gravity from first principle or anything.

<comment><USER8> As a layman reading this, it's funny. Because I do not need gravity proven to me from first principles ;)

<comment><USER9> Proven is the wrong word. You cannot prove a theory.

Deriving a description of gravity from first principles would be more appropriate

<comment><USER10> *an empirical theory.

I can certainly prove things about, say, addition.

<comment><USER11> if you mean you can prove 2+2==4, it's actually tautology: | | + | | == | | | |

<comment><USER10> no like, "addition is closed over the integers" is something you can show to be True (for all members of an infinite set, no less -- so it's not empirical.)

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> This is a good article, but I think it's a little confusing -- it doesn't specify the scope of the bootstrap programme.

It's true that general considerations can give you very strong constraints on how particles of various spins can interact. For example, it's been known for decades that at low energies, massless spin 1 particles inevitably give you Yang-Mills and massless spin 2 particles inevitably give you general relativity. There is also a separate idea called the conformal bootstrap which seeks to use general principles to pin down _everything_ about a theory, but my impression is that it only works well for simple conformal field theories in lower dimensions.

In particular, these ideas don't tell you anything about the detailed structure of the Standard Model: why it has the gauge groups it does, why there are 6 quarks, the values of the quark masses, how the spontaneous symmetry breaking works, the gauge couplings, and so on. That's the way with almost all theoretical tools: the flashier and more general in scope they are, the less details they actually pin down. So while formal theorists may be excited about this, experimentalists can't really use it for anything.

</comment><comment><USER13> Wondering if anyone could recommend a layman's introduction to "spin". I've read the Wikipedia article, I broadly understand it, but just curious as to how it was discovered, why it is considered an "intrinsic" form of angular momentum, and why it is so fundamental a concept in our universe.

<comment><USER14> Objects with spin can be point-like but carry angular momentum. The electron is one such particle.

It is "intrinsic" because it has no known moving parts. If it had moving parts, and that motion had net angular momentum, we would refer to it in many contexts as "orbital angular momentum".

Spin should seem counterintuitive. There are no macroscopic objects that I am aware whose spin you can feel with your hands. Our research group has an object with 10^23 polarized spins (and negligible net magnetic moment) -- observing the angular momentum effects directly requires a sensitive modern torsion balance. [https://arxiv.org/abs/0808.2673](https://arxiv.org/abs/0808.2673)

<comment><USER15> > Objects with spin can be point-like but carry angular momentum.

This is where I get stuck. The particles are all excitations of a quantum field. So what does spin mean in that context?

<comment><USER16> Excitations can carry dynamical properties. For example, jerk a rope once, and you will see a wave travel down the rope, which carries energy and momentum. If you give the rope a quick twist, the wave carries angular momentum.

<comment><USER15> I have the same problem with this analogy. The rope itself is just excitations of a quantum field. It feels like there is very little underpinning everything.

</comment></comment></comment></comment></comment><comment><USER17> Max Tegmark was on the Sean Carroll podcast recently, talking about the different types of multiverse we could postulate may exist[0]. I found the quanta article fascinating, and I don't believe it's strictly speaking 'circular'. It can also be the case that multiple solutions exist mapping the relationships between a given set of fundamental laws. Prof. Tegmark discusses this in the '4th level' of multiverse which examines whether it's right to talk about a multiverse of all possible mathematically consistent universes.

[0]: [https://www.preposterousuniverse.com/podcast/2019/12/02/75-m...](https://www.preposterousuniverse.com/podcast/2019/12/02/75-max- tegmark-on-reality-simulation-and-the-multiverse/)

</comment><comment><USER18> If it is inevitable, why does the weak force only affect the left-handed fermions and not the right handed? Most of the article is just a discussion of the applications of the symmetry, not inevitability.

U(1) [aka electromagnetism] is probably inevitable, the rest is more controversial.

</comment><comment><USER19> This brings to mind how Noether showed that conservation laws of physics must exist if universe has some specific symmetries.

Like translation symmetry, the simple fact that the laws of universe don't change as you move a bit to the side mathematically implies conservation of momentum.

</comment><comment><USER20> > And the hour hand on a clock must spin around twice before it tells the same > time again.

Err, not on any clock I've ever seen! But points for effort.

<comment><USER21> This example definitely assumes familiarity with a 12-hour clock, which indeed spins around twice before getting back to the same time.

<comment><USER22> But only once before getting back to the same state, so it's a bit confusing.

</comment></comment></comment><comment><USER23> Sounds to me like the higher order laws of physics are emergent properties of the lower level properties. Is this surprising? Every system in existence is the result of the emergent organisation of lower systems - why would the laws of physics be different?

<comment><USER24> It is one thing to say that something is plausible, and something quite a bit more to be able to show that not only is it plausible, but also that it is the way things actually are, and in a very specific way.

<comment><USER23> yes, but the reporting is as if the fact that emergence exists is itself surprising. I'm sure the actual science is a lot more sober and focused on the genuine revelations, around how such emergence plays out.

</comment></comment></comment><comment><USER25> "That solution is the graviton: a spin-2 particle that couples to itself and all other particles with equal strength."

So, has this been discovered recently? I was under the impression that the graviton was theoretical?

<comment><USER26> What that means is that gravity, at the quantum level, must be conveyed by a spin-2 particle, known as a 'graviton'. It has not been detected, and probably never will be (due to technical limitations). We can broadly pin down its properties, but we do not yet have a full theory of how it interacts.

</comment></comment><comment> Iwan-Zotow "As the Nobel Prize winner Steven Weinberg showed in 1964, the existence of a spin-2 particle leads inevitably to general relativity"

Huh?!?

spin-2 particle leading to GR was the prime essence of Feynman lectures on Gravitation, 1962

<comment><USER27> There is a link pointing to [https://journals.aps.org/pr/abstract/10.1103/PhysRev.135.B10...](https://journals.aps.org/pr/abstract/10.1103/PhysRev.135.B1049). Some quick Googling shows quantum gravity being referred to as Feynman- Weinberg gravity, so both must have contributed parts of the theory.

</comment></comment><comment><USER28> I thought this was going to be about Twitter Bootstrap's UI library, and was thinking, "Oh good, I can read about simple consistent rules so that it's not so organic and unpredictable anymore!" It was not to be. Back to the UI trial- and-error slog...

</comment><comment><USER29> "...bootstrappers find that many different spin-0 particles are possible."

Is that a typo, or is it really possible to have spin -0?

<comment><USER30> I think with some equations there is a discontinuity at zero, like tan, but it still makes sense to talk about what happens asymptotically approaching zero and then it matters from which side you approach zero, hence positive and negative zero.

<comment><USER31> tan does not have a discontinuity at zero. |x|/x does, as does 1/x. tan's is at pi/2 in particular and (n+1/2)pi in general.

<comment><USER32> Although tan has a set of discontinuities when it jumps between +∞ and -∞ through complex infinity (∞~).

tan(π(x + 0.5)) = ∞~, x ∃ ℤ

(π on my screen doesn't look much like greek pi.)

</comment></comment></comment></comment><comment><USER33> N-gate theory offers the best hope of cutting through conflicting theories to get at the fundamentals.

</comment><comment><USER34> this is the opposite of how science works. until grand unification is proven, the four forces simmetry is a nice and convenient hypothesis

<comment><USER35> > this is the opposite of how science works

Yep, this is dogma. People seem to be hard-wired to believe in something, for some it's a god, for others it's a theory or hypothesis. As for the grand- unification surrounding the the four forces, aren't we currently questioning the existence of a fifth? That's a pretty short-lived god.

<comment><USER34> yeah there's the x17 thing too, but it's still quite to early for that.</comment></comment></comment>


The Story of Mel - <AUTHOR> http://www.catb.org/jargon/html/story-of-mel.html

<comment><USER2> This has been posted dozens of times.

<comment><AUTHOR> Sorry, I thought that HN was handling existing posts giving an upvote to the original poster.</comment></comment>


15 Years of CPAN (short video) - <AUTHOR> http://vimeo.com/18424044 15 Years of CPAN. Visualized. <comment><USER2> perfect job, I'll really like this kind of visualization.</comment>


On Primary Keys - <AUTHOR> http://orchestrate.io/blog/2014/05/22/the-primary-key/ <comment><USER2> "In fact, even in RDBMS's developers should be using a natural key as their primary key instead of an auto-incremented ID. "

No, they shouldn't. The fact that your dataset may contain a piece of information that is usually unique its completely unrelated to the need of RDMSs to have identifiers to implement table relationships and to identify records in a table.

Not to mention that it can bring lots of headaches down the line. The classic example is using social security numbers (or another country's equivalent, such as CPF in Brazil) to identify individuals. Down the line you get a requirement to support international customers. That is now a major undertaking.

You are also offloading the responsibility of maintaining the uniqueness property to a third party, in effect trusting their database.

<comment><USER3> The noob never saw a person get married and change both their last name and email address. There is no such thing as a "natural key" that can never change, that's why auto-incrementing integers are used. Also, users should not rely on the keys being monotonic.

</comment></comment><comment><USER4> DO NOT USE USER-SUPPLIED DATA AS KEYS

Database keys are more-or-less equivalent to pointers. In the case of natural keys, they're pointers that (a) do not have ASLR, and (b) are exposed to the user.

As the article mostly ignores, you _will_ guess wrong about what can be reasonably considered permanent or unique. Email addresses change (and aren't always unique), names change (and aren't unique), etc. This is much harder to fix if you used that guess as the basis for your entire data model.

The problem with proper keys was given as "auto_increment doesn't work on distributed systems". This is rather silly, as there are plenty of alternatives (GUID, UUID, the mentioned snowflake keys).

It's also interesting that proper keys are a "crutch" for designing data models and are best replaced with cleverness, and apparently are only useful to dictate record order (I know that Oracle at least doesn't work that way). This brings to mind "debugging code is twice as hard as writing code; if you write code as cleverly as possible, you are by definition not clever enough to debug it". DON'T BE (OVERLY) CLEVER. Do the least-fragile thing that doesn't add complexity (that is, doesn't add complexity _visible to you_.). Only do clever things that add fragility if you have an actual measured reason to do so.

</comment><comment><USER5> "In fact, even in RDBMS's developers should be using a natural key as their primary key instead of an auto-incremented ID. This will lead to better performance when the natural key is the most commonly used identifier, but is often not considered out of a habit."

As a database architect I always use auto-incrementing as the primary key. This ID is actually a surrogate key for the real primary composite key, which I assign to a unique key.

So, with the unique key in place, the performance will be nearly as good as you'd expect for direct looks by key attributes. However, the performance gain using the surrogate ID within join tables and as foreign keys is much greater.

"It's also worth noting that over their years of use in SQL databases they've become somewhat of a crutch when designing the data model for a system."

They are not a crutch. They are a wonderful feature. One could model with GUIDs if necessary or something similar for your surrogate key but nothing beats the simplicity of an auto incrementing ID.

Even a NoSQL database like MongoDB creates a unique _id for you for each document.

</comment><comment><USER6> An article promising to be quite technical demonstrates early on the author's inability to get their head around the spelling of the possessive form of "its". (Perhaps it's just me that finds this an unsettling juxtaposition. The About page wasn't useful in identifying native writer status.)

Then we dive into some mistruths about emails being unique per user (I know plenty of people who _still_ share email addresses, both personal and also in shared commercial accounts). I worked at a place a few years ago that had designed their entire accounts system around the idea of email addresses being immutable. They'd subsequently had to introduce a secondary column for _actual_ email addresses -- customers would login with their historical email address as their ID. The idea that a uid is a 'natural key' just seems perverse (or at least demonstrates a profound misunderstanding of what a natural key is).

A sideways reference - without actually using the phrase - to CAP theorem. Composite keys are suggested as a solution to a vaguely phrased problem without acknowledging the performance issues, and subsequent design constraints, they introduce. Ultimately there seems to be a misunderstanding about the differences between a (primary) key and an index.

</comment><comment><USER7> The biggest problem with "natural" keys, as referenced in the article: they have a nasty habit of _changing_. In the article's example, making "username" or "email" the PK is going to be messy if you have foreign keys referencing the value when it updates.

<comment><USER8> Using email I can see being a problem, but username? If this is for identifying accounts, then that shouldn't be one that ever changes.

<comment><USER9> Jane Doe gets married and changes her name Jane Smith. She no longer wishes to log into your system as janedoe and would prefer to login as janesmith. Certainly one could make the argument that you should just tell her that the name can't be changed and she'll have to just live with it. Depending on your business, that may or not be acceptable.

<comment><USER10> Even worse, Jane Smith decides she hates that _bleep_ John and they get divorced. She really won't want to see Smith as part of her username anymore.

</comment></comment></comment></comment><comment><USER11> In a recent large project, I moved to using GUIDs. Following advice from this article: [http://www.codeproject.com/Articles/388157/GUIDs-as-fast- pri...](http://www.codeproject.com/Articles/388157/GUIDs-as-fast-primary-keys- under-multiple-database) it was fairly straightforward and performant.

Obviously YMMV (as may your definition of 'large' and 'performant').

<comment><USER12> UUIDs are wonderful: they're fairly small (16 bytes), and can be generated on multiple servers independently with no coordination. If you use version 4 or 5 UUIDs, the first couple of bytes are random, so short-circuiting comparisons should in theory bail quickly… but I've never had a need to measure.

Perhaps the only gotcha I've run into is that JS can't reliably generate them. (You need a decent RNG, and while JS has an RNG, no guarantees are made about it.) (Trivially work-aroundable with an AJAX endpoint on the server, of course.)

<comment><USER13> Strictly speaking they are 16 bytes when stored as binary, which sounds grat, but when represented as strings (as they usually are) they are 36 characters which is 36-bytes in ASCII, but 108(!) bytes in 3-byte unicode.

So, in practice they are terrible primary keys in systems that do not have a native UUID type. In that case, an 8-byte bigint generated externally by a ticket service like Snowflake is often far superior.

<comment><USER12> > they are 36 characters which is 36-bytes in ASCII, but 108(!) bytes in > 3-byte unicode.

I'm going to argue that that's not the norm: "3-byte unicode" is kinda WTF, since it doesn't really exist. If you're in UTF-8, it's a 36 byte comparison.

That sounds, however, a lot like MySQL, which has perhaps one of the more braindead "UTF-8" implementations. That said, I'm not sure that it uses 3 bytes for code points that don't require it. (At least, that it spaces them that way: there may be nulls past the data, sure, but those won't count in a comparison.)

</comment></comment></comment></comment><comment><USER14> "In fact, even in RDBMS's developers should be using a natural key as their primary key instead of an auto-incremented ID. This will lead to better performance when the natural key is the most commonly used identifier, but is often not considered out of a habit."

Primary/unique keys are indexed. Creating an index of strings instead of integers is surely going to result in a huge index and slow performance?

<comment><USER15> Well, like everything, it depends on your database, your data and how its accessed. I've had a lot of varchar indexes in my time.

The article makes it seem like your primary key and main index have to be the same, but that's not necessarily the case. Most DBs have some support for physically ordered indexes.

So take username, for example. Let's say username has to be unique, but it can change. (It doesn't even matter too much if it's not totally unique, just mostly unique.) Let's say you're going to be doing most of your lookups in the user table by username.

If performance is an issue, keep your auto-incrementing guaranteed-unique primary key and add a clustered index on user name. The data is now physically stored by its natural key, but you still have a nice unique, unchanging primary key. Lookups are very fast, though depending on the implementation, inserts/updates might not be so much.

Postgres supports this with the CLUSTER command, although it has to be run manually - it doesn't keep up as updates and inserts come in. SQL Server calls it a clustered index and enforces the physical ordering on inserts and updates. Oracle has indexed-ordered tables which can achieve a similar effect, though IIRC the index has to be the PK (nothing to stop you from having a unique constraint on a sequence-generated column, though.)

<comment><USER16> In oracle, the index on an index ordered table only needs be a unique. So, for example:

          1234 "John Doe" null null null
          5824 "John Doe" "Sale 1" "item 1" $5
          4321 "John Doe" "Sale 1" "item 2" $50
          4382 "John Doe" "Sale 2" "item 1" $4

          CREATE UNIQUE INDEX (name, sale, item);

</comment></comment></comment><comment><USER17> We've been having this argument about primary keys for three decades at least. If the natural key vs. auto-generated ID theories can't be reduced to practice, is there any home for software development as a profession?

</comment><comment><USER18> > An email address is a piece of information that is guaranteed to be unique > to each user because everybody has their own email address.

I once let myself in for a lot of headaches by designing a system around this unwarranted assumption.

</comment><comment><USER19> It looks like the purpose of the article is to explain why it's not a big deal that the company's database solution doesn't support auto-incrementing primary keys.

</comment><comment><USER20> Instagram had a nice post on how they did their PK generation/sharding a couple years back. Still a good read, [http://instagram- engineering.tumblr.com/post/10853187575/sha...](http://instagram- engineering.tumblr.com/post/10853187575/sharding-ids-at-instagram).

Previously discuss here, [http://news.ycombinator.com/item?id=3058327](http://news.ycombinator.com/item?id=3058327)

</comment><comment><USER21> There's nothing that requires most auto id keys to be monotonically sequential, which is the bottleneck when distributed. If uniqueness is all that's required, blocks of id's can be handed to different hosts and replenished on demand.

Gap-free, monotonically increasing id's should only be used for things that have regulatory compliance issues. For example, there shall be no gaps in invoice id's, and voided ones shall be marked.

</comment><comment><USER22> Small project that may be of interest to those involved in this discussion: [https://github.com/brandtg/alicia](https://github.com/brandtg/alicia)

Kind of "eventually monotonic" distributed auto-increment keys. Your mileage may vary.

</comment><comment><USER23> Could someone point out to me how filtering and selecting records over some parts of the primary key (ex {sensorID} over {deviceID}_{sensorID}_{timestamp}) is better than just having regular indexed fields (ex {sensorID}) containing those pieces of information?

<comment><USER24> I believe that technique is intended for nosql document storage systems that otherwise don't have indexed fields.

</comment></comment><comment><USER25> Slightly off-topic:

With JS disabled, the page header is white text on a transparent background.

With JS enabled, I see no way to remove the header. I have little enough vertical screen real estate, adding an extra chunk of stuff on the top doesn't help. I ended up removing it entirely.</comment>


Is San Francisco about to return to its Bohemian roots? - <AUTHOR> https://www.sfgate.com/sf-culture/article/Is-San-Francisco-about-to-return-to-its-Bohemian-15455489.php <comment><USER2> You can't go home. Not ever.

Forever burned into my memory is some stupid hippie liberal (disclaimer: I am also a stupid liberal) professor type talking to some NPR-voiced reporter shortly after 9/11\. Very shortly, like a few weeks.

"I think this will be a good thing for our culture in some ways. We'll see an awakening of youthful counter cultural movements, art, and music inspired by these difficult times. It will be like the late 60's all over again." Something like that. Never mind how vile of a viewpoint it is that 9/11 may be good because some anthropology professor misses the 1960s. It simply never happened.

Wars occurred. Freedom contracted. Culture moved forward, not backward. New small renaissances did occur in that time. I'd consider the ~2005-2015 internet to be a pretty special moment and place, for example. But the 1960's never came again. Nor will the renaissance of the early internet. Nor will the bands of San Francisco.

Special moments of the future belong to different people, located elsewhere, doing different sorts of things.

<comment><AUTHOR> > And it won't be a regression to the romanticized scenes of the past. North > Beach won't suddenly fill with Beat poets, the Fillmore won't regain a jazz > scene that was desecrated by crooked urban development. The Haight won't be > teeming with rock-and-roll bands again. But after the unprecedented chaos of > 2020, San Francisco will change again.

<comment><USER3> A distinction needs to be made between the Zeitgeist of a time and the Genius Loci of a place. Is it part of the Genius Loci of the Bay Area to be Bohemian? I get the air for sourdough, and terroir for wine, but culture? It's a deep question, and requires a comparison with other US cities.

Zeitgeist-wise, I'd note that San Francisco is an infant from a world culture standpoint, reaching all the way back to the...1950s? Maybe include Carmel to go all the way back to the early 1900s. All the rest of the world yawns. And the Spanish colonial and indigenous cultures are at best window dressing on the SF vibes...another costume to wear. Most other cultures would probably think that SF doesn't have enough Zeit to be able to support much of a Geist.

But I agree personally that the attempt to intentionally physically and socially recreate an imagined past is a recipe for disaster. That past _can_ be a powerful inspiration for future exploits since, although the physical elements of past visions are gone, the essential visions underlying the imagined past remain today in some real, if not physical sense, to be revisited, refined and perhaps manifest, or perhaps rejected.

Now I will take my staff and robe and be on my way...

</comment></comment></comment><comment><USER4> Rent has got a long way to fall before you can find a room in a house for $300/month. It needs to be around there for it to be truly _Bohemian_ , where rent can be paid off after only a days of work, by artists, many of whom don't code, and just aren't suited for a 9-5 corporate job. The Beatles didn't suddenly decide to quit high-profile jobs at law firms, they lived off government welfare before making it big.

Art makes do, just maybe not here. Some has already been gentrified and priced out of Oakland and have moved further, up into Richmond or south to Hunters Point. Others have looked at coming back to the city, and still found that 20% discount off $4,000/month is still utterly unaffordable, with no private garage space, and with so many neighbors all working from home that aren't appreciative of impromptu 4am Tuesday nightjam sessions.

I'd love it for San Francisco's culture to undergo a revival and for the arts to flourish, but with this much money in the area, San Francisco could just as easily go the way of LA or Miami with conspicuous consumption. Maybe that helps the arts, but Teslas aren't Bohemian.

<comment><USER5> I think that rent figure is a key insight. IIRC in Berlin, one of the cooler cities in the world, even six years ago one could find a nice apartment to share for 400 Euros a month.

Several acquaintances basically worked 3-6 months per year to pay their rent and food costs, and then did whatever they wanted the rest of the year. This included artists, musicians, architects and engineers. It seemed like a good enough deal that I seriously considered moving there, but I stayed in the US scene as I would like to retired in my 40s.

Berlin has excellent transit, cheap flights via one of Europe's shittiest airports, and decent train links. Beer cost a euro per liter, food at the grocery store is pretty cheap, entertainment is cheap- you can live nicely off very little money.

For everybody that cannot hope to retire, ever, a big cheap city with excellent transit, lots of lower income jobs, and lots of old buildings is really the ideal situation. Berlin meets all of these criteria, but of course the developers moved in hard recently.

Detroit always seemed like a sort of ideal American candidate, apart from all the horrific crime and weather.

<comment><USER6> I'm from St. Louis, so while acknowledging some pretty obvious bias, I'd argue that the decline of rust-belt cities has been totally misunderstood, and a lot of it has to do with a pretty simple accounting error. Many of these old cities have narrow urban municipal borders and what happened is that as the cities grew beyond these borders their statistical presentation disconnected from the actual reality of what it's like to live there.

For example, "St. Louis" (as in the city itself) consists only of the innermost 62 sq/mi of the St. Louis metro area.

This has numerous perception-distorting effects:

1\. First of all, there's raw size. The region has 2.8 million people. It's much bigger than, say, Austin, Portland, or San Antonio, but you wouldn't know that from a list of the country's biggest cities. This is entirely an artifact of how the municipal boundaries are drawn. In every meaningful way, St. Louis is bigger. These rust-belt cities didn't "lose" as many people as you think. Those people just moved slightly out from the core across across arbitrary municipal borders.

2\. Second, because of how the city developed, most of region's poorest people live within those core-city boundaries, so the region appears much poorer than it really is, which generates a chorus of statements like, _" I'd move to the Midwest, but there are no jobs."_ The region's median household income is $62,790. It's $78,478 in NYC. Do you think the cost of living difference between the two is only $16k per year? It most definitely is not.

3\. Related to the second point: because nearly all the violent crime in St. Louis occurs in a handful of neighborhoods in the core city and because most of the region is not included in those statistics, the region also appears much more dangerous than it actually is. The crime in those neighborhoods is a tragedy and a serious problem, but the way we do the statistical accounting makes the region appear to be much more dangerous than other regions that more or less have the exact same crime patterns. You are not less safe in most parts of St. Louis than in other similarly-sized metros.

This country is full of people who are discounting places they'd likely be very happy living in. The antidote is to always normalize regional comparisons. You can use MSAs or urban agglomerations or whatever floats your boat. But what you should basically never use are political designations, which are arbitrary, historically-contingent, and generally not very useful.

</comment></comment></comment><comment><USER7> Articles like this are an extremely strong buy signal for anyone wanting to get a house or condo. For renters, it is a good chance to get a rent cram down on your rent control unit, or move to a larger and cheaper unit.

For those wanting to start a business, it is also a good time to sign a deal on a good lease in an excellent location. Any entrepreneur will have to think ahead about when revenue will recover, depending on the business.

I say this because this is a boom and bust city. Earthquakes , gold, 9/11, fires, finance bubbles, tech bubblies -- each time San Francisco has recovered from the ashes stronger, and those that invested, richer.

<comment><USER8> The investment angle is definitely one way of selling it. As a native resident, I have been around just long enough to fully grasp the boom-bust cycle and what it means in a broader sense. The city is in wildfire season, and will again rise from the ashes. Just give it a few years to start recovery in earnest. For now the streets are emptier, and a little less safe.

Our last boom, for all the downsides of gentrification and transience that it wrought, added another layer of cosmopolitan influences which has helped defuse old local tensions. While the local leadership isn't doing everything right(as we'd expect), they aren't actively moving in the wrong direction either - they are working reasonably quickly to address and attempt solutions for each crisis as it comes up, and indeed, the crises of 2020 have been hugely transformative for the city already, leading to a whole new set of traffic and transit policies, reforms in law enforcement policy, and more. It won't be long before the officials have to start choosing between making cuts to essentials and throwing out old pork constituents, and they have a riled up, locked down population watching every move.

The only thing I'm truly concerned about is the state and national situations falling into the kinds of scenarios Robert Evans depicts in "It Could Happen Here".</comment></comment>


Caddy – a modern web server (vs. Nginx) - <AUTHOR> https://medium.com/@n1try/caddy-a-modern-web-server-vs-nginx-e9e4abc443e <comment><USER2> Shortcomings of the article aside, I'd like to say that I use Caddy for a set of small websites and I couldn't really be happier with it.

I'm a longtime Windows developer who doesn't have much patience with nerdy complexities. I started in 1996 with a buggy, gawd-awful Netscape webserver, moved to the late-lamented O'Reilly WebSite (even had a T-Shirt) and reluctantly settled on MS IIS, with occasional Apache encounters. Caddy has been an absolute breath of fresh air.

I currently run 4 sites from a system at my home, using Namecheap dynamic DNS. Caddy serves the basic web pages and static content and also reverse proxies to an internal Python server for dynamic content. Sounds a little complicated, but believe me, configuration is dead-simple thanks to Caddy. Plus I get full HTTPS from Let's Encrypt for the cost of supplying my email address and agreeing to a EULA - no configuration needed at all.

I've never used a webserver that was easier to configure or had such low resource requirements.

<comment><USER3> >I'm a longtime Windows developer who doesn't have much patience with nerdy complexities.

That is funny because I have setup Apache, Nginx, and IIS web servers before and by far the one I found to have the most nerdy complexities is IIS.

<comment><USER4> I think it's often easier because most of the nerdy complexities are via a GUI... though the web.config offers a lot more in more recent versions. And adding in Application Request Routing (reverse-proxy) and the like can get complicated quickly, it's not nearly as bad as either nginx or apache tend to be. I do like what nginx can do combined with lua though, it's pretty damned cool.

All in all, I do like Caddy's defaults and out of the box for newer tech. I haven't really tried it much, mostly out of complacency with nginx/iis in Linux/windows. And I will definitely never run Apache on a new box again.

<comment><USER2> I agree with both posts above me. While I normally prefer a GUI configuration facility, I wouldn't make the argument that IIS is particularly simpler than Apache.

Getting back to Caddy, configuration is so simple, a GUI would be overkill.

Here's an (entire) example of how to configure a reverse proxy in Caddy...

      proxy / 127.0.0.1:8080 {
        except /favicon.ico /robots.txt /assets /plainpages /staticstuff /test1
        proxy_header X-Forwarded-Proto {scheme}
      }

The "except" line is a list of files and directories that are statically served by Caddy.

All other content comes from a local server on port 8080.

The "proxy_header" line lets the 2nd server know when contents are being sent as secured (HTTPS)

Isn't that nice? I think so.

<comment><USER5> I think you want header_upstream instead of proxy_header, at least in newer versions of Caddy, and the transparent[0] preset sets Host, X-Forwarded-For, and X-Forwarded-Proto for you!

      proxy / 127.0.0.1:8080 {
        except /favicon.ico /robots.txt /assets /plainpages /staticstuff /test1
        transparent
      }

0\. [https://caddyserver.com/docs/proxy](https://caddyserver.com/docs/proxy)

<comment><USER2> Thanks! I didn't notice _transparent_. I added the _proxy_header_ based on documented requirements of the 2nd server.

</comment></comment></comment></comment></comment></comment><comment><USER3> >The configuration is not that intuitive and you really need to get into the syntax and concepts to get an understanding of knobs to turn in order to achieve a certain goal.

Personally I found Nginx configuration much simpler than Apache. I think Nginx is pretty intuitive, it certainly is much supplier than IIS, which is a nightmare.

</comment><comment><USER6> > every middleware you want to use needs to be included into the binary and if > it's not, you need to re-compile the program

Having to recompile to add functionality that alternatives provide as dynamically loaded plugins is insane. This is 2017. Linux has had loadable _kernel_ modules since 1995, and I worked on them for other versions of UNIX as far back as 1991. I understand that it's hard for a Go program to support plugins written in other languages using a more conventional runtime. No problem there. However, there's just no excuse for relying on recompilation instead of dynamically loading modules also written in Go and thus using the same runtime. I really want to like Go, but as long as the Go community clings to long-discredited ideas regarding things like packaging and distribution and symbol versioning I just don't feel like I can depend on it to build infrastructure that will remain robust over time.

<comment><USER7> One of the advantages of Caddy is its purely static binaries. You don't even need libc to run Caddy, and that goes for any platform. The dynamic loading of plugins is at odds against this advantage.

> However, there's just no excuse for relying on recompilation instead of > dynamically loading modules also written in Go and thus using the same > runtime.

Actually there is.

Go plugins are something we're looking at, but it's complicated and the technology is currently immature. Please read this forum thread in full: [https://forum.caddyserver.com/t/go-1-8-plugin- model/934?u=ma...](https://forum.caddyserver.com/t/go-1-8-plugin- model/934?u=matt)

<comment><USER8> Why is this seen as a benefit? If a severe security issue is found in libc, I have to recompile all software to take advantage of it? Who thought that was a good idea?

<comment><USER9> AFAIK, Go doesn't use libc.

Anyway, it is still a problem if you encounter a bug in any dependencie: you have to recompile every application using it.

</comment></comment></comment></comment><comment><USER5> I've been experimenting with Caddy over the past few days and it's great, if somewhat immature and quirky. The plugin ecosystem is rich but in dire need of some oversight and QC. What I like most about Caddy is its very sane behavior out of the box: it just does the right thing in most cases, and requires much less configuration than NGINX, Apache, HAProxy, etc. (It also has fewer features, so there's a trade-off.)

I posted a gist[0] with my Caddy+Varnish+PHP-FPM configuration and a README explaining the hows and whys. I'm moving a bunch of WordPress sites from Apache/mod_php to this configuration (each site's PHP-FPM instance is Dockerized, but that's out of the scope of the gist). Hopefully someone finds it helpful!

0\. [https://gist.github.com/mwpastore/f42f6f1309a7b067519f4c08e1...](https://gist.github.com/mwpastore/f42f6f1309a7b067519f4c08e18b0b6a)

</comment><comment><USER10> I like caddy, but the dreamhost benchmark re apache vs nginx isn't really telling, as it doesn't mention fundamental apache config properties. I'm assuming they were benchmarking an unoptimized MPM/prefork setup, but you can use event-based request processing (and other process models) with apache as well. There's nothing magical with nginx.

I'd also like to see a benchmark vs. H2O which seems to have the most advanced HTTP/2 support right now (its running the nghttp2 web site for some time now).

<comment><USER11> Any experiences with running h2o on production sites? The documentation is a bit lacking sometimes, luckily the code is well written.

<comment><USER10> No experience with h2o yet. I'm not keen on having to pickup Ruby which would be just one more thing to take care of for me.

<comment><USER11> The code is mainly written in C ([https://github.com/h2o/h2o](https://github.com/h2o/h2o)) with some Perl testing. The Mruby for small (header/push) logic isn't that bad, and not bad in terms of performance either ([https://h2o.examp1e.net/configure/mruby.html](https://h2o.examp1e.net/configure/mruby.html)), although I'm also not a Ruby fan.

</comment></comment></comment></comment><comment><USER12> Some of your links to [https://caddyserver.com/](https://caddyserver.com/) are relative and not absolute, leading me to [https://ferdinand- muetsch.de/caddyserver.com](https://ferdinand-muetsch.de/caddyserver.com) \- Something you should consider fixing.

All in all however, I like the look of Caddy. The best bit I feel has been left out though:

"That is why, effective this release, Caddy will automatically serve all live sites over HTTPS without user intervention."

Which I think is just brilliant.

<comment><AUTHOR> Thanks for that hint, I fixed the link! I think I mentioned that HTTPS is on by default, didn't I? But anyway, yes it's very useful and a good practice.

</comment></comment><comment><USER13> > You don't need to run any script. You don't even need to create a Let's > Encrypt account or install the certbot.

How is this done? Ie, to not need any account and still get new/valid certs.

And, on that note, what is the difference between having an account and not? Eg, how might using no accounts harm a production environment?

Just trying to wrap my head around that. Really cool UX for side stuff!

 __edit __: Ah, looks like there is an account involved - it creates one, possibly using your email address. This makes more sense now.

<comment><AUTHOR> Yes, right. Maybe I should've mentioned that. But I didn't want to talk to much about the certs.

</comment></comment><comment><USER14> I like caddy and I use in inside of docker for my private home/cloud setup but lately I've been rethinking even that. I agree it's almost magical in how easy it is to setup (especially with HTTPS) but I use nginx for serious projects and a large part of me says it's better to use the same thing everywhere to keep me up to date and aware of potential issues or features and not mix the two.

</comment><comment><USER15> The graph is marked as 'Apache2 vs. nginx memory usage ' but that's not what it shows at all - it's 'Requests per second on Apachev2 vs nginx' \- did you mean to show [https://objects-us- west-1.dream.io/kbimages/images/Webserver...](https://objects-us- west-1.dream.io/kbimages/images/Webserver_memory_graph.jpg) instead?

<comment><USER15> Also, this article is really odd. It starts with a performance based analysis comparison of a bunch of web servers, and then decides to add a third completely unknown option, and then decides it's better, based on it's configuration being 'better' (in a way that's not shown), despite it's performance being ~ 1/3 of the competitor....

<comment><USER16> And there's no comparison of what he was using for NGINX config vs the Caddy config. He simply states that Caddy is easier to use with little acknowledgment of what the config would actually look like.

Googling around for a Caddy file[0], it looks fairly similar, and not so much easier or harder to configure or understand that NGINX config.

[0] [https://caddyserver.com/docs/caddyfile](https://caddyserver.com/docs/caddyfile)

<comment><USER7> Indeed, in some of my own benchmarks, Caddy performed better than nginx in recent versions of Go. (Using "out of the box" configurations, anyway.) I know tuning is possible, as it is with Caddy depending on your situation. There are so many dimensions to performance of a web server, though, and I don't give much weight to benchmarks. [https://gist.github.com/mholt/3f613740ceb417bf63fa](https://gist.github.com/mholt/3f613740ceb417bf63fa)

</comment></comment></comment></comment><comment><USER17> This looks awesome. I'd switch away in a heartbeat if the Let's Encrypt integration could handle multi-server deployments.

</comment><comment><USER18> Does Caddy support client certificates?

<comment><USER7> Yes. [https://caddyserver.com/docs/tls](https://caddyserver.com/docs/tls)

<comment><USER18> Is the certificate or its parameters (subject/issuer/alt names/etc) available to set downstream headers (for proxy/fastcgi)? I'm sure I'm missing it, but can't see anything like that in the docs. Or is this something that is more suitable for a plugin?

<comment><USER7> I'm not sure I understand the question. You want a TLS certificate to set HTTP headers?

<comment><USER18> Yes - X.509 client certificates are the authentication mechanism (TLS mutual authentication). How this generally works with other HTTP servers (i.e. nginx) is the proxy validates that the client's certificate are issued by a given authority and valid/not revoked, then injects headers with the certificate subject or other certificate fields (commonly a UPN in the subject alternative name) to tell the proxied application the identity of the user. nginx's TLS implementation populates variables with the various client certificate variables for use elsewhere (the $ssl_client* variables here: [http://nginx.org/en/docs/http/ngx_http_ssl_module.html#varia...](http://nginx.org/en/docs/http/ngx_http_ssl_module.html#variables) )

In other cases, the entire client certificate is injected into a header (in PEM format) for the downstream application to process as it pleases.

This is a common use case in US Government since everyone carries X.509 certificates around their neck (ID badge is also a PIV smartcard). US Government usually implements this with F5 BIG-IP appliances but I usually use nginx.</comment></comment></comment></comment></comment>


I comercialized a personalized app I wrote for myself. Here's the writeup - <AUTHOR> https://medium.com/@chewxy/why-and-how-we-made-squatcoach-bb29c4482e32

<comment><USER2> "I had religiously read /r/fitness and /r/formcheck, so I had a fairly good idea of what good form is."

You got to be kidding ...

<comment><AUTHOR> well, the advice there could be generalized into a concept of "good form"...

I tried an approach mining the data from those two subreddits. That was a waste of time.</comment></comment>


Telnet isn't the problem - <AUTHOR> http://chasechristian.com/155/tech/telnet-isnt-the-problem/

<comment><USER2> Point by point. 1\. Gentoo ships without telnet, and I call this good. And RedHat is probably the most respected OS around. I sure do have a problem with Ubuntu including telnet; kudos to MS for leading the way.

2\. So get rid of FTP too, you'll get no argument from me on that point. HTTP is harder to do without, but at least it doesn't send passwords in the clear. Is the argument here meant to be "parts of the internet are still insecure, so there's no point trying to be secure"?

3\. Irrelevant

4\. Rarely. Telnet is not designed as a network testing tool, and there are better tools available for that use case. More to the point, anyone competent to use telnet knows where to find it. A tool that requires the user to be aware of the risks should not be in the default install.

<comment><AUTHOR> 1\. While RedHat is respected, Ubuntu is very widely deployed as well and is the most common distro that I run into (in my own limited experience).

2\. My point for 2 is that not all traffic needs to be encrypted. If there's no confidential or private data, why waste the CPU cycles?

3\. I disagree. Having telnet available by default does not open any new attack vectors.

4\. Telnet may not be designed for it, but that's how it's widely used. SMTP and port troubleshooting have been done with telnet for years, and quite successfully. I think there needs to be a balance between availability and protecting the user, and on a server OS, that line should probably lean towards availability since an advanced user is assumed. By your reasoning, the 'del' command shouldn't be available by default because an unassuming user might delete an important file.

<comment><USER2> 2\. Telnet is, fundamentally, a remote login protocol; it's been bodged into doing other things, but that's its primary purpose, and it should be obvious why that needs encryption.

And you're seriously worried about wasting cycles on encryption? Did I accidentally step through a timewarp to 1970?

3\. Telnet being available opens the attack vector of "user uses telnet to log into a remote system, transmitting credentials in the clear". That's a big enough vulnerability that the fact it doesn't introduce any other ones is really beside the point.

4\. Telnet isn't just a program that _can_ be used to do something unfortunate. It's a program that does something unfortunate by default, if you try to use it in the obvious way for the purpose for which it is designed. It's a gun that comes with the barrel pointing out the bottom of the handle.

And I really don't see any decent use cases for it. There are better tools for network testing, and better tools for remote login. It's time for it to die.

<comment><AUTHOR> I disagree that telnet is fundamentally a remote login protocol. In fact, telnet has no login parameters built-in at all, like SSH does. Telnet is simply a TCP communication program, any login functions are part of the remote telnet daemon and have nothing to do with the local telnet client. Telnet is a networking tool first and foremost, and the login portion is what has been added on.

</comment></comment></comment></comment><comment><USER3> I have to agree with this. The main use I have for telnet is checking that I can get access to an outside host:port from a locked down box I can't install anything on that is behind a firewall.

For example: "Hey, program N is having trouble connecting to XX.XX.XX.XX:YYYY, what's going on?" A ping and a quick check of "telnet XX.XX.XX.XX:YYYY" is very valuable when seeing if it's a firewall issue or something to check in the application.

Is there a replacement application I could use in the default install of windows to do the same thing? I really just need to verify I can get a TCP connection established to an outside address and port.

</comment><comment><USER4> Right like I'm going to fire up an ssh session to an external lox and then run nmap to check for an open port on a remote server? Oh wait, I'll need putty. oh wait, I can't get out because my firewall has issues, ports are messy. Hmm should I find a way to get putty and different net connection to where I want? No instead now, I'm taking another 5 minutes to get telnet installed on the server. I guess the arguement that it will be more productive in the long term to get ssh going is valid but I prefer the simplicity and speed of running up telnet.

<comment><USER4> And for that matter if your answer is powershell then go ahead and type up this script in notepad and save it as a ps1, then configure powershell to run code while I telnet

:: powershell script try { $tcp=new-object System.Net.Sockets.TcpClient $tcp.connect("localhost",25) $tcp.close() } catch { "Exception occured" }</comment></comment>