What Makes Texas Texas - <AUTHOR> http://www.nytimes.com/2016/05/08/us/what-makes-texas-texas.html <comment><USER2> There is something about this place. Hard to explain. You just fall in love and never want to leave.

I came as a young man and stayed for a long time. Had to leave for 10 years but I finally made it back. This place has only been good to me. The people, the climate, the opportunities.

God Bless this Great State. It is the last Bastion of Truth and Freedom.....

<comment><USER3> Life-long Texan here, and I couldn't disagree more. I grew up in the rural pandhandle area and lived in Amarillo, Austin and Houston. Now, I'm living on the road in an RV, driving across the nation, and I've found many places more beautiful, friendly and accepting than Texas ever was. Texan exceptionalism is a bizarre and subjective phenomenon that I'll never understand.

<comment><USER4> I also grew up in the panhandle. The state isn't so bad, but it's also not great.

I don't understand the exceptionalism, either. There are a lot of really nice places in the world, and frankly big chunks of Texas (anything north of San Angelo and west of Abilene) are pretty depressing on social, cultural, and ecological fronts.

</comment></comment></comment><comment><USER5> There is a view of Texas collectively as a largely backward state filled with trigger-happy cowboys and whatnot. That might be true. However, there is much more to the state than just that.

I don't mean to generalize here; anecdotally, Texans on an individual level are friendly, conservative in their beliefs yet tolerant of others. The friendliness is what really surprised me when I first landed here. It really is charming and makes meeting new people incredibly easy and fun.

I must add that as a young man, its a great state to be in. Love Texan women: beautiful, charming and very real.

<comment><USER6> I spent my highschool and college years in Texas, and I couldn't agree more. Austin is a beautiful city with a beautiful culture, and even more "boring" places such as Dallas and Houston are filled with super friendly and down to earth people.

I now live in Silicon Valley, and I find that there is much more social tension around here. I've been hated on as a young techie, as a Chinese immigrant, as someone who moved in from another state and doesn't "understand" Bay Area culture. People here are also the opposite of "down to earth".

I've never experienced any of the above when I lived in Texas, yet the first time I went to a NBA game here a few years ago someone shouted at me "Go home China boy, Yao Ming isn't playing today".

Weather in Texas is atrocious though.

<comment><USER7> >Weather in Texas is atrocious though.

Crickets. Crickets are their own season. People don't even know.

</comment></comment></comment><comment><USER8> The former sovereignty of Texas is a big factor. The State owned the vacant land, unlike most western states, where the Federal government did.

You have the whole politics of ranchers and resource barons that creates an unusual political dynamic, just like other "interesting" states like NY or California.

</comment><comment><USER9> As a Texan I love this shirt [1] both ironically and unironically.

1\. [http://smbc.myshopify.com/products/texas- shirt](http://smbc.myshopify.com/products/texas-shirt)

<comment><USER10> As a former Texan (not sure if that's possible), I can say I'd wear this around San Francisco.

<comment><USER9> I think the term would be non-resident Texan.

</comment></comment></comment><comment><USER11> >But Texas is not under attack. It is merely changing as America changes with it.

Attack is too strong a term, but he massive spike in non-Texans immigrating to cities like Austin (for tech/creative jobs) and Houston (for energy and healthcare jobs) is having a noticeable impact on everything from housing prices to public culture.

<comment><USER12> I found Houston to be quite cosmopolitan. I'd call it "working-person's cosmopolitan." There is a tolerance there borne of abundance and tradition, which has become its own common-culture sort of thing. People in Houston almost never get high and mighty or self-righteous on you for anything. On the downsides: Get mistaken for a teenager on a prom date, and you can be refused service in a fancy restaurant. Wait staff will "sir" and "ma'am" you. You can encounter some testosterone. Sometimes, this will even come from the cops.

At the very least, there is an expectation you will be polite, if you stay away from the rougher spots. The ethos there is live and let live, for the most part. Here in the Bay Area? It's definitely not "Live and Let Live." Many here feel free to splat you in the face with their judgement.

EDIT: Also, to debunk a stereotype, I know from a friend who worked with the DA and also as a private defense attorney, that Houston juries are not blindly Pro-Gun. There are certain things you do not do, certain things you do not have, or a Houston jury will put you away because you are a "gun nut." From another source, I know of a retired military DOD contractor who lost his job and his house because a Houston jury looked askance at his shooting a burglar in the butt as the burglar was climbing through the window of his house. Why? Because the burglar at the moment of the shooting, was leaving. Even in Houston, property isn't more important than human life.

<comment><USER13> See, perhaps: [https://www.washingtonpost.com/news/wonk/wp/2016/05/11/the-s...](https://www.washingtonpost.com/news/wonk/wp/2016/05/11/the- secret-to-disagreeing-with-people-from-20-different-countries-in-one- chart/?postshare=2221463077607576&tid=ss_tw) \- and maybe the US blob should be more like a large circle.

<comment><USER12> Also, Koreans can flip to the extreme opposite corner sometimes.

</comment></comment></comment></comment><comment><USER14> I moved to Texas when I was 19, from South Carolina (if ever a state was more aggressively regressive than Texas, it would be South Carolina), and I lived in Houston and Austin for a lot of the past couple decades. I travel full- time, currently, but I still call myself a Texan; and not just for tax purposes. There's a lot to love about the state, or at least the major cities.

I'm regularly embarrassed by the governor and the state legislature, particularly in recent years as anti-woman/anti-immigrant sentiment has shaped the political landscape in toxic ways. But, I love so many things about the place. I love the food trucks (which are unmatched anywhere in the world), the fantastic Mexican and Asian food in Houston and Dallas and Austin (easily competitive with the best California and New York have to offer on those fronts, and you don't have to dress up or spend a fortune to enjoy it), the visible and unique counter-culture in all of the major cities (weirdos in Austin or the Montrose are unlike weirdos anywhere else), the music scene that often seems completely independent of the world outside of Texas, the summer- year-round weather (even the hot days are fine with me, if it means winter will be short and mild), and the diversity of its best cities (though Austin is a bit too white and suburban for comfort, and getting whiter and more suburban over time, unfortunately).

I like to think I'm above jingoism, but I love Texas. I travel full-time these days, because there's a lot to love about all sorts of places in the US (currently in Eugene, OR, as I've never really explored the Pacific Northwest, and summer is a great time to do so). But, I'm pretty sure I'll circle back to Texas eventually, as I always do.

But, don't move to Austin, y'all. You'll hate it. It's just one big traffic jam, and the restaurants and bars are all too crowded now.

<comment><USER15> I can't tell if you're being sarcastic about that list line about Austin.

<comment><USER3> When I lived in Austin in 2006-2008, the traffic was atrocious, and it's only gotten worse in most areas. That city has a particularly profound infrastructure expansion problem, and the high growth has only exacerbated it.

</comment></comment></comment><comment><USER16> Of all the states, I could see Texas leaving the Union. It gets talked about in any number of states, but the only one I could realistically see doing it is them. On friendly terms, too.

</comment><comment><USER17> They left the eerily influential Texas textbook commission and troll-friendly patent courts off the list of things that make Texas distinctive.

</comment><comment><USER18> This article reads like the goofy cliches New Yorkers spout after spending their first week in Los Angeles.

So here's mine:

Texas is enormous and odd and has no state tax and yet you can't drive 20 miles without seeing another massive multi-billion dollar highway construction project that seems about 100 feet taller than it needs to be.

Dallas is not Austin is not Houston.

Austin in the context of Texas pretty much makes no sense. Might as well be its own state within a state. One that needs really, really strict DUI laws -- not dopey politicians picking fights with Uber. Day drunk, no tech to be seen, and basically a cultural vacuum given what it should be given its massive population and history.

Dallas makes little sense either. Amazing travel hub. $59 flights to/from anywhere. Want a $19 rental car? They got 'em. And they'll email you the night before to see if you want to upgrade to a minivan for $23. Why aren't other hub cities like this? Dunno. I must underestimate the scale. Easy to do there.

But Texas is on the path to becoming unmanageable just as California did before it. Whether this comes from growth, or growth compounded by cultural "diversity" tearing its internals apart remains to be seen. I'm not optimistic. Too big, too broken, and too growing. People are opinionated and divisive. And a little bit nasty. And armed. When you hear about "doing what's right for America" and "compromise" \-- Texas is the exact place that would benefit the most from it. Yet Texans don't seem interested in starting the conversation.

But this article barely scratches the surface of what I saw. Texas is a surprising, complex beast. And I only spent about four days there.

Also, consider investing all your retirement savings in Torchy's Tacos.

<comment><USER19> >This article reads like the goofy cliches New Yorkers spout after spending their first week in Los Angeles.

> I only spent about four days there.

Ok... what would we call your strong opinions?

<comment><USER18> "Strong opinions" works for me. Are those still allowed here?

</comment></comment></comment><comment><USER20> i was born and grew up in Texas, moved away 25 years ago and still have a couple of Texas quirks. I simply cannot live in a state that has an income tax, and I still worship the Alamo.

<comment><USER21> The lack of an income tax is great although one should note that property taxes in TX are considerably higher than average. Around 2.5%+ or so.

To optimize one's tax situation in Texas, the ideal situation is to live in a cheap condo/house and make a high income.

<comment><USER22> > To optimize one's tax situation in Texas, the ideal situation is to live in > a cheap condo/house and make a high income.

That's not entirely a bad thing as it's environmentally friendly. It probably means that a higher portion of taxes are paid by the relatively less well-off, but if that suits them, so be it.

<comment><USER23> Yep.. Texas is frequently last or near-last on the progressiveness of their state tax scheme. The poor pay much more tax in Texas than they would in most other states due to the reliance on sales and property taxes for revenue.

Having done business there as well, it seems like a sport to aggressively minimize property taxes by claiming 'ag' exemptions for having some cows graze your property a few days per week. Obviously used by the rich more than the poor.

It's clearly their prerogative how to run their state but it left a bad feeling in my mouth.

</comment></comment></comment></comment><comment><USER24> the stars at night are big and bright....

<comment><USER25> If IRC, that song is actually one of the most recognizable songs around the world....everyone knows about the claps!

<comment><USER26> What song is that? I grew up two states away from Texas, and worked in Dallas for some time, and the only thing I can come up with is Chuck Norris's "Eyes of a Ranger". I'm pretty sure that's not what you mean.

<comment><USER25> See the other comments below. Deep in the Heart of Texas. Once you hear it though, you'll instantly recognize it. YouTube it.

</comment></comment></comment></comment><comment><USER27> Unrelenting jingoism for the 13 years of mandatory schooling, that's what makes Texas Texas.

<comment><USER9> Well, that's part of it. There's also the unrelenting jingoism for 5 years of growing up before going to school, and the fact that Texas is fucking awesome.

<comment><USER27> I mean it's not terrible if you really like small animals, tiny hills, tiny rivers, tiny lakes, short mountains and trees that are barely shrubs; even the weather is pretty half assed.

But then I guess not all of us can grow up in places that have some scale to them.

<comment><USER9> Trolling is a nart.

</comment></comment></comment></comment><comment><USER28> It's easy to see why Texans think their way of life is under attack -- you literally can't even begin to count how many guns Obama has taken away from Americans

</comment><comment><USER29> [https://www.youtube.com/watch?v=KVpx6JN1A4U](https://www.youtube.com/watch?v=KVpx6JN1A4U)

<comment><USER29> [https://vimeo.com/86440068](https://vimeo.com/86440068)

</comment></comment><comment><USER30> Conservatives as a whole are easy people to sell to. They have a fundamental revulsion to change, regardless of how positive it is, and their ears will perk up whenever they hear a point of view which matches their own prejudices. Texas, therefore, is an easy sell to Texans who tend to skew conservative. Just spend a few days in the state and listen to television and radio ads. They don't say "Texas." They say "Teckshussssssssssssh."

The culture of the state is by and large indistinguishable from that of Alabama or Mississippi with the exception of cowboy hats, large belt buckles, and a predisposition for beef over other superior forms of barbecue.

I've lived there. I'm moving back there. But virtually my entire group of friends who lived or still live there didn't originate from there... and people who have come from other areas of the country or world tend to snicker or roll their eyes when a Texan starts bragging about that particular culture.

<comment><USER31> Liberals as a whole are easy people to sell to. They have a fundamental revulsion to status quo, regardless of how positive it is, and their ears will perk up whenever they hear a point of view which matches their own prejudices. California, therefore, is an easy sell to Californians who tend to skew liberal. Just spend a few days in the state and listen to television and radio ads. They don't say "California." They say "Cali."

<comment><USER32> Nah brah, it's "Cali... brah!"

The old joke is, "Conservatives love humans but hate humanity. Liberals love humanity but hate humans."</comment></comment></comment>


Show HN: Host your own, private contact and calendar sync - <AUTHOR> http://www.stavros.io/posts/private-contacts-and-calendars-android/ <comment><USER2> Interesting article, already read it from your RSS feed, but didn't you post this here several times in the past few days? I could swear I've seen it twice or so...

<comment><AUTHOR> Hmm, I posted it once this morning, but I deleted it because I figured it was too early for people to see it. Definitely didn't post it several times, though.

<comment><USER2> Ok, then I probably got confused because I read it on your blog. Family has asked me to set up something for calendar sharing over the holidays, so I've been looking at the post a few times.</comment></comment></comment>


Thanks HN - <AUTHOR>

I've learnt a lot from all you people and got a lot of inspiration to do new things in life.<p>I won't be able to participate much any more. But just want to say thanks for everything. <comment><USER2> _"30th birthday resolution: make an effort to get out of the tech echo chamber and talk to more normal people."_

Not a bad idea ~ <https://twitter.com/hrishio/status/240938100296126465>

</comment><comment><USER3> Same here. See you on the other side.

</comment><comment><USER4> thank you rev. please transfer karma to my account. thanks in advance and wishing you much success.

</comment><comment><USER5> Good luck wherever you're off to!

</comment><comment><USER6> No problem.

</comment><comment><USER7> Good luck with SWYM!</comment>


Phoenix – The lightweight OS X window manager for hackers - <AUTHOR> https://github.com/sdegutis/phoenix

<comment><AUTHOR> For those who aren't sure of how to use this:

Install using homebrew cask, then once it's all gravy, start adding bindings (in your ~/.phoenix.js file). The example they've got on the github page will move the resize and move the active window 10 pixels.

<comment><USER2> Will this move photoshops stupid non cocoa based window? Nothing else I've seen does, and switching from a tbolt monitor back to my laptop always leaves photoshop looking like shit and unable to be resized.</comment></comment>


How much do blockchain engineers make? - <AUTHOR> https://www.cnbc.com/2018/10/21/how-much-do-blockchain-engineers-make.html <comment><USER2> There are not many use cases for blockchain, so i don't understand why some companies are willing to pay $150,000-$175,000 for prototypes?</comment>


Ask HN: Is gmail down for you?  - <AUTHOR>

Our business's gmail is down? Seems others are having issues also https://twitter.com/search?q=%23gmail<p>Is gmail down for you? <comment><USER2> Gmail is working perfectly fine here for me</comment>


Video of YC NYC available? - <AUTHOR>

Didn't see any. Hoping there was at least a recording of a live stream or something? <comment><USER2> Video was being broadcast in real time at the event which means it was probably also being recorded. I'm sure it will turn up eventually but I got the idea that it was a professional video crew which may mean it will go through some post production before being pushed out. Just FYI.</comment>


Apple Developer Center is Fully Restored - <AUTHOR> https://developer.apple.com/support/system-status/#

<comment><USER2> I wonder what Apple's server infrastructure looks like? They aren't programming it all in WebObjects [1] are they? Do they use linux and/or freeBSD? Of all the things Apple does, their "cloud" seems the weakest product.

Apple is the only big software company that doesn't develop server-side technologies. If I was the boss of Apple I'd standardize on FreeBSD and Golang today! But, I'm not... obviously :)

[1] [http://en.wikipedia.org/wiki/WebObjects](http://en.wikipedia.org/wiki/WebObjects)

<comment><USER3> > _Apple is the only big software company that doesn 't develop server-side > technologies._

iCloud storage, iTunes Match, iMessage, to name just a few. If you stop to think how these all just work across devices and desktops, and at what volumes, you'll realize they've got _some_ server chops.

<comment><USER4> If you've ever used iTunes Match, you'd know it's a stretch to say that it "just works".

<comment><USER5> You can say the same thing about iCloud. I'm not a Microsoft fan-boy, but I have to say that SkyDrive does what I expect it to.

<comment><USER6> Sometimes. I've had a couple of files deleted which I was not happy about. For that alone, they can get screwed.

</comment></comment></comment></comment></comment><comment><USER7> So the whole place went down a few days before we were ready to launch. We need to upload an iPhone app to iTunes Connect. We have been prevented from doing this because we needed to accept some new T&Cs on the member centre. Despite iTunes Connect being up, we've been stuck. Apple support were unhelpful - we've just had to wait it out. Now finally I've been able to get on the member centre and accept the T&Cs, but there's clearly some delay in iTunes Connect realising this. I still can't upload my app.

Many more profanities are being hurled at Apple this morning.

<comment><USER6> Sorry but when you base your businesses on walled gardens you are forever at the mercy of others.

There is nothing to complain about here; you've just got to suck it up.

<comment><USER7> The business is not based around mobile, but if you're going to have any kind of mobile apps - however incidental to your core product - you have to put up with it.

</comment></comment></comment><comment> k-mcgrady It took over 3 weeks to restore everything. I hope Apple does some sort of post-mortem (at least something basic). When a security breach takes you down for this long it was either a very serious breach or your security and infrastructure was shit and your customers deserve to know how you've remedied that.

</comment><comment><USER8> ..if microsoft's or google's services were down for this long hell would freeze...

just saying that apple seems to be getting treated better for no reason

<comment><USER9> On the flip side, Apple took a security issue very, very seriously, and for that they should be commended. I mean, obviously better if it were found beforehand, but clearly someone outside of the people in charge of these web properties had a WTF moment and life became unpleasant for some people for a while.

Most firms would have duct-taped the specific section exploited.

<comment><USER10> > On the flip side, Apple took a security issue very, very seriously, and for > that they should be commended.

Though they were warned before the breach occurred, right? They didn't take it seriously until well after they knew they needed to fix it.

</comment></comment></comment><comment><USER11> Great Saturday morning news, I've finally able to run my new iOS app on my iPhone! I had to accept new T&C before getting certificates/provisioning- profiles, and this has been impossible for weeks.

<comment><USER12> The profiles center has been a online for quite a while now.

<comment><USER13> But the agreements portion wasn't. My company's enterprise license was supposed to run out a week ago. Luckily they extended it, but the hub of everything - the agreements server - was down.

<comment><USER12> ugh, what a mess.

</comment></comment></comment></comment><comment><USER14> Argh, it's silly that it takes some time for a membership renewal to take effect.

<comment><USER14> Why isn't this valid criticism? Buy a digital membership anywhere else and the effect is immediate. Buy something on iTunes and you get the product immediately.

</comment></comment><comment><USER15> Let's pour a cider on the ground for all the fallen evenings and weekends that were surely sacrificed by our industry comrades to accomplish this restoration.

<comment><USER6> For fucks sake. If they'd done a half decent job to start with, they wouldn't be there.

They fucked up, now they're paying for it.

<comment><USER15> Surely you don't believe that everyone who busted their ass to fix the problem was also responsible for causing it?

</comment></comment></comment><comment><USER16> If Apple had a security breach, and it seems like a massive one given the circumstances, are they not required by California law to report it to their customers?

<comment><USER17> They did report that there was a breach, that some personal data about developers (but no credit card info or passwords) was stolen and that they are restoring the developer center.

That's more than enough reporting. If you want a full post-mortem, that's likely not something you'd get from a public company as big as Apple

<comment><USER18> You wouldn't get a full post-mortem from a company like Apple, because they are wilfully intransparent. My employer (Spotify) for example posts somewhat detailed post-mortems[1] after big outages - doing this always comes with a spike in job applications so it's positive in several ways.

Another comment mentioned that AWS post-mortems are also detailed and public, they don't really have another choice because their customers have their infrastructure running on AWS - so they want to know what happened and not be left in the dark.

[1] [http://labs.spotify.com/2013/06/04/incident-management-at- sp...](http://labs.spotify.com/2013/06/04/incident-management-at-spotify/)

</comment></comment></comment><comment><USER19> It is not for me. When I try to _Join_ __SAfari developer Program __it is redirected to this URL:

[https://developer.apple.com/iphone/urlRedirect.action?mode=e...](https://developer.apple.com/iphone/urlRedirect.action?mode=enroll&successURL=https://developer.apple.com/ios/enroll/individualEnrollmentIndex.action&cancelURL=https://developer.apple.com/programs)

<comment><USER20> From the action URL, this seems to be the page you want — [https://developer.apple.com/ios/enroll/individualEnrollmentI...](https://developer.apple.com/ios/enroll/individualEnrollmentIndex.action)

</comment></comment><comment><USER21> Hmmmm, after I accepted the new terms & conditions, the iTunesconnect still ask me to accept it in Member Center. I didn't expect to have some sort of delay between the changes in Member Center and iTunesconnect. Hope it takes effect soon. Sigh.

</comment><comment> X-Cubed I was wondering why I was unable to access any of the services that were supposedly back online. Now that the Member Center is back, it turns out there were new Terms & Conditions I needed to accept first... argh.

</comment><comment><USER22> My account is still subject to expiring even though I did a renewal before things went down - should have eleven months at least.

Anyone else got this issue?

</comment><comment><USER23> Not not often one to praise Apple, but I'm really impressed that they spent the time they did to fix this. Apple are known for their strong brand and taking down the dev centre for so long must have been an awkward decision between the marketing side and the technical one.

I don't know the extent of the problem but taking down an online service for weeks is very uncommon. I guess (speculating a bit) that Apple could have applied a quick fix to the problem within a day to save their (short term, at least) brand appearance. I think "just getting it secure enough" is the most many people would do if an important service was down. It appears that Apple took the time required to deploy a proper fix, prioritising security over shot term wins.

It would be interesting to see what someone like Microsoft or Amazon would have done in this situation, or what Apple would have done if it was all of iTunes instead of the dev centre.

<comment><USER24> You're impressed they spent time keeping their cash cow alive? No offense to the developers, but there has been very little to no communication. I'm magically waiting for the guy with the best F5 time on the dashboard to get my news? Again, no offense to the developers, but there's no indication that this was not a "quick fix" by industry standards (of security) and not just "secure enough."

As usual, a dashboard of green lights does not identify uptime, as can be established by the issues people are still having with the platform.

<comment><USER25> >No offense to the developers, but there has been very little to no communication.

There's been weekly or slightly shorter than weekly updates and a 24-hour status page. Also, most key portal functionality was available not that long after the breach.

It's a little unfair to say "very little to no communication".

<comment><USER26> Communication that says they are down and that's it. I sent mail to support and they sent me a mail asking me to wait. I had to wait for a month now to accept the new license.

In my books, that is no communication. They haven't told us what the problem was at the end of the day.</comment></comment></comment></comment>


Python Internals: Adding a new statement to Python - <AUTHOR> http://eli.thegreenplace.net/2010/06/30/python-internals-adding-a-new-statement-to-python/

<comment><USER2> The Scheme version is not worthy of a blog post:

      (define-syntax until
        (syntax-rules ()
          ((until pred expr ...)
           (let loop ()
             (if (not pred)
    	     (begin
    	       (begin expr ...)
    	       (loop)))))))

In dialects with WHEN syntax (mzcheme, Kawa, probably many others) it's even more concise:

      (define-syntax until
        (syntax-rules ()
          ((until pred expr ...)
           (let loop ()
    	 (when (not pred)
    	       (begin expr ...)
    	       (loop))))))

<comment><USER3> Do you use any lisp code in ourdoings?

<comment><USER2> Yes, it's mostly Kawa Scheme, adapted for the web. You might notice <http://brl.codesimply.net/> and <http://ourdoings.com/> have the same IP address.

</comment></comment></comment><comment><USER4> I will never, ever do this. But I still love this kind of article, that gives a deeper insight into how things work.

<comment><USER5> If you've never messed with real parsing and compiling before I highly recommend it. It's like lifting programmer weights, so many other problems seem easy afterwards.

<comment><USER4> Yes, I took compiler design in college, and even in the real world I've had lex and yacc coming out my ears.

But specifically, I'm never going to add new statements to the python interpreter.

</comment></comment></comment><comment><USER6> General observation about _until_. I think it works better "linguistically" as a REPEAT/UNTIL (ala BASIC) and not as a negative _while_ loop.

So block of code always gets run at least once. For eg. in Perl:

        my $x;
        do {
            print "guess the number? ";
            $x = readline;
        } until $x == 10;

Disclaimer: Can't recall using _until_ since I last played with BASIC. And that was many years ago :)

</comment><comment><USER7> Great breakdown.

I tried something simpler once, trying to map str.format() to a binary operator in Py3k.

<http://github.com/jcsalterego/py3k-atsign>

Needless to say it didn't pass the python-ideas (or was that python-dev?) mailing list trial, mostly because it produced ambiguities that plagued the % operator, which prompted this new str method in the first place.

</comment><comment><USER8> Can anybody write a macro statement this way?

Something like:

macro square(x): return exec("#{x}*#{x}")

might be useful.

Edit: can anybody help me how about the comments markup. I tried searching around but couldn't find anything.

</comment><comment><USER9> "There should be one-- and preferably only one --obvious way to do it." 'while' is it, 'until' is not.

The author even notes that 'until cond' is functionally identical to 'while not condition'. A fun exercise for the author, if a bit silly.

<comment><USER2> From the section "A language-advocacy digression":

 _This article doesn't attempt to suggest the addition of an until statement to Python. Although I think such a statement would make some code clearer, and this article displays how easy it is to add, I completely respect Python's philosophy of minimalism. All I'm trying to do here, really, is gain some insight into the inner workings of Python._</comment></comment>


From Wasteland to Fund-Maker: A Contrarian Bet in Nuclear Waste Cleanup - <AUTHOR> https://medium.com/@lux_capital/from-wasteland-to-fund-maker-4c7aab08c45f#.8ylbz41dq <comment><USER3> Vitrification has been around for decades.[1] And the fact that they seem to be taking complete credit for cleaning up Fukishima (as if it were completely cleaned up) is ridiculous.

[1]: [https://en.wikipedia.org/wiki/Sellafield#Waste_Vitrification...](https://en.wikipedia.org/wiki/Sellafield#Waste_Vitrification_Plant)

<comment><USER4> I'm curious how much they have contributed to the cleanup.

<comment><USER5> As am I, reports of widespread wildlife dying? Seems hard to believe when nobody else reported it.

<comment><USER6> Some reports have come out about mass bird deaths, a group did a study that saw large population decreases;

[http://www.smithsonianmag.com/science-nature/birds-are- tails...](http://www.smithsonianmag.com/science-nature/birds-are-tailspin- four-years-after-fukushima-180955134/)

<comment><USER7> That article already explains:

        They offer no good controls, because we aren't
        working with data from before the accident.

It's rough Geiger counter reading without any effort to determine if those readings are _normal_ , or if there is an increase then which isotopes are causing the reading and where they came from.

That last point is especially important, because when Japan shut down the nuclear reactors after the tsunami, they increased their use of coal, which can be a larger source of radioactive pollution.

Also, while the article doesn't really have enough details to say for certain, using only Geiger readings suggests an analysis based on the incorrect "linear no-threshold" model. The lack of concern for a control suggests they are assuming that any radiation is must be dangerous.

After skimming the paper[1]... I'll have to defer to someone with a better background in statistics. Their modeling seems strange and there seems to be too much focus on P values, but that may be my misunderstanding.

[1] [http://link.springer.com/article/10.1007/s10336-015-1197-2/f...](http://link.springer.com/article/10.1007/s10336-015-1197-2/fulltext.html)

</comment></comment></comment></comment></comment><comment><USER8> Very inspiring article. Great thesis backed with excellent execution - <USER2> impressive work from a vc.

</comment><comment><USER9> Really interesting take on energy, especially relative to over-concentration in cleantech that other investors bought into at the time</comment>


Thoughts on Kubernetes - grey-area https://blog.nelhage.com/post/kubernetes/ <comment><AUTHOR> I too played around with k8s but my issues were even more basic: It's darn near impossible to deploy it on a platform that deviates from their expectations.

The docs seem to expect that:

\- If you're not letting managed services do most of the work for you, you're running on one of CoreOS, Ubuntu or a RHEL derivative

\- You know all about "CNI" and how it magically makes everything work

\- You know that the default "security" is none at all

Deployment is just so much harder than it should be. Fundamentally (I discovered far later on in the process), Kubernetes is comprised of roughly the following services: kube-apiserver, kubelet, kube-proxy, kube-scheduler, kube-controller-manager. The other dependencies are: A CA infrastructure for certificate based authentication, etcd, a container runtime (rkt or Docker) and CNI.

The steps for setting up a simple installation should be able to fit on a single page. If it weren't for a bug crippling my cluster, I would have done it myself (it seemed to be running but a bug with cadvisor's disk space detection messed it up to the point where it was useless).

To get a handle on what I mean, have a look at the docs for Ceph, another reasonably complex distributed system. Here are the manual installation docs: [http://docs.ceph.com/docs/master/install/manual- deployment/](http://docs.ceph.com/docs/master/install/manual-deployment/). It's a list of commands to run and a basic idea of what the config files should look like. Following that guide actually results in a running Ceph cluster. Now have a look at the manual installation docs for Kubernetes: [https://kubernetes.io/docs/getting-started- guides/scratch/](https://kubernetes.io/docs/getting-started-guides/scratch/). It's a bunch of links to other parts of the docs, pretty much no practical guidance on how to _actually_ set up the cluster and the few commands that have been suggested are mostly outdated (for example "\--configure-cbr0" doesn't exist on kubelet anymore). Following it _can_ result in a working cluster but only with _a lot_ of additional work and study (it doesn't give you anything on networking, which is essential).

<comment><USER2> You'd either use the ansible or salt recipes for k8s to install. Everything is nicely documented there.

There are a few very nasty pitfalls on the way to your k8s install in production though...

We deploy kubernetes on hundreds of nodes in multiple locations and i've to say i've never ever looked at any install docs. ACK, they are basically useless, but overall i find the documentation quite good (except not up to date with the code on may locations).

What's severly missing is the overall picture!

But lets not stop there, if you want to have k8s running properly in production you practically have to make all containers yourself, otherwise some shitty container from dockerhub will bring your node down one after another (hint: read-only containers).

</comment></comment><comment><USER3> > I was unable to find a way to force kubernetes to do a "no-op" redeploy just > to get it to re-pull a tag.

A deployment redeploys (i.e. creates a new ReplicaSet and rolling-updates to it) whenever its YAML changes. So the common way to do a "no-op" redeploy (assuming `imagePullPolicy: Always` on the containers) is to add an annotation to the PodSpec that has no actual meaning, but which you can modify to trigger the creation of and migration to a new ReplicaSet. For example, you could put a timestamp, or you just count it up every time you re-deploy.

I would discourage usage of unchanging image tags, however. When you have immutable image versions, you will have a much easier time rolling back to a previous release if the new release breaks. At $work, we use human-readable timestamps most of the time, e.g. `201702210945`, that signify when the image was built.

> The final question I don't have a satisfying answer for is how to deploy > configuration data into my docker images.

Did the author look at [https://github.com/kubernetes/helm](https://github.com/kubernetes/helm)?

> Kubernetes secrets are stored in plaintext in etcd, which is fine for many > applications but would probably scare me at a certain scale.

Yeah, that's indeed a problem. The best you can do right now is wrap access to Kubernetes and etcd in as many layers of firewall and two-factored SSH and whatnot as you feel are necessary.

NOTE: Answer was updated multiple times while I read through the submission.

</comment><comment><USER4> I can relate to that.

As we run > 500 instances on AWS and GCP combined, we gave K8S a try, to see if we can get a shorter+simpler+cheaper way for our production.

K8S on GKE (Google Container Engine) turned out not to be a good fit for our needs at the moment. Instead, we found ways to get more efficient with platfrom's provided provisioning API to gain all what we wanted with K8S in a far mature env.

</comment><comment><USER5> > "However, I have no idea how to build such trees of images using > Dockerfiles."

Wait, isn't the layering one of the whole points of Docker? You build that base image then use that tag in the other three docker files that'll then build on top of that.

The author does then mention issues with tagging, and I can relate to that more. Our team ended up with a cludgy mess of tags and we all had some form of a docker rmi command aliased for quick use every now and then. The build server had a tough time of its own

</comment><comment><USER6> k8s is a pain on AWS. Its much nicer on gcp but it looks like even there it's got issues.

Although it's great as an open source project - it's fun to finally have a nice distributed computing platform that works anywhere. Docker swarm is great too.

<comment><USER7> i'm just a developer and i found it every easy to deploy a k8s cluster with kops.</comment></comment>


Game Devs Abuse Copyright to Censor Negative YouTube Review - <AUTHOR> http://torrentfreak.com/game-devs-abuse-copyright-to-censor-negative-youtube-review-131021/ <comment><USER2> Dev says, _We protected our copyright because Total Biscuit has no right to make advertising revenues with our license._ [1]

Then why they gave him a key in the first place?

1.[http://steamcommunity.com/app/242800/discussions/0/810938810...](http://steamcommunity.com/app/242800/discussions/0/810938810809560203/#c810938810832992221)</comment>


Apple's patent on inductive charging - <AUTHOR> http://www.freepatentsonline.com/y2012/0246374.html

<comment><AUTHOR> As also covered here [http://www.powerpage.org/2012/09/27/apple-files-patent- for-i...](http://www.powerpage.org/2012/09/27/apple-files-patent-for- inductive-charging-pad-that-could-also-offer-device-syncing-features/) and here [http://www.pt-news.org/apple-inc-aapl-patent-shows- inductive...](http://www.pt-news.org/apple-inc-aapl-patent-shows-inductive- charging-syncing-docking-in-the-works-for-iphone/1211399/)</comment>


Put Chubby Models on a Diet with Concerns - <AUTHOR> http://37signals.com/svn/posts/3372-put-chubby-models-on-a-diet-with-concerns <comment><USER2> I really liked the tone of this post.

It presented an argument, offered alternative viewpoints, and articulated why the author thinks his approach is better than alternatives (without overly attacking them). Code samples were provided with real-life examples.

Whether or not I side with Concerns or DCI or something else, I got value out of reading this post and my understanding of Concerns improved.

This is a welcome relief to what was becoming a tense and drama-filled debate (Rails OOP design). Nice work, dhh.

<comment><USER3> Can you link to some of this debate? I have always been curious about this drama I hear of.

I've never been particularly involved in any programming communities and I am having a hard time imagining what it is like.

<comment><USER4> Here's some of it: <https://twitter.com/garybernhardt/status/280747761773707264>

If you want more, just check out the tweets between @dhh, @garybernhardt, and friends on Twitter yesterday. There are also links in there to blog posts and code examples using DCI, DAO, etc. to achieve similar goals.

IMHO, this is one of the more interesting debates. Of course, not everything can be adding 'coffeescript' to Gemfile: <https://github.com/rails/rails/compare/9333ca7...23aa7da>

</comment></comment></comment><comment><USER5> This is my favorite part of the piece: "I far prefer current_account.posts.visible_to(current_user) to involving a third query object."

I couldn't agree more.

People treating the single responsibility principle as the holy grail keep advocating an object for everything. In more complex cases, you may need an object for something, but not in every case. In those simpler cases, I think something like what DHH's example advocates is more appropriate.

<comment><USER6>
      Viewer.visible(current_account.posts, to: current_user)

That's essentially a function inside a module/namespace. You aren't making a separate class/object for it.

<comment><USER7> That's essentially my beef with most query objects. Wrapping a query in an object like that is usually too much ceremony for something that's just a method.

It doesn't get any better by having Viewer.new(current_account.posts, current_user).visibles or #execute or whatever else you'd do in a query object.

</comment></comment></comment><comment><USER8> Can anyone 'splain, using little words, or refer me to a 'splanation of just enough Rails info to follow this article?

(Highly amused formerly chubby gal who felt fine about her body back in the day and got drawn into reading this piece by the ridiculous "sexist!" accusations -- highly amused because this stupid stuff might lead me down the slippery slope to actually begin learning to program. Thus any cooperation is much appreciated. Mmkay? Thanks!)

<comment><USER9> In Rails, "models" represent data (like a User or an Order), how they are saved to the database, and how they behave. "Controllers" coordinate pulling the correct models out of the database when they need to be rendered to HTML or other request. The longstanding conventional wisdom regarding the two is "fat model, skinny controller"; i.e., if you have complicated logic about for example which User can view which Orders, don't put that logic where you generate the page, but move it into the User object.

The problem is that eventually you get very fat models. You can easily imagine how much behavior something as common as a User might have, and you get massive classes that act like junk drawers for can_view_order? and can_order_new_item? and has_archived_orders? etc. DHH here is presenting a possible solution to that problem. There are links elsewhere here to other solutions.

<comment><USER8> Okay, I can imagine that would lead to fat models. So, why is that a problem? Slow? Glitchy? Something else?

Thanks!

<comment><USER10> If the model gets big, it's an indication that it is doing too much work. You want every class in your system to have a single well-defined role--if the classes are getting huge it might mean that there's code duplication or it might mean that the class is taking on too much work.

In this context, DHH is pointing out that rather than duplicating the code for tagging and the code for managing visibility and the code for managing a Dropbox account on each class that needs these things you can use a Concern to abstract out each of those groups of functionality and then apply them case- by-case with one line of code. It's a pretty neat trick and used appropriately it looks like it would really help keep the model layer trimmed down to its bare essentials.

<comment><USER8> Ok. To me, that sounds kind of like what CSS does for HTML -- less code, faster page loading, that sort of thing. Is that about right?

Thanks.

<comment><USER10> Yes, basically.

Less code? Yes. Cleaner code? Yes. Faster? Probably not detectably faster or slower.

</comment></comment></comment></comment></comment></comment><comment><USER11> Dude. Women in tech. Come on, man. You can come up with a better title for you article than one that explicitly evokes body issues. Party foul.

<comment><USER9> Normally I consider Poe's Law to be the internet's omnipresent excuse for gullibility, but in this case, I truly have no idea whether this is meant to be a legitimate complaint or a bad joke.

<comment><USER11> It's just a flat-out bad title to use because it explicitly and intentionally uses body issues to make a point that could be made in another way. I'm no feminist crusader, I just don't think that's a cool thing to do.

<comment><USER12> I'm pretty sure that it's your fault as a reader to assume that the models being metaphorically referred to are human females. That's only one of many possibilities, but unfortunately, you not only leapt to that conclusion, but decided that women's body issues needs a white knight on HN.

<comment><USER13> Ask a random sample of engineers what "chubby models" refers to, and if less than half think of fashion models, I'll be greatly surprised. IMHO it's the most sensible semantic binding.

As for your characterization of dccoolgai's actions as being a "white knight": take your polarizing term back to reddit. Inaction in the face of speech that marginalizes a certain group only furthers that marginalization.

Also, dccoolgai, why did you leap directly to women's body issues? There are make models with body issues as well.

<comment><USER13> A crucial detail that I left out because I typed my above reply on a mobile device, is: note that I first talked about a random sample of _engineers_.

There are tons of people who work with engineers but who are not themselves engineers. These people will be even less likely to think "MVC models" and more likely to think "fashion model".

Another group is the general public or people choosing a college major or vocation. These people have never been exposed to MVC, so they will assume you're talking about "fashion models" with 100% certainty.

These last two groups are exactly the people who you don't (or shouldn't) want to feel automatically excluded.

You may as well paint a picture of the entire "tech industry" with a giant "NO FATTIES" sign.

<comment><USER12> You cannot seriously be inferring that women in technology deserve such light treatment that an extremely light pun made via a framework reference is the same as painting the entire tech industry as having a "NO FATTIES" attitude.

The tech industry was borne of "geeks" and "nerds" and other such social outcasts. These groups of people were and are still being maligned as "virgins" and "having no friends" and "living in their mom's basement", etc. These tropes are only the more popular the larger and more dense the Internet becomes. But where is the outrage for the maltreatment of these individuals, who make up a now large segment of society (with the growth of the technology sector)?

Nobody cares, because you either identify positively with that characterization (I'm a real geek!), or there is such cultural inertia that the phrases have become no longer harmful (read: the euphemism treadmill).

Regardless, it's BS to suddenly jump to the aid of an extremely narrow segment of society because of a simple pun. I mean, honestly, despite our society having a real problem with female body issues, does anyone really feel badly for female fashion models? And can you demonstrate a similar defense for another segment of society that you actually identify with and feel needs protection? Because if you can't, then (like the phrase or not), you're just being a white knight because it makes you feel good about yourself.

<comment><USER14> Stop stripping out context. Stop simplifying. Stop reducing. The title, in and of itself, is not indicative of the entire industry having an attitude. When you tie it in with many other things, you begin to see the problem. I'm sure you'll deny there is one though, because it doesn't affect you.

Your bizarre rant about geeks is a problem which does not exist outside of high school and some corners of the internet inhabited by people still in high school. These geeks are not an oppressed class. At all.

I know fashion models. They have problems just like everyone else. Also, stop calling women females. It's really creepy.

You have some serious issues with your worldview.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER15> Am I the only one who thinks that tying your model to the database is a bad idea and that adding "concerns" doesn't fix that fundamental problem?

<comment><USER5> I'm certain that you are not; however, in many cases, the ActiveRecord pattern is perfectly fine.

</comment></comment><comment><USER16> I don't agree with equating cross cutting concerns with the purpose of "roles" in DCI. These are not mutually exclusive ideas. DCI is seems almost exclusively concerned with changes in domain state. That is, organizing the interactions between actors in the domain model into contexts which, generally speaking, result in changes in state.

I find, DCI doesn't say much with regards to how you query that state or present it to the user. I don't need a context or role to query data. Concerns do seem to provide some really nice ways to "DRY" things up on that end.

Certainly you can use concerns to deal with interaction/role type issues, but then they really aren't all that "cross-cutting" they tend to be specific to a particular use case or scenario. In which case I think there are better options. DCI is one, domain services are another. But hey, if Concerns work as your golden hammer by all means. I have some doubts.

I don't see this as a DCI vs. Concerns argument. However, if you want to argue it isn't possible to do DCI well in Ruby (extend sucks, yadda, yadda, yadda) go right ahead.

</comment><comment><USER17> Sorry but where are the chubby models? Maybe I misread, but it seems like this is an argument over many _small_ models vs. using aspects.

A chubby model would be one that implemented its own versions of multiple cross-cutting concerns, no?

Great title though, very creative. And also a very good idea in practice.

</comment><comment><USER18> Ugh. Edit the title and try again.

</comment><comment><USER19> Is this pretty much what you'd do in Django by using abstract base models as a mixin?

I've got an abstract model 'PageLike' that contains a bunch of fields common to all page-like concrete models (title, metadata, content, last modified etc)

Or is there something more going on here?

</comment><comment><USER20> I really hope this doesn't turn into a sexism argument

<comment><USER21> Don't feed the fucking trolls. DHH is trolling you with the title.

It is sad that you are pre-emptively pulling the anti-feminist card, but it also indicates that you do not understand what actual sexism is, or why it upsets people.

<comment><AUTHOR> I'm not saying it's a great title but is he trolling? Rails has a popular saying: "fat models, skinny controllers". This title is a riff on that. No body issues need come into it.

<comment><USER21> Yes, he is trolling HN with the title, because you can get sadly predictable conversations like this one.

The title is specifically intended to be a double entendre (and kind of a clever one). If you really want to disassemble this whole thing, it's the clever use of "diet" that makes the pun.

<comment><USER22>
        >Yes, he is trolling HN with the title, because you can get sadly predictable conversations like this one.

The article was published on the 37signals blog. I doubt DHH considers HN the center of the tech universe, given anecdotes of his general disposition I can't imagine him thinking "just wait until the HN crowd gets a load of this title".

<comment><USER21> Okay, let me temper my statement a bit. DHH is good at marketing, he knows how to stir the pot. He may have not specifically targeted this at HN, but it's hard to believe that he did not assume that this would not make it to HN.</comment></comment></comment></comment></comment></comment>


Show HN: Desktop productivity app aimed at coders and normals - <AUTHOR> https://github.com/gavJackson/Cyrus-App/releases/tag/0.1.41-closedBETA <comment><AUTHOR> I have been making a thing over the past few months and I have just published my BETA release, its a desktop productivity application for snippets and live templates and I intend to try and sell for actual money, but first i need to work out if what I have built is any good - I would really appreciate it if you had a look.

</comment><comment><AUTHOR> ...and I am using Clippy from old MS Office 2000 era! (and yep I am using Comic Sans as one of my main fonts! (sortof))

</comment><comment><AUTHOR> and yes, i realise this is not a closed beta, I changed my mind and made it public but had already published the link...doh!</comment>


Programming like a Pirate (Alt+Shift+M) - <AUTHOR> http://kranglefant.tumblr.com/post/30266564679/programming-like-a-pirate-alt-shift-m

<comment> guard-of-terra The problem with

      if (page.hasAttribute("Test")) {…

is when you then decide to change boolean attribute Test to an enum attribute Environment with values Development, Test and Production.

Because now you have to hunt down all the page.hasAttribute("Test") in your code and replace them with something different. And if your code is creepy enough you will miss one or two and something will break.

So you have to look very carefully whether you repeat the same checks. If you repeat a check in different places and it has some meaning, you should abstract it away.

<comment><USER3> That's simple - change the method so all those invocations are invalid now.

If you're using a compiled language, the compiler will tell you all the lines that need changing.

If you're using a dynamic language, you should have test coverage for all those methods and your tests will blow up with "no such method".

Or maybe, you could special-case the 'hasAttribute(name)' method so it logs a debug warning and checks the enum attribute.

Really, there are enough ways to deal with that and you're far from the first person to have had that problem.

<comment> guard-of-terra "you could special-case the 'hasAttribute(name)' method"

Please don't do this never.

<comment><USER4> I believe "temporarily" was implied.

<comment> guard-of-terra And when are you going to take out that? If you leave, who will take care of this hack?

<comment><USER4> This isn't my argument -- I've never taken this approach -- but if the need came up, it would never go into source control; it'd only be there long enough to run test suites locally and find the broken code that needed fixing.

</comment></comment></comment></comment></comment></comment><comment><USER5> I'm not sure I agree with this. If I'm looking at the implementation of a function, it's because it's done something wrong. For this function, I would fire up the debugger and say:

"Does isTestPage() return what I expect? Yup, so the problem is going to be in surroundPageWithSetupsAndTeardowns()."

A well named function becomes a black-box; you can tell if it's working just based on its inputs and outputs. Why open black boxes that are working?

<comment><USER6> > Why open black boxes that are working?

Maybe to modify them ?

<comment><USER7> Or even to understand how they are working and to check if they are really working correctly?

I really don't like this attitude of ignoring inner workings of things just because they seem to work. Sometimes we really are working under constraints that make digging through the code impractical, but in my experience these constraints tend to be in the code itself - namely, someone wrote it as a 'black box' with tons of kludges and `if False:` style comments.

I don't want to exaggerate and say that every programmer should know his every tool down to it's last bit, but taking black boxes apart is what makes one a hacker, and what allows one to improve one's skills.

<comment><USER5> Fair enough. Curiosity is a very reasonable excuse for opening a working black box, and is definitely what makes one a hacker.

On the other hand, most systems these days are so complex that you have to have some black boxes. I know more about how my linux kernel works than the vast majority of people I work with, and yet I would classify the majority of it as a black box.

I have a general idea of various trade-offs in efficiency and fragmentation resistance in malloc implementations, and if I have to I can dig into one. On the other hand, jemalloc works great and I just don't have the time to take it apart, so I just use it.

Ultimately to get things done you need to trust that functions do what they say they do until you get evidence to the contrary. Taking functions apart can make you better at doing your job, but rarely fixes the problem you have Right Now.

</comment></comment></comment></comment><comment><USER8> Hear, hear - I've been marking undergrad coding assignments all term, and the ones where they make a new method for absolutely every block of their code are nearly as unreadable as the ones that don't know how to indent or pick good variable names.

<comment><USER9> Mind to show an example? Does the new method have a meaningful name? Are they smartly structured in a hierarchical order? I find it hard to believe that too much methods are harder to read than bad variables or indentation.

<comment><USER8> Keep in mind that these are undergrad projects, so a few hundred LOC tops. But you'll see something like:

      bool noMoreElves() {
        return elfCount == 0;
      }

      void fireAllReindeer() {
        for (int i = 0; i < reindeerCount; ++i) {
           delete reindeerArray[i];
        }
        delete reindeerArray;
      }

      void checkCloseWorkshop() {
        if ( noMoreElves() ) {
          fireAllReindeer();
        }
      }

the above is certainly readable, but takes forever to parse -- the below is, I would argue, just as clear, and much quicker to read (the point the OP made)

      void checkCloseWorkshop() {
        if ( elfCount == 0 ) {
          // fire all reindeer
          for (int i = 0; i < reindeerCount; ++i) {
            delete reindeerArray[i];
          }
          delete reindeerArray;
        }
      }

the comment above the loop is possibly superfluous, but helpful

<comment><USER10> That goes against many recommendations I've read about refactoring and writing cleaner code:

"Good code invariably has small methods and small objects. I get lots of resistance to this idea, especially from experienced developers, but no one thing I do to systems provides as much help as breaking it into more pieces."

– Kent Beck

<comment><USER11> The little research I've seen has not backed up that opinion. While that view is shared by many - especially those who come from a Smalltalk heritage - <USER2> studies I've read about do not show a clear association between small pieces and more readable/maintainable code, at least not for code blocks under 100 lines or so.

I dislike reading Smalltalk influenced code with many small pieces. They tend to use instance state as a way to pass parameters, and that makes me uncomfortable - I have a leaning towards functional programming.

I also distrust function names. A function like "noMoreElves" might actually be "no more elves!" and implemented as "elfCount = 100". I exaggerate a little, but an inline "elfCount == 0" is much easier to verify than having to jump elsewhere to see the code.

</comment></comment></comment></comment></comment><comment><USER12> I agree that unit tests for internal (non public) functionality are not particularly useful, and can hamper your willingness to change an internal implementation for the better.

I also agree it's painful to trace through dozens of classes/methods to determine what the actual implementation is. However, I don't agree the culprit is small methods. Small, interdependent methods in a single class (or package) are great and can be easy to follow if they are consistent. Usually the culprit is overuse of inheritance and design patterns.

However, one case where I find myself being less "fancy" is functions that run/generate SQL statements. Although there are many cases where you can re- use certain portions of SQL statements and build up a query through smaller functions, this ends up being a nightmare to debug. I find it is better to be as plain and explicit as possible.

</comment><comment><USER13> Programming like a pirate? I was expecting this to be about _R._

</comment><comment><USER14> _> Did you ever learn how to read code at university? Were you shown loads of different code, in different languages and different styles, and then asked to explain what the code did? I don't think code comprehension is a normal part of the curriculum for computing science classes. We're taught how to write, not how to read. Maybe that's a mistake._

Dear lazyweb,

I want to bridge that gap in my education. Where do I go to read loads of code in different styles? With the emphasis on plurality of styles.

<comment><USER15> Github?

<comment><USER16> I would recommend the above, along with chapters from <http://www.aosabook.org/en/pypy.html> as a guide

</comment></comment></comment><comment><USER17> > Think about this, in your experience - why do go have a look at the > implementation of a method? Either you need to change it somehow, or it > isn't behaving as you thought it would.

 _When I have been left stranded without API documentation_ , I look at method implementations to figure out which method does the thing I want, if any. This is normally at least somewhat painful--but it's occasionally downright _pleasant_ , when the author of the original code has written it in this "every method is written as if it is exactly as deep in the abstraction hierarchy as you'll need to go" style.

Which is to say, when you code like this, it's pleasant enough to read the source for that purpose that docs become somewhat redundant. I could imagine an editor designed to interact with code written like this, just displaying in a sidebar the implementation of any function you scroll past in autocomplete-- because that's exactly as much, and as little, as you need to know to decide whether that function is the one you want.

</comment><comment><USER18> Is Alt+Shift+M significant to the article? I don't normally code in IDEs.

<comment><USER19> Alt+Shift+M extracts text to a method in Eclipse.

</comment></comment><comment><USER20> This is part of the art of our work as software craftspeople; choosing when to refactor and when not to. There's no great joy in reading 400-line functions, and no great joy in hunting down 10 levels of the call stack to find out what is going on.

</comment><comment><USER21> on CleanCoder: I know $1 is just $1... but putting a sample video that I can just click to see would help _a lot_</comment>


TianoCore UEFI FatPkg switches to 2-clause BSD license - <AUTHOR> http://thread.gmane.org/gmane.comp.bios.edk2.devel/9930/focus=9956 <comment><USER2> This is (as Laszlo says) critically important for free software virtual machines that want to boot a UEFI BIOS, like ARM architecture ones. Previously even if your VM was free software (like QEMU/KVM), you couldn't ship the BIOS blob with a distro, except in a non-free subsection somewhere. Now the whole VM stack will be completely free software, and it will be straightforward to make it all just work out of the box.

(The previous license for the FAT driver was "2-clause BSD but with an extra term forbidding use of the code outside a UEFI implementation". That's obviously not an issue for manufacturers putting UEFI BIOSes into real hardware, but it was a real awkward point for open source VMs, and it's great to see it's been resolved.)

<comment><AUTHOR> It is great for people who want to prove a UEFI Secure Boot setup before going to Microsoft for the keys.

</comment></comment><comment><USER3> A brief overview of Tianocore: [https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_In...](https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#Intel_EFI)

</comment><comment><USER4> Yet another piece of free firmware that isn't under the GPLv3. _sigh_ The only reason we can use UEFI laptops is because Microsoft was feeling kind one day. If TianoCore was GPLv3, we could use both ARM and x86 UEFI devices in freedom. I'm sticking with LibreBoot, thanks.

<comment><USER5> Yes, we have a piece of free firmware that can be used by BSD software, CDDL software, Apache licensed software, etc. GPLv3 means that only one group of people can use that software, instead of letting a larger community work on it and contribute to it.

<comment><USER4> _FUD intensifies_

First of all, there's no reason you can't use GPLv3 licensed software in any other project. It just means that the collective work has a different license. Sure, some people might have a problem with that, but that's their problem. If the software is good enough for them to use it, it's good enough for them to make some compromises in terms of licensing.

The exception to this is the CDDL, which has some issues that have been discussed at length. However, the MPLv2 (which is what people who didn't work at Oracle in the 90s _actually_ use) is compatible with the GPLv3.

And as for "only one group of people can __use __that software ", that's just patently wrong. Anyone can use the software, they just have to follow the license requirements.

Not to mention that this presupposes that someone is going to do anything _but_ write more firmware using firmware code. It's not a library, it's a piece of software used to boot your bootloader. Okay, it's a FAT driver, but it's written as a UEFI module and would probably require substantial (read: complete) rewriting to work as a kernel module or userland program.

IMO you're looking at the problem the wrong way around. The question shouldn't be "how do we pander to people who want to use proprietary-friendly licenses for their software". It should be "how do we ensure that all users of this firmware cannot have their freedom taken away".

<comment><USER5> There's no reason...except you have to relicense your entire project. In the same vein, there's no reason the Linux kernel can't mainline ZFS, they just have to relicense the kernel to CDDL. If the software's good enough for them to use it, the software's good enough for them to make compromises in terms of licenses.

Second, the CDDL originated with Sun. Oracle wasn't even anywhere near Sun when the CDDL was being written, and the CDDL is not even Oracle's favored free software license. Look at the free software they steward -- Java, Mysql, and Berkeley DB. All of which is either GPL or AGPL with contributor agreements, so they can continue to profit on closed source versions that the community doesn't get. Compare that to Postgres, which is BSD licensed, and doesn't have one monolith that can do anything they want because they have a legal advantage.

Yes, you can only write more firmware code with the FAT driver, but as we've seen from the track record of Clang, the BSDs, Postgres, and other liberally licensed software, what really matters in getting changes open isn't the license, but rather the pace of development. Develop fast enough, and people will contribute back, both because it's the right thing to do and because it's a lot of work having to make huge patches every upstream release. Compare that to the situation with GPL-encumbered software like MySQL, where there are still rather key pieces of the stack that can and are held back because it's not in Oracle's best interest to give them to the community.

So yes, BSD gives more freedom to everyone. A few bad actors may make a short- sighted decision not to contribute back, but in the end, more people will do good than do bad.

<comment><USER4> > Second, the CDDL originated with Sun. Oracle wasn't even anywhere near Sun > when the CDDL was being written, and the CDDL is not even Oracle's favored > free software license. Look at the free software they steward -- Java, > Mysql, and Berkeley DB. All of which is either GPL or AGPL with contributor > agreements, so they can continue to profit on closed source versions that > the community doesn't get. Compare that to Postgres, which is BSD licensed, > and doesn't have one monolith that can do anything they want because they > have a legal advantage.

There's one very simple solution to this: Fork it and don't require CLAs (or use FSF-style CLAs that guarantee copyleft). In fact that's _exactly_ what happened with MariaDB.

Arguing that the GPL allows for a monolith but BSD licenses don't is a very weird perversion of the facts. A BSD licensed source can be made proprietary without CLAs. A GPL licensed project cannot. So, the solution is simple: don't ever contribute to a project that has CLAs which would allow them to make the software proprietary.

> Compare that to the situation with GPL-encumbered software like MySQL, where > there are still rather key pieces of the stack that can and are held back > because it's not in Oracle's best interest to give them to the community.

Again, MariaDB was forked for this exact reason. And Linux is one of the largest and fastest moving projects in the world and is under the GPL.

</comment></comment></comment></comment></comment><comment><USER6> Yea, most of the FAT LFN patents has expired by now.</comment>


Udacity: How will MOOCs affect higher education? - <AUTHOR> http://udacity.blogspot.com/2012/07/how-will-moocs-affect-higher-education.html <comment><USER2> MOOC = Massive Open Online Course

<http://en.wikipedia.org/wiki/Massive_open_online_course></comment>


Who Cares if NSA Snooping Is Legal? It's Still Disgusting. - <AUTHOR> http://reason.com/blog/2013/06/06/who-cares-if-nsa-snooping-is-legal-its-s

<comment><USER2> Maybe it is. So far, we only have news reports, and they look bad. Hopefully, we'll see some political push to review the program and find out more about its methods and goals.

</comment><comment><USER3> The way NSA and FBI have operated is that they do something illegal/unconstitutional, say like wiretapping phones from people without a warrant, for a few years, and then they lobby for it to become legal, so they can do it freely, and also be able to use it in Court. They succeed "because terrorists", and then they can say "everything we're doing is legal". That law may also be unconstitutional, but by the time it reaches the Supreme Court, it could be decades, and the damage will already be done.

So yes, it is disgusting. Some of these laws get passed with maybe 1% of the population being aware of them or what they really mean, because they obfuscate them so much in their public statements, and the media has been very complacent about it.

I don't think the media even reported the FISA renewal last year, or they didn't do it much at all, at least. As if it wasn't even a big deal. That's what makes it all so disgusting.

Then the administration has the nerve to say "there has been oversight", even though that oversight, besides being hidden from the public, is also very limited:

[http://www.washingtonpost.com/blogs/wonkblog/wp/2013/06/07/o...](http://www.washingtonpost.com/blogs/wonkblog/wp/2013/06/07/obama- says-the-nsa-has-had-plenty-of-oversight-heres-why-hes-wrong/?hpid=z1)</comment>


Spark: Open Source Superstar Rewrites Future of Big Data - <AUTHOR> http://www.wired.com/wiredenterprise/2013/06/yahoo-amazon-amplab-spark/all/ <comment><USER2> Hadoop is a pile of bad code, a stagnant codebase, crusty APIs and a thick surrounding layer of hype which obscures what it's really like to use. Spark might be better or faster, but mostly what you need to beat Hadoop is to make something practical, which lets developers be expressive rather than wrestle with overdesigned nonsense.

I know this because it's my full-time job to actually get stuff done inside Hadoop.

Spark may be a great system, but this article doesn't do much to settle the issue. When you read fluff like "sweeping software platform", "famously founded the Hadoop project", "great open source success stories" and machine learning described as "crunching and re-crunching the same data -- in what's called a logistic regression", it's time to move on.

<comment><USER3> >>Hadoop is a pile of bad code, a stagnant codebase, crusty APIs and a thick surrounding layer of hype which obscures what it's really like to use.

This is where marketing and branding becomes the primary factor influencing adoption, and not technical merit. Hadoop gathered so much momentum and hype as part of the Big Data buzz in the past few years that it's only now beginning to percolate through to telecommunication carriers and other larger/slower-moving enterprises.*

* I work primarily with wireless carriers; can't say much about broadband, although I'd hazard a guess and say that the majority are only now allocating experimental budgets to see how Hadoop can help them manage their Big Data.

</comment></comment><comment><USER4> When I first learned about Spark, I knew this team would go on to build great things and they've gone beyond my expectations all the while being very friendly and supportive of the community.

Among the things I love most about the Spark and the eco-system:

* repl -- so great for running short little experiments or even full blown jobs. saves you time compiling small changes and really get to know your data quickly.

* caching -- processing in-memory opens up many possibilities beyond doing iterative, machine learning jobs. quantifind, for example, demoed a system that allows them to run ad-hoc queries using Shark on the fly across GBs of data (think OLAP, a bit) in seconds or less.

* scala -- makes for very succinct code using closures and built-in operations; check out some examples here: [http://spark-project.org/examples/](http://spark-project.org/examples/)

And some of the upcoming projects are also very cool. Tachyon, for example, will enable users to share data with a very robust in-memory file system. A teammate and I, for example, could have used it recently because we were simultaneously running different analysis against the same data, so we had to cache duplicate instances on two clusters.

</comment><comment><USER5> Spark is a wonderful project, I blogged about it just the other day: [http://subprotocol.com/2013/06/17/spark-darling-of-big- data....](http://subprotocol.com/2013/06/17/spark-darling-of-big-data.html)

Spark make doing MR easy. I've used other frameworks on hadoop MR, but nothing compares with the ease with which you can express computations using it. And it does both batch and real-time/streaming. It is a very well thought-out project.

<comment><USER6> Not only it is easy to use, but the source code is a real pleasure to read, contrary to Hadoop's mess.

</comment></comment><comment><USER7> Can someone explain why the in-memory caching is such a big win? Does Hadoop MapReduce not do caching as well? I'd expect at least filesystem caching when the computation is running on the same machine as the data block...

<comment><USER8> Spark goes much more beyond just in-memory caching. It features a more advanced scheduler and a higher level programming abstraction.

The programming abstraction treats all data as collections (RDD in Spark terminology), and allow programmers to apply bulk transformation on these collections. Some examples of operations you can apply include the traditional map and reduce, the relational filter, join, outerJoin, and more advanced ones like sample. This abstraction makes it much easier to write distributed programs. As the Wired article mentioned, a distributed program written in Spark often looks identical to a single node program. This substantially reduces the amount of code one needs to write for distributed programs, and the best part is the code really expresses the algorithm (rather than cluttered with JobConf setup).

And the scheduler and the engine itself are aware of the general DAG of operators, so they can schedule and run those operators better. For example, if you have multiple maps, the execution gets pipelined; if you are joining two collections that are partitioned the same way, the execution avoids an expensive shuffle step.

There are many other benefits too. I'd encourage you to give a try. Thanks!

Disclaimer: I am on the Spark team at UC Berkeley.

<comment><USER9> Does Spark address the same problems as Storm?

It doesn't look like there's been any direct comparison of the two, though it looks like there's overlap. (I've wanted to start a streaming data processing project, and this looks like it would be good to consider for it.)

<comment><USER10> There are some nice looking Spark vs Storm graphs in their streaming presentation slides: [http://spark- project.org/talks/strata_spark_streaming.pdf](http://spark- project.org/talks/strata_spark_streaming.pdf) . Makes me wonder how biased these might be.

</comment></comment></comment></comment><comment><USER11> Spark project itself: [http://spark-project.org/](http://spark-project.org/)

</comment><comment><USER12> I'm not sure what is meant by supporting Scala and python.

* Here is an example of a simple job written using Scala for hadoop (and uses Mahout libraries) - [https://github.com/sandys/distributed-scala-mahout/tree/wiki...](https://github.com/sandys/distributed-scala-mahout/tree/wiki-1)

* you can embed pig inside jython

* you can write UDFs using jruby or jython.

* I didn't try to figure out how, but I'm pretty sure you can build a standalone job jar using jruby and warbler

There might be a different way of hooking into Spark through Scala or python, but I'm pretty sure that fundamental _support_ is not the big advantage here.

Pig has a repl - but as I quickly realized from playing around, that you end up mucking around with classpath problems (and questions of having your Jars in distributed cache) once you attempt to build UDFs involving a few different libraries.

Plus, I haven't used and so cannot comment on the ecosystem of Cascalog/Clojure - which is as functional as you can get.

</comment><comment><USER13> This sounds amazing. I've done iterative jobs in hadoop before - it's very hacky and I generally just have it launch job after job after job until the result converges to where I want it. I'll definitely try this out soon.

Then again, while I absolutely love doing work with big data, I've been having a bit of an "existential crisis" since the NSA leaks :(

<comment><USER14> > Then again, while I absolutely love doing work with big data, I've been > having a bit of an "existential crisis" since the NSA leaks

Book recommendation: "Who owns the future" by Jaron Lanier.

</comment></comment><comment><USER15> I've met Matei in passing through programming contests (where he is also a star) but even in those brief moments, his brilliance is pretty apparent. Good on him for the recognition---he deserves it.

</comment><comment><USER16> I don't understand why they wrote this in Java instead of a language more suited to the task, such as Erlang.

Can someone explain this to me?

<comment><USER17> According to github, 85% of this is in Scala.

It's written on the JVM for the simple reason that if they wrote it in Go or Erlang, no Enterprise would adopt it as there isn't a CTO at a non-tech Fortune 500 that has every heard of Erlang or GO, and wouldn't know the first thing about trying to hire developers for it. Remember, the jobs written for Map Reduce are done in the same language ( typically ) as the MapReduce code itself.

<comment><USER18> Why didn't they go native?

<comment><USER6> Why would they?

<comment><USER18> I thought they cared about performance...

</comment></comment></comment></comment></comment><comment><USER19> The article discusses the challenge of supplanting entrenched software such as Hadoop. I am actually a bit more optimistic about the ability to swap out Hadoop with technologies like Spark.

At Twitter we don't program using Hadoop directly; we mostly use either Scalding or Pig, languages that compile down to Hadoop code. [https://dev.twitter.com/blog/scalding](https://dev.twitter.com/blog/scalding) [http://www.slideshare.net/kevinweil/hadoop-pig-and- twitter-n...](http://www.slideshare.net/kevinweil/hadoop-pig-and-twitter- nosql-east-2009)

I believe this is how many other companies use Hadoop as well.

The benefit here is that it's possible to write new backends for Pig and Scalding that compile down to Spark or anything else. And then you have backwards compatibility with all your old big-data code.

<comment><USER20> One of the Cloudera devs told me 80% of all Hadoop users run Hive. This suggests most devs secretly want to continue using SQL, but want more scalable relational solutions. Thus why Cloudera is backing Impala, and Facebook is about to open source Presto.

I worked on an entire team of developers where I was the only one who understood the raw Java MapReduce API. Almost everyone else on my team got by with learning HiveQL, and a very minimal understand of MapReduce design flow.

Your belief is absolutely correct.

</comment></comment><comment><USER18> I think they focus too much on algorithms and not enough on the technical implementation which is one of the major reasons why Hadoop is so slow.

</comment><comment><USER21> "60 servers owned by MegaUpload were directly confiscated by the FIOD and transported to the US."

This implies that the confiscated servers were originally not located in the US. I wonder which country they were located and on what legal basis the US could confiscate servers there?</comment>


AI Teaches Itself Chess in 72 Hours, Plays at International Master Level - <AUTHOR> http://www.technologyreview.com/view/541276/deep-learning-machine-teaches-itself-chess-in-72-hours-plays-at-international-master/ <comment><USER2> Well, it didn't really teach _itself_ , it was carefully designed and was fed a huge (155M games generated from 5M actual games) data set. Coupled with an semi-supervised approach (rate each position whether the AI playing itself wins or loses). Similar approach yielded strong AIs for go, too ([http://arxiv.org/abs/1412.3409](http://arxiv.org/abs/1412.3409)), yet nowhere near the IM level for chess.

One comment in the article that stuck to me was (and this is central to AI discussions) :

"While Deep Blue was searching some 200 million positions per second, Kasparov was probably searching no more than five a second. And yet he played at essentially the same level. Clearly, humans have a trick up their sleeve that computers have yet to master."

Deep Blue didn't have anything to master, if he can beat the world champion that was it! A rough analogy would be: A bird can fly by flapping its wings 5 times a second while a Cessna 172's propeller has to make 200 revolutions per minute (numbers made up), so we still have some avian tricks to master. They are two different approaches to a problem!

At the time, Deep Blue required a 32-node IBM RS/6000 SP high-performance computer ([https://www.research.ibm.com/deepblue/meet/html/d.3.shtml](https://www.research.ibm.com/deepblue/meet/html/d.3.shtml)) for its power, now a regular MBP can run an instance of Stockfish that would give a GM a good run for its money.

Now, if you can design an AI that can learn a comparably simpler board game, say, Settlers of Catan together with a human (not fed millions of games) and can play with reasonable strategy, _that_ would be a teaching itself how to play.</comment>


Ask HN: What if you work for a company that supports SOPA? - <AUTHOR>

What advice do you all have to someone who actually works for a company that supports SOPA but doesn't support it themselves? <comment><USER2> Look for another job.

Seriously. I'm not saying you should quit right now. Find something better, then quit. They don't deserve your talent.

<comment><USER3> Make sure you tell them the reason why you quit, too. It matters.</comment></comment>


Auth0 Glitch Allows Attackers to Launch Phishing Attacks - xkcd-sucks https://threatpost.com/auth0-glitch-allows-attackers-to-launch-phishing-attacks/132554/ <comment><AUTHOR> I use auth0 on a project and reported this issue to them over 6 months ago. They assured me that they would look into it. Clearly they did not.

<comment><USER2> This is a big tell. Don't fall for Marketing spin above. They didn't take this threat seriously, will they take any others seriously until it hits the mainstream media? I would look closely at those you trust with authentication if you outsource this critical piece of infrastructure.

</comment></comment><comment><USER3> Hey,

This is Gonto. I'm the VP, Marketing and Growth at Auth0. I want to assure you that in no way is Auth0's platform insecure, or is any customer domain at risk. This is _not_ a vulnerability, a flaw, nor is there anything to be patched. To learn more about this, please check our blog post: [https://auth0.com/blog/phishing-attacks-with-auth0-facts- fir...](https://auth0.com/blog/phishing-attacks-with-auth0-facts-first/)

Thanks!

<comment><USER4> One random idea, not sure how practical - Do a screenshot analysis/pattern matching on all customer login pages. If verbiage or screenshot matches are close enough, it get's flagged for human review. This would only work on the pages at different auth0 domains obviously. Since the login url endpoints are saved in the Auth0 admin console, it could be easy to directly check the page. If that doesn't work, you could require customers store the login url's to make scanning them easier.

<comment><USER4> A potential easier approach could be detecting when an existing auth0 user attempts to access an abnormal auth0 subdomain. Even if the user gives up their user/pass accidentally you could send an email warning to review their activity. You can fingerprint the user's browser or ip address to help identify them if you don't have any other info.

</comment></comment></comment><comment><USER5> A bit disappointing to hear, seeing as Auth0 is probably the biggest name in its niche.

Hopefully they patch it up, because I'd rather use them than rolling my own username/password, or sending my users through Facebook/Google/other sites that track you.</comment>


A Breakdown of Selected Government Surveillance Programs (2013) [pdf] - <AUTHOR> https://www.brennancenter.org/sites/default/files/analysis/Government%20Surveillance%20Factsheet.pdf

<comment><AUTHOR> Decent three page summary from Brennan Center for Justice at New York University School of Law.

Are They Allowed to Do That? A Breakdown of Selected Government Surveillance Programs (2013)</comment>


Ask HN: Do you know a less distracting Slack alternative? - <AUTHOR> I've managed to control the impulse of checking my email every 5 minutes but slack is still interrupts me one way or the other, I kinda want to switch the team to a less distracting alternative. Suggestions? <comment><USER2> It sounds to me less like a problem with the technology but more with your habits and self discipline.

If Slack is interrupting you then why not just close it? And don't open it until you actually need it.

Another alternative will only distract you in the same way, surely.

</comment><comment><USER3> I really like Zulip ([https://zulipchat.com/](https://zulipchat.com/)) because it enforces threading of conversations which makes them so much easier to sort, mute, follow up with after the fact.

</comment><comment><USER4> We moved to Twist ([https://twistapp.com](https://twistapp.com)) a few months ago after having similar issues with Slack. Twist is more forum-like, so you avoid the "I have to jump in now" feeling that a continuous chat stream gives you.

</comment><comment><USER5> I think Telegram ([https://telegram.org/](https://telegram.org/)) is quite convenient for communication within a team, however, it is not such the workflow-oriented software as Slack is.

</comment><comment><USER6> You can play with settings and see what works best for you. I don't get notifications and only read messages when I'm done doing my stuff or when I'm about to message a coworker.

</comment><comment><USER7> Once I figured out how to mute @here and @channel, I regained sanity.

</comment><comment><USER8> Have you tried disabling alerts, setting your status to "away" and managing that source of distraction?

</comment><comment><USER9> Can you turn off your Slack notifications? Gitter and Discord exist, but they're not any less distracting.

</comment><comment><USER10> Have a look at Stride by Atlassian</comment>


Verified sequential malloc/free [pdf] - <AUTHOR> https://www.cs.princeton.edu/~appel/papers/memmgr.pdf <comment><USER2> Running tokei [0] on their repo [1] gives me that it's around 300 lines of C, and around 8000 lines of Coq. A lot of that C is actually test code, so in reality it's about 8000 lines of Coq to prove around 150 lines of C correct.

They also don't prove the correctness of mmap (which is how they actually get memory to alloc out), but entirely depend on it.

It seems incredibly expensive to write 8000 lines of very dense and difficult proof code in order to verify that you remembered to check "if p == NULL". It probably would turn null into a trillion dollar mistake if all devs had to write coq proofs for each nullcheck.

0: [https://github.com/XAMPPRocky/tokei](https://github.com/XAMPPRocky/tokei)

1: [https://github.com/PrincetonUniversity/DeepSpecDB/tree/05bd7...](https://github.com/PrincetonUniversity/DeepSpecDB/tree/05bd75f8c3a22267c27d5ab94e5f03b610797cf7/memmgr)

<comment><USER3> > A lot of that C is actually test code, so in reality it's about 8000 lines > of Coq to prove around 150 lines of C correct.

I wonder how much of that proving burden would be subsumed by rewriting those 150 lines of C into idiomatic Rust.

Though the real problem with Coq/Isabelle/Lean/etc. proofs is not the LOC's but the brittleness of their "proof script"-based approach. Sensible ITP systems are based on a declarative approach where the "strategy" used in any given proof step is secondary, while the semantics of the step itself is stated very clearly and explicitly. This makes the proof script robust to changes in other portion of the code, so that even 8k lines of proof becomes more easily manageable.

<comment><USER4> This is a common criticism of tactic based proofs, but the style that's being adopted more and more involves heavy use of _proof automation_ which allows fairly major changes to be made without breaking the proof script.

<comment><USER3> From this POV, proof automation just enables bigger proof steps. Of course, sometimes the inputs to the "automation" are enough to disambiguate the logical step on their own (e.g. whenever a lemma is proved in a single "auto" step, though this is far from a novel approach!) but declarative proofs are nonetheless a more consistent solution to this issue.

</comment></comment></comment></comment><comment><USER5> Is it just me or has there been a recent spike in malloc / free / seg-fault bugs in production code lately? Is it possible some fixes for Meltdown and Spectre have exposed these problems by making access more strict?

<comment><USER6> The Internet has exposed them.

Memory corruption in C is a well known problem since the Morris Worm, 40 years ago.

What has changed is the acknowledgement that the myth that good C developers never write memory corruption code, it nothing more than that, a myth.

Companies like Oracle, Apple, Google and Microsoft are now pursing other means to fix C, including hardware memory tagging on the hardware platforms that they ship.</comment></comment>


Ask HN:Planning to launch a curated HN print publication/newsletter. - <AUTHOR>

Hi fellow readers!
I'm planning to launch a monthly publication and a newsletter for best articles from Hacker News. Something like the Hacker Monthly, but better. Any suggestions?
The signup form will be live soon. Stay connected. <comment><USER2> "but better" Can you expand on that? I get [http://us1.campaign- archive2.com/?u=faa8eb4ef3a111cef92c4f3d...](http://us1.campaign- archive2.com/?u=faa8eb4ef3a111cef92c4f3d4&id=5447ea1022&e=ee5cfa0504)</comment>


Scatter Plot of San Francisco Covid-19 Cases - <AUTHOR> https://docs.google.com/spreadsheets/d/1WAeuh7svfz5vSsZQJ4G6UNqOQPHcSb305KxJTQ3pVKM/edit?usp=sharing <comment><AUTHOR> I couldn't find one anywhere so I made it myself. I will keep it updated daily to track the growth. Source is [https://www.sfdph.org/dph/alerts/coronavirus.asp](https://www.sfdph.org/dph/alerts/coronavirus.asp)</comment>


Ask HN: What do you use for app authentication? - <AUTHOR> I am building a react native app - I am looking to see what oauth AuthN/AuthZ options are out there. I have come across and used Amazon Cognito before and AppSync/Firebase but I am more looking open source options out there. <comment><USER2> Some options include \- Ory Kratos/Hydra \- Keycloak \- Identity Server

</comment><comment><USER3> I have just today discovered Auth0.

I have read some of the tutorials and find it very developer friendly.

Will comment later once I have actually tried it.</comment>