116 karma · joined Jun 26, 2017 (9y ago) · 67 submissions
comment 1mo ago · link · parent
I read the source code and like some patterns that I reuse in my later works. Is that plagiarism? If not, what's the difference with LLMs in this sense?
comment 6mo ago · link · parent
Just a note, I'm yet to see a problem highlighted in the section about interfaces, in particular that changing a concrete type will make it not fit the interface anymore which will result in troubles. It's often used as a tool to make the changes (e.g. change the interface, observe the compilation failure and fix all the occurrences). They way interfaces are usually defined on site as a minimal possible signature - if your code just needs one method, you define a narrow interface and that's it. That also makes it impossible to predict what kind of interface is needed at producer side.
If the argument is that you can fit a wrong struct into the interface, then again, I'm yet to see a real life manifestation of this problem.
comment 8mo ago · link · parent
comment 8mo ago · link · parent
The contexts and errors communicate information in different directions. Errors let upstream function know what happened within the call, context lets downstream functions know what happened elsewhere in the system. As a consequence there isn't much point to cancel the context and return the error right away if there isn't anybody else listening to it.
Also, context can be chained by definition. If you need to be able to cancel the context with a cause or cancel it with a timeout, you can just make two context and use them.
Example that shows the approach as well as the specific issue raised by the post: https://go.dev/play/p/rpmqWJFQE05
Thanks for the post though! Made me think about contexts usage more
comment 11mo ago · link · parent
I'm sure every dba has a war story that starts with similar decision in the past
comment 12mo ago · link · parent
comment 1y ago · link · parent
Here are few things I’ve encountered during the development:
- Based on my experience private only approach does not work. It’s all about network effects and if users can’t send their post to all friends, they’ll just move on to a different platform
- chronological friends only feed is really boring. Not that it’s bad per de, but it’s hard to convince people to stay if the service is not entertaining
It can also be me not being able to market the project right. Good luck with your attempt!
comment 1y ago · link · parent
a) I think so, yes. I've seen much more spa that have a completely broken page navigation. This approach does not fit all use cases, but if you remember that the whole idea of htmx is that you rely on webserver giving you page updates as opposed to having a thick js app rendering it all the way it makes sense. And yes, js libraries should be wrapped to function properly in many cases, but you would do the same with no react-native components in any react app for example
b) I don't think so. htmx boost functionality is an afterthought and it will always be like this. Compare it with turbo [1] where this is a core feature and the approach is to use turbo together with stimulus.js which gives you automagical component life cycle management. Turbo still has it's pains (my favorite gh issue [2]), but otherwise it works fine
[1]: https://turbo.hotwired.dev/ [2]: https://github.com/hotwired/turbo/issues/37
comment 1y ago · link · parent
Last time it was generics that were missing, now everyone is raging about sum times and of course explicit error is a topic of constant concern and why panics and not exceptions?
Go is well designed to build good software quickly. Easy dependency handling, good tooling, vast ecosystem.
Go is well designed to help developers with automation and help them catch mistakes, that's why it's easy to parse and all language design decisions take that into account.
It's also designed to produce a lot of code and that requires the language to be easy to understand and programs easy to tweak and that's what it provides, since you'll have a lot of developers tweaking the code.
We're in the industry of shipping different kinds of products and that imposes different constraints and results in different languages being used. Also, different people care about different stuff and languages form clusters of similar minded people around them, that's a choice too.
comment 1y ago · link · parent
I mean, with the ressources meta has I’m sure they could have rewritten the tool, made a fork or done any other thing to incorporate their changes (they talk about overrides) or transformed the tool into something better fitting their approach. Maybe it has been done, just not clear from the article
comment 2y ago · link · parent
You could you query string as mentioned in the article, but that's not really convenient when done in a custom way for every single case.
Having said that I think that a way to go could be a community effort to settle on the ways to handle different ui patterns and interactions with some bigger project to serve as a testing ground. And that includes backend part too, we can look at what rails does with turbo
My opinion is that htmx (and similar) approach is different enough to potentially require a different set of ui interactions and it usually hurts when one tries to apply react friendly interactions to it.
comment 2y ago · link · parent
More or less like in real life, where you chat a lot with your friends, but necessarily with some of their friends you don't know that well. In this case you would ask your friends for the introduction and that what I've tried to model.
One other feature I've been thinking about was to make the moderation automatic in a sense of making signups possible only via invitation and putting some weight on it. Basically if you invite somebody who's misbehaving on the platform and they get flagged, you get penalized as well unless you do it first. My theory is that it should make users care about their digital surroundings.
comment 2y ago · link · parent
The common complaint I hear about instagram for example is that every second connection of yours would try to sell/teach something and that's just garbage if all you need is to keep in touch with your friends.
The main problems to tackle imo are:
- information propagation speed. This is good in case you want to get a quick update but it also a double edged sword, since this allows information attacks, trolls etc
- Scale. Anything of big scale becomes a problem by itself since it becomes economically viable to target the platform with bots, scam etc.
- Incentives. I think we should get to the point where social networks are being run by non profits
I've posted the link a couple of time, I'm working on my personal take on this problem[0]. My approach is the following:
- Slow down information propagation. Every post is visible to the direct connections, to their connections if you allow it, but no further
- No way to get a connection request from a stranger. Either you specifically allow it, or it's introduced by your direct connections
- No federation, since my idea was to have small communities
- Fully open in the sense of data formats, import/export etc. Migrating between instances is as easy exporting posts in bulk, creating an account on another instance and doing the import. You could do the bulk updates the same way
Also, it's all go + htmx just in case anyone else is also tired of modern frontend mess. I have a couple of videos on the feautures[1], if you like. The design is not great, since I wanted to focus on the idea itself
[0]: https://github.com/can3p/pcom
[1]: https://www.youtube.com/playlist?list=PLa5K-kCUS-FozB6Cw7rJL...
comment 2y ago · link · parent
IMO the problem with current social networks is their scale and public only approach. Any network that goes this way ends up with lots of bad actors and public only approach means that it’s easy to harass people and bots are economically viable.
I’ve addressed both points [0]. Visibility of the posts is limited to direct connections, you need a proxy connection to make a new one and at the same time it’s mega easy to import/export, markdown support and apis are there etc. That was my way to get miningful discussions back.
In general, you need to look to small scale places
comment 2y ago · link · parent
The final query is very neat though! And special thanks for mentioning "MERGE ... RETURNING" in PG17, that's really cool
comment 2y ago · link · parent
You can replace UTC with US dollars and Amsterdam time with euros and talk about conference prices. If you convert 100 euro to US dollars at the time of record creation, the price at the day may not be 100 euros anymore.
Ideally you record a tuple that allows to define value unambiguously (e.g. time 2022-02-21 9:00 timezone Europe/Amsterdam) because in this case you can always resolve the absolute time value later.
This is a typical hiccup for any business expanding into multiple locations with different parameters (time zones, currencies, units etc).
Once case that I find particularly interesting is an event that happens in different locations at the same logical (but different absolute time). Let's say you want to send an email to all your users across the global on Monday 9:00. If you want to add up to complexity, you could think about sending an email to all your users across the globe on the first working day next week.
comment 2y ago · link · parent
The proposal to disable node.js style imports will just split ecosystem and make a large part of industry stick to ancient version / make a fork. Is that really worth the gain? Just check how long it took some bigger projects to migrate from python2 to python3
20.
Show HN: Sackmesser – JSON/YAML mutation tool(github.com ↗)
4 points · by can3p · 2y ago · discuss
comment 2y ago · link · parent
Mile unit is another one of the same sort - https://en.wikipedia.org/wiki/Mile with the exception that only two kinds have survived if I'm not mistaken - US mile and nautial mile
I guess it can be very simple in US, especially if mug/cup volumes are defined in terms of a "cup" multiples, but in europe I get totally lost when I see the cup unit in the recipe since I din't know what volume it refers to
comment 2y ago · link · parent
Just remember all the people struggling with open office (not relevant because of google docs and alike) and video/audio codecs (Spotify, Netflix etc). In general the amount of desktop apps needed to be productive has reduced.
The desktop is just good enough even though App Store apps are quite terrible in both Ubuntu and fedora in my experience.
On the other hand with pipewire we can finally have working Bluetooth headphones and after years of endless shitshow simple things like screen sharing are working again
comment 2y ago · link · parent
Atomic classes really shine in this aspect, since it’s really just what you have in html and nothing more.
Another fantastic quality is the fact that you can really tweak things slightly in the html and skip inventing a modifier class just for this particular situation.
I think bootstrap css hits a really sweet spot there, since they have lots of reusable components, which are very easy to use and extend and a huge bunch of utility classes to accommodate for exceptions. I know that’s not an argument for spas, since you have components there, but for server side templates that’s the best
comment 2y ago · link · parent
- Context is the king. Most of the words have multiple meanings and it's easier to remember them if you just added them from a text you've read. Moreover, this approach gives you an opportunity to see the words being used in the wild which gives confidence on when to use the word/idiom - Words with no context are just harder to learn - 3rd party decks will give you loads of words you don't care about
For learning French I've found kwiziq much more useful. Very little gamifications and lots and lots of training and exercises with examples that actually make sense
26.
Taking the Airbus to the IKEA Cloud(berthub.eu ↗)
3 points · by can3p · 2y ago · 3 comments
comment 2y ago · link · parent
Now, about the scale. Anything run at scale needs standardisation. You need to hire 100 senior developers. How do you know they have more or less same level? If every single interview is hand crafted, you'll either need to get all devs envolved (and not everybody is good at coming up with interview questions) or get standard questions and answers to allow a smaller group of people to deal with candidates and coding puzzles fit great there because they're slef contained and isolated. Every realistic question has multiple facets and that's what you get at the system design interview step.
Another problem I've observed was that the more you give the same puzzles to candidates, the easier they look to you. What the means is that you as an interviewer either need to keep your self in check regarding your reactions or you're risking giving a bad interview score in situations where it's not really warranted or there is a chance that the next question you take will be the one you find more complex (to be equal to position level in your head) and that would push the level of questions up. That's another observation I had when some interview questions would become so complex that I knew some of the existing devs would fail the interview for sure.
Does that give good results on the other end? I don't know, but what we definitely know is that there is the whole industry around leetcode to train peeople to pass these challenges specifically and that means that they only thing the interviewer know is that the candidate has put some effort to prepare for the interview meaning they're motivated to join the company. And maybe it's not the worst data point! Some companies actually explicitly mention this fact on their hiring pages.
To add to it, big corps have different ways to make interviews objective in whatever sense they think and that by definition reduces the personal impact. "Why did you ask this question? We've never done it before, we'll need to have a group call to calibrate". After a handful conversations like this you'll just stick to the standard process.
Is there a way to come up with a more human approach? Personal recommendations with some skin in the game I guess. I'm sure in some niche areas like browser engines all good devs know each other well and no interview is often necessary.
28.
Kleiner – CLI to generate other CLIs with updates and distribution(github.com ↗)
7 points · by can3p · 2y ago · discuss
comment 2y ago · link · parent
Another point that's relevant in this discussion is that the tech debt does not appear out of nowhere and developers do not develop whatever they like. Rather, they're implementing ideas of product managers, designers and other stakeholders. If the team finds itself in a hole shortly after tidying things up it can also be because of the ignorance on the product or design side with the requests that demand unreasonable effort to implement very insignificant changes.
All in all, it looks like both terms should be used in combination, because they describe different types of inefficiencies
[0]: https://dpetrov.substack.com/p/the-tyranny-of-the-feedback-l...
30.
The tyranny of the feedback loop: side effects of team decisions(dpetrov.substack.com ↗)
1 points · by can3p · 2y ago · discuss