Hacker Newsnew | past | comments | ask | show | jobs | submit | more mistersys's commentslogin

It really feels like internet infrastructure has been growing more unstable. More outages, feels like way more bugs happening on my apple products as well.

I believe this is the result of the same thing that causes all the chaos in all human fields, lack of consciousness. We live in a very distracted time, COVID is still one more stressor on top of all the other things we have to manage in the world we've built to be inhospitable to mental health.

There's a shift happening in certain areas, but I think the old guard of tech is due for a revolution of some kind. My two cents, to start we need to stop building things with such low-level tools.


> My two cents, to start we need to stop building things with such low-level tools.

Interesting -- my take is more that we should throw away the ever growing pile of high level tools and architecture and cruft and start all over again at the low level (I think accumulated complexity -- and accumulated expectations due to complexity -- cause a lot of issues). Heck maybe start by writing an OS and some useful applications that run on a $1 microcontroller that you can hand-solder on a cheap two-layer PCB. 256kB of SRAM and four megabytes of flash ought to be enough for quite a lot..

That said I don't necessarily mean we should abandon all progress e.g. in programming languages and revert to assembly and C'89.


I think the point here is that we've worked ourselves into a corner with web technologies. The web is very reliant on GPU rendering, but when building an app with DOM + CSS, you don't have direct access to all that power. You have to be very careful to construct your application in such a way that it can be efficiently rendered, and actually use that GPU power.

Basically, they're getting rid of the middleman: the web. Think about most modern web frameworks (React, Angular, etc.), they're basically immediate mode GUI frameworks, but we do "virtual diffing" in order to translate our immediate-mode-like code into DOM (a retained mode UI framework), then the web renderers the DOM via immediate-mode-like patterns again. Pretty strange if you think about it.

Our stacks of technology are getting in the way of creating good software. So yeah, it's on old idea, but in light of the state of the art in IDEs and Text Editors today, this is an interesting approach.

Note, this is a problem in the first place because of how good the web is. The web has so much tooling, cross-platform support, and documentation / learning resources that it's being overused in places where it's very inefficient, simply due to momentum and mindshare. When you have a hammer...

Now, one of the biggest reasons for the success of the web is cross-platform support, but it's not just cross-platform support. It's the only write once run anywhere platform, truly. Most other cross-platform frameworks require you to think about the native environment at some point, but it's very rare on the web because of the robust standard library including Media access, Networking and even more rarely used APIs like WebMIDI. Not to mention that web design culture allows you to ignore the ui patterns of the native OS you're targeting, allowing more cross-platform savings.

If we can somehow manage to throw away the DOM + CSS (except, perhaps, for decoration) and replace them with immediate mode frameworks, combine that with WebAPIs for interfacing with hardware, and decouple those from JS (maybe via WebAssembly), then we have a competitor to the web for complex cross-platform software that is actually interesting. Perhaps Zed and their Rust-based GUI framework could help push us in that direction.

Edit:

Another aside, the performance of immediate mode GUI. You could argue that retained mode UI can be made to have better performance than immediate mode, but I think the right combination of caching and framework-level optimizations to allow for partial updates are the solution.

You might say "that's not immediate mode though?", and sure, but what we care about here is fast applications that are easy to build. We've discovered that writing code via declarative patterns has huge benefits over "object-soup", so our goal should be to make those patterns as fast as possible. I think the DOM and retained-mode GUI is a just a result of the Java style of Object Oriented obsession.


The JS Ecosystem + The AWS / Serverless ecosystem is a love story of the likes of Harley Quinn and the Joker.

This week I picked up a gig working on a website for a non-profit organization, the needed some basic changes to a few forms. The reason they had to hire me, a web app developer, the site was built by some agency with Next.js / Jam Stack technologies, Contenful, AWS Lambda, AWS Amplify etc.

This simple website, is one of the most complicated monstrosities I've ever worked with. Every page downloads multiple megabytes of JSON from the Contentful API just to render dead simple pages with text and images. Every time there's a change in contenful, a new build in AWS Amplify is triggered to generate the site to static content... only the React code is so complicated with so many round-trip, nested server requests (n+1+1+1 etc) that the builds fail constantly because the API server (on lambda of course) which serves the Contentful content basically gets DOSed. I had to write logic to retry all app API requests just to get the builds to consistently work so I could work on the website. The code that transforms these megabytes of JSON into webpages must have been written by a mad man.

Also screw AWS for not building proper tools to debug AWS Lambda. Not having to manage servers sounds awesome, so everyone has started using lambda, but the developer experience of having to wait 10 - 15 minutes just to add a console.log line is like pulling out your own finger nails and then scraping them on a chalkboard. Then AWS built the most noisy, difficult to use and hard to navigate log management solution on the planet (CloudWatch), and started sipping their beers.

You can avoid these technologies all you want, but one day you're going to have to work with a project that choose to use them, and you can't control that. I believe library authors and service providers have a responsibility to think about developer experience that's being ignored. Or perhaps, since developers don't always have a choice in the technologies they use, building easy to use developer tools isn't worth it.


It isn't just JS apps that are like this though. I had to redo a site for a client a few years ago that was done in some horrific php CMS that had a whole site management architecture applied overtop of it. It was a nightmare to even change a page.


This isn't really business logic... unless you're in the business of simply converting data formats.

As a data fetching approach and especially as tooling primitive to eliminate the n+1 ORM problem this is a terrific tool to be aware of.


Okay, yeah we can serve UI over the wire. It's possible to make it work. But the experience will never be the same as a a native application that's designed to handle offline functionality, interactivity and optimistic updates.

The Hey email client is great example, hotwired.dev was built for Hey.

Guess what? It kind of sucks. It's buggy and slow. Randomly it stops working. When the internet goes down, random things work, random things don't work. If it weren't for Hey's unique features like the screener, I would much rather use a native app.

There's a ton we can do to make the the developer experience of rendering on the client side better, but there's only so much we can do to make the user experience of serving UI over the wire better. When the wire breaks or slows down, the UI renderer stops working.

We built an internal tool for our team we call "restless", and it lets us write server side code in our project, and import it from the client side like a normal functional call, with full typescript inference on both ends. It's a dream. No thinking about JSON, just return your data from the function and use the fully typed result in your code.

We combine that with some tools using React.Suspense for data loading and our code looks like classic synchronous PHP rendering on the server, but we're rendering on the client so we can build much more interactive UIs by default. We don't need to worry about designing APIs, GraphQL, etc.

Of course, we still need to make sure that the data we return to the client is safe, so we can't use the active record approach of fetching all data for a row and sending that to the client. We built a SQL client that generates queries like the ones in the OP for us. As a result, our endpoints are shockingly snappy because we don't need to make round trip requests to the db server (solving the n+1 ORM problem)

We write some code like:

    select(
      Project,
      "id",
      "name",
      "expectedCompletion",
      "client",
      "status"
    )
      .with((project) => {
        return {
          client: subselect(project.client, "id", "name"),
          teamAssignments: select(ProjectAssignment)
            .with((assignment) => {
              return {
                user: subselect(assignment.user, "id", "firstName", "lastName"),
              };
            })
            .where({
              project: project.id,
            }),
        };
      })
      .where({
        id: anyOf(params.ids),
      })
And our tool takes this code and generates a single query to fetch exactly the data we need in one shot. These queries are easy to write because it's all fully typed as well.


Sounds awesome. To anyone interested in that approach, the closest open-source stack would be:

  - PostgreSQL
  - PostGraphile
  - Restrict prod to only allow persisted queries
  - Generate TS types using apollo-cli or graphql-code-generator


BlitzJS does something like this as well


Okay Cascading Style Sheets :)


Wonder if the site used HyperText Markup Language too


It's weird, the only reason I can't use Apple Music is because it doesn't sync between devices. Apple being the company it is, it's just crazy to me that I can't pickup listening where I left off on my phone once I open my laptop.

Aside: Also there's a ton of bugs, very poor job on the QA side of Apple Music

Spotify has designed this feature amazingly. Sometimes, I wonder why companies don't steal good ideas from each other more often, it seems like Apple has just refused to implement this terrific user experience.


This is because Apple has barely updated the iTunes/Music App codebase and featureset since iCloud came out in 2011.


I never remember where the "recently listened to" section is. Seems like an easy thing to get right.

Still, I prefer Apple Music's album-focused library to Spotify's playlist-focused approach.


Yeah I don't think a cost breakdown on my drop ship products on Etsy would increase sales. We roughly double the price vs. cost of goods, but it's not like we're rolling in dough because at our volume fixed expenses take up a really significant amount of our profit.


What if you amortized your fixed costs (equipment?) over expected life span and included that in the breakdown?


Sure if someone is starting from scratch. We have Microsoft, Android and Linux which are alternative computing platforms, and android + linux are already fully ARM. Apple's chips are still much faster than most Android ARM chips, but Android ARM manufacturers are not starting from zero.


This seems like a reasonable argument, however I must say that buying content from iTunes is usually not cheaper than an Netflix subscription, unless you don't actually watch TV regularly.

With the highest level premium subscription of $17.99 a month you could only watch 4.5 movies a month, or 5 - 6 episodes of a TV show. I don't watch TV regularly, but if an average user watchtime of greater than 2 hours is accurate, as I'm getting from a quick search, that's more like 90 episodes a month.


But how many people actually watch 4.5 new (to them) movies or 5-6 new episodes a month? I suspect that’s pretty rare.


you think that's high? I usually binge at least 2-3 seasons of a new-to-me show a month on netflix, prime, hulu, if I'm really busy -- my wife makes up for the time I miss watching new-to-her shows, or the kids watch new-to-them shows or disney launches a new movie... I mean.. Wandavision, Falcon+Winter Soldier, Mandalorian, New Mighty Ducks are top notch and that's just disney...

Netflix has the Witcher which I still need to watch, just finished two different ones on figure skating Zero Chill (Hockey+Figure skating) and Spinning out. Both really good shows that weren't on my radar. Recently finished Queen's gambit too--also great and not on radar...

Lots of back-burner shows too (waiting for the next season).

7-11pm is usually dinner, tv with family put kids to bed, watch 1-2 shows with wife, then go to bed. Sometimes I watch old movies that are new to me just cause I heard they're good but haven't seen them yet. Grew up in 80's and just recently finished Fast Times at Ridgemont High for example.

120 hours of screen time's easy... weekends are probably a lot more.. maybe 8 hour sessions, definitely enough to watch 1 whole new-to-us series... esp. with lockdowns and covid.


> you think that's high?

I don't really know. I'm sure plenty of people consume a lot of new stuff, but I just had a gut reaction to seeing "4 movies or 6 new TV episodes a month" mentioned as a low bar. To me that's a very busy month! But of course I have no data and no reason to believe myself and my family/friends/peers to be representative.

Families with children are an obvious case that probably pushes up the average. But I also get the impression, based anecdotally on myself and my friends and peers, that there's also plenty of people who routinely find themselves considering whether they should even keep paying. There's definitely a common sentiment like "it seems like I browse around on Netflix for several minutes and see the same couple of dozen things that I've been seeing for months, I swear I remember hearing about some recent must-watch movies and shows, but I sure can't find them right now, and I just end up watching YouTube videos." I personally am definitely way over-subscribed to streaming services, and my YouTube Premium subscription is delivering tons more value than all the others combined.


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

Search: