News for hackers. Stuff that matters.

adamzapasnik

Re:Understanding N + 1 queries problem on Monday January 02, 2023 @04:16PM (#34223788)
Please list the good serialisation gems, as I can't find any ;)

What if you have a complex/dynamic query, how do you build it? You said yourself that AR works better than concatenating SQL strings, but AR doesn't even support CTEs atm and building complex queries is not trivial and sometimes even possible without just SQL strings...

Re:Understanding N + 1 queries problem on Monday January 02, 2023 @02:20PM (#34222368)
This is what I struggle a lot with in Rails.

No good, community backed serialisation gem. AMS is a mess, other ones are not maintained. And I'm not a fan of JSON api spec's serialisation either.

But also AR doesn't have any easy tools to construct complex queries/multi queries. It works for basic and medium stuff, but even this very common count problem is a disaster to deal with. Sure. you can use Arel and some other gems, but these aren't good solutions for someone that wants to get things done. Makes me wonder how others deal with these problems tbh.

Re:Ask HN: Do you create music? let's hear it on Tuesday March 09, 2021 @12:55PM (#26401459)
I love it, playing it on repeat on Spotify, thanks for sharing!
Re:My bi-weekly newsletter on all things Elixir and Erlang on Wednesday January 27, 2021 @02:29PM (#25932720)
It should work with .leex files. About the .ex files, I would be surprised if it worked. I do have it in mind, though. Actually, gonna add Issue to repo, so I wouldn't forget :)
Re:My bi-weekly newsletter on all things Elixir and Erlang on Wednesday January 27, 2021 @01:43PM (#25932088)
That's cool. There are a few of them already, what makes this one different?

Gonna share a link to my Elixir related project (formatter for .html.l?eex files) that readers will probably find useful. https://github.com/adamzapasnik/prettier-plugin-eex

Re:Four-day week means 'I don't waste holidays on chores' on Wednesday December 30, 2020 @01:16PM (#25584301)
I had to move to 4days week due to covid. Must say that, unexpectedly, it was very good experience. It felt almost like 50/50 work/free days. I was more focused at work. I was more productive. Although, honestly, I don't think I was able to deliver same output as 5days week. The way I see it, you have only a few hours per day where your output is at the highest level. When you cut off 1 day you also decrease that hours. You can't just squeeze them into other days, because it doesn't work like that.

I actually learnt two lessons:

4 days a week is something I'm looking forward when I have a profitable side project.

5 days x 6 hours imo is better than 5 x 8 hours, better to be less tired and maximize next day's most productive hours than to be tired and burn out eventually

Re:V (Vlang) 0.2 on Tuesday December 22, 2020 @06:15PM (#25512584)
I'm actually amazed by the progress. Wow. Seems like it's worth keeping an eye on. Curious if anyone is running it in production yet?
Re:I've walked away from software development on Friday December 18, 2020 @10:03AM (#25467728)
The things I've been missing in software development are:

- some kind of manual labour or any kind of movement, sitting at a desk all time is boring and unhealthy

- some kind of social interactions, I don't count tech-talking as one

Re:My Beef with RuboCop on Thursday November 19, 2020 @06:11AM (#25148332)
I don't get what is the big problem. Just turn off the disturbing Cop. It's a linter not an AI-Linter to know what is expected.

I don't even think that this is RuboCop's fault but Ruby's. Because you can write said code in a lot of different ways (like shown in the post).

Re:TailwindCSS v2.0 on Wednesday November 18, 2020 @03:28PM (#25142037)
Sure you can and you should, right?

But this way you have to write couple of classes more, couple of variables more. And with Tailwind you just define/change value in the config and you have all the classes generated, so the changes are minimal.

Re:TailwindCSS v2.0 on Wednesday November 18, 2020 @03:04PM (#25141747)
I think there are two reasons:

- you can copy the classes from html directly into @apply (you need to tinker a bit more to get responsive/hover/etc classes to work, though)

- you work with predefined values, so if you switch color in tailwind.config.js, it's gonna get correct value in the @apply class too.

That's the way I see it

I think a lot of people are missing the point. That could be attributed to the poor title, though.

The way I see it, pre-phone their daughter was probably much more engaged with her parents and was doing more manual creative stuff. After the phone appeared, she distanced herself and got absorbed by it.

I don't get why so many people here are trying to defend smartphones/social media?

Isn't it pretty obvious they are addictive? And to a young kid, that doesn't know any better, it can get really bad.

Re:I sold Baremetrics on Tuesday November 10, 2020 @09:54AM (#25046607)
Half screen? I see a comment or two. I think it's normal/human thing to have discussions in comments like this one. Especially, when it's an exit related topic that gets shared on startup/VC related forum-site like this one?

Prefer just "good job" comments, or what?

Re:I sold Baremetrics on Tuesday November 10, 2020 @09:49AM (#25046545)
He said it in an another comment; to employees.
Haha, I've written a scraper for docker tags for Elixir images this way. I'm even gonna open source it this weekend...
Re:An Honest Review of Gatsby on Saturday October 03, 2020 @08:29AM (#24671550)
Thanks for the blog post. I thought about trying Gatsby out, but now I know to stay away from it.
Re:An Honest Review of Gatsby on Saturday October 03, 2020 @08:27AM (#24671539)
Probably JS developers didn't feel like learning anything else because "JS THE BEST"... That's the sad reality.
I think it used to be like that?

My dad taught me not to talk about politics nor religion in a workplace. I think it's for the best.

Re:Repl.it Database on Monday September 14, 2020 @04:30PM (#24474773)
Not sure why you got downvoted?

They've just added some key-value db support and they call it the best place to build your app?

Unix+Vscode+asdf = I can pretty much use that stack to build anything, change my mind...

Edit: and it's just basic stuff that you're gonna use when you code professionally, so why not start with it anyway

Re:Ruby adds experimental support for rightward assignments on Thursday September 10, 2020 @02:27PM (#24435141)
I love Ruby and its 10th ways of writing code to achieve same thing...

Eh, there is a reason why Golang has such a huge popularity.

Reddit has become pretty terrible.

I'm gonna call it, that's a perfect opportunity for other projects to arise and take Reddit's share of users and IMO it's gonna happen.

Re:Costs of running a Python webapp for 55k monthly users on Friday September 04, 2020 @05:06AM (#24373160)
Thanks, gonna check them out when the need arises :)
Re:Costs of running a Python webapp for 55k monthly users on Friday September 04, 2020 @04:28AM (#24372941)
Damn, this seems so cheap. I didn't know about Contabo before. What's your experience with them?
Re:Don't Get Stuck on Monday August 31, 2020 @10:39AM (#24331884)
Truth is, in most of the tech companies you can find something wrong with the tech or it can get boring pretty quickly. Probably, only the biggest and/or most innovative ones have something really interesting to offer learning/career wise.

If you are a web dev, most of the time you are gonna deal with MVC and similar patterns that you're gonna reuse daily. It's obvious that it gets dull. And when you hear about a new toy that you haven't used yet? You get excited and you want to change a job to get to work with it. But guess what? You are gonna get bored with the new toy after a few months too.

Programming is pretty repetitive and most of the problems aren't that challenging after a few years of experience.

Re:Ghost.org deleted my website on Saturday August 15, 2020 @06:40AM (#24167864)
The way I see it, there are two numbers:

- active stuff users, that could be solved by adding new ones only after an upgrade

- views/month - this one is harder to fix, I think it should be selectable by the user how to deal with it.

Re:Ghost.org deleted my website on Saturday August 15, 2020 @06:06AM (#24167628)
Well it's is kinda of shady for B2C market, where every cent counts for the customers.

There is no way easy way to explain why it's done this way, because it's obviously made on purpose to earn more $$.

Re:Ghost.org deleted my website on Saturday August 15, 2020 @06:03AM (#24167615)
How exactly was it a shit shit talk?

So it's okay to only praise executives over social media, but you can't say anything else? That's stupid.

Re:Ghost.org deleted my website on Saturday August 15, 2020 @05:43AM (#24167512)
Wow, I'm surprised that so many call OP rude or a bad customer. What exactly did OP do wrong? I think his mistake was tagging CEO on Twitter, that's what costed him a website.

How many times do you argue with regular employees in a retail shop or over a phone? Obviously, it shouldn't happen, but it happens and you don't get kicked out of a shop. Here OP wasn't happy about auto upgrade, called out CEO on it, got his site deleted, wtf?

I have migrated to containerized infrastructure recently and I can tell that it has its benefits, quite a lot actually. (Where before I worked only with VPSs.)

But after working with it, it's pretty visible that the abstraction layer is really huge and you need to learn the tools well. When you deploy to linux VPS, you probably have already worked on unix system and know plenty of the commands.

Another thing, I think having a designated person to the infrastructure makes it much less trying for a team. On the other hand, you have 'code' sitting in the repos and everyone feels like they can into devops. I don't think it's exactly true, because e.g. k8s is a pretty complex solution.

Good for them, tailwind is a great lib :)

Older »