Automating the setup of my perfect developer environment on OSX 10.8 - <AUTHOR> http://vanderveer.be/blog/2013/01/02/automating-the-setup-of-my-perfect-developer-environment-on-osx-10-dot-8-mountain-lion/ <comment><USER2> Vaporware at the moment, but keep an eye out for Github's <https://github.com/boxen> which purports to do similar with Puppet. Demo'd here: <http://www.youtube.com/watch?v=YlKXRdSAZhY> While I'm linking up stuff, another take on masterless Puppet is <https://github.com/unixorn/miyamoto>

So many of these systems are still too big and complicated. I consider myself an amateur, and therefore I bootstrap with manually getting Dropbox, 1Password, and then update babushka links to do the rest from the canonical sources via github.

</comment><comment><USER3> Terrific concept. What tools (if any) exist to do this kind of thing on Linux VM? Do they work equally well for non Ruby environments (I'm thinking specifically Python/Django)?

I've spent the last week mucking around with VMware/bitnami to try to get a nice clean Python/Django/Pycharm VM for myself (with a template Django project that gracefully does both development and deployment). I'm almost done but what a long hard slog it's been.

<comment><USER4> In theory this should be super easy on most Linux systems because of the software repos.

On Debian based systems, on your existing development machine, you can do:

        dpkg --get-selections > installed_stuff.txt

Then copy the file "installed_stuff.txt" to the new machine/VM and do:

        dpkg --set-selections < installed_stuff.txt

It becomes a little more difficult when there are dependencies that aren't in the package system.

Another thing I've found useful is to have a git repo with my config files. Then on a new machine I can clone the repo and have access to all of them. I've been meaning to write a script that copies everything to the right location, but haven't got around to it yet.

<comment><AUTHOR> Check out <http://dotfiles.github.com> Most scripts have these bootstrap files, my dotfiles and more are based on this repo <https://github.com/mathiasbynens/dotfiles> with a very good setup script.

</comment></comment></comment><comment><USER5> Great post. I am currently doing something very similar and documenting the process :) I'd recommend chef librarian over soloist though.

<comment><USER6> I'll admit that I don't see what the advantage of soloist is. What I would probably do is build the runlist via include_recipe statements in pivotal_workstation::default. Then I would create a Berkfile (<http://berkshelf.com/>) for it, use 'berks install --path' to bundle pivotal_workstation and all its dependencies, and tar that up and upload it somewhere.

The bootstrap then becomes something like

      gem install chef
      echo {"run_list": "recipe[pivotal_workstation]"} > node.json
      chef-solo -j node.json -r http://example.com/pivotal_workstation.tar.gz

The JSON could of course be customized if you needed to set any attributes.

</comment></comment><comment><USER7> Great tips. Thanks.

I also use TotalFinder (tabbed finder replacement) as well as Asepsis (prevents .DS_Store files) from binaryage.com.

I'm a Java dev, flipping back and forth between IntelliJ and Eclipse. Using Eclipse since the pre-1.0 alpha, I still find it more comfortable. But IntelliJ's rate of improvement has prompted me to use it more.

I've become good friends with SSH. We do lots of deploy/ops work at this gig. I'd love to figure out how to put the remote host's hostname into the tab/title/prompt. I haven't tried zsh yet, not excited about putting zsh on all the remotes (which are a mix of Windows and Linux).

Our databases are Oracle, SQL Server, some legacy mainframe stuff. I use Squirrel SQL. I don't like it much. I haven't found any generic SQL clients as clean and smooth as MySQL's Sequel Pro client.

<comment><USER8> _"I'm a Java dev, flipping back and forth between IntelliJ and Eclipse. Using Eclipse since the pre-1.0 alpha, I still find it more comfortable. But IntelliJ's rate of improvement has prompted me to use it more."_

I think you get it really backwards... Back in the days IntelliJ was just soooo much more better than Eclipse it wasn't even funny to compare the two. It was just plain sad.

But... As a lot people predicted, Eclipse being Open Source and IBM having put some of its weight behind it, Eclipse started to get quite good.

Nowadays Eclipse as nearly caught up and it's just a matter of time before Open Source, once again, shall win.

It hasn't prevented me from buying IntelliJ at 70% during their doomsday sales.

Anyway the "rate of improvement" you're talking about is definitely on Eclipse's side (and this come from some using IntelliJ since version 3 or 4, don't remember), not on IntelliJ.

IntelliJ is still banking on its slight edge, but as time passes by that edge is eroding more and more...

<comment><USER9> > _I think you get it really backwards... Back in the days IntelliJ was just > soooo much more better than Eclipse it wasn't even funny to compare the two. > It was just plain sad._

I beg to differ. Eclipse always had a better model of the project and workflow for me. Never could tolerate IntelliJ.

Now, IntelliJ indeed had _more_features_, at least back in the day, compared to Eclipse. But I always found the implementation cluttered and confusing.

</comment></comment></comment><comment><USER10> Babushka is also great for this kind of thing: <http://babushka.me/>

<comment><USER2> Absolutely, similar-looking ruby, too. I was disheartened by the wheel reinvention, but to each his own.

</comment></comment><comment><USER11> I've started doing something similar, except I also use vagrant to ensure that my development OS is the same as production. I also find it easier keeping everything for dev within a VM.

<comment><USER12> I'm doing this too, and it's funny because one of the things I originally liked about OS X was that the UNIX roots allowed me to run my dev environment locally.

Still, Vagrant makes this all pretty easy.

<comment><AUTHOR> I'm a big fan of Vagrant but all our developers use MacBook Air's with 4GB memory and lots of different projects at the same time it's just a pain to use Vagrant.

We compensated this by using a few staging servers and using Vagrant if there are issues at this level (almost never btw)

</comment></comment></comment><comment><USER13> Anything similar for windows?

</comment><comment><USER14> Easier way to get a good development environment and not have to deal with a crippled window manager: <http://www.ubuntu.com/>

On a more serious note, what is with the fad of running OSX and doing all of your work in a VM? OSX is terrible for anything serious and is enough of a pain in the ass that one must use a VM just to run their web application on their development machine. Why not just use Linux? Why not use Windows and run a VM in that? At least you'll get the benefit of being able to run more software.

I'm finding it very difficult to understand the justification for such setups and, from personal experience, I find that it's better to avoid shops which operate in such a way altogether.

<comment><USER15> And what if your development environment is for iOS apps?

How will ubuntu help you out installing xcode? Ubuntu is not the end all of things.

The "fad" of running things in a vm is so that you can validate that you've not forgotten something about your setup and deploy process. If you run it locally on your workstation that you've tweaked umpteen million ways you may have forgotten about some tweak you made and boom your deploy doesn't work. Fully automating a vm build and setup for local use helps work those kinks out. I'm not a web guy but do the same thing for my ec2 setups.

Also some of use prefer not to use Linux or Windows as our workstation. At work now I am typing this on an Arch linux box, but prefer osx for regular use primarily because of the less bs situation. In addition using windows for the base os means things like having to deal with stuff like cygwin/etc.... and their stupid peculiarities and quirks.

<comment><USER14> The problem of replicating environments was already a solved issue for me. When I'm setting up an environment for the first time, I make note of all of the commands required to set it up and put them in a shell script. I guess it's nice to not have to tweak them when there's an OS upgrade.

The other side of solving this is writing tests to check that, for instance, a particular language extension is loaded. The application should be throwing a fit if something is missing in the environment.

<comment><USER15> No arguments there. All this is is just chef recipes to do basically that.

This blog post is a good start but if you have an osx environment you can setup netboot and have a truly automatic install+setup with chef.

I'm a bigger fan of using chef/puppet/whatever over personal shell scripts as then you can test your automation out in a vm. I just build osx vm's and validate my osx automation with that.</comment></comment></comment></comment>


IBM Research produces staph-killing polymers that leave healthy cells alone  - <AUTHOR> http://www.research.ibm.com/articles/nanomedicine.shtml <comment><USER2> _In addition to the potential use for systemic delivery of drugs, scientists suggest that additional applications for these polymers could include adding them to every day personal and cleaning solutions._

Oh, good idea! Let's also put it in the drinking water and feed it to livestock! Nothing like that has ever caused resistance problems in the past!

<comment><USER3> Has anything developed resistance to regular household bleach?

<comment><USER4> Drinking bleach won't cure your staph infection though.

<comment><USER3> Yes, this is kind of the point I'm making, poorly.

Some things like anti biotics are misused and that's caused resistance.

But handwashing with certain microbicides doesn't create colonies of resistant bacteria on our wrists (where the microbicide is diluted) because these microbicides have a different action.

Thus, putting this polymer in all sorts of places is less likely to lead to resistance problems.

</comment></comment></comment></comment><comment><USER5> Great research from IBM here. Antibiotic resistance is a prevalent problem in our society today, with doctors prescribing antibiotics to everyone for everything (to no fault of their own - because of patient demand).

Nanotechnology combining with advanced materials will lead to a better understanding of pathogens and ultimately how to eradicate them. These are great steps towards solving many real and serious issues facing society today. It's certainly refreshing to see different disciplines coming together to move us forward.

These [polymers] are years away from clinical use, but this is a glimpse into the not too distant future.

<comment><USER6> _doctors prescribing antibiotics to everyone for everything (to no fault of their own - because of patient demand)_

This happened when resistance wasn't well understood. I don't think it happens nearly as much now. I've had doctors tell me "antibiotics won't help what you have, stay in bed and you should feel better in a few days"

</comment></comment><comment><USER7> "that move quickly to target infected cells in the body": does it make sense to write this when you talk about bacteria? It looks to me like the author confused them with how viruses work: With bacteria you don't target "infected cells", you target infectious agents, the bacteriums.

</comment><comment><USER8> I always wondered if there would ever be a post antibiotic mechanism to kill bacteria/viruses, along the lines of nanobots perhaps. Nice to see progress is being made in this regard...the human race may be depending on it!

<comment><USER9> [https://en.wikipedia.org/wiki/Bacteriophage](https://en.wikipedia.org/wiki/Bacteriophage)

</comment></comment><comment><USER10> This sounds like an excellent material to make central lines out of, given the current rates (~5%) of infection by antibiotic resistant S. Aureus and friends.

<comment><USER11> We're already making central lines out of antimicrobial materials, like ionic silver.

</comment></comment><comment><USER12> Very rudimentary understanding of Cancer so if someone from a field is here please do comment: can this technique also be used for destroying Cancerous cells?

<comment><USER13> Doubtful. That is the problem with cancer cells - they are indistinguishable from others. I think the current bleeding edge in cancer research are ways to disable the cell mechanism that turns off the immune system near the cells.

<comment><USER14> The relationship between the immune system and cancer is incredibly complicated. There is, however, some fascinating research dealing with using pathogens that somehow preferentially infect cancer areas of the patient, to stimulate the immune system in that area:

[http://stm.sciencemag.org/content/2/44/44ra57.abstract](http://stm.sciencemag.org/content/2/44/44ra57.abstract) is a paper that talks about it. It's pretty neat!

</comment></comment></comment><comment><USER15> Everything able to replace, as a cheap and therefore widely used biocide, this guy: [http://en.wikipedia.org/wiki/Isothiazolinone](http://en.wikipedia.org/wiki/Isothiazolinone) which is responsible for my allergy and awful dermatitis, it is a good thing.

</comment><comment><USER16> What of the huge population and variety of bacteria that are symbiotic and in some cases necessary for good health such as gut bacteria? How would this technology target only bad bacteria? Is it so customizable that variants can be generated for specific pathogen species?

</comment><comment><USER17> How long until we stop targeting bacterial cells and start targeting healthy human cells? I'm surprised no one's commented yet about the weaponization prospects for these polymers.

</comment><comment><USER18> I'm baffled by how this is both high-tech and totally bonkers, being able to produce a polymer specifically targeting specific harmful bacteria is quite an achievement by itself but it is dwarfed by the ability of IBM to do away with the laws of physics, making matter just disappear is an incredible feat.

I wonder if this polymer just turns invisble or if it cease to exist without leaving any other compounds, residues or energy.

<comment><USER19> They claim that it's "biodegradable." I don't know the details, but I'm guessing the polymer breaks apart into smaller, benign pieces over time? I wonder if that means they have to make it right before using it, and what, exactly, triggers the breakdown.

</comment></comment><comment><USER20> > adding them to every day personal and cleaning solutions

... is the best way to breed resistance...

<comment><USER21> The polymer doesn't work in a way that resistance is likely or even possible. They spill the bacterias guts. Its like getting resistance to head-blowed-off - not going to happen.

<comment><USER22> To be fair... the mechanism of penicillin when described for the lay person is remarkably similar to the description that IBM provides.

"the polymer attaches to the bacteria's membrane and then facilitates destabilization of the membrane" vs "act by inhibiting the synthesis of the peptidoglycan layer of bacterial cell walls".

And the resistance isn't to getting your head blown off. That's thinking too much in the box. It's more like being resistant to having a bullet shot at your head, either by somehow becoming invisible to your assailant's vision, wearing a sufficiently good helmet, or having your vital organs located somewhere else.

While I agree that it seems much harder for bacteria to overcome this new approach, it really isn't safe to say that it's not possible. We have no idea about the microbial world. We barely know a fraction of the microbes that swarm around us, we have no idea what defenses, mechanisms and quirks they have that might provide a method of resistace.

And since this is a passive process (just some polymer floating around) that somehow does not damage human cells, you can bet that there's someway to spoof that.

<comment><USER23> To be clear (from an undergraduate microbiologist), my thought process behind the claim that IBM's polymer is less likely to promote resistance: Faster- acting agents that cause immediate destruction are much harder to develop resistance to because normal minor variation from mutations is much less likely to produce anything that will save a cell from death. So even if a cell produces a minor variation in its membrane protein it will likely still be killed and the "resistance" gets no chance to develop.

For something like penicillin, the bacteria gets quite some time to die (it inhibits synthesis!) and there are many different places in the peptidoglycan synthesis pathway for the cell to develop a resistance.

Does that make sense?

<comment><USER16> Indeed it does! Thank you.

</comment></comment></comment></comment></comment><comment><USER24> This is very very cool.

</comment><comment><USER25> Nobel prize</comment>


Frustration project: Automate data entry into PeopleSoft with Selenium - <AUTHOR> https://github.com/tbensky/selenium-peoplesoft <comment><USER2> #FunFact: I started the Selenium project. My first job out of college was at PeopleSoft. I left PeopleSoft and went "in-house" as the PeopleSoft admin at ThoughtWorks. A few years later, Selenium came out as a side-project for another internal system we needed. _But_ when we were rolling out Selenium and dreaming up "world domination plans", one of my mine was to get a copy of Selenium to ship with every copy of PeopleSoft (supplanting the free copy of SQA Robot that PeopleSoft shipped by default). Anyway, I never really pursued that particular "plan", but here we are.

<comment><AUTHOR> THANK YOU for giving us Selenium. When I first ran my script and saw the browser pop up start "running on it's own," I was pretty wowed.

</comment></comment><comment><USER3> Another +1 for Selenium. I used it to bag tickets for a show I wanted to see. The seller's site was terrible and apparently had no protection against ticket spinners so all 5,000 tickets sold out in minutes. Fortunately their resale site also had no protection at all so it was easy to write something to reload the page often and put tickets into my shopping cart as soon as they became available. When that happened it notified me and handed back control for me to enter the credit card details (I was too lazy to automate it all). I'm not proud of this brute force approach but if the reseller's site wasn't so awful to start with it wouldn't be necessary.

</comment><comment><USER4> "Peoplesoft is a curse on humanity"

I would love to know the story of how this wretched piece of software seems to have embedded itself into nearly every college and university in the United States.

<comment><USER5> No surprise that it is backed by Oracle. The sales people at Oracle are really good at getting technology inept people/businesses into multi year contracts.

Once they started citing the list of features in their hundred slide presentation, the administrator stood no chance.

<comment><USER6> PeopleSoft was one of the larger players, at least in education, well before Oracle bought them. There's really (or at least there was when I was involved in higher education) only 3 main players at that level. And trust me, each option you had was bad in its own way.

The problem is that these products started out much smaller, and grew to fill the needs, although not necessarily as nicely as you might like. So now when it's time to put out a new bid, there's just the handful of vendors who can check off all the boxes for what the current system does. And integration with other systems is always a pain - even today it often includes csv or tab- delimited files that get sent to ftp sites for batch processing!

</comment></comment></comment><comment><USER7> There is an entire class of business problems that can be solved using Selenium.

I don't love that raw http connections are the universal API, but at least it's a tool in our belts when these companies provide lackluster or zero proper interfaces.

<comment><USER8> There's a whole class of solutions beyond Selenium that automates not just web apps but all apps. It's going under the name of "Robotic Process Automation" and people really like it because they're not dependent on their software vendor to get basic integrations done.

</comment></comment><comment><USER9> Love it. I've built a flight search tool in selenium too, and for isolating deals. (I've also used selenium for testing). The biggest problem is the speed and the unexpected (the spinner you experienced, intermittent page load times, asynchronous requests or when elements are stale as a result). But it is possible to do it.

Next you can thread the sucker, so you could have 2-4 PS windows open and enter at a faster speed ;)

<comment><AUTHOR> Yes, multi-threads of it...that would be scary!

</comment></comment><comment><USER10> I use selenium similarly to drive a similarly awful interface known as costpoint. I would DEARLY love to know how to use the browser developer tools to figure out what is actually happening under the hood of websites without having to read every single Javascript module. The network tab shows you what is sent and received but it's not easy to figure out how those messages are created and parsed. It would be nice to learn how to debug and step through some of that.

If I could learn the underlying api, I could write a tool that would never change. The ui changes much more frequently than the interface between client and server code. Besides, it would be much faster this way.

<comment><USER11> If you click on the "initiator" column in the network tab it will jump to the code that created the request. Can also see stack traces, set breakpoints, etc.

<comment><USER12> If anyone happens to know of a particularly good article on this for non- javascript (but technical) people, please post.

<comment><USER13> Please clarify--are you looking to understand how browser events work without learning about the DOM and/or Javascript?

<comment><USER12> I suppose something along the lines of Chrome debugging for programmers who aren't javascript developers...undoubtedly there are some fundamentals you would have to become knowledgeable in, as with any technology.

</comment></comment></comment></comment></comment><comment><USER14> I'm always interested in clever use cases for Selenium.

It seems like "automating boring stuff using Selenium" should be a bigger category than it is - and use cases that can do it profitably are always fascinating.

<comment><USER15> RPA (Robotic Process Automation) is a big category of tools that can be summarised as 'automating boring stuff'. You often see it used for repetitive data entry, e.g.

1\. Load excel sheet from X:\\...

2\. Login to Y

3\. For each row navigate to ... then enter data

4\. Submit, if there's a validation error add it to and excel workbook

5\. Email exception report to ...

<comment><USER16> What software is generally used for this? Is there anything available for the average person that doesn't require spending a small fortune?

<comment><USER17> Uipath and automation anywhere seem to be big players with community/free starter editions. PWC (who are spearheading the RPA at $work) seem to have decreed that all their staff are going to use uipath worldwide.

There are a handful of open source RPA tools, but I don't think there's a breakthrough project yet.

</comment></comment></comment></comment><comment><USER18> Webdriver is for more than just testing! Very cool demonstration.

My biggest headache was in getting the right selectors for the various form fields - some services have shifting IDs and classes (ugh xpath)

<comment><USER19> When you start using xpath that's 20 parents deep and every line of code scrolls off the page you quickly realize how important it is for your devs to to write good accessible and unique element IDs.

</comment></comment><comment><USER20> IMHO it's usually better to write a WebExtension instead of using Selenium, since you have more control over the browser, can intercept and modify network requests, can access the DOM from JavaScript while being protected from the page altering the environment, and can ship the code as a browser add-on, while still being able to communicate with native apps.

Only downside is that you can't drive old IE and mobile browsers except for Firefox for Android.

</comment><comment><USER21> Any tools to do this with native applications too not just browsers? We have been flooded by this RPA companies the past 2 years and I'd love a way to do this with Python. It is actually a potentially very profitable market since the impact of automation is very visible (people see cursors do stuff for them...).

</comment><comment><USER22> I would love to hear any more you have to say about the genetic algorithms you use to help with scheduling.

<comment><AUTHOR> Ah yes, the genetric algorithm (GA). Well, in short, scheduling personnel is a very visible, policital, and important job. It affects people's lives, and has to be done farily and correctly. I did my best (by hand) for a few years (scheduling 50ish professors into 200 class sections), and I knew I was doing a bad job, but had no choice. It would take 2 weeks to do, because I could only mentally handle working on such a job for so much in a given day before I had to set it aside. So I came up with a preference form, that each could fill out dealing with things like preferred time of the day to teach, daily schedule compactness, preferred class levels, etc. These preferences could also be weighted (0..1) by importance to each person. So the GA starts out with a long, two-part inital random sequence that consists IDs to all professors followed by IDs to all possible classes. Using crossover and mutation (the usual GA steps), the order of the professor IDs vs the order of the classes (prof 0 gets class, prof 1 gets class 1, etc.) are shuffled by the GA. (There are a lot of strange constraints to this you'd only see in academia, related to pay, and contractual teaching requirements.) A fitness is calculated for each professor's latest schedule, by computing a weighted sum of their preferences, based on the assigned classes pulled from the long GA sequence. It's incredible how well it works. It is done in under an hour, people seem happy, everyone's schedule fitness is minimzed, and each's schedule fitness is explained to them (i.e. you got +3 points because you wanted an 8am class, and got one). Everyone can also see everyone else's fitness so it's a "share the pain" kind of resulting schedule. At times when we go in to tweak things by hand, it is clear how tightly the GA optimized things, as any human intervention we try usually and obviously makes things worse. Bottom line, the GA generates the CSV, which Selenium types into PS. After using the GA, I'm convinced that neither humans (or spreadsheets) should be invovled in scheduling at all. I also think GAs are also pretty incredible.

<comment><USER22> Fascinating! I am going to try that. I've been trying to teach myself SAT solvers and constraint systems to approach the problem at my junior college.

</comment></comment></comment><comment><USER23> Selenium leaves trace in HTTP requests, so its use is quite detectable. The authors of PeopleSoft can include Selenium detection in their products, disallowing your automation scripts. Why not use GreaseMonkey instead?

<comment><USER24> Do you have any more information about this trace in HTTP requests? My understanding was that it was the _browser_ doing the requests; Selenium was just driving the browser.

<comment><USER23> Yes, here is info: [https://stackoverflow.com/questions/33225947/can-a- website-d...](https://stackoverflow.com/questions/33225947/can-a-website- detect-when-you-are-using-selenium-with-chromedriver)

</comment></comment></comment><comment><USER25> add AI on top of that which learns what/where/how to enter (or at least suggests) and you get the modern office automation wave.

</comment><comment><USER26> Ha! I see your crappy UI in PeopleSoft, with hard to automate edge cases, and I raise you multiple SharePoint instances!

Ante up at your peril in this game :/)

<comment> bash-j I've managed to automate SharePoint data uploads and downloads using the SOAP API.

<comment><USER26> I have too, and the OP got Peoplesoft to work. But ... my goodness the effort compared to a proper jason APInis huge and compared to just web scraping HTML. I mean there is a word file someone just uploaded. That's three clicks</comment></comment></comment>


A list of AngularJS services, directives, utilities and resources - <AUTHOR> https://github.com/gianarb/awesome-angularjs

<comment><USER2> This is a great list! Good work!

</comment><comment><USER3> Thanks for putting your time to this fantastic list.</comment>


House Judiciary Committee requested docs from Bezos re: monopoly digital markets [pdf] - <AUTHOR> https://judiciary.house.gov/sites/democrats.judiciary.house.gov/files/documents/Amazon%20RFI%20-%20Signed.pdf <comment><AUTHOR> Interesting bits : Correspondence about Amazon's recent move to tell some brands that they can only sell on Marketplace (not as vendors) and others that they can only sell as vendors (not on Marketplace). (By dictating this, Amazon can max its margins at the brands' expense.)

<comment><AUTHOR> Another one: "Spreadsheets, charts, documents, or discussion" tracking data on AWS customers, including their usage of third-party software services. (The issue here is whether Amazon uses this data to develop its own native AWS software that displaces popular third parties.)</comment></comment>


New evidence suggests comet or asteroid impact was last straw for dinosaurs - <AUTHOR> http://www.sciencedaily.com/releases/2013/02/130207141444.htm <comment><USER2> Brian Switek is a science writer who specializes in writing about dinosaurs. He keeps up with all the professional literature on the subject. His recent article in Slate, "What Really Killed the Dinosaurs? 'An asteroid 65 million years ago is no longer enough,"

[http://www.slate.com/articles/health_and_science/animal_fore...](http://www.slate.com/articles/health_and_science/animal_forecast/2013/02/dinosaur_extinction_was_an_asteroid_the_only_cause_of_the_cretaceous_mass.html)

goes into detail about the anomalies in the fossil record of the K/Pg mass extinction, the issues of dating the asteroid impact, and other likely contributors to the environmental stress that made many lineages on land and at sea go extinct at approximately the time when the non-avian dinosaurs went extinct.</comment>


Ask HN: How do you code or study when the surroundings are noisy? - <AUTHOR> Do any of the noise cancelling headphones work good for you? How else can you cancel out noise. What strategy works? I am always looking for ways to completely block out sound without using painful earplugs. The same issue with bedtime. <comment><USER2> Iput on my noise cancelling headphones

<comment><AUTHOR> Which ones? and how good are they?</comment></comment>


Ask PG: Why not use the ▲ unicode character instead of a gif on HN? - <AUTHOR>

<comment><USER2> When you get to 500 karma, you get a ▼ immediately below the up arrow. Making a decent layout for both, even using the small arrow equivalents (▴ and ▾) would be pretty tricky in text as it'd need to be a block element rather than the specifically sized div with background image trick that's used now.

Interestingly (if you're a massive web nerd) is that the image asset request sets a no-cache header. Almost certainly just a default setting that's been overlooked _but it could be a tracking image in disguise!_ :)

<comment><AUTHOR> Yes, but the gif looks awful if you zoom in.

I didn't know about the downvote arrow. Makes me sad to see that even if my Hacker News account is almost 7 year old, I only got 312 karma points. :-(

<comment><USER3> That's ok, you make me feel better for when my account gets to almost 7 years old =)

</comment></comment></comment><comment><USER4> I wish theu up and down were not so close together.

Fear of accidental downvoting prevents some people from upvoting. That's sub optimal.

<comment><USER5> This has gotten worse for me with Safari on OS X Mavericks. Sometimes I click on the up arrow and OS X decides to scroll some 15px down, leaving me to wonder if I actually hit up or down.

</comment></comment><comment><USER6> PG doesn't have time. Others do, so I introduce to you HN Special. [http://gabrielecirulli.github.io/hn- special/](http://gabrielecirulli.github.io/hn-special/)

P.S. It has unicode arrows.

<comment><AUTHOR> Beautiful! I've started using it now to post comments.

Wonderful unicode arrows!

</comment></comment><comment><USER7> I'm more wondering why they use css* to rotate the image, instead of just using a sprite with both triangles and clipping.

Granted, on a site as simple as HN this makes no difference at all. But I think there is an overall trend to push more work onto the client, which kinda makes sense since they have more and more CPU and RAM over time. OTOH, its bad because I can throw away my old "office" desktop and my "netbook" (it has net in the name!) because they can't browse the average webpage anymore!

<comment><USER8> In IE10 the css trick doesn't work and you get two ▲'s, one for upvoting and one for downvoting. See an IE10/Chrome comparison: [http://imgur.com/Pe2yKe6](http://imgur.com/Pe2yKe6)

<comment><USER9> Still likely makes no difference on this site. The percent of people on here on IE10 has got to be almost 0.

</comment></comment></comment><comment><USER10> Interestingly, you can style it however you want as well. Check this out [http://jsfiddle.net/ePA3L/](http://jsfiddle.net/ePA3L/)

</comment><comment><USER11> Probably one of reasons (I hope) : [http://imgur.com/xnHmnap](http://imgur.com/xnHmnap)

<comment><USER12> Why aren't you using a terminal that can handle UTF-8? Alternatively, why aren't you using a web browser that can handle UTF-8?

<comment><USER13> > Why aren't you using a terminal that can handle UTF-8?

Perhaps they're still on RHEL5. Many of us are.</comment></comment></comment>


Tiny Data, Approximate Bayesian Computation and the Unpaired Socks of Karl Broman - <AUTHOR> http://www.sumsar.net/blog/2014/10/tiny-data-and-the-socks-of-karl-broman/

<comment><USER2> Clearly not a fan of theathletic socks. They would confound this model (and many people!). Eg: [http://www.theathleticcommunity.com/shop/la-cubiste-socks- vi...](http://www.theathleticcommunity.com/shop/la-cubiste-socks-vive-la- tarte)</comment>


A physicist examines the Kennedy assassination film - Alvarez (1976) - <AUTHOR> http://scitation.aip.org/content/aapt/journal/ajp/44/9/10.1119/1.10297

<comment><AUTHOR> There was a copy of this in the breakroom of our physics lab this week. Luis Alvarez was a top-notch physicist and a Nobel Laureate.

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

Click the "Download pdf" link for the full article.</comment>


New Developer Relations Consulting Company Launched - <AUTHOR>

Will our services - www.kunalo.com - help you? <comment><USER2> The value proposition of your service is generally interesting, but I don't think you are telling your story very well, and considering you are marketing "creative story and message development" as one of your core skills, you might want to take a look at that.

Also, your website looks like a product manual or internal specification document. Your target audience is not developers, but people seeking to market to developers and don't know how.

Respectfully, this wouldn't give me a great deal of confidence in your ability to do well what you say you do well.</comment>


Ask HN: Why is this page completely broken on HN? - <AUTHOR> I see 346 comments on this page in the meta information, but only two comments render out on the page.
https://news.ycombinator.com/item?id=22384356
Any idea why? Google cache shows the content, however, HN isn't rendering it out. All other pages appear to work fine. <comment><USER2> We renamed someone's account last night but some cached data on the server still had the old name, which meant a lookup failed when normally it wouldn't. I'll restart the process and it should be fixed shortly.

In the future, can you please send things like this to email@example.com? (That's in the site guidelines: [https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)) I'd never have seen it if another user hadn't emailed us a link to your post.</comment>


Your Hacker News history visualized - <AUTHOR> http://social.gnod.com/hn:no_gravity

<comment><USER2> Very slick! Unfortunately, one of my submissions was an outlier which got 10x as many points as anything else I've ever submitted. So I have one circle at the top of the screen and everything else is bunched up at the bottom. So two suggestions:

1\. Add an option to eliminate the N top scores, or

2\. Make the Y axis a log scale

<comment><USER3> There's a similar issue if you joined a site long, long ago but didn't get active until recently (which is reddit for me.) One dot, then years of blank space.

<comment><AUTHOR> Both issues could be solved in a number of ways. Im undecided yet, what would be the best. Need to sleep over this.

</comment></comment></comment><comment><USER4> Needs something that resolves case-sensitivity in usernames.

For example, because I've chosen "case_sensitive" as my user name, no one else may choose "Case_Sensitive" or "CaSe_SeNsItIvE" et c. Meanwhile, a request for "Case_sensitive" will fail.

[http://social.gnod.com/hn:case_sensitive](http://social.gnod.com/hn:case_sensitive)!

[http://social.gnod.com/hn:Case_sensitive](http://social.gnod.com/hn:Case_sensitive)!

It would be possible to fix this by crawling and scraping an enumeration of all valid user names into a lookup table, and then matching a query tranformed to all uppercase (or all lowercase) letters against the similarly transformed lookup table which retains the valid case sensitive version, then showing the results with the corrected name.

<comment><USER5> HN itself has case sensitive usernames for login and urls. I have always found that strange.

</comment></comment><comment><AUTHOR> Put in "hn:[username]" to see a visualization of your posting history by popularity over time.

Also works for Reddit and Twitter with "reddit:[username]" and "twitter:[username]".

</comment><comment><USER6> O/T: Marek, I'd like to thank you for other Gnod projects. I remember being enthralled by Gnoosic, Gnooks back in the day. Really wonderful stuff.

<comment><AUTHOR> Thank you! Happy to hear that!

</comment></comment><comment><USER7> Only seems to show news submissions by a user, not their comments.

<comment><AUTHOR> Ok, I added comments. Put an exclamation mark behind the username to activate them:

[http://social.gnod.com/hn:teddyh](http://social.gnod.com/hn:teddyh)!

<comment><USER8> That's cool, but I had a few very large links, which means all my comments are noise. I'd like to see just comments :-)

<comment><AUTHOR> Ok, added another rule! 2 exclamation marks means comments and nothing but comments:

        http://social.gnod.com/hn:peteretep!!

</comment></comment></comment></comment><comment><USER9> Is there an "about" page? Can't seem to understand what this site does.

<comment><AUTHOR> It displays your posting history on a chart. From the left to the right, the posts get newer. From the bottom to the top more popular. There is a little ? on the upper right of the page which leads to an info page.</comment></comment>


A KPI dashboard for early-stage SaaS startups - <AUTHOR> http://christophjanz.blogspot.de/2013/12/a-kpi-dashboard-for-early-stage-saas.html <comment><USER2> This stuff is critical for a business. I review our dashboards daily / weekly. We use Birst now (will put you back 5+ figures) but started out with something just like this.

<comment><AUTHOR> Glad you like it, thanks for the comment!

</comment></comment><comment><USER3> Ah-ha nice co-incidence - I was in your office today and telling my co-founder you are the master of SaaS metrics. :)

</comment><comment><USER4> Looks great! You are making a big assumption with linear, fixed COGS scaling. I will probably use this, as it's a great document, but I'm going to add some more flexibility for COGS line items.

I wish AWS bills scaled like that :)</comment>


Buy and sell ads/ad-space using bitcoins - <AUTHOR> https://anonymousads.com/

<comment><AUTHOR> Been trying this out, seems like a cool use for bitcoins: you can buy and sell ads for tiny fractions of a cent, and get paid out pretty much immediately even on $0.10 earnings, something not really possible with conventional currency ad-brokers.

Would love to see this kind of thing disrupt Adsense in some far off future :)</comment>


How Many Objects Can Be Juggled (1997) - <AUTHOR> http://fermatslibrary.com/s/how-many-objects-can-be-juggled <comment><USER2> There's a fascinating video on this, which features the current world record holder, Alex Barron — who holds the records for most balls juggled (11) and most balls flashed (14).

See [https://www.youtube.com/watch?v=7RDfNn7crqE](https://www.youtube.com/watch?v=7RDfNn7crqE)

</comment><comment><USER3> > I hate to break it to you aspiring numbers jugglers, but no human will ever > juggle 100 balls.

I hate it when the in first sentence author makes a categorical sentence and then half a page later cites "a - acceleration of gravity = 9.81 m/s^2" as if it's a some sort of fundamental constant :) .

Here is an example of juggling under simulated different gravity: [https://blog.ted.com/athletic-machines-raffaello-dandrea- at-...](https://blog.ted.com/athletic-machines-raffaello-dandrea-at- tedglobal-2013/)

<comment><USER4> Also, he wrote:

"g = acceleration due to gravity = 9.81 m/s^-2"

m/s^-2 is not the correct unit for acceleration.

<comment><USER5> Yes it is. That's the SI unit.

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

<comment><USER4> No it isn't. That's not the SI unit.

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

TIP: Look closer =)

<comment><USER5> Oops, thanks, guess I have mental autocorrect turned on

<comment><USER4> Haha, no problem. It's easy to miss =)

</comment></comment></comment></comment></comment></comment><comment><USER6> If you're looking for a great long form article around juggling, I highly suggest Grantland's article[1] as one of my favorite "why did I just spend an hour reading about that?"

[1] [http://grantland.com/features/anthony-gatto-juggling- cirque-...](http://grantland.com/features/anthony-gatto-juggling-cirque-du- soleil-jason-fagone/)

</comment><comment><USER7> One thing that needs to be discussed is the accuracy, which is independent of gravity. You can juggle at about 6 to 8 throws per second, so if you want to juggle, say, 50 objects, each one needs to be in flight for about 7 seconds.

That gives 7 seconds of time to drift from the intended landing location (time _and_ space) and that's a long time.

Even if you don't have to throw things really high, their "beaten area" grows with time, and that's a quantity I'd be interested in seeing explored.

</comment><comment><USER8> Also see (Claude) Shannon's Juggling Theorem: [https://en.wikipedia.org/wiki/Juggling#Mathematics](https://en.wikipedia.org/wiki/Juggling#Mathematics)

Shannon also built juggling robots. (But not, to my knowledge, machines to measure human juggling.) Here's a video: [https://www.youtube.com/watch?reload=9&v=sBHGzRxfeJY](https://www.youtube.com/watch?reload=9&v=sBHGzRxfeJY)

<comment><USER9> > Shannon also built juggling robots. (

I'm disappointed this Kickstarter project never received funding:

[https://www.kickstarter.com/projects/958028900/human- scale-p...](https://www.kickstarter.com/projects/958028900/human-scale- prototype-for-bugjuggler-a-car-jugglin)

</comment></comment><comment><USER10> Here's the same paper without the maddening UX:

[http://www.juggling.org/papers/limits/](http://www.juggling.org/papers/limits/)

</comment><comment><USER11> I can't juggle. Not even in slow motion, with scarves. I've tried many times. I'm convinced some people just can't "get" it.

<comment><USER12> I found scarves harder to learn. You can learn to juggle three balls in 30 minutes:

1\. Hold one bean bag in your dominant hand while standing, facing a wall, about a foot away.

2\. Drop the bag. There, that's over with. (You'll be doing it a lot.)

3\. Pick up the bag.

4\. Toss the bag from one hand to the other, keeping your elbows loosely at your sides, until you consistently have it arcing at about eye level before descending to the other hand.

5\. Do that 100 more times.

6\. Hold one bag in each hand (drop them once, if you like).

7\. Toss from your dominant hand and, when the bag is at the top of its arc in front of your eyes, toss the other bag. Catch them both.

8\. Repeat without pausing another 100 times.

9\. Hold two bags in your dominant hand and one in your other hand. Toss the first, wait for the top of the arc and toss the second, wait for the top of the arc and toss the third.

10\. You're juggling. Drop all the bags to celebrate.

<comment> jay-anderson Definitely. I've had a hard time convincing people to do the required repetitions. They end early and say that they can't juggle. The few people that have, successfully juggle in a relatively short amount of time. Their form isn't great and they can't keep it up for a long time, but they have a great start.

A couple other exercises/tips worth mentioning:

\- Start with your non-dominant hand for 2 balls as well (alternate which hand you start with).

\- Stand over a couch or bed to make it less costly to drop a ball.

\- Stand in front of a wall to notice when you're moving forward.

\- For the advanced: try two in one hand (much harder than 3). Will make 3 ball juggling easier.

<comment><USER13> > try two in one hand (much harder than 3). Will make 3 ball juggling easier.

What does this mean?

<comment><USER14> Not GP, but if I were to guess: Try juggling only two balls, but use only one hand. Here's a video for demonstration: [https://www.youtube.com/watch?v=9uMui692JHU](https://www.youtube.com/watch?v=9uMui692JHU)

</comment></comment></comment></comment></comment><comment><USER15> What I find fascinating is how there's a whole mathematical formalism for describing juggling patterns called siteswap which allows patterns to not only be described, but discovered. It's based on throw heights, with the basic 3-ball cascade being represented by 3 - a sequence of balls thrown so they land 3 beats later on, repeated indefinitely. 531 indicates one ball thrown high, one mid-height and then one passed directly across from one hand to the other.

Basic intro:

[http://www.twjc.co.uk/siteswap.html](http://www.twjc.co.uk/siteswap.html)

Much more in-depth treatment here including synchronous and multiplex patterns, ladder and causal diagrams and a bunch of proofs relating to the notation:

[https://www.jugglingedge.com/pdf/BenBeeversGuidetoJugglingPa...](https://www.jugglingedge.com/pdf/BenBeeversGuidetoJugglingPatterns.pdf)

but you can always go here and try a few patterns such as 3, 441, 531, 504, (4,4) or in windmill/Mill's Mess mode, 423

[http://www.gunswap.co/](http://www.gunswap.co/)

</comment><comment><USER16> Can more objects be juggled on the moon then on earth?

<comment><USER17> Yes, check the definitions of the author's theoretical max ball calculation on the first page gravitational acceleration determines the 'hang time' of a ball for a given value of hand acceleration. So holding everything else the same the same person with the same ability to throw 9 balls at g=-9.8m/s^2 would throw the balls higher on the moon giving them more room in their pattern for more balls.

</comment></comment><comment><USER18> I came here looking for a paper about OO and having too much state. But this was interesting.

</comment><comment><USER19> I'm fascinated by these seemingly useless yet remarkably mind grasping problems.

I remember reading that Feynman had a profound insight while calculating the wobbling of plates being thrown on a ship.

You never know where a fertile mind can be taken by those aimless thoughts.

<comment><USER20> It was just the cafeteria at Cornell, slightly more prosaic than a ship.

</comment></comment><comment><USER21> I'm surprised that robots have not yet surpassed human jugglers.

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

</comment><comment><USER22> Could a styrofoam or other ball fall more slowly (like a feather) and therefore allow more of them to be thrown?

<comment><USER23> The acceleration due to gravity is independent of mass. A 1cm ball made of lead and a 1cm ball made of wood would both fall at the same speed.

What does make a difference is shape, due to differing amounts of air resistance and lift.

<comment><USER24> The force from air resistance at a given velocity will be the same on the 1 cm lead ball and the 1 cm wood ball because they have the same shape and size. The acceleration from air resistance is the force divided by the mass, and so the 1 cm lead ball has much less acceleration from air resistance than does the 1 cm wood ball.

As you note, the acceleration due to gravity is the same on both balls.

The net acceleration, therefore, is larger for the 1 cm lead ball than for the 1 cm wood ball, and so the lead ball falls faster.

The difference in acceleration between the lead ball and the wood ball might not be large enough to easily see if you just drop them a couple meters.

Try a ping pong ball and a lead ball of the same diameter (4 cm). That lead ball would weigh 372 g. A ping pong ball is 2.7 g. At a given velocity, the acceleration from air resistance would be almost 140 times greater on the ping pong ball than on the lead ball. That should greatly reduce the height you need to drop from in order to see the difference.

<comment><USER25> This doesn't sound correct to me. The acceleration due to gravity is the same on both balls. However, since the lead ball weighs more than the wood ball, the force of gravity on the lead ball is stronger than the force on the wood ball (F_g = mg).

The effect of air resistance can be modeled by a different force. It is typically modeled as a linear function of velocity rather than mass, and it models the behaviour that the faster an object is traveling the more it is affected by air resistance which acts in the opposite direction as the direction the object is traveling in (F_a = -kv). By adding the two forces together, you get a second-order differential equation that describes how the object behaves (F_g + F_a = F_net = ma).

[1] [https://oregonstate.edu/instruct/mth252h/Bogley/w02/resist.h...](https://oregonstate.edu/instruct/mth252h/Bogley/w02/resist.html)

<comment><USER24> > The effect of air resistance can be modeled by a different force. It is > typically modeled as a linear function of velocity rather than mass [...]

That's the key. The air resistance force is a function of velocity [1], and it is not a function of mass. Two bodies that are aerodynamically identical (same shape, size, same boundary interactions with the air) experience the same air resistance force at a given velocity, regardless of their masses.

As you note, the falling body has two opposing forces. Gravity, which is proportional to the mass of the body, and air resistance, which depends on velocity and does not depend on mass. The motion of the body is determined by the net force.

The net force on the ball is mg + D(v), where m is the mass of the ball, g is 9.81 m/s^2, and D(v) is the function that gives air resistance of the ball at velocity v. (Note: I'm using a coordinate system where balls fall in the positive direction. In this system D(v) will be negative).

The net acceleration on the ball is net force divided by mass. This is g + D(v)/m.

Note the effect of varying the mass, leaving all else the same. Remember, D(v) is negative, so the effect of the D(v)/m term is to reduce the net acceleration the ball feels. In other words, it is to make the ball fall slower.

If we raise the mass, we reduce the magnitude of D(v)/m. We reduce the amount that air resistance slows down the ball. If we lower the mass, the opposite happens. Air resistance slows down the ball more.

For a given ball, as it falls and picks up speed, the air resistance goes up, becoming more and more effective at countering the gravitation force. This puts an upper limit on how fast the ball can fall--the so-called "terminal velocity". This is the velocity where D(v) = -gm. Note that for balls with larger mass, terminal velocity will be higher.

[1] a linear function at very low speed with no turbulence, a quadratic function in most situations we normally encounter in everyday life. The quadratic is 1/2 p Cd A v^2, where p is the density of the air, Cd is the drag coefficient (0.47 for a sphere), A is the cross sectional area, and v is the speed relative to the air.

<comment><USER25> You are correct only if all else is the same. However, I take issue with the assumption that you can leave all else the same. The net force on a heavier object is a higher for the lead ball than for the wood ball. The net force for the lead ball is m_l x a, but the net force on the wood ball is m_w x a where m_l>m_w, and the acceleration a depends on the shape of the object and can be thought of as the same.

<comment><USER24> We were given that the lead ball and the wood ball were the same size. I am assuming that they are both spherical.

The drag force is 1/2 p Cd A v^2 where p is the density of the air, Cd is the coefficient of drag, A is the cross sectional area, and v is the velocity.

If both balls are spheres, Cd is the same for them (0.47). The air density is the same for both. The cross sectional area is that same. Hence, the two balls have the same drag force at the same velocity. Hence, the deceleration from drag is lower for the heavier ball.

Here's an example with a basketball and a bowling ball showing what happens: [https://www.youtube.com/watch?v=mGZLuaJ5MOc](https://www.youtube.com/watch?v=mGZLuaJ5MOc)

Note that you need quite a long drop to see a noticeable difference.

Below is a simple simulator that drops two spherical balls of the same size but different mass, and prints how far they have fallen and how fast they are going each second for the first 10 seconds. I'll give some results first, and then the simulator code if anyone wants to play with it.

Here are the results for a 4 cm diameter lead ball and a 4 cm diameter ping pong ball:

      0.0 (0.0, 0.01) (0.0, 0.01)
      1.0 (4.9, 9.79) (4.11, 6.99)
      2.0 (19.51, 19.38) (12.02, 8.39)
      3.0 (43.54, 28.63) (20.51, 8.54)
      4.0 (76.58, 37.37) (29.06, 8.55)
      5.0 (118.06, 45.5) (37.62, 8.56)
      6.0 (167.34, 52.94) (46.17, 8.56)
      7.0 (223.7, 59.66) (54.73, 8.56)
      8.0 (286.41, 65.64) (63.29, 8.56)
      9.0 (354.74, 70.91) (71.84, 8.56)
      10.0 (428.0, 75.5) (80.4, 8.56)

Numbers in each row are: time in seconds since drop, distance first ball has fallen (in meters), velocity of first ball (meters/second), and the distance and velocity of the second ball.

Here's a pair of 12 cm diameter balls one weighing 16 pounds (maximum weight for a bowling ball), and one about the weight of a basketball:

      0.0 (0.0, 0.01) (0.0, 0.01)
      1.0 (4.9, 9.76) (4.75, 9.2)
      2.0 (19.4, 19.18) (17.42, 15.59)
      3.0 (43.03, 27.97) (34.92, 19.0)
      4.0 (75.04, 35.91) (54.81, 20.56)
      5.0 (114.53, 42.9) (75.76, 21.23)
      6.0 (160.5, 48.88) (97.15, 21.51)
      7.0 (211.96, 53.89) (118.72, 21.62)
      8.0 (267.99, 58.02) (140.37, 21.67)
      9.0 (327.74, 61.37) (162.05, 21.69)
      10.0 (390.51, 64.06) (183.74, 21.69)

The simulator is just doing a simple linear simulation that assumes constant velocity and acceleration during between simulation steps. That's not super accurate, but it is good enough to show the physics.

Simulator code below. Set r to the radius in meters of your spheres. Set m1 and m2 to the masses of your two spheres, in kilograms.

      #!/usr/bin/env python3
      import math

      p = 1.225   # kg/m^3
      Cd = 0.47   # for sphere
      r = .12     # m

      m1 = 7.2    # kg  mass of 4 cm lead ball
      m2 = .625    # kg mass of 4 cm ping pong ball

      def drag(v):    # m/s
          # 1/2 p Cd A v^2
          return 1/2 * p * Cd * math.pi * r**2 * v**2

      def sim(m1, m2):
          y1, y2 = 0.0, 0.0   # m
          v1, v2 = 0.0, 0.0   # m/s
          dt = 0.001          # s

          for ms in range(0, 10001):
              y1 += v1 * dt
              y2 += v2 * dt

              v1 -= drag(v1) * dt / m1
              v2 -= drag(v2) * dt / m2

              v1 += 9.81 * dt
              v2 += 9.81 * dt

              if ms % 1000 == 0:
                  print(ms/1000, (round(y1,2), round(v1,2)), (round(y2,2), round(v2,2)))

      sim(m1, m2)

<comment><USER25> I appreciate your earnestness, but running your code gives:

      0 (0.0, 0.01) (0.0, 0.01)
      1 (4.91, 9.82) (4.91, 9.82)
      2 (19.63, 19.63) (19.63, 19.63)
      3 (44.16, 29.44) (44.16, 29.44)
      4 (78.5, 39.25) (78.5, 39.25)
      5 (122.65, 49.06) (122.65, 49.06)
      6 (176.61, 58.87) (176.61, 58.87)
      7 (240.38, 68.68) (240.38, 68.68)
      8 (313.96, 78.49) (313.96, 78.49)
      9 (397.35, 88.3) (397.35, 88.3)
      10 (490.55, 98.11) (490.55, 98.11)

<comment><USER24> It's Python 3. You ran it with Python 2. In Python 2, 1/2 == 0. In Python 3, 1/2 == 0.5. That means that in the drag function, this expression:

      1/2 * p * Cd * math.pi * r**2 * v**2

always gives 0 on Python 2 because of that 1/2 factor.

If you want to run it on Python 2, either change the 1/2 in the drag function to 1./2 or 0.5, or add

      from __future__ import division

at the top to tell Python 2 you want to use the Python 3 division behavior.

<comment><USER25> Then I stand corrected. Thank you for being patient.</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment>


The Internet of Things creates joy and happiness - <AUTHOR> http://jasonneylon.wordpress.com/2013/03/22/the-internet-of-things-creates-joy-and-happiness/

<comment><USER2> The number of times I have gone to reply to the solar tweet bot with 'yay' or 'good for you'... and then remembered it is not a person. :D

<comment><AUTHOR> Hurrah!</comment></comment>


Ask HN: What's something I can do with a spare, modern laptop? - <AUTHOR> <comment><USER2> Install Linux and attempt to do advanced stuff that just work in Windows and Mac but requires tweaking Linux. Spend hours looking for solutions on the Internet. Then brag about your achievements online.

<comment><USER3> Or do advanced stuff that is difficult or impossible in Windows and OS X, then be quietly happy with your achievements.

Don't judge a group by its loudest individuals.

</comment></comment><comment><USER4> Donate it to a deserving non-profit in your area.

</comment><comment><USER5> Virtual fish tank: go to youtube, load a video of a real fish tank and watch it.

</comment><comment><USER6> For personal use: Mine bitcoins. Run as VPS. Host websites for local businesses. Charge for usage. If you have GPU, then sell usage by hour for Deep learning students.

For social good: Donate to old age home.. arrange a sharing schedule between a group of students who can't afford.. mine bitcoins and donate what you earn.. work with a local shop to arrange internet access and support unprivileged people to find jobs online .. donate to a prison .. lotsa options though I am not sure if you meant give away ..

<comment><USER7> Mining bitcoins on a modern laptop is utterly useless. All of the mining is done on specialized hardware nowadays. Revenue would be less than pennies per year on a CPU.

</comment></comment><comment><USER8> Install an OS you haven't used before and learn more stuff?

</comment><comment><USER9> Energy efficient home server with built-in battery backup.

</comment><comment><USER10> Maybe donate it? A school, library or student may need one.

</comment><comment><USER11> HTPC

<comment><USER12> This. Instant media center that's better than any Roku/Firestick/whatever.

</comment></comment><comment><USER13> Home firewall

</comment><comment><USER14> learn to BSD</comment>


Show HN: Web controlled traffic light for Raspberry Pi powered by Elixir/Nerves - <AUTHOR> https://github.com/fabrik42/traffic-light-client-elixir <comment><AUTHOR> This traffic light project exists roughly since 2011. I use this side project as a form of recreational programming and joyful overengineering.

The software/hardware project has seen many stages over the years, I tried to sum them up here (taken from the Readme):

* Wired up to my Mac controlled by a weird combination of Kernel extensions and Java code.

* Connected to a Synology NAS with a self-soldered Velleman K8055 USB experimentation board.

* Connected to a Raspberry PI, running a Ruby script locally, node.js on the server side.

* Wiring mostly replaced by a custom etched circuit board - a Raspberry shield built only for the purpose of changing the traffic light (and debugging it at home without disassembling the whole traffic light).

* Replacement of the Raspbian/Ruby client with Elixir and Nerves.

* Replacement of the node.js server with Elixir and Phoenix.

Happy for any feedback!</comment>


Ask HN: Start a web application maintenance only company? - <AUTHOR> I've been freelancing/contracting for a while now. I really enjoy fixing/improving existing web apps more than creating something from scratch.
Is it reasonable to offer maintenance-only service to small (<20 person) boutique digital agencies even if they have in-house devs ? The benefits I see are:
1. In-house devs will be free to work on new projects rather than fixing new issues
2. I can offer off-hours maintenance so this might be helpful in some cases
3. Team augmentation - fill in for a dev if they are unavailable (eg. vacation)
5. Same timezone (EST - PST work hours) availability and quick turnaround
6. Available by email, slack, phone
wdyt ? Is this reasonable ?
I'm located in Ontario, Canada. <comment><USER2> Good luck with this. We have been working on something similar for Mobile applications.

There are two aspects we are focusing at this moment:

A.) Rescue Projects: Projects which other team has messed up or left unattended. We take over these projects & ship the same in reasonable shape.

B.) App Fixers: We have created a website specifically for App Maintenance & Upgrades. [https://app-fixers.com](https://app-fixers.com) (We cover maintenance contracts, App Store upgrades, OS Upgrades related changes, Screen Upgrade related changes)

Start talking about this in the community. You will receive great contracts soon :) Cheers

</comment><comment><USER3> Yes, it's a terrific stepping stone to providing premium services as well. You may find you and your team naturally gravitating to a core competency that really interests you. Such as voice services, media streaming, etc.

Just be aware of the potential liabilities. Clearly demarcate ownership of all assets in contracts. As well as any obligations for future services. At some point a client may decide they can save costs by "cutting out the middle man" and negotiating directly with you!

</comment><comment><USER4> You might read up on [http://www.appaftercare.com/](http://www.appaftercare.com/), the guy who started it is named Einar Vollset. It's a similar idea (I think) and he has published a lot of material about getting started with it.

</comment><comment><USER5> What kind of pricing are you thinking of, for say, 20 hours / week remote help in maintaining an existing system for a small shop? (LAMP / AWS stack)

<comment><AUTHOR> Can you email me at email@example.com with your requirements? I'm still planning this put so I'd love to get your input on multiple things.

</comment></comment><comment><USER6> Spending your days trawling through other peoples uncommented, undocumented, and ineligible code sure is soul-destroying.

<comment><USER7> Well, he/she likes doing it, and you clearly don't, so there's supply and demand, right?</comment></comment>


Thoughworks Technology Radar July 2014 - <AUTHOR> http://www.thoughtworks.com/radar/

<comment><AUTHOR> I love Thoughtworks' Technology Radar. HN is very hype-driven, you see a lot of the hottest stuff, and therefore it's my favourite source of information on technologies.

Thoughtworks, a software agency, is necessarily a little more conservative than the startup crowd. Clients expect them to _deliver_ , and if only one project fails miserably because of a risky technology choice, then that will really hurt their image, and thus their sales pipeline.

As a result, their Technology Radar isn't so much an overview of what is hot or not, but more of which of last year's hot stuff really _made it_. If it's well positioned on Thoughtworks' Tech Radar, then you can be pretty sure that it's here to stay.</comment>


The Most Expensive Tech Stocks - <AUTHOR> http://www.forbes.com/sites/liyanchen/2015/03/30/technobubble-the-23-most-expensive-tech-stocks/

<comment><AUTHOR> Title has been edited so it's not clickbait.

Actual title: "Technobubble: The 23 Most Expensive Tech Stocks"</comment>


A Cisco Router Bug Has Global Implications - <AUTHOR> https://www.wired.com/story/cisco-router-bug-secure-boot-trust-anchor/ <comment><USER2> This article makes it sound like the sky is falling but it's not. In order to actually exploit CVE-2019-1862, you need to be an _authenticated_ user with access to the Web UI. Typically management of a router isn't exposed to the whole Internet.

<comment> sh-run As a Network Engineer at an org with decent staffing and a great cyber sec program and as someone who recently started working through the OSCP material. I'd like to agree with you and I will say I'm not overly worried about this (we'll still patch the second we can).

Cisco isn't exactly making things hard on attackers. Here's a couple of other vulnerabilities that could be used in conjunction with this one: Hardcoded credential vulnerability in IOS-XE (CVE-2018-0150). IOS-XE hasn't been without privledge escalation vulnerabilities either(eg CVE-2019-1754, among others)

Many orgs are unwilling to take a network outage for patching, especially in places like their DCs, internet or WAN edges where many of these devices would be deployed. I'm also aware of companies that are understaffed, where employees don't have the extra cycles to patch or apply workarounds. These are the same places that don't have active cyber security departments (no red- team, no vulnerability scanning, no dot1x and no written cyber security requirements) and don't budget for redundancy (making it even harder to patch). It only takes one forgotten NAT and firewall rule or a misplaced/unapplied ACL to end up with something exposed to the internet that shouldn't be. With how sophisticated some attackers have become and the slow rollout of network patches, this will probably be actively exploited even if it hasn't been already.

</comment></comment><comment><USER3> The article makes it sound like just one router is affected (ASR 1001-X), but that's just one model in one line of Cisco routers, and they all appear to be vulnerable: [https://tools.cisco.com/security/center/content/CiscoSecurit...](https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco- sa-20190513-secureboot)

<comment><USER4> It is always nice to read "This advisory will be updated as additional information becomes available." /s

</comment></comment><comment><USER5> Do you think these security defects are really bugs or are back-doors left in for the state security apparatus? Who or what department is tasked with testing Cisco devices for security vulnerabilities. I mean didn't anyone test the devices for potential remote root access and the ability to bypass the Trust Anchor? Lastly I don't know how an internet router can be not connected to the Internet and still function?

<comment><USER6> Doubt it. It's the consequence of bad security practices, incompetence at many levels, rushing to market, and in general how these platforms are designed (which is a consequence of previous statements).

While there are a lot of CVE's for pretty much all equipment like this from all vendors they require access to the mgmt interface to be exploited. These devices to the heavy lifting in ASIC/NPU's, so control plane and forwarding plane are separated (some things requiring cpu processing such as routing protocols needs to be forwarded from forwarding plane to control plane), but requires some configuration to be fully secure, easily done however.

The control plane is typically a linux distro these days (some run freebsd, QNX, or some in-house developed OS) with some open source applications on top (Apache or others as web servers are common for mgmt), some proprietary apps, ASIC drivers etc. A linux distro you seldom are allowed to makes changes to or update software fearing that it will cause problems for customers, same with the apps running on it. Even if you do upgrade it you have to get your customers to do it as well, most upgrades require scheduled downtime and typically comes with new fun bugs. Most of the CVE's come from the open source software running on these devices, some from them messing up configuration on them. Very few come from the proprietary apps as they mainly deal with network control protocols and not mgmt.</comment></comment>


A spam bot written in Go - <AUTHOR> https://github.com/tamnd/spambot

<comment><USER2> Rant[1] seems like a better way of writing texts like these though.

[1] [https://github.com/TheBerkin/Rant](https://github.com/TheBerkin/Rant)</comment>


Ask HN: Programming language power and 10 years to mastery - <AUTHOR> I've been thinking about the intersection between the variability in programming language power and expressivity (as discussed by PG in http://www.paulgraham.com/avg.html) and the 10 year (or 10,000 hours) road to expertise.
I'm around year eight of hacking away professionally and bumped against the dramatic power differential in programming languages when I primarily became a database developer.  I started "thinking in sets" and found that I was much more effective.  SQL got more work done in fewer lines of code in a simple way than hooking up my J2EE java junk via JDBC in more traditional programming.  But it took the direct use of SQL for a couple of years before the experience pushed my coding to the next level.  Much of this benefit was due to the fact that the apps I worked on were really data driven and "fit" the relational data model well, coupled with the fact that I was in a role that allowed me to do architecture design and low level implementation.  And tear the design and implementation apart to do it again after finding all the nuances in the app and data.
The switch from imperative programming languages to a declarative programming language to take advantage of SQL has made me curious about Lisp and functional programming.  I have an idea for a web app and I'll use it as a vehicle to test out Lisp.  Worst case, I pick up a language that purports to have almost mystical powers (all hail the mighty macro).  Best case, a nice startup could grow out of the project.  But the real point is to get real hands-on experience with a more powerful language than the standard C, Java, Perl, and SQL stuff I've already done.  Plus, I'd hate to miss out on some key part of a hacker's personal growth over that 10 year march . . .
That's a lot of background to get to two simple questions.
Do any of the HN readers have any tips or advice on speeding up the transition to "thinking in Lisp"?  I'll probably be hacking away using Practical Common Lisp and On Lisp as my guides (SICP is probably somewhere in the mix).   Have any of you followed a similar path as you head towards a decade of hacking and did the Lisp (or other fp language) dance grow your skills in a big way (ie, now I'm a faster developer in general or better algorithm designer or communicator of code ideas)?  It would be great to hear specifics.
Thanks. <comment><USER3> Common Lisp changed the way I program because the macros open your eyes to a whole lot of code duplication that you can't avoid in other languages - <USER2> encouraged me to really work at those bits of code until they actually contain the bare minimum of boilerplate code possible.

Haskell changed the way I program because laziness can allow you to express your code in much clearer and simpler ways - this encouraged me to use more memoization.

Functional programming is definitely where we want to be in theory, so if practice permits, use it!

</comment><comment><USER4> Check out the book 'The Little Schemer'. Good way to ease your mind into functional programming.

Also consider learning a dynamic 'scripting' language like Ruby or Python. They have some functional aspects, and will teach you programming style and idioms that you probably haven't picked up from Java and C.

<comment><USER4> Oh and if you plan on doing anything web-related, learn Javascript (properly!) - this will also expose you to functional programming technique.

<http://javascript.crockford.com/little.html>

<comment><USER5> Crockford's videos up over here: <http://developer.yahoo.com/yui/theater/> are extremely useful, too. A little bit dry, but he knows his stuff.

It's interesting to point out that, while not optimized for it, Javascript (don't think ruby can do this, since you can't pass blocks to blocks) can perform tail recursion: <http://warfangled.com/js_examples/fib.js>

</comment></comment></comment><comment><USER6> I found SICP was better for learning to "think functionally". PCL and On Lisp were both great in their own right, but idiomatic CL isn't as strictly functional as idiomatic Scheme tends to be (and neither enforces it like Haskell and Erlang do).

As for improving my skills, that's an unequivocal yes. I think the biggest eureka moment came when I understood the idea of first class functions. That opened many doors to better code.

Before, I used functions primarily like a writer uses paragraphs: to break up the narrative into chunks. After SICP, I saw functions more like (for lack of a better term) filters. They transform their input into output. The transformation is well defined, and the natural boundaries between functions become clear rather than arbitrary.

</comment><comment><USER7> I can't comment on Lisp, but I've been working with Haskell for about a year or so now, so I'll cover that instead.

My personal history goes something like QBasic -> Visual Basic -> PHP -> Java -> C# -> Haskell.

Since Haskell is a purely functional language there's no cheating like you could in, say, OCaml. This forces you to learn how to work with immutability, which I have become a big fan of. When working with C# I try to avoid mutability as much as possible (naturally this is quite a bit uglier than in Haskell, but it does avoid some problems). Most of my C# projects now acquire a Haskell.cs file fairly quickly, containing things like a Tuple class, zip, >>=, etc.

In the time I've spent learning it, Haskell has quickly become my favourite language. It's not perfect (my current main wishes are existential types and an extensible record system), but it is considerably less painful than the other languages I know.

As for speeding up the transition, I can't offer anything other than just diving in. At some point it will just click and you will wonder what all the commotion is about (another monad tutorial? why?). Granted, I still don't have the slightest idea about why I would want to use a hylomorphism or what to do with a comonad, but perhaps I will some day. Fortunately you don't need them in everyday Haskell programming :)

<comment><USER8> If you're doing FP in C#, why not use F#? It's not Haskell, but it's a step closer.

<comment><USER7> I've tried it a bit, but I found the syntax rather ugly compared to Haskell. I know, I'm nitpicking and it really shouldn't matter that much, but it put me off the language. Perhaps when they finally release a full-blown implementation of F# for Visual Studio I'll give it another go. My main reason for still using C# at the moment is the UI integration with WPF and Windows Forms. Ideally there'd be an actively maintained Haskell.NET, but perhaps F# can serve as a compromise when Visual Studio 2010 comes out.

</comment></comment></comment><comment><USER9> For Lisp, I found using Scheme and reading The Little Schemer and SICP more helpful than PCL. I've also been using and heavily customizing Emacs, but Emacs Lisp is kind of a crappy Lisp, and keeping track of its idiosyncrasies while also learning Scheme or Common Lisp's will probably be really confusing initially. Scheme is also a lot more my style than CL, though. YMMV.

I also found learning OCaml to be a real eye-opener, both for learning FP techniques (it emphasizes a different set of them than Lisp) and how to work with, rather than against, static typing. (_The Little MLer_ helped, as well, and is _at least_ as good for learning types as _The Little Schemer_ is for recursion, IMHO. Highly recommended.)

There's not a whole lot of material published in English on OCaml (the Joshua Smith book is terrible!), but there's a translation of a French O'Reilly book online (<http://caml.inria.fr/pub/docs/oreilly-book/>), and it's quite good for learning the main ideas. The first few chapters are on functional programming, imperative programming, and then their relative strengths & when to use each. (Their emphasis on using FP when appropriate, rather than treating it as the new _best thing ever_ , suggests more insight to me than the blind enthusiasm for languages that tends to cycle through here and reddit.)

Also: OCaml is not without its flaws. In particular, its errors can be cryptic, and it's standard library has some infuriating omissions. The language is fantastic for some kinds of problems (ML's forte is anything involving complex data structures), though, and it's a great way to learn some very useful techniques.

</comment><comment><USER10> To answer in sort of a roundabout way, I think the problem domain matters a lot for how much you relatively learn when switching languages.

With web app backends, for example, most of the problems somehow relate to difficulty maintaining state over widespread, always-on networked systems - things like authentication, sessions, concurrency, large-scale, flexible datastores. So the systems architected gradually get more and more tuned towards serving this particular goal with little programmer effort. And because those problems are a good match to functional programming - because it eliminates state - functional has become popular.

But if you were building an embedded system, statefulness is less of a problem: there's usually only one thread, and all memory can be mapped in an orderly way. Your performance constraints are reliant on a single fixed platform, so the methods of inspecting and debugging code change.

So to get back to the original question, think about reframing your familiar problems in a way that would _simplify_ the solution with a functional technique. Preferably, look for simplifications that are really big changes and throw out traditional assumptions - the use of relational databases in webapps is one common target for this. Even if you get it wrong you'll get a better understanding of where the functional solution can and can't work.

</comment><comment><USER11> I got into Lisp through Emacs, but more recently I've been _understanding_ it using Clojure.

For me, I need to be able to create something tangible. Having access to all the Java libraries gives me a lot of cool things to import, then play around with in functional ways.

<comment><USER12> I'll second that, especially since you mentioned you already work with java. If you like SQL you might want to look at the recent clojure implementation of datalog:

[http://code.google.com/p/clojure- contrib/wiki/DatalogOvervie...](http://code.google.com/p/clojure- contrib/wiki/DatalogOverview)

</comment></comment><comment><USER13> I also recommend "Javascript: The Good Parts". It and the jQuery library can teach you a lot about how Javascript is really a functional language with more in common with Lisp than with C++ or Java.

A second excellent book is "Higher Order Perl", which shows how Perl, also, shares a lot more in common with Lisp than most developers realize. I'm on my 13th year as a professional developer and 27th as a hacker, and I still find some of the concepts in HoP challenging.

I would also recommend learning XSLT. It's pure declarative, side-effect-free programming. If you're used to procedural code (including OOP), or even functional code, you'll still have to reattach your head sideways to learn to use XSLT effectively. It's well worth the challenge; there are problems that would be very difficult to handle in other languages which XSLT handles with ease; it's a powerful tool for your toolchest.

</comment><comment><USER14> It sounds like you are trying to do two separate things: 1. Learn Lisp, and 2. create a web app startup.

Both are very worthy goals, but I don't know if using Lisp, Haskell or erlang to write a web app is really a great idea right now. (Sorry PG). I think that is was true that writing web apps in Lisp probably gave you a huge leg up against the competitors in the mid 90's. I don't really know if that's the case now.

Languages like Python and Ruby have tons of libraries, frameworks and documentation that really help you get productive making web apps. That's a huge plus in my book.

Then again, maybe you're interested in rolling your own libraries and framework ala arc. If that's your thing go for it. I'm sure you'll learn a lot along the way.

</comment><comment><USER15> in pcl ch3, the author demonstrates using cl instead of sql for database

afaik hn doesn't use sql/rdbms either, i guess it's because threaded forum is better suited using a tree-like data structure instead of simple table

i stopped using sql (after reading pcl and seeing the fact of hn) and just having a lisp process running, writing to disk every 5 mins

i'm now experimenting with nginx's proxy_pass and upstream to many lisp unix sockets (weighted round robin)

virgin territory for me, it's quite fun so far ... foolish and hungry :D

<comment><USER8> The PCL database is a very simple in-memory database with no indexing. It's intended as an example of the power of the language, not really as something you'd want to use.There are other databases for CL, including pure-Lisp data stores and interfaces to SQL databases.

</comment></comment><comment><USER16> >the 10 year (or 10,000 hours) road to expertise

Why is this figure being bandied about as though it were an actual scientific fact?

<comment><USER17> Because its a useful ball park.

<comment><USER16> >a useful ball park

Why do you think so? What actual evidence is there for it?

<comment><USER18> I think the correct question is what actual evidence is there against it?

<comment><USER16> The fact that Gladwell pulled the figure out of thin air?

</comment></comment></comment></comment></comment><comment><USER19> ""I started "thinking in sets" and found that I was much more effective.""

Actually that is the power of Lisp. In Lisp, batch or stream data processing is not only straightforward, but _the_ way to think and program.

<comment><USER9> Well, he's talking about relational databases, which approach sets from a very different angle.</comment></comment>


The water under Colorado's Eastern Plains is running dry - <AUTHOR> http://www.denverpost.com/2017/10/08/colorado-eastern-plains-groundwater-running-dry/ <comment><USER2> The article mentions the Great American Desert. Parts of Colorado already were this during the Dust Bowl. In northeast Colorado several natural grasslands were created in places where farming was marginal and areas became depopulated. It's such as terrible place to try to grow crops. Windy and dry, some places can go months without precipitation. Anyone farming out there now is living on borrowed time and water and shouldn't be surprised that it's drying up.

Edit: I live in Colorado and visit the grasslands often for killer star gazing and I recommend anyone interested in this subject read:

"The Worst Hard Times" about the Dust Bowl and "Cadillac Desert" which is about dam building in the ultra dry west (like Nevada/AZ).

</comment><comment><USER3> Aquifers everywhere are being destroyed, they cannot be rebuilt. Permanent dust storm on the horizon.</comment>


Why Evite Lost Its MoJo — But Still Grew Sales To $21 Mil - <AUTHOR> http://mixergy.com/evite-harry-lin/ <comment><USER2> Excellent points - this interview is definitely a practical guide on the steps necessary to rethink a business against the big guys. Good job Harry!</comment>


Will a Chromebook be your next PC? - <AUTHOR> http://www.zdnet.com/will-a-chromebook-be-your-next-pc-7000005280/

<comment><USER2> I have a chromebook and never used it. I believe tablets are more promising.</comment>


Too many submissions? - <AUTHOR>

I noticed that there is an entire new batch of submissions every 20 minutes. What will happen if the site becomes so popular that it happens every 5 minutes, or worse? How many of these submissions are automated? I think automated submissions could be problematic. It seems like we're flooded with content <comment><USER2> in irc://irc.freenode.org/#hn I see a constant flow, no batches.

<comment><USER3> Batches aside, is the _" constant"_ volume high? I think that's what OP's getting at.

I think the time of day makes a difference as this is mini-break/lunch-break time for US HN'ers.</comment></comment>


FreeNAS - <AUTHOR> https://www.freenas.org/ <comment><USER2> Previous threads for the curious:

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

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

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

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

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

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

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

</comment><comment><USER3> I looked at running FreeNAS, but it didn't make any sense to me. I can put as many hard drives as I want in a cheap PC with a ryzen cpu and run samba. It takes maybe 5 minutes to set up, and then you also have a distro of your choosing to use as a server.

FreeNAS probably makes sense if you're an industry IT person and you want to make sure anyone in the future can figure out how to admin the thing. That's probably got a lot more value than I'm willing to admit, and I'm sure that's why it's popular, but I see a lot of posts about people trying to set up FreeNAS at home and it seems silly.

<comment><USER4> I also looked at it a few years ago when I last rebuilt my media server, and ultimately decided the same.

I now run SnapRAID [1] with mergerfs [2] and for my use, it's got many benefits over zfs and normal raid setups:

I could start from my existing volumes, without having to move any files.

I can use my random bunch of varying size disks purchased over several years, and add as needed. I tend to buy a new drive every couple years at whatever cheapest $/GB is, which means usually each drive is 2x the size of the last one I bought.

If something catastrophic fails like the system itself, the disks are just normal independent ext4 volumes - I can read them from basically anything. I've had to recover a RAID5 array using replacement hardware before, it's not fun and not something I want to ever have to do at home.

[1] [https://www.snapraid.it/](https://www.snapraid.it/)

[2] [https://github.com/trapexit/mergerfs](https://github.com/trapexit/mergerfs)

<comment><USER3> I actually use RAID6 with mdadm, and it's also portable to different machines. I was kind of surprised the first time I moved the array to a new machine and it all just worked.

</comment></comment></comment><comment><USER5> I ran FreeNAS for a while. After spending a fair bit time learning about it and asking questions, it was explained to me that ZFS required a lot of regular maintenance, care and feeding.

It was about this time that I decided to move over to a more consumer solution and bought a Synology. I liked the ideal of open source, self managed systems, but I got tired of being my own network admin, and IT.

<comment><USER6> Wait, ZFS requires maintenance?

I've been running freenas for years and have deployed/ran ZFS solutions as part of my job for a decade- this is the first I'm learning about that, it's usually set and forget.

Am I just a bad admin?

<comment><USER7> Somewhat depends. Scrubbing is about detecting bit rot. You need to make sure that all of your data is periodically accessed so that zfs can check for errors. You can accomplish this either by having a workload which touches all of your data on a regular basis or by scrubbing. Depends on your setup.

<comment><USER8> Scrubbing is still preferable though, as normal reads won't cause every copy of the metadata to be read. Likewise, on a mirrored pair of disks, a given block of file content will only be read from one disk. (That is, since the file content is verified using checksums contained in the metadata, we don't need to read the file data back from both disks, so they can be used to service read requests independently of one another.)

<comment><USER7> All good points, especially about mirrors.

</comment></comment></comment></comment></comment><comment><USER9> For those looking for a linux based NAS distribution, you should also take a look at openmediavault here [https://www.openmediavault.org/](https://www.openmediavault.org/)

It has been running on my home server for 5+ years now and it's a delight. It also supports ZFS through a plugin.

</comment><comment> dev-il quotes From the "Hardware Requirements" page on that linked FreeNAS site:

• "64-bit hardware is required for current FreeNAS releases. Intel processors are strongly recommended."

• "8 GB of RAM is the absolute minimum requirement. 1 GB per terabyte of storage is a standard starting point for calculating additional RAM needs, although actual needs vary. ECC RAM is strongly recommended."

The example configuration for a "Home Media Server or Small Office File Share" even suggests "16 GB RAM".

I've heard that ZFS is quite RAM hungry, but c'mon, 16GB for a home media server?

<comment><USER10> With drive capacities topping 10TB and dedup being what it is, it's not too far of a stretch?

<comment><USER11> Those specs would be without dedup enabled (which generally isn't in ZFS because it's quite an expensive feature).

</comment></comment></comment><comment><USER12> Is there anyone here who prefers FreeNAS over vanilla FreeBSD+zfs and would like to share their experience?

I've been running FreeBSD with zfs for many years. I'm unsure if it was the right decision, but I did learn a lot and it's been extremely stable after the initial setup :-)

</comment><comment><USER13> If you are looking for something like this, try unraid.net. you can run docker templates and plugins, easily add storage and has a friendly community.

<comment><USER14> not the same, as it isn't free :)

</comment></comment><comment><USER15> Why is this a news story?

<comment><USER9> certainly because of recent Linus comments on ZFS

<comment><USER16> Link for the curious: [https://news.ycombinator.com/item?id=22005181](https://news.ycombinator.com/item?id=22005181)

<comment><USER15> Linus' comment on ZFS lacking new development / maintenance is really misleading. OpenZFS is doing both and there is a very large, vibrant development community.</comment></comment></comment></comment>