HNHacker News
TopNewBestAskShowJobs

dmlorenzetti

2,350 karma · joined May 18, 2009

I work on problems of air quality and energy conservation in buildings. Mostly I write simulation and optimization tools, using mainstream languages like C, Python, and F95.
submissionscomments
dmlorenzetti··on Facebook’s Laughable Data Shows ‘LOL’ Isn’t Funny Anymore
My wife and her Thai friends frequently use "555" (the Thai word for "5" being "ha"). It's a nice cross-over between the two languages, and of course quite easy to type.
dmlorenzetti··on The military tested bacterial weapons in San Francisco in 1950
The article is a bit biased in calling humans the subjects of the test... A subjects of an experiment is the entity being observed

It's actually pretty conventional to label any research that involves changing the environment of people as involving "human subjects" -- even if the purpose of the research is not directed at understanding how the change affects people.

Here [0], for example, is a U.S. Department of Energy web page that defines the "scope of research" for human subjects studies. It says, in part, [R]esearch using human subjects encompasses a broader range of research than many investigators... often realize. In addition to traditional biomedical and clinical studies, human subjects research includes, but is not limited to, studies that... evaluate environmental alterations

To make that even more explicit, they have a "regulations" web page [1]. The top link there is to a memo that clarifies that any "research involving intentional modification of an individual's or a group of individuals' environment" must be managed according to the rules for human subjects research.

(All that said, it's possible that the military did go through an internal "human subjects" review, which might have concluded that the trials were OK, on the basis that the agents were supposed to be harmless.)

[0] http://humansubjects.energy.gov/research/scope.htm [1] http://humansubjects.energy.gov/regulations/

dmlorenzetti··on I self-published a learn-to-code book and made nearly $5k in pre-orders
Off-topic comment on Leanpub -- Judging from the "best sellers" list, you handle a lot of software-related titles. Yet the categories pulldown in the bookstore has only two obvious software-related topics: the rather specific "Agile", and the rather broad "Software". I wonder whether you might not help browsers discover books of interest, by providing more categories and sub-categories (e.g., distinguish programming from data science, and under programming have separate sub-topics like Javascript, Python, and web).
dmlorenzetti··on Why Wolfram Mathematica did not use Lisp (2002)
I wonder if Wolfram's 100-times-slower reference point was based on a very particular comparison. Suppose you benchmarked a numerical algorithm that dealt with a lot of matrix-vector operations. And suppose you compared, on the one hand, a C or Fortran implementation that used arrays and native machine finite-precision numbers, against a Lisp implementation that used lists and the sort of "exact" arithmetic described in the usenet post.

This would not, of course, be a good comparison between the languages, but it might well give you a 100x speed difference. Taking Pitman's story at face value, it sounds like Wolfram wasn't very sophisticated about these things, and wasn't open to listening to explications. So he might have extrapolated a single dumb benchmark into a universal truth.

At the same time, it sounds like Pitman tried to convince Wolfram to represent floats as the ratio of two bignums, "with lots of other hidden bits to assure that any decimalization had enough bits to be precise." I can understand Wolfram not particularly wanting to taste any of that pie. I have worked with a simulation platform that uses paired BigNums just for time values (other values in the simulation use regular double-precision variables), and it was a big drain on simulation speed.

dmlorenzetti··on Long sentences
One sentence per line is also an excellent strategy for when it comes time to "diff" two files. It helps diff identify edits (by giving it more anchoring lines to figure out what's actually changed), and it makes the output much easier to read.
dmlorenzetti··on How Much Do Skyscrapers Actually Move?
For a fascinating read on the intersection of buildings, wind dynamics, and a litigious society, see "The Fifty-Nine Story Crisis" [0]. The article describes the response of the architect/engineer of the Citicorp Tower, when he realized that the building would topple like a domino in winds that could be expected at least once every 16 years.

[0] http://people.duke.edu/~hpgavin/cee421/citicorp1.htm

dmlorenzetti··on How Computer Modelers Took On the Ebola Outbreak
The error bounds shown in the figure labeled "The Problem With Prophecy" are almost comically narrow. DTRA is very familiar with propagating uncertainty in their software. It's hard to imagine they weren't aware of how shaky these predictions were likely to be.

Yet DTRA is also very familiar with the need to base decisions on the best information available at the time the decision has to be made. It's hard to imagine they weren't happy to have even shaky predictions at their disposal.

These guys live in a very different world to most of us. At one point my research group was developing rules of thumb for first responders in the event of a release of a chemical/biological agent in or near a building. We vacillated on certain aspects of the advice, because no matter what guidelines we proposed, we could always think of a scenario in which that was the worst possible thing for a first responder to do.

Our indecision finally got broken when a group member talked to a professional trainer of police. He flat-out stated (in paraphrase) "You don't have to be right 100% of the time. If you are right 51% of the time, that's better than having the guys on the ground making things up as they go along."

dmlorenzetti··on The Hacker Shelf: Collection of free books for the intellectually curious
A nice little book, "Seven Wonders: Everyday Things for a Healthier Planet", counts public libraries as one of the seven "sustainable wonders" (along with bikes, ceiling fans, clotheslines, and other low-intensity means of doing good things).
dmlorenzetti··on Botswana: An African Model for Progress and Prosperity (2012)
I think what distinguishes Botswana is how much of the diamond revenue the government turns into benefits for its citizens. Unlike many other countries, and no matter what other woes it might have, the place is not run as a kleptocracy.

I was a Peace Corps volunteer there in the late 1980s, and saw a lot of schools and health clinics built by the government, roads extended, water pumps installed, and so on. They also had adult education centers set up in many villages.

I went to teach there after a planned group of volunteers for Zaire fell through (for political reasons). The government of Botswana found out and told Peace Corps to send all the math/science teachers they could. I think that speaks to the mindset of the governance there.

Another aspect of the lack of corruption was the day-to-day interactions with authorities. In Zimbabwe or Kenya, if your bus got pulled over by the police it was always for a bribe. In Botswana, a group of soldiers would empty out the bus of passengers, inspect everything (no doubt looking for bombs and other arms related to the resistance to apartheid in neighboring South Africa), and then let you get back on the bus. Not a jot of personal property would be touched, nor money change hands, as far as I ever saw.

Finally, the Batswana culture always seemed to me to be incredibly peaceful, for want of a better word. My sense (not an anthropologist by any means) is that Botswana has a culture very much like an extended farm village. Most people live off the land, and the population is very sparse. Unless you're in a pretty large city (and there are maybe two or three), you simply don't walk past somebody without saying hello (and following a prescribed ritual for doing so). Even in the capital, you tend to acknowledge people as you pass them. There were of course problems, but in general I never feared to walk around anywhere, or to talk with anybody.

dmlorenzetti··on Can Your Static Type System Handle Linear Algebra? (2014)
Perhaps the sanest approach is we type every column of X and Y separately...

Typing every column of a matrix is not sufficiently general. Each element of the matrix can have its own type.

Suppose you're solving a linear algebra problem in two unknowns. Say it's an electromechanical system, and we want to find a voltage and a pressure that gives us some desired flow rates. So let x [=] (V, Pa), for example, and let y [=] (mA, kg/s).

Then the matrix-vector product Ax = y requires the units:

    [ mA/V   , mA/Pa   ] * ( V  ) = ( mA   )
    [ kg/V/s , kg/Pa/s ]   ( Pa )   ( kg/s )
Of course those units in A have nicer reductions, but it doesn't teach us anything to figure them out. The point is that the matrix A represents the system design, so the units don't have to have familiar names, let alone be consistent within a column. If the system involves Johnny reading a value off a meter, and then phoning somebody up to tell them to pedal a stationary bike a little faster, that process has some kind of units associated with it, and the matrix A must include those units in order to represent the system.
dmlorenzetti··on Hacker tries to compromise and resell an internet-facing Linux server
All of this is outside my experience, so I have to ask - how does the attack, as described, prove HutHos is the perpetrator?

The poster was able to find the HutHos site owner's full information "in a few minutes", due to "poor operational security practices." Doesn't this raise the possibility that the HutHos server was compromised by the malware's true owner?

dmlorenzetti··on Titanic: Engineering Facts [video]
Surprisingly not mentioned in the video is that the failure mode of the Olympic's hull, when the Hawke collided with it, provide clues to the reason the Titanic sank so quickly. The heads of the rivets holding Olympic's hull plates popped off (metallurgical analysis showed too much slag in the rivets, making them brittle). Recall that Olympic and Titanic were under construction at the same time, in the same shipyard. Most likely when Titanic hit the iceburg, the rivets holding her hull plates also popped loose, creating much larger gaps in the hull than would have occurred simply from a "puncture".

http://www.nist.gov/mml/msed/titanic_021798.cfm http://en.wikipedia.org/wiki/Tim_Foecke#Work http://www.educationworld.com/a_lesson/newsforyou/pdfs/newsf...

dmlorenzetti··on A Hole in the Darkness: The story of a simple portable lamp
Everyday acts... depend on the availability of essentials such as water, light and food, items whose acquisition, at least in the vast rural areas, is rarely straightforward.

As a Peace Corps volunteer, I spent 1.5 years in Africa (Botswana), in a village with no electricity. Lighting at night was a really problem. I could read or work for up to an hour, tops, with a paraffin (kerosene) lantern, before the fumes and bad light gave me a headache. A solar-powered overhead light was set up in a community building, and suddenly the adults who worked during the day could take classes at night.

Another very simple technology that even more dramatically changed life in the village was a water tank. The village had a few standpipes, supplied by a pump that often went out for a few days at a time. After the tank was built, the system had enough capacity that you no longer had to worry about stockpiling enough water to last through a few days.

dmlorenzetti··on Evil Icons – Lightweight SVG icons for your web project
According to Eisenberg & Bellamy-Royds' (excellent) "SVG Essentials", you should be able to create a fallback by using an <object> tag. Assuming that works (I haven't tried it), it could be a more direct approach than Javascript.

The <object> element is the general-purpose way of embedding external files in HTML and XHTML... Any content in between the [start and end tags] will be rendered only if the object data itself cannot be displayed.

dmlorenzetti··on Practically Accurate Floating-Point Math
The first thing you should worry about is whether your computation is ill-conditioned, and only then worry whether it's numerically stable.

OK, but how does one apply this advice in practice?

The radiative exchange between two surfaces goes as x^4-y^4 where x and y are the surface temperatures. I can worry about whether that's ill-conditioned all I want, but at the end of the day I'm further ahead evaluating (x-y)(x+y)(x^2+y^2) than the original expression.

Similarly, if I need to find x^2-1, what recourse do I have? Maybe there's some reduction that makes the computation more stable. But normally I would expect to discover such a reduction by turning x^2-1 into (x-1)(x+1), and then seeing if one of those factors cancels out somewhere. So it still seems like a good first step.

dmlorenzetti··on Ask HN Mods: Why Do You Completely Change What Users Submit?
The rules around titles are to always use the title from the article.

In general, that is the rule.

The cynic in me couldn't help but notice that an article with the original title "One of a Kind: What do you do if your child has a condition that is new to science?" has been on HN's front page for a day now with an alternate title.

For some reason, the same mods who removed "Feynman" as "click-bait" that is "not the title from the article" don't seem to have a problem sticking with the alternate title "Thanks, HN: You helped discover a disease and save lives" [https://news.ycombinator.com/item?id=8050106].

dmlorenzetti··on Inside the Soviet Army, what kind of weapons
This article makes a good argument for simplicity. Yet two of the topmost examples-- that simplicity in the MIG-25 made it fast, and that simplicity in the transmission of Soviet tanks makes them more easily repaired, even if they're harder to drive-- fly in the face of a specific tactical approach developed by the US Air Force during the Korean War.

The OODA loop concept breaks down decisions into a cycle of Observation, Orientation, Decision, and Action [1]. The theory was developed by a John Boyd, who flew F-86 aircraft against faster and more maneuverable Mig-15s during the Korean war. Nevertheless, his unit supposedly achieved a 10:1 kill ratio [2].

He attributed their success to American pilots' ability to make and act on decisions faster. "Time is the dominant parameter. The pilot who goes through the OODA cycle in the shortest time prevails because his opponent is caught responding to situations that have already changed." [3]

And in part he attributed this ability to the F-86 being easier on the pilot:

During his research he found that Fatigue was also a factor. He and his pilots were flying F-86’s and although they were slower and less maneuverable than the Mig 15’s they were flying against, The F-86 was fully hydraulically controlled and the Mig 15 was only hydraulically assisted. This meant that Boyd’s pilots could operate their aircraft with easy and gentle manipulation of the controls, while the Mig pilots had to work harder to maneuver their aircraft. Boyd found that the more his pilots maneuvered and the longer a dogfight persisted the more fatigued the Mig pilots became and the slower their reaction time became until the F-86 pilots were able to maneuver their aircraft into a position of dominance. [2]

[1] http://en.wikipedia.org/wiki/OODA_loop

[2] http://www.tacticalresponse.com/d/node/226

[3] http://en.wikipedia.org/wiki/John_Boyd_(military_strategist)...

dmlorenzetti··on Ask HN: I'm considering insubordination at work, looking for some input.
I would run through "Driving Technical Change" by Terrence Ryan for a few ideas. It's short and to the point:

http://pragprog.com/book/trevan/driving-technical-change

http://www.amazon.com/Driving-Technical-Change-Terrence-Ryan...

dmlorenzetti··on Circle of fifths and roots of two
I once went with a friend to price electric pianos. The models she was looking at sampled traditional pianos to get their notes, and had a switch to toggle between different sampled instruments.

She asked why there was such a price difference between models, based on the number of keys (unfortunately I don't remember the numbers anymore, but basically some of the models had shorter keyboards).

The response was that, for models with a smaller number of keys, they could just sample one octave of the original instrument, and scale the frequencies electronically. However, once you go beyond a certain range, straight scaling didn't work anymore, so they had to sample the whole range of a traditional piano-- hence more electronics needed in the electric piano.

dmlorenzetti··on What if you didn't need money or attention?
Good question. In my case, probably not, but it might work for others (I do fairly specialized research; if I drop it, either somebody else will pick it up right away, or it will die altogether).

More likely for me, I think, is that I would develop interest in some other problem area, and just dig in to the new domain. For example, I'm always struck when I hear about the sorts of medical problems that hit people from my wife's village. I don't know anything about medicine, but it feels to me like a focused data collection project could lead to a significant improvement health outcomes.

dmlorenzetti··on What if you didn't need money or attention?
Given money enough, and time, I definitely have things I would work on (mostly developing numerical algorithms for solving physical modeling problems, and expressing them in software). Yet, paradoxically, I worry about being given unconditional money and time to work on them.

Occasionally my wife and I talk about my quitting work, and us moving to Thailand (her native country). Her vision of my ideal life there is that I wouldn't have to work, and could sit around doing my pet projects without any time or money constraints.

That always strikes me as dangerous. Those projects I want to work on didn't jump into my head unbidden. The ideas arose from years of coming to grips with real-world problems that don't have entirely satisfactory solutions. If I untether myself from the work that led to the ideas I want to pursue, then where will the next ideas come from? And how will I know whether they are worth pursuing?

To me, having side projects that seem worth doing, especially from the point of being useful to others (Sivers' way of distinguishing what he means by "not just relaxing"), requires their being grounded in real-world projects. And one measure of the worth of real-world projects, like it or not, is that people are willing to pay to get them done.

dmlorenzetti··on Show HN: A new platform for meaningful, balanced debates
The site seems to encourage questions with simple yes/no answers, and to solicit sentence- or paragraph-length blurbs from commenters. Furthermore, since comments aren't obviously linked to the opposing statements that evoked them, it's hard to get a sense of dialog (as opposed to a bunch of people stating their opinions in a void). How likely is a meaningful, balanced exchange of views to proceed from that?

Indeed, I already see some signs of behavior that could lead to flame wars. One question begins, "Seatbelt fines are a joke...", which hardly seems likely to create an atmosphere of balanced, thoughtful comments. One comment on whether parents should be allowed to drug children on long flights advocates making it mandatory. Another question seems to be predicated on a news story (should a family get $200k?), but the context of the question is completely missing.

dmlorenzetti··on Ask HN: Is there a place where I can see what the karma thresholds are?
The karma threshold shifts over time, so while it might have been 500 at one time, it's a moving target: http://jacquesmattheij.com/The+Unofficial+HN+FAQ

I don't know what the current level is, or where to look it up.

dmlorenzetti··on I Still Don't Want To Be Part of Your Fucking Ecosystem
There's also a hardware ecosystem problem. Apparently we live in a world where people expect a TV to have a web browser with Adobe Flash on board.

I have a 30-year-old amplifier that still works just fine, despite having been built before CD players and MP3 players came along. Sure you could buy an all-in-one device that integrated the amp and the tape deck, but a lot of people avoided those because they wanted flexibility, expandability, and robustness.

Similarly, back in those days it was quite common to see little TVs with an integrated VHS player. But if you were the sort of person who bought individual audio components, you probably also avoided those things, because you recognized that the function of projecting a moving image on a screen was independent of the function of reading a signal from a strip of magnetized tape, and so keeping them in two separate devices bought you flexibility, expandability, and robustness.

Now, apparently, those old lessons are still useful. I'm not very much into TVs, so I don't know, but to me the real "ecosystem" problem here is that the TV apparently is not just a display device. It's pulling double duty as a web browser also (and who knows what else is in there). Unfortunately, a year and a half is a long time in terms of web technologies, so a perfectly good device for projecting moving images onto a screen is now deemed obsolete.

dmlorenzetti··on Where do we stand on benchmarking the D-Wave 2?
You can create much tougher classical competition by writing highly optimized code that accounts for the sparse connectivity structure of the current D-Wave chip.

Why should optimized code "account for the sparse connectivity of the D-Wave chip"? If the contest is to solve an optimization problem, then the "classical competition" doesn't need to know anything about the D-Wave. The only reason a competing code would need to model the D-Wave itself would be if it's simulating how the D-Wave solves an optimization problem-- in which case comparing the times taken to do the optimization is hardly meaningful.

dmlorenzetti··on Japanese Travel Tips for Visiting America
I went to grad school in Boston. Many foreign students complained about how homogeneous American culture is, how there are no restaurants besides McDonalds and Burger King, etc. But most of them formed these impressions by driving, or taking a bus, to NYC and back. If you don't get off the freeways, you really don't see what real life is like.

Similarly, I visited a friend in France once. On the way there, I took the TGV from Paris. I don't remember anything special about that leg of the trip, and learned nothing about France. On the way back, we drove, and passed through a bunch of little towns. I have a fond memory of helping a boater open a gate to a canal lock, and I still have a strong impression of how contained French villages are compared to American ones.

dmlorenzetti··on Hemingway makes your writing bold and clear
I felt like OP went out of his/her way to avoid snarkiness. He/she made several positive comments, added a helpful suggestion, and only then prefaced a "pedantic" comment by saying "Oh, by the way, a small part of me can't help but notice this..." That's a lot of mitigating language to earn the label "snark."
dmlorenzetti··on Why Don't Schools Teach Debugging?
I did an electrical engineering course. Especially with hardware ("welcome to tweak week"), there was a real sink or swim approach. I ended up feeling like it had to do with testability. It's easy to grade a test if you just look for right answers, and mark everything else off. It's easy to grade labs if you just look for the circuit tracking the input frequency. Grading either based on some assessment of how well the student understands what's actually happening is much, much harder.

My older brother and I went through the same classes and labs together. He brought to the table 15 years of experience playing around with electronics, so when we took labs, he had a clear sense of how to debug hardware.

He would wave his hand over some part of the circuit, and make gnomic pronouncements like, "When the input goes over about 5 volts, this part goes apeshit and starts firing back at it." Then he'd swap out a cap or a resistor, and everything would start working. I just went along for the ride.

I had decent math skills, so I did all right in the program. But I never learned that intuitive, heuristic, holistic way of grokking circuits like my brother did. Nor could I ever see that the school had any way to reward people like him, who "got" things at a deep level.

My sense was always that his approach didn't test well. If you test people for calculating the right voltage, you end up rewarding people who "plug & chug" quickly, even if they don't know what the voltage means, or why it would make some cluster of components go apeshit when it goes over about five volts.

dmlorenzetti··on Ask HN: How do you find good new ebooks?
I would start by dropping the "e" part of your requirement. Don't look for good e-books, look for good books.

Then I would drop the strategy of looking mainly at the "deal" books, since at best there is a zero correlation to quality, and at worst a negative correlation.

That said, finding good books is a problem that people have been facing for decades if not centuries, and with mixed success. You've got to kiss a lot of frogs...

Talking books with people whose opinions you trust is a good start. Then there are internet forums dedicated to discussing books of different sorts. There are lots and lots of review sites. One strategy is to find a review site that positively reviews a book you know you like, then see what else that reviewer recommends.

You can also find a library and browse the shelves. Browsing, at libraries and at decent brick-and-mortar bookstores (RIP), is how I found most of the books that I ended up liking the most. Literally at least three of my favorite books in the world I had never heard of until I picked them up from a bookstore shelf (and two of them, I had never even heard of the author).

In a way, reading lists of e-books that are available, rather than going in via a search on an author or title you think you might like, is somewhat akin to browsing. The main difference being the extremely low quality of the ability to spot-read, that electronic bookstores offer. The ability to randomly sample a book's writing in 4-5 places is an immeasurable aid to finding a book you might like, in my opinion.

dmlorenzetti··on Things I learned by pretending to be blind for a week (2013)
LaTeX, much like HTML, allows you to use either stylistic markup ("put this bit in a bigger font") or semantic markup ("mark this bit as a headline").

The PdfLaTeX typesetting engine can embed some semantic information into the PDF. However, it doesn't do everything. For example, I believe it does not handle the issue with "floats" that I mentioned [1].

I don't know whether there are TeX-aware tools for "reading" a LaTeX input file out loud (which is what I think you're asking about). But if there was such a tool, it might well be easier to understand, than listening to a dumb reading of the resulting typeset PDF.

It is possible to go into an existing PDF file and mark up a lot of these things, specifically in order to help the reader along. The webmaster where I work often has to mark up PDF files (usually generated from MS Word documents, rather than from LaTeX). I've never done it, though, so I don't know what's involved. My impression is that it's pretty painful.

[1] To make the issue with floats more explicit. You can tell LaTeX to add a figure, and to "float" it to the top of a page. The typesetting engine will do so. However, suppose the resulting PDF file ends page 4 with "The figure clearly shows..." and then starts page 5 with the figure, followed by "... two trends in the data." Then when the document gets read out loud, the reader will say "The figure clearly shows", then it will go into a spastic literal reading of the figure's contents, then it will finish up with "two trends in the data."

← PreviousPage 4 of 14Next →