Last month I've rewritten some tests in one component. Here is result:
before:
290 tests in cypress (time 06:01)
177 tests in jest (time 23.762s)
= 6:25
after:
154 tests in cypress (time 03:47)
249 tests in jest (time 32.685 s)
= 4:20
#it #programming #softwareEngineering #software #javascript
26.11.2024 12:42 β π 2 π 1 π¬ 1 π 0
React v19 is finally out with some interesting new hooks.
05.12.2024 19:54 β π 0 π 0 π¬ 0 π 0
Do repeat yourself! What is responsibility in code?
Did you know that in October this year, DRY principle will celebrate its 25th anniversary? It was proposed by Andrew Hunt and David Thomas in The Pragmatic Programmer book in 1999. 25th birthday is qu...
Balancing Don't Repeat Yourself (DRY) and Single Responsibility Principle (SRP) can be tricky.
Should you merge similar code for DRY or keep it separate for SRP?
Discover insights from my Allegro experience in this blog post:
#it #programming #code #softwareEngineering
25.11.2024 18:39 β π 1 π 1 π¬ 1 π 0
Ho Ho Ho π
π·π
Domain Driven Design for Frontend Devs - Advent Calendar
Starting 1st Dec,
Each day,
Around 10am CET
a portion of distilled knowledge on practicing #DDDesign
Let your frontend teammates know
Spread the word - thank you π
#DDD #aDDDvent
29.11.2024 22:17 β π 32 π 12 π¬ 0 π 1
For example, consider a function saveUser that returns a boolean indicating success. Its description might be: βIt saves a user to the database and returns the status.β Everything after "and" shouldn't belong in the function.
Want more Clean Code tips? β‘οΈ Follow me! π
29.11.2024 12:31 β π 0 π 0 π¬ 0 π 0
Separating responsibilities simplifies your code, and simplicity always wins. This makes your code easier to read, test, and maintain. π§©
Ask yourself: can you describe what your function does in one sentence, without using βand alsoβ? If not, itβs time to simplify. Less is more in clean code. π‘
29.11.2024 12:31 β π 0 π 0 π¬ 1 π 0
Error handling is a separate responsibility, and a function should do exactly one thing.
Thatβs why itβs worth moving try/catch blocks into separate functions.
βοΈ The "main path" of your code stays clean, focusing on the function's goal.
βοΈ Error handling is clear, separate from business logic. π οΈ
29.11.2024 12:31 β π 0 π 0 π¬ 1 π 0
Why? Because a returned false or an error code can easily be overlooked. All it takes is someone forgetting to check the return value β and even the best developers make that mistake. π
An exception, on the other hand, cannot be ignored β it will stop the program and clearly indicate the problem. β οΈ
29.11.2024 12:31 β π 0 π 0 π¬ 1 π 0
A function that does something shouldnβt return anything. No true or false, no error codes. If something goes wrong β throw an exception.
#CleanCode #Programming #SoftwareEngineering #Code
29.11.2024 12:31 β π 1 π 0 π¬ 1 π 0
For example, add aliases for git add, commit and push. It'll speed up your work already.
If you'd like to start with my config, you can fork my repo and change only aliases.txt file and setup zsh.
Or you can start configuring by yourself :)
29.11.2024 08:30 β π 0 π 0 π¬ 0 π 0
You can use only someone else's (for example my ;) ) configuration and add your own aliases.
You could also start from a few most common command you use on daily basis. Adapt them and then think about adding more.
29.11.2024 08:30 β π 0 π 0 π¬ 1 π 0
Terminal aliases have been a cornerstone of my productivity for years, especially for tasks like Git or npm commands.
Let me share some insights and tips! π§΅
For example, instead of typing:
git commit -m, I use gc.
git checkout -b becomes gcb.
(link for config instruction below)
#programming #it
27.11.2024 08:01 β π 2 π 1 π¬ 3 π 0
The flavor of code syntax you personally prefer to use doesn't matter. What matters is having a single, consistent approach across all devs working on a project.
27.11.2024 20:55 β π 4 π 1 π¬ 3 π 0
Totally agreed! I prefer using eslint/prettier with pre-commit hook to ensure that code on remote repo is consistent.
28.11.2024 11:36 β π 1 π 0 π¬ 0 π 0
50 shades of gray :) Sometimes there is sun, but I work then.
When my kids will grow up a little bit I plan to go somewhere warm every fall/winter.
28.11.2024 09:14 β π 1 π 0 π¬ 1 π 0
yeah, in spring or summer :) Or in deep winter when it's snowing ;)
28.11.2024 09:06 β π 1 π 0 π¬ 1 π 0
Come to Poland and try to find sun in November :)
28.11.2024 07:48 β π 1 π 0 π¬ 1 π 0
Nice :) I wish I have such discipline to do so. But I use commit amend a lot to avoid commits like "fix typo". Sometimes I use cherry pick to split Pull Request into smaller ones.
28.11.2024 07:46 β π 0 π 0 π¬ 1 π 0
Ok, I'll check that. Thanks for help!
27.11.2024 10:02 β π 1 π 0 π¬ 1 π 0
I don't but I've been thinking about it lately. I plan to add time-blocks to my calendar just for myself to focus on current task. I believe it could be useful in time I have multiple project/tasks to tackle with.
27.11.2024 09:57 β π 0 π 0 π¬ 1 π 0
I tried to use your app, but I've got "Profile not found". Is it because my custom handle?
27.11.2024 09:53 β π 1 π 0 π¬ 1 π 0
I've heard Raycast is great, but unfortunately I can't install that software on my work laptop :/ But I use some custom basic snippets in my IDE. For example, for creating component.
27.11.2024 09:22 β π 0 π 0 π¬ 0 π 0
The repository includes a step-by-step guide to help you configure and create your own aliases effortlessly. Start saving time and streamline your workflowβyouβll thank yourself! π
27.11.2024 08:01 β π 0 π 0 π¬ 0 π 0
GitHub - mszkudelski/aliases: Aliases for oh-my-zsh config. Mostly git commands.
Aliases for oh-my-zsh config. Mostly git commands. - mszkudelski/aliases
What about portability?
I sync all my aliases between personal and work devices using a remote repository: github.com/mszkudelski/...
This ensures I can apply updates across devices with a single terminal command.
27.11.2024 08:01 β π 0 π 0 π¬ 1 π 0
I also use combinations like:
gch master (switch to master branch)
gpl (pull the latest changes)
gch - (return to the previous branch)
gr - (rebase changes)
Together, these make keeping branches up to date seamless.
27.11.2024 08:01 β π 0 π 0 π¬ 1 π 0
And hereβs my favorite:
guc, which executes:
git add .; git commit --no-edit --amend; git push --force-with-lease
This command updates the latest commit with new changes and force-pushes itβensuring Iβve synced (pulled) everything beforehand.
27.11.2024 08:01 β π 0 π 0 π¬ 1 π 0
Terminal aliases have been a cornerstone of my productivity for years, especially for tasks like Git or npm commands.
Let me share some insights and tips! π§΅
For example, instead of typing:
git commit -m, I use gc.
git checkout -b becomes gcb.
(link for config instruction below)
#programming #it
27.11.2024 08:01 β π 2 π 1 π¬ 3 π 0
So you use rebase and commit amend a lot?
26.11.2024 19:49 β π 0 π 0 π¬ 2 π 0
Yep, some tests were duplicated and I removed them during this refactor. Or they just tested some not important aspect of feature which additionally was already tested by jest.
This refactor was about test optimization in general but also reviewing if every test is necessary.
26.11.2024 16:25 β π 1 π 0 π¬ 0 π 0
AI @ OpenAI, Tesla, Stanford
Allegro is one of the most technologically advanced companies in our part of Europe. Allegro is also over 2300 IT specialists of various specializations, developing our e-commerce platform.
https://allegro.tech/
Writing Scaling Fast,a book on lessons learned from ~15 years of engineering in tech startups.
blog β΅ http://swizec.com
prev book β΅ http://SeniorMindset.com
Tech writer at logrocket.com, sitepoint.com and refine.dev π
Built DevTunes FM (1.2M+ listens) and DevQuizzes (900K+ answers) π
Developer @ Documen.so (open-source Docusign alternative).
- catalins.tech/links -
Developer https://francescociulla.com
Solopreneur, Indie maker, 230K followers on X, 200 side projects
β‘οΈ bskybanner.com
β‘οΈ savetobookmarks.com
β‘οΈ csabakissi.com
β‘οΈ tweethook.com
β‘οΈ folll.io
β‘οΈ sqlzap.com
Software Engineer. Public mentor. Making the web faster.
Blogging at https://markodenic.com.
Developer and Content Creator
https://florin-pop.com
Serial dabbler.
π₯ Developer Advocate @ https://WeAreDevelopers.com
π§ Building indiebuilds.co & supabooking.com
π₯ Corp. video production https://wearespotlight.co.uk
colorhub.app - profileme.dev - svghub.vercel.app
Owner of cliowebsites.com
Follow me for web dev, SEO, and WordPress content π
π₯ best AI SaaS boilerplate - MkSaaS.com
π best directory boilerplate - MkDirs.com
π best directory for indie makers - IndieHub.best
π directory of boilerplates - BoilerplateHunt.com
Currently building https://blueview.app
VP of Software Engineering - Front End Lead @JP Morgan Chase
I post about all things web related with a focus on building products!
Web developer https://devluc.com
Solopreneur β’ Founder PQINA β’ Maker of Pintura and FilePond β’ Web enthusiast β’ Loves Bouldering β’ https://pqina.nl
π©πͺ building for πΊπΈ
Nerd with a hint of Aerospace Engineer / (prev prescene.ai)
Solopreneur making:
π
https://NailDesignsAI.com
π± https://DepthWallpaper.com
π https://SkyFrom.earth
π Spatium.earth
Junior Software Engineer @xlab_si / @ISL_Online
Full-stack software developer π¨βπ» | Founder π‘ Startup & IndieHacker
Alex hormozi's new book launch event: https://shop.acquisition.com/pages/register?via=term
π€ Tech β π¨βπ¨ Web Design β β€οΈβπ₯ UI/UX β πΈοΈ Web Dev
Co-Founder of @nordcraft.com β The Web Development Engine π²
Writes stuff here: svenning.io βοΈ
Domesticated Viking πͺπ£π©π°
Founder @ Devographics. I run the State of JS/CSS/etc. surveys. Kyoto, Japan.
https://sachagreif.com/
https://devographics.com/