Live data from Hacker News

Making Hard Things Easy

jvns.ca

191–200 of 202 posts

Re: Making Hard Things Easy

#191
post #4

TiL: The shell does not exit if the command that fails is a part of any command executed in a && or || list except the command following the final && or ||. Reference: https://www.gnu.org/software/bash/manual/bash.html#index-set

In my opinion, it is one of the biggest flaws in the shell language design, because it means, that a function can lead to different results independent of the arguments, but depending of the context from which you call it. And it even overrides explicitly setting `set -e` within a function.

Some time ago I gave an example: https://news.ycombinator.com/item?id=22213830

Re: Making Hard Things Easy

#192
post #95

Earlier quoted context omitted.

Wireshark is great but it does not show you every byte the network carried. For example it never shows Ethernet preambles, only sometimes shows Ethernet frame checksums, and never shows interpacket gaps (which are a required part of the Ethernet protocol). So yes it comes close but it just goes to show you, there is always more detail hiding somewhere!

My biggest problem with Wireshark is that it can't do anything with HTTPS traffic - which is most of the traffic I'd be interested in. I understand that's kind of the point of HTTPS, and a MITM proxy with cert replacement is somewhat out of the scope of Wireshark, it still limits the usefulness of the program.

Check out Charles Proxy for mac. It’s great.

Re: Making Hard Things Easy

#193
post #95

Earlier quoted context omitted.

Wireshark is great but it does not show you every byte the network carried. For example it never shows Ethernet preambles, only sometimes shows Ethernet frame checksums, and never shows interpacket gaps (which are a required part of the Ethernet protocol). So yes it comes close but it just goes to show you, there is always more detail hiding somewhere!

My biggest problem with Wireshark is that it can't do anything with HTTPS traffic - which is most of the traffic I'd be interested in. I understand that's kind of the point of HTTPS, and a MITM proxy with cert replacement is somewhat out of the scope of Wireshark, it still limits the usefulness of the program.

it can, just not as easily as MITM proxies: https://wiki.wireshark.org/TLS

Re: Making Hard Things Easy

#194
post #131

> One thing that I sometimes hear is -- a newcomer will say "this is hard", and someone more experienced will say "Oh, yeah, it's impossible to use bash. Nobody knows how to use it." > But I would say this is factually untrue. How many of you are using bash? I think the meaning of the statement is not that straightforwardly literal. I think what it means is, "We don't have strong confidence in our understanding of ou…

Personally I think the complexity from tools like bash come from lack of evolution.

As a thought experiment, why couldn't bash have a better assignment statement available?

In other words, something like:

set --goodass

a = string1 + '.' + string2

This would cut through SO much of the shell quoting nonsense that you deal with.

another tool like "make" would benefit too.

I think 6 months of development to "make" to have usable variables, clear ways of manipulating paths and filenames and making targets more usable... that would be better than 6 months of creating complex makefiles.

Re: Making Hard Things Easy

#195
post #95

Earlier quoted context omitted.

Wireshark is great but it does not show you every byte the network carried. For example it never shows Ethernet preambles, only sometimes shows Ethernet frame checksums, and never shows interpacket gaps (which are a required part of the Ethernet protocol). So yes it comes close but it just goes to show you, there is always more detail hiding somewhere!

My biggest problem with Wireshark is that it can't do anything with HTTPS traffic - which is most of the traffic I'd be interested in. I understand that's kind of the point of HTTPS, and a MITM proxy with cert replacement is somewhat out of the scope of Wireshark, it still limits the usefulness of the program.

This method is really simple for Chrome, Firefox and other OpenSSL apps: https://wiki.wireshark.org/TLS#using-the-pre-master-secret

You set an environment variable to instruct the app the write a file that Wireshark can use to decrypt its traffic, and change a setting in Wireshark to use that file, and that's it.

You will even be able to see decrypted WebRTC traffic.

Re: Making Hard Things Easy

#196
post #95

The part that resonated most with me is "Show things that are normally hidden". Tools that do this make things clearer almost immediately. Consider the developer tools in a web browser. Do you remember the "dark ages" before such things existed? It was awful because you had to guess instead of seeing what was going on. Tools like Wireshark that show you every last byte of network packets that it has access to AND par…

Wireshark is great but it does not show you every byte the network carried. For example it never shows Ethernet preambles, only sometimes shows Ethernet frame checksums, and never shows interpacket gaps (which are a required part of the Ethernet protocol). So yes it comes close but it just goes to show you, there is always more detail hiding somewhere!

Wireshark will also frequently show the wrong checksums for IP, UDP, and TCP. Specifically when computing them is ofloaded to the network card.

Re: Making Hard Things Easy

#198

The part that resonated most with me is "Show things that are normally hidden". Tools that do this make things clearer almost immediately. Consider the developer tools in a web browser. Do you remember the "dark ages" before such things existed? It was awful because you had to guess instead of seeing what was going on. Tools like Wireshark that show you every last byte of network packets that it has access to AND par…

https://news.ycombinator.com/item?id=37467078

Is there a way to get Awk to emit a non-terse version of the script passed in? ie awk '/test/' -> '{ if($0~/test/){print $0} }'

Re: Making Hard Things Easy

#199

The part that resonated most with me is "Show things that are normally hidden". Tools that do this make things clearer almost immediately. Consider the developer tools in a web browser. Do you remember the "dark ages" before such things existed? It was awful because you had to guess instead of seeing what was going on. Tools like Wireshark that show you every last byte of network packets that it has access to AND par…

This is one thing I love about Magit for Emacs. The UI is really clever and slick—maybe the best Git frontend that I've ever used—but the way you interact with UI is by toggling flags and options that actually map to the underlying command line Git arguments. I can seamlessly hop into the command line and feel right at home using it directly.

Yes, text based UI's like magit offer this kind of simplicity without sacrificing cli speed.

Re: Making Hard Things Easy

#200

.

Could you please stop doing this? It's adding noise to the threads.

https://news.ycombinator.com/item?id=37798978

https://news.ycombinator.com/item?id=37701022

https://news.ycombinator.com/item?id=37501934

https://news.ycombinator.com/item?id=37475760

https://news.ycombinator.com/item?id=37466497

https://news.ycombinator.com/item?id=37270270

https://news.ycombinator.com/item?id=37247594

https://news.ycombinator.com/item?id=37230301

https://news.ycombinator.com/item?id=37109807

Post reply on HN