HNHacker News
TopNewBestAskShowJobs

kugelblitz

495 karma · joined August 1, 2012

submissionscomments
kugelblitz··on The failure of self-checkout technology
By now I'm quite efficient, haha.

Heavy stuff in the beginning, fragile stuff at the back, from large to small (so that I bag the heavy and large stuff in the bottom and then fragile and small I squeeze in carefully).

I recently heard of a tip from people who become anxious at the cashiers: Fruits and veggies at the end, because often they need to weigh it and sometime also input numbers manually, this gives those extra few seconds at the end.

kugelblitz··on Htmx Is Composable?
Oof, 4.5 MB for a decorative image.
kugelblitz··on The failure of self-checkout technology
In Germany you always bag everything yourself and in the discount stores you have 1.4 seconds per item to pack stuff while the cashier is sliding stuff towards an area of maybe 60cm x 100cm (2 feet by 3 feet) where if you bag it too slow you'll hold up the line and people will look at you.
kugelblitz··on Shadcn: Components that you can copy-paste into your apps
I also still use Bootstrap. After adjusting it via the .scss files, it looks custom. Tailwind keeps popping up on my radar, but Bootstrap's utility classes are good enough for now.

I even exchanged the bit of Vue.js functionality with htmx.

And I use a bit of Alpine.js and vanilla JavaScript here and there, but it's very minimal.

kugelblitz··on Is htmx Just Another JavaScript Framework?
Yeah, as a full-stack / backend developer using PHP / Symfony (and Twig), I only occasionally need to update the frontend. But then all these problems keep popping up.

Oh, that's the wrong yarn version. Oh, I thought v3 is the newest? But we still use v1? I used v3 in another project. So I need to install different versions? Ah, then I also need different versions of node? Ah, better to use nvm? Because only later versions have corepack, the experimental but recommended tool?

Or do we change back to npm? And why does an install process change a .lock file?

kugelblitz··on Gmail and Yahoo’s 2024 inbox protections and what they mean for email programs
Yep.

Don't want these marketing emails? Unsubscribe here.

Oh, you need to login in order to do that.

No, that's the wrong password for your account. Forgot password?

Hm, we don't see your account existing. Probably a different email address?

... sigh... sent a couple of emails to the data protection contact listed, but after 5 years, I still get the emails and I occasionally try to login again.

So I just automatically mark it as spam every time.

But probably because they're a small provider and don't have the resources; this is the largest telecommunications provider in Germany.

kugelblitz··on Cold-blooded software
> You're just trading doing stuff in the frontend for doing stuff in the frontend + backend. Might make sense in a lot of cases, while not making sense in other cases.

For me I can now do everything in the backend, I don't need to switch context (Twig templating language vs. JavaScript / SPA / etc). It's now easier to just keep up to date with PHP / Symfony, instead of also updating Node, npm / yarn, node_modules, and keeping up to date with everything.

Otherwise the frontend part is messy and not so great code, since my JS skills are limited and it's too stressful for me to keep up to date with in addition to PHP / Symfony (I had worked with AngularJS 1, Angular 2-8, Vue 2, some React, played around with Svelte, managing stuff via bower, gulp, grunt, Webpack, parcel, npm, yarn 1/2/3, Node 10-18, nvm, corepack; and if I kept up, I probably need to look at bun soon).

kugelblitz··on Cold-blooded software
Laravel was easier to get into but once you strayed from "The Laravel Way", it gets quite messy.

I got into Symfony by "accident", because a freelance colleague put me on projects that used Symfony. So for a couple of years I used Laravel and Symfony in parallel, but after a few years I decided to go full Symfony.

Some of the things that were better for my use case:

Many of the Laravel components are "Laravel only". Whereas in Symfony, you can just pick and choose the components you need - it's very modular and extendible without forcing your hand. You don't even need the Symfony framework and just choose the components you want.

That's how Laravel can depend on Symfony modules; but Symfony can't depend on Laravel modules.

Entities vs. Models (Data Mapper vs. Active Record): The entities in Symfony (equivalent to Models in Laravel) were just simple PHP objects. I can see what properties an entity has, I can configure directly there in a simple way. I can add my own functions, edit the constructor, etc, etc. Also: You create the properties, and the migrations were generated based on that. In Laravel, you create the migrations, and the actual model is based on going through the migration steps. This just feels odd to me.

In Laravel, the Models extend the Eloquent Model class and it feels "heavier" and I had more trouble re-configuring some things. Plus without using an additional "auto-complete" generator, I couldn't just see what the properties / columns of the model / table was.

I also don't like Facades (because they hide too much stuff and I have trouble figuring out the service that it actually represents).

Templating: I also like that Twig is more restrictive, it forces me to think more about separating logic and the view, whereas Blade allows way more things. You don't have to use it, but I reckon since it's allowed, people will do so.

One thing I still envy from Laravel, though, is the testing suite.

This is pretty neat:

    $response = $this->getJson('/users/1');
 
    $response
        ->assertJson(fn (AssertableJson $json) =>
            $json->where('id', 1)
                 ->where('name', 'Victoria Faith')
                 ->where('email', fn (string $email) => str($email)->is('victoria@gmail.com'))
                 ->whereNot('status', 'pending')
                 ->missing('password')
                 ->etc()
        );
I tried integrating it in Symfony, but it was quite messy and somewhat incompatible. That shows the above point, that it's "Laravel only". It's really nice, but not enough for me to advocate for Laravel over Symfony.
kugelblitz··on Cold-blooded software
Yeah, some things are still a mess, but many things I use constantly have improved so much. Here is an excerpt of a function that shows many of the updates that I use regularly:

  #[AsMessageHandler]
  readonly class JobEditedHandler
  {
      public function __construct(
          private Environment $twig,
          private EmailService $mailer,
          private string $vatRate,
      ) {}

      public function __invoke(JobEdited $jobEdited): void
      {
          $this->sendNotificationToJobPublisher($jobEdited);
      }
You have attributes, much better type-hinting, constructor property promotion, read-only properties / classes. Additionally you have native Enums, named arguments and also smaller things such as match expressions (instead of case switch), array spread operator, null coalescing assignment operator, etc, etc.

Especially in a CRUD-heavy setting like mine (I run a niche jobboard) it reduces so much boilerplate and increases type-safety, thus makes it way less error-prone. Combined with new static analyzers (phpstan, php-cs-fixer, psalm - take your pick), you find possible errors way earlier now.

I think it gets a lot of inspiration from Java. Symfony gets lots of inspiration from Spring Boot. The Twig templating language is heavily related to the Django templating language. So many of the tools and concepts are somewhat battle-tested.

And this is on top of the huge performance improvements in the last years.

So yeah, there's many things that are still fixable. But the improvements have been staggering.

kugelblitz··on Cold-blooded software
I've been maintaining my own side project. It started 12-13 years ago, with vanilla php, later rewritten with Laravel, later rewritten again with Symfony in 2017-ish. Since then I've had phases from 6-18 months where I had a total of 2-3 tiny commits (I was working full time as a freelancer, so I didn't have energy to work on my side project). But then when I had time, I would focus on it, add features, upgrade and just experiment and learn.

This was super valuable to me to learn how to maintain projects long-term: Update dependencies, remove stuff you don't need, check for security updates, find chances to simplify (e.g. from Vagrant to Docker... or from Vue + Axios + Webpack + other stuff to Htmx). And what to avoid... for me it was to avoid freshly developed dependencies, microservices, complexified infrastructure such as Kubernetes.

And now I just developed a bunch of features, upgraded to PHP 8.2 and Symfony 7 (released a month ago), integrated some ChatGPT-based features and can hopefully relax for 1-3 years if I wanted to.

In the last 4-5 years the project has made about the same revenue as an average freelance year's revenue, so it's not some dormant unknown side project.

kugelblitz··on Cold-blooded software
It's one small dependency. Worst case, you write the library yourself.

You send a request to the backend, it then sends you HTML back (all rendered in the backend using a templating language such as Django templating engine, Twig or Liquid), you insert it into a div or so.

Htmx was Intercooler, worst case you create your own. But no additional scripts needed.

I've been able to kick out Vue out because Htmx covers my use case.

kugelblitz··on Ask HN: Cool Useful GitHub Repos?
It's gone, what was it?
kugelblitz··on How Pinterest scaled
I think 11m monthly users is a lot. Sure, compared to Facebook 2023 it's minuscule. But assuming those 11m monthly users log in 2 times a week (~8 per month) and check out 15 pages each time that comes out to 1.3bn pageviews a month. Divided by (60s/m * 60m/h * 24h/d * 30d/m) comes out to about sustained 500 pageviews per second.

I assume since they're a viral / addictive platform the numbers will be higher. Plus they're not a blog or so, but rather a personalized social media platform, which makes stuff more complicated (you can't just cache their news feeds, they're all personalized).

It's easy to say meh, 11m is nothing, there are other platforms with more users (esp. since you don't bring up examples how you managed otherwise). But I think it's a big technical feat to do this with 6 people.

kugelblitz··on Ask HN: What side projects landed you a job?
Feels like a storyline in the Silicon Valley series.
kugelblitz··on Next.js 14
Now with htmx, you can actually just generate the html in the backend and send the fully formed stuff to the frontend. No need to JSON-Api-fy everything first, then de-jsonify again in the frontend.
kugelblitz··on Last Post, Please Read
That's the "Be Right Back" Black Mirror episode from 2013.
kugelblitz··on Ruby on Rails: The Documentary [video]
After a few years, and as my own application has grown, I feel I'm more productive in Symfony than Laravel, because there's less magic, I know where stuff is, and it's more "loosely" coupled components whilst Laravel is "All in or get out". I've been updating my app since Symfony 3.3-ish to now 6.3 and it's been fun! I've had to exchange the auth, the admin section, added new features, killed off features, but I feel with time, that my code has gotten more stable.

Maybe my first update experience with Laravel was a bit of a mess (v4.2 to v5.0 "The recommended method of upgrading is to create a new Laravel 5.0 install and then to copy your 4.2 site's unique application files into the new application. This would include controllers, routes, Eloquent models, Artisan commands, assets, and other code specific to your application."), and I couldn't easily "see" the models' properties and the Facades, that's why I have shy-ed away from it a bit. I have worked with several Laravel applications since then and have gone through the v6 through v10 upgrade cycle and can say it's gotten easier (though I wish they could settle on a release schedule), but my preference is still Symfony.

Plus when I checked out Django, I felt a bit more "at home" (e.g. see Twig templating language and how they used Django templating language as inspiration).

I've worked with Vue.js and AngularJS 1 and Angular 2+, but I'm glad htmx is coming in strong, so I can focus on logic, speed and stability instead of glueing the frontend and backend API together and debugging in the different browsers.

kugelblitz··on HTML First
Are you writing that complex projects need SPA, everything else is better served with Wordpress?

I've used SPA frameworks, but try to avoid it if I can, because most of the logic is in the backend. I don't want to create and sync API interfaces, have 1-2 additional contexts (JS + frontend framework) and debug an extra layer.

With htmx I can now have interactivity via the backend. I use Alpine.js for some interactivity.

kugelblitz··on Leaders Are Tool Builders: Why I Wrote My Own JavaScript UI Framework
“For non-technical folks, Cami.js is a code library that aims to maximize developer productivity - providing the power of Meta's React.js with the simplicity of lightweight libraries like jQuery. I wanted a framework with React's capabilities without all the complexity.”

I don’t think non-people will understand this. Seems to be aimed at that product owner, who has done some hobby programming for 2 months and keeps up with the buzz words so to be able to say “hey, I’m like one of you devs!”

kugelblitz··on Telling GPT-4 you're scared or under pressure improves performance
I wonder if kids growing up with something like ChatGPT will be less grateful in general due to not practicing saying “thanks”. I can imagine they don’t say “Thanks” to Siri or Alexa.
kugelblitz··on This is what the year actually looks like (2018)
In Germany some people might ask "Hey, let's meet up on calendar week 42", but I then always have to quickly google "when is week 42". I think people who are in the office a lot and have management meetings will know these weeks better.

But only very recently a couple of friends of mine mis-communicated because they had a different week in mind ("so how about we meet this Wednesday?" - "I thought you wrote calendar week 33, not 32, I'm away on seminar all week.")

I much prefer "Hey, let's meet up on the week of November 6th" (the date being the Monday of the week).

kugelblitz··on Ask HN: What web frameworks do you use?
Symfony (PHP)
kugelblitz··on LibreOffice 24.2 Will Succeed LibreOffice 7.6
Porque no los dos? Ubuntu's 23.04 ia codenamed Lunar Lobster.
kugelblitz··on Jitsi Meet Flutter SDK
Popular apps used to be non-popular apps. So you would want to reach people early.

I can imagine many big / popular apps switch to native once they have the resources to do so but start off with cross-platform.

kugelblitz··on Slack GPT, the Future of AI in Slack
That shouldn't matter in this case. If the brand is created / owned by OpenAI, Slack shouldn't be able to use it just because it's more convenient for them.

Otherwise I can just create HackerNewsSlack. It's a chat system with plugins, but doesn't have anything to do with Slack.

kugelblitz··on Kids trying to play video games on school laptops
I didn't read it as "it was stupid of the teacher to enter the password" but rather "the system making teachers enter the password on that computer is stupid".
kugelblitz··on Ask HN: People with direct knowledge of YouTube Algorithm-why the repeats?
I don't, what's the joke here? I looked him up and see he's an artist but I don't see any direct jokes related to repeating or large knives.
kugelblitz··on Qt Creator 10 Released
Whoa! What a blast from the past! I remember using Qt in ca. 2002 when interning for a robotics institute. My advisor wasn't available for the first week or two so I had free reign to do what I want. I ended up using Qt to create a robot simulator which uses laser eyes to navigate through a simple maze of obstacles.

It was a super-simple algorithm (I'm hardly the scientist, more like a pragmatic developer), but it seemed as if it were doing complex things and Qt helped make it look relatively cool even with my basic coding abilities.

Finally, first time I can contribute a "I remember a couple of decades ago when I was using tool X". I'm a web dev now and I have a more laid back stance regarding new tech, so I never write "Oh, I wrote a SPA-transpiled prototype with RustJs 0.0.4rc" or whatever (been burned too many times; e.g. bower, grunt, gulp, AngularJS 1, etc).

kugelblitz··on Gitlab loses one-third of its value after company issues weak forecast
There's always opportunity costs. What about regular maintenance and updates? What happens when a bug appears? What if the disk is full?

Working 50% freelance and 50% revenue-generating niche side-project, I always calculate my time costs. Assuming I earn $80 an hour as a freelancer and a hosted git costing $10 a month, if I estimate I will need an additional 15mins a month if I go self-hosted, then I'll pay for the hosted version.

I've seen enough projects, where they decided to self-host gitlab, only to have issues like disk full, updates needed, deployments not initiating.

When suddenly a team of 10 can't push or deploy for a day, there's additional costs there as well.

kugelblitz··on Samsung “space zoom” moon shots are fake, and here is the proof
Reminds me of that CCC talk by David Kriesel https://youtu.be/zXXmhxbQ-hk "Don't trust any scan that you didn't falsify yourself"

A "smart" scanner tries to compress images.

← PreviousPage 2 of 6Next →