Davy Jones
- 18 Posts
- 35 Comments
Atheism 1.45K users / month, Religion 9 users / month, religion isn’t gonna fly on Lemmy. You may be as christian as you like but how many times have you been able to talk religion here. And the same goes for any topics that goes against the current group think.
I still use Reddit for niche and polarizing topics. Lemmy feels like groupthink to me, especially about politics — it’s always “Ukraine good, Russia bad” and “Palestine good, Israel bad.” I like hearing both sides, but divergent opinions get smothered here. Imagine an average Christian joining the Fediverse: they’d have to leave many of their beliefs at the door and adapt to the herd, or risk being unwelcome, having posts downvoted to oblivion, and being told to leave. It’s already happened to me a few times with opinions that aren’t welcomed here. It’s a far cry from what Lemmy’s decentralization promised.
Davy Jones@lemmy.dbzer0.comOPto No Stupid Questions@lemmy.world•Is there a way to listen to only the radio topics I actually care about?1·1 day agoI wish that was an option but mainstream media is the only way to get locally relevant news as far as I know.
Davy Jones@lemmy.dbzer0.comOPto No Stupid Questions@lemmy.world•How can I find a post I saw about a local alternative to Perplexity?0·2 days agoAnd with instances blocking each other it may be in an instance I can’t see from this one.
Davy Jones@lemmy.dbzer0.comOPto No Stupid Questions@lemmy.world•How can I find a post I saw about a local alternative to Perplexity?0·2 days agoRight now I can see the posts I have already interacted with, for a moment I thought it would be that.
Davy Jones@lemmy.dbzer0.comOPto No Stupid Questions@lemmy.world•How can I find a post I saw about a local alternative to Perplexity?0·2 days agoNah, it didn’t say anything about perplexity it just felt like that to me. It uses Ollama and some of the LLM services from companies but I saw it on an image, and I don’t remember what the title was.
Davy Jones@lemmy.dbzer0.comOPto No Stupid Questions@lemmy.world•How can I find a post I saw about a local alternative to Perplexity?0·2 days agoDoesn’t sound familiar. I think it had the word sense in it but I couldn’t find it using that word.
Davy Jones@lemmy.dbzer0.comOPto Programming@programming.dev•Which software design principles do you rely on most?0·3 days agoSummary of A Philosophy of Software Design by John Ousterhout Source: danlebrero.com
These are notes by Daniel Lebrero Berna on John Ousterhout’s A Philosophy of Software Design.
Some advice in the book goes against the current software dogma. The current dogma is the result of previous pains, but has now been taken to the extreme, causing new pains.
What the author solves with “Comment-First Development,” others solve with Test-Driven Development. The excuses for not writing comments mirror those for not writing tests.
Key Insights
- It’s easier to see design problems in someone else’s code than your own.
- Total complexity = Σ(complexity of part × time spent on that part).
- Goal of good design: make the system obvious.
- Complexity accumulates incrementally, making it hard to remove. Adopt a “zero tolerance” philosophy.
- Better modules: interface much simpler than implementation (Deep modules).
- Design modules around required knowledge, not task order.
- Adjacent layers with similar abstractions are a red flag.
- Prioritize simple interfaces over simple implementations.
- Each method should do one thing and do it completely.
- Long methods are fine if the signature is simple and the code easy to read.
- Difficulty naming a method may indicate unclear design.
- Comments should add precision or intuition.
- If you aren’t improving the design when changing code, you’re probably making it worse.
- Comments belong in the code, not commit logs.
- Poor designers spend most of their time chasing bugs in brittle code.
Preface
- The most fundamental problem in computer science is problem decomposition.
- The book is an opinion piece.
- The goal: reduce complexity.
1. Introduction (It’s All About Complexity)
- Fight complexity by simplifying and encapsulating it in modules.
- Software design is never finished.
- Design flaws are easier to see in others’ code.
2. The Nature of Complexity
- Complexity = what makes code hard to understand or modify.
- Total complexity depends on time spent in each part.
- Complexity is more obvious to readers than writers.
- Symptoms: change amplification, cognitive load, unknown unknowns.
- Causes: dependencies, obscurity.
- Complexity accumulates incrementally; remove it aggressively.
3. Working Code Isn’t Enough
- Distinguish tactical (short-term) from strategic (long-term) programming.
- The “tactical tornado” writes lots of code fast but increases complexity.
4. Modules Should Be Deep
- A module = interface + implementation.
- Deep modules have simple interfaces, complex implementations.
- Interface = what clients must know (formal + informal).
- Avoid “classitis”: too many small classes increase system complexity.
- Interfaces should make the common case simple.
5. Information Hiding (and Leakage)
- Information hiding is key to deep modules.
- Avoid temporal decomposition (ordering-based design).
- Larger classes can improve information hiding.
6. General-Purpose Modules Are Deeper
-
Make modules somewhat general-purpose.
-
Implementation fits current needs; interface supports future reuse.
-
Questions to balance generality:
- What is the simplest interface covering current needs?
- How many times will it be used?
- Is the API simple for current use? If not, it’s too general.
7. Different Layer, Different Abstraction
- Adjacent layers with similar abstractions are a red flag.
- Pass-through methods and variables add no value.
- Fix pass-throughs by grouping related data or using shared/context objects.
8. Pull Complexity Downwards
- Prefer simple interfaces over simple implementations.
- Push complexity into lower layers.
- Avoid configuration parameters; compute reasonable defaults automatically.
9. Better Together or Better Apart?
-
Combine elements when they:
- Share information.
- Are used together.
- Overlap conceptually.
- Simplify interfaces or eliminate duplication.
-
Developers often split methods too much.
-
Methods can be long if they are cohesive and clear.
-
Red flag: one component requires understanding another’s implementation.
10. Define Errors Out of Existence
-
Exception handling increases complexity.
-
Reduce exception points by:
- Designing APIs that eliminate exceptional cases.
- Handling exceptions at low levels.
- Aggregating exceptions into a common type.
- Crashing when appropriate.
11. Design It Twice
- Explore at least two radically different designs before choosing.
12. Why Write Comments? The Four Excuses
-
Writing comments improves design and can be enjoyable.
-
Excuses:
- “Good code is self-documenting.” False.
- “No time to write comments.” It’s an investment.
- “Comments get outdated.” Update them.
- “Comments are worthless.” Learn to write better ones.
13. Comments Should Describe Things That Aren’t Obvious
- Comments should add precision and intuition.
- Document both interface and implementation.
14. Choosing Names
- Names should be precise and consistent.
- If naming is hard, the design likely isn’t clean.
15. Write the Comment First
- Like TDD, comment-first helps design, pacing, and clarity.
16. Modifying Existing Code
- Always improve design when changing code.
- Comments belong in code, not commit logs.
17. Consistency
- Don’t “improve” existing conventions without strong reason.
19. Software Trends
- Agile and TDD often promote tactical programming.
20. Designing for Performance
- Simpler code tends to be faster.
- Design around the critical path.
21. Conclusion
- Poor designers spend their time debugging brittle systems.
Davy Jones@lemmy.dbzer0.comOPto Programming@programming.dev•Which software design principles do you rely on most?0·3 days agoSummary of Clean Code by Robert C. Martin
Source: gist.github.com/wojtekluCode is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility, and maintainability.
General rules
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
Design rules
- Keep configurable data at high levels.
- Prefer polymorphism to if/else or switch/case.
- Separate multi-threading code.
- Prevent over-configurability.
- Use dependency injection.
- Follow Law of Demeter. A class should know only its direct dependencies.
Understandability tips
- Be consistent. If you do something a certain way, do all similar things in the same way.
- Use explanatory variables.
- Encapsulate boundary conditions. Boundary conditions are hard to keep track of. Put the processing for them in one place.
- Prefer dedicated value objects to primitive type.
- Avoid logical dependency. Don’t write methods which work correctly depending on something else in the same class.
- Avoid negative conditionals.
Names rules
- Choose descriptive and unambiguous names.
- Make meaningful distinction.
- Use pronounceable names.
- Use searchable names.
- Replace magic numbers with named constants.
- Avoid encodings. Don’t append prefixes or type information.
Functions rules
- Small.
- Do one thing.
- Use descriptive names.
- Prefer fewer arguments.
- Have no side effects.
- Don’t use flag arguments. Split method into several independent methods that can be called from the client without the flag.
Comments rules
- Always try to explain yourself in code.
- Don’t be redundant.
- Don’t add obvious noise.
- Don’t use closing brace comments.
- Don’t comment out code. Just remove.
- Use as explanation of intent.
- Use as clarification of code.
- Use as warning of consequences.
Source code structure
- Separate concepts vertically.
- Related code should appear vertically dense.
- Declare variables close to their usage.
- Dependent functions should be close.
- Similar functions should be close.
- Place functions in the downward direction.
- Keep lines short.
- Don’t use horizontal alignment.
- Use white space to associate related things and disassociate weakly related.
- Don’t break indentation.
Objects and data structures
- Hide internal structure.
- Prefer data structures.
- Avoid hybrids structures (half object and half data).
- Should be small.
- Do one thing.
- Small number of instance variables.
- Base class should know nothing about their derivatives.
- Better to have many functions than to pass some code into a function to select a behavior.
- Prefer non-static methods to static methods.
Tests
- One assert per test.
- Readable.
- Fast.
- Independent.
- Repeatable.
Code smells
- Rigidity. The software is difficult to change. A small change causes a cascade of subsequent changes.
- Fragility. The software breaks in many places due to a single change.
- Immobility. You cannot reuse parts of the code in other projects because of involved risks and high effort.
- Needless Complexity.
- Needless Repetition.
- Opacity. The code is hard to understand.
Davy Jones@lemmy.dbzer0.comOPto Selfhosted@lemmy.world•How much time and money would it take to set up and maintain a server similar to disroot.org, offering the same services, for a group of ten people?English10·3 days agoThat sounds like spam. I’ll report just in case.
Davy Jones@lemmy.dbzer0.comOPto Photon@lemdro.id•Any Lemmy web clients that show notifications from multiple accounts at once?English11·4 days agoThat’s pretty much what I’d like. So no idea if there are any clients with that functionality?
Davy Jones@lemmy.dbzer0.comto Showerthoughts@lemmy.world•We'll be seeing an uptick in UFO sightings soon71·4 days agoAI-made aliens of all kinds and sizes. I wouldn’t mind recreating the cantina scene from the original Star Wars trilogy by walking into a bar and, in real-time, using deepfake technology to transform everyone into a random alien species from Star Wars.
Davy Jones@lemmy.dbzer0.comOPto Ask Lemmy@lemmy.world•What's the weirdest hobby you've heard of?4·4 days agoYou must have made that up, there’s not even a definition on Urban Dictionary.
Also, is this a hobby or a kink, because it reminds me of kinks like chastity, plapping and such.
Davy Jones@lemmy.dbzer0.comOPto Ask Lemmy@lemmy.world•What's the weirdest hobby you've heard of?11·4 days agoThe locations, free falling and such.
Davy Jones@lemmy.dbzer0.comOPto Ask Lemmy@lemmy.world•What's the weirdest hobby you've heard of?7·4 days agoExtreme Ironing
Davy Jones@lemmy.dbzer0.comOPto Ask Lemmy@lemmy.world•What's the weirdest hobby you've heard of?3·4 days agoWow, I bet they don’t even bother warning their sexual partners about it. I wish I had never learned that.
Davy Jones@lemmy.dbzer0.comOPto Ask Lemmy@lemmy.world•What's the weirdest hobby you've heard of?4·4 days agoThis is only the second time I’ve heard about it. The first time, someone was talking about worm composting (vermicomposting), which uses worms to convert organic waste into nutrient-rich compost.
Davy Jones@lemmy.dbzer0.comOPto Ask Lemmy@lemmy.world•What's the weirdest hobby you've heard of?1·5 days agoYou are right, but gooning is a kink rather than a hobby as well and you didn’t mention it to the poster of the most voted comment.
Davy Jones@lemmy.dbzer0.comOPto Ask Lemmy@lemmy.world•What's the weirdest hobby you've heard of?01·5 days agopick up artistry, penis enhancement, prejac training
I wouldn’t recommend Lemmy to anyone I know. Lemmy feels like a meme aggregator more than a forum or a link aggregator. It probably has it’s own niche of people who like what they can find in it but the people I know seem interested in other things, like local news and sports.