Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on piefed.blahaj.zone

50 replies

In one college class we had to reimplement TCP in our own code on top of real UDP sockets. That was a fun class.

9

I was like this 5 years ago. Networking a lot is still effort for me, but it is just another learnable skill, and it has lots of benefits (depending on your aims, I guess)

Edit: hah, just realised this is about connecting computers, not about talking to people...

8
lemmy.world

If it helps, I'm from the other side of networking and infra. You could swap the labels and make the meme accurate for me.

In the mid 1980s I learn the BASIC programming command GOTO and fell in love for a lifetime. If you look any anything I used to write in Ruby script or today in Python you'll see my love affair with "if" "elfi" and "else" continues. My universe is nested "if" statements all the way down.

35

It was fashionable at a time to avoid ifs and other imperative structures, but I tend to like them. Functional is nice and all but I like my code to be smart in the way it works, not in the way it's written. Nested ifs are readable, collapsible, and easy to make sense of at a glance, there's often nothing wrong with using them.

2
rockSlayerreply
lemmy.world

If you like if statements, you'll love the python case statements for pattern matching

8

Ohhh nice! I could see replacing dozens of nested if statements with dozens of nested case statements!

16

Same here! I can put together a half-descent network in just a few hours, but even programming simple stuff on microcontrollers is a major endeavor. And the documentation is usually terrible or nonexistent. And the tutorials are usually barely able to cover basic questions. At least in the space of networking, there’s enough context clues in the UI that I can piece together the solution I need.

3

My universe is nested "if" statements all the way down

Also known as AI 🤣

1
feddit.org

"networking" in the social sense or in the administration/programming sense?

53
feddit.org

It's a trick question anyway, most programmers are probably bad at both Ü

40

It is very common to use ACK in social contexts as well if you work in IT I have found. Like "had a meeting about that issue, awaiting ACK from John"

4

Only wizards can configure iptables for ipv4 and ipv6 port forwarding. Only wizards.

8

My confidence in disk management and partition tables is made of horse hair, single strand.

2

I've enabled all the relevant permissions. I've disabled firewall protection. I've enabled file sharing on both sides. I've checked for connectivity to the other machine from the command line...

Why is my shared folder still not accessible!??!

6

That's why I decided to build my first online multi-player game as an offline single-player game, and just figure out how to add the networking stuff when everything else is done- an architectural choice I definitely won't come to regret later...

8
lemmy.dbzer0.com

tcpdump looks scary but is super neat and helpful, learn it if you haven't ;)

8
piefed.social

Still doesn't help with things like understanding routing and subnet masks and frame sizes and jfc how does any of this work

9

Of course not, but I've found that seeing the protocols in action and looking at real headers can be very helpful in making them click. Understanding DHCP or ARP or mDNS or BGP or whatever is much easier by inspecting a pcap than it is by reading RFCs

2
ohshit604reply
lemmy.halstead.host

As someone who understands the concept of network but has never professionally entered the field, i assume this just dumps a TCP packet to be inspected, correct?

2

Yes, but before I used it I assumed that its scope was pretty much limited to what you just mentioned. Instead it can operate on most protocols both above and below layer 4, and it is incredibly useful as a traffic capture tool to produce a .pcap on a remote headless machine which you can then load into Wireshark. The "dump" part is the interesting one, not the "tcp" ;)

1
mkwtreply
lemmy.world

The tcpdumps I've worked with can also dump UDP, ICMP, and even ARP.

3
Brkdncrreply
lemmy.world

Yes. Also learn about certs if you need to deal with encryption https etc.

2
ohshit604reply
lemmy.halstead.host

Thank you for the affirmation, I got reverse proxies and certificates relatively down, however I am struggling to understand headers and their purposes, I know Mozilla has great documentation regarding headers but lately I’ve gotten lazy, haha.

1

HTTP headers or headers in general? For the former I suggest Burp Suite to inspect and manipulate headers to see how things change, for the latter tcpdump/wireshark, to supplement your theory reading :)

2

Thanks! I started with Wireshark, settled on tcpdump for a while and now I'm too busy learning electrical engineering to give any fucks at all. 🤣 Nah but seriously, tcpdump gave me lots of insight! :)

2
lemmy.world

I've been trying to remotely connect to a relational database of medical data. I've been smashing my head against a keyboard for days trying to get my fucking code to work. I can't even connect to their db on their Jupyter Spark cluster

2
Valmondreply
lemmy.dbzer0.com

Ooh medical data, bet there is some security involved that "gets in the way".

3

It absolutely is. I'm dealing with genetic data, so I'm on their high security tier. Right now, the signs point to some poorly documented environment variables that aren't sourced on startup for some reason

3