u/brownhead

1,032 post karma · 2,081 comment karma · joined Dec 2011 · moderator

brownhead

I haven’t been job hunting in awhile but I’ve kept this mildly maintained in the meantime: https://johnsullivan.name.

Combining my portfolio and resume was done to make it easier to maintain while I wasn’t actively job hunting. I had a separate specifically portfolio site before.

brownhead

Glad to hear it :)

brownhead

Yes. And as you stated in your post, it's impossible to prevent the API from being accessed via postman/curl/etc if it's accessible through users' browsers.

So I'm saying (I think in agreement with you) in terms of assuring that OP's web app is the only web app that has access to their API, CORS is the best (and only) option.

I like how you laid the situation out in your comment.

brownhead

If you have more tangible examples of work (jobs you've held, contracts you've completed, more projects) I'd prioritize adding those to your resume. It feels like your resume has a lot of claims, but not a lot of evidence, if that makes sense.

brownhead

If a user's browser can access the API (which seems to be the case because the OP mentioned Angular), a user could access it via Postman or PHP, so that doesn't seem like a reasonable concern.

brownhead

Yes, the compatibility is good enough. But remember that there are still users who are using much older browsers, and checking your server logs to see if any of those users are visiting your site often is a good idea if you're a developer for a well-trafficked site.

brownhead

Yes, you'd use something like Google Cloud Platform or AWS (you could in fact use either of those services). It's hard to know what hosting provider to choose, and this article on MDN is maybe a good resource to help you understand what you need to do and how to move forward. Try reading through that.

If you find that unsatisfying, a good search query for you is deploying an express app, which should give you a lot of resources.

brownhead

You could make that as a self-contains webpage (using just HTML, Javascript, and CSS). Maybe you can try making it on CodePen? That way you can figure out how to host the page afterwards.

brownhead

If your API and your frontend is hosted on the same domain, you're probably protected already. Browsers won't let javascript running on another domain request anything from your domain (you must explicitly tell browsers to allow this if you want it to happen).

brownhead

As you've found, newer codebases probably aren't using jQuery much anymore. In fact, I worked with the creator of jQuery for awhile and he was leading the charge at our company to completely remove jQuery from our codebase 😅...

But that doesn't mean it's not worth learning about. I find it very helpful to do things the "wrong way" myself, and thus feel the pain that various "right ways" are trying to alleviate.

With these first-hand painful experiences, I'm often much better equipped to understand the motivations around a newer tool's design.

I don't know if this is the most efficient way to learn, but figured it might be a useful viewpoint to you if you're fighting a feeling of hopelessness-in-finding-"the-right"-learning-resources.

brownhead

Oh good catch, yes you're right (or the reimbursements should be greater). I'll update the post at some point. These aren't just copied from my ledger file, I mucked with them to obscure the details.

brownhead

I really enjoyed writing it, thought ya'll might find it interesting too.

brownhead

Oh hey, I worked with this person. Hi Jamie! I think this is great advice. I am also a person who goes around grepping for definitions usually, and it sucks when there's some shenanigans that prevents my grepping from working.

This seems too extreme though: "Here I propose a simple test, that if failed, is sufficient to reject a piece of code under review." I think there are almost no well-specified rules that ought to get this treatment cross-organizationally.

brownhead

This article feels spiteful against people who are starting their careers (or even just starting to learn for the fun of it).

There are people who use these fancy tools and know how they work. These more-knowledgeable people got this way by using these tools, not knowing how they work to begin with, and learning over time.

brownhead

A do while loop is identical to a while loop after the first iteration, so this is maybe a little misleading.

brownhead

I made my blog similarily: blog.johncs.com. No external resources except images, and based on my editor config.

brownhead

Buffers are not some arbitrary JavaScript object, they represent a continuous sequence of bytes (similar to a string, but not the same). You can send them in a response easily, the native API accepts them instead of strings: https://nodejs.org/api/http.html#http_response_write_chunk_encoding_callback. I likely won’t craft an example for you unfortunately. Best of luck.

brownhead

I don’t understand why serialization needs to occur here. It seems like it’s in a buffer already, and it’s a PDF document: a standard format. It’s not like it’s in a linked list spread out in memory and needs to be turned into something continuous that’d make sense on the other side of the wire.

Im pretty sure there’s nothing stopping OP from sending the data in memory over the wire in the same format/encoding/form it’s in already. And I think their question of “Why is base 64 encoding and then decoding it at the end doing anything, when that sequence of operations should be a no-op?” is pretty reasonable. I also wonder.

brownhead

Why is serializing to base 64 necessary, rather than sending the original bytes as-is? AFAIK HTTP can handle data in any encoding (ie: any random byte string is valid, so a PDF file should also be fine).

brownhead

I wish I could drink beer and never be hung over?

brownhead

You could do something like this: https://css-tricks.com/webp-with-fallback/

brownhead

/r/vindinium used to be one. They’re dead now but there’s mention of a port in a post, so that might be alive still.

brownhead

ICANN could use a similar process to the one it uses to determine if someone is squatting on a name with likeness to someone else’s brand to dissuade people from doing this. But it’s clear ICANN itself likes this process because of how it releases TLDs and allows registrars to price things:

brownhead

I saw some compelling “population density equals leftist politics” research recently, and combined with how many software engineers seem to be in big tech urban centers, your study’s result feels natural. Reddit also seems to be left leaning.

So what’s with the vaguely pro-trump memes?

brownhead

I see a lot of vaguely pro trump memes on /r/programmerhumor and I feel like I’m missing something. Are programmers here more likely to be pro-trump?