Mongoose lean()
Pro Tip with Mongoose: you can use `.lean()` method to return plain JavaScript objects, instead of Mongoose document instances. Which is much faster/less memory-intensive - ideal for read-heavy operations 🚀
#mongodb #mongoose
@pierrehenry.dev.bsky.social
Pierre-Henry, AI Data Scientist & Senior Software Engineer. Incredibly passionate about AI, machine learning, data science, and emerging technologies. I could happily talk all night about AI and IT with anyone who’s keen! https://github.com/pH-7
Mongoose lean()
Pro Tip with Mongoose: you can use `.lean()` method to return plain JavaScript objects, instead of Mongoose document instances. Which is much faster/less memory-intensive - ideal for read-heavy operations 🚀
#mongodb #mongoose
Great side projects
Who else is working on exciting data side projects this evening? 🌆🤗
#HappyDay #SideProjects #PassionProject
Coffee slow-down break
How is your day going…? ☕️ Wouldn’t it be a time to slow down … 🤔
#beautifulday #happymoments #nowmoments
Doing TDD helps to re-organized better the business logic of your application
In programming, TDD forces you to reorganize and simplify your business logic. Doing it, you’ll write smaller and more maintainable code.
Writing tests first makes you (AI) think through your design before implementation, leading to cleaner software architecture👌
#TDD #DrivenDev
Seriously, this simple shortcut is a real game changer for productivity! ✨
#shortcut #apple #writingTools
Keyboard shortcut for writing tools - Show Writing Tools triggered with shortcut
This is how easy you can setup a keyboard shortcut for Apple's Writing Tools🚀
Go to System Settings → Keyboard → App Shortcuts
Menu title: "Show Writing Tools"
Shortcut: ⌘⇧W (or whatever you prefer)
You can then instantly use AI writing assistance system-wide without touching your mouse
#keyboard
Dependency Injection enables Single Responsibility Principle
Dependency Injection enables Single Responsibility and Open/Closed principles by letting you swap components without modifying existing classes.
This keeps your code flexible, testable, and easier to maintain as your service scales! 💥
#CleanCode #SOLID #SoftwareArchitecture
All the mistakes and complete lack of apologies from @Apple and the Apple Stores have been exhausting. We should only support companies that truly care about providing excellent service, and Apple has consistently failed to meet expectations.
#DisappointedInApple #backToLinux
For the last 1.5 years, my experience with @Apple and their customer service has been close to disastrous. The time spent going back and forth on recurring problems at GeniusBar appointments waiting hours, along with the poor service and very poor commununcation from Apple Store
02.12.2025 11:39 — 👍 0 🔁 0 💬 1 📌 0I’m also curious to hear if others have made the switch too 🤔🤔
#Omarchy #hyprland #ArchLinux #linux #macosreplacement
Mac replacement
I've recently started using Omarchy as my new Mac replacement! And honestly, it has been fantastic! Fast, nicely opinionated for devs, reliable, and with all the tools I need, already setup for me (Neovim,fzf,ripgrep,zoxide, Xournal++, Alacritty,..)
#Omacom #linux #macreplacement
Want to learn more about great software engineering principles?
👉 dev.to/pierre/clean...
Learn more about the essential principles and problem-solving techniques all AI-first engineers should be aware of at pierrehenry.dev
#learning #engineering
Clean code architecture
Dependency Injection enables Single Responsibility and Open/Closed principles by letting you swap components without modifying existing classes.
This keeps your code flexible, testable, and easier to maintain as your service scales
#CleanCode #SOLID #SoftwareArchitecture
Enter exactly as it appears on the screenshot, "Export as PDF..." or "Save as PDF..." in the Menu title field.
29.11.2025 02:11 — 👍 1 🔁 0 💬 0 📌 0Building great software, not matter where you are
Stop writing confusing functions. For instance, use named parameters in TypeScript for clean, maintainable code. Learn more 👇
dev.to/pierre/name...
#typescript #code #refactoring #betterdev
THE CYCLE OF SUSTAINABLE GROWTH
The Sustainable Growth cycle is a pattern in businesses that are able to grow year after year without significant difficulties.
This cycle has three distinct phases:
Expansion, Maintenance, and Consolidation.
Happy growth! Happy success! 🚀
#learning #growth #success
github.com/anthropics/...
#github #ai #claudecode #automation
AI Claude Code
Few weeks ago, I started using GitHub Claude Code Action, using Claude mentions in PR comments. It saved me so much time and superfluous context switching by automating the repetitive review tasks, implementing fixes, updating docs, … and significantly improved my productivity!
23.11.2025 21:09 — 👍 0 🔁 0 💬 1 📌 0Meet your attentional space
🎧 Master your Attentional Space ⚡️
Focus is your engine. Focus is progress. Focus gets you in the zone.
Being in the zone drives your progress forward. The right environment takes you to the next level!
#Focus #Productivity #DeepWork #MentalSpace #Concentration #HyperFocus
I (finally) found the ideal battery management tool for macOS
bsky.app/profile/pier...
Health is, of all treasures, the most precious and the most poorly guarded
Joseph Sanial-Dubay once said, health is, of all treasures, the most precious and yet the most poorly guarded
#health #treasure #takecare #wellbeing #goodshape #life
What’s your favourite way to organise the perfect and rewarding day as a software engineer?
I share my approach in this post → dev.to/pierre/how-...
#Productivity #TimeManagement #SoftwareEngineering #Career #Startup #DevLife
This is why you should avoid using NPM UUIDv4. Faster and natively available, Node has you covered!🏆
→ dev.to/pierre/you-...
#node #performance #javascript #uuid
Battery-Toolkit for macOS
I used Battery-Toolkit before (github.com/mhaeuser/Ba...), but it felt a bit complex to set up and had some small issues. ‘battery’ by Mentor Palokaj is light and simple.
Hope it helps you get better battery control on macOS, until Apple hopefully fixes it...
#OpenSource #Apple
Limit macOS battery to 80% with 'Battery' GUI/CLI program
‘Battery’ is the best free tool I’ve found to keep your Mac’s battery in good shape!
github.com/actuallymen...
I’ve been using it for two weeks and it works great. You can even install the CLI only, no need for the GUI.
#macOS #MacTips #BatteryHealth #MacUtilities #DeveloperTools
How to easily configure the Save or Export as PDF action with a macOS shortcut, Cmd+Ctrl+S
[Mac Tutorial]
How to set up a macOS shortcut to Save or Export as PDF with Cmd+Ctrl+S. A simple way to turn any document into a PDF in just a few clicks.
#macOS #Productivity #Shortcuts #MacTips #MacOSTips #TechTips #Apple #PDFTools
Stephen King's Writing Wisdom
Stephen King's once said 'Write with the door closed (for yourself), edit with the door open (for others)'
And this is so true! First, use full creativity flows when you write for yourself, then polish for your audience🚪✍️
#WritingTips #StephenKing #writing #focus #productiivty
What are your thoughts on tackling and solving problems?🧠
I've been using the rubber duck debugging method for years now, and it's honestly one of the most effective techniques I know.
👇 Just explaining the problem out loud often reveals the solution!👇
dev.to/pierre/rubb...
Lizards need monitoring tools!
08.11.2025 21:58 — 👍 0 🔁 0 💬 1 📌 0