For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | talentedcoin's favoritesregister

I am still not over the collapse of Gatsby (for reference i nearly joined the company in 2017, was saved only by my own character flaws).

They rode the highs - being the default docs tool for React, and building a massive ecosystem of integrations you could install out of the box. But too many abstractions, divided goals between cloud and OSS, and the better stewardship/design of Nextjs brought it down.

There were the simple lessons (https://swyx.io/a-world-without-plugins-cig). its easy to say in hindsight that graphql was too much for gatsby. i also believe the company went too hard for number of integrations over quality of them, an issue I had even in my interview. this was a poorer expression of the better insight that seb markbage had; just have a small api surface area bro (https://www.youtube.com/watch?v=4anAwXYqLG8)

But the bigger lesson is bitterer. Frontend tooling isnt worth that much. the fact that vercel is pretty much the only successful frontend startup of its generation makes it an exception to the rule (there are plenty of smaller companies that are thriving, like tailwind, but it is not a venture scale startup and thats fine). People dont pay for frontend tooling. they expect it to be free, expect it to do everything, get into internicine squabbles between frameworks when they are all basically doomed compared to just betting on React sponsored by Facebook and now Vercel (and a little bit of Shopify), or going back to fullstack frameworks like Django/Rails/Laravel. all frontend tooling, nextjs included, is just leadgen, loss leaders, while investors/salespeople patiently wait until you "grow up" by... building cloud backend/ci/cd services.

5 years ago i wrote about the "frontend ceiling" for individual developer careers (https://x.com/swyx/status/1682748872047886337) - i fear this is the "frontend ceiling" for companies.

I deeply admire Astro and hope they figure out a way to break the ceiling. Their recent cloud products have been encouraging.


Another option is to use a VPS + nginx + a wireguard VPN.

Your home web server can establish a VPN connection to the public IP of your VPS, meaning you still don't need to worry about dynamic addresses changing or opening ports on your router. This is essentially what a Cloudflare tunnel is.

Granted a VPS isn't usually free. But some places like Oracle Cloud do offer free-tier compute, as well as fly.io.


Back when I was just getting started, we were doing a lot of WordPress stuff. A client contacted us, "oh yeah, later today we're probably going to have 1000x the traffic because of a popular promotion". I had no idea what to do so I thought, I'll just set the varnish cache to 1 second, that way WordPress will only get a maximum of 60 requests per second. It worked pretty much flawlessly, and taught me a lot about the importance of request coalescing and how caches work.

The real problem with any SSG is where to host and edit Markdown files and images for flexible spur of the moment content creation. I've built my own Wordpress-export-to-static solution to use the native iOS App as a workaround but it feels somewhat clunky — Same with having to run a headless CMS for this in the background; Surprisingly with all the gazillion of MD editors, no one has ever built one with live editing files in, say, S3 + allowing to upload assets. And no, I don't consider content composition in a terminal window to be an inspiring environment because I'm a sucker for aesthetic apps.

Addendum: Mobile is just an added bonus. Best solution for me would be iA Writer as an editor, native image upload to a bucket like S3 and Apple allowing me to tap into these iCloud hosted .md files via an API. Then use a simple script to put the pieces together and move the stuff to Netlify or wherever.


I have worked on lots of software that involves event-driven actions, and apply this concept throughout.

"Need to send a notification email when x condition becomes true". Naive way: during processing, check the condition and call the SendEmail() function. Idempotent way: Run a query that finds all x conditions, join to a list of notifications based on email+id+time, and only if there's no entry, send the notification and save it to the list.

"Send a report at midnight". Naive way: have a cron entry that runs at midnight or run a loop that checks the time, and if midnight, sends the report. Idempotent way: cross-check against a list of reports that should have been sent, and if missing, send it. Run this check every few minutes.

The nice thing about this is it doesn't stop you from also doing the event-based stuff (for "real-time" notifications, for example), so long as it's the secondary approach from design point of view. Ironically when everything is working fine, the event-driven stuff will actually be doing all the work -- but as soon as there's a failure (like, the system happens to reboot at 23:59) you'll be grateful to build this way.

I could write paragraphs about the nuance, different approaches, failure modes and the trade-offs with all this -- suffice to say treating events as optional in event-based systems has served me well.


The Depository Trust & Clearing Corporation settles most listed securities transactions in America; in 2011, it did $1.7 quadrillion [1]. You've never heard of it unless you're a professional trader, but it's actually quite fascinating to read up on.

Trading looks instantaneous. But settlement takes a few days. In between are a series of credit agreements. From your broker to you. From the clearinghouse to the brokers. DTCC is the clearinghouse. Robinhood is the broker.

There are rules and contracts between DTCC and its members, including Robinhood [2]. Those contracts ensure that when you buy shares through your broker from a Robinhood customer, if Robinhood falls down two days later, there is collateral sufficient to make you whole. Those collateral requirements change in reference to, amongst other things, the volatility of the security. (If a broker falls down, the clearinghouse liquidates their collateral and makes their counterparty whole. More volatility means more chance the collateral will be insufficient.)

In this case, collateral requirements on GME went up. Because of its volatility. So while before Robinhood had to pony up collateral for a few shares of GME for every hundred it traded, it now had to, at close of business, pony up one hundred shares' worth of collateral for every hundred it traded. That creates a cash crunch. One that exacerbates itself with every additional trade in the security. If Robinhood fails to satisfy those collateral calls, they go out of business overnight. Into receivership. Done.

Most brokers have policies for these situations. Higher brokerage fees for securities on a schedule. Not making shares and cash from trades available until the trade settles, sort of like what banks do for large cheques. But I don't know if Robinhood is able to do that quickly. So instead they pulled the plug.

[1] https://en.wikipedia.org/wiki/Depository_Trust_%26_Clearing_...

[2] https://www.dtcclearning.com/products-and-services/settlemen...


Completely agree. I was absolutely blown away at how much I loved this book. I sat down to read it and ending up losing 4 hours to it!

The book inspired me to build a little course on Awk to (hopefully) share the love: https://github.com/FreedomBen/awk-hack-the-planet.

I gave that course as a talk at Linux Fest Northwest in 2019 and then again in 2020 due to popularity. When Covid hit I recorded videos and put them on Youtube. There are links in the Github page above if you want to watch them.

I wasn't intending to self plug, but I guess it does feel relevant :-)


Web developer's love of programming is what wins them (potentially) fantastic salaries in regular work; it's also what cripples their attempts to diversify their income.

Time and time again, I see programmer friends investing 6+ months of their time getting an "MVP" out the door. Instead they should be applying their problem-solving skills to figuring out how to test their market hypothesis an order of magnitude more quickly. For my business, that meant a plain HTML website — no JS, no backend — and a PayPal button. (If you care to hear the full story, I have a video and transcript here: https://www.semicolonandsons.com/episode/MVP-&-Origin-Story)


It’s kinda funny to see that go around in circles. “Pre-rendering content as requests come in” is exactly the same as having dynamic pages and a layer of caching, as had been standard practice for the last 20 years. Some people just really like to “solve” already solved problems.

Frequently employers are so casual about references they either a) don't check them, or b) only check the ones the prospective candidate gives them.

See, that's a problem. That stands out more than any of the good things that he might say. People talk and things come out and shit happens, but deliberately going behind someone's back for back-channel references is just plain unprofessional, if not unethical. This is the kind of behavior that has the rest of the country (in which ethical standards aren't seen as old-fart ideals to be "disrupted" but are actually considered important) thinking that we, in tech, are a bunch of immature psychopaths.

The back-channel reference check is an unprofessional show of power-- like waving a gun around at work-- because it takes social access to get any information out of it (people don't just offer candid opinions up to complete strangers). What's communicated by the back-channel reference check is "your colleagues are more loyal to me than to you". There's a fucking reason why people outside of tech consider it unprofessional and borderline unethical.


>How do people that don't have PhDs bridge the gap in their knowledge from what's commonly taught/used (OOP and it's design patterns) to thinking in terms of monads/monoids/functors/etc. ?

I can just speak for myself. Started programming via vocational training (apprenticeship for the title 'computer science expert' in germany) about 4 years ago.

Learned programming with python, which I loved for the productivity it gave me, the whole superpower yadiya. Was assigned some webrelated tasks, so I got in touch with javascript.

My style in these languages was actually 'functional' without me knowing about functional programming - but only to some extent. Mutability, nonstatic typing etc.

So, wanting to become a better programmer, I googled things like "advanced python", which yielded things like decorators, generators and metaclasses. In some video about map, filter and reduce something in me clicked - I didn't want to hide attributes and state in classes and objects anymore. It's not modular, it's not atomic, it's not beautiful.

I came across Rich Hickeys talks [1] and immediately saw that I'm ...home. The paradigms just click with me, I can't imagine falling back to impurity and oop (unless it can't be avoided for whatever reasons). (I still don't write clojure though, for now I'm still enjoying playing around in python and haskell where I can (you may substitute python with js))

And, honestly - if you have the curiosity to learn Haskell, do you really need a phd? I've taught myself bits of maths in the last four years (higher mathematics - number theory (not tech related, just curiosity), graph theory, category theory etc), just driven by curiosity. That being said: If you'd ask me about these topics on the street, I wouldn't claim to be a mathematician, far from it. I just satisfied my curiosity.

I want to understand. Not some math or haskell in specific, but life, logic, control flow, systems theory... Having this urge, diving deeper into mathematical concepts once you need them doesn't feel like a burden. I don't even have my A-levels, so I'm probably as far from a phd as you'll find on HN, but that wouldn't stop me from exploring, from learning, from progress.

Sorry if that was too personal and too much text, I just felt like I'm in the rare position to be able to answer something in depth on HN :-)

[1] https://github.com/tallesl/Rich-Hickey-fanclub#talks

Some more links that I used:

Functor, aplicative, and monad:

https://typeslogicscats.gitlab.io/posts/functor-applicative-...

Category theory for programmers:

https://www.youtube.com/watch?v=I8LbkfSSR58&list=PLbgaMIhjbm...


After seven years of not working with Emacs, a few weeks ago I gave it a try. I was negative, biased and convinced that it would just be a distraction, a time waster. But the more I dived into it, I realized that the Emacs that I worked with in 2010-2013 was not the same anymore. Packages like `dash.el' or `s.el' make programming in Elisp fun! Then there are beautiful themes like `spacemacs'. Also packages for managing notes and files (`Deft' for instance).

Within a few days I migrated all my note-taking and task-managfement-systems to Emacs. Previously I was using Evernote, Bear app, Ulysses app for note taking and TaskPaper + OmniFocus for project management.

Emacs + Org-Mode replaced all those apps and many more. And it makes me `dance' with my data by using Elisp to transform all my data into ways I need and want.

I realized that I didn't use Emacs to its full potential in 2013 because I was reluctant to dive into (E)Lisp. This time I made a full dive into it. And I am absolutely loving it. I had some contanct with Scheme some twenty years ago, and that influenced me very much. But CL and Elisp offer much more.

Emacs does not need to be an IDE, but it can be a decent one. (Yes, I know and use intelliJ: PyCharm and PHPStorm). It can be used for everything text: Note taking, programming, transforming text. But via org-mode for much more than text: Project- and task-management, ascii-tables, note-management system. I even initiate my Google searches from within Emacs and keep a track of my searches via org-capture.

Thank you for all the maintainers!

--

Edit:

- I am a user of a Mac with a US keyboard. Using an app named "Karabiner Elements" to remap my keys. I have my caps and enter key behave like a Control key whenever I hit them in combo with other keys. That way I have two control keys in reach of both my pinkies.

- r/emacs and r/orgmode are super helpful communities

- learn to program in Lisp and have a look at Lisp macros. That's a very useful concept to write DSLs to transform code very easily. - scratch buffer is your friend in learning elisp. Place the cursor after the last colon of your code and hit `C-x C-e`, that will evaluate that line.

- Learn about debugging your Elisp code. Edebug (`edebug-defun`) is your friend. See http://blog.binchen.org/posts/my-work-flow-to-debug-emacs-pl...

- Be patient. Once you have mastered the basics, you'll fly!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search:

HN For You