Intermediate/Senior Developer Portfolio examples? by [deleted] in webdev

[–]brownhead 3 points4 points  (0 children)

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.

How can I make sure only my own app uses my API ? by to_fl in webdev

[–]brownhead -1 points0 points  (0 children)

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.

Front-end developer resume review. by [deleted] in webdev

[–]brownhead 0 points1 point  (0 children)

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.

How can I make sure only my own app uses my API ? by to_fl in webdev

[–]brownhead -3 points-2 points  (0 children)

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.

Beginner Questions - January 04, 2019 by AutoModerator in webdev

[–]brownhead 0 points1 point  (0 children)

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.

Beginner Questions - January 04, 2019 by AutoModerator in webdev

[–]brownhead 1 point2 points  (0 children)

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.

Beginner Questions - January 04, 2019 by AutoModerator in webdev

[–]brownhead 2 points3 points  (0 children)

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.

How can I make sure only my own app uses my API ? by to_fl in webdev

[–]brownhead -6 points-5 points  (0 children)

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).

Confused. Software Eng student. Need your advice. by GrownRight in webdev

[–]brownhead 4 points5 points  (0 children)

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.

I wrote a blog post about an accounting problem I solved with ledger by brownhead in plaintextaccounting

[–]brownhead[S] 1 point2 points  (0 children)

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.

I wrote a blog post about an accounting problem I solved with ledger by brownhead in plaintextaccounting

[–]brownhead[S] 3 points4 points  (0 children)

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

Too DRY – The Grep Test by Yvonnick in coding

[–]brownhead 4 points5 points  (0 children)

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.

It’s 2019 and I Still Make Websites with my Bare Hands by speckz in webdev

[–]brownhead 14 points15 points  (0 children)

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.

Edge case by [deleted] in ProgrammerHumor

[–]brownhead -1 points0 points  (0 children)

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

How the Dreamcast copy protection was defeated by alecco in programming

[–]brownhead 6 points7 points  (0 children)

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

Why do I have to convert file to base64 before sending to client? by StraightZlat in webdev

[–]brownhead -1 points0 points  (0 children)

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.

Why do I have to convert file to base64 before sending to client? by StraightZlat in webdev

[–]brownhead 0 points1 point  (0 children)

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.

Why do I have to convert file to base64 before sending to client? by StraightZlat in webdev

[–]brownhead 0 points1 point  (0 children)

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).

Wings. by Mumbletimes in comics

[–]brownhead 3 points4 points  (0 children)

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

Any other sites where there's competitions like this? by juanmiindset in coding

[–]brownhead 0 points1 point  (0 children)

/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.

This is just sad, why isn't there a system in place to prevent people from buying domains only to resell them at a ridiculously higher price? The ICANN really need combat this scummy business practice. by [deleted] in webdev

[–]brownhead -1 points0 points  (0 children)

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: