willia4,

TDD is overrated. Code coverage is extremely overrated. Both of these tend to lead to a morass of tests that prove the compiler works at its most basic level while simultaneously generating a surplus of smugness about the whole situation.

Tests have their place. Tests can be, and often are, valuable. But the easier the test is to write, the easier it would’ve been to just encode it into the type system to begin with.

bamboo,

As someone who works on python code and kinda hates it, type annotations and a CI pass for mypy would catch the majority of our bugs. It’s painful

SpaceCowboy,
@SpaceCowboy@lemmy.ca avatar

Yeah creating tests for every single method is insane. If a feature changes it’s more difficult you either have to figure out how to implement the change without changing the method, or you change the method and have update the unit test. But if you’re constantly updating the unit tests, how do you know if you might’ve broken something else that the test was intended for.

It’s way better just to do integration tests that match the feature request. That way the feature that someone asked for will continue to work even if you decide to refactor the code.

Alexstarfire,

Unit tests are only worthwhile if you refractor code or write the unit tests before writing the code. We started adding unit test for most everything where I work and I think it’s far more effort than it’s worth. It’s not that it catches nothing but it catches so little I don’t think it’s worth the time spent writing them.

Double_A,
@Double_A@discuss.tchncs.de avatar

Code changes that could affect tests happen all the time. It doesn’t need to be a specific refactoring of that unit.

Alexstarfire,

I don’t think you understood my point. That’s exactly why I think unit tests aren’t all that useful. Most code changes require updating the unit tests so unless you change the unit tests first all that’s being done is saying, yep this works how I programmed it to work.

Double_A,
@Double_A@discuss.tchncs.de avatar

But if unit tests that other people wrote unexpectedly break, you know that you maybe changed things that you maybe didn’t mean to change.

wolf,

TDD as in religion is overrated. TDD done right is IMHO extremely effective.

The problem is, writing good tests is really hard, and I have seen/committed/experienced a lot of bad tests… just the top of my mind problems with TDD done wrong:

  • testing the implementation instead the interface
  • creating a change detector
  • not writing / factoring the tests in a good way
  • writing tests / TDD w/o having an overall design for the software

For every non trivial piece of software written w/o TDD, I always saw the same pattern: First few hours/days/weeks, rapid progress compared to TDD, afterwards: hours/days/weeks wasted in debugging, bug fixing etc… and the people can not even catch up with tests if they wanted.

Is TDD always the answer? Of course not, it is a tradeoff like everything else in technology. OTOH I have yet to see a project which benefited from not using TDD by any metric after a few days in.

0nXYZ,

That the HTML/CSS structure of web programming is absolutely disgusting and not necessary. The internet could be and should be so much more from a developer pov. Also people who double space instead of tab often have their mouths open while mashing space 16 times.

I completely understand and clearly see that web development is the future, but I still think it’s all gross and will always prefer targeted efficient compiled code. Why? Because I’m a huge fucking dork.

sznio,

The internet could be and should be so much more

The internet is already too much.

xigoi,
@xigoi@lemmy.sdf.org avatar

Did you have your mouth open while assuming that indenting with spaces actually involves pressing the space bar?

corstian,

Most modern software is way too complex for what it actually does.

NewPerspective,

If white space carries any function that the compiler/interpreter needs to know about like structure or scope, it’s probably not a very good programming language.

sajran,

Genuine question: why? What makes, say a semicolon, so superior to the the newline or tab characters?

To be clear: I don’t think whitespace as a part of syntax is an awesome idea which should be more popular. It’s definitely a bit more error prone in some ways. It’s not perfect. But it’s okay.

I’ve written a lot of Python and I don’t think I have ever seen a syntax error caused by incorrect whitespace. I’m not exaggerating. I regularly forget semicolons in other languages but I never type out incorrectly indented code. Maybe that’s just me though…

Reptorian,

From some one who used Python as it was the easiest solution to few of my problems, and having to experience languages with brackets and/or endif/fi/done as ways to limit scope, I find that having things like brackets and/or scope terminators easier to parse and less error-prone. I’m thinking about moving on to Ruby whenever I had a need where Python would be a good choice, but the time it takes for me to understand a new language is blocking me from that.

UnfortunateShort,

I honestly think the scripting languages like fish have got it right.

Newline by default completes a line and can optionally be escaped. Saves you most of the semicolons and even implicitly highlights multi-line statements.

Whitespace doesn’t matter except for separating names.

Blocks are explicitely ended without braces you can confuse with brackets or parentheses, no matter the coding style.

If Rust and fish had a baby, I think it would be the best language to have ever been created.

NBJack,

How much of that python is written in a shared codebase with multiple active contributors? When was the last time you refactored a module?

Tabs and spaces are invisible. Semicolons are not.

sajran,

A vast majority of the code in question is the code I’ve written for my work projects with multiple active contributors and refactoring is very common too. We all like to shit on Python for various reasons but no one in my environment ever complained about whitespace.

Like I said, I don’t think whitespace is perfect as a part of syntax but I’m much more likely to forget a semicolon than a proper indentation and this applies to any language. I guess it’s not universal tough, because you can often see code with messed up indentation on online forums etc. TBH this is just unthinkable to me, indentation is absolutely necessary for me to be able to read code and reason about it. When I’m thinking about blocks and scopes it’s not because I counted semicolons and braces, it’s 100% indentation.

DeprecatedCompatV2,

How do you feel about line breaks?

jvisick,

Not who you asked but I think they’re important for humans, but syntactically I don’t think they should matter

Thoth19,

Intmain(intfoo){std::out<<"HelloWorld";}

Is a great program and should totally be valid cpp. White space sucks.

/S

mindbleach,

Load-bearing whitespace is the fucking devil. This thread about hot takes is topped by a comment highlighting how people can’t even agree what kind of whitespace to use.

Python - you want code to fail if someone from one camp copy-pastes code from another camp, and the characters that make a difference are invisible?

NBJack,

Load bearing whitespace. Damn, I love that phrase.

Also, if you have to have agreement on the tabs or spaces argument in your codebase in order to get it to compile, you have already lost.

0xc0ba17,

People who insist on using semicolons in Javascript don’t understand why and are just following a cargo cult.

Remove the semicolons, be free.

frezik,

It’s also because my fingers automatically type them for the sake of most other languages. Let me have my muscle memory.

Nested_Array,

iirc semicolons are required in JavaScript strict mode.

0xc0ba17,

They’re absolutely not

FrankTheHealer,

KDE is ridiculously unintuitive and has become too awkward to use to recommend to a newbie.

Arch is not a general purpose distro. Theres too many things that can break it unless you meticulously follow the patch notes and participate in the community.

Vim is overrated.

gpopides,

Not everything should be beginner friendly. Trying to nerf things because they are not beginner friendly should not be how tools/patterns of languages are designed.

Its ok to have more advanced topic that require more knowledge and that people don’t understand from the first moment they see them.

SolarMech,

Yes and no. I mean sure, if you are going to leverage this to gain a significant edge in the market, that works.

If you add a tool to the project, that you need to understand to maintain some parts of it, which adds to the learning curve of someone joining said team, then the gains have best be worth the effort.

We adopt so many librairies/plugins/tools over time that adding more complexity than you need this way is just terrible.

wolf,

Amen! One thing which drives me crazy is that most people confuse beginner friendly and user friendly, the two things are absolutely not the same thing. There is nothing wrong with having tools which are beginner friendly, especially for stuff one does once in a while. There is everything wrong with nerving tools which are for pros or even everyday usage: If I use something everyday I have rather an optimization for the mid or long run, than for the first few hours…

xantoxis,

Log levels are superstition.

dylanTheDeveloper,
@dylanTheDeveloper@lemmy.world avatar

You can never have too many children

dylanTheDeveloper,
@dylanTheDeveloper@lemmy.world avatar

C++

NotErisma,
@NotErisma@hexbear.net avatar

Dark BASIC is cool

Feathercrown,

Pure text is probably not the best way to write code, even if it is the most interoperable format

olafurp,

You can use all the classes, patterns, functions, methods you want but if it’s not readable it’s garbage.

lysdexic,

but if it’s not readable it’s garbage.

Readability is often in the eye of the beholder, but knowing that a component implements a design pattern is all you need to know how it’s used without even having to peek at the code.

I think the most vocal critics of design patterns are those who are clueless about design patterns, and they are just scared if stuff they don’t know.

olafurp,

I like all of the concepts I listed btw. They can all make readability better of course.

Patchwork,
@Patchwork@lemmy.world avatar

Doing this is a hot take, but “clean architecture” is a joke.

My company is obsessed with it.

scubbo,

I remember having a lot of doubts/criticisms of the book when I read it, but that was a long-ass time ago and I’ve forgotten it - what do you dislike?

NoXzema,

I’ve seen it get a lot of hate revently. In my experience, it’s mostly been from people upset they had to refactor their 400 line function or write unit tests.

Patchwork,
@Patchwork@lemmy.world avatar

Off the top of my head…

  • Too many layers of abstraction
  • Multiple copies of the same model (entities, domain objects, models, DTOs, etc)

Ours is a .NET6 solution, for what it’s worth. The solution itself has a few flaws, so that might be tainting my opinion a bit.

qevlarr,

SCRUM is good, actually

TrustingZebra,

Why?

zurvan2,

Almost everything in Scrum can be seen as protecting the team.

ONE example (there are many):

Problem: vague requirements

Solutions in Scrum:

  • Acceptance criteria on stories need to be clear
  • whole team grooms the story, everyone understands it and does planning poker to agree on costs. If the team doesn’t all understand it, it doesn’t get past this point
  • only fully groomed stories get into a Sprint and get worked on.
  • EVEN IF YOU GOT IT WRONG, you demo what you did every sprint, and the stakeholders can ask for additional work in a future story, reducing the cost of getting it wrong once.
TrustingZebra,

Almost everything in Scrum can be seen as protecting the team.

Funny, in ny team it’s the opposite. Our team leader is protecting us from the Scrum BS that is forced on us by upper management.

o_d,
@o_d@lemmygrad.ml avatar

The problem is that only 1 organization that I’ve worked for has actually tried to implement it correctly. The rest just say “yeah we do Agile SCRUM” but it becomes obvious quite quickly that no they do not. Just because we throw stories on a Jira board every 2 weeks and move them around does not make it SCRUM. I suspect this is partially the reason that some people have a negative view of it. They’ve only done “SCRUMfall” and assume that’s all it really is.

Kuinox,

Files are a mistake and destroy all structure information.
You don’t have guarantee nobody touched your file, we should database that keep structure information instead.

Command Line is the minimum effort human interface, if we had more time/skill to make interface, the cli wouldn’t exists.

lysdexic,

You don’t have guarantee nobody touched your file, we should database that keep structure information instead.

What is your definition of file and database? For example, do you think SQLite is a database, and a SQLite database file counts as a file? Do you think that editing SQLite or PostgreSQL with a third party client counts as touching a file?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • TheResearchGuardian
  • Ask_kbincafe
  • KbinCafe
  • oklahoma
  • feritale
  • SuperSentai
  • KamenRider
  • All magazines