One of the funny things about "view source" is that I don't actually do it anymore. It's useless for a lot of websites.

Instead, we have to inspect the DOM. You see that when you right-click, you have two options, "View Page Source" and "Inspect".
If you do this on Twitter, you see the that "View Source" is useless. It doesn't contain anything. That's because instead of displaying data, it uses dynamic requests to fill in pieces a little at a time.
A couple years back, Twitter made a change were requesting a URL doesn't get the tweet -- it only appears to get the tweet. A "View Source" on a URL with the tweet number gets JavaScript instead, which grabs a JSON version of the tweet, which then inserts into the HTML DOM.
So not only do I end up having to inspect the DOM, half the time I have to write little JavaScript commands on the console in order to find things in the DOM. Inspecting a page now often means writing a little JavaScript.
Which is why when people ask me "what programming language should I learn?" my answer is always JavaScript. This is because whatever other languages you learn, you also have to learn JavaScript in order to manipulate the DOM of webpages.
By they way, I'm sensitive to the fact that while you've heard of "DOM" (document object model) you probably aren't really confident in what that actually means.

DOM just means the HTML content of the webpage.
But JavaScript manipulates the internal representation. If you change all <b>bold</b> to <i>italics</i>, you don't search-and-replace the HTML text, you walk through the internal tree structure structure.
In your mind, think "rewriting the HTML in the page" instead of "manipulating the DOM" and you'd be correct for all purposes.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Robᵉʳᵗ Graham

Robᵉʳᵗ Graham Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @ErrataRob

15 Oct
I went to the eye doctor today. I shouted (well raised my voice slightly) "you aren't listening to me".

I finally got my eyes diagnosed in ways that should've been done when I was a kid. My eyes have many small problem that have been ignored forever.
I can see the same confirmation bias that I see in my own industry, where evidence is simply pigeon holed into what they already know, so there's terrible inertia if something doesn't quite fit an existing pigeon hole.
I have three separate problems but they are all minor. But they mean that whenever I get glasses, they don't help much, which is why I don't wear glasses.
Read 7 tweets
15 Oct
Ok, let's turn this around and look at it from the Governor's point of view.

Anti-hacking laws are largely based upon trespassing laws. So let's look at it form that angle.
You've seen "no trespassing" signs like this one.
Prosecutor: did you see the sign?
Trespasser: yes, but the fence was so easy to climb over it posed no barrier
Prosecutor: but did you see the sign?
Trespasser: yes
Prosecutor: so you knew you were trespassing?
Trespasser: yes
Computer trespass works the same way:

Hacker: yes, but base64 isn't serious encryption and easily bypassed
Prosecutor: but you knew you weren't authorized to see that social-security number?
Hacker: yes, but...
Prosecutor: so you knew you were trespassing?
Hacker: yes, but
Read 15 tweets
15 Oct
A governor of a state sent the police to harass to a journalist who exposed embarrassing information. I'm not sure how that's not "pile-on" worthy. You don't need any technical knowledge to understand why this is a problem.
What techies understand is how when a website publishes something in a webpage, it's their fault for doing so, and that obfuscating it requiring extra steps to "decode" is not protection, and bypassing obfuscation is not a crime.
You untechies may be confused about this, but it's a principle techies have understood since the 1880s ("Kerckhoff's Principle"). This is not a typo. I didn't mean we've known since the 1980s, I mean it's a principle of the 1880s.
Read 4 tweets
15 Oct
Your regularly reminder that "gerrymandering" is only a sin that the other party does, while you ignore it when your own party does it.
A "fair" breakdown would be 10 seats for Dems and 7 for Repubs.
The previous breakdown was 13 seats for Dems and 5 for Repubs.
The new gerrymandering gives 14 seats for Dems and 3 for Repubs.
Most countries use "proportional voting", where you'd vote for a statewide party rather than for a candidate for a district. In other words, in the 2020 election, Dems got 57% and Repubs 41% of the presidential vote, and hence Dems get 10 seats and Repubs 7.
Read 10 tweets
14 Oct
The tech community is exploding over this. It demonstrates how those ignorant of technology suspect techies of witchcraft. The governor is using violence, the vast power of the state, to crack down on somebody who committed no crime.
Oops, I should amend that last two words of that tweet: "no reasonable crime". I don't know state law. Maybe that law was, in fact, written such that judges and juries will believe it's a crime. It's just that it's fantastically unreasonable to treat "view source" as a crime.
Well that escalated quickly. Image
Read 13 tweets
4 Oct
1/n OK, let me explain what's going on with the Facebook right now.

First, let's talk "routing". The Internet is a mesh of routers that forward packets. Packets go from source through a series of routers until they reach their destination.
2/ Your packets follow a path or route through the network. Here's the path my packets are currently taking going to twitter.
3/ Routers in the core of the Internet need to know the location of every IP address on the Internet. In this manner, they know which direction to forward a packet so that it reaches it's destination.
Read 25 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(