An Introduction to Lock-Free Programming - <AUTHOR> http://preshing.com/20120612/an-introduction-to-lock-free-programming <comment><USER2> Nice article, though I think that any intro-level material on lock-free programming should always include a "don't try this at home for anything important" warning. Until you have some experience with this stuff you will almost certainly make mistakes, but these mistakes might only manifest themselves as crashes in extremely rare circumstances.

I wrote my first lock-free code in 2004 based on reading some papers by Maged Michael from IBM. I wrote a lock-free FIFO in PowerPC assembly, and was convinced it was safe and robust. When I emailed Maged about it, he pointed out that if a thread was suspended on one specific instruction and some specific memory was unmapped before it could run again, the program could crash. I was amazed; I had thought hard about this algorithm, but had completely missed that possibility.

Some other specific notes about the article:

> Basically, if some part of your program satisfies the following conditions, > then that part can rightfully be considered lock-free.

The are actually several levels of lock-freedom defined in the literature: lock-freedom, wait-freedom, and obstruction-freedom. For more info see: <http://en.wikipedia.org/wiki/Non-blocking_algorithm>

> Processors such as PowerPC and ARM expose load-link/store-conditional > instructions, which effectively allow you to implement your own RMW > primitive at a low level, though this is not often done.

One benefit of load-linked/store-conditional (often abbreviated LL/SC) is that it avoids the ABA problem (<http://en.wikipedia.org/wiki/ABA_problem>). In practice this doesn't matter that much since x86 doesn't support LL/SC, but I just think it's an interesting factoid to know.

> For instance, PowerPC and ARM processors can change the order of memory > stores relative to the instructions themselves, but the x86/64 family of > processors from Intel and AMD cannot.

(I've edited my reply here since my original assertion was incorrect). It's true that x86/64 won't reorder stores (see <http://en.wikipedia.org/wiki/Memory_ordering> for details) but it _will_ reorder loads, so memory barriers are still required in some situations. However I believe that the atomic instructions ("lock cmpxchg", and "lock xadd") imply full barriers on x86.

<comment><AUTHOR> I totally agree with you about the dangers of lock-free programming, and that every programmer will certainly make mistakes. I feel strongly enough about it that I actually wrote several paragraphs about the importance of stress testing lock-free algorithms, which I eventually decided to break off into a separate post... I might get around to publishing that, we'll see. We're not the first to feel this way :)

> The are actually several levels of lock-freedom defined in the literature: > lock-freedom, wait-freedom, and obstruction-freedom. For more info see: > <http://en.wikipedia.org/wiki/Non-blocking_algorithm>

It's true, and I had a hard time reconciling that Wikipedia page with how others had been describing lock-free programming, which is why I spent so much of the post on semantics.

> One benefit of load-linked/store-conditional (often abbreviated LL/SC) is > that it avoids the ABA problem

Good point. Though I suspect if you access other cache lines between the LL & SC, it may invalidate the reservation.

> I don't think this is true about x86/64.

It is true about x86/64, at least for the most common, non-SSE instructions and normal, non-write-combined memory. I'll update the post to be more specific. See volume 3, section 8.2.2 of the Intel 64 and IA-32 Developer's Manuals: ([http://www.intel.com/content/www/us/en/processors/architectu...](http://www.intel.com/content/www/us/en/processors/architectures- software-developer-manuals.html))

\- Reads are not reordered with other reads. \- Writes are not reordered with older reads. \- Writes to memory are not reordered with other writes (with a few exceptions for special instructions)

<comment><USER2> > It is true about x86/64

Yes, sorry I misspoke initially about stores being reordered, but it does still appear that stores can be reordered after loads, see: [http://bartoszmilewski.com/2008/11/05/who-ordered-memory- fen...](http://bartoszmilewski.com/2008/11/05/who-ordered-memory-fences-on- an-x86/) . (Your Intel manual reference is surely a more authoritative source but I'm not able to do a deep dive into it at the moment).

<comment><AUTHOR> There's no contradiction. Normally, the x86/64 memory model is quite strong, preserving LoadLoad, LoadStore, and StoreStore ordering. But doesn't preserve StoreLoad ordering; eg. stores can be reordered after loads, as you point out. As I understand it, that's mainly because there's a limit to how quickly each store can be seen by other processors.

<comment><USER3> I'm pretty sure it's because of the store forwarding hardware. Intel CPUs can return a successful load of a recently-stored address with low latency (basically by keeping a special purpose cache of recent store addresses in the pipeline and returning their values before the actual commit). But that means that the "store" is viewed from the issuing CPU to have committed long before loads that might have been filled by caches on the other CPUs. There's no way to preserve both this optimization and a unified order.

</comment></comment></comment></comment></comment><comment><USER4> The idea that made this click for me 10 years or so ago was that distributed systems express concurrent processes but can't reasonably use locks; model your threads/processes/whatever as if they were nodes in a distributed system, and use distributed system techniques to ensure things converge.

<comment><USER5> That's not exactly a shared memory model. A better example would be a static look-up table for fixed game state information and a bunch of AI worker threads.

With the correct protocol you can even write to that shared memory. For example a sudoku solver where each tread looks for contradictions and then overwrites the shared states with their findings. This works because there is no contradictions, dirty reads are ok, and there is no contention with all threads writing 0's and nobody writing 1's. You can go even further where any thread can flip the error flag if a contradiction shows up or solution flag if a solution is found, but again it works because nothing clears those flags.

PS: The article's author uses a less strict defintion of lock free where it's ok to use locks for individual atomic operations like counters. But, that still creates performance issues at scale.

<comment><AUTHOR> Actually, I thought it was pretty clear in the article that it's not ok to use locks (mutexes) under the definition given. I tried pretty hard to use the most widely accepted definition of lock-free, even exchanging e-mails with Maurice Herlihy about it.

<comment><USER5> _In this sense, the lock in lock-free does not refer directly to mutexes, but rather to the possibility of "locking up" in some way, whether it's deadlock, livelock — or even due to hypothetical thread scheduling decisions made by your worst enemy._

Suppose you had an operation that was guaranteed to either add your input to some location in memory or fail gracefully in some fixed amount of time. It's first come first served and implemented at a hardware level. Now this fits with the definition of lock free in that a process can't prevent your process from finishing, and works just fine if you want say a counter of number of moves examined by your AI thread as a thread can always keep an internal counter and try again say after the next batch goes though. However, you still get into resource starvation issues depending on how it's used and with enough threads you encounter a wide range of issues.

Lock free programming is not a binary condition so much as hierarchy of conditions. Where various types of resource starvation (ex: at the cache or buss level) are perhaps the most stringent. Scale up to say a billion cores and 100 billion threads and many 'safe' operations create significant issues.

PS: Wikipedia uses Wait-freedom > Lock-freedom > Obstruction-freedom all under <http://en.wikipedia.org/wiki/Lock_free>

<comment><AUTHOR> Based on your comment, I should probably be more precise and say: "the possibility of 'locking up' _the entire application_ in some way". I'll update the post. There's nothing about this definition that prohibits a single thread from starving.

<comment><USER6> I think it's easier to phrase it in the positive sense: at least one thread is always making progress towards completion.

</comment></comment></comment></comment></comment></comment><comment><USER7> There is also a niche research area of lock-free data structures and algorithms.

On a more practical side, check out <http://www.liblfds.org/> \-- it is a library of lock free data structures in C. (I am not the author). I have successfully used this library in some realtime projects.

<comment><USER8> <http://concurrencykit.org/> is also available, used in several production systems.

</comment></comment><comment><USER8> A while back I linked to the following: [http://concurrencykit.org/presentations/lockfree_introductio...](http://concurrencykit.org/presentations/lockfree_introduction/#/)

Please make sure to navigate all the way down, before navigating to the right. Press the space bar to see the full layout of the presentation.

</comment><comment><USER9> Very good overview. I've built lock-free hash maps, and this article covers the areas you need to be aware of. I'd also suggest looking up false sharing, and also making sure that you really understand exactly how the memory barriers are operating.

</comment><comment><USER10> Make sure to check out pi calculus for a different model of concurrency without locks: [http://mainisusuallyafunction.blogspot.com/2011/09/lambda- to...](http://mainisusuallyafunction.blogspot.com/2011/09/lambda-to-pi.html)</comment>


Ask HN: Modern, open source python 3 code bases? - <AUTHOR> Python has advanced greatly in recent years. I started writing in it full time about 2 years ago and still constantly come across features (mostly 3.4+) that I didn't know existed. I have read a number of books but I can never be sure if what they preach is really up to date. I would like to learn more by reading other peoples' code. Are there any code bases you can recommend? <comment><USER2> Are you looking more for frameworks and libraries or app level code?

For the former, the source of Django, Django Rest Framework, Requests and Flask (as well as most things by Kenneth Reitz and Armin Ronacher) are all great codebases to look at.

A few other good resources are the blog PyMOTW 3 [1] and Brett Slatkin's book _Effective Python_ [2].

[1]: [https://pymotw.com/3/](https://pymotw.com/3/)

[2]: [http://www.effectivepython.com/](http://www.effectivepython.com/)

<comment><USER3> Anything written by Doug Hellmann (author of the aforementioned PyMOTW) is well worth a read.

</comment></comment><comment><USER4> [https://github.com/tomchristie/apistar](https://github.com/tomchristie/apistar)

I haven't read it yet but have heard good things.

<comment><USER5> Thanks for the link, that looks like an awesome package (in terms of its function and ability, haven't read through the code for quality).

Working on a Django project at the moment, and seeing this made me think: "Oh awesome, this could be extremely useful, but I'm already using Django...". And then I read about it using the Django ORM. Magic!

</comment></comment><comment><USER6> Not the answer you can expect but Pro Python is a good book to start, have you read it?</comment>


Ask HN: What tools does your startup use? - <AUTHOR> Hi HN! Long time lurker here. I am doing some research to better understand what the most common tools at startups are. Focusing on the business side - accounting, marketing automation, CRM, HR, etc. Know some of these are pretty obvious (Quickbooks and Hubspot) but part of what I am curious about is just how common different combinations of these tools are.
The reason for asking the question is I have been considering building out a dashboarding tool across these products targeted at SaaS companies to create a single pane of glass for seeing business operations and trends. If people care, more than happy to share the aggregated results here on HN! Curious to hear people's thoughts in the comments and also appreciate any other thoughts in the last comment box of the survey.
Link to the survey: https://www.surveymonkey.com/r/ZSR9DNW <comment><USER2> Mostly, I use Canva to design and marketing related design and graphics.

<comment><AUTHOR> Feel free to drop into the survey (takes < 2 minutes) so I can keep track. Appreciate the feedback!</comment></comment>


What % of YC startups survive entirely on funding? - <AUTHOR>

Are there any published figures anywhere? <comment><USER2> I would say the vast majority. For consumer web startups, you can just guess just by looking at their Compete traffic stats (comparing # of unique visitors to # of employees). For enterprise, it gets a little trickier, but if you see some big client names in their homepage, you can tell they're profitable by themselves.

</comment><comment><USER3> Wufoo (Acquired by SurveyMonkey) and Olark have both survived without raising additional funding.

I assume that is what you mean?

<comment><AUTHOR> I'm wondering if these are the exceptions. I heard something like 98% of YC startups get funding, but how many of them are unprofitable and exist only because of their funding in this bubble period?

<comment><USER4> Your assumption is that VCs fund YC startups purely because they are YC startups?

<comment><AUTHOR> My question was not about VC motives. My question is how many YC startups will go bust along with the collapse of the Social bubble.</comment></comment></comment></comment>


Bootstra.386 – A Bootstrap theme from the 1980s - <AUTHOR> https://kristopolous.github.io/BOOTSTRA.386/ <comment><USER2> This is a work of art.

All the details are just right, from the color palette to the menu separators and edges drawn with fake ASCII 'drawing' characters to the little blip that refreshes the screen line by line. Even the name is perfect: "BOOTSTRA.386" \-- eight characters plus three for the extension, all in uppercase.

THANK YOU.

<comment><USER3> Yep, gotta love 8.3 file-naming

</comment></comment><comment><USER4> This put such a huge smile on my face.

I was having a shit day, but now it's awesome. Thank you!

P.S. I will go build like 9 websites using this immediately.

<comment><USER4> Anyone have any advice for rendering images in a time/technology-appropriate fashion?

<comment><USER5> If you're building a Macintosh System 6 or 7 style page, use this site[1] to create 1-bit Atkinson[2] dithered images which will fit perfectly.

[1] [http://gazs.github.io/canvas-atkinson- dither](http://gazs.github.io/canvas-atkinson-dither) [2] [http://en.wikipedia.org/wiki/Bill_Atkinson](http://en.wikipedia.org/wiki/Bill_Atkinson)

If you actually used a Mac back in the late 80's / early 90's, this site's output will give you a heady shot of pure, undiluted nostalgia. I wasted half an afternoon once, converting images for my imaginary Hypercard project.

Photoshop will also give you options and allow you to reduce colors down to an 8 bit or 4 bit palette, with a variety of dithering choices, or for the true lofi look (It's 1991 and I used the school's lab scanner for the first time!), no dithering at all.

<comment><USER6> If you happen to be writing your simulated vintage mac site on a modern mac, vImage (part of the Accelerate framework) supports Atkinson dithering from OS X 10.9 onward via vImageConvert_Planar8to[Planar|Indexed][124].

Not overly useful for one image, but if you have lots of them, it's nice to have a programmatic solution.

<comment><USER7> For instance, Atkinson dithering on video. Like Vine, but 8bit.

<comment><USER6> For that, you'll want the new vImage CV pixel buffer functions in iOS 8 and Yosemite =)

</comment></comment></comment></comment></comment></comment><comment><USER8> Author here. I had no idea this was posted until I just rolled out of bed. Feel free to ask any questions here or hit me up on gchat/skype/aim/facebook/yahoo with the same username as here if that's more comfortable for you. There's also the standard issue tracker and mailing list.

Thanks!

<comment><USER9> Hey, great looking theme, and it love the attention to detail, but I noticed it's Bootstrap 2x and the site I was going to put it on is bootstrap 3x at the moment.

Any plans/progress porting this or rewriting it root bootstrap 3x, or should I build anything I want this one as 2x?

<comment><USER8> There's a lot of demand for 3x. I have been working on this for 18 months off and on ... I'll look into 3x very soon.

</comment></comment></comment><comment><USER10> It looks old, it looks comical, but I KNOW WHAT TO DO!

Less pixels, and less colours, means greater usability! This is the greatest application of Bootstrap I have ever seen. It is a shame that more websites don't look like this (in all seriousness).

<comment><USER11> Given the increasing complexity of the web plus nostalgia, I'm seriously surprised that there's no actual distributed BBS/Minitel/BTX thing going on.

With API-driven backends (webapps, esp. SPA's, mobile apps), it would probably be easy enough to shoe-horn in some glorious ANSI interface...

<comment><USER12> Apparently they're still popular in Taiwan.

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

<comment><USER13> Thats pretty impressive! I mean its a BBS with more than 1.5 million registered users, for gods sake. Also there is some creative ASCII art in there, go check it out.

<comment><USER14> Indeed, PTT has a lot of beautiful screens, and for those of us used to the CP437 character set, it looks quite exotic!

For those interested, here are some captures of some of the menus (there is a lot more posted in conferences) :

\- Taiwanese BBSes and Unicode ANSi Art : [http://www.cambus.net/taiwanese- bbses-and-unicode-ansi-art/](http://www.cambus.net/taiwanese-bbses-and- unicode-ansi-art/) \- Taiwanese BBSes and Unicode ANSi Art - Part II : [http://www.cambus.net/taiwanese-bbses-and-unicode-ansi- art-p...](http://www.cambus.net/taiwanese-bbses-and-unicode-ansi-art-part-ii/)

</comment></comment></comment></comment></comment><comment><USER15> I love this so much. Everything about the text mode of PCs (that is, what we used to call "IBM compatibles") is burnt into my brain at the deepest levels. Seeing this is like a jolt of electricity.

If you ask me to picture "what does a byte look like?", I am not going to think of binary or hex, I am going to instantly imagine the "extended ASCII" of code page 437.

</comment><comment><USER16> Make sure to check out the project's wiki page, where he goes into detail on DOS terminal modes:

[https://github.com/kristopolous/BOOTSTRA.386/wiki/DOS- Termin...](https://github.com/kristopolous/BOOTSTRA.386/wiki/DOS-Terminal- Capability-Tutorial)

</comment><comment><USER17> Very nice, it's so convincing my first reaction was to use the left-right cursor keys to change the selected menu option! (that would be a cool enhance by the way).

kudos!

<comment><USER18> I instantly tried to use the arrow keys as well. Hopefully it becomes an option. Having the scroll/refresh rate adjustable would be neat too, it seems 2400 baud, but 9600-14.4 was common too. Very cool otherwise!

</comment></comment><comment><USER19> Needs keyboard arrow navigation :)

<comment><USER20> I was more thinking they need to highlight the first character and allow Alt- shortcuts to work...

<comment><USER19> Ooh good catch!

</comment></comment></comment><comment><USER21> Ahhhhh, a nostalgia Bootstrap I can get behind.

Unlike [http://code.divshot.com/geo-bootstrap/](http://code.divshot.com/geo- bootstrap/)

<comment><USER22> Ha! remind me of friendster.

</comment></comment><comment><USER23> It might be more accurate to call this a simulation of vga text mode -- more early 90s than 1980s. Still, very cool.

<comment><USER16> Indeed, it looks deliciously like Ceefax: [https://en.wikipedia.org/wiki/Ceefax](https://en.wikipedia.org/wiki/Ceefax)

I might get up at 5am and stare at it while listening to some easy-listening music.

<comment><USER24> I remember being in Germany a few years ago, and my friends' parents still used this (something equivalent in Germany) on their TV. It was effective.

<comment><USER25> This is called Teletext[1] (or in german: Videotext). It still widely used i guess. Even me sometimes used it to get informations about the sheduled TV- Program if not cellphone/tablet is in reach ;)

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

</comment></comment></comment></comment><comment><USER16> This seems like a good time to post Cathode, the retro terminal for OSX: [http://www.secretgeometry.com/apps/cathode/](http://www.secretgeometry.com/apps/cathode/)

<comment><USER26> I had a Sanyo MBC-550 with a green-screen CRT in the late 80s. The retro coolness factor is overrated IMO. I much prefer my MBP Retina screen without phosphor trails.

</comment></comment><comment><USER27> Where is the turbo button?

<comment><USER28> LOL, the turbo button when the front of the PC displayed the number of MHz the computer was operating at, and you could slow it down so you could play old games. Good times.

<comment><USER29> Interesting bit of trivia: the MHz LED display on the front of most PC cases was typically configured by jumpers and wired directly to the turbo button; it did not read the actual speed from the motherboard. So if you wanted, you could make it say "HI" for high speed and "LO" for low speed.

<comment><USER30> Yep, I remember spending an afternoon reverse-engineering the jumper configuration to change the numbers to match the CPU I had just upgraded. I may still have the diagram I drew somewhere. And I thought I didn't have enough free time back then.

</comment></comment></comment></comment><comment><USER31> As soon as the page came up I instinctively took my hand off the mouse and placed them on the cursor keys, which made me laugh.

</comment><comment><USER32> This is by far the best bootstrap theme I have seen!

</comment><comment><USER33> First: Kudos. That is easily the coolest thing I've seen this month.

Everything "felt" like a fancy over-done BBS of the early 90s in the way that the page loaded slowly, but I'm curious why you chose the second swipe of the cursor over the screen. I don't remember my PC from 8088-80386 ever doing that. Am I misremembering and was this in reference to some platform from the 80s that I didn't use?

<comment><USER34> Reminds me of SLMR for Fido BBS's and the X.400 MUA we used at Telecom Gold (Dialcom)

</comment></comment><comment><USER35> This is by far the coolest thing I've seen in months. Kudos!

Now, excuse me while I find my Def Leppard cassette tape and turn up my collar.

</comment><comment><USER36> Needs more ═[▪]═╗. :)

</comment><comment><USER37> oh Turbo Vision, how I miss you!

<comment><USER38> Yes, very fond memories of using Turbo Vision in the late 90's came flooding back to me as soon as I loaded the page!

</comment></comment><comment><USER39> This is incredibly well done.

My one criticism is the hamburger being used at 978 and below. The hamburger is a 21st century artifact. Using [MENU] feels more old-school to me.

(yes Xerox did it in 1981, but I expect most of us were rocking a Apple II, 386, or C64 at that time...)

</comment><comment><USER40> I've been having a lot of thoughts about why I love technology so much, and this really put the biggest smile on my face!

Thank you so much for creating this. It's so unique, classic, novel.

I sincerely hope all the best for your career and your aspirations!

</comment><comment><USER41> Would anyone like to give a hand with [https://github.com/rbanffy/3270font](https://github.com/rbanffy/3270font) so we could build a 3270 theme?

</comment><comment><USER42> I literally experienced a sense memory from viewing this. I could smell the slight smell that old, hot CRT monitors emitted -- probably some volatile mix of things that give you cancer.

Wow!

<comment><USER43> You just made me remember that smell... Nostalgia in full effect

</comment></comment><comment><USER44> I see this faithfully reproduces that the cursor takes one pass to write the text, then flashes through a second faster pass. I remember seeing that sometimes.

Question: On the real systems where that occurred, what was the second pass doing? It never seemed to change anything. (No guesses, please. I'm looking for someone who knows.)

<comment><USER8> author here - it was an artifact of a common library that was used for TUI creation. I used it in the early 90s. Applications made with it all had it.

</comment></comment><comment><USER45> Am I the only one that noticed the irony of presenting a Javascript-required website with the self-promotional phrase: _Made for everyone. Bootstrap was made to not only look and behave great in the latest desktop browsers (as well as IE7!), but in tablet and smartphone browsers via responsive CSS as well._?

</comment><comment><USER46> Looks pretty awesome. I'm a little disappointed that the cursor wasn't turned into a block though.

</comment><comment><USER47> I will have to check this out for the next version of Sixtten Colors (an ANSI and ASCII art gallery). We use a similar font, but it is far from bootstrapped.

[http://sixteencolors.net](http://sixteencolors.net)

</comment><comment><USER48> Where's the button to compile .pas modules though ?

bootstrap === csszengarden 2.0

</comment><comment><USER49> This is awesome, I'll be using this to revamp my personal site.

</comment><comment><USER50> Love it. I'd love it more if it worked w/o js -- but at least it renders ok in w3m -- so I guess I can live with having to enable js in Firefox...

</comment><comment><USER51> instagram tag search circa 1980

[http://mherman.org/instagram-search-386/](http://mherman.org/instagram- search-386/)

</comment><comment><USER52> How can I make every website use this? It's one of the few designs that doesn't look like shit.

</comment><comment><USER53> Flat UI; we've come full circle.

</comment><comment><USER54> Textmode was fast... !

This is my only thing, make the flicker faster .. and the update should be almost instant.

<comment><USER54> [EDIT]

While I'm here.. make the scrolling only scroll by character boundries, for a more authentic feel - the header shouldn't overlap by say half a character, since textmode was cell based.

</comment></comment><comment><USER55> I noticed that progress bars aren't styled. Otherwise it's awesomely consistent.

</comment><comment><USER56> Awesome! Will be more 386-like if I can use the arrow keys to control the navigator ;)

</comment><comment><USER57> This is really clever! But text mode interfaces weren't _that_ slow.

</comment><comment><USER58> Glorious, I can't wait to come up with a project to use this in.

</comment><comment><USER59> That's when Borland was right up there with Microsoft!

</comment><comment><USER60> This is awesome!! Should use this as resume template!

</comment><comment><USER61> This is so rad. I mean, like, totally awesome!

</comment><comment><USER62> Icons need more work! My next theme, for sure.

</comment><comment><USER63> I can't help but think the creator's genius would've been better applied to practically anything else. But so what, it's fantastic!

</comment><comment><USER64> OMG! what an awesome throwback!

</comment><comment><USER65> whow! this is the coolest thing i've seen this whole year!

</comment><comment><USER66> Just simply awesome :)

</comment><comment><USER67> previous discussion: [https://news.ycombinator.com/item?id=7959068](https://news.ycombinator.com/item?id=7959068)

</comment><comment><USER68> very very cool!

<comment><USER68> Good to see I was down voted for this comment! Get a life!

</comment></comment><comment><USER69> I love this.

</comment><comment><USER70> I can't use this in production until you get rid of the scrolling painting!</comment>


Jason Alexander on gun control - <AUTHOR> http://www.twitlonger.com/show/if2nht

<comment><USER2> I'm a gun owner. I don't own any "assault weapons" -- which is just a label by the way, many hunting rifles are far more powerful and deadly than an AR-15 -- but for a long time I've been in support of the broad interpretation of the 2nd amendment. When tragedies like Aurora happen, it's hard for me to rationalize my support of the 2nd amendment, because all the arguments I hear from fellow supporters sound apocryphal. The problem is, all the arguments I hear from detractors are just as bad.

Protection from, and ability to overthrow, the government is a pretty laughable justification for firearm ownership these days. Let's ignore for a moment the fact that gun owners would have to take a page from Al Quaeda to have any meaningful chance against even a single branch of the U.S. Military operating on their home turf. We can ignore that, because the government doesn't need force to operate as they please. Since the beginning of civilization, government has been about control, and a large part of control is money. If the events of the last 8 years haven't convinced you that the US government can do whatever they want with regards to monetary policy, I don't know what to tell you.

There is a solid argument to be made that guns don't kill people, people kill people. Switzerland comes close (not really, but they're one of the closest) to the US in terms of guns per person, but they're still not quite at our level. The Swiss have approximately 46 guns per person, where the US has 90 (Wikipedia: <http://en.wikipedia.org/wiki/Gun_ownership_rate>). Yet, the Swiss have a small fraction (less than 1/5th) of the gun crime that we do. If you look at that list, you can see that there is either no apparent correlation between gun ownership and violence, or that data is just all kinds of wrong. I think it's the former.

So, let's accept that guns don't kill people, people kill people. We're left to reach only one conclusion. America is has a disproportionately high rate of murderous psychos. Let's throw away the Constitution for a moment (stop laughing, I'm serious) and look at it from a strictly rational, problem solving perspective. If you were presented with two groups of people, one group had a low rate of murderous psychos, and the other had five times the number of murderous psychos, would you arm the group with 5x the psychos? This is a serious question, and there are two schools of thought with serious answers. Both of these scenarios below grant that the measures taken will be 100% effective, which is a pipe dream, but let's play the game anyway.

Gun school: arm everyone. A murderous psycho is apt to think twice before going on a murdering rampage if he's certain that everyone in the room is carrying a gun as well. There is a near 100% chance that someone in the crowd will fight back and the psycho will end up dead. Even if the psycho decides to go on a rampage, they'll be stopped quickly and won't be able to harm many people.

Anti-gun school: make it impossible to get guns. The murderous psycho will have to resort to other means of killing people, like a knife or an axe. Because these tools are cumbersome and require a close range to use effectively, the number of people harmed is limited.

In reality, neither school is "right".

The gun school of thought has several problems, not including the fact that most gun owners couldn't deploy their weapon effectively, even if they had one. And no, I'm not talking to _you_ gun buddy who practices at the range and in IDPA, etc. I'm talking about the statistical likelihood in a population where everyone carries, which is a necessity for the gun school line of thinking. Colorado has very permissive carry laws, but no one contested the shooter on that day in Aurora. Other problems include the fact that there would undoubtedly be collateral damage, and the fact that many murderous psychos take their lives at the end of their rampage, so the threat of death isn't an assured deterrent.

The anti-gun school faces the problem that there are 88 guns per 100 people in the US right now. Do you really think that this many lawful gun owners are going to just hand over their guns? Really? Stop for a moment, please.... Really? Even if they do, contraband weapons will remain a reality in the US for a very, very long time. Then we end up back at the problem that guns don't kill people, people kill people. Make guns hard to get, and people will start improvising other means. The murderer in Aurora already exhibited the ability to manufacture bombs. You can't outlaw everything.

So I see it this way: we have to arrive at a common goal. That common goal is not going to be outlawing firearms, no matter how obvious it seems to you or your favorite celebrity. It seems reasonable, but it's impractical and politically impossible. You have to accept it.

If you want to accomplish something, you have to be clear about your goals, then adopt methods that have the greatest likelihood of success. Clearly, our goal must be to reduce the amount of violence in the US. Now we must decide on the method. Taking away firearms is impractical and ineffective because A) you can't expect to reduce the number of firearms in the US on any kind of reasonable time scale, and B) murderous psychos will find other means to kill lots of people. The only rational goal can be to have a hard look at _why_ there are so many murderous psychos and work together to reduce them.

I know lots of gun owners, and let me tell you, they're some of the most caring and helpful people you could ever hope to meet. They own a gun because they feel that it's the responsible thing to do. I have no doubt that would any one of them have been in that theater, they would have stood up, drawn their weapon and opened fire on the murderous psycho that day. That act would have surely drawn the fire of the gunman, but they would have done it anyway. These are not the people you should persecute. We should find a way to work _with_ gun owners, not against them.

The term "murderous psycho" is not meant to be hyperbole or some kind of joke. The people who commit these crimes are often psychopaths, by clinical definition. They often go untreated, although not unidentified, until something like Aurora happens. James Holmes' mother was not surprised when contacted by authorities. Does this not seem like the most broken aspect of this situation? And I'm not suggesting a witch hunt for psychotics. That won't work any better than the war on drugs, or the war on firearms for that matter. We have to open up the dialogue about mental illness. We have to start talking about it as more than the punchline of a joke. A person who is sprialling out of control needs to feel comfortable that they have somewhere to go and receive help, not imprisonment.

</comment><comment><USER3> I think the hardest part about this, is like Jason here a lot of people think it's ok for people to own guns, but not get crazy about it.

Unfortunately there isn't great qualifications for defining what an assault rifle is. You can do specific models, which then require lots of updated and political maneuvering to keep updated. Length, speed, etc all end up catch too many other guns.

We could do federally what california has done, and prevent magazines over 10 rounds, or do like Illinois and require a permit to buy ammunition, unfortunately incidents still happen, and legitimate owners get upset over what they perceive as draconian rule.

Ultimately I think banning something like semi-automatic weapons would be the best in theory. But with 300+ million guns out there, with many of those being semi-automatic, it might be kind of an issue. If you grandfather them in, then you just drive the price up for these weapons. If you make it illegal 'overnight' you may make felons out a lot of people unknowingly.

One of things that has been going around, mostly because of Ebert bringing it up. Is the idea that gun rights advocates say that these incidents can be prevented by concealed carry, but Ebert points out none of the people in the cinema shot back. Unfortunately the argument, and for the situation, that specific theater specifically does not allow concealed weapons. Unfairly, and I believe incorrectly gun rights advocates say that it happened there because he knew everyone would be unarmed.

It's a very tricky situation. I think ultimately we need a better algorithm to detect and flag situations like this. Which would also require massive databases and registrations which people seem very against.

If these guns were illegal to obtain, it would also mean that he would have had to actively be doing something illegal, unfortunately as it stands, if he would have been stopped on the way to the theater, he would have been found suspicious, but ultimately legal (assuming his guns were cased and such).

</comment><comment><USER4> I guess I'll be the voice of opposition here. Unlike a lot of you, I live in Georgia and own guns. My family, friends and co-workers also own guns.

I currently only own a small 9mm handgun. I'm licensed to carry it concealed on me and do frequently. To get that license, I had to have a clean record, be signed off by a judge and have my fingerprints filed with the GBI and FBI from the local sheriffs office. I've been vetted similarly to what any police officer has gone through.

In the past I've owned a Bushmaster XM-15 E2S, a so-called AR-15 style "assault weapon" probably very similar to what was used in the shootings. I know a lot about weapons and the AR-15 platform in particular. To non gun owners, they do look like scary black military rifles but they're only semi- automatic (one round each time you pull the trigger) and are classified as "varmint" guns for civilians. That means it's illegal to hunt large game (like deer) with them a lot of places because they don't have the stopping power. The reason our military uses the same round (5.56 NATO/.223 civilian) is because they decided it was easier to give our troops a small round they can carry more of than train them all to be proficient marksmen.

To be truthful, your average deer hunting rifle has a lot more stopping power than an AR-15 and a skilled shooter can fire even a bolt-action rather rapidly. It's a misconception that the AR-15 platform is any more deadly just because of its appearance.

When politicians have tried to ban the AR-15 platform, they did it by picking out features at random and trying to regulate any weapon with those features. It's kind of a mess. For some reason they chose things like the handguard to pick on, which keeps that barrel from burning your hand after its been fired and the retractible stock which does nothing but allow you to adjust the rifle to be more comfortable for different shooters body types. It's about what you would expect when someone tries to regulate something they've made no attempt to understand.

I can argue about gun from a million different angles but it comes down to these things for me:

— Every living thing on this planet has some form of defense. We as humans use tools. I don't see how you can possibly consider it smart to take away our only method of defense without providing an adequate alternative. The last time we called the police it took over 5 minutes for them to arrive and they aren't responsible for protecting individuals (Warren v. District of Columbia). That means you are responsible for yourself.

— Criminals will always be able to access the things we "ban" (see: drugs, prostitution, et. al.) so any laws would only have an effect of disarming law- abiding citizens.

— It's too late. We have as many guns in the U.S. as people. It would cost billions in law-enforcement work to even collect a fraction of those. It would also probably lead to a number of unnecessary violent encounters.

— It's treating the symptom. Humanity will always have violence but if you really want to reduce these incidents we would work on the cause. We don't know a lot about the most recent incident yet but we do have huge issues with access to mental healthcare (and healthcare in general) in this country. We also have large problems with poverty and cultural issues.

</comment><comment><USER5> Jason's numbers are incorrect. Brady (the most anti-gun lobby) states that firearms related homocides are 12,778 for the year they have statistics for.

<comment><USER6> he wrote a correction, saying the 100k was for gun related incidents, not just deaths..

13k deaths/year is still a lot

</comment></comment><comment><USER7> It's my understanding that the definition of "militia" and what anyone thinks the Founding Fathers meant by the Second Amendment is now largely irrelevant. Didn't DC v. Heller and McDonald v. Chicago settle this?

</comment><comment><USER8> Check out his twitter feed, and especially his retweets of critics... I don't want to live on this planet anymore.

</comment><comment><USER9> Those of us in the rest of the world really think America is crazy about this issue. Perhaps Americans need to understand that the constitution is not a holy document, it is the work of men and was created for a different time. The 2nd amendment doesn't make sense in a modern world.

<comment><USER10> Those of us in the rest of the world (since I, too, speak for the rest of the world) don't really think America is crazy about anything. Perhaps those of us in the rest of the world need to stop trying to lecture other nations about what they should "understand."

</comment></comment><comment><USER11> Yes, George Costanza is the most authoritative voice on gun control laws.

<comment><USER8> You know, trolls are not welcome here.

Go away.</comment></comment>


Ask HN: How do you fight through the monotony of daily life? - <AUTHOR> I've been having random discussions with friends and co-workers about life and overall satisfaction. What's interesting is that all of them (including myself) lament over the rinse and repeat cycle of work and daily life. It's like you go to work, come home, go to the gym then repeat for 40 years until retirement. With maybe two weeks of vacation a year. We are all in our early 20s working corporate jobs in the tech industry and can't imagine doing this everyday. So how have you learned to adjust? <comment><USER2> I was in your shoes ~15 years ago. My biggest fear was to become a corporate programmer for some bullshit company.

Here's what I did about it:

1\. I asked the most attractive & wonderful girl out on a date. Mind you, I am a geeky programmer and nobody's going to mistake me for a sex icon anytime soon. Nevertheless, she was impressed by my boldness and said yes. Now we're married with three kids.

2\. I started a company as CEO. It failed. But being CEO stretched me into a new role and I grew immensely.

3\. I'm now working on a project that I think has a huge potential for positive impact on the world. I'm not motivated by money or glory this time around, but just want to see if I can grow and pull it off.

I guess to sum it up: know what you want out of life and then be bold and take risks.

<comment><USER3> > I'm now working on a project that I think has a huge potential for positive > impact on the world. I'm not motivated by money or glory this time around, > but just want to see if I can grow and pull it off.

As a new-grad, when I read this I cannot help but guess that you've somehow covered yourself for the future by saving for retirement. I can only envision myself not being at least partially motivated by "money or glory" until I can secure future financial stability.

</comment></comment><comment><USER4> I felt like this.

Having kids changed this a lot for me, but I don't of course recommend having kids because 'you are bored'. An alternative would be to go live and work in a different country, especially that isn't too touristy or western. I guess anything that completely uproots your life and takes you out of your comfort zone will do it.

Another thing I do is some side hussle but with more of a structured plan than I have before. This supplies hope that one day I can make an income without needing a job.

<comment><USER5> How has kids changed this for you?

<comment><USER6> I'm not OP, but I can share a story that just happened a few minutes ago that illuminates how having a child helped me see the wonder in daily life.

My daughter is almost three and we live in a Canadian province that's in the midst of a serious cold snap. We got some snow last night. The drive to daycare was slower than usual - roads were extremely slippery and it was an all around ugly commute.

We drive by a performing arts/theatre complex on our way to daycare. The Arts Centre has very bright lights. With a light snow fall and ice crystals in the air, it looked like the light shone up in columns in the sky. Lauren was blown away by it, "See daddy, see daddy!"

I have seen that effect so many hundreds of times in my life that I don't even notice it, but my toddler was absolutely mesmerized by it. There is a lot of wonder in the world and, for me at least, having a little person pointing out all that wonder really helped!

For the love of all that you consider holy, don't have kids because you're bored!

</comment></comment></comment><comment><USER7> This is an existential algorithm that everyone alive has to go through. It seems to me that you're asking about the solutions people who live in joy have found and/or made. It always involves a 'higher purpose'.

Some inherited them, some build them from the bottom of a terrible hole. Nobody alive has been able to create a new one from scratch.

Personally I found my purpose through lots of lectures and research into the ground truth of physical and metaphorical reality that all humans are subject to here on earth. Hint, lots of the solutions I 'discovered' and understood have been well established for millennia, a.k.a. there's no secret. Still, just as an addict has to want to change we have to find that purpose for ourselves.

<comment><USER8> lol, my "higher purpose" is just finding something to commit to and committing to it. For a lot of people, that's marriage, but to me, I just want to do it better, faster, cheaper.

<comment><USER5> I guess you can do marriage faster if you really want, but not sure if it'll be better or cheaper :)

</comment></comment></comment><comment><USER9> I sometimes imagine going back to explain to myself as a teenager what I do for a job now. When you were young, what did you want to do? We are still accountable to that person we were. As a teenager, did you want a corporate job and a gym membership? I wanted to be the guy in a massively successful band behind a mountain of synths and sound equipment. In the end I design studio equipment for a living instead and play in bands in the evenings. I can live with myself.

</comment><comment><USER10> Being bored for 40 years isn't your only option.

[http://www.mrmoneymustache.com/2012/01/13/the-shockingly- sim...](http://www.mrmoneymustache.com/2012/01/13/the-shockingly-simple-math- behind-early-retirement/)

You can move towards a life designed the way you like it. Good luck.

</comment><comment><USER11> I have children and I am infatuated with helping them grow, learn and become good humans.

I also am at a job with unlimited vacation and took 8 weeks PTO last year. So I make up for the days that are boring with my vacations.

I don't feel the urge to "change the world" and I'm perfectly happy working hard at work on interesting problems, and coming home to my family and just being happy, which is the benefit of being almost 50.

<comment><USER12> A job with unlimited vacation? Are you a contractor or remote-only worker or something? Or is this an actual desk job in an office?

<comment><USER11> Unlimited vacation is common in Silicon Valley. It's not really unlimited vacation but it's really just a company policy of "work when you need to work, take a break when you need to take a break". Some people are more effective at taking PTO on unlimited vacations than others, however.

<comment><USER4> Did you have to fight for that time off? Or did you just ask? Did you get any grief in the office for taking so much time off?

I am interested because on the one hand there is policy, and on the other there is social reality. I imagine it takes some effort to make an unlimited vacation policy work in a team where some people might begrudge other people having time off.

<comment><USER11> Nope. My team is very chill. No one keeps track, I don't even fill out anything and my boss is very supportive. As long as I'm doing the work I'm supposed to and I'm performing at a high level, no one cares in my team.

</comment></comment></comment></comment></comment><comment><USER13> As a preliminarily step, work less, so you have the time to think about what you actually want to do. "8 hours for work, 8 hours for sleep, 8 hours for what we will" is a good slogan, though these days it should really be less than 8 hours for work.

(You can negotiate for a short workweek, as this person did: [https://codewithoutrules.com/2018/01/08/part-time- programmer...](https://codewithoutrules.com/2018/01/08/part-time-programmer/))

</comment><comment><USER14> > With maybe two weeks of vacation a year.

Why do people in the US put up with this? In the rest of the developed world we get at least 4 weeks annual leave:

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

</comment><comment><USER15> How about trying running, mountaineering or just being outdoors? If you like it, you can dedicate some of your time to such activities. Exercising over longer period of time keeps your mind and body busy and in a shape and reduces stress level. And you find a lot of like minded people in all age groups and can make friends with them.

<comment><USER16> +1 for hiking. It's an incredibly tactile way to realize your own physical strength and endurance. Not to mention that it's cheap, good for you, and you'll see some truly incredible sights.

</comment></comment><comment><USER17> Why would you adjust to something you can't imagine doing for years? That sounds crazy.

Instead, learn what you can, save money, make connections, and then leave. As tech workers you are likely to be in high demand and could switch jobs, go contract, start a company (services or startup). Lots of options.

I worked at a job for a few years in my early 20s, had a quarter life crisis, and left to travel. After a few months I found myself pulled back to technology, and that showed me that while the company I was at wasn't a good fit, the domain was.

Also, the folks you work with in your first job may pop up again and again in your career, so don't burn any bridges when you leave.

</comment><comment><USER18> I made 12 kids.

This gives purpose to my life. In some sense, having kids is pretty much the meaning of life. Live would be pretty pointless without the kids. People are meant to have kids, and you can conclude this from your choice of evolution or creation. There is an instinct to be satisfied.

I'm only sort of in the tech industry, so maybe that helps. Government contracting rules put a limit on some kinds of insanity. The stuff that goes on in the game industry would never fly. Actually, I have it better than that minimum. My normal work week is 40 hours, and I get paid if I work more. I get more vacation (due to seniority) and flex time, letting me spend more time with the kids.

So I spend the morning with kids, walk or drive to work depending on weather, do stuff to support my country, come home, skip the gym, spend more time with kids, and repeat for 40+ years until retirement.

There is never a perfect time to start having kids, so you won't have any if you wait for that. Just get on it. I got started before I graduated from college.

</comment><comment><USER19> You'll make decisions. They will have consequences. For good or ill they will change your life forever.

No, but, seriously, I'm scarcely older so I distinctly remember what it's like to be young and watch stuff feel permanent for the first time. Having a job, a house, no immediate plans to leave your city, whatever. You wonder if that's all there is and if it's not why whatever else can't come any faster. You realize you've got mostly what you wanted and everything else you could want seems small or like someone's already done it. And you watch the days stretch and all alike.

So my prescription is:

* Wake up in the middle of the night (or stay up till the middle of the night, but sober). Go outside. Observe that your immediate world isn't, in fact, only what you usually see of it.

* Make older friends, they'll tell you you're full of it.

* Make younger friends, they'll think your boring old man life is the epitome of freedom.

</comment><comment><USER20> When your young, you have more time and more possibility to take risks. Travel and learn as much as you can about the world. Once you have a family, your perspective changes, so the opportunities you have available change.

If your out of ideas on what to do, try the dreamline activity from the 4 Hour Work week

or even consider reading How to Get Rich by Felix Dennis.

</comment><comment><USER21> Have hobbies outside of sitting in the couch refreshing HN or watching Netflix. Hobbies where you get better at something.

</comment><comment><USER22> You need to find something or a set of things that are meaningful to you. Those things will change, so you need to keep chasing things that are meaningful.

Otherwise, the bullshit of life will be too much...but doing meaningful things seems to dampen the blow of the natural tragedy and suckiness of life.

</comment><comment><USER23> Are you talking about not having free time or not knowing what to do with your free time ? These two are very different issues.

For the latter, it's mind blowing to ask this question in this day and age. There are so many interesting things to try out and do today, you could last 10 life times and not run out.

For example, I love video games. There are endless number of amazing games on PC and console. And enough variety to never really end. You could try that. Sometimes I get FOMO thinking about all the amazing games I will never be able to play due to lack of time. There is a game for every person type and it always keeps life exciting.

You could learn a zillion skills or engage in creative pursuits. Music, rubik cube, programming projects, start a reddit community or participate in one. You catch my drift.

</comment><comment><USER8> You do it better. In most jobs, there's always a way to do it better.

If you're just doing an assembly factory job, you can assemble it faster.

If you just deal with lots of boring code, you can grind refactoring books and techniques.

If it's a generic tech job, there are new programming languages to learn, frameworks, algorithms, plenty of things to do and enjoy.

If you're a manager who has nothing to do, you can find a way to make your colleagues' day more interesting and fun. You can train juniors, get them to do better.

Heck, even in the worst, most mundane days, I just visualize text and systems into images and try to move them around. There's a lot to play with.

Work life is a lot more interesting than even the vacation periods.

</comment><comment><USER24> I love working on things that get me excited. If the work is interesting it creates an upward spiral of momentum. Any way you could try different projects or teams until you find that spark? Sorry it's monotonous now!

</comment><comment><USER25> Two things I love to do for monotony are:

1) Take a random stroke from a pen and use that as starting point for making something interesting on a piece of paper. Sounds silly but it is fun and I have had a couple of people ask for them when I was done.

2) Go to a second hand store that sells a variety of things. Look all over the store and see if there is an item that screams to come home with you (if you want to make it harder take something with you to donate/sell before going). You never know what you are going to find and you'll have a story to go with it.

<comment><USER26> Sounds creative but if you are bad at drawing is over all useles Edit: sorry to hurt your ego, but everyone's way of dealing the empty hole is so invested into it(like religiously) and if you insult their way or propose better you are shattering their ego sometimes

</comment></comment><comment><USER27> I don't get this attitude at all... Find a business domain that excites you, find a company in that domain whose culture suits you, work hard to build skills that help you do your job well and give you personal satisfaction, and then look for opportunities to expand your role and increase the impact you have at work. Then your job won't feel like work...

If the job you currently do can't deliver this, then find something else.

(Plus, of course, what everyone else says about finding a satisfying family life, hobbies, work-life balance, etc)

</comment><comment><USER28> \- Consider working towards an early retirement. There are lot of resources on the internet and you can see if any of them "clicks" for you.

\- If you find that for extended periods of time, you have a persistent feeling of "everything is meaningless" and you fail to find joy or meaning in any activity, please see if talking to a counsellor/therapist could help you.

<comment><USER29> "Consider working towards an early retirement"

I suspect this just delays the whole situation. With additional risks of burning your physical and/or mental health.

<comment><USER28> Indeed, this is why I also mentioned the second point. Sometimes, it's a matter of feeling trapped and getting out of it - which is not far off for someone being well paid but living well within their means. The goal can give someone a strong drive. At other times, it's a matter of finding what really is bothering someone deep within their soul. Something entirely unrelated could manifest outwardly as boredom. So, in those cases, seeking to find this, then facing it could help one find a way to accept things or perhaps find a new drive towards an entirely different goal.

</comment></comment></comment><comment><USER30> Well, living somewhere that gives me 33 days elective holiday and doesn't try to ration out sick leave helps. But I honestly just enjoy my job. I think relating it to actual people and working at scale gives you the power to think about the direct effect your code is having on people's lives.

</comment><comment><USER31> Every three years change jobs and take six months off in between to go travelling. On the other hand it is stunning to be alive just on its own.

</comment><comment><USER32> I'm really struggling with this too. Let me know if you find any answers. I'm 35 and just so extremely bored with my work and routine.

</comment><comment><USER33> To a point, you get used to it. But also, it's an ever-present aspect of human existence. See Schopenhauer, for example.

</comment><comment><USER34> I exactly feel this way. Trying to go remote and break up the monotony. Only way to live as far as I can tell.

</comment><comment><USER35> I spent my mid/later 20s becoming increasingly disgusted & sick of commercial software work, quit a job & ended a relationship, spent a few months somewhat depressed, doing very little, visiting family and friends.

At some point I read a lot about climate change -- not sure if I recommend doing this, but it certainly helps to put things in perspective. What will the world be like in 30 years? What do you want to be doing then?

I found in my late 20s I started to take a much longer term perspective on things. I've re-thought my relationship with work: previously work was kind of a thing i did by default, without really thinking why. Now it's something I do to generate money to invest toward things on a 5-10-20+ year time horizon. Maybe I need to grind away at work for 5 years. So what? Not that long. I did contract work for a couple of years and got a large pay rise out of it, which has stuck in subsequent permanent jobs. Work can still be a grind but it pays more than enough and I largely firewall work away from the rest of my life. If you start trying to save money when you haven't really focused on that before, that in itself can become a bit of a game. What's a good "move" to make? Move house to somewhere cheaper. Ride a bike instead of taking the train. Learn to repair your bike when it breaks. Prepare your lunch instead of buying it. Don't spend money on travel. Don't buy things, borrow library books. Don't pay for the gym, go for a run. Don't pay for a new thing, learn how to fix the old thing.

Some of my colleagues who are in their 40s just work part time, either so they can spend more time with family, or just because a couple of days work a week provides them with enough money, and they're far more motivated by having more free time.

Anyway, enough rambling from me. I'm also reminded of an essay I read a while back:

      > My dad went through a period of removal when he
      > was my age and working as a technician in the
      > Bay Area. He got fed up with his job, and figured
      > he had enough saved up to quit and live extremely
      > cheaply for a while. That ended up being two years.
      > I recently asked him how he spent that time, and
      > his answer was that he read a lot, rode his bike,
      > studied math and electronics, went fishing, had
      > long chats with his friend and roommate, and sat
      > in the hills, where he taught himself the flute.

      > After a while, he says, he realized that a lot of
      > his anger about his job and outside circumstances
      > had more to do with him than he realized. As he
      > put it, "it's just you with yourself and your own
      > crap, so you have to deal with it." But that time
      > also taught my dad about creativity, and the state
      > of openness, nothing, maybe even boredom, that it
      > requires.

From Jenny Odell's "how to do nothing". It's worth reading the whole thing.

[https://medium.com/@the_jennitaur/how-to-do- nothing-57e100f5...](https://medium.com/@the_jennitaur/how-to-do- nothing-57e100f59bbb)

</comment><comment><USER36> I have never been or said I was bored in my life. Everything is happening all the time, everywhere. Open your eyes.

I work in IT, and I'm the IT guy when I go home, and when I'm on vacation. Apparently it's also my hobby, since I keep doing it decade after decade.

</comment><comment><USER37> Maybe learn a new human language.

</comment><comment><USER38> ...

<comment><USER18> Hmmm, be careful, because this advice doesn't apply everywhere.

We hire old people. I know we have some past 60, and at least one is about 70. Somebody who decided to "change jobs and tech stack as much as possible" would be not so desirable however, because getting somebody settled in and up to speed will often take roughly a year.

</comment></comment><comment><USER39> Work is where you get your paycheck. Treat it just like that. Let it fund your passions.

Cycling, music and meditation keep me sane. And enjoying culture - great film, etc...

<comment><USER25> I agree with cycling. The weather conditions, traffic and even the route can be different each time you get on the bike. Heck, getting a flat tire breaks up the monotony really well (also gets me using creative words in the process of getting the tire on and off).

<comment><USER39> Hahaha! Yeah, getting a flat sucks.

With respect to the route: I absolutely love turning down a road I've always wondered "where does that one go?" I've found some of my favorite "go-to" rides from that. It's such a blast. I feel bad for anyone that doesn't know the joy of road cycling.</comment></comment></comment>


How Google's Bad Data Wiped a Neighborhood Off the Map - <AUTHOR> https://onezero.medium.com/how-googles-bad-data-wiped-a-neighborhood-off-the-map-80c4c13f1c2b <comment><USER2> Neighborhood definitions that don't represent formal political subdivisions are an obscure corner of the universe that a few people embed themselves in and exert control over. It sounds like this case was more about the city 'rebranding' than bad data.

In my small city, there's a few designated "neighborhood names". A couple are names reflective of the "official" neighborhood associations that exist and are part of an association of neighborhood associations in the city. Others are related to old subdivison names from the 1920/30s that are out of common use.

<comment><USER3> Often times the rebranding is mostly by realtors who want to associate with a neighborhood with more cachet or conversely to disassociate from a neighborhood with bad cachet.

No, no, it's not the tenderloin, it's lower nob hill (just making that up). But that's how it goes.

<comment><USER4> It isn't truly a real estate rebrand unless there is some stomach churning cutesy name, like "LoNo"!

<comment><USER5> In case you are as yet unaware, there is a specific 99 Percent Invisible episode about this very thing.

[https://99percentinvisible.org/episode/the-soho- effect/](https://99percentinvisible.org/episode/the-soho-effect/)

<comment><USER3> I love it, Acrohoods!

</comment></comment></comment></comment></comment><comment><USER6> Click bait. Not Google's fault. Third party data wasn't accurate in the eyes of the residents.

<comment><USER7> There are many things here, some of which are clearly Google's "fault".

There is the incorrect neighborhood assignment by Pitney Bowes. I believe that is the fault you are referring to.

There is Google's choice to use Pitney Bowes instead of a (possibly more correct but expensive) data source, or instead of doing it themselves (also more expensive).

There is Google's decision to handle error reporting through means which - according to the article - may be disadvantageous for neighborhoods where 25% are senior citizens and 40% lack internet access.

There is Google's choice to not reveal where the data comes from, making it harder for others to figure out the root source of the error. Consider if you are denied an apartment rental because you failed a credit check, and the rental agency refuses to tell you where they got the data, and the credit agencies all refuse to tell you where _they_ got the data. How would you correct any data which wasn't accurate in your eyes?

</comment></comment><comment><USER8> As noted by other comments here, this is quite a lightweight article. Not that the residents don't have a valid complaint, but the solution is really quite simple.

I have direct experience with something like this myself. My Grandfather homesteaded in Montana in 1911, and the land remains in the family to this day. My Aunt Elsie, who was a force to be reckoned with, had the name of the road changed successfully. So their address had the family name. I noticed that Google did not have the name, so i simply clicked on the button at the bottom that says "send feedback". I noted the post office had that as the name and one other reference. I got mail back months later refusing to change the notation. I sent the request again perhaps a year later, and this time they did change it. It is there today.

While I understand the communities distress, it appears from the story that nobody attempted to contact Google.

And you don't have to be a city official to do so.

<comment><USER9> The article even discusses this and I thing you're being unsympathetic.

It says a lot of people don't have the skills to figure out how to click through a multi-layer sequence (I never thought of that as a "skill" but I can see how it really might be one). Also as you said yourself Google doesn't always follow through on random comments. And in the end the root problem wasn't Google at all!

Plus it wasn't clear to the people if the city had been involved in changing the name? (Answer: not really).

And I think this is the kind of hyperlocal thing city councils are for.

<comment><USER8> Not sure what you mean by "multi-layer sequence", as it is a simple link at the bottom of the page "send feedback".

Even though the cause of the problem was not in Google's hands, given that they got the data from outside sources, nonetheless I would presume that they have the ability to correct errors.

<comment><USER9> I was going by what it says in the article: "while Google says it invites user feedback on its maps, it doesn't always act on those suggestions. And even that process, which involves clicking through three levels of menus, precludes users with limited computer skills."

</comment></comment></comment></comment><comment><USER10> In any given city, there's going to be widespread disagreement about the boundaries of many neighborhoods and even if they exist given that "neighborhoods" can be the creation of a developer that no one local pays any attention to. Some cities seem to have greater agreement while others have neighborhoods and communities that are almost wholly informally and loosely defined by locals.

</comment><comment><USER11> Good grief. That's an awful lot of words to convey a very simple story. Here's an 80% reduced summary which is still way too long for the actual information conveyed [https://smmry.com/https://onezero.medium.com/how-googles- bad...](https://smmry.com/https://onezero.medium.com/how-googles-bad-data- wiped-a-neighborhood-off-the-map-80c4c13f1c2b#&SM_LENGTH=21)

</comment><comment><USER12> Is this really such a big deal? I mean this is one long article for a simple data mistake that was rectified.

</comment><comment><USER13> Sounded like they were talkin about Palestine for a second..

<comment><USER3> Some time in Google Map's infancy, there were a couple of countries who sent off marines or some such to "guard" and "defend" some kind of territory Google had mislabeled (cartographed?) as the other's.

It's Google, it's not an official map or treaty, yet they saber rattled for a couple of days till someone pointed out the silliness of it.</comment></comment>


The 'Dogpile Effect' and how to avoid it with RoR memcache-client patch - <AUTHOR> http://blog.kovyrin.net/2008/03/10/dog-pile-effect-and-how-to-avoid-it-with-ruby-on-rails-memcache-client-patch/

<comment><USER2> What I'm doing in my homegrown framework to avoid/reduce memcache dogpiling is this (pseudocode):

      n = 1000;
      key = "myMemCacheEntry";

      if (random(0,n) == 1 || (value = memcache_get(key)) == false) {
          value = compute_value();
          memcache_put(key,value);
      }

      return value;

Adjust _n_ according to your current peak traffic. When traffic is low, the algorithm won't always catch on, but the dogpiling won't be as severe.</comment>


Hands-on With Diaspora - <AUTHOR> http://mashable.com/2010/11/24/diaspora-preview/#view_as_one_page-gallery_box461 <comment><USER2> Aside from the mentioned safari bug, it looks as if diaspora is starting to shape up.

That said, I wonder how many of the security issues have been fixed?</comment>


CONTEST: Help Chatroulette Solve Its  Problem And Make Billions - <AUTHOR> http://www.businessinsider.com/contest-help-chatroulette-solve-its-penis-problem-and-make-billions-2010-3 <comment><USER2> Interested in entering? Great! Here are the rules:

        * Entrants must create a slide show presentation illustrating their plan and product. Make sure the text is readable if slides are reduced to 590 pixels wide.
        * Entrants must say how much revenue their plan would produce after one, five and ten years.
        * Entrants must come up with and answer five FAQs that would challenge their plan.</comment>


How Y Combinator Is Remaking Silicon Valley in Its Image - <AUTHOR> http://gigaom.com/2010/07/29/how-y-combinator-is-remaking-silicon-valley-in-its-image/

<comment><USER2> Silicon valley is a lot larger than just web start-ups. If and when YC launches something that eventually turns in to the next google or something on that scale it will have a real impact, but for now the big winners have not been created using the YC model.

Who knows, maybe one day.

<comment><USER3> The YC model is great but I think it's going to continue to be a place that mainly turns out companies that investors like, rather than what is a hit with the public at large.

Why? Because of Farmville. Because no one in their right mind could have predicted Farmville's success. And that's the learning. If you're good, you might be able to guess singles and doubles, but no one can guess the homeruns.

<comment><USER4> I think YC is great. As long as the risk in early stage businesses is misvalued by the market, it doesn't really matter if they hit singles, doubles or home runs.

Incidentally, Farmville was not a crazy bet -- the game was a clone of a Chinese casual game called Happy Farm that was seeing insane traction in China. The US innovation was hooking it up to the non-transparent mobile subscription services that Zenga got nailed for later.

</comment></comment></comment><comment><USER5> Opponents of "Pay & Spray" will have a field day with Ron Conway's quote:

Archangel Ron Conway, who said he's put money into 500 companies over the last 12 years, kicked off the day with an optimistic and generous recruiting speech: He said he believes every "entrepreneur who has the guts to start a company" should get funding, and added "I believe the more angels we have in Silicon Valley the better."

<comment><USER6> I think the original term is "Spray and Pray" (<http://en.wikipedia.org/wiki/Spray_and_pray>).

</comment></comment><comment><USER7> No quotes from Joshua Schachter. Inexcusable. Where is the commentary from the newer, non-reptilian investors?

</comment><comment><USER8> Google is not helping much with this. What are "rolling funding rounds"?

</comment><comment><USER9> "Archangel Ron Conway" - i liked that

<http://en.wikipedia.org/wiki/Seven_Archangels>

</comment><comment><USER10> >Besides, acquisitions of young companies tend to be better for everyone involved, as compared to later-stage deals, said Geoff Ralston, who recently sold Lala to Apple. Integrations of billion-dollar companies almost never work, he said.

If there was no acquisition of LaLa, we'd all be listening to music for 10 cents a track on our iPhones and Androids. Hopefully they come up with something awesome at Apple.

<comment><USER11> There's always Grooveshark.

</comment></comment><comment><USER12> pg: "The way of the future is no fixed amount, no fixed closing date, and no lead."

This concept is unfamiliar to me? What does it mean? What compromises a "rolling" financing deal?

<comment><USER13> Which is exactly what I advocated for in "How my startup went IPO and skipped VC funding" [http://blog.fairsoftware.net/2010/06/23/how-my-startup- went-...](http://blog.fairsoftware.net/2010/06/23/how-my-startup-went-ipo-and- skipped-vc-funding-a-story/)

A rolling deal is when angels keep showing up over time and send you more money, rather than you setting a fixed date saying "on August 1st, I need 10 angels with $100,000 each, or my company is bankrupt".

</comment></comment><comment><USER14> I remember a comment by google people, they said something in the lines that they prefer not to employee many valuable people because they being out are better for IT progress.

If YCombinator culture is too strong, it may damage the necessary diversity in people conception of a startup.

A good group of people need a lot of small differents groups in order to explore the landscape of startup opportunities. So let's hope that YHacker influence doesn't grow to excessive influence.

</comment><comment><USER15> Villainous photo selection

</comment><comment><USER16> and not only Silicon Valley. While YC is Bay Area based, its ideas (maybe not his program yet) really inspire a bunch of international people too</comment>


Y Combinator Web Search Version 1.3 Released - <AUTHOR>

This version performs phrase search ( http://www.ycombinator.search.xirium.com/cgi-bin/search.cgi?p=0&q=%22paul+graham%22 ), boolean search ( http://www.ycombinator.search.xirium.com/cgi-bin/search.cgi?p=0&q=-the ), URL search ( http://www.ycombinator.search.xirium.com/cgi-bin/search.cgi?p=0&q=http%3A%2F%2Ftwitter.com%2F ) and the previous version is available as a web service and command line utility ( http://news.ycombinator.com/item?id=184707 ). <comment><USER2> The number of results is not displayed correctly when < 7\. An example: [http://www.ycombinator.search.xirium.com/cgi- bin/search.cgi?...](http://www.ycombinator.search.xirium.com/cgi- bin/search.cgi?p=0&q=taggl)

For more results, it always says "7 of", even after clicking "More".

And larger searches always end at 1023 items: [http://www.ycombinator.search.xirium.com/cgi- bin/search.cgi?...](http://www.ycombinator.search.xirium.com/cgi- bin/search.cgi?p=0&q=microsoft)

Oh, and I saw this in the results: "If I'd only known!"

Hope this helps.

<comment><AUTHOR> > The number of results is not displayed correctly when < 7.

Doh! The library routine to perform estimates was working fine, the command line utility works fine, but there was a bad assumption between the web interface and the web service.

> larger searches always end at 1023 items

Many search engines limit to 200 results because some search algorithms become more computationally expensive when finding more data. It also costs more in bandwidth. However, special for you, I've raised the limit to a number much larger than the number of posts in this forum.

Your remaining report is due to an interaction with data sanitisation and Unicode.

> Hope this helps.

Most certainly. Thank you for your concise and constructive report.

</comment></comment><comment><USER3> <http://ofthenow.80concepts.com/feed/1440/monthly/?q=twitter>

....

Search any site feed, or monitor live...

</comment><comment><USER4> wow. that's a BIG button there.

<comment><USER5> Where? I don't see it?</comment></comment>


POSIX Threads Programming - <AUTHOR> https://computing.llnl.gov/tutorials/pthreads/ <comment><USER2> Great find-thanks! I was looking for some good read on threads and this helps immensely with some systems programming stuff :-)</comment>


Ask HN: Quitting my job - <AUTHOR> Dear HN,
I am currently developing Java web applications for a company in the publishing sector. However, I really want to pursue a career in the Ruby sector of web development. I have got to grips with a lot of rails development in my spare time. However, I am starting to feel that my day job is interfering with my self development. Currently my company is caught up in a lot of politics with clients and dissatisfaction with development processes. Some of us really believe that moving away from Java to languages like Ruby, Python or Javascript makes the most logical sense. However, efforts are thwarted by senior managements opinions. Opinions which aren't justified with any kind of evidence. It's just driven by their own personal taste / a lack of understanding of the current industry. We don't build enterprise applications. We build relatively simple applications, that are virtually static sites. However, we are bogged down by the massive dependency management, spring configuration and painful AOP style framework issues. This coupled with supporting sites that are up to 10 years old.
I digress! I am thinking of quitting, regardless of currently having the next job lined up. What are your thoughts? I only have one and a half years of experience under my belt. However, I am constantly researching the web development scene and feel armed for a job as a ruby or even python web development. Is this move worth the risk?
Cheers HN! <comment><USER3> Others have addressed your questions about Java & Ruby, so let me handle the job angle.

If you are _ever_ unsatisfied with your job or your self-development, by all means move on. Life is short, and everyone deserves fulfilling and rewarding work. This is my advice regardless of profession; although it applies double for you, as this is _literally_ the best job market we have ever seen for good people with technical skills.

That said, do not quit without having another job lined up if you only have a year or two of experience. Look around, read up on career searching, call some companies, figure out what you want, and then pursue it. Get a company interested in you and negotiate for the best possible offer. When you have an offer, give your two weeks notice.

</comment><comment><USER4> Local job search on indeed.com Java Developer - 218 Ruby Developer - 28 Python Developer - <USER2>

If your local job environment is analogous to mine, I would suggest that you pursue a dual track.

Route 1: Keep developing your Java skills - even if that means you need to push yourself beyond your current employer's "simple applications." The nearly 10X difference in job availability suggests that having solid Java skills is income security even if it isn't very sexy.

Route 2: Like a couple of others have said, you should continue to learn one or more newer languages on the side and really develop your side projects into something that is an impressive demo of your overall development skills.

If you are hoping to get into more of a start-up environment, Ruby should probably be your focus on route 2. If you are into science and/or data you like go with Python.

This advice assumes that you have the bandwidth in your life to pursue both routes simultaneously.

<comment><AUTHOR> I think you're right. I particularly need to see some of my outside of work projects to some level of completion. Beef up the Github account. Haha and like you say, Java skills are highly sort after. I shouldn't disregard that.

Cheers

</comment></comment><comment><USER5> Interesting you want to go ruby. Scala and Java are semi-interoperable. As is Clojure. At least they all tolerate the JVM and JVM related infrastructure (to various levels). Some of the frameworks interoperate more than the others. Ruby is a bigger leap than some other possible leaps.

Perhaps senior mgmt is micromanaging WRT language selection. Could be your boss micromanaging and he's throwing senior mgmt under the bus. Or maybe you're correct. Anyway the point is you need to make sure its merely the specific language you don't like. If you move to a new ruby using employer where everyone has to dress the same way and hold their coffee cup the same way, you might be really unhappy if its actually the micromanaging you don't like rather than mere language choice.

Finally aside from any micromanagement issue there's work style. I prefer nearly consultative, professional environments where deliverables matter and you don't tell someone 5 levels lower on the hierarchy how to tie their shoes. However its a perfectly valid business choice to run a place the other way, and have an unprofessional, general laborer, non-craftsman type environment. You need to explore your thoughts on this too, again, see above, if you think your dream job is ruby and they don't micromanage one particular aspect of your job, you may none the less hate the new job if what you really dislike about the current job is the general laborer / code monkey / unprofessional unskilled labor workplace.

Other people have already mentioned that language doesn't matter as much as architecture / design. A extremely rigid view of language likely implies an extremely rigid view of arch / design, yet another axis to think about. If your current employer is extremely rigid about language you may have not considered what it would be like to work at a place with more freedom, or even just a different set of equally rigid arch/design outlooks.

Interviews are a two way street and with little experience you need to learn more about a potential new employer than they need to learn about you especially WRT the above.

Good Luck and all that.

<comment><AUTHOR> I think you're hitting the nail on the head with this not really being related to an issue with the language choice. I think I just came to a decision I don't want to develop for the web in Java. I kind of lead with the language argument, but really my issue is with mgmt and processes. Mostly with promises from mgmt, regarding a positive change in the way we do things. However, this has been a long long time coming. I have started to get to a bit of a too little too late predicament. This has been fuelled by my mentors who have all left my company for the same reasons. Leaving me without a mentor figure, which is something I am really striving to obtain again. I would like a mentor at least until my development confidence has been made more concrete. As mentioned above, my development career is still early days.

What you have said about architecture and design also rings true! Many other employees in my company are crying out for the development a more maintainable and stable product, coupled with selling this product to clients expectations. Which we seem to struggle to get right time and time again.

I will definitely take you advice as well with the interview process. I need to ground my wants from a future employer.

Really appreciate the detailed response! Helps put in to perspective what my priorities should be!

Cheers!

<comment><USER5> So reading between the lines the most experienced longest term dev has only 18 months experience. There's nothing wrong with any individual dev personally only having 18 months experience, obviously every dev with 19 or more months experience passed thru the same state. The disaster is solely at the company/mgmt level where you're now the senior technical lead.

One aspect of a company circling the drain, is you're better off finding another place on your own terms before it goes under, apparently soon. Once it crashes, if you're still there, you've gotta settle for anything just to pay the bills. Its hard to say how long you've got before they close, but assuming your last paycheck didn't bounce its longer than you'd have if you wait till the bitter end.

Getting stuck at a better run company that none the less is technologically a clone, complete with pure java etc is still going to be much better.

As a guy who had his 18 months in 1982, I'm just saying I've seen a lot of companies swirl around the drain and its not sounding good for the company regardless of all this "I have lost the java faith" or whatever.

Good luck w/ the future etc

</comment></comment></comment><comment><USER6> "However, efforts are thwarted by senior managements opinions. Opinions which aren't justified with any kind of evidence. It's just driven by their own personal taste / a lack of understanding of the current industry."

this seems like a very common issue these days. it seems like people in this industry reach a certain age and then cease to evolve and refuse to do anything new, which seems logically out of sorts in an ever-evolving field.

while its somewhat a mystery to me now, i can say its great inspiration for myself to not end up that way 10-15 years from now.

</comment><comment><USER7> Overtime, its not the language you code that matters. Application architecture, design, database skills etc do. All this comes from experience, building large applications. I understand you may not have the opportunity in your current company to build those. You can start building small projects in your personal time.

You are just 1.5 years in the industry. Taking such risks early is not advisable. Don't be impatient, keep learning. For example, you can redesign and build the 10 year old sites in a new language or in Java itself.

<comment><AUTHOR> It's interesting you say that! I have considered at least re building our demo product in Rails. Maybe this is a chance to at least show off to my own company that RoR would provide us with less headaches. I also completely agree about the patience side of things. I think my patience wore a bit thin today. I think I just thought I would use HN to vent my anger! haha. Thank you for the advice!

Cheers

<comment><USER8> You may also want to consider newer web dev technology on the JVM. My background ... did Java EE when it first came out. Went to grad school. Did lots of python and rapid web dev for projects. Was forced to use Java in current gig. First, I hated it. Then, I realized it is a bit complicated. Some parts of Java are crap. If you use Java 7, some of those headaches go away. Also, I learned about different web dev frameworks on top of Java (Spring MVC, Play! framework). These make a big difference in my opinion. Finally, there are JVM-based technologies that get you into the "modern" era: Scala and Groovy. My team used groovy like Java and it was a mess. We ended up giving up on a large code base that we developed in Groovy because it was declared as unmaintainable. I came in on this team towards the tail end of the end of groovy days and am glad. Anyways ... long story short, Java is not going away any day soon.

</comment></comment></comment><comment><USER9> If you know RoR is what you want to do then go for it, but prepare yourself before. Here are a few points to consider: \- how's the RoR job market in your area? are there openings for entry level? \- to some extent you can compensate lack of production experience with personal projects (maybe build something in RoR on github) or by contributing (either with software like bug fixes / features or by getting involved in the RoR community)

good luck!

<comment><AUTHOR> Hey there,

Thank you for the advice. I do need to prioritise my development of open source projects outside of work. I have some RoR projects to work on. So I think I just need to push their priority to top of my list! Thank you mate!</comment></comment>