Better HN
topnewbestaskshowjobs
Log inSign up

liamdiprose

52 karma · joined Apr 11, 2019 (7y ago) · 24 submissions

https://github.com/liamdiprose
Submissions

comment 4y ago · link · parent

How to Design Programs

https://htdp.org/2021-11-15/Book/part_prologue.html

Take a quick scroll through, it features programming with pictures which is much more useful and motivating for a beginner than lines of text.

First impressions matter. So avoid excessive keywords and syntax that only scares beginners into thinking programming is a voodoo-magic-minefield. I'm looking at you, Python.

comment 5y ago · link · parent

This is true, which is why I expect mDNS and DNS to become standard even for local addresses.

I'm looking forward to using `router.local` over `192.168.1.254`.

comment 5y ago · link · parent

This is an example of how the internet was originally intended: Every user of the internet has a public address that any other user can send and receive messages from.

The design works just like postal addressing. Your postal address contains the directions to your building from any location on earth. Even if you live in a dormitory building with many other residents, I can still send you a letter directly by adding "door number: 42" to your dorm's postal address.

IP addressing use numbers instead of English terms like "door" and "street". So I can't simply add "door number" to your building's IP address, your building has to be given enough addresses so each resident's computer can have their own. When your computer has a public IP address, I can send Internet packets directly to you.

Harvard was early to the slicing of the IPv4-address pie, so they had enough addresses each of their residents, including Zuck. Anyone with internet could put Zuck's IPv4 address on an Internet packet and it would end up on his computer. Most of these packets would be HTTP requests to facebook.com, to which his computer would reply with a page from the facebook website.

This is the internet working as intended.

But we ran out of IPv4 addresses in 2012, which has forced internet service providers to adopt an address-sharing scheme called network-address-translation (NAT) that makes it impossible to send letters directly to other people's computers. Imagine I wasn't allowed to put any room number or name on my letters. If I sent a letter to your dormitory, the staff there wouldn't know what to do with the letter and would be forced to return-to-sender or discard it. This is what NAT does, and it has turned the glory of the Internet into a centralized monster of control and censorship.

If you want to host a website with a public IPv4, only established cloud providers that obtained enough IPv4 addresses before it was too late can help you (primarily Amazon, Google and Microsoft).

The successor of IPv4, IPv6, brings enough address space for every person, their dog, their dog's fleas, and their dog's flea's microbes. We can go back to hosting websites from our dormitories, sending chat messages directly to our friends (not via Google, Facebook and Microsoft), and start new ISPs that missed out on the IPv4 pie that actually have a chance at competing with the likes of Comcast.

IPv6 reintroduces equity to the internet that facebook benefited from in it's inception.

comment 6y ago · link · parent

Who uses the indicator lights? - people looking behind a computer or at switchgear. They aren't regular users, they understand how networks operate and what the green/yellow lights mean. They're typically debugging a problem, for which you want the truest indication of what's happening on the wire.

For regular users who just care about working internet, you can notify the user of connection failure where they look - the screen.

comment 6y ago · link · parent

From xkcd's "Interplanetary Cessna":

> X-Plane is the most advanced flight simulator in the world. The product of 20 years of obsessive labor by a hardcore aeronautics enthusiast who uses capslock a lot when talking about planes, it actually simulates the flow of air over every piece of an aircraft’s body as it flies. This makes it a valuable research tool, since it can accurately simulate entirely new aircraft designs—and new environments.

https://what-if.xkcd.com/30/

comment 6y ago · link · parent

I just use my index finger for both j and h. Are you used to the arrow keys? I noticed with jkl;, my fingers line up with the arrow-key directions.

comment 6y ago · link · parent

Mapping the sequence 'jk' to Esc supercharged vim for me. Faster, but also helps me stay in the flow longer.

Run `:inoremap jk <Esc>` to try it out.

comment 6y ago · link · parent

The compute modules come with onboard eMMC

comment 6y ago · link · parent

Google tracks how many people connect with IPv6, which is a metric for how many people are staying at home:

https://www.google.com/intl/en/ipv6/statistics.html

IPv6 connections peak in the weekend and over the Christmas break, when people are connecting from home.

comment 6y ago · link · parent

Protobufs/nanopb would be my go-to for minimal message size.

If you want small code size, CBOR seems like a good bet:

> The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation. [1]

This [2] C-implementation fits in under 1KiB of ARM code.

[1]: https://cbor.io/

[2]: https://github.com/cabo/cn-cbor

comment 6y ago · link · parent

The link explains that CouchDB can have replicas on mobile phones and websites, meaning clients don't always have to be connected to the internet.

> The Couch Replication Protocol lets your data flow seamlessly between server clusters to mobile phones and web browsers, enabling a compelling offline-first user-experience

comment 6y ago · link · parent

> Speaking at the BlueHat security conference in Israel last week, Microsoft security engineer Matt Miller said that over the last 12 years, around 70 percent of all Microsoft patches were fixes for memory safety bugs.

https://www.zdnet.com/article/microsoft-70-percent-of-all-se...

comment 6y ago · link · parent

In New Zealand, the government funds tertiary education with a zero-interest loan. If you move/work overseas, it becomes a regular loan with 4% interest.

It gives some pressure to stay in NZ, but in reality, talented engineers can get over double their salary abroad.

comment 6y ago · link · parent

Two of my flatmates never have a shower over 5 minutes long, because they "get bored".

comment 6y ago · link · parent

From Google's Site Reliability Engineering book[1]:

> SRE’s goal is no longer "zero outages"; rather, SREs and product developers aim to spend the error budget getting maximum feature velocity. This change makes all the difference. An outage is no longer a "bad" thing—it is an expected part of the process of innovation, and an occurrence that both development and SRE teams manage rather than fear.

I suspect Search has a lower error budget than Sheets.

[1] https://landing.google.com/sre/sre-book/chapters/introductio...

comment 6y ago · link · parent

Yeah, the site owner said he's been slashdotted in an IRC channel.

comment 6y ago · link · parent

If its hosting costs the ACM is worried about, they could offer torrents as a free download option to lighten the load.

comment 6y ago · link · parent

Some friends of mine are entry-level developers that work alone on an Arduino/C++ codebase. Baremetal development and C++'s bad library support encourages them to write huge amounts of their own, very bad, code. They've taken a year to write the functional equivalent of a few hundred lines of Python and some packages.

Their codebase would improve immensely if they used a more powerful chip to run Linux and Python instead.

comment 7y ago · link · parent

I love the typed API svd2rust generates as well. Generally you can just let autocomplete do the driving, the only things needing a brain are the abbreviated register names manufacturers use and the order of operations needed.

I wonder if Rust would be better suited for Arduino/embedded beginners. Rust is quite painless when you just want to glue a few crates together. I'm sure everyone would rather debug a compiler error than some invalid memory issue happening on the microcontroller.

comment 7y ago · link · parent

It's the sanity check to see if a language really is the worst someone has seen.

comment 7y ago · link · parent

I've had similar success with the gradual typing in Python. NamedTuples are far superior to ad hoc dictionaries, for both documenting data structures, but also as a prompt to consider the software structure.

I wasn't aware that typescript type errors were only warnings. Every webpack/typescript project I've used must have had the typecheck set to error, leading me to believe typescript was some draconian type checker akin to Rust or Haskell.

comment 7y ago · link · parent

If you enable readability mode in Firefox first, the entire article shows up in the PDF.

comment 7y ago · link · parent

Yeah. I can't find anyway to save the text either. Looks like the app is targeted towards deaf/mute people when looking at accessibility features it includes (e.g. phonecall texting).

It would be cool if they added a way to save text (and audio) though.

comment 7y ago · link · parent

I just had a look on the Play store for a voice recording app and came across "Live Transcribe" by "Research at Google".

It's ridiculously good at picking up and transcribing my voice.

https://play.google.com/store/apps/details?id=com.google.aud...