HNHacker News
TopNewBestAskShowJobs

ralmidani

2,811 karma · joined May 8, 2014

submissionscomments
ralmidani··on It is hard to avoid JavaScript
I’ve settled on htmx not because I’m anti-JS, but to avoid Node/NPM, build steps, duplication of logic, etc. For me, it’s the ecosystem that’s problematic, not the language itself.

Also, “just learn JS” is a lazy and off-the-mark response to complaints about having to use JS. Do I prefer Python? Yes. However, I’ve pretty extensively learned and used JS, and I teach a full-stack JS bootcamp. I still think insisting that everyone has to write lots of JS __just_because__ it’s the language that got integrated into browsers is a bit tyrannical.

ralmidani··on Utility classes aren't the same as inline styles (2021)
I actually want learn to build every one of the non-CRUD programs you mentioned (I actually enrolled in a Compilers course once but had to drop out last-minute). I don’t __want__ to spend the rest of my life building CRUD apps exclusively, they’re just my forte, and bread and butter, in the present.

With that said, some things that seem boring to you may be interesting to others. And I don’t see how tech stack is relevant; if building CRUD-ish apps, I want the best possible DX. Of course, if/when I venture out of my comfort zone I will need to learn a new stack, but React and Vue become even less relevant for me at that point.

ralmidani··on Utility classes aren't the same as inline styles (2021)
That’s even worse; now you need to introduce a specialized, non-standard tool into your development and deployment cycles.
ralmidani··on Utility classes aren't the same as inline styles (2021)
I’m working on a B2B app. Things get more interesting when you need background tasks, notifications, interaction with 3rd-party APIs, etc. Successful CRUD apps usually become more than “just” CRUD apps.

Also, using libraries like htmx is actually more suitable for the type of work you’re describing than modern SPA frameworks with all the bloat they bring along. Non-SPA libraries play well with other libraries, rather than take over the entire rendering process.

I’m old enough to remember how things were before SPAs; with libraries like jQuery the Web loaded much faster and was actually more interactive than it is with the currently dominant paradigm.

ralmidani··on Utility classes aren't the same as inline styles (2021)
Utility classes which require a build step add complexity and bloat to an already complex and bloated ecosystem. Personally, I am using Bootstrap (without Sass), but even if I wasn’t, I would rather write inline styles or a custom style.css file than have to deal with build systems and, in general, Node/NPM churn and dependency hell.

Full disclosure: I am biased toward Django, htmx, and Bootstrap, and avoiding the use of build steps completely. The DX has been amazing.

ralmidani··on BT Tower is to be turned into a hotel
Glad to see there’s still some common sense on that side of the pond. Meanwhile, in Dearborn, Michigan they decided to tear down a 670,000 Sq. Ft. office building which was previously used by Ford.

https://www.detroitnews.com/story/business/2023/11/16/former...

Just like that. American-style Capitalism is nauseatingly profligate and wasteful.

ralmidani··on The epidemic of fraudulent DMCA takedowns
This epidemic will continue to spread unless the burden of proof is placed on the party filing the complaint, along with having penalties imposed for filing bogus complaints.
ralmidani··on US Employers Brace for 16M Super Bowl Sick Days
If the point of having Election Day off is to give folks time to vote, poll workers are already, well, at the polls. Naturally, they will be able to vote.
ralmidani··on Australian senate passes Right To Disconnect law
Your words are racist. Why are you entitled to quality of life and enjoyment of “how things once were”, but people trying to help their families escape from poverty in “3rd world” countries should be shunned and doomed to cyclical poverty in countries which, by and large, were devastated by the actions of “1st world” countries?

And if you are not an indigenous Australian, why were your ancestors worthy of migration to Australia, but the immigrants of today should be considered destructive of your culture?

ralmidani··on Show HN: Reusable components with Django and HTMX
This looks really nice, thank you! I’m actually building a Django and htmx app right now and will definitely be using some of these code samples.

As a side note, I really wish the use of strings as Django templates was more common and had better support in IDEs.

ralmidani··on Religious 'Nones' are now the largest single group in the U.S.
Lots of anti-religious sentiment being echoed here.

Marx said the right thing for the wrong reason when he described religion as “the opium of the people/masses”. I definitely believe that religion can be effectively misused to pacify people who are suffering injustice. I would imagine in all major religions there are “clergy” (I hate both the word and the concept it represents) who tell people “it’s OK if you’re oppressed and poor while bad people literally get away with murder, everything will be righted in the next life”. Or, even worse, they use religion to whip people up into a frenzy and justify religious wars and genocide. All while amassing wealth and influence for themselves.

However, as a practicing, fairly conservative Muslim, I know first-hand there are many religious scholars who live very modest, even impoverished lives while being a force for good and fighting against all forms of injustice. In fact, I would say the majority of dedicated scholars are not wealthy and not OK with injustice.

The problem isn’t organized religion, it’s that we live in a time, perhaps unprecedented in history, when the world is generally rotten. The existence of charlatans and hypocrites is a reflection of that reality, and the ones who ally themselves with dictators and corrupt politicians are the loudest and most visible.

Let’s not throw the baby out with the bath water.

ralmidani··on Ask HN: What web development stack do you prefer in 2024?
I doubt many advocates for htmx (or Hotwire) believe React is being abandoned right now. However, they do represent a serious challenge, because they’re not just marginally faster or more ergonomic like, say, Preact or Svelte - they represent a complete paradigm shift from how we’ve been building Web apps for the past ~decade. Being able to have over 80% of the interactivity you can get with React while expending perhaps 20% of the effort (no build step, no client-side data modeling and routing, no client-side state, easier for server-side oriented devs, use a language you’re already proficient in, reduced cognitive load, etc.) is huge.

Many pioneering technologies are initially met with skepticism. A decade or so ago, jQuery was the clearly dominant client-side library. Very early adopters of React and its siblings were swimming against the tide, but eventually they made jQuery much less relevant.

I’m not saying htmx will definitely become what React is today, but the belief that a dominant technology or paradigm is safe from disruption has been repeatedly proven wrong.

ralmidani··on Ask HN: What web development stack do you prefer in 2024?
If you use the same Node version and NPM dependencies it could work, but trying to get the project upgraded to use a modern version of Node and mitigate vulnerabilities was a nightmare and I just abandoned the effort.

I get emails from Github with long lists of vulnerabilities on old toy projects where literally __zero__ dependencies are listed in package.json. It’s not so much the vulnerabilities that bother me, but the dependency conflicts, and in general a massive amount of infrastructure I have to buy into without even knowing it.

ralmidani··on Ask HN: What web development stack do you prefer in 2024?
I’m building out my server-side with Django while reading up on htmx. I haven’t started with actual UI interactions, but htmx is what I plan to use.

For more context, I’m essentially revisiting an app I built from 2015-2017, before I became employed in the industry. I built it with Django and Ember. Long story short, Django upgrades nicely, while anything requiring Node that was built that long ago is “lost in time, like tears in rain…”

Yes, I’m resentful. And yes, I hope I never have to touch Node/NPM again.

Some other great options are Elixir/Phoenix/LiveView (I used it at my most recent job, and loved it) and Ruby/Rails/Hotwire. Hotwire is not coupled tightly with Rails, but using it with Rails would be the path of least resistance.

Personally, I went back to Django for reasons including:

- Data modeling and migrations with Django’s ORM are top-notch.

- Auth and admin which come out of the box are key for getting to an MVP quickly.

- I find Django’s template language more intuitive and more elegant than erb and EEx/HEEx.

- Python is still king in the data world, so it’s easy to integrate with mature DS/ML/AI libraries.

- If I need to find talent, Python devs are everywhere.

ralmidani··on Remote work doesn't seem to affect productivity, Fed study finds
Aside from being compensated directly for daily commutes (on which we could reasonably disagree), there’s also an issue around liability: if someone crashes going to work and the other side wants to sue, should the company be liable, the employee, or both? Being “on-the-clock” makes it more likely the company would bear responsibility, as opposed to being “off-the clock”. Company cars seem to be less common now than they were even 10 years ago. A personal injury lawsuit could easily bankrupt a household, but is much less likely to bankrupt a mid-sized or large company.
ralmidani··on Remote work doesn't seem to affect productivity, Fed study finds
It makes perfect sense to you, and me, but unfortunately, in America at least, the upper hand is very much with employers. I could be semi-OK with non-reimbursement for salaried workers if daily travel was factored in, but for those on hourly wages it’s immoral to have commuting expenses (time __and__ money) eat significantly into wages.

We actually deal with this nonsense in our household; my wife is hourly and between the commute, parking, and walking to/from her workplace she loses about 20-25% compared to the time she actually gets paid for. We also spend a lot on gas, and have been putting ridiculous miles on her daily driver. Not to mention physical fatigue and emotional stress; she talks about quitting at least once a week. All for a mediocre wage (I would have said it’s garbage if she was our sole earner - my compensation is about double hers and I WFH).

Edit: also, I remember company cars being a thing not too long ago. I don’t hear about them as much as I used to.

ralmidani··on Remote work doesn't seem to affect productivity, Fed study finds
This kind of nuance is also brought up in sister comments, but you probably explained it best. With the caveat that C-suite mandates should not be the only determinant; let teams have some degree of autonomy and self-organization, and be able to advocate for what works best for them.

It’s unfortunate that there’s now very little nuance in American discourse especially, whether that’s in business, politics, economics, or society. Everything is an ideological “cause” worth fighting for, with an inverted bell curve showing lots of people at the extremes, and precious few in the middle.

It doesn’t bode well. I fear America is devolving toward a 1980s Lebanon-style civil war, with everyone fighting against everyone at least at one point or another. The military could step in, but then we’d essentially have martial law which isn’t much better. It may seem silly to bring this up in a thread about remote work, but it’s really a microcosm for how polarized we’ve become.

ralmidani··on Remote work % in industry not correlated with excess productivity growth
I get it, I am neurodivergent myself. But I don’t think you need to have a certain disability or neurodivergence to be protected from predatory employers or potential employers. Of course, being in the US I also understand your realism.

One of the reasons I decided to return to entrepreneurship is to be able to have a flexible schedule, maybe not work at all on days when I just don’t feel like it, and generally avoid work-worshiping (great terminology!)

To your larger point, I learned recently that the Family Medical Leave Act does not apply to grandchildren under your care, even if the parents are dead or for whaterver reason cannot be caregivers. Like, how awful is that?

ralmidani··on Remote work % in industry not correlated with excess productivity growth
Yeah, they passed that already in the Netherlands.

I think the Netherlands doesn’t stipulates a disability. And honestly, there are reasons other than disabilities and neurodivergence; some people are caregivers, or have young kids, or have a nice home office setup (which a lot of the same companies “flexing” as you put it will never match in the office), or they just don’t want to waste money and time commuting.

I believe if the job can be done remotely, it should be a worker’s right. No hassle, no questions asked, and no retaliation or discrimination.

However, I’m not sure where you’re located, but I’m not holding my breath for meaningful workers’ rights legislation in the US any time soon.

ralmidani··on Remote work % in industry not correlated with excess productivity growth
So if it has no measurable effect, and some workers need/want to work remotely for whatever reason, why do some orgs not want to give them that option, especially for desk work in software, insurance, law, etc. that require little to no face-to-face interaction?

Could it be that it’s not about productivity or even “culture”, but actually all about control and/or trying to justify the org’s sunk costs in office space purchases/leases?

For the record, I would prefer a hybrid arrangement if I could have one that didn’t require a long commute (more than 15-20 minutes). But what works for me might not work for everyone else in the org.

ralmidani··on US developers can offer non-app store purchasing, Apple still collect commission
Same… Apple software has, for a while, been going steadily from “just garbage” to “dumpster fire floating through a river of sewage”.
ralmidani··on US developers can offer non-app store purchasing, Apple still collect commission
It’s called “nuance”. Also, Stockholm Syndrome is the opposite of what you’re objecting to; someone is taken hostage and sympathizes with the hostage takers.
ralmidani··on US developers can offer non-app store purchasing, Apple still collect commission
> And FWIW, I'm an Apple fan and find Tim S a completely unsympathetic character. But seeing the hilariously absurd lengths that people will go to justify Apple's outrageous greed grows old.

Heh, there are still folks who actually grasp nuance… I have an iPhone, despise Apple in general, but consider their business disputes on a case-by-case basis. So for example, Apple is right to ignore Facebook’s plea to be allowed to track users, and simultaneously wrong in its App Store monopolistic money-grabbing.

ralmidani··on US developers can offer non-app store purchasing, Apple still collect commission
One difference: physical goods suppliers can theoretically choose to sell and deliver direct any of their goods to any consumer willing to pay for them. With the app store, at least in the US, the captive audience can’t side-load, and now Apple is introducing even more absurdity with its bad faith “revision” to the policy.
ralmidani··on Ask HN: Batteries-included Framework for MVP in 2024
Python/Django and Elixir/Phoenix are both excellent. Which of these 2 is preferable should be, IMO, dependent on where you are in the development process.

Personally, if I was joining a team with a mature codebase, a decent auth system already built, and UI for for of the relevant models, I would prefer Elixir/Phoenix because I like and believe in pragmatic Functional Programming and the potential for concurrency and scalability built into the BEAM runtime. Phoenix LiveView really is amazing.

In your case, though, you’re talking about building an MVP, and Django’s model, auth, and admin layers are top-notch and integrate effortlessly. Outside of core Django, there’s an ecosystem of third-party packages for virtually everything you might possibly need.

Whichever route you go, for an MVP I highly recommend skipping the JSON API coupled with an SPA (React, Vue, etc.) approach. Use Phoenix with LiveView or Django with either htmx (preferred, see it over at https://htmx.org) or Hotwire (https://hotwired.dev).

ralmidani··on Cloudflare employee posts layoff call with HR and goes viral [video]
Exactly, an extreme begets the opposite extreme.
ralmidani··on Cloudflare employee posts layoff call with HR and goes viral [video]
“I can’t say anything to change the way you’re feeling” doesn’t sound like empathy to me.
ralmidani··on Cloudflare employee posts layoff call with HR and goes viral [video]
I resent the judgmental attitude being expressed in some of the top comments. In the US at least, we’ve been socialized into believing workers need to “watch their manners” while corporations can get away with murder.

Here, a worker is clearly being wronged and some random HR goons want the whole thing to proceed as a normal, matter-of-fact 15-minute meeting. They’re going to email severance and equipment return info anyway. Take advantage of these opportunities to make them miserably uncomfortable. In Britt’s case, they never even knew her, so it’s not like she’s going to reach out to them for a recommendation.

ralmidani··on Is htmx Just Another JavaScript Framework?
There is a spectre haunting SPA frameworks…

It’s a shame htmx wasn’t invented 10 years ago, but it makes sense that it’s bursting onto the scene now as a reaction to end-stage SPA mania.

If htmx-like functionality gets rolled into browsers with native optimizations (i.e. faster than the Virtual DOMs and custom JS runtimes of SPA frameworks, not to mention the no-build-step benefits we’re already seeing with htmx), then it hopefully won’t be just htmx that will get rendered obsolete; Angular, Ember, React, Svelte, Vue, etc. need to go even more urgently.

Pardon my enthusiasm, I really am looking forward to an HTML Renaissance.

ralmidani··on Ask HN: Anyone Using Django with Tailwind?
I have experience with Django, and experience using Tailwind, but not Django and Tailwind together.

In my opinion, if you like Django’s “batteries included” approach, you won’t enjoy using Tailwind. Bootstrap, while not trendy, comes with much more functionality out of the box.

← PreviousPage 2 of 22Next →