Hacker Newsnew | past | comments | ask | show | jobs | submit | varrock's commentslogin

Thank you for breaking it down like this. As someone without an engineering background, your explanation (along with some Googling for terms and definitions) really helped me grasp what happened.

You got me wondering:

> the whole bridge failed because the impact didn't exceed the impact strength of the bridge's material

When I first read this, it initially threw me off. The cargo ship's impact not exceeding the strength of the bridge sounds like a positive thing, but upon closer reading of your comment, it sounds as if it was the catalyst to the entire bridge collapsing.

So, how do engineers balance these properties of impact strength and tensile strength, especially considering large ships channel through these bridges near their pylons frequently? How much engineering goes into the possibility of large structures hitting their pylons?


> The cargo ship's impact not exceeding the strength of the bridge sounds like a positive thing, but upon closer reading of your comment, it sounds as if it was the catalyst to the entire bridge collapsing.

I had intended to add that exceeding the impact strength typically results in a local failure near the impact point. A tensile strength failure could happen far from the load and so could be more catastrophic.

I'm not sure if it would have made a difference in this case though, as destroying a main pillar by exceeding impact strength would have by itself transmitted most of the full bridge load to the remaining pillars and that alone may have been enough to exceed the safety margins on the tensile strength that are built into all structures. Unclear without more data, but there was a chance it could have survived in that case, but no chance with the ship consistently applying more and more shearing load.

> How much engineering goes into the possibility of large structures hitting their pylons?

Good questions, I'm not familiar enough with it to provide any further insight, except to say that I believe this bridge was designed long before these huge container ships existed. If they factored ship collisions into the bridge's design constraints at the time, they've no doubt been dramatically exceeded with these huge ships.

I don't think impact strength is factored very much into static structures, tensile strength is more important. It only comes up in very unusual situations like this or 9/11.


Bridges were not designed for being hit. They were designed to span. If those designing and engineering it had considered an impact, the design would not be catastrophic but rather sectional. If sectional, each span would remain standing rather than collapse like dominoes. It takes 3 miles to stop a 100k ton stacked container ship. The things nobody has mentioned are: Current direction and speed. Wind direction and speed. The entry of the vessel in relation to the bridge. The fact that dragging anchor would have on the starboard side pulled the bow right into the pilon, the worst case.


This is a great example of how a font can really compliment the style you're going for. It fits so well that you hardly notice it at all.


The font doesn't seem that great to me. Not sure exactly why but while it's not quite difficult for me to read, it's not as easy as other common fonts.


You are welcome to use vanilla frameworks for a generic looking site. This is clearly intended as a thematic look.


Yes, but it shouldn't be to the point that it gets in the way of the content. But I'm not a web designer and I'm not the intended audience. Still, I like to click through to interesting (to me) things and check them out. The typeface kept me from investigating as far as I normally might.


Why can't I use this one? I don't see anything mentioned about the font being required or even part of it.


I think that's kind of the whole point. It is introducing an ambience, it is deliberately made quirky and irregular like the handwriting of some. It is not a common font and that means our eyes are going to be slightly unused to reading it.


The font is fine, it's the line-height that is wrong: the text is a bit too squished


Oh I see what you mean


Style yes, but I find it so hard to read.


> Haven't used MSW, but don't people use it for mocking APIs? Isn't that apples and oranges?

At first, I was confused by what OP meant, too, but I think the point is that if you can mock your data easily, then getting your app into the desired state is straightforward enough that Storybook becomes unnecessary. At least, that's how I interpreted it.


Thanks. Need to try MSW, but right now it's not clear to me how it can be used more than a fake HTTP endpoint. With Storybook, I can create links with any set of props I want for each component (or change with the controls). A lot of state doesn't rely on a back end (client side history or user prefs stored in local state, etc.).


Would either of you mind expanding on this? What kind of roles have you held?


I have worked on security, databases, some distributed systems, a couple of video games, AR/VR and some ML systems, mostly connected to database and data pipelines. Knowing what the kernel is likely doing underneath has been useful in all those domains. More than that, being able to set up a production environment by yourself is hugely useful.

If you know the internals, the complexity of a lot of middleware kind of collapses, too. There are a million frameworks for doing threading, for example, but they basically all boil down to clone, a futex and some atomics. Similarly, you can figure out how almost anything works with strace. It demystifies so many things that you otherwise need years of experience to debug.

As a practical matter, you can always find a job as a competent DevOps type who can code and talk to SWEs.


Are there any books etc that you could recommend on Linux internals. I am mostly write c# code, and I didn't do computer science, I mostly self taught. I recently set myself the task of learning some c as I was finding that I was hitting a brick wall when it came to trying to learn more lower level concepts.

I want to work my way through computer systems a programmers perspective :

https://www.amazon.co.uk/Computer-Systems-Programmers-Perspe...


I recommend consuming everything Brendan Gregg produces. His work is mostly around kernel performance profiling and tracing, but you can learn a lot from just doing that. Also, the vast majority of time when you need to dive into kernel internals it is for performance reasons.

https://www.brendangregg.com/linuxperf.html

If you prefer physical books “Systems Performance” by Brendan is good as well.

As the sister comment says, Linux Programming Interface is really good for learning linux system programming topics but it is mostly focused on user space.

For more userspace stuff I like Chris Wellons‘ blog at nullprogram.com


Thanks for this :)


If you're the kind of guy who likes to work through one 1000+ page behemoth at a time, I can recommend The Linux Programming Interface specifically. As a nice secondary bonus, the code examples are all in good old fashioned C, so you can compile and run them to test things out as you please. :)


Seconded and the book is https://man7.org/tlpi/. One can even reads parts of it digging deep into the area one is trying to understand better.


Thanks


Thanks


> Similarly, you can figure out how almost anything works with strace.

I recently had an example of this higher in the stack than anything you listed: A co-worker couldn't install node_modules because yarn appeared to be running an older version no matter what he tried to upgrade it - turned out there was a hidden config file in his home directory none of us knew about that could tell yarn to use a different version of itself.


The article linked by the commenter above addressed your concern. They mention the toggle should have an _immediate_ state change. I really liked the iOS airplane mode example the article used:

> When turning airplane mode on for iOS, Apple provides immediate results by changing the cellular bars in the upper left-hand corner to an airplane icon.

To summarize, it sounds like the toggles you've experienced haven't led to an immediate state change, which likely identifies them as better candidates for a checkbox like you mentioned.


Specifically for reviewing a pull request in GitHub, wouldn't the "Hide whitespace" setting reduce some of this noise? I could be mistaken, though, but that's how I interpreted that setting.

0: https://github.blog/2011-10-21-github-secrets/


This is often useful, but JavaScript specifically has the annoying property that newlines can be semantically meaningful.

For example, if someone changes:

    function isUserBanned(username) {
      return db.findUserByName(username)?.banned;
    }
To:

    function isUserBanned(username) {
      return
          db.findUserByName(username)?.banned;
    }
you want to see that diff because the second version always returns undefined. If you ignore whitespace changes entirely, it becomes possible for people to sneak in bugs intentionally or unintentionally.


How much does prettier formatting help here for practical cases? In particular, if the autoformatter allowed that second example with the indentation on the last line, I'd treat that as an autoformatter bug.


That's technically true, but extrememly rare to cause real problems (short of bad intent). It reminds me of people/teams enforcing braces on single-line ifs, because one might add another line someday, forget to add braces, and break the logic. Even when it happens, there should still be tests that catch this.


On the one hand, yes, there should be tests. On the other, `goto fail;` :P

Also, adding braces from the start means that adding one new line of code is a one-line patch, instead of a four-line one - I do that for the same reason that I always put trailing commas on my array definitions


> one new line of code is a one-line patch

On the flipside, having three trivial early-return ifs at the beginning of a function will become 9 lines long with braces instead of 6 (or just 3, when doing single-line ifs). Very often, such cases never expand to multiple lines in the future.


Enforce semicolons.


gawd and this is why the semicolon debate wasn't just bike shedding.


> Douglas Downing's Trigonometry Made Easy is also a really great book for non-maths people.

> but this book really helped connect trig in an intuitive way.

To me, understanding math in an intuitive way is actually how "maths people" think about math. The numbers and formulas are just a means to an end to get there.


The advice in this blog post is specific to college, and the author of this post is in their last year; they certainly have the qualifications to give advice catered to incoming college students.

For what it's worth, I've been out of college for a bit, and I've had very similar sentiments towards college as the author, but they came to me much later than they did for the author.

I might also resonate more with the article because I was one of those people who fell into the trap of following my peers instead of prioritizing what I was actually interested in.


I'd argue the link is the most influential and historic element of the web. Its behavior should rightfully be preserved.


The link and the URL are what made hypertext hyper. They turned words in a document into portals to other documents.

But that web isn’t the one we’re dealing with anymore. We’ve moved from documents to applications. Like tabindex, I’m sure browsers or frameworks will gradually find ways to make any element behave link-like in every way. Which isn’t really a bad thing, it’s just development of the core idea of the web.


It also made things slow. Modern SPA links have pre loading optimizations baked in. It's quite important especially if your users are on mobile.


The average modern SPA pulls in far more unnecessary JS than the average plain HTML site pulls in via redundant tag structure following the initial page load. Moreover, server-rendered HTML renders far more quickly because there tends to be fewer total requests and there’s no hiccup parsing the JS when it lands, much less the time it takes to execute it.


And don't forget that gzip works wonders, removing most of the network overhead of transmitting redundant tags.


Browsers are perfectly capable of prefetching pages on their own.


It is the H in HTML and HTTP!


> The really impressive thing is... if you follow a user profile link to a comment and vote, the vote doesn't count.

I've been a Reddit user for a while, but I never knew this. I tried doing a quick search, but it dates back to 2015 when it seems they were actually disabled all together from the profile page [0].

[0] https://www.reddit.com/r/help/comments/2nzzhg/if_i_go_throug...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: