HNHacker News
TopNewBestAskShowJobs

hagy

389 karma · joined December 6, 2008

matthagy.com
submissionscomments
hagy··on Maker Faire halts operations and lays off all staff
Could you explain why? Is it because people will only share information worth sharing if they have to pay to do so? If so, then you deserve a [redacted].
hagy··on Interactively exploring Reddit posts using basic Scala in the browser
Author here. I'd appreciate your feedback on this article that builds off a series of articles teaching basic Scala. I'm particularly trying to create materials to teach basic Scala to non-engineers (chiefly data scientists) because I've found Scala to be a powerful language for my data science and analysis work. The goal of the educational series is to build up to using Scala in Spark within a managed Hadoop cluster (e.g., Databricks).

In this post, I'm trying to use exercises that I think will be more interesting and engaging than just showing off the language. What do you think? Is analyzing Redditors interesting to you? Do you have any thoughts for other datasets that would be even more interesting for people to work with while learning Scala?

In general, I'd appreciate any critical feedback because I'm looking to get better at developing such educational resources.

Thanks for your time!

hagy··on Glut of postdoc researchers stirs quiet crisis in science
50k is the norm at Berkley due to the high cost of living (minimum wage is $10/hour)
hagy··on What Really Happened When Facebook Bought Instagram
If an aspiring musician were only motivated by the chance of making it big, I would definitely tell them to stop trying. Not because they’re pursuing an irrational goal, but because that’s not sufficient motivation to get through all the shit it takes to have a chance at making it big in music.

Similarly with startups, if someone is only motivated by a huge exit then they won’t last through the years of low-success and failure that precede building a moderately successful business. Individual who succeed in these careers get some satisfaction out of the process and the small successes along the way (e.g. performing before ten people in a bar or having one potential customer get excited about your new product).

hagy··on Lockheed Martin pays $10M for D-Wave's Quantum Computer
Cool. I'm a grad student in another chemistry theory group. Dr. Sherrill definitely has the best notes on electronic structure calculations.
hagy··on Lockheed Martin pays $10M for D-Wave's Quantum Computer
You bring up an excellent point, papaf. The accuracy of the empirical force fields used in molecular dynamics simulation engines (such as Gromacs) is a hotly debated topic. Even without quantum computing the issue can be addressed with conventional computers that perform quantum mechanical calculations on interacting molecular fragments. The forces calculated from quantum mechanics can then be compared with those calculated from molecular dynamics force fields (as an example see Sherrill et al. http://onlinelibrary.wiley.com/doi/10.1002/jcc.21226/full ). Such studied have shown that current force fields fail to model certain chemical interactions and need improved. Specifically, the underlying functional forms used to model molecular forces need revised.

Currently such investigations are limited in scope by the large computational resources required to perform a single quantum mechanical calculation on a molecular fragment. With quantum computers, tens of thousands of such calculations could be performed and the results could be used to optimize new molecular force fields through multivariate regression.

hagy··on My First Recommendation to New Scientific Coders: Learn Visualization
I’d strongly recommend matplotlib. It has a matlab like procedural interface that makes it very easy to pickup if you’re coming from matlab.

Additionally, it’s wonderful to be able to “dive under the hood” if you need to create a special type of visualization: i.e. the internal model is easy to understand and highly customizable. This has enabled me to create several awesome plots that would have been very difficult, if not impossible to create with any other plotting program or library.

hagy··on My First Recommendation to New Scientific Coders: Learn Visualization
I wouldn’t say it’s a terrible visualization, although in general I do believe conditional 2D plots are the best way to show trends in higher dimensions. For example, here are some conditional plots for similar data (Kaggle Titanic competition) that I’ve found insightful.

http://i.imgur.com/C4uyH.png

The conditioning on Sex/Class seems to be the best way to illustrate the trends in these 4 dimensions.

hagy··on How to leave academia (for science PhDs)
What about negative anecdotes? Has anyone here regretted his or her decision to leave academia? Particularly, have you found the work less rewarding or interesting?

I ask as a grad student with a background in chemical engineering. I’ve known two professors who’ve done the inverse – industry to academia – and they’ve provided convincing stories for academia. In both cases they found academic research (in engineering and the physical sciences) to be more interesting and personally rewarding than industry.

Is the situation different in software and related industries?

I ask, as I’ve been considering transitioning to such a career myself after grad school (my research is in computational modeling and simulation). My biggest fear is that I’ll find myself in a job that I find boring and will regret my decision. Doubly so, as such a career transition will make it very difficult to reenter my academic field.

hagy··on AI are taking jobs
Change hurts. It hurts doubly so when uncertainty is mixed in.

The majority of the western population has a fairly rigid definition of job: trade your time for money. Its one thing to change how you trade your time for money: e.g. going from plowing a field a shuffling papers at a desk. It’s a whole another thing to adopt a certain level of self-responsibility (and risk) in determining how you provide value for your employer/customers. This is intrinsic to almost all new-era, tech-enabled jobs.

This is what is different now.

A cultural evolution in the western world is needed to facilitate widespread success in the evolved economy. It’s going to hurt.

hagy··on Python: copying a list the right way
If not for noise, list() should always outperform copy() as copy() just calls list() internally (specifically type(l)(l)), and also incurs the cost of several interrupted function calls.

Also, the minor difference in slice vs. list() for large lists are likely platform dependent and highly sensitive to the details of branch prediction and cache.

hagy··on Why Science Majors Change Their Minds (It’s Just So Darn Hard)
That’s a bit of an over-generalization. While there are individuals that can use the party-sex-drugs track as a networking opportunity into future lucrative careers, such individual are an exception, not the rule. Most students on the party-sex–drugs track are just enjoying their youth (and racking up student loans). I’ll agree that if you’re a young Machiavelli attending an elite school, then rubbing shoulders with your wealthy classmates can work out quite well.
hagy··on Why did Google take a $3B loan with $37B already in the bank?
I’ve been told that this comment of mine was overly naïve and idealistic and that such deals aren’t unheard of. My cynical side still views such deals as corporate politics that primarily benefit the individuals involved.
hagy··on Why did Google take a $3B loan with $37B already in the bank?
Could the individual(s) who’ve downvoted this comment please explain to me its serious flaws? (Feel free to email me at the address in my profile if the points wouldn’t be of interest to other users.) I’d seriously be interested in improving how I present short, comment-based arguments, as I generally don’t participate in such online discussions.

While I rarely comment on HN, this topic has really struck a cord with me as I’ve found many people (both online and in person) are focusing primarily on the low interest rate. While not an expert in corporate finance, I’m strongly convinced Google’s current liquid assets aren’t generating returns in excess of 3.7%. (See my comment in another thread of this discussion where I compare these returns to Tbonds.)

Unless Google has a revolutionary strategy for short term trading of liquid assets that generates returns in excess of 3.7%, in which they are so sure of they’ve committed their entire $37B cash-on-hand into, they’d be better off reallocating some of their existing liquid assets into whatever new investment they have in mind for the $3B.

The only other explanations would be preparations for a massive acquisition (major news) or this was done for some corporate politics reason (not news worth).

hagy··on Why did Google take a $3B loan with $37B already in the bank?
The point is that Google already has $37B in liquid assets, which are unlikely to yield more than 3.7% returns. As a point of reference 10yr US treasury bonds only return 3.3% and are definitely illiquid; 1 Tbonds return only 0.22%. I haven’t heard of any current liquid asset yielding anything near 3.7%.

If they really have investment opportunities that they are convinced will surpass 3.7% return, why aren’t they just using their existing liquid assets. I agree with other commenters that these funds are either in preparation for a large acquisition or just a dumb decision resulting from irrational and inefficient buracracy common to all large companies.

hagy··on Why did Google take a $3B loan with $37B already in the bank?
If they are sure they can make at least 3.7% with 3 billion, why not use their own money? After all, they still have to pay back the 3 billion when the bonds mature; possibly using their rainy day money if they’ve squandered the borrowed funds.

This only makes sense if all of Google’s current funds are tied up in wealth generating investments and they want even more money to play with. I highly doubt Google’s liquid assets (cash on hand) yield such returns.

hagy··on Why did Google take a $3B loan with $37B already in the bank?
That desperation example should’ve been downplayed. The main point is that bond rating is largely independent of a company’s reputation in handling past debts; investors are primarily concerned with the company’s future ability to honor their newly issued bonds.
hagy··on Why did Google take a $3B loan with $37B already in the bank?
That makes no sense. If in the future Google’s fate should change such that the company becomes desperate for cash, no one will care about Google’s past good credit score. Bonds are always rated on future expectations.
hagy··on How to compile CoffeeScript on save in VIM
coffee-mode.el provides the same functionality for emacs. Automatic compilation of any *.coffee file on save can be enabled by

    (add-hook 'after-save-hook
                          (lambda ()
                            (when (string-match "\.coffee$" (buffer-name))
                              (coffee-compile-file))))
hagy··on [dead]
As a counterpoint, I’ve heard of individuals building entire careers by making obvious and incremental improvements to current methods; each increment is at least one paper and they add up fast. Then the methods and all its improvements are discarded once a more ambitious (and therefore risky) line of research yields entirely new methods with orders of magnitude improvement over the old ones.

Results based funding (and tenure granting) promotes these more conservative and obvious projects. Proposals for more risky, and therefore potentially more rewarding projects aren’t submitted as no one wants to gamble with their own career.

hagy··on [dead]
While I wouldn’t say I agree with it, I’ve heard the argument that high specialization strongly selects for a student’s technical proficiency. As a PhD student myself, I’ve seen examples of this phenomena with highly intelligent individuals leaving our program as they couldn’t foster the drive to learn the requisite highly specialized technical skills. In contrast, I’ve also met individuals who developed their technical skills with rabid obsession, but who had trouble grasping the general significance of major publications in their field when the paper didn’t fall exactly within their own line of research. The second type of individual makes for a wonderful post doc or research scientist, but only until the techniques they’ve master are automated or funding for their specific lines of work goes dry.

Still, I’d say the best researchers/professors that I’ve met combined a deep understanding of the techniques in their own line of research with a broad understanding of their field and adjacent fields. Personally, I’d fear that removing technical proficiency as a requirement for a PhD would eliminate an essential bullshit detector that filters out certain people; people who do a great job speaking in broad generality but are incapable of formulating a path to accomplish these grand aims.

(As a quick anecdote, I once saw a research presentation from a grad student who made broad claims about his project’s direct role in curing many forms of cancer. As he progressed, we learned he was only exploring strategies to synthesize a potential ligand that some other researchers would consider using in imaging a specific cancer within rat models. To this end he showed very little progress, but continued to speak at great lengths about the imminent eradication of cancer as he concluded his talked.)

hagy··on Physicists Discover Quantum Law Of Protein Folding
Exactly! This high level model doesn’t draw on any quantum specific phenomena and is in many ways comparable to other stochastic dynamical models that have been developed to explain the non-Arrhenius behavior of protein folding using classical Langevin theory.

To argue for the inclusion of quantum theory in explaining protein dynamics is to assert that proteins undergo classically forbidden conformational transitions. The authors of the paper have provided no evidence for such transitions nor even hypothesized about how such transitions could arise. Their only argument against a classical description of protein folding is the inability of molecular dynamics simulations to model the folding-kinetics of some proteins. Seeing as molecular dynamics force fields only provide a rough and approximate description of the forces between atoms within a protein it should be no surprise these methods can’t accurately model the intricate conformational transitions in protein folding.

hagy··on Spray-on liquid glass is about to revolutionize almost everything
Saying the coating lasts a year may imply that within a year the coating sustains enough damage to render it less effective. For instance 99% of the coating may be intact while a small portion has fragmented off due to imperfections in the formation of the initial layer. Additionally many surfaces, especially countertops, are themselves damaged at the micron scale in regular use. If a layer of the initial surface fragments off it will leave an uncoated surface behind.

There additionally may be other mechanisms by which the coating is rendered less effective within a year, but I highly doubt a significant portion of the coating detaches from the surface within a year.

hagy··on Spray-on liquid glass is about to revolutionize almost everything
Concerns of breathing in this silicate have been popping up a lot in this discussion (especially concerns about silicosis). I’d just like to point out that we’re discussing very small quantities; nano-coatings of ~100nm, only 15-30 molecules high as mentioned in the articles. Wikipedia states that the silicate clusters ascribed to silicosis each have a diameter of ~10 microns; each clusters is 100 times larger than the thickness of this coating. Additionally, the article states that the silicate coating chemically bond to the applied surface. Such silicate bonds only cleave at high temperatures (500 deg C) so the coating won’t evaporate off under ambient conditions.
hagy··on OK, here's the thing: this is only the entrance of the rabbit hole.
There is actually a little more to getattr in that __dict__ just has attributes local to that instance where as getattr (also instance.attribute syntax) also accesses class attributes, non-bound methods, and properties. Additionally, these non-local attributes can also be inherited from parent classes.
hagy··on "Physics shows that cell phones cannot cause cancer"
A few comments here have discussed microwaves influencing biochemistry by non-ionizing mechanisms. To address these concerns, it’s easy to show that microwaves cannot provide enough energy to alter any biochemical pathway unless one imagines a very specific molecular system to absorb energy at this wavelength; similar to chlorophyll absorbing visible light in photosynthesis.

Given the complexity of chlorophyll and its significant support system in photosynthesis, I would highly doubt such a similarly complex molecular system would evade discovery. Further, due to the weak energy of microwaves, as quantified next, such a microwave harvesting system would have to be located at the surface of our skin (or other periphery tissue like hair) to absorb this energy before other biomolecules absorb it non-specifically. I believe these relatively simple periphery tissues have been exhaustively studied.

As the article mentions, microwave energy is on the order of 0.001 kJ/mole. Just to put that in perspective, the random thermal (kinetic) energy contained in each degree of freedom of a biochemical systems is on the order of 2.5 kJ/mole. Due to their weak energy, microwaves have only been shown to non-trivially interact with molecular systems in the gas phase, where collisions between molecules are suppressed, as each molecular collision occurs with enough energy (thermal energy) to overwhelm the much weaker microwave interactions. In the fluid tissues of the body this energy would only be non-specifically absorbed causing a trivial and temporary rise in temperature (1e-4 deg C) within the tissue.

Therefore, I highly doubt microwaves interact with human biochemistry in any interesting or pathology-relevant way.

hagy··on What life is like in a state where firefighters are paid voluntarily
Duress is where someone forces another into a bad position, eg by setting the house on fire first.

Duress only implies impaired judgment of the contract signer as due to immediate fear; it doesn’t imply the other party created the situation. Any lawyer would easily argue that the fire department charged an irrationally high cost for fire fighting that the home owner wouldn’t have agreed to had they had time to fully weight the cost and benefits of fire fighting services. In the worst case, one only need say they planned to demolish the house in the near future and therefore paying to have the fire extinguished was irrational.

A contract for non-insurance, pay-for-use fire fighting would only be enforceable if signed before the fact.

hagy··on Quant Hedge Fund D.E. Shaw Fires 150; 10% of staff
Custom hardware for chemical physics has been tried multiple times before since the late 70s. I’ve heard most companies only found financial success through bloated government contracts and the custom hardware only provided limited advantages for researchers. In all cases these advantages died out quickly with advances in commodity hardware.

Anton is impressive in that it can provide millisecond long trajectories of protein/solvent systems, but single trajectories are of limited utility. You need many (1000s) of such trajectories for statistical analysis of the molecular system. Further, there already exist several clever methods that leverage chemical statistical mechanics to provide the same analysis without the need for single long trajectories. As an example, see Pande’s work developing Markov models of protein folding using millions of short trajectories between metastable states. This method has already provided a complete statistical analysis of protein folding for proteins that fold on times scales an order of magnitude beyond what Anton can simulate.

As for Desmond, there already exists a plethora of free MD programs (MMTK, LAMMPS, NAMD, CHARMM, Gromacs, and many more). Many of these, especially Gromacs, have already been highly optimized for a range of hardware and I wouldn’t expect Desmond to surpass these free codes by a margin worth dropping dollars.

Personally, I still have high hopes for DE Shaw Research, I just don’t see how their current offerings will turn a significant profit or greatly advance science. I’d love to be proven wrong, and I’m sure they’ll have plenty of additional novel future projects, some of which could be paradigm-shift-changing for chemical physics and molecular biology. My guess is that such advances won’t come from their hardware geniuses, but instead from their math/physics geniuses that will develop new statistical mechanics methods to bend & contract in silico time.

hagy··on Godaddy.com up for sale. Could fetch $1 Billion
I thought about this a while a back, and as ridiculous as their TV ads are, I do believe they serve a purpose: getting members of the general public to start with go daddy when they want to create a website. I’d wager a significant portion of their revenue isn’t from domain registration, and instead from all the extra services they offer, and first-timers are likely the main customers of these services. As ridiculous as the commercials are, they do get the general public's attention and drive first-timers to go daddy’s services.
hagy··on How to design a replacement for C++
In my experience, having python as the root node for multithreaded C/python programs generally doesn't present a problem. When calling into external C functions through ctypes, the GIL is released such that multithreading at the C-level is unaffected. I personally use this feature heavily to perform numerically intensive work with multiple threads as directed through python with C doing the grinding.

Additionally, all IO code in the standard library and most C-extensions that I've seen release the GIL around blocking IO calls. This allows multi-threading to be used for the standard blocking IO use cases. Further, the computationally intensive routines in numpy and scipy that I’m familiar with also release the GIL to facilitate multithreading at the C-level

The GIL only becomes an issue if you want multiple threads to be executing Python bytecode concurrently. I don’t believe this is a common problem as one rarely runs computationally intensive code at the python level. Such computationally intensive work is generally performed through C extensions or through external C functions (as accessed through ctypes). As long as such C extensions properly release the GIL, multithreading at the C-level is unaffected.

← PreviousPage 4 of 4