New Relic drops host-based pricing, adds everything to free plan - <AUTHOR> https://blog.newrelic.com/product-news/new-relic-one-observability-made-simple/ <comment><AUTHOR> New Relic changed their pricing model significantly this morning, now charging for seats (first user is free) with 100GB data ingest, thereafter $0.25/GB.</comment>


Stop Buying Things and Start Borrowing Them - <AUTHOR> https://www.makechange.aspiration.com/articles/2016/11/23/this-former-accountant-wants-you-to-stop-buying-things-and-start-borrowing-them <comment><USER2> I pay to be a member of the local maker space. But they have a lot of equipment I would never dream of buying (like a plasma cutter and later cutter) and some that I could buy but rather wouldn't (like a 3d printer and a bench oscilloscope).

But members break the tools all the time and don't take responsibility for it. Even though there are cameras and people have to swipe their card at the door it still happens.

I think one reason sharing is not as common is because people are jerks.

I remember when I was a kid we used to borrow each other's NES games all the time and never give them back.

<comment><USER3> Or it is because some people are assholes.

I broke a viscometer at work because I dropped something like 2 cm since I'm a clutz. I tried fixing it and rechecking the equipment but to not success. Now, we a big company with tons of money so this should be no big deal.

We call in the vendor and they spend 4 hours fixing it and we spend 10k.

Well, I get bitched out by 4 people on separate occasion as and constantly reminded after repeatedly apologizing and coming forth about my mistake.

That is why people dont come forward. Accidents happen but some people act like it was intentional assholeness.

I couldn't stop apologizing and feeling bad for a tiny slip of hand. But I was crucified and almost lost my job for something that took a 4 hour visit from the vendor.

People would come forward when things break if people had better managerial, parenting, and conflict resolution skills.

<comment><USER4> That's an interesting perspective. It made me realize, I don't like admitting I screwed up, if I can fix it before anyone finds out!

<comment><USER5> If you have a maker space you better have a budget for repairs and somehow include this in the fees.

Things will break as people learn how to create. Part of the journey.

If you shout at them they'll probably lose interest.

My rule is "borrow to try, buy if you're serious about it"

</comment></comment></comment></comment><comment><USER6> Fifty years ago, you would have just knocked on your neighbour's door or asked the guys at bowling night. Wanting to borrow a drill or a tent isn't new; not knowing anyone to borrow it from is a peculiarly modern affliction.

I applaud any effort to rebuild our fractured society.

<comment><USER7> The problem is, that you have to move for every new job. Our parents and grandparents lived in the same very spot for decades.

<comment><USER8> You don't have to move for new jobs, you have to move for the kinds of jobs people on HN want.

<comment><USER2> Not necessarily true. I know people who have moved to get low paying jobs at retail stores because the closest place hiring unskilled labor would have been a several hours of driving every day.

Not so much any more, I think the market has improved. But still, most of the low to middle income people I know don't live in their home town any more because there simple aren't a lot of job in small town America so they go to cities.

<comment><USER9> Or just getting priced out of your apartment, that 2.5% raise can't hold up against 5% lease increase for long if you were already on the cusp of affordability.

</comment></comment></comment></comment></comment><comment><USER10> Thinking of this as a caching problem, there need to be hyperlocal borrowing like at the level of apartment buildings or city blocks. The 6-unit apartment building I live in has a shared area in the basement—power tools, a shop vac, brewing equipment, knife sharpener, pentalobe screwdrivers, a weedwhacker, a multimeter, etc.) This complements the tool lending library (which my city has) which furnishes lower frequency needs. The hyperlocal thing is also a nice way to meet your neighbors (oh wow you also have a lot of pentalobe screwdrivers!) and share skills (I just learned how to fertilize houseplants).

For higher value items, I've been meaning to extend the above apartment-wide setup with a Google Doc inventory of things that people are willing to share, but want where participants want face-to-face confirmation, like loaning a camera or a mountain bike. I wish there were a way (a social institution moreso than a technical solution) to make quick contracts for borrowing things. I'm privileged enough to be able to replace minor things, but I am definitely relucatant to loan big things if I don't know if a friend can/would replace the thing if something bad happened on their watch. And no I don't want to rent them—I don't like the cognitive overhead of markets, and that's not the point.

<comment><USER11> This reminds me somewhat of a social conundrum I've been experiencing lately; the thing is, in some cases I love most of my neighbors, however there are always the few who won't/don't value communal items/space. The group of those residents who want to just live harmoniously with their neighbors outnumbers the subset of residents who care enough about the rules to confront those breaking them. The passive group vilifies and subjugates those who try to mention anything to bad actors abusing the space, because they feel it will only rock the boat, and the ones breaking the rules shout the loudest.

If this sounds oddly specific, that's because it is- In my community we have a communal pool for our apartment block of 10-15 units. In general, everyone gets along, but there do exist problems where self governance and trust have failed, as far as taking care of shared property. Those who just want to live peacefully are retreating into their homes, those who care enough to say anything have been dismissed by the tenant in question, labeled as racist, bigoted or otherwise are browbeaten by the more fearful tenants into not reporting the problems.

In our case, it is a swimming pool, and a struggle with a tenant and her friends who sit around the pool drinking alcohol loudly all day, never once leaving, who enter the shallow end of the pool about twice an hour for 10 seconds, swishing their hands in the water around their waist before they exit. There is a restroom in her apartment which is less than 20 feet from the pool; I'm not positive what's going on in those 10 seconds, but people like myself who's balconies overlook the pool are noting this, and nobody wants to swim anymore because of it. Any suggestions about just talking to the tenant elicit a gasp and dirty look from the pacifist crowd. How would you, dear reader, handle a delicate situation like this?

After realizing how futile any complaints would be, I've stopped swimming until I find the respectful and correct way to put a resolution on this.

This personal anecdote may have strayed from its target, but relating the situation to the void felt somewhat cathartic.

</comment></comment><comment><USER12> I do three things to cut consumption: borrow, rent, and "rent". "Rent" is buy high quality/high value, and resell for a significant fraction of retail when you are done with it. I learned it from a friend at work. She bought a Dell Deal high-end desktop with free monitor. She sold the monitor immediately, which covered most of her layout for the initial deal. Then, three years later, she sold the desktop for about 60% of retail. The items were being enjoyed by new owners, and she recovered the value she put into them.

<comment><USER13> The other option is to buy used items that strongly retain value, like camera lenses. Most of my glass is worth about the same as when I bought it from eBay, because there's nothing that really depreciates and good lenses are good lenses.

<comment><USER14> I only buy used cell phones. I have an S5 and Note 4 right now I got combined for half the cost of a new S8, and I got both in mint condition a year ago.

You really can't get away with that with laptops or desktops because the need for fans causes a lot of component wear and environments are so divergent you can't trust used sellers to not have a lot of the internals damaged. Or the keyboards and trackpads - heavy wear or use or just abuse and one damaged key can ruin a purchase.

Phones are nice and self contained enough that looking at the outside generally tells you the condition of the inside.

<comment><USER15> _You really can 't get away with that with laptops or desktops because the need for fans causes a lot of component wear and environments are so divergent you can't trust used sellers to not have a lot of the internals damaged._

I've had luck buying laptops (specifically Thinkpads) previously owned by companies and being replaced by lot. Probably due to a mix of better environment, better treatment by workers and more likely to get fixed if broken.

<comment><USER16> I'm also going to chime in and agree. Thinkpads are tanks; I've got a collection of about 8 running either Ubuntu or Windows 10 that just won't die, and are fine for browsing.

<comment><USER17> Even the newer ones that are on par with mac laptops are solid. The carbon is as thin and actually much lighter, and still feels really sturdy.

</comment></comment></comment></comment></comment></comment><comment><USER18> Possessions-as-a-Service? No, can't see it taking off.

In all seriousness, as others have noted, I see this as a rather damning comment on how badly human contact is getting abstracted away to businesses more and more. It's rather sad that people no longer feel able to just talk to others without some organisation to mediate.

<comment><USER19> What about things that aren't owned by anyone in your social group, and are too expensive/rarely used to justify buying yourself? Say the chocolate fountain: no one really needs it bad enough to buy one, but if you can sell access to one for some small fraction of that cost it could become a reasonable expense. A similar logic can be applied to a table saw, or to a dremel, or to a soldering iron. This service removes circumstance and adds reliability to borrowing.

And maybe it does reflect something sad about socialization today, but that doesn't mean it isn't useful or good.

<comment><USER20> There are rental places for that kind of thing. The chocolate fountain and table saw are good examples. But soldering iron? $15 on Amazon. Dremel is more but is actually a good example of a tool you'll find use for doing lots of things. (And you tend to chew up cutting discs etc. if you borrow so you'll probably need to buy parts in any case.)

</comment></comment></comment><comment><USER21> Hasn't the media been lamenting this exact behavior of millennials though? Houses would be bought previously, now more people are renting, vandwelling or just living with their parents. Less cars are being purchases because of people 'Ubering' everywhere. People rent more stuff thereby slowing down many industries. The future looks glum for many of them (especially the diamond industry)

Student loan was shown to be the primary deterrent. Of course what wasn't to blame was that the disparity between median wage and comfortable life is growing. Another thing they fail to attribute this to is that millennials are smarter, avoiding the spendthrift mistakes like large mortgages which tie them down to a place and make them paycheck away from homelessness.

source: Just google 'Millennials aren't buying <insert anything here>'

<comment><USER22> I tried this, and one of the top business insider articles has a similar perspective as your comment here, blaming the baby boomers.

[http://www.businessinsider.com/baby-boomers-caused- millennia...](http://www.businessinsider.com/baby-boomers-caused-millennials- destructive-spending-habits-2017-6)

<comment><USER21> (I kinda went offtopic but I think it is worth telling)

That article seems to be overreaching about what's 'killing' industries a little bit. The industry that's _really_ in trouble is the diamond industry. That industry wasn't mentioned anywhere except a tweet which was dismissed[1]

There are downsides (apart from being expensive of course) like forced labor in Botswana, etc. Even if they are specifically advertised as not Blood Diamonds, people just want to get away from that industry. Mossanite is an alternative that is getting popular.

This might seem like a very small thing to care about, but I'll say it has wide ranging ripple effects. Millions of people depend on the unreasonable margin that diamonds provide, ranging from specialists to the stores that litter every single town because of course, people _had_ to have a diamond shop. That was more important, than say, a blood bank. On first look, it might not seem economically feasible, but just the absurd lengths people go through to pay for that one diamond keeps the industry alive -- and thriving. Culture is the _only_ thing to blame (or thank)

On the flip side of the unemployment that will be caused in developed countries, you have to consider the sheer amount of labor that is put (or forced) in Africa. Because of the value of diamonds, many were forced into labor and that will hopefully go down.

[1]:[https://twitter.com/UweBollocks/status/748679268599758848](https://twitter.com/UweBollocks/status/748679268599758848) \- this tweet was embedded in the article. Shame that it wasn't talked about in detail

PS: I'd recommend the movie Blood Diamond

[http://www.imdb.com/title/tt0450259/](http://www.imdb.com/title/tt0450259/)

</comment></comment></comment><comment><USER23> And inflict myself transaction inefficiencies every time I want to do anything?

It's hard enough to get enough time to do something, imagine requiring that time to be in commercial hours, prefaced by a drive or walk somewhere, a talk with somebody, then postfaced by the same. And then you forgot something...

<comment><USER19> I imagine that for many people, that is far less expensive than needing to buy everything they might need once a year, find storage for it, and go get it/return it/ to that storage. It quite possibly this wouldn't be convenient for something like a set of wrenches which you might be able to buy outright, but for someone who needs them only once a year and has other things to borrow, this could be very reasonable.

</comment></comment><comment><USER24> I lived in a city that had a Tool Library; similar concept for tools.

I once lived out of two bags for 11 months. After living in a one bedroom apartment by myself for about a year, I was surprised just how much I had to sell, give away and git rid of. I even tried to keep in my head that I wasn't /really/ buying anything, but basically renting it until I took off again. I always tried to buy used or from thrift stores whenever possible.

[http://khanism.org/perspective/minimalism/](http://khanism.org/perspective/minimalism/)

[http://khanism.org/perspective/return-to- minimalism/](http://khanism.org/perspective/return-to-minimalism/)

</comment><comment><USER25> I wasn't aware that borrowing things wasn't a thing these days. I'm forever borrowing and lending things. Just yesterday I borrowed a hammer drill from a friend because it's ridiculous buying one to drill some holes for a curtain rail.

</comment><comment><USER26> This seems apt for very dense locations where the premium is on surface space. Unsure of how cultures might be willing to receive the idea, but given space constraints, the idea might gain traction in Tokyo or Amsterdam, Shanghai, Mumbai, etc.

Also take the idea to places where people aren't used to having and owning these possessions --get them while it's still a nascent idea.

</comment><comment><USER27> Remember you can always "rent" things from craigslist if you're fine with spending the time hitting "relist" for a few weeks while you wait for someone to buy it.

I'm currently doing this with a car for my visiting son. Too young to rent for but not a big deal to buy an old car for 2 months and sell it when he leaves. Basically paid the registration fee for 2 months + gas which is $300 for a 2 month rental. Then the "fun" (which it is to some people) of dealing with cragistlist crazies while selling it. I actually enjoy dealing with the flakes, putting myself in their shoes and getting practice negotiating.

<comment><USER28> I do wonder if this is not the happy medium.

If someone wants to borrow my spanner for a few days perhaps I'll just sell it to them for the replacement price with the guarantee that I'll buy it back from them if it is returned in the same condition it was sold.

<comment><USER29> In finance those types of contracts are called swaps. So there is a precedent :)

</comment></comment></comment><comment><USER30> Isn't this what the "shared economy" is about?

Still, I find it interesting that he managed to raise $30k on IndieGoGo. It signals that people care about those ideas/ideals.

<comment><USER31> No, the shared economy is about corporations paying for peoples' time as piece-work, while avoiding or minimizing tax, benefit and liability expenses.

</comment></comment><comment><USER32> I've come to the conclusion that the only reason new baby equipment is ever sold is due to baby showers. There's an extremely liquid market for this stuff since it spends less than a year with each owner.

<comment><USER33> I saw this the other day [http://www.bbc.co.uk/news/av/magazine-40190007/the- woman-who...](http://www.bbc.co.uk/news/av/magazine-40190007/the-woman-who- wants-you-to-rent-used-baby-clothes)

It makes sense, I don't have children so I don't know if $55 a month is expensive or not.

<comment><USER32> Seems more expensive than the alternatives, but that depends how much time it takes to seek out used clothes via friends, mothers groups, thrift stores. If that is time consuming for you then it might be worth it.

</comment></comment></comment><comment><USER34> I'm fortunate that I actually know my neighbors, we bbq, and we do favors and borrow each other's stuff all the time. This sort of community seems to be getting rare. I like the idea of the 'library of things' but feel like I'd might implement it as a P2P borrowing app to encourage people to talk to their neighbors.

The problem is that people aren't 'settling down' and instead are frequently moving around for work. This makes it hard to build up communities with the people around you. Your work becomes your 'stand-in' community - which has it's disadvantages. This has ramifications for health and happiness far beyond borrowing stuff. The studies that show people living longest aren't correlated with western health care or even good diet - it's the strength of their bond with their community.

</comment><comment><USER35> I tend to find that I can't trust those who borrow my things to actually care for my things. They come back absolutely broken.

<comment><USER36> this is why you lend your fixer-upper tools (say, the first chainsaw / drill you bought), and keep the good stuff for yourself.

</comment></comment><comment><USER37> I love this overall concept. In LA a startup launched last year that will not only rent you the random stuff you don't need to buy, but they actually drop it off & pick it back up from you (www.joymode.com). They organize it all by experiences (ie not so much about tools) but instead here are things you need for backyard movie night, or camping, or pasta making etc. I'm a big fan of owning fewer things... frees people up to move more easily (not being able to move homes is huge cause of under-employment).

</comment><comment><USER38> We still live in an ownership society AFAIK. Owning your own home, car, the vast majority of products you use pays. Owning multiples of each pays even more. The parts of society where this isn't true is media, and it's a shame.

You should buy what you need with the rights you're entitled to, and figure out the difference between what you need and what you really don't.

<comment><USER39> Someone with a username matching a fairly fancy car manufacturer would think that, wouldn't they? :-)

I _so_ don't miss owning a car. If you don't need a car for daily commute then taxis and renting is much much cheaper for when you do need a car.

And it's not just the money. The life drain of owning a car is a big cost.

If I lived in Houston I'd reluctantly own a car though.

<comment><USER40> Do you have any children?

I owned cars from my 18th birthday and a significant amount of my earnings went into them. Now that I am closer to 40 than to 30 and living at a place that can actually provide me with a decent public transport I can see myself not owning a car but the thing is that I have a kid and really don't want to tell my wife and my daughter that we have to go on a bus or wait for a cab to go to the nearby lake for a nice relaxing Sunday afternoon. Also I lease a car for around 200 GBP per month which is less than what I would pay for public transport. With those 200 GBP per month and for a three year lease tires and maintenance are included. What's not to like?

<comment><USER39> 200 GBP a month is a lot of Ubering. That can be like 5-10 hours in a cab per month (depending on trip lengths). And on top of that you don't need to pay for fuel, insurance, parking, mechanic, cleaning, MOT, etc... etc... (ok, so you mentioned "maintenance included", so that's a pretty sweet deal, actually. still not worth it and you're not comparing apples to apples)

What's your total cost that you should compare to? 600 GBP a month maybe? 700? (maybe with your deal only double the number you said)

I'd rather have "wait for uber" over "searching for parking spot" any day. Or I rent a zipcar. You could rent a zipcar every weekend and it'd still be cheaper than owning a car.

But no, I'm not in your position, and there are things you don't mention that I know about, like child car seats, that has made a friend of mine keep his car.

</comment></comment></comment></comment><comment><USER41> My local public library has a Makerspace[0] with 3D printers, recording studios, plus a bunch of other stuff. I haven't checked it out yet, but it seems like every time I visit the web site there is something new. Plus they're renovating (right now the building has been stripped all the way down to its concrete structure) the main branch of the library, it looks like the renovation will have a pretty big section for the Makerspace. Access is available to library members, and membership is free for Edmonton residents so there's virtually no barriers to entry.

There's also the Edmonton New Technology Society[1], which was the original Makerspace in Edmonton. Unfortunately for me, the location means that I'm unable to visit regularly.

[0] [https://www.epl.ca/browse_program/makerspace/](https://www.epl.ca/browse_program/makerspace/)

[1] [https://ents.ca/](https://ents.ca/)

</comment><comment><USER42> "Access-to not ownership-of" VS "The tragedy of the commons"

It's as eternal and essential balance as CPU vs MEMORY.

</comment><comment><USER43> Now that our local Home Depot does tool rental, I have in that a good option for many tools that I rarely use. But even then you have to be strategic. I rented a gas-powered masonary saw. The cost to rent the blade was just half the cost of buying a new one - so I bought the blade to use with my rented saw. Will be using it again a third time soon.

I did grow up on the phrase "he who dies with the most tools wins", so it's taken me some time to transition to rent/loan. But I've got so many tools and supplies now, and I've reached a point in my life where I'd like to do more and own less, and all those tools are now somewhat a burden. I bet I'm not alone and that these tool libraries could probably get a lot of high quality donations.

</comment><comment><USER44> My coworker is one of those guys who is an old man before his time. He loves scotch and working with tools. Sadly, he lives in a small apartment, so he doesn't have a real workspace. I've offered to let him come over for some tool time. We will see if he bites.

</comment><comment><USER45> It's not sharing or borrowing if you pay for it; it's called renting.

</comment><comment><USER46> There's a shop like this in Berlin called Leila (for Leihladen). I very much hope that this idea takes off. Ideally this would not have to be a private enterprise, but could be an extension of the public library systems like it is done in some places in Finland: [http://finland.fi/life-society/finnish- libraries-offer-new-a...](http://finland.fi/life-society/finnish-libraries- offer-new-adventures/)

</comment><comment><USER47> Moving is definitely an issue here; lugging 10+kilos of tools across voltages and miles is not a particularly enticing proposition. I had an awesome time with the community bike shops both in UW and in North Seattle; even built my current bike there :D Anywho, if you're in Seattle, please do consider helping these people out before their lease runs out in Oct.

[http://neseattletoollibrary.org/](http://neseattletoollibrary.org/)

</comment><comment><USER48> There are many tool rental outlets. The tool quality tends to stabilize at "almost broken", but they exist.

<comment><USER49> I looked into renting a table saw recently and I could basically buy a second hand one for less than what it would have cost to rent for a week.

<comment><USER50> Yup you can very often just buy the tool you need on CL use it for a weekend and sell it to the next person at pretty much the same price. I suppose this is actually a nice model as it forces you to not abuse the tool so you can still sell it for a good price.

</comment></comment></comment><comment><USER51> How does indemnification work in this case? Some of these tools could be dangerous for weekend warriors.

<comment><USER52> This is basically a rental service with a fixed yearly fee, so I guess they could draw up some sort of standard rental contract similar to the one that Home Depot uses. Maybe add some large ugly warning stickers, too.

<comment><USER53> How does that work for sleeping bags or chocolate fondue set?

Those are definitely two things I would _not_ borrow from anywhere.

<comment><USER20> Outdoor stores and the like rent sleeping bags all the time. Im sure you can rent something like a chocolate fountain from one of those party supply places. A basic fondue set (which you could probably rig up with what you have in a house) is likely too cheap to justify the overhead of renting. That is sort of the classic borrow from a neighbor if you can.

</comment></comment></comment></comment><comment><USER54> I love my local tool library. There are a lot of tools that I'll basically only ever use once. Instead of buying them and having them sit on the shelf, I can just check it out (for way less money) Annual membership is about what one cheap tool costs.

</comment><comment><USER55> At first glance, this seems silly and something that is unlikely to ever take off.

But feeling that way, at least initially, about a startup that becomes big often seems to share that characteristic.

</comment><comment><USER56> Only certain things can be borrowed, like one time use things. If it's long term, it's be a better investment to buy than to pay each time

</comment><comment><USER57> AI will make sharing like this easier, but at the same time it will make things cheaper.

People go camping in Hawaii, buy gear and give it way when they leave.

<comment><USER58> How does AI fit into that picture?

<comment><USER59> How else are you going to get funding?

</comment></comment></comment><comment><USER60> I had to enable javascript to read the article...

</comment><comment><USER61> The law of headlines applies to commands in headlines too, in my experience.

</comment><comment><USER62> I don't like to borrow things so go ask someone else!!

</comment><comment><USER63> Stop requiring JS and start serving HTML first.

</comment><comment><USER64> Shouldn't there be an app for that?

If I were to make such an app, how could I get a company to underwrite and provide insurance for these items?

<comment><USER42> No, it's a post saturated market. It's been tried again and again and failed every time.

<comment><USER64> But how does the INSURANCE POLICY work for it

<comment><USER42> Each item costs so little I don't think it would work very well.

</comment></comment></comment></comment><comment><USER65> A little off topic, but does anybody use Aspiration's products? What do you think of them?

</comment><comment><USER66> Naive question: isn't consumption key to economic growth?

<comment><USER66> Instead of downvoting maybe you can answer why it's wrong? I put "naive question" since I presume it's wrong and would like to be lectured.

</comment></comment><comment><USER67> stop titling articles like this...

</comment><comment><USER68> original article 0x"break"

HN article 31x"break"

nuf said.

</comment><comment><USER69> If this gets huge, how will it create net positive number of jobs?

<comment><USER70> Ideally I'd guess because people use less money, can make savings, can start companies/other useful activities.

<comment><USER61> People spending less money isn't good for the economy. It's a component of the downward spiral of recessions.

<comment><USER71> We aren't here to serve the economy.

<comment><USER61> The point in question was if it would create jobs.

</comment></comment></comment></comment></comment><comment><USER72> This is a great idea. Now, anyone have a strategy for how to get your wife to agree to it? haha.</comment>


McDonald's Intends to Raise Prices  - <AUTHOR> http://online.wsj.com/article/SB10001424052702304023804575565890871336672.html?mod=wsj_share_twitter

<comment><USER2> Pay more to make yourself sick.... Maybe we all should watch SuperSize me again.</comment>


Ask HN: what is the most expensive SaaS service you know? - <AUTHOR>

Hi,
simple question: what is the most expensive SaaS service you know?
Regards, Wiktor <comment><USER2> Bloomberg terminals. $24,000 a year for a single license.

<comment><AUTHOR> Interesting, thanks for the answer!</comment></comment>


BitTorrent Starts Cyberlocker/BitTorrent Hybrid, Without Limits - <AUTHOR> https://torrentfreak.com/bittorrent-starts-cloud-supported-file-sharing-service-without-limits-130215/

<comment><USER2> Sounds like the original version of Wuala.</comment>


So you think you know C? (2016) - <AUTHOR> https://wordsandbuttons.online/so_you_think_you_know_c.html <comment><USER2> Having written a conforming C compiler, at one point I knew everything there was to know about C (I forget details now and then, or confusing them with C++ and D).

But knowing every engineering detail is not the same thing as knowing how to program in C effectively. It's like being the engineer who designs a Grand Prix car. It does not mean you can drive it faster around the track than anyone else. Not even close.

For example, the C preprocessor is surprisingly complicated. I had to scrap it and rewrite it completely 3 times. If you try to make use of all those oddities, my advice is don't waste your time. Over time I removed all the C preprocessor tricks from my own code and just wrote ordinary C in its place. Much better.

<comment><USER3> I couldn't agree more. After spending many years working with LLVM, which is at its heart a C compiler, and understanding why it has to do the sometimes- terrifying things it has to do to get C to run well, I've become very paranoid when writing C or C++. My C/C++ code is as boring as possible.

(In fact I try to avoid writing C or C++ whenever possible these days; undefined behavior in the language is too pernicious and unfixable without breaking compatibility. I think both languages are approaching obsolescence.)

<comment><USER4> What would we write drivers in then if C was obsoleted?

<comment><USER5> pcwalton might have an opinion :). He is Rust lead designer.

<comment><USER3> Not lead designer :)

But yes, Rust, or even in userspace, as newer and/or more microkernel-ish OS's allow for. Apple is doing work to allow drivers to be written in Swift...

<comment><USER6> I believe DriverKit is still C++.

<comment><USER7> Just some parts of it.

Some device classes (not to mix with OOP ones) can only be programmed with C++, while others can be developed in any compiled language able to link to the OS APIs.

There is a WWDC session on it.

<comment><USER6> I watched it, and they're pretty clear that driver extensions (using DriverKit, like I mentioned) must be written in C or C++. System extensions can use any language.

<comment><USER7> I was thinking about whole driver feature set, so got it wrong.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> There are a few problems with the questionnaire. "I don't know" is pretty generic choice to be given/choosen.

Say for example, in question 5, the statement "return i++ + ++i;" is undefined, because the value of i is read and modified twice in a single sequence point (and of course, the order of addition is unspecified), which is not allowed in C. So the answer is "Undefined." (The explanation given in the page not accurate enough in terms of C)

And for question 1, the code is valid, but the result is not strictly defined. It depends on the implementation. So the answer is "Implementation defined."

The usage of "main()" hurts me, the strictly conforming way is to write it as "int main(void)" (or similar)

I feel like the questionnaire piss off people who really knows C.

<comment><USER9> > So the answer is "Undefined."

The code is undefined, but "I don't know." is still the correct answer for what happens to the variable.

<comment><USER8> > The code is undefined, but "I don't know." is still the correct answer for > what happens to the variable.

Well, then a better choice would be "I can't know."

<comment><USER10> Compile it, look at the assembly. You can know. The answer will vary from place to place, but it isn't non-existent.

<comment><USER11> With what compiler? Targeting what architecture? The question is underspecified. "I can't know" is correct.

<comment><USER12> Q: What is a leaky partial abstraction of the C standard?

Ans: A compiler.

</comment></comment></comment></comment></comment></comment><comment><USER13> I found it an amusing excrcise, if not terribly relevant, even as someone who spends 90% of his dev time in C.

What rubs me about these sorts of articles is they make some presumption about the importance and nessecisity of writing truely portable C, as if the "C Standard" were in and of itself a terribly useful tool. This is in contrast to where I live most of the time which is "GCC as an assembler macro language" (for a popular exposition on this subject see [https://raphlinus.github.io/programming/rust/2018/08/17/unde...](https://raphlinus.github.io/programming/rust/2018/08/17/undefined- behavior.html)). And yeah, reading through the problem set I was critiquing it in context of my shop's standards, where we might be packing and padding, using cacheline alignment, static assertions about sizeof things, specific integer types, etc. So these sorts of articles just come off as a little pendantic to folks like me. I don't doubt they're useful for some folks, and I guess it's interesting to come up from the depths of non-standard GNU extensions and march= flags to see what I take for granted.

<comment><USER14> It's very much worth reading, Linus Torvalds' opinion of standards that's linked in that article, but I'll link it again here: [https://lkml.org/lkml/2018/6/5/769](https://lkml.org/lkml/2018/6/5/769)

"So standards are not some kind of holy book that has to be revered. Standards too need to be questioned."

The way I see it, a lot of compiler writers are basically taking the standard as gospel and ignoring everything else "because the standard doesn't say we can't" \--- and that's a huge problem, because behaviour that the standard doesn't define often has a far more common-sense meaning that programmers expect. IMHO the onus should really be on the authors of compilers to find that reasonable meaning. In fact, the standard even suggests that one possible undefined behaviour is something like "behave in a manner characteristic of the environment" (can't remember nor be bothered looking up the standard.)

<comment><USER3> This is a common misconception. Compiler authors don't exploit undefined behavior to make themselves seem smart, or because they like breaking code. They exploit undefined behavior because somebody filed a bug saying some code was slow, and exploiting UB was the simplest way--or, in many cases, the _only_ way--to fix the performance problem.

GCC and Clang _do_ give you the option to avoid optimizations based on undefined behavior: compile at -O0. We think of the low-level nature of C as being good for optimization, but in many cases the C language as people expect it to work is at odds with fast code.

It's fascinating to actually dive into the specific instances of undefined behavior exploitation that get the most complaints. In each such case, there is virtually always a good reason for it. For example, treating signed overflow of integers as UB is important to avoid polluting perfectly ordinary loops with movsx instructions everywhere on x86-64. It's easy to see why compiler developers added these optimizations: someone filed a bug saying "hey, why is my loop full of movsx", and the developers fixed the problem.

Edit: Should be movsx instead of movzx, sorry.

<comment><USER15> Could you go into a little bit more detail regarding the movzx? Aren't 32-bit registers always zero-extended on x86-64?

<comment><USER3> Sure. Here's an in-depth explanation from Fabian Giesen: [https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759...](https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759de5a7)

<comment><USER15> Thanks, rygorous is always a great read - although sometimes a little overwhelming. If I got the gist of it, I have a small correction to your comment: the issue is about movsxd (sign extended integer indexes), not movzx (zero extension).

</comment></comment></comment></comment></comment></comment><comment><USER16> My score is 3/5.

One immediate redflag I have noticed is using "int", "char", "short" as if they have a definite size. They don't. C standard only guarantees a minimum size. For example, many PDPs are 36-bit. Assuming the size of a variable is a common practice nowadays, but at least one should use uint8_t, int32_t, etc. from stdint.h.

But I was still tricked, it should be obvious in hindsight, 12 years of schooling led me to think: If the author was asking these questions, at least one or two questions must be answerable (even if it's technically incorrect, but you'd better to guess the _original intention_ of a question). So I still tried to guess and got two wrong answers... Get to be careful next time...

<comment><USER17> In school, I was taught to choose the "best answer" on a test or quiz, and if you don't know something, choose the answer that looks right to you.

This test.. it reverses that entirely.

<comment><USER18> It is school that gets it wrong. In real life, knowing that you don't know something and acting accordingly is often way better than taking a guess.

</comment></comment></comment><comment><USER19> The third one has another implementation defined aspect. We do not know the value of a space ' ', in ascii it is 0x20(32) but that depends on the system, in EBCDIC it is 0x40(64).

</comment><comment><USER20> Discussed at the time: [https://news.ycombinator.com/item?id=12902304](https://news.ycombinator.com/item?id=12902304)

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

Similarly titled in 2012: [https://news.ycombinator.com/item?id=4657317](https://news.ycombinator.com/item?id=4657317)

and 2011: [https://news.ycombinator.com/item?id=3125891](https://news.ycombinator.com/item?id=3125891)

</comment><comment><USER21> Replacing "I don't know" with "this is undefined in the spec" or "this is implementation specific" would probably increase the pass rates.

</comment><comment><USER22> "I don't know" is not the right answer. I do know. I know the answer to be "Unspecified".

<comment><USER23> But you _don't_ know what it returns, because the behavior is either undefined or implementation defined, and you don't know the implementation.

<comment><USER24> But you _do_ know that it's undefined or implementation defined. It's a "known unknown".

<comment><USER25> Look, do you know what will it return or not?

<comment><USER6> Not without knowing the compiler, which I think was the point.

</comment></comment></comment></comment></comment><comment><USER26> I answered Idk to all. After the first two, the pattern became clear and I felt like if I wrote a compiler myself, the answers could be very different.

I've worked on 16 bit C code, 32 and now 64 bit code. So I knew that the behavior was implementation and optimization dependent. :)

Ignorance is bliss in C.

</comment><comment><USER27> I posted this in the embedded C-shop I work, under the comment that exactly in this place all should pass this test. Sadly only 1 in 5 passed the test (yours truly). Admittedly, this test was binary: either you pass or fail all of the questions (which is also sort of a give-away).

In the end this test proved to be a really valuable, because the "I don't know" drove the point home, specially for smart folks who don't like to answer _any_ test, ever, with "I don't know".

</comment><comment><USER28> 5/5 - but I came to Hacker News to procrastinate from the C parser I've been writing.

<comment><USER29> Wait, which of your projects needs a C parser?!

<comment><USER28> A new one

</comment></comment></comment><comment><USER30> Well, that's a copout. Of course, if you take absolutely any computer architecture, you can't assume simple things like sizeof(int) or data structure alignment. But if sizeof(int) is at 4 and data needs to be aligned by its own size - like on any real architecture relevant today - many of these questions have a deterministic answer. In practice, compiler bugs are a much bigger issue than architecture assumptions.

<comment><USER31> What's the latest compiler bug that caused a serious issue for you? (Genuinely interested, no sarcasm here.)

</comment></comment><comment><USER32> I failed on one, number 4. I bravely assumed 16 bit integers cannot exist. Can anyone name a concrete platform/compiler where int is/was 16 bit. Or is this just a theoretical option left open by the spec?

<comment><USER33> AVR, so certain Arduinos. On an Arduino Uno, sizeof(int) returns 2.

<comment><USER34> So does AVR's (ex?) competitor, PIC8. This comes from the documentation of Microchip's C18 compiler. [https://i.stack.imgur.com/1uV3l.jpg](https://i.stack.imgur.com/1uV3l.jpg)

</comment></comment></comment><comment><USER35> Sad to say I scored perfectly, due to a similar early disillusionment on embedded platforms, and years of pain porting code between 16- and 32-bit architectures when the author thought they knew the size of "int".

</comment><comment><USER36> At the end of the test, the author talks about automation programming for a nuclear power plant. I don't think I could ever sleep the same at night after writing something like that.

<comment><USER37> > I don't think I could ever sleep the same at night after writing something > like that

In these situations, you likely know your hardware and know your compiler, so you can actually provide an answer for 4 of the questions. The last one is a situation where someone should tell you not to get cute in the code review.

I wrote C in telecom and finance and in both places we enforced a rule: when you define a structure, put a comment after each element that says what you _think_ the structure offset should be, and at the end of the structure #define a constant that says what you think the size of the structure should be. In a code review, if anyone noticed something that didn't look right, you could talk about it. In testing, you could also check that sizeof(foo_s) == FOO_S_SIZE and fail if it wasn't.

In some of our code, we would test the size of various types and structures on startup and immediately exit if they weren't what we expected. We'd print type sizes to logs to help debugging if there was ever a problem. We were supporting a single code base that ran on big endian, little endian, X86, Itanium, SPARC, ARM. Compilers change, but automated tests of type and structure sizes catch things immediately.

It may sound like a lot of work, but it actually isn't at all. It also helps a lot with long-term maintainability.

<comment><USER38> > In some of our code, we would test the size of various types and structures > on startup

This is one of the things that C++ has actually improved a lot recently: doing this with static_assert is much nicer in terms of catching problems early... And yes, it's great for long-term maintainability.

<comment><USER39> C has had standardized static assert since the C11 spec was released. See [1] for instance.

[1]: [https://stackoverflow.com/a/7287341](https://stackoverflow.com/a/7287341)

<comment><USER6> I never thought I'd hear myself saying this, but that syntax is uglier than C++'s.

</comment></comment></comment></comment></comment><comment><USER40> I scored perfectly. I've been programming in C since 1989, on various platforms (started with the Amiga, then VAX/VMS, Linux x86, and various embedded systems.)

</comment><comment><USER41> I emailed this to my boss telling him I got 0/5\. He just setup a 1:1 meeting first thing Monday AM.

<comment><USER42> Let us know how it goes...

</comment></comment><comment><USER43> C programer here. I try to never think assume I know C.

</comment><comment><USER44> If we're going to be --pedantic, shouldn't the author specify the exact standard of the C language under test? A lot of companies have varying implementations of C and perhaps some do specify some of the behavior at hand here.

<comment><USER6> Implementations of C≠C standards, though of course I'm sure some random obscure compiler has tried to call their C dialect a "standard" at some point.

</comment></comment><comment><USER45> The better wording would be D) not enough information to give a definitive answer. It's like the old gotchya question; what is 1+1 ? of course the answer is it depends on if you are using binary or a base of integer >2.

<comment><USER46> Yeah, or "undefined behaviour".

But that reminds me of the joke: there are 10 kinds of people: those who know binary, those who don't, and those who didn't know the '10' was written in base 3.

</comment></comment><comment><USER47> 4/5 I tricked myself into thinking I could figure out the last one....oops.

</comment><comment><USER48> Isn't there a more fundamental flaw in these questions? main() always returns an int, whether that's 4 or 8 bytes, 0 or 1 means success or failure depends on the implementation. here's a bit of a discussion [https://stackoverflow.com/questions/204476/what-should- main-...](https://stackoverflow.com/questions/204476/what-should-main-return- in-c-and-c)

Reminds me of the dumb exams some teachers would set to trick you when in school to make themselves feel superior.

<comment><USER49> What's wrong with it returning int here? They aren't using any variables bigger int, and the meaning of return codes is irrelevant.

</comment></comment><comment><USER50> > And at this point, I only have to apologize. The test is clearly provocative > and may even be a little offensive. I'm sorry if it causes any aggravation. > [...] It was a research project in nuclear power plant automation, where > absolutely no underspecification was tolerable.

I appreciate the apology here, and I can totally understand the concern about the spec in a safety critical environment.

Still, all questions on this test except the first are clearly examples of things you should never ever do in production code, which might undermine the message a bit? Yes, you can write bad code, and that's true in every language I've ever used.

I'm guessing it would be hard to find a modern compiler on Windows, Mac or Linux that produced padding other than rounding up to nearest 4 bytes?

Sizeof(a+b) is obviously a weird thing to do.

char a = ' ' * 13 produces an overflow warning in gcc.

(((((i >= i) << i) >> i) <= i)) I hope nobody really did that.

return i++ + ++i; Not doing exactly this was drilled into us in CS 101. Still, I'd be interested to hear about a compiler that doesn't return 1, since many people rely on the fact that ++i is pre-increment and i++ is post-increment. I don't doubt one is out there, I'm curious to know which.

There probably weren't much better choices 20 years ago... what would be the best choices today for a branch new nuclear power plant?

<comment><USER51> _Still, I'd be interested to hear about a compiler that doesn't return 1_

gcc (Ubuntu 8.3.0-6ubuntu1~18.10.1) 8.3.0 returns 2 (executes from left to right... at least the first time I ran it).

<comment><USER50> Wow, you're right. Me too on ubu 16. Okay, I guess it's not about pre or post increment. Maybe I should read the spec... ;) And good reason not to do this in code!

</comment></comment></comment><comment><USER52> But a code based on several standards, not only on C standard. For example we know, that basic source character sets should contain space (C11 5.2.1), we know that character constants has type "int" and that character constants represent value equal to the code of a symbol (C11 5.4.4). We know used source character set and we know code of the space character. We can configure specific source character set on the POSIX compatible systems. We know that return statement in the main function equivalent to the call to exit function (C11 188.8.131.52.3), we know that only 8 least significant bits will be used from returned value (POSIX.1-2001 definition of "exit"), we know that INT_MAX should be at least 32767 (C11 220.127.116.11.1) so we sure that the result that we got from "return" statement in the "main" function is positive integer from 0 to 512. Finally if we configure source character set to be sure that ' ' has code 32 we know for sure that we got value 416 in the specified example. So we know for sure answer on question 3 based on the C11, POSIX.1-2017, and ISO 646 standards.

<comment><USER29> I don't know if POSIX specifies CHAR_MAX, but on most systems, storing the value into a char will change the value, making it everything but 416: [https://tio.run/##S0oszvifnFiiYFeSWlyil6xgY@Pq7/Y/M69EITcxM0...](https://tio.run/##S0oszvifnFiiYFeSWlyil6xgY@Pq7/Y/M69EITcxM0@jLD8zRVOhmktBITkjsUghUcFWQR0ItRQMja2BgkWpJaVFeQqJ1ly1/4H6uLjSk5MVICZx6ekn6uWXlnClJmfkK6jY/wcA)

<comment><USER52> My mistake: We have (32*13) with minimal possible CHAR_BIT is 8. So it either 416 for char bigger then eight bits, or 160 for unsigned eight bits char, or -96 for signed eight bits char. Then it extended to the signed integer value (one of this three values), and then we got result as (int)(status & 0377). For all three cases result will be 160.

</comment></comment></comment><comment><USER53> This quiz wasn't illuminating at all. You generally start with assuming and validating a "C Datatype Model" i.e. ILP32/LP64 etc. for your system. Once you know that, these questions are easily answered.

If you want to see some real tricky C code, see some of the articles here: [https://locklessinc.com/articles/](https://locklessinc.com/articles/)

</comment><comment><USER54> OK you tricked me. But the test would have been better if the answer was "undefined behavior" instead of "I don't know".

<comment><USER55> Not all of them are undefined behavior

<comment><USER56> Sure, but "I don't know" makes it seem like you're just saying "pass", which, when you finish the test, is obviously not what it represents.

</comment></comment></comment><comment><USER57> The one that got me is this:

uint32_t foo = 1; foo <<= 32;

Here, I figured that foo would always be 0. Wrong. It was always 0 with GCC, but this is undefined in the spec and code like this can have a different value in clang. I actually had to make a security update to my little open source project because of this (although the code I wrote did not manifest the bug in an insecure way, even with clang).

</comment><comment><USER58> I don't know any c, so I answered "I don't know" on all the questions. Turns out I'm actually a C genius.

</comment><comment><USER59> > Eventually, I had to learn to rely on the standard instead of folklore; to > trust measurements and not presumptions...

Indeed, testing your assumptions, because even a defined standard may result in a differing implementation of it. Especially in critical applications, testing the expectations gives some sense of a defined behavior.

This quizz is amusing as a mental exercise and a parable, but in reality all of these cases had to be fleshed out on a real platform, with real compiler and ... specified expectations of the behavior.

None of the cases in fact communicate a clear intent, except maybe #1 to figure out the padded size, still it's somewhat open-ended. Perhaps returning a specific condition (return sizeof(struct ...)==5; ) would show a clear intent. Not that it would change the right answer, just such a case may indeed be true on a specific platform, compile flags erc.

<comment><USER59> Just to flesh this out, I put the puzzle code through gcc 6.3, on ideone

[https://ideone.com/PziSzq](https://ideone.com/PziSzq)

Result:

1:8 2:0 3:-96 4:1 5:2

Sure, there's a bunch of warnings emitted... fortunately.

</comment></comment><comment><USER60> Pro tip: avoid `int`s as much as possible in your C code. Use <stdint.h> defined macros instead.

<comment><USER6> There is a time and place for int32_t.

<comment><USER61> > There is a time and place for int32_t.

And time_t[0] is not one.

;-)

0 - [https://pubs.opengroup.org/onlinepubs/9699919799/functions/t...](https://pubs.opengroup.org/onlinepubs/9699919799/functions/time.html)

<comment><USER61> I guess that joke was hard to C.

</comment></comment></comment></comment><comment><USER62> I submitted a GitHub issue for the `main()` definitions and some other quibbles.

[https://github.com/akalenuk/wordsandbuttons/issues/12](https://github.com/akalenuk/wordsandbuttons/issues/12)

<comment><USER62> It's been corrected in the repo, but as I write this the web page has not been updated.

</comment></comment><comment><USER63> UB nasal demons etc etc.

But often we encounter UB in code that's already shipped. So it's good to have an intuition about what machine code was actually emitted, for example when deciding if a crash report is due to this particular UB, or not.

<comment><USER6> Or you could just look at the binary you shipped: by the time it's compiled, you don't really have to deal with undefined behavior.

</comment></comment><comment><USER64> 5/5, but I don't think this test is very good at capturing the more obscure features of C, they all just deal with the fact that platforms have different datatypes/alignment requirements, except for the last one. I think a better example would be the following:

      int a=1, b=2, i, j;
      i = a += 2, a + b;
      j = (a += 2, a + b);

Whats the value of a, b, i, j? Hint: i and j are different.

Which begs the question, why does C have those features in the first place? The only C code where it's reasonably common seems to be in crypto algorithms.

<comment><USER65> 5 and 7? If I remember the behavior of the comma operator correctly.

Anyway, I am inclined to agree that these are misfeatures. I'd almost certainly ask for it to be changed in code review.

</comment></comment><comment><USER66> I knew there was something up because long ago when developing for Arduino boards as part of a course, my mentor educated me on the difference of size of datatypes across different architectures.

</comment><comment><USER67> I scored 2, but mostly out of luck for being 100% sure only about the 1st question, as I encountered alignment problems a lot of times in the past when dealing with structures to be sent through the network, and also between different architectures (and sometimes endianess too). If memory serves, there are #pragma directives to force the compiler to align structure members to a given interval, but they're compiler dependent and would make a non portable piece of code even less portable.

</comment><comment><USER68> It is curious because, in each of the questions I encountered problems with the own questionnaire and I tended to answer in the way the writer thought.

And then you find "it's a trap".

I think the questionnaire is not honest enought, a better answer for D should have been: "we need more information" or "there are programming inconsistences"...

I thought that when selecting "I don't know" I was telling "I don't know what's happening with the code and the inner datails".

</comment><comment><USER69> I managed to answer all of the questions correctly; I recognized them as undefined. Still, there may be enough definition on the set of computers the program will run on, to do, in some cases (for example, that char is at least 8-bits, and/or that it is ASCII).

But the thing that would be better to do, in my opinion, may be like having LLVM with macros (including standard macros for dealing with differences of systems, and user-defined macros for your own use).

</comment><comment><USER70> There is a difference between "I don't know" and "undefined behaviour".

I know that most of this stuff is undefined according to the spec. But I (might) also know what my particular GCC version does in these cases.

What I know for sure, that those programs do output something, and it's not "I don't know" (the string) ; )

What I don't know, is what level of sophistication the author assumes.

</comment><comment><USER71> Funny. My first thought of question one is we'd need to make assumptions about which architecture we're working on to know this answer. By the time I got to question 3, I realized the author's trend. This is both the curse and blessing of C, a language that gives you just barely a high level translation layer over the raw silicon.

</comment><comment><USER45> It is not difficult to overcome these limitations of C by typedef definitive types like signed int32, unsigned int8 and so on. Many embedded C .h have that as a standard way of clearing things up. of course you can always sizeof(int) or whatever. (BTW this quiz or one like has been around a long time, but still a good reminder).

</comment><comment> nappy-doo The author's explanations of the first three answers aren't sufficient. There is no requirement within C for `int` and `char` to be different sizes. Similarly, you don't know what the resolution of ' '*13 will be. It's architecture dependent.

C, for all it's simplicity, is a relatively complex language.

</comment><comment><USER72> At least for the third question (char a = ' ' * 13;) XCode warns "Implicit conversion from 'int' to 'char' changes value from 416 to -96".

And for the fifth (return i++ + ++i;) it warns "Multiple unsequenced modifications to 'i'".

I would not skip those warnings.

</comment><comment><USER73> There is a minor error in the explanation for the third one: the minimum allowed value for CHAR_BIT in C is 8 (it does not affect the result, principally because the value of ' ' could be anything in the range of char).

<comment><USER74> That's the one where I wanted most to quibble with the "explanation" of why there is no set answer: To me, the top of the line answer is that the value of the string constant ' ' as an integer is implementation-defined (or maybe it depends on the execution environment? See, I'll get the precise wording wong too); anyway, space is 32 in ASCII but 64 in EBCDIC. The most you could say is that it's not zero (and maybe that it's not -1? I'd have to check how EOF is defined)..

</comment></comment><comment><USER75> My friend doesn't know how to code and got the whole questionnaire correct.

</comment><comment><USER76> Can't even make the test. Which version of C? Which platform? Under DOS in the 90's, the answer to the first question would have been 3, it's not even proposed in the options.

<comment><USER77> Each of the questions has exactly one answer that is correct regardless of version and platform.

<comment><USER76> It would be correct to answer that I don't have enough information to choose an option. It's incorrect to answer that I don't know.

<comment><USER77> No, but there are (at least) two interpretations of "I don't know." It's a nice little exercise in epistemology.

</comment></comment></comment></comment><comment><USER78> This must be the first time my lack of knowledge gave me full score.

</comment><comment><USER79> This is the language we still choose to trust our credit cards with.

<comment><USER53> I hope you were joking. This is just a "gotcha" quiz and not relevant at all.

<comment><USER79> I'm almost not. I made the point because this level of ambiguity and "do it yourself" is consistent throughout the language.

I know why we still use C, but the use of C is inherently prone to security problems.

C does not provide bounds checking by default, so it can be forgotten (Heartbleed) and the lack of either static checking, RAII or garbage collection (Not as a library e.g. Boehm) makes memory corruption all but inevitable.

<comment><USER53> People are forgetting that it is the very "looseness" of C that is responsible for its great success. The sheer volume of code in C (specifically, any number of complex and critical software) is a testament to that. People keep parroting the same old tired tropes about C without reflection and thought. All the problems, both real and imaginary, in the language have been worked through/around since the beginning by simple discipline, guidelines and external libraries. I am always annoyed when people bring up "memory corruption" as if it were some primordial sin. The power to manipulate raw memory in whatever way i want is so crucial that i am willing to live with the downside of possible corruption. In fact most of the people i have worked with and myself never found this to be so much of a problem as everybody else makes it out to be. We always followed good guidelines, had special libraries for memory allocation as needed and testing procedures to catch memory leaks. Everything worked out fine.

In conclusion, the power given to Programmers by C far outweighs any of its perceived downsides in real-world scenarios.

<comment><USER79> This is fine for your or my software but the risk of these bugs no matter how rare is too great for mass deployed code in something similar to OpenSSL.

Any good alternative still allows you manipulate raw memory, but provide a safe alternative which makes it much harder to fuck up.

What power do I actually lose by using a safer language?

<comment><USER53> The OpenSSL "Heartbleed" bug that you bring-up is not related to inherent failures of the C language but something else. Just as an aside, i actually have some background in implementation of security protocols (specifically IPSec framework) and FIPS certification for a cryptographic algorithms library, though by no means am i an expert. In the security community many people believe that "Heartbleed" was an intentional plant. See [https://www.smh.com.au/technology/man-who-introduced- serious...](https://www.smh.com.au/technology/man-who-introduced-serious- heartbleed-security-flaw-denies-he-inserted-it- deliberately-20140410-zqta1.html) OpenSSL is such a heavily used and vetted piece of software that the probability of this being an "accidental bug" is very very low and my money is on it having been deliberately inserted i.e. deliberately used C language features towards a nefarious goal. So this is not a good example to bring up.

Now coming to your other point, in today's environment, it is true that you do not lose much for the most part when using a safer language because somebody else has done the dirty work in the implementation of the corresponding language's runtimes, compilers, libraries and ABIs. Without the latter you cannot have the former. After all at some point you have to move out of the cocoon provided by the language and meet real hardware (a good example is bare-metal programming on MCUs). And that is where C is needed and any challengers have to provide exactly similar "ugly, dangerous and unsafe" features if they want to dethrone the champ.

</comment></comment></comment></comment></comment></comment><comment><USER80> 4/5, forgot that integer promotion is more complicated than what intuition would tell you.

To be honest if was pretty obvious what the right answer was, but tried to answer honestly anyway ;)

<comment><USER81> Yeah I assumed short would be at least as big as a char and would this be comparing size of short against short. Didn't realize it would get promoted to int.

</comment></comment><comment><USER82> I took it as "What will this do on your compiler?"

</comment><comment><USER83> Agh, 0/5! They were correct in the context of MSVC tho.

</comment><comment><USER84> Went to an IRC chat room when I was learning C in school. Asked if you could return a pointer to something that lives on the stack. Was talked down by an all-knowing dude telling me to go read K&R again. Proceeded to write a code sample [1] that showed it is possible (it's not really stable but works reliably in recursive calls IIRC).

I do not like this attitude (then again it was just one random dude).

[1] [https://www.onlinegdb.com/HyO5VXRxS](https://www.onlinegdb.com/HyO5VXRxS)

<comment><USER50> > it is possible (it's not really stable but works reliably in recursive calls > IIRC). [...] I do not like this attitude

You might want to listen. You're getting the K&R comment and the downvotes because this does not work, ever. It's a really, really bad idea. In recursive calls, it might not crash right away, but you will have bad data, the memory at the pointer address will have been overwritten by the next stack frame that's placed there.

Don't ever return pointers to local memory because the memory is "gone" and unsafe to use the moment your function returns. Even if you try it and think it works, it can and probably will crash or run incorrectly in any other scenario - different person, different computer, different compiler, different day...

Your comments about getting a warning and 'However if you wrap the local's address... it "works"' should be clues. The warning is the compiler telling you not to do it. The workaround doesn't work, it only compiles. By using aliasing, you're only tricking the compiler into not warning you, but the warning is there for a reason.

<comment><USER84> Listening to what ? To the dude that tells me that's not possible and proceeds to dump a big pile of authority on top of my head or to my own experiment that tells me another story ?

I would have preferred to be told:

\- yes and no. You'll get warnings if you try to return a pointer to a local, however, doing this and that, you can manage to do it.

\- but once you have achieved that, the result will be dependent on the way the stack is handled (not really in your control). You'll feel some comfort doing this in recursive calls, however beware of signal.h.

But this isn't the answer I received. I guess C programmers do not know the difference between what you can do (however risky) and what you shouldn't do. Also when someone asks such "weird" questions, do not assume he's a beginner with no notion of what constructs he can handle safely, maybe he's someone trying to find the limits of C – and once these limits are identified it can be a good conversation starter about C's internal and the way various compilers differ.

Edit: also downvotes on HN are not like downvotes on Reddit: there's actually a limit (-2 ?). Below this the comment disappears. Conclusion: only downvote when the comment engages in antisocial behavior (not respecting the rules or common human decency, etc ...), not when you disagree with it. I always upvote an unfairly downvoted comment for these reasons.

<comment><USER50> I was trying to help by explaining it, instead of saying go read K&R, but I don't get the feeling you really heard or understood me. There is no other story. There is no yes and no. There is only no. You cannot manage to do it. It does not work to return local memory from a function, ever, period. Once you return, it is 100% unsafe to try to use the memory from your previous stack. There is absolute zero comfort in recursive calls.

You are mistaking some luck in having it not crash once for thinking that it's okay in some situations. It's not okay under any circumstances. That's what makes this even more dangerous. Your program could crash at any time. It might run a thousand times and then suddenly start crashing. It might always run for you, and then crash on other people. But just because it runs once without crashing doesn't mean it's working.

A signal is not the only way your function's stack can get stomped on the very next instruction after you return. Other processes and other threads can do it, the memory system can relocate your program or another one into your previous memory space. Recursive calls are guaranteed to stomp on previous stack frames when your recursion depth decreases and then increases, the previous stack will be overwritten.

Returning a pointer to a local stack frame is _always_ incorrect. It's not risky, it's wrong.

BTW: you have the ability to see comments below the downvote limit, go to your profile settings and turn on showdead.

I didn't downvote you, if that's why you were trying to explain voting behavior to me, but you will find on HN that downvotes and upvotes both happen for a wide variety of reasons, and are not limited to either whether people agree, nor whether the comments are polite. Downvotes are often cast for comments that break site guidelines, for example just failing to assume good faith can get you downvoted. So can making blanket generalizations about a group of people, like the above "I guess C programmers do not know the difference...". See the comments section here: [https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)

I sometimes upvote what appear to be unfairly downvoted comments to me. I usually upvote people who read and respond to me, regardless of whether I agree with them.

<comment><USER84>
        - Java: no
        - Ruby: no
        - PHP:  no
        - C:    yes and no

<comment><USER50> ?? I don't understand what you mean. Those other languages don't have pointers, they only have references, but what do they have to do with this?

Why do you still think there's some yes in C? It's not making sense yet that your memory is gone after you return? Returning a pointer to a local variable is exactly the same as calling delete or free on a pointer and then reading from it. You officially don't own the memory after a return statement, so if you try to use it, then what happens is indeterminate. Again, since it doesn't seem to be sinking in: it is _always_ wrong to return a pointer to local memory. But, if you really really don't want to listen, and you're sure it works sometimes, then I say go for it!

</comment></comment></comment></comment></comment></comment><comment><USER85> While I got my 5/5, I think the answers should have been "I seriously don't _want_ to know".

</comment><comment><USER86> Don't we need to know the sizeof int and void* on this machine?

[edit - that seems to be the point sigh]

</comment><comment><USER87> tl;dr - C has some undefined behavior, if you plan on things working based on your experience with one compiler and one computer, you will be surprised.

<comment><USER88> I wonder how many C programmers have experience with writing multi platform/compiler code. I have done a lot of C and C++ but never had to port it so I would not be surprised if I had made a ton of mistakes.

</comment></comment><comment><USER89> I failed the first couple, rapidly getting into I don't know.

Answered the rest, IDK.

Laughed! Great exercize.

</comment><comment><USER81> I got #2 wrong, and definitely should have known about integer promotion.

</comment><comment><USER90> What are the best strategies to cope with the undefined areas in C?

<comment><USER6> The best one is to not write C. The second best is probably to read the standard papers, be _very_ careful (perhaps using a secure style guideline) and making generous use of tooling to help you catch mistakes.

</comment></comment><comment><USER91> Could someone explain why in question 5

i = 0; return i++ + ++i;

Could produce different results?

<comment><USER92> There's explanations at the bottom after you click the button.

<comment><USER91> I read it but I still don't understand. Isn't it 0 + 2 vs 1 + 1? How would it produce something other than 2?

<comment><USER93> How do you get 0 + 2?

I could imagine the post-increment happening after the sum: giving 0 + 1…

<comment><USER50> That's what I imagined, and what I get with Cygwin gcc, the result is 1. I thought that the post-increment was supposed to always only happen after the "statement", but I was wrong. Other compilers, like gcc on Ubuntu return 2.

This looks like a good explanation of why both are correct and why it's confusing: [https://stackoverflow.com/a/4445841](https://stackoverflow.com/a/4445841)

</comment></comment></comment></comment></comment><comment><USER94> My answer to a lot of these questions is "If you write code like this and check it in to our corporate repository, I will cut out your heart and make you eat it."

<comment> B-Con Don't forget to include whoever reviewed it.

</comment></comment><comment><USER95> 1/5\. I don't know C.

</comment><comment><USER96> By the third question it was obvious that all of them are implementation- dependent or undefined behaviour.

</comment><comment><USER97> In practice, things in C are not as undefined as the ISO working group specifies them. It is virtually inconceivable that a mainstream compiler stack would do anything other than what you'd expect with example four. As for struct alignment, that's something that most C programmers should know is implementation-defined (which is one of the reasons we even have _sizeof_ to begin with, apart from the mere convenience of it).

Sure, you've made your point, but you've made it in a ham-fisted way which doesn't really help people understand why a given undefined or implementation- defined behaviour is the way it is, and what things they should verify about the implementation in order to predict where their code will not work.

<comment><USER98> I think this objection boils down to your perspective on what we mean by "C".

It's reasonable for some folks (especially working programmers who need to "get stuff done") to think that "what a reasonable compiler in their problem domain" would do is what "C" means. It's equally reasonable for other folks (especially compiler writers, verification experts, researchers, etc.) to think the ISO standard is what "C" means.

It would be great for the standard to be more "reasonable" and have less undefined behavior. But I, for one, cannot think of a more horrible, thankless chore than actually trying to make that happen. So much code is written in "C", and there are so many compilers and platforms, modern and legacy, that "C" runs on, each with their own notion of "reasonable," that it will take an incredible amount of work.

<comment><USER65> C compilers predate the C standard by many years, so "C is what my compiler does" is certainly a valid perspective.

Also, the vast majority of programming languages don't have standards at all, and people still use them productively.

<comment><USER7> Examples of languages with a standards document, describing language semantics and standard library, not necessarily an ISO one.

Java, JavaScript, Modula-2, Pascal, C++, Fortran, C#, F#, VB.NET, Eiffel, D, Ada, Common Lisp, Scheme, Python, Scala, Haskell.

</comment></comment></comment></comment><comment><USER99> j = 1

k = 2

i = ++j+++++k++

i = ?

j = ?

k = ?

</comment><comment><USER88> Failed all of them. I totally agree with what the author is writing. Don't presume anything but measure. I also tend to code in a way that it's not necessary to know all the intricacies. Its not as clever as many like and often makes for longer code but is usually easier to read.

<comment><USER100> > Don't presume anything but measure.

I think that's exactly the wrong takeaway here. Most of these have a well- defined result _on a given platform_ (host + abi). You can measure that result. But it'll be different on a different platform. And the others don't have a well-defined result — a real-world compiler will produce _a_ result, and you can measure that, but it might be different tomorrow. Unless you know the difference between platform-specific behavior and undefined behavior, you don't know which ones to avoid.

</comment></comment><comment><USER101> The real answer is, all 5 questions don't compile so they don't return anything.

<comment><USER6> What compiler are you using?

</comment></comment><comment><USER102> The tone is insufferable, the test is beyond useless.

<comment><USER6> > And at this point, I only have to apologize. The test is clearly provocative > and may even be a little offensive. I'm sorry if it causes any aggravation.

</comment></comment><comment><USER103> What a lot of people don't get is that it's not pointers or manual memory management or even lack of language level support for "modern features" like object oriented programming, exceptions etc. that make C a pain to use. No it is the undefined and implementation dependent behaviours. There are simply so many of them that even experienced C programmers may, at times, run into trouble.

C is essentially a portable assembler. It's not enough to learn the language, you need to have deep understanding of the underlying hardware and compiler infrastructure.

</comment><comment><USER104> It is an unsavory set of questions that has no bearing on practical work, also implementation dependent.

The answer is: No, I do not know C or any other language for that matter. I know some implementations of various languages just enough to write sound and readable code. And as I forced to use a bit more languages than I like I rely on local/Internet search to keep my brains concentrated on accomplishing the actual task rather then effing them up trying to figure out some esoteric constructs.

<comment><USER105> The questions are a bit cute, but they're not testing obscure corner cases of the language. It's not like asking if you have the trigraphs memorized. It's testing fundamental rules about how C works: overflow, integer promotion, order of operations, memory layout, etc.

<comment><USER106> They're all obscure in a "I wouldn't write code like that or let it go through review" sense. They're very synthetic cases.

<comment><USER105> But would you write code that adds integers of two different types?Then you need to know the integer promotion rules. And this is just us just a way of testing that.

</comment></comment></comment></comment><comment><USER107> This is a perfect example of what I hate about some tests.

Didn't quite know the purpose of the test, there's a difference between code for any machine and any compiler and gcc running on some vanilla x86, which is pretty common, and could have been the content (ex: you say it's undefined, that's obvious, everyone knows that already, but it's still deterministic... Here's a breakdown of what happens in practice, blah blah blah). There's a real difference between the kind of "knowing" here and say the kind of "knowing" with unallocated pointers.

If it said "esoteric implementation on exotic hardware" then it's easy, you know what they are trying to do. If it said C89 you also know what's up. But how it's presented, it's a guess.

This was endemic throughout schooling. Instructors would say "just do your best" and I'd be like "wtf? There's like 2,3, maybe 4 perspectives on this with different answers depending on how clever you're trying to be or what you're trying to get at... Might as well put "I'm thinking of a number 1 through 5" on the exam".

<comment><USER80> You can easily get bitten by at least one of those examples just by compiling your application written on x86 to ARM to get it running on Android, so not sure if it's as esoteric as you think.

<comment><USER108> Or on different compilers, or the same compiler with different options, etc.

<comment><USER109> Or a new release of the same compiler.

</comment></comment></comment></comment><comment><USER110> On a typical modern arch, there are consistent and reasonable answers:

1\. 8 ([https://godbolt.org/z/Udcuj0](https://godbolt.org/z/Udcuj0))

2\. 0 ([https://godbolt.org/z/kZz1YQ](https://godbolt.org/z/kZz1YQ))

3\. -96 ([https://godbolt.org/z/1Xq_Oo](https://godbolt.org/z/1Xq_Oo))

4\. 1 ([https://godbolt.org/z/MIo0s_](https://godbolt.org/z/MIo0s_))

5\. 2 ([https://godbolt.org/z/J0dsVW](https://godbolt.org/z/J0dsVW))

I agree, you can argue that it's unspecified, undefined, or whatever. It might not be well defined by the C specification, but none of these programs produce surprising output. Programming in the real world requires that you are able to read and write code like this, even if it requires that you investigate (and depend) the specific behaviour of your compiler/platform.

<comment><USER80> Switch the compiler to ARM, which is as "typical modern arch" as it gets, and see for yourself.

<comment><USER110> I don't think it's surprising when you switch machine architecture and/or word sizes that you get different results. In fact for me, that's completely normal and to be expected.

<comment><USER25> I sure hope you're not writing the libraries that I use in C/C++ :)</comment></comment></comment></comment>


PyCon US 2013: Announcing "The Young Coder: Let's Learn Python" - <AUTHOR> http://pycon.blogspot.com/2012/07/pycon-us-2013-announcing-young-coder.html

<comment><AUTHOR> I was already planning to bring some high school students to Pycon this year. This makes the trip even more appealing to students, especially female students. we are traveling from Alaska, so the free tuition lets us focus on the travel costs.

Some students will already know most of what is described in the tutorial. This makes it possible to bring a mix of knowledgeable students, and students who are new to programming but interested and motivated.</comment>


Up late again?  electronics could be the problem - <AUTHOR> http://www.cnn.com/2010/TECH/05/13/sleep.gadgets.ipad/index.html

<comment><USER2> What about the blackberry/crackberry addiction?</comment>


Baidu's and Don'ts: Privacy and Security Issues in Baidu Browser - <AUTHOR> https://citizenlab.org/2016/02/privacy-security-issues-baidu-browser/ <comment><AUTHOR> Intro/Overview: [http://deibert.citizenlab.org/2016/02/down-on-the- baidu/](http://deibert.citizenlab.org/2016/02/down-on-the-baidu/)</comment>


Virtualbox: Absolutely perfect virtualizer for x86 platform. Give it a try. - <AUTHOR> http://www.virtualbox.org/

<comment><USER2> I installed this a few months ago so my daughter could play her favorite windows 98 games on her Macbook. It worked well but finding and installing the necessary drivers took forever.

</comment><comment><USER3> Nearly perfect. My dream world would involve DirectX 9 support and USB passthrough support in the free version.

That said, it really does kick ass. I'd recommend it.

<comment><USER4> Sounds interesting, but Virtulization is a crowded market- Is there a guide/chart/article explaining what this offers over other solutions, such as Xen, Vmware, or Parallels?

I'm sure it's a great package, I'm just trying to find the unique selling point- I'd love your insight on what you liked about it.

<comment><USER3> For me, the selling point is the ease of use. VirtualBox is like the Ubuntu of virtualization suites... it just works, and works well, and it's easy to get going.</comment></comment></comment>


RailsConf 09: Robert Martin, "What Killed Smalltalk Could Kill Ruby, Too" - <AUTHOR> http://railsconf.blip.tv/file/2089545/

<comment><USER2> i like the parts where he equates estrogen with insipidness. nice ranty take on that at:

[http://gilesbowkett.blogspot.com/2009/05/what-killed- smallta...](http://gilesbowkett.blogspot.com/2009/05/what-killed-smalltalk-my- balls.html)

and a response that isn't so ranty ( and addresses other parts ) at:

[http://www.cincomsmalltalk.com/blog/blogView?showComments=tr...](http://www.cincomsmalltalk.com/blog/blogView?showComments=true&printTitle=Smalltalk:_Our_Death_has_been_Exaggerated&entry=3419278263)

</comment><comment><USER3> I'm really glad they posted this. I saw a lot of twitters at RailsConf about how great this keynote was. Now that I've seen it, I personally don't see that much to like about it, but at least I'm no longer left wondering

<comment><USER4> Me too. It is delivered with great fun, but there is no truth.

<comment><AUTHOR> _... there is no truth._

Interesting claim.

Question: Have you actually tried programming the way he sugegsts? Have you used it "in anger"? Have you worked in a team that has ubiquitous, all- encompassing, tests?

I ask because I'm interested. I've started recently, as an experiment, to run in that very, very small circle, and after an initial experience of paralysing culture shock I'm starting to run really, really fast.

I'm finding it liberating.

<comment><USER4> There is no doubt many programmers find it beneficial to use TDD. My claim is still that there is no truth, but not in the sense that you think. It is very easy to say that TDD helps, or that X killed Smalltalk, because it is almost impossible to falsify. It is the same weak argumentation that made OO prevail back in the 80'es/90'es. Usually you back up this by a "study" containing a) 1-2 "Cases" and b) no statistics with a significance test.

As to your questions:

"Have you tried it?": It depends. Test driven design states that you need to develop code and tests in tandem. I rarely do that. But note I also rarely program in dynamically typed languages. I develop the type in tandem with the program, and that constitutes a verifiable test as well, albeit a different one. Correctness is usually backed up by either a) machine-verifiable proof or b) Black-box test suites.

"Have you used it an anger?" I can't answer this. I rarely program when I am angered. I don't become desperate when I write code.

"Have you worked on a team with ubiquitous, all-encompassing, tests?" Yes. The team did not do TDD though. All tests were black-box.

Here is another experiment: Read Benjamin C. Pierce: TAPL and ATTAPL. Understand them. Learn Haskell. Learn QuickCheck. You will probably find that TDD is something which is much more needed in the dynamic language setting.

</comment></comment></comment></comment><comment><AUTHOR> Found from <http://news.ycombinator.com/item?id=604808> but worthy of its own item.

Also referenced from <http://news.ycombinator.com/item?id=597314>

For some reason I can't make it play beyond about the 41 minute mark. Can anyone else?

<comment><USER5> Could you give a brief summary of the points for those of us who are video impaired? Thanks.

<comment><AUTHOR> That's tough. It's a 60 minute video, and he makes a lot of great points. The style is fun, too.

From memory,

It was insular - people created and staying in their bubble and didn't interact with messy other code.

It was too easy to make a mess, and continue to work with it until suddenly the code become too fragile to change.

Proponents thought their world was somehow better, and didn't play nice. So others didn't play nice in return.

One big one that really needs the video to support it - it will come to be believed that professional programming will be based entirely and exclusively around "proper" TDD.

There are more. I'll see what I can do. Do you have any video capability? It's also on YouTube.

<comment><USER5> It was pure laziness, not any lack of facilities. :-) I find it hard to devote an hour to a video when there is a good science fiction book around. Thanks again for the summary.

<comment><AUTHOR> Oh, it's seriously incomplete. There's a lot more stuff.

I would recommend downloading it and playing it at double speed.

</comment></comment></comment></comment></comment><comment><AUTHOR> To summarise:

Skip straight to 05:30. It starts with something completely unrelated and, to me, uninteresting.

This link works beyond the 41 minute mark:

[http://blip.tv/file/2089545?filename=RailsConf- RailsConf09Ro...](http://blip.tv/file/2089545?filename=RailsConf- RailsConf09RobertMartinWhatKilledSmalltalkCouldKillRuby787.mov)

</comment><comment><USER6> So, is TDD really the key? Should you really _always_ (or nearly so) write your tests first before writing any code?

It would seem to me that doing so would seriously interfere with workflow.

</comment><comment><USER7> I'm sure I should be very afraid, but I had to skip the details after he bored me to death with that unfunny rambling metaphor for who the fuck knows what in the beginning.

<comment><AUTHOR> Yah, skip straight to 05:30.</comment></comment>


Backstep is looking for a co-founder - <AUTHOR> http://blog.iambob.me/backstep-needs-a-co-founder/

<comment><USER2> I like the concept. Could you explain what exactly "establishments on the ground" mean in your About us. Do you think this is scalable globally or is it only meant for US for the moment? Lastly what kind of leads are you talking about here - can you give couple of examples?

<comment><AUTHOR> Of course. So a lot of things are in the works right now, but in a nutshell, I'm currently scraping data about (nearly) every taxi company in the U.S and feeding that data into an admin panel which lays out the data in a way conducive to finding items which have been reported as lost in a given geographical area..theres still a lot of work to be done on that front, but that's the core concept...as for scaling, yes I definitely think it has the potential to be globally scalable in the future, but for the moment I'm concentrating on the U.S as a proof of concept...if I can get it working here, though, I would definitely be interested in introducing it globally later.</comment></comment>


More people on S.F. streets newly homeless - <AUTHOR> http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2008/12/16/BA5N14OGCD.DTL&type=printable

<comment><USER2> Truly sad, esp. the stories of small children sleeping on the street with no food. It's also frightening to me. You've all read recently about major knowledge workers (significant people with Flickr/Yahoo!) who have been pink slipped. I'm sure the supremely skilled will find other offers of employment, but the bottom line is that it can happen to anyone.

I want to do something to help, and have volunteered at the soup kitchen-type ministries, but I just keep wishing it could be more than just a meal. I want a long-term solution that would end with capable people becoming productive, paid, and employed again. It's a staggering problem, and I don't know how to get there.

My parents visited San Francisco for the first time around 2000. When I asked them how they liked the place, expecting to hear stories of beautiful weather, Golden Gate park, Alcatraz, the cable cars, or the scenic vistas, all they could talk about was how many homeless people there were. Literally, when I tried to change the subject, it went like this:

 _Me_ : So did you go to Lombard Street?

 _Mom_ : Yes, but we didn't stay long because there were so many homeless people.

And so on.

<comment><USER3> I've lived in SF for three years. Whenever I visit other cities (Seattle, Austin, New York) I'm always surprised by how few homeless there are.

</comment></comment><comment><USER4> It makes me very sad to read this. Especially the thought of a child in this situation, when I have a child at the same age.

Some people chose the street, I've seen it in places where the government provides for everyone. And many are mentally ill, often schizophrenics off medication. Sad enough that it is hard to help them. But to see families hit by the economic crisis to be pushed to the street is appalling.

How about we raise taxes a little bit for everyone, so that people who have fallen on hard times can be caught by a 'social net'?

<comment><USER5> It'd be hard to do without catching the schizophrenics too. They're about the same size as the recently unemployed.

<comment><USER6> Is that a problem though? Do they deserve less help than the recently unemployed?

<comment><USER5> I was being sarcastic about making the distinction.

<comment><USER6> Sorry, I should have spotted that!

</comment></comment></comment></comment></comment><comment><USER7> I spent a week in S.F. in March 2007 and another in May 2008. I spent most of the time in the same areas (Market St., SoMa, Yerba Buena and Fisherman's Wharf) the increase in the number of homeless people in 2008 was staggering.

<comment><USER8> Some of what you saw is seasonal. May is nearer to tourist season and those areas are some of the prime spots.

This article is kind of annoying in how it implies large jumps (50 sandwiches to 500, "59 percent of those requests came from families", 62% of 136 on the waiting list are new, etc) but they don't actually say what the homeless rate is and how it has changed.

In 2002 there were 8,600 homeless. By 2005 it had dropped to 6,300. So let's say it's really bad and there are 9,000 homeless people now. That feels like a lot in a city of 700K.

</comment></comment><comment><USER9> Perhaps one of the reasons that SF seems to have so many homeless is that SF provides a lot of benefits to the homeless. (Another reason is that SF's weather doesn't kill them.)

Google "homeless benefits sf" and you'll find that things aren't as simple as one might think.

FWIW, the "lots more, with children" story runs every few years.

Let the "downmodding the mean" begin.</comment>