Better HN
topnewbestaskshowjobs
Log inSign up

wiredfool

6,559 karma · joined Jul 6, 2009 (17y ago) · 2,470 submissions

eric@wiredfool.com
Submissions

comment 8y ago · link · parent

I'd probably use a temp table for that, rather than a case.

  begin;
  select id, new_rating into temp_ratings values (1,25),(2,94),(3,16);
  update table place set rating=new_rating
    from temp_ratings
    where place.id=temp_ratings.id;
  drop table temp_ratings;
  commit;
Scales well, and almost all db engines know how to do that join. You can index the id, or use a temp table, or whatever depending on the shape and quantity of your data.

(edit -- actually finished the post)

comment 8y ago · link · parent

That is really hard. My oldest was reading at roughly that spread, and finding books that were emotionally approriate but also engaging at his reading level was difficult. It took a long time for him to read Harry Potter because it was just too dark. It didn’t help that he’d tear through trilogies in a day or two. You might win once or twice, but a week later you're in the same boat again.

comment 8y ago · link · parent

In the fridge?

That one I haven’t seen.

comment 8y ago · link · parent

There are tons of small fossils. There’s a 50M year old fish in my son's room that’s about an inch long.

Granted the coral fossil in the living room is many small animals, but it’s not a big object.

comment 8y ago · link · parent

A real doomsday prepper _is_ a subsistence farmer.

And hopefully one that doesn't rely on external inputs, and has a water supply that's not affected by climate change.

Learning how to farm it is essentially equivalent to currently farming it, or if not, then you need a few years of supplies to make it over the startup transient. With no reliable external input.

comment 8y ago · link · parent

I think the root issue here is that the production database "user" has too many privileges, and the reason for that is migrations. This is compounded by the test user essentially needing to be a db superuser to create and destroy test databases, as well as run the migrations for them. I've noticed this lately with Django, but I'm guessing that it's a general problem.

When I design a DB system, Ideally the production 'user' can only do those things that we reasonably expect them to be able to do, and truncate isn't one of them. Also drop tables, potentially delete entries, and any maintenance tasks. DDL modifications are right out.

Those tasks can be run from a specific user, and locked down to a certain types of connections that aren't allowed from production.

comment 8y ago · link · parent

No, because it’s already mapped to control. And that is Important, as its primary muscle memory. Escape shortcuts are less important. They still trip me up, but less often.

comment 8y ago · link · parent

I’ve been living with a touchbar machine for about two months now, and the only useful thing about it for me is the touchid spot.

Escape, slow as hell. Brushing the touchbar and bringing up the man app on some random argument, useless and annoying.

It’s gotten a lot better now that I’ve switched it from context to function keys, and am using an external keyboard 95% of the time.

It’s really my third favorite laptop to use in the house, behind a 2012 MBA and a Thinkpad t410.

comment 8y ago · link · parent

Steel, with a concrete composite deck. I did post-tension retrofits and other interesting concrete stuff as well.

comment 8y ago · link · parent

I don't have my code books any more, when I was doing this it was 20 years ago and in a different profession. My bridge is still standing, but it was a lot less risky than that one.

LRFD puts a 1.2-1.6 multiplier on loads (and at time less than 1 for cases where you're relying on it for balance), and resistances are in the .8-.9 range.

I never did a whole lot with the Factor of Safety era codes, but they were generally in the same range once you multiply out all the factors. (As you'd expect, the newer codes tended to hit about the same design point, with some deviations.)

There are two main things to keep in mind here:

* A factor of safety is for normal variability in loads and normal variability in material/connection strengths. It doesn't cover you for blunders.

* The loads that are calculated are the extreme loads on the system, not the normal loads. 1.4 DL + 1.6 LL + 1.2 WL is often the design envelope, and that's... a lot. Add a huge factor of safety on that and you're into physically impossible cases. Like, people are being crushed to death if you get more than 300psf of human load over a significant area, but the typical Live Load is in the range of 100psf. (Now books on a reference library moving shelf system? That's 300psf)

From what I've seen of this bridge, there was no live load at the time, so it's unlikely that it was overloaded as designed. If I was doing failure analysis, I'd be looking at a combination of factors, and the ones I'd start with are the shop drawings vs. the engineer's plans and the quality of the concrete materials, placement, and curing.

comment 8y ago · link · parent

Factor of safety isn’t really uesd any more, it’s really a combination of load factors and resistance factors. However, the ‘factor of safety’ would have generally been in the range of 2, not 5-7.

Now, there’s dead load, live load, wind, etc, and they’ve all got different uncertainty factors. Resistance factors are assigned based on the variability of the material, concrete more than steel, and fracture critical higher than redundant.

comment 8y ago · link · parent

Fair enough, I was confused with the procedural vs official language.

Languages are such a political thing. The whole recent (century) history of Gaeilge is a reaction to UK influence.

comment 8y ago · link · parent

Unknown. There's still Ireland. But Ireland is a much smaller influence than the UK is.

comment 8y ago · link · parent

It was well known when I did civil engineering in the mid 90s, I want to say that it was post Northridge that it started to bubble through the code. 50 years is probably pre-foundation tiedown. Current construction is going to have long sheet metal straps or j bolts into the foundation, I'm not sure what a retrofit will have.

An easy thing to check is the hot water tank. If it's not well strapped to studs, then I can't imagine anything else has been done. If it has, then at least you know that has been done, it it doesn't really tell you anything else.

I know when I was selling my house in Wa, that was one of the things the inspector looked for, so it's highly probable that it's been done, as its quick and easy.

Inspections are the only way to know for sure, but it can be invasive to get into the walls enough to see.

comment 8y ago · link · parent

Roughly, I'd say your biggest danger is falling objects, like books, and fire.

Building codes for new construction do most of the obvious now, the walls are tied to the foundation, there are shear panels.

5 to 15 stories is the worst height range, but shorter buildings can be bad if they're very asymmetric, like one with a parking under a two story appt, with one shear wall and poles for gravity support.

otoh, in a big enough earthquake, anything will be damaged.

comment 8y ago · link · parent

Everything I said happened in the 9 years I was on well/septic. We didn't have to get the new line, it if the backhoe repair didn't do it, we would have had to do it.

Permits are from the county health department. Apparently poor septic systems wind up polluting ground water with fecal coliform.

comment 8y ago · link · parent

Yes, and occasionally, you might have to get a guy with a backhoe to come out and do some work. That's $1000. That's assuming that you don't need a new line, which would take a perc test and a new permit. All the while the guy with the backhoe is looking at your system and wondering how it ever worked or got signed off in the first place.

It's several hundred to get it pumped every couple of years, I think I'm remembering in the range of $600 and just shy of 3 years between pumpings.

Then the well needs power, and someone needs to do the generator in a power outage, or you get to chip in for a spiffy one with an autostart, and the only time the well head ever acts up is on national holidays when if you can get someone out, it's 3x overtime.

You know, I kind of like city water now.

comment 8y ago · link · parent

No.

This has been gone ove many times, but:

Parachutes aren't cheap or easy. Saltwater is horrible for precision parts. They are trying to gas and go, or at least move, gas and full power test.

comment 8y ago · link · parent

I have two recommendations for anyone in this situation:

1) Talk with the state insurance commissioner. Make sure that your paperwork is in order, and then file a formal complaint. Mentioning this when talking to insurance company reps will get you booted upwards to people who are more able to help you so that the to make their problem go away.

2) If you have a case that's a clear compelling class, talk to a lawyer after the first appeal.

Background: My son had some prescribed therapy for a mental health condition that I was told would be covered when I talked to the insurance company. They subsequently denied the claims, then backpedaled on the first month because "I'd been told that they'd be covered.", but the subsequent months were not covered. I was left with a several thousand dollar bill. Washington State has the Mental Health Parity act, which states that mental health treatments must be covered to the same extent as rehab or surgical treatments. The insurance company ended up losing 2 class action suits, (a federal and a state) and paying $6.4M to repay all the class member's denied claims and an agreement to not deny claims in the future.

comment 8y ago · link · parent

Yeah. Quick, what are the restrictions for this identifier? Letters? Spaces? Dns? Globally Unique? Who Knows?

Even though they've got the validation, you only can tell once you submit and it complains.

comment 8y ago · link · parent

Two that have stuck with me:

A nanosecond is about a foot. A pico second is the size of a flake of pepper.

Adm. Grace Hopper gave me a nanosecond back in high school, and had a pack of picoseconds at the talk. (But didn't give them away. too small)

comment 8y ago · link · parent

It can be, especially at a company. (But then watch the bikeshed discussion on the tools. And PEP8 is a guideline, not a set of hard and fast rules. Beautiful is better than ugly and all that. ).

What I see as one of 5 maintainers of an open source project is that when a review comes back with a bunch of formatting comments, it's because the reviewer didn't step back and see the other parts. Raymond Hettinger has a talk where he discusses it, but it's the sort of feedback that can be given in almost any case and can obscure the more fundamental issues with the code.

comment 8y ago · link · parent

A checklist can help. (he says, and then does a mental one because there isn't one nearby).

What I look for is:

1) What's the problem being solved? Does this look like a reasonable approach? Is the code pythonic (Obv: for python)?

2) What edge cases are there? Does this handle the important ones? Does it punt properly on the less important ones?

3) Look for a short list of bug classes that have come up in the project before that have lead to emergency patches. E.g. Decrefing, Checking mallocs, any exec sorts of things. (This is a clear application for a checklist)

4) Are there tests/documentation/other required fixtures and stuff?

5) Does the code generally match the style of the project?

1000) Code formating and whitespace and line wrapping and all that bikeshedding stuff.

Feel free to short circuit anywhere once it becomes clear that there's more work required.

comment 8y ago · link · parent

Picture a 1m high wave with a crest to crest wavelength of 100km. That is pretty much what an open water tsunami looks like.

This is why when there's a tsunami warning, boats are supposed to leave the harbor, where it's dangerous, and get to sea where they won't notice the wave.

comment 8y ago · link · parent

This is the North Pacific in Winter. I'd be surprised if there weren't 10m waves out there.

comment 8y ago · link · parent

IANA Tsunami guy, but I worked with them in college.

The water column height on these buoys is a pressure transducer on the floor of the ocean (http://www.ndbc.noaa.gov/dart/dart.shtml)

The time skew of the events is small, but does exist. They're all within minutes of the 9:31am gmt earthquake, getting longer as you get away from the epicenter. i.e, way faster than a tsunami travels, but about how fast an earthquake travels. (Earthquakes spread in x miles per second, tsunamis in x miles per minute)

I _think_ what you're seeing is the pressure sensor picking up the earthquake and converting it to a water column height.

comment 8y ago · link · parent

I'd be _really_ suspicious of data showing a 10M tsunami in the open ocean. In deep water, they're super long wavelength low amplitude waves, it's only when they interact with the bottom that the wave piles up and gets to large amplitude.

comment 8y ago · link · parent

There are automated methods for determining if a bolt has been fully tightened, and they're generally specified for 100% of the bolted connections.

(The most common one is breakoff studs on the bolts, which actually speeds thing up because the wrench can grab the nut and the stud on one side of the connection and torque away till it pops)

comment 8y ago · link · parent

And for a non-cooperative game, Munchkin. It's all fun and games till someone tries to win, and then everyone gangs up on them. The monsters are really silly, some of them are internet jokes, e.g. the one of the monsters is a Dread Gazebo.

comment 8y ago · link · parent

Castle Panic is pretty fun for a kids cooperative game.

All of you are defending the castle from an onslaught of baddies coming in from the forest. Everyone gets cards each round to spend/trade that can damage/kill/repair with various restrictions. As with a lot of cooperative games, it starts easyish, and then things get harder.

1
454647
83