136 karma · joined January 22, 2023
Your Programming Philosophy
You value clarity and directness in code. You prefer explicit, step-by-step solutions that are easy to understand and debug, even if they require more lines of code. Abstract ↔ Concrete: 0 Neutral Human ↔ Computer Friendly: +6 Human-Friendly
The compass is almost in the middle, just a little up from center towards human friendly. That's fine, since most code you write is for other humans to read, the compiler is writing for the machine, only in critical perf sensitive paths you write for computer-first... The rest was mostly neutral, because what I wrote in the parent, it depends on the situation and it can go either way depending on the project.
> When refactoring code, I prioritize:
> - Reducing complexity and coupling
> - Improving readability and maintainability
> - Optimizing performance and resource usage
> - Extracting reusable abstractions
Each refactoring has some goal, some driver behind it. It could be slow performance, unmaintenable mess, high coupling, too much duplication etc... Choosing a single answers makes no sense from a programming point of view. And this is the case most questions I have seen so far on the site.
EDIT: After finishing and seeing, I think I understand it a little better why was it structured like this. If you are open to do things differently, your answers probably won't weigh in any one direction in aggregate. But if you have certain biases, you might be leaning towards choosing similar answers that shows up in the end.
The usual problem is that some team exposes one of their internal tables and they don't have control over what type of queries are run against it that could impact their service when the access patterns differ. Or when the external team is asking for extra fields that do not make sense for the owning team's model. Or adding some externally sourced information. Or the team moving from PostgreSQL to S3 or DynamoDB. And this is not an exhaustive list. An API layer is more flexible and can remain stable over a longer time than exposing internal implementation depending on a particular technology implemented in a particular way at the time they agreed on sharing.
This is, of course, not a concern inside the same team or very closely working teams. They can handle the necessary coordination. So, there are always exceptions and simple use cases where DB access works just fine. Especially, if you don't already have an API, which could be a bigger investment to set up for something simple if it's not even known yet the idea will work etc.
You absolutely should design and implement it, exactly because it is now your interface. In fact, it will add more constraints to your design, because now you have different consumers and potentially writers all competing for the same resource with potentially different access patterns. Plus the maintenance overhead that migrations of such shared tables come with. And eventually you might have data in this table that are only needed for some of the services, so you now need to implement views and access controls at the DB level.
Ideally, if you have a chance to implement it, an API is cleaner and more flexible. The problem in most cases is simply business pushing for faster features which often leads to quick hacks including just giving direct access to some DB table from another service, because the alternative would take more time, and we don't have time, we want features, now.
But I agree with your thoughts in the last paragraph. It happens very often that people don't want to undertake the effort of a whole new design or redesign to match the evolving requirements and just patch it by adding a new table to an existing DB, then another,...
Samsung says you need to have the devices on the same Samsung account, same WiFi with Bluetooth enabled in https://www.samsung.com/us/support/answer/ANS10003445/. But I couldn't find more details on how the actual communication happens and if anything leaves the local network. The Samsung article does not go into details how this works, it does not even say explicitly that it uses the local network only. I tried to search for it, but Googling failed me on this.
But I was able to disable that sharing feature, so that isn't my main complaint, it's their clipboard data collection - [1], [2], [3]
[1]: https://cybersecuritynews.com/samsung-one-ui-security-flaw/
[2]: https://www.tomsguide.com/computing/online-security/samsung-...
[3]: https://windowsforum.com/threads/samsung-clipboard-security-...
Let me share you something, maybe it helps to update your perspective.
We reject people not because they help themselves with AI, everyone on the team uses AI in some form. Candidates are mostly rejected, because they don't understand what they write and can't explain what they just dumped into the editor from their AI assistant. We don't need colleagues who don't know what they ship and can't reason about code and won't be able to maintain it and troubleshoot issues. I can get the same level from an AI assistant without hiring. It's not old vs. young, we have plenty of young people on the team, it's about our time and efforts spent on people trying to fake their skills with AI help and then eventually fail and we wasted our time. This is the annoying part, the waste, because AI makes it easier to fake the process longer for people without the required skills.
Personally, I have my own "notes" script, a combination of shell and vim script for general note taking. I can organize things in folders, have a todo file, tags and indexing of tags (a folder of tags, each tag is a folder that contains symlinks to the related notes). If I just run it without a file, it opens a new daily note with the current date. I use that also for work tracking and TODO, I create a new note each day, add my tasks, tag it with the sprint. I can freely grep anything, I can quickly create a sprint summary from the tagged files, etc. I can back up or sync with git or any other software that works with plain text files and folders.
This is very simple and hacky, but haven't had to touch for years and it works for me - only me, only on my laptop, I don't need it on mobile. To carry around a list I use post its. For other purpose I have a physical notebook.
It is definitely not for everyone and that's fine. There is no one fits all. This is what I found working for me, minimal overhead, I can change/fix anything anytime, works with standard command line tools.
Thank you for your kind words, please look at the HN comment guidelines when you have a chance. Your point would have been an excellent correction if shared thoughtfully, but it's all negated by the name calling and personal attacks.
EDIT: the parent I was replying to talked about the issue of opening links in new tabs and your answer - don't do it, use it like a desktop app - is basically the problem we are having with some of these web apps.