Which do you think is ?
@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlogcontinued:
Separation of concerns โ Locality is more important. Code that changes together should live together.
@ku๐คprofilefollowHai I am kureplied to@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlog:
Interesting. I wonder what you think about unit tests... Because apparently in rust, the code and the tests live in the same file? In asp dot net, they are completely different projects ๐
@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlogreplied to@ku๐คprofilefollowHai I am ku:
I tried to do the same as Rust in TypeScript, I made a test runner that ran the
test_X function for the file. It worked ok, but it became too messy so I decided separate files with the same filename + .spec is good as well. I definitely not want to hunt the test files in different directories/projects.@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.replied to@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlog:
Absolutely! I think separating HTML, CSS, and JS into separate files was a mistake. Web components would have succeeded far more if they had gone with the single-file component idea that so many web frameworks are converging on. I think it barely made sense in the Web 1.0 days โ certainly not in the era of Web applications.
@gruntprofilefollowI am just a grain of sand on your beach.replied to@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlog:
Microservices.
Not really programming, as this is more on the architectural level.
Microservices is a valid approach when you need to address massive scale. The thing is, I have seen it applied to things that could realistically serve its audience in a handful of modest servers with a less fashionable approach.
It was done under the guise of simplification; each individual microservice was in fact very small. But this at the cost of absolute spaghetti architecture.
@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlogreplied to@gruntprofilefollowI am just a grain of sand on your beach.:
Yes, exactly, Iโve been in the same situation and I agree wholeheartedly. It was an internal tool used only by employees, so no scaling necessary, and we had microservices which made it extremely complex to reason and deploy. A single monolithic server would have been so much better.
@ku๐คprofilefollowHai I am kureplied to@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlog:
"Oh yeah we will just do a rollback"
No! There exists no such thing. You had plenty of time to reject this before we went to production. Make up your mind!
Also feature flags to placate indecisive management. Lead, follow, or get out of the way.
@candeira๐งโ๐profilefollowreplied to@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlog:
100% test coverage is great for foundational technology like sqlite, but the economics make it unpracticable for most user software.
@odd๐ฅทprofilefollowreplied to@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlog:
Completely spec out a project - instead there should be stages where you fill in the blanks ( that you left vague on purpose ) based on what you learnt up until that stage.
@kev๐งprofilefollowrunner. making games and software.replied to@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlog:
Private variables.
@hotterprofilefollow#Emacsnotesfollow, dev, life, random stuff. the netherlands.replied to@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlog:
Clean Code
@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.replied to@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlog:
To never use single character variable names. I think a variable nameโs length should reflect its scope โ a function thatโs only a few lines long can use single letters no problem.
@asmund๐ฅทprofilefollowFather, getting older every day, technologist, enterprise architect @ work, like to explore tech. Like to keep it simple and work in the shell, write in vim, prefer Debian if I have the choice. Plays saxophone and clarinet. Enjoy motorcycle riding, photography, hiking. Christian.replied to@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.:
Fully agree - if you have the full function or scope of the variable in sight, keeping the variable short make it easy to read and quick to type. Of course if you program in something like k or goal, almost everything is single letter (:
@asmund๐ฅทprofilefollowFather, getting older every day, technologist, enterprise architect @ work, like to explore tech. Like to keep it simple and work in the shell, write in vim, prefer Debian if I have the choice. Plays saxophone and clarinet. Enjoy motorcycle riding, photography, hiking. Christian.replied to@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlog:
I assume this is not original at all at this point - but (extreme) DRY is not a good practice. My experience is that a bit of copying yourself and your colleagues in the code base often make maintenance of the code base easier.
@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.replied to@asmund๐ฅทprofilefollowFather, getting older every day, technologist, enterprise architect @ work, like to explore tech. Like to keep it simple and work in the shell, write in vim, prefer Debian if I have the choice. Plays saxophone and clarinet. Enjoy motorcycle riding, photography, hiking. Christian.:
I think DRY should just die. It lacks any of the nuance of why copying code is a bad idea. I prefer thinking about a single source of truth and whether two pieces of code are semantically related rather than just happen to look similar. I also think identifying such similarities is hard without first seeing the repetition in a few instances and it is much better to add another copy than introduce the wrong abstraction; unless itโs really obvious then just wait for more repetitions first.
@miqโprofilefollowEternal disciple of impostor syndrome โ Perth, WA.replied to@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlog:
Uncompromising adherence to DRY.
First copy-paste? Fine by me. Second? I'll still let it slide. Third? OK, now let's think about finding a suitable refactor.
@keui๐profilefollowreplied to@stagas๐คธprofilefollowcreative technologistGitHubstagas - Overviewstagas has 462 repositories available. Follow their code on GitHub.
creator of textlog:
Getters and setters for everything. Certainly, if you want an object to be doing more than just getting and setting a value right now, get them in there!
Planning to add functionality later without breaking code? Stop it! That should break code! If I'm consuming a library and have been using this setter method for 2 years, I don't want it to suddenly introduce brand new validation, caching, or logging behavior!
@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.replied to@keui๐profilefollow:
Are getters and setters on everything even considered a good practice? To me it screams junior developer who hasnโt yet fully understood encapsulation and abstraction โ if youโre just exposing getters and setters as the interface then what is the class/module/etc providing beyond what a standard variable doesโฆ?