Ask HN: How did you learn to program? - <AUTHOR> So currently i'm interested in learning how to program and what resources are the best for a beginner. Some info : 23 years old, doing tech support for hosting company mainly having customers using *nix.<p>How did you learn to program and what resources did you use ? <comment><USER2> Start by automating your tasks. First, you'll get more efficient and less error-prone in your work. Second, you'll reuse your code across tasks and you'll learn when it's a good time to refactor and generalize vs copy & paste. Third, you'll see how many times your programs misbehave, and you'll learn about fixing errors and writing tests.

Everything can be learned in a course or on a book, but creating something that you really need and care about is the easiest way to get exposed to the details that matter.

As for the question, I learned programming in Pascal at 12 so way over 20y ago. At the time I was playing a lot of role-play games and I wanted to automate "battles": rolling dies, looking up tables related to the damage inflicted, etc. I didn't have Internet, I learned from help and a manual.

</comment><comment><USER3> I taught myself when I was about 14. I ended up programming in response to being given an old laptop that was too resource constrained for the latest Windows OS. All I wanted to do was browse the internet and listen to music locally. This lead me down. The road of discovering linux and eventually writing a CLI music player in Python. I didn't do any serious programming for years after that.

Later on I was struggling through college, switching majors every semester and was running out of time to pick a career. I had no partcuarly strong interest, but I knew I wanted a challenge, so I went into a computer related degree. I am now happily employed 5 years into a career in SWE.

To summarize I taught myself to program through whatever resources I had available to me in response to problems that programming could solve. The internet is vast, if you want to learn you will. Don't just rely on the information, reach out to the people for advice, ie find mini-mentors.

</comment><comment><USER4> Me: Started taking computer science courses but I struggled a lot. My thoughts at the end of my graduation was there's just not enough time to cram in all the information and skills they asked out of me but luckily, I graduated. If I could turn back the clock, I'd just Google for resources myself to learn programming, databases, and all and have chosen a different major to do instead.

Advice: Start with a high level programming language like Python or Ruby. Google to your heart's content.

</comment><comment><USER5> At first, by typing in BASIC code listings from magazines, when I was 12. Then, by writing several hundred small programs that were either graphics "demos" or simple games. Then simple 3D renderers, and then complex 3D renderers. In those days, there was no web, and only a few programming books at the library or bookstore. So I learned almost completely by trial and error. Later, I experienced a lot of growth in my first job, mostly from reading my boss's code. By that time, the web existed, and it was off to the races.

</comment><comment> punk-coder My first exposure to computers was in elementary school. We had a couple Apple II computers which had Logo installed on them. We had fun typing in commands to draw Spirograph looking images on the screen.

My parents got me a Commodore 64 when it first came out. I had a tape deck to save stuff onto. When you turned on the machine you were at a BASIC prompt. It came with a manual that had some simple programs in it. One of the programs drew a piano keyboard on the screen and mapped keys to keyboard keys to let you play. I remember going through the code and changing values just to see what it did. That kind of got me started on programming.

We subscribed to a few magazines (Family Computing, BYTE, etc) that would have program listings in them, which I would sit down and type in. I would then go through the same process. What happens if I change this peek or poke command? What is GOSUB doing? What are all these numbers in the DATA section?

I got to the point where I could write my own programs, including a couple simple games using sprites and joystick controls.

I enjoyed it enough that I'm still a developer now at the age of 46 and plan on doing it for as long as I can.

</comment><comment><USER6> I learned mostly in college. I already had a decent understanding of computers at that point from playing games and messing around with them.

You don't need to go to college to learn how to program though. Programming is just feeding a computer instructions. Since you are working with customers on *nix, that is a place to start. Start small with things like looping over a directory of files and outputting the name. This could be done in Bash. You could pick nearly any programming language and it will have File/IO libraries that allow you to traverse a directory. Sure you could just use "ls -l" on a command line and you should to compare your results. Start small, learn different ways to loop over things. Read docs.

Its much easier to learn when you have some knowledge of the context you are learning in. Tech Support leads somewhat naturally into more of System Administration, which can have a fair amount of programming, mostly for automating things.

</comment><comment><USER7> Elementary school math textbooks in the 80s and 90s (do they still?) had BASIC source listings at the end of sections and chapters. I typed that out into our Tandy 1000 which had some kind of BASIC on it (at the time I just knew it was BASIC and didn't know there were different kinds so which one is lost to me).

For people today, if they're going to be more self-taught than going to school for programming, I often recommend Python. It's very straightforward, usually does what you expect, and the documentation on the main site is fantastic.

Use it to scratch your own itches and python is on nearly every OS outside Windows by default.

If you're interested in web stuffs learn Javascript. I'm not a fan of it, I have my reasons, but it is available on every computer today and has a huge ecosystem of libraries for you to use.

</comment><comment><USER8> A lot of people are talking about having learned early in childhood. Don't let that discourage you - it's not at all too late to learn in your 20s.

My suggestion would be to examine what you know about yourself. How do you personally learn best? Is it in a formal classroom setting? Is it by watching videos? Reading books? By picking up a project you want to accomplish and then progressively figuring out what you need to know to finish it?

That can help you determine whether to self-teach, join a bootcamp or MOOC, etc, and what type of resources to look for.

</comment><comment><USER9> I started learning by using a wysiwyg html editor that would let me view the source code. That gave me a clue to how things worked.

After that I started editing perl cgi scripts. Then I started making my own web apps with perl.

Then I started using CSS with HTML and then Javascript to write my app code.

But... if I were to start now I would buy a Raspberry Pi computer (or two or three) and start taking advantage of all the resources available to learn using it because most of what you'll learn can be used across platforms and the resources are amazing.

[https://www.raspberrypi.org](https://www.raspberrypi.org)

</comment><comment><USER10> I am learning Python by writing codes on a piece of paper, and then practicing in a text editor. Writing on a paper makes learning easier to committing concepts to brain.

</comment><comment><USER11> I started in the 80s. I wanted to write computer games as I didn't have many at that time. Started with BASIC and moved to Assembler.

<comment><USER12> I got started around the similar time, first with BASIC then with Z80 assembly language.

My earliest motivation wasn't to write games, it was to hack games instead, for infinite lives, etc!</comment></comment>


Encode state transitions in types using linear types - <AUTHOR> http://www.tweag.io/posts/2017-08-03-linear-typestates.html <comment><USER2> I really like the name "Linear Types" better than RAII. C++ ctor/dtor pairs are a sort of primitive linear type system that forces exactly one (implicit) use for each instance created.

Linear types nicely generalizes this so that we don't need RAII wrappers or whatever. Just produce values and pass them around, eventually to be consumed. It _feels_ like this is a powerful language idea.

<comment><USER3> Rust uses a similar (but significantly weaker) system called "affine types" underlying its borrow checker.

<comment><USER4> Nit: Rust's affine type system is orthogonal to its borrow checker, rather than underlying it (though they're both crucial to Rust's system of memory safety, of course).

<comment><USER3> Would it be correct to say that the affine type system underlies the ownership paradigm?

<comment><USER4> Absolutely, I was just trying to avoid using "ownership" in my previous comment because it's more of an abstract concept than the type system and the borrow checker (which have concrete phases in the compiler, typeck and borrowck (though typeck also does more than just enforce linearity (er, affininity?))).

</comment></comment></comment></comment></comment><comment><USER5> I don't know Haskell but this looks like Phantom Types in Scala.

Can anyone who knows both languages enlighten us ?

More on Scala Phantom types here [https://gigiigig.github.io/tlp-step-by- step/phantom-types.ht...](https://gigiigig.github.io/tlp-step-by-step/phantom- types.html)

<comment><AUTHOR> I don't know Scala, but Phantom Types look like they only encode the state at the type level, but don't prevent you from copying e.g. the closed door before opening it, which would be undesirable if the state transition corresponds to a side effect.

Linear types can guarantee that the object participating in a state transition is not reused, which prevents accidentally referring to invalidated data.

<comment><USER6> This, exactly.

You can use phantom types to mark the difference between bound and unbound sockets, but you need the linear type system to prevent the unbound value from being used again.

</comment></comment></comment><comment><USER7> The short version, as I understand it, is this will enable the GHC Haskell compiler to validate state machines at compile time. Which is pretty awesome.

<comment><USER8> A tiny bit of model checking never hurt I guess.

</comment></comment><comment><AUTHOR> Discussion of the previous post in the series: [https://news.ycombinator.com/item?id=13866787](https://news.ycombinator.com/item?id=13866787)

</comment><comment><USER4> A linear type system isn't strictly necessary for this pattern; this is a common trick in Rust, which only has affine types: [http://insanitybit.github.io/2016/05/30/beyond-memory- safety...](http://insanitybit.github.io/2016/05/30/beyond-memory-safety-with- types) . Indeed, it's lovely for validating state machines at compile time.

<comment><USER9> Rust can't guarantee that a value is consumed exactly once.

This example creates a monad parametized over how many times a return value must be consumed. It has two settings: 1 (exactly once), and ω, which I'm prettying sure is the Greek abbreviation of "whatever" (zero or more times).

<comment><USER10> > ω, which I'm prettying sure is the Greek abbreviation of "whatever" (zero or > more times).

Or it is the classical notation for the ordinal associated with the set of integers ℕ, aka any number of times.

<comment><USER9> I guess that's also possible. I prefer my own explanation though, but then again I'm no mathematician.</comment></comment></comment></comment>


Show HN: A partial HTTP server written in brainfuck extended with syscalls - <AUTHOR> https://github.com/ajyoon/systemf <comment><USER2> I think the best approach for the Brainfuck madness is to write a compiler/transpirer from a high level language (e.g. LOLCODE) to generate Brainfuck code. Then you can write your app in the high level language and show off the generated Brainfuck code.

<comment><USER3> If anyone out there in Internet land is going to do this, please, please select INTERCAL as the high-level language, I implore you.

<comment><USER4> I put in a vote for Malbolge

<comment><USER5> Ooh, or the highest-level language, Homespring. [http://xeny.net/Homespring](http://xeny.net/Homespring)

<comment><USER4> I kind of want to implement that now...

</comment></comment></comment></comment></comment><comment><USER6> It's really cute how the author added $ to insert a debugging break into the source. Instead of "debugging by printf", which is a bit tedious in brainfuck, this is driving your debugger by editing the source code. Bravo!

<comment><USER7> You laugh, but Python works the same way.

<comment><USER8> I recently learned you can do a similar thing with C/C++ too. Programmatically raise a SIGINT when running under gdb, and gdb will intercept that signal, at which point you can step through the code.

<comment><USER9> Yeah, in Windows you have the `DebugBreak/__debugbreak()` function [0].

For POSIX you have `raise(SIGTRAP)` or gcc you have `__builtin_trap()` which actually has some caveats. [1]

[0] [https://msdn.microsoft.com/en- us/library/windows/desktop/ms6...](https://msdn.microsoft.com/en- us/library/windows/desktop/ms679297\(v=vs.85\).aspx)

[1] [https://stackoverflow.com/questions/173618/is-there-a- portab...](https://stackoverflow.com/questions/173618/is-there-a-portable- equivalent-to-debugbreak-debugbreak)

</comment></comment></comment></comment><comment><USER10> It's fantastic how the author was able to get this up and running, but not the hello world example.

<comment><AUTHOR> listen...

</comment></comment><comment><USER11> This is perhaps the most Hacker News headline ever.

</comment><comment><USER12> This is madness. Also, has anyone noticed the Brainfuck interpreter is written in assembly?!

<comment><USER13> >the Brainfuck interpreter is written in assembly?!

Having reached the lowest level of the machine, they started digging...

</comment></comment><comment><USER14> Isn't leaving comments or whitespace in brainfuck code considered bad form?

<comment><AUTHOR> There is a minified version here if you're into that kind of thing [https://github.com/ajyoon/systemf/blob/master/examples/http/...](https://github.com/ajyoon/systemf/blob/master/examples/http/minified_server.bf)

</comment></comment><comment><USER15> Is this idiomatic Brainfuck?

</comment><comment><USER16> can we talk about how github has code highlighting supports brainfuck?

I didn't really expect that

<comment><USER17> I was impressed, but then again it's like a 1h project so anyone with an interest can do it.

</comment></comment><comment><USER18> Please, I have a family. Don't do this.

</comment><comment><USER19> Because the brainfuck syntax is very simple, it's not really hard to generate a valid program from random characters.

The language is also Turing complete.

It is possible to use genetic programming (and other approaches) to generate brainfuck programs without an insane amount of effort.

Eventually the resulting program can be processed to be made more efficient.

</comment><comment> le-mark So we've come to this. At least it's not another javascript framework (ducks).

<comment> yoz-y Baby steps, but we will eventually get to reactive-brainfuck.

<comment><USER20> All someone has to do is write a JS->brainfuck transpiler and we could have this.

<comment><USER21> I'd really like to see that. I'm eager to build a small program that takes style offenses like nested ternary operators and replaces them with a still functional brainfuck equivalent, to highlight how anoying that style of programming is to read.

<comment><USER20> Thats hilarious lol Or some of those rediculously dense ruby one liners could fit the bill too.

</comment></comment></comment></comment></comment><comment><USER22> I don't know whether to be impressed or scornful that it's interpreted rather than compiled.

<comment><AUTHOR> I was surprised to learn that this has got to be one of the only languages which is easier to compile than interpret. When compiled the language reduces to basically a single-register assembly with a one-to-one character-to-line ratio. Bracket branching can be extremely easily implemented with jump labels and `test` + `jnz` statements without having to worry about things like parsing and jump table construction at all.

<comment><USER23> It's pretty freaking easy to interpret, as well... I implemented an interpreter in Go (which I had never used before) in an hour or so; most of the time spent was learning the two languages (Go and BF).

I should start asking interview candidates to write a BF interpreter...

</comment></comment></comment><comment> this-dang-guy So delighted to see this :D I once fail/won with a paper in whitespace. I love the non-traditional programming languages. They're fun, whimsical, and sometimes a nice break.

LOLCode is still my favorite though. I wrote a prime number generator in it for fun :)

</comment><comment><USER24> I think the author is a masochist

<comment><USER25> The author wrote parts of sauerbraten, he is a cool guy and not afraid of anything.

<comment><USER26> Do you play? I spent ages on that game. Any word on why that would mean he isn't afraid of anything?

<comment><USER25> I played the banabread fork- and tried to mod the engine once to make Turmalin, a sort of team-deathmatch meets 3d-tetris game. [https://springrts.com/phpbb/download/file.php?id=6378](https://springrts.com/phpbb/download/file.php?id=6378)

The not being afraid of going unconventional ways refers to the levels of sauerbraten being stored in octrees. This is quite tough too edit if you are used to 3dsmax and blender. Actually that was too much effort- thus the project never came to be- but the way its stored and accessed, is blazingly fast and effective. One has to admire this skills.

</comment></comment></comment></comment><comment><USER27> Why call it systemf? That name is already taken: [https://en.wikipedia.org/wiki/System_F](https://en.wikipedia.org/wiki/System_F)

<comment><USER28> Didn't you get the memo? We ran out of names about 10 years ago, so now everything is fair game

<comment><USER29> [http://dilbert.com/strip/1993-06-23](http://dilbert.com/strip/1993-06-23)

</comment></comment></comment><comment><USER30> Would it be easier to write a HTTP server in C and compile to Brainfuck using ELVM ([https://github.com/shinh/elvm](https://github.com/shinh/elvm))?

<comment><AUTHOR> Much easier, the equivalent C would be in the area of 15-20 statements</comment></comment>


Global report: Obesity bigger health crisis than hunger - <AUTHOR> http://edition.cnn.com/2012/12/13/health/global-burden-report/

<comment><AUTHOR> The key articles from the underlying project in the Lancet

<http://www.thelancet.com/themed/global-burden-of-disease>

are available for free, after free user registration on the Lancet website.

</comment><comment><USER2> I am not sure if it is irony, or destiny.</comment>


Redis as the primary data store? - <AUTHOR> https://moot.it/blog/technology/redis-as-primary-datastore-wtf.html <comment><USER2> On the one hand, I think it's a bit unfortunate that Redis has been stagnant on the persistence side since the virtual memory experiment ended up nowhere. It's a wonderful tool with so much potential as a primary data store, not merely as a smart cache. But people are bound to get hesitant about a data store if it offers no straightforward way to persist large amounts of data.

On the other hand, Redis was probably born 10 years ahead of its time. If and when we finally get to mass-produce persistent storage media with the speed of RAM and the capacity of HDD -- SSDs are getting there, but not quite yet, and we don't know when memristors will become commercially available -- Redis will be the most obvious database to run on it.

<comment><USER3> Once we get the kind of storage you're talking about Redis will be much less interesting since its big difference is that it stores everything in RAM. If that is no longer an advantage then Redis will become a much more niche tool because you'll be able to get similar speeds out of other databases when they aren't constrained by disk IO.

<comment><USER2> Theoretically, you may be right. But in practice, Redis was designed from the ground up with data structures that are heavily optimized for RAM, whereas traditional databases like PostgreSQL are heavily optimized for disk storage with RAM buffers. Although every database will benefit from faster storage, it will take at least several months, but more likely a few years, to modify traditional databases to take full advantage of the new paradigm. Redis on the other hand will probably require much fewer modifications.

</comment></comment></comment><comment><USER4> The previous link had some questions about performance and equivalence for in- memory use for redis vs. MongoDB.

I can tell you that we tried to make MongoDB do high write updates, and a 24 server cluster (8 shards with 2 replicas per shard) was unable to keep up due to the massively slow response times.

I replaced it with a single server running a twemproxy cluster of 4 redis instances and that single server was able to handle more than 10x the load.

So, there are many cases where using redis makes a lot more sense, even if it makes it complicated to maintain a persistence model.

</comment><comment><USER5> <https://news.ycombinator.com/item?id=5511163>

</comment><comment><USER6> From the article:

        > These are the two primary reasons Redis sucks as a primary store:
        >
        > You have to be able to fit all your data in memory, and
        > If your server fails between disk syncs you lose anything
        > that was sitting in memory.

Antirez explained how redis persistence works[0] some time ago. A good read, and only then one can evaluate the "sucks" part, for one's particular use case.

[0]: [http://oldblog.antirez.com/post/redis-persistence- demystifie...](http://oldblog.antirez.com/post/redis-persistence- demystified.html)

</comment><comment><USER7> RAM generally doesn't get more expensive by time, so might be the right time to do it.

<comment><USER8> RAM prices have increased by 1/3 since last year, for example this[1] item was $60 back then.

[1] [http://www.newegg.ca/Product/Product.aspx?Item=N82E168201391...](http://www.newegg.ca/Product/Product.aspx?Item=N82E16820139140)

</comment></comment><comment><USER9> They could switch to edis when it gets too expensive to keep everything in memory.

<comment><USER10> As I didn't know the Edis project existed, and had to google for it - here's a link: <http://inaka.github.io/edis/>

It's summary is: Edis is a protocol-compatable Server replacement for Redis, written in Erlang. Edis's goal is to be a drop-in replacement for Redis when persistence is more important than holding the dataset in-memory.

And so I don't have to hijack this thread a discussion: <https://news.ycombinator.com/item?id=5621574></comment></comment>


The Chess Master and the Computer (by Garry Kasparov) - <AUTHOR> http://www.nybooks.com/articles/23592

<comment><USER2> The most interesting part of this for me was at the very end, where he mentions a trend of chess masters taking up poker instead; has anyone else heard of this?

It isn't really explained, except in association with the earlier paragraph comparing the complete-information, brute-force-able game of chess to a game which involves probabilities, bluffing, etc. This obviously makes it a more interesting problem these days for researchers, but it's the first I've heard of it being a human trend too. Unless, of course, it's just about the money, which is also hinted at.

<comment><USER3> Yes, many tournament chess players have turned to poker because it is another great competitive game, but can make you a lot more money. Ylon Schwartz is a Fide rated chess master and made $3,763,515 by coming in 4th in the 2008 World Series of Poker. He would not be able to make a living from chess.

<comment><USER3> Here's a blog post I wrote about it, which includes a video with Ylon talking about chess and poker: [http://www.uglychart.com/2008/11/03/ylon-schwartz- poker-play...](http://www.uglychart.com/2008/11/03/ylon-schwartz-poker-player- and-fide-master/)

</comment></comment></comment><comment><USER4> The fascinating part for me is toward the end of the article where he talked about the 2005 Playchess.com competition, in which teams of humans are free to use computers to compete in Chess. To everyone's surprise, a team of amateurs with 3 cheap computer won against both stand-alone computers and Grandmasters with state-of-the art computers.

His take away message: "Weak human + machine + better process was superior to a strong computer alone and, more remarkably, superior to a strong human + machine + inferior process".

I see this trend going on in AI for the long time, where the best use of development goes to augmenting human intelligence rather than supplanting it.</comment>


Vitamin pills don't work and may be bad for you - <AUTHOR> http://www.bbc.com/future/story/20161208-why-vitamin-supplements-could-kill-you <comment><USER2> As always, the devil is in the details. Different vitamins have different effects, they aren't just "antioxidants". Showing that one vitamin supplement is harmful doesn't remotely prove that others aren't beneficial because antioxidants.

This article makes sweeping generalizations that vitamin supplements "don't work" based on a couple of studies on beta-carotene. Many of us already thought beta-carotene supplementation would be worthless. And I bet once they do a study of vitamin E supplementation, it will also be worthless or harmful. On the other hand, you're not going to find a study proving vitamin C supplmentation is harmful. And I very much doubt if they did an isolated study on non-beta-carotene vitamin A, they'd find harmful effects.

<comment><USER3> "A study published in 2007 from the US National Cancer Institute, for instance, found that men that took multivitamins were twice as likely to die from prostate cancer compared to those who didn't. And in 2011, a similar study on 35,533 healthy men found that vitamin E and selenium supplementation increased prostate cancer by 17%."

They do cite quite a few articles that show negative effects of specific vitamins.

<comment><USER4> That study used 400UI of vit E, which is more than 10x the RDA. Mega-dosing is what's dangerous. Good multivitamins use a fraction of that dose.

The BBC article is merely clickbait.. People love to jump on the 'vitamins are actually dangerous' bandwagon. if you do a bit of digging into the studies they're quoting you'll find that their claims are unjustified.

<comment><USER5> _" Mega-dosing is what's dangerous. Good multivitamins use a fraction of that dose."_

The problem is that a lot of multivitamins (and supplements in general) have doses which are all over the place, and megadoses are quite common. You'll also find many reviews and testimonials that swear to the efficacy of any given dose of these supplements. On top of that, many doctors recommend that people take "a multivitamin", without any further guidance as to the ingredients or their dosage. Finally, a lot of people don't trust doctors and believe in alternative medicine, naturopathy, or what have you, from which they'll often hear recommendations to megadose because allegedly, the RDA's are set way too low (for a variety of reasons, depending on the supplement).

There's a lot of conflicting medical advice out there, and for the average consumer (who may have a host of medical issues, or suspected issues) it's not always as clear as "just take the RDA".

</comment></comment></comment></comment><comment><USER6> Coincidentally, just yesterday I spoke with a friend of mine who's working in a shop selling dietary supplements and she claimed that pretty much the whole western world suffers from a severe vitamin D deficiency. A few hous later, I ordered bottles of vitamin D and K (on Amazon, because it's significantly cheaper than her quasi-eco shop).

I'll see how it goes, I'm giving her a three-month lasting benefit of a doubt, because according to my Google research, what she says is true, but I'm probably taking a blood test before and after to see what's up - and I'll consult with my doctor about it prior to taking the pills.

<comment> k-mcgrady I think the NHS (UK Health System) just announced this week they are recommending people take Vitamin D supplements, particularly in winter. I can't find the link now but I definitely read it and it was in the major newspapers etc. AFAIK the problem is more 'multi vitamin' pills than specific ones.

<comment><USER7> Vitamin D pills definitely worked for me, I had what I can only describe as "brain fog" while mostly being inside during the winter. On a whim I bought some Vitamin D pills off amazon and within a few days the difference in how I felt was significant.

I no longer take them every day but I pop one periodically if I'm more tired/irritable/fuzzy than I would consider normal.

<comment><USER8> That doesn't appear to be one of the effects of vitamin D (and deficiency doesn't cause any neurological effects). I suspect the placebo effect is more likely (it will definitely have a large effect on brain fog).

<comment><USER7> There are some places online that do list the type of symptoms I had as being down to Vitamin D deficiency. [http://www.healthline.com/health/vitamin-d- deficiency](http://www.healthline.com/health/vitamin-d-deficiency)

Given that at the time it was Winter in the UK and I'd gotten into a sleep pattern of being awake at night and asleep during the day, I think a Vitamin D deficiency was pretty likely.

<comment><USER8> Given that there is no scientific evidence of those symptoms, I suspect that site pulled it out of their ass. If vitamin D deficiency did cause those symptoms, they would be symptoms of ricketts.

>Given that at the time it was Winter in the UK and I'd gotten into a sleep pattern of being awake at night and asleep during the day, I think a Vitamin D deficiency was pretty likely.

Possibly (assuming you didn't eat much milk or fish). However your symptoms probably had more to do with your sleep pattern than vitamin D.

</comment></comment></comment></comment></comment></comment><comment><USER9> This is why I'm very skeptical of the long-term health of food replacements like Soylent. We know vegetables are good for you. We're not really sure why. How can we possibly create a healthy food-replacement system if we don't fully understand what makes food healthy?

<comment><USER10> I'm really liking mealsquares [http://www.mealsquares.com/](http://www.mealsquares.com/), they're just expensive. They do rely on whole foods to take care of unknown unknowns in nutritional requirements.

<comment><USER11> The pricing works out to around $1.50 per bar's worth ($3 each, and they're around 2 energy bars' nutrition) -- that's not terrible by any means.

<comment><USER12> Mealsquares are really small unfortunately. I found it hard to be full on them if I used for my full calorie intake.

Tasty things otherwise, it basically tastes like dense chocolate pastry.

If you want 'fast food', then a combo of prewashed veggies, frozen food like trader joes dumplings and things like mealsquares and soylent can work. I myself dont really like soylent.

</comment></comment></comment></comment><comment><USER13> I'd be curious who here gets enough vitamin c, vitamin d, potassium, iodine?

If you actually look at the RDA and Compare to your typical diet you'll find you're way under. At least I was and I eat reasonably well.

I've actually noticed a lot of health benefits since I start taking higher doses of vitamin c.

<comment><USER14> Doesn't your body produce vitamin D from sun exposure? Just get outside more.

<comment><USER15> _> Doesn't your body produce vitamin D from sun exposure?_

Yes, but (a) your body's ability to do this decreases as you age, and (b) sun exposure has other downsides such as increased risk of skin cancer, so there's a tradeoff involved.

<comment><USER14> You're not going to get skin cancer in the 10-30 minutes of sun exposure required for daily vitamin D.

Stop clinging to that as a reason to shelter indoors and replace life with vitamins and manufactured meals.

<comment><USER15> _> You're not going to get skin cancer in the 10-30 minutes of sun exposure required for daily vitamin D._

Different people's skins have different sensitivities. Also, skin cancer doesn't happen in one exposure; the risk builds up over time.

 _> Stop clinging to that as a reason to shelter indoors and replace life with vitamins and manufactured meals._

Stop making assumptions. I personally have dark enough skin that a reasonable amount of sun exposure doesn't bother me. But that apparently didn't stop my vitamin D from being low (see my post elsewhere in this thread), so evidently I am dealing with the other thing I mentioned, the fact that your body's ability to make vitamin D from sun exposure decreases with age. So I started taking a supplement. Would you rather I just let my vitamin D be too low no matter how much sun I got?

</comment></comment></comment></comment></comment><comment><USER16> Eat real food. Mushrooms have vitamin D, kale has vitamin K.

All of these things have varying degrees of volatility, so cooking can making them more or less bioavailable, and in pill form they oxidize and have a wide range of potency. Cheap supplements almost certainly have no potency so you're just throwing your money away. Most people should just eat real food and not so much of it. (And pizza is not a real food sorry.)

</comment><comment><USER17> [http://dx.doi.org/10.7326/0003-4819-159-12-201312170-00011](http://dx.doi.org/10.7326/0003-4819-159-12-201312170-00011)

Three articles in this issue address the role of vitamin and mineral supplements for preventing the occurrence or progression of chronic diseases. First, Fortmann and colleagues systematically reviewed trial evidence to update the U.S. Preventive Services Task Force recommendation on the efficacy of vitamin supplements for primary prevention in community-dwelling adults with no nutritional deficiencies. After reviewing 3 trials of multivitamin supplements and 24 trials of single or paired vitamins that randomly assigned more than 400 000 participants, the authors concluded that there was no clear evidence of a beneficial effect of supplements on all-cause mortality, cardiovascular disease, or cancer.

Second, Grodstein and coworkers evaluated the efficacy of a daily multivitamin to prevent cognitive decline among 5947 men aged 65 years or older participating in the Physicians' Health Study II. After 12 years of follow-up, there were no differences between the multivitamin and placebo groups in overall cognitive performance or verbal memory. Adherence to the intervention was high, and the large sample size resulted in precise estimates showing that use of a multivitamin supplement in a well-nourished elderly population did not prevent cognitive decline. Grodstein and coworkers' findings are compatible with a recent review (3) of 12 fair- to good-quality trials that evaluated dietary supplements, including multivitamins, B vitamins, vitamins E and C, and omega-3 fatty acids, in persons with mild cognitive impairment or mild to moderate dementia. None of the supplements improved cognitive function.

Third, Lamas and associates assessed the potential benefits of a high-dose, 28-component multivitamin supplement in 1708 men and women with a previous myocardial infarction participating in TACT (Trial to Assess Chelation Therapy). After a median follow-up of 4.6 years, there was no significant difference in recurrent cardiovascular events with multivitamins compared with placebo (hazard ratio, 0.89 [95% CI, 0.75 to 1.07]). The trial was limited by high rates of nonadherence and dropouts.

The large body of accumulated evidence has important public health and clinical implications. Evidence is sufficient to advise against routine supplementation, and we should translate null and negative findings into action. The message is simple: Most supplements do not prevent chronic disease or death, their use is not justified, and they should be avoided. This message is especially true for the general population with no clear evidence of micronutrient deficiencies, who represent most supplement users in the United States and in other countries.

</comment><comment><USER18> "He consumed 18,000 milligrams (18 grams) of the stuff per day, 50 times the recommended daily allowance."

Linus Pauling lived to be 93. That probably contributed to people believing in megadosing vitamin C.

<comment><USER19> That's a nice long life, but not any longer than plenty of people I know.

<comment><USER18> I think the average age for a man to live in the 1980's was around 70.

[https://en.m.wikipedia.org/wiki/Life_expectancy#/media/File%...](https://en.m.wikipedia.org/wiki/Life_expectancy#/media/File%3ALife_Expectancy_at_Birth_by_Region_1950-2050.png)

Considering his intelligence and age, I'm sure that it was convincing at the time.

These days more people are living into their second century:

[http://www.smithsonianmag.com/smart-news/there-are-more- amer...](http://www.smithsonianmag.com/smart-news/there-are-more-americans- over-age-100-now-and-they-are-living-longer-180957914/)

[http://www.npr.org/2016/03/30/472442367/in-one-italian- villa...](http://www.npr.org/2016/03/30/472442367/in-one-italian-village- nearly-300-residents-are-over-100-years-old)

</comment></comment></comment><comment><USER20> I cured my anxiety and depression with vitamin B supplements. It turned out I had a B12 deficiency, and the lack of B12 was having a compound worsening effect on my nervous system, probably depleting the other nutrients and causing me constant stress. (A bad habit of negative thinking also was the problem.)

Now I don't believe that vitamins are some kind of cure-all either. Vitamins, by their design, are supplements. Meaning they augment an existing healthy diet. From what I read in the article, the people in the study were overloading on vitamins, which I wouldn't be surprised can cause health problems. It's no different that say, overloading on sodium. I often wonder if the synthesizing process and the "filler" material used in vitamins can be generally bad for you.

<comment><USER21> How did you come to discover that B12 deficiency?

<comment><USER20> My wife bought me a book about anxiety. It talked about vitamin deficiencies contributing to low serotonin levels being linked to depleted B12 in the blood stream, so I gave vitamin B-complex a shot. In like a week I stopped having bizarre, end-of-the-world thoughts and feeling stress over every little thing. In two weeks I felt like a normal person. I haven't looked back since.

</comment></comment></comment><comment><USER22> Frontline has a great piece of the problems with vitamins and supplements in the US.

[http://www.pbs.org/wgbh/frontline/film/supplements-and- safet...](http://www.pbs.org/wgbh/frontline/film/supplements-and-safety/)

</comment><comment><USER23> Last year, I was sick all the time, just for a joke a co-worker offered a box of vitamins (1 month of pills). I took them just to try. My big surprise was that when taking them I wasn't feeling any "better"... but when I stopped, I clearly felt that I wasn't sleeping as well as few days before. I tried again several months later, and to my amazement, it worked exactly as the first time.

I'm very skeptical about the studies around vitamins and I prefer taking some in the winter since it's the period of the year I feel the most stressed and sleepy.

I already spoke with other people having the same experience and none of them has more insights of how healthy this is or not...

<comment><USER24> That could be the zinc and magnesium. I sleep better on it.

</comment></comment><comment><USER25> What I dread is that how many books like those written by Pauling - who was a Nobel prize winner - do we consider true and follow its advice because says so? How many placebos might be laying around?

What would be a practical way for folks that don't have anything to do with X field to test if what scientists say is actually true? - at least in such important field as what we consume -

</comment><comment><USER26> I heard a doctor say that North Americans have the most expensive urine on the planet. Most vitamins are flushed out of your system and then flushed away.

<comment><USER14> My grandfather was an internal medicine doctor and said the same thing since the 50's, "all vitamins do is make your pee more expensive."

</comment></comment><comment><USER27> As a kid I used to idolise scientists, and Linus Pauling was one of them - having been one of only two people to ever get two Nobel prizes - the other one a Peace prize.

Now I count him as a delusional and deluding self-promoter.

On the other hand, I'm sure that it is good to take small doses of many different vitamins in addition to well-balanced diet.

<comment><USER28> > On the other hand, I'm sure that it is good to take small doses of many > different vitamins in addition to well-balanced diet.

The evidence seems to say otherwise. There have been many studies over the past decade of general vitamin supplementation, and it does not hold up: [https://sciencebasedmedicine.org/more-evidence-that- routine-...](https://sciencebasedmedicine.org/more-evidence-that-routine- multivitamin-use-should-be-avoided/)

<comment><USER27> I was going to add a note similar to others here, that many people have a vitamin deficiency. It would help for those particular deficiencies and have a very little chance of harm for the other vitamins.

As for most things, it's all about the dosage.

But thanks for the link, I'll read that too.

</comment></comment></comment><comment><USER29> Pretty much everything that can have a positive impact on the body can have a negative one if you overdo it (e.g. water, salt). If someone is claiming something can have a positive impact on the body, it doesn't make sense to me to assume it's harmless as well without evidence.

</comment><comment><USER13> We see these studies every few years. I think it's really just a publication bias issue. If a result of a study is that vitamins do what they're supposed to why would you publish that? Why would the media report on that?

<comment><USER30> Or maybe half the studies are funded by drug companies who enjoy profiteering? The 'average' person (no medical knowledge, no access to research journals, no background knowledge to interpret them) has no way to know. Society should welcome measured criticism, especially from the likes of BBC science journalists, as a counterbalance to constantly advertised commercial interests.

<comment><USER31> No drug company owns a patent on vitamin C. And this BBC article is barely above clickbait journalism. Don't pretend like this is some example of great high quality science reporting.

<comment><USER30> It's not bad. Nutraceuticals didn't invent themselves.

</comment></comment></comment></comment><comment><USER32> Vitamin B12 supplements are ESSENTIALS for vegans, and recommended to vegetarians. Vitamin D are also recommended. Others vitamin supplements are quite useless.

</comment><comment><USER33> I think conclusions about your diet and this can be summarized so adequately by the acronym "YMMV".

</comment><comment><USER34> Anybody know of issues with taking D3 supplements? I take 1000 IUs per day. I can't drink milk or eat anything with lactose or milk protein, and am a sun- avoiding ginger

<comment><USER35> Should be fine, and helpful in the winter.</comment></comment>


Ask HN: Selling a car - Dealership vs. Private? - <AUTHOR> Anyone have experience in selling cars? What are the pro's and con's of selling through to a dealership vs. privately (Craigslist, Autotrader, etc)? <comment><USER2> It is a convenience vs value trade off. Selling to the dealership will get you less than market rate (since the dealership will ostensibly turn around and sell it at market rate.) You haggle at most once. The couple of cars I have sold to Carmax usually got me with in a few hundred of KBB.com's price so I sold to them.

Private sell feels like running your own private dealership for a few weeks. People call and want to come see it, take test drives and haggle. It has usually taken 5-6 inquiries for me to sell privately.

note: N for both carmax and private sell = 2 so your milage may vary.

<comment><AUTHOR> Do you think there is a certain market that does better in private sales (for example: cars under 10K & collector cars)?

My experience is that there is a middle range of cars where consumers would rather pay a little extra to make a trustworthy purchase from a dealership (if those two words can be used together!).

<comment><USER2> I can't say I have ever seen a classic car sitting on a dealership lot. My suspicion is they are considered too hard to sell so the dealership would take them to auction where specialty dealers or collectors pick them up. So yeah I guess most classic cars get around by private sell. For really cheap cars I think those typically go to unaffiliated dealerships, buy here pay here type of places or private sells.

</comment></comment></comment><comment><USER3> I'm doing this right now. I just got a quote from a local dealer. I have a 2011 Audi A4. The dealer offered $23,500 and will go to $24,000. If I sell privately, I can probably get $27,000 maybe $28,000. But, it will take weeks and I have to be very careful of scammers, etc. It's a tough call and I haven't decided what to do yet.

<comment><USER3> FYI - I'm going to take the dealer's upgraded offer of $24K.</comment></comment>


Stop using React for everything - <AUTHOR> https://medium.com/p/c8297ac1a644 <comment><USER3> "I love how cleanly it integrates with ES6 and its component style architecture that the future of the web lies upon. That said, I rarely choose it for projects."

I can't find one reason why ES6 and component-like architecture wouldn't be chosen "often" for projects? React is the first javascript (frontend) framework I use that allows to easily break down architecture and keep a complex (or simple) application clean and well structured. It feels like writing server-side code.

"For static sites, Jade is a fantastic templating engine." Cool. But why compare how to use a javascript, dynamic framework for static sites? That's just a bad argument.

"For data-bound REST apps, I choose Angular. " Good for you but... why Angular over React? Those are 2 frameworks that are supposed to do the same thing (build dynamic front end applications) with 2 different sets of mind. But... I build REST apps with React. I even build Forms with React. And they are not even dynamic. What's wrong with it? It makes my code, form validation, form submit way cleaner, easier and reusable! What should I do instead? Use vanilla js? jQuery? Why? Because it's enough? It's enough, but trust me, I've recently (no later than last week!) refactored some of our forms with React, and it-is- so-much better.

I totally agree with the author's point of "do not use X for the hype and everything, but use X for the good reasons" but the argument given is plain bad and examples are wrong.

<comment><USER4> Well there are people doing some of these things in React and fighting React just so they "did it in react." For instance there is some blog out there which is "the more complicated blog ever" and it's an isomorphic react application. Then there are the people who use React and the 'renderToStaticString'(or something) to make static sites using React.

<comment><USER5> I'm not sure I'd agree that those are examples of people fighting React though — using it on the client and server allows you to never duplicate markup you might have in a component with markup in a template, for example. The case for writing your entire UI in React is pretty strong actually, as it's just a matter of where you create the data to pass down to your tree of components: once, on the server for a complete page load, or incrementally and dynamically on the client.

There are some cases though where the component model feels strained — consider components that act as a pass-through for debouncing data, components that implement routing as a tree of routes and handlers, or components that perform data-fetching. Perhaps it's that the community hasn't found the right APIs for these higher-order components, but it's hard to argue against using React for a stateless tree of UI components.

</comment></comment></comment><comment><USER6> How about learning one thing well, so that you can use it for a wide range of projects? Choosing React and using it for everything sounds like a great idea to me, since you can transfer your knowledge from larger projects to smaller ones, and vice versa, instead of spending time learning new things.

Also, I don't mean to be snarky, but I suggest the writer uses fewer ALL CAPS, fewer exclamation marks and tones down the provocations to be more convincing.

<comment><USER7> This hammer is a little hard to screw things in with, but _man_ I'm good with hammers!

<comment><USER8> React is neither a hammer or a screwdriver. React is the toolbox. The problem here is that the article writer and you think that React is some kind of hammer.

<comment><USER7> The person I replied to said exactly that React should be used for everything.

There are certain categories of web applications and pages which do not benefit at all from React (or other semi-related technologies like Angular), and it's folly to pretend that they do.

If you want to go the "it's a toolbox" route...showing up to a carpentry job with a plumbing toolbox isn't useful.

<comment><USER8> React is the garage in which your toolboxes are stored.

</comment></comment></comment></comment></comment><comment><USER9> > Find out why companies like Google, MSN, and Vevo use Angular.

Because they were part of its creation and are invested in it.

> Or why companies like Sony, Reddit, and Pinterest use Backbone.

Pinterest just switched to React.

> Or why companies like Netflix, Yahoo, and LinkedIn use Ember.

Netflix just switched to React.

> There are smart people out there not choosing React. Ask yourself, why not?

Not for long.

<comment><USER10> Well, does Google really use Angular for something big?

<comment><USER11> DoubleClick admin interface is built entirely with AngularJS. other products (gdrive and co) , it's not clear, what is used. Closure library maybe.

<comment><USER12> Closure compiler is used for a lot of their main products from what I know (gmail...)

</comment></comment></comment></comment><comment><USER13> For most generalists who doesn't live in the frontend, learning every framework and applying the right one is not tenable. None of the js client- side MVCs I've seen are easy to just pick up. Even 6 months after I haven't used one I have trouble remembering how it works. You'll be much much more productive on something you are familiar with, even if it's not an exact fit.

If you are a frontend javascript consultant, than by all means, learn them all.

</comment><comment><USER14> I agreed with the headline but was disappointed that the upshot was "use Angular, Ember, or Backbone instead" rather than "not all websites need to be JavaScript-dependent single page apps".

</comment><comment><USER15> Why?

React brings sanity to the web UI world. It brings _reusable components!_ It brings composition. It brings modularity.

... and it's written by adults who know CS. Your UI is a pure function of your state. Who knew?

Why would I use anything else? Really? Do I _want_ state-management spaghetti and over-engineering?

The only way I'd give up React for dynamic sites/pages is if the web standards groups made Web Components into something that was actually as good as React and baked this into the stack. But somehow I doubt that's going to happen. Web Components might turn into something good to compose UI but you'll probably still need React to add dynamic behavior to it.

</comment><comment><USER16> > It is not the one-size-fits-all solution you are using it as. If your site > has a dynamic form, you don't need a freaking virtual DOM.

The main benefit of virtual DOM afaict is that it makes rendering on the server trivial without needing to jump through all the hoops that, e.g. Angular has to. Contrary to the post, this makes it ideal for such sites.

</comment><comment><USER17> The battle of front-end frameworks is powered by companies trying to lure new and inexperienced developers, as well as experienced employees already working with teams of developers, into a more unified thought pattern. For that purpose they are great. On the other hand, the underlying "magic" isn't optimal for all use cases. The author states:

"If you have a highly dynamic application that needs to rerender frequently, and you want to avoid the heavy weight of template diffing, [...] ReactJS's virtual DOM will be super effective. However, if you're site doesn't have those needs, CHOOSE SOMETHING ELSE!"

Well choose a DOM representation implementation in this case. That's not what React is all about. And may I add that, "Virtual DOM" or however you want to call it, will never be as fast as manual DOM manipulation done right. It's just a well documented convenience magic abstraction.

We no longer have vast incompatibilities among browsers, so we no longer use JQuery. At the same time, threads pop up everywhere titled "how do I do [this] in [Angular, React, etc.], just like it has happened with JQuery in the past. And I won't even mention framework specific "plugins" ..

The underlying problem is, the majority of people involved with JavaScript for the web platform, are afraid and/or lazy learning it. And no framework can cure this, but at the same time frameworks help us hide the pile of ignorance we have under the framework carpet.

I'm not bashing anyone, frameworks can inspire and help organize vast amount of work. But at the same time they are hard dependencies, hailed by well known developers. Sooner or later there will be new ones [that got it right this time] and the cycle of hype-wow-sucks will continue. Well they are all built with JS, so how about you take your time to learn the language and philosophize a bit on programming, state management, application structure and the capabilities (as well as the bottlenecks) of the web platform? Then you may choose any framework you like at any time and you won't be shooting yourself in the foot because you'll be using it as a tool, and not the panacea for all your troubles.

</comment><comment><USER18> No. I <3 React for single-page applications. Add in browserify, and you no longer have to deal with the dependency soup that is jquery / requirejs / backbone / angularjs, and you write software with far fewer side effects. It's. Freaking. Great.

</comment><comment><USER19> > If you have a highly dynamic application that needs to rerender frequently, > and you want to avoid the heavy weight of template diffing, you're looking > at a grass-type opponent and ReactJS's virtual DOM will be super effective. > However, if you're site doesn't have those needs, CHOOSE SOMETHING ELSE!

What if I _really_ like the programming model behind React? My UIs are so easy to reason about now, and that's why I like it so much.

</comment><comment><USER20> This is actually the good thing on React: You can use it for certain parts of your websites and you are not forced to use it for everything on your website.

</comment><comment><USER21> I am using React and all the trendy tooling for my personal projects, even if it's just a simple website. Why? Because that's an opportunity for me to learn new stuff.

I can't use React at work, but I don't want to stagnate either. That's why I'll always be using the most ridiculous trendy technologies for side projects.

I do think that's how most of frontend developers live nowadays.

</comment><comment><USER22> The same could have been (and was) said for Angular. Weapon choice is part of a duel.

At the same time, I worked in a couple places that used better, but less fancy languages/frameworks. I won't name them to not attract a horde of "but Erlang/Racket/Ember is the best thing". There was a repeating pattern of having a hard time with both recruitment and with actual development. People didn't know our tech, or they did but not as well as they claimed they did. Then there was all the trouble with finding libraries, examples and general help of any kind with less popular tech. I suppose the cost of using a wrong but popular tool (be it React or anything else) may actually not overweight the cost of using the right tool which in general is harder to utilize.

</comment><comment><USER23> "However, if you're site doesn't have those needs, CHOOSE SOMETHING ELSE!"

"your" not "you're". Sorry I had to do it.

</comment><comment><USER24> I'd have to agree; React is pretty cool in some use cases but it's not always the best tool for the job. I mean take a look at the Atom editor; they initially used it which helped speed up their development but after a certain point they benchmarked it and found simply manipulating the DOM itself was far faster. Now that doesn't mean to never use React; all that means is simply use the right tool for the right job.

If you need something done and done fast with decent code separation, feel free to pick up React. If you need to optimize for performance (because many of us need to at some point) or you have a good understanding / way to architect your code to keep up a good separation of DOM and business logic then use almost anything else.

Hell, you don't even need to use a framework for the web. My last project I didn't use any and it was perfectly fine. Frameworks are great to get you going faster and doing the hard parts for you but you don't always need that.

In my opinion anyway.

</comment><comment><USER25> Very good clickbait, very little useful content.

</comment><comment><USER26> The thing is do you want to build something or do you want to learn every JS framework and try to decide which is going to be the very best for what you are doing then build something.

" React, Angular, Ember, Backbone, Vue, Knockout, Mithril, Jade, Django, Rails, etc. "

Oh yeah I never built _____ cause I was busy learning a, b, c, x, y, and z frameworks and by the time you have those down there are three new ones. When most likely what you are doing any of the big ones will be fine so just pick the one you want to learn, or know already or whatever works best for you.

</comment><comment><USER27> Who exactly is using React for everything?

<comment><USER18> My team is moving in that direction. Client-side React for our admin interface, server rendered React components for our customer-facing stuff.

</comment></comment><comment><USER28> I'm at the point where I'm looking to pick the next web technology stack for projects moving forward. I am leaning towards React as the main framework for everything.

The reason for a one-size-fits-all choice is that I really don't want to have to learn the ins and outs of 3-4 different frameworks and libraries. Even if React doesn't exactly fit the model of a certain application, it makes sense to shoe-horn it in to avoid a fragmented technology stack. I only have so much space in my brain.

</comment><comment><USER29> I think these points could be for 'hip' frameworks in general. As a developer, it's tiring keeping up with the latest and greatest AT ALL TIMES. Anyone have a good comparison of React and Angular that cuts through the hype?

<comment><USER30> React and angular.js don't really solve the same problems (though angular 2 is incorporating some react-like techniques). React is only the V (arguably a bit of C) from MVC, where as angular.js provides all three but does a rather crappy job on V IMHO. ng-react supposedly let's you use them together but I haven't tried it yet (I plan on it).

<comment><USER31> > React is only the V (arguably a bit of C)

Yes, but beef I have with the cool kids I've worked with are they throw out the entire app: MVC, Server, etc. so they can use this magical V - <USER2> completely rewrite and wing the rest of the app "Oh it's, um, 'Flux Architecture'"

<comment><USER30> Yep. You certainly won't hear me advocate that, but I believe that people are doing it.

</comment></comment></comment></comment><comment><USER32> I'm enjoying [http://riotjs.com/](http://riotjs.com/) right now. It fits well in those situations where you need something light but want a bit of clarity as well.

</comment><comment><USER33> This is the angry way of saying - think about the needs of your website/web app before you decide what libraries and frameworks to use, and use them sparingly.

</comment><comment><USER8> That's like saying stop using HTML and javascript for everything. There are more appropriate tools out there!

</comment><comment><USER8> React is a toolbox. Toolboxes are used for most almost EVERYTHING.

</comment><comment><USER34> React is eating the world. Reactify all the things!

</comment><comment><USER35> React is the new Jquery.

<comment><USER11> > React is the new Jquery.

"You might not need React"TM , or "Occupy React"TM soon next to your dev shop /s

</comment></comment><comment><USER36> I don't even have to read the article to know this is going to get down-voted into obscurity. It's like mom always said if you don't have something nice to say about this week's popular javascript framework, don't say anything at all (or else...)

PS This week's framework is actually Falcor

<comment><USER37> I'm sympathetic to the basic idea, but surely this is not the article you're hoping for. There's a lot of ranting, with only a couple of sentences of actually useful information, eg. situations in which React is not a good fit. He mentions Angular for "data-bound REST apps" \-- why? What makes React worse than Angular in that situation? What would be the tipping point in that situation that might make him use React instead? No data provided.

<comment><USER36> Yeah not exactly a well reasoned article about the strengths and weaknesses (these really do exist) of using React or X Other Framework. I went back and actually read it.

The CEO of the Meteor Dev group gave the following presentation recently:

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

He indirectly touches on some of those probably 25 minutes into the talk.

<comment><USER38> When JavaScript frameworks have CEOs, you know something has gone horribly wrong.</comment></comment></comment></comment>


Google Spends Record Amount on Lobbying - <AUTHOR> http://bits.blogs.nytimes.com/2012/04/23/under-scrutiny-google-spends-record-amount-on-lobbying/?hp&gwh=65E2A6460A5A045C5DFC7273D9E56C4B

<comment><USER2> Some good will come of this I think. Much of what Google would want to lobby for, the rest of us in software would. Industries that make a fraction of what software does spend so much more on lobbying and reap the benefits, its absurd that software companies have not followed suit.

I certainly am not naive enough to think all of Google's aims will be noble here, but I suspect they'll be closer to it than Apple or Microsoft.

<comment><USER3> I think this is true, but some of the stuff that annoys Google (like California's labor laws) they might want to change in a way that you and I would disagree with.

So it is nice to have someone more technologically astute lobbying the Government, but their perspective as the 800lb gorilla with data 'issues' might incline them more toward a 'responsible use of data collected across products' rather than 'customers must be informed and opt-in prior to any data use' type policies.

Back in the way back times when crytpo code was considered a munition, I was participating in efforts to convince the Clinton Whitehouse that it was impractical to impede US companies from putting strong encryption into their products which Italian companies had the same tools at their fingertips as we did. One of the unsung heroes of that time is John Gage, who probably had a lot of trips back and forth to D.C. What I found discouraging is that for every well motivated suggestion, we would get a couple of less savory people jumping on board because it enabled some of their activities. Very, very challenging to propose laws or regulations that bad actors can't turn to their advantage some how. Depressing really.

</comment></comment><comment><USER4> Notably the Ars Technica article[1] dug up a CNN article[2] from January saying that $4 million of that $5 million was just on SOPA/PIPA.

In any case, the Public Knowledge guy is right. You can't set the expectation that good guys (which might not include google for you) don't participate in the broken system and also expect good things to happen. Just like with software patents.

(actually, lobbying may be a really good use of the reported increased revenue Mozilla is now receiving, though it may be difficult for their more distributed decision making process to advocate on more controversial topics. On many open web important issues, though, I would trust them to have a clear voice and do honest lobbying, and a few million should be easily covered by that increase).

[1] [http://arstechnica.com/gadgets/news/2012/04/google-on- track-...](http://arstechnica.com/gadgets/news/2012/04/google-on-track-to- outspend-banks-big-tobacco-in-lobbying.ars)

[2] [http://money.cnn.com/2012/01/25/technology/sopa_pipa_lobby/i...](http://money.cnn.com/2012/01/25/technology/sopa_pipa_lobby/index.htm)

</comment><comment><USER5> It's a record for Google, and a comparatively high amount for a tech company. But $5M certainly isn't a notable lobbying expense in Washington.

<comment><USER6> >But $5M certainly isn't a notable lobbying expense in Washington

Do you have a reference for that?

Ars seems to say the opposite:

>From January to March of this year, Google spent over $5 million on lobbying, nearly matching its entire 2010 lobbying budget of $5.2 million. If the company maintains this pace, it will likely earn itself a spot as one of the top ten spending entities for the year as logged by Open Secrets. Comparing this same rate with 2011 figures, Google would outspend the entire tobacco industry ($17.07 million), the combined spending of JPMorgan Chase, Wells Fargo, and Citigroup ($18.67 million), but would be just barely behind the combined budgets of pharmaceutical giants Pfizer and Merck ($20.685 million). For comparison, Apple spent only $500,000 for the same 2012 quarter; Microsoft spent $1.79 million.

<comment><USER5> I had time to look some of this up. Those numbers are pretty spun. Here's the list of the biggest spenders at Open Secrets: [http://www.opensecrets.org/lobby/top.php?showYear=2011&i...](http://www.opensecrets.org/lobby/top.php?showYear=2011&indexType=s)

The bottom of the list (#20) is at $12M. I don't know where $5 would put you but it's no doubt in the long tail; it doesn't even register.

<comment><USER7> You just accused ArsTechnica of spinning numbers(a serious accusation) and you yourself are comparing Google's spending in just 1 Quarter (4 months) to numbers for a whole year (12 months) ? Wow.

<comment><USER5> Lobbying isn't a continuing expense. Google dumped a ton of cash into Washington this quarter fighting SOPA (to all of our benefit, I might add). It won't repeat next quarter, when there will be a similarly distorted story about some other company with an obvious legislative goal.

</comment></comment></comment></comment></comment><comment><USER8> Very good TAL show on this subject:

[http://www.thisamericanlife.org/radio- archives/episode/461/t...](http://www.thisamericanlife.org/radio- archives/episode/461/take-the-money-and-run-for-office)

</comment><comment><USER9> Google is realizing what so many other companies have discovered -- when you grow large enough to get on the government radar, the government can have huge effects on a business.

Consider this -- what will affect Google's bottom line more tweaking their ad algorithms to slightly increase efficiency or legislation outlawing targeting ads based on specific user behavior?

How about slightly better search results or anti-trust action because of their search "monopoly"?

A slightly better Android OS or patent lawsuits that cause royalties be paid on every single phone sold?

By and large companies invest in actions that most affect the bottom line. A dollar spent on lobbying is a dollar not spent on R&D, operations, support, HR, etc. When you see any company doing a lot of lobbying instead of developing better products and services, there is a reason.

<comment><USER10> When you see a company spending a relatively minuscule amount of money on lobbying compared to R&D, operations, support, HR, etc, what does that mean?

</comment></comment><comment><USER11> Maybe Sergey Brin knows something we don't know and they are trying to stop it.

[http://www.guardian.co.uk/technology/2012/apr/15/web- freedom...](http://www.guardian.co.uk/technology/2012/apr/15/web-freedom- threat-google-brin)

</comment><comment><USER12> Apparently I've read my limit of 10 free articles per month. Is this article anywhere else?

<comment><USER13> For any NYT article, you can remove the part of the URL after the "?" and that should show the story to you.

</comment></comment><comment><USER14> so is this more like bribing politicians or more like paying the bad guys to be left alone?

<comment><USER15> Isn't that the same thing really, even if it ends up benefiting us? I consider all money-based lobbying as bribe. Just because they made it legal, doesn't mean it's right.

<comment><USER16> Can you elaborate on what you mean by "money-based lobbying"?

</comment></comment></comment><comment><USER17> Paywalled.

</comment><comment><USER18> Does anyone think Google is lobbying for its self driving car? So far only Nevada has gotten on board with the technology.

</comment><comment><USER19> Remember, Google does no evil. Some of that money was spent on defeating SOPA/PIPA.</comment>