Random notes, anecdotes and random scribbling from my tech life and work brain.
A brand framework from Andy Raskin
Feedback type: Speed, Quality or Priority
• scribbleStickiness matter
Manager: I am worried about dev speed
• scribbleTurborepo: TypeScript gotchas
• scribbleNginx - why would I use it?
• scribbleESM vs CommonJS
• scribbleStartup execution: Focus on few things
Focus is critial. There's 100 important things to work on every single day, so you need to say no more often than you'd like.
Make everyone do support
I like to think of a support ticket as a condensed result of a user test. It's a user telling you what they want, what they don't understand, and what they don't like. Treasure it, and spread that knowledge across the company by having everyone do customer support.
Sales commission in a growing startup
• scribbleScalable frontend velocity
Make it easy to delete: colocate by feature. Make it easy to build it right: automated checks. Make it easy to be newb: reduce knowledge-requirements, embrace dumb questions. Migrate incrementally: large diffs fail. Use a monorepo: reduced error rate. Make code quality derivative positive: make things better over time.
Time zones: It's not just «use UTC, man»
«Hi. This is my first time at Developers Anonymous. My name is Tomas, I'm a coder and I've built a calendar»... Time zones are f***ing hard. The last 6 months I've reported and fixed bugs in Moment, dayjs, date-fns-tz and React Aria.
Review your own PRs
I wrote in a (student) newspaper once. I bet I wrote ~10 typos per page. 9 of which I caught on my own review. Similarily, most bugs I write are apparent to myself when I review the code. It's like its two different brain modes: producer and reviewr.
Build for today. Only today
I often add a field, model or endpoint that I need 'tomorrow'. When 'tomorrow' finally shows up, it's usually not quite what I need. Note to self: Stop building for tomorrow. Stop build it 100% complete. Stop over-generalizing to fit future scenarios.
Don't abbreviate variable names
Variable name: don't make them short and cryptic – let them be as long as they really are. Sidenote: Subscribe to that channel, it's great.
Don't write comments
There is a consistent way of describing how a program should work, it is called writing code. Writing comments that describe how code work is usually an excuse for writing bad code. Exceptions: documentation/issue links, and sometimes bad code is required.
Test "commit driven development"
Writing smaller commits is a constant practice that I feel often pays off. The Primeagens reflections on the topic is worth seeing (from 11:16, earlier parts are so so). Challenge: for your next feature, write commits messages first!
DRY does more harm than good
«Please DRY up your code» is usually bad advice – abstraction creates coupling and complex code. I'd advocate ALRY – ALways Repeat Yourself (once). When that code has matured, you are in a better position to see if it's a matching concept that can be combined to common code – or if it's just accidentally similar.
Speed: Performance vs Velocity vs Adaptability
The speed of your app can be seen as a combination of performance (how fast the user experiences it), velocity (how fast you add features) and adaptability (how well suited code are for future changes). TLDR of the talk: Don't care about performance until it's a problem. Then measure, test and measure.
React.js: The Documentary
React.js: The Documentary is a 2015 documentary film about the React.js JavaScript library. Bring popcorn?
create-t3-app
The easiest way to get started with the best tools for building a modern web app.
astro.build
Build islands of interactive Svelte, React++ apps inside a static site. Perfect for building personal sites.
Typescript: don't use interfaces
Use types instead of interfaces in Typescript. Except when you have to use interface.
Typescript: do not use enums
Typescript enums are bad. Never use them, use a record as const instead. Note: This still applies after the 5.0 release with enum improvements (they are not bad instead of terrible).
No more CSS-in-JS
A foreshadowing about stitches, emotion and styled components dying off, and tailwind becomes emperor
react.email
Amazing. Crafting e-mails has been a remarkable pain in my butt several times. This looks like it could be a game changer.
State of JS 2022
Superb stats on the state of JavaScript. TLDR: NextJS still nice, Svelte is great, and watch Solid. Vite or Turbopack replaces Webpack. Playwright replaces Cypress. Turborepo replaces Lerna.
React Query, the complete tutorial
Comprehensive, well-written writeup of React Query. I've learned a lot about my favourite data fetching library.
The Grug Brained Developer
Hilarious text, just to the point on why thinking stupid about code is being very smart. HARD RECOMMEND.
Email providers: AWS SES, Mailgun, Sendgrid, Mailchimp?
Cows are killing bio-diversity
Use plain text emails
• statementSuggested data structure for logging
• scribblePostgres needs built-in connection pooling
Starting with Google BigQuery
Reminder: iPhone wants H.264 encoded videos
Firebase data modeling
Burn Firebase to the ground
• rantDeploying GraphQL API to Google cloud
Aurora serverless starts at 100$ month
No rules rules
How-to: Run npm/yarn with one command
NextJS: Add state to URL query params
• guideHow will you measure your life? 🤔
Please lower case db table names
• statementA lunch about marketing
Make Raspberry Pi display an URL on boot
• guideThe effective engineer 👍
Adding system metrics dashboard to logz.io
• guideHow-to: find bugs with git bisect
1Password vs LastPass for teams
How to load web fonts quickly
• guidePassbolt on AWS
• guideBlitzscaling pt. 2: Management
Blitzscaling pt. 1
The job of my boss: make me feel trusted
Extend the circle of safety to the outer parts of the organisation. When employees feels safe and trusted, they can spend they energy being creative and productive.
Understanding ESLint config
• scribble[package] has unmet peer dependency
• debuggingTake initiative beyond what is expected of you
«Guest leadership» is about taking responsibility to try to solve a problem or task that is not your own (alone), without needing an invitation to do so. Increase trust and ownership by giving your team the freedom to own the outcome and trust to solve things their way.
Migrating to React Redux hooks
Integrate task management with code
• guideStop using defaultProps
• statementConvert mp4 to gif
Setting up a new developer Macbook
IDE shortcuts
Stop using default exports
• statementGatsby won't last
• statementThis is how you do Pull requests
• guideA good standup has 3 points
• statementAlways use Exact types in Flow
Where is my PostgreSQL logs?
Quick http benchmarking with curl
• scribbleBoto3 - copy, create files + cloudfront invalidations
Adding a python API handler with serverless
Creating a Google Chrome Extension
A Prettier JavaScript Formatter
While ESLint eliminated the need for people to talk about code conventions, Prettier can eliminate the need for people to think about code formatting. 10 000 thumbs up! I will never work for a company without autoformatting again.
React Conf 2017: A Prettier Printer
While ESLint eliminated the need for people to talk about code conventions, Prettier can eliminate the need for people to think about code formatting. 10 000 thumbs up! I will never work for a company without autoformatting again.
CSS systems and principles
• scribbleStop using semantic class names
• statementWhat skills does an it consultant need?
• scribbleAccess Google Analytics API with OAuth token
How to add Web App Manifest
AWS S3 and CloudFront workshop
Getting started with Hubot + Slack
Custom Slack slash commands
Elastic Beanstalk with Terraform
Elastic Beanstalk – In a VPC
GraphQL: Designing a Data Language
GraphQL will replace REST, and the world with be a better place with end-to-end typing safety.
HTTPS for AWS CloudFront and AWS ELB
Using AWS Route 53 and SES to handle DNS and e-mail
• guideBuild screen bootup
Create Elastic Beanstalk app with Java 8
• guideAWS Elastic Beanstalk
Send AWS EC2 logs to Slack
Send AWS CloudWatch Alarms to Slack
Add S3 bucket + CloudFront using Terraform (example)
• guideAWS CodePipeline
• scribbleAdding Freshdesk to Slack
Startup workflow toolkit
Porting a React app to Phonegap
git cheatsheet
Don't convert SVG to PNG in the browser
• rantES6 notes
• scribbleJavascripts var, let, and const
• scribbleD3 + article combo ideas
• ideaSet index.html as default file on S3 bucket
React intro notes
How to add hubot to slack
grep middle of file (unix)
Awesome webdeveloper links
• scribbleAWS rules of thumb notes
• scribbleProfiling in Chrome Developer Tools
Chromes Awesome Developer Tools
A tour of the Developer tools: emulate network speed. emulate devices. JS debugger. console log timing. profiler.
Sending SMS from python via your phone
• guideAdd S3 bucket using awscli (example)
• guideAdd S3 bucket using Terraform (example)
curl headers only
Django on Heroku with AWS S3 for files
django rewrite / redirect to new urls
Show environment variables in Heroku
• guideMonitor-driven development
• scribbleParallax: solve it with CSS
• rantslides.com
This replaces PowerPoint for me: native to the web, simpler, with an open-source variant.
Export data from one Django to another
Do not design your own newsletter emails!
Django + Heroku bootstrap
Center content in HTML mails for OWA
Sending and receiving JSON over Bluetooth
• guideFresh Macbook and a set of neat tools
Django autocomplete in (virtualenv) shell
jquery confirm modal using bootstrap
Running Django with nginx (on webfaction)
Get python, pip, virtualenv without sudo
pip on python3: Can't decompress data; zlib not available
• debuggingNo module named '_sqlite3'
Building a better Bootstrap
Many mini nuggets on CSS systems. cssstats.com, atozcss.com, sassmeister.com, thesassway.com
fork: retry: Resource temporarily unavailable
• debuggingIgnore webkit-*, moz-* when typing css
• scribble7 ineffective coding habits
Don't write comments, don't write off the line, don't make complex methods with many parameters, don't make complex methods with many parameters, don't do lousy encapsulation, testing should be a reflection of your functions.
Clean Code III: Functions
Functions should do 1 thing. And be short. With few args. Without comments.
bash backup of webserver (FTP and SQL)
Git repo on FTP-server
Mount FTP-server in debian using curlftpfs
Automatic MySQL and FTP backup
Facebook: Invite all friends to event
• ideaWeb Icon Fonts
• scribbleTrack custom events with google analytics
Cron tabs: create and delete
• guidegit: Replace master branch
• ideaSFTP in Finder
Alfred for Windows
Humørteste sosiale medier