I recently finished listening to The President is Missing by Bill Clinton and James Patterson (while doing some work in the back yard). 📖 🎧
It was pretty good… not amazing but enjoyable nonetheless.
Web developers: if your password field doesn’t let my browser auto-generate a unique password and doesn’t let me right-click on it to paste a generated password in, you’re doing your job very wrong
(I’m looking at you “Smart”sheet)
I wish I’d known about
.rubocop_todo.yml last time I experimented with adding RuboCop to an existing codebase!
I used draw.io again today for a flowchart. It’s no OmniGraffle but it’s pretty amazing how good a client-side web app can be, especially considering it’s free (and ad-free)!
When writing change logs, commit messages, code comments, method names, project plans or just about anything else, don’t forget to explain why.
Whoever is reading it (future you?) can probably figure out what you did… but understanding why is much harder and way more valuable!
It has taken me 5 days to knock down our old back fence and put in 7 new fence posts. Tomorrow I hope to finish the rails (and maybe start on the palings). Tuesday I hope to finish the palings.
And then I hope to never build a fence again!
Embrace the conceptual compression of Rails… Don’t think you need to understand everything from day 1 — DHH
Still something I struggle with. So easy to focus on all the things I haven’t yet learned!
All Micro.blog hosted blogs now come with free sandpit blog so you can try out theme and design changes! 🥳🎉
I just added my vote for a Micro dot blog icon to be added to FontAwesome:
The circle of life continues:
Project Zero released details of a sustained (multi-year) and regularly updated iOS exploit suite.
I could barely follow a sentence of the iOS exploit chain articles but the last post demonstrating the capability of the implant is terrifying.
Even though the implant wouldn’t survive a reboot, by then the attacker (and anyone who happened to be listening to the unencrypted network traffic the malware sent back) already has your entire keychain.
As the author points out, this is a failed (detected/patched) exploit… it’s possible there are others still out there.
Xero doesn’t support line items that have a mix of GST and non-GST items. To add a mixed invoice you have to add the taxable amount on one line and the non-taxable amount on another. Unfortunately many invoices simply provide the total amount paid and the GST included, which means doing the calculations (estimations) yourself.
Most of the time you can just multiply the GST paid by 10 to find out the taxable portion and use that to derive the exempt portion:
# converted to cents for simplicity total = 9794 gst = 566 taxable = gst * 10 # => 5660 exempt = total - gst - taxable # => 3568
In this case I happen to know the “correct” amounts were actually $56.65 taxable and $35.63 exempt but we can’t know that for sure based on the inputs we were provided. Our calculated answers are within the range of valid solutions and everything adds up correctly.
However, this formula doesn’t handle some (legal) edge cases. On a $9 invoice with $0.82 GST we end up with a taxable portion of $8.20 and an exempt portion of -$0.02. It’s an easy mistake to make.
To correctly derive valid values for the taxable and exempt portions in this case we need to add a conditional:
total = 900 gst = 82 taxable = gst * 10 # 820 if taxable + gst > total taxable = total - gst # 818 end exempt = total - gst - taxable
Fantastic interview with Sandi Metz. There were two things she said that I wanted to write down but I was driving. No matter, I will happily listen to it again!
This hardening guide for Rails apps is big but clearly written and has lots of links if you need more information about any steps. Bookmarking for future reference!
Swedish school district in privacy hot water after tracking student attendance using facial recognition.
It’s getting easier and easier to do!
“There is no quick fix, but there is a fix”
Something to remember with relationships, work and learning new skills… tricky lesson to learn though!
So apparently Stripe has 45 developers…
…whose entire job is inwards focused, trying to make the developer experience better for the rest of the development team! 🤯
How not to write error messages:
>[Error] Script lines: 1-9 -------------------------- An unexpected token "" was found following "". Expected tokens may include: " table_name".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.22.29
Today I learned that
bundle open is a way to easily look inside Ruby gems!
Today I learned a bit about “Mutant Testing”… slight variations (mutations) in tests or test inputs. If a test still passes (a mutant survives) you have a potential gap/flaw in your code or tests
Signal is an excellent cross platform messaging app, a great alternative to WhatsApp for those wanting less Facebook in their lives.
I often keep browser tabs open on my phone with the vague thought that I’ll read/watch/share that later… and then never do anything with them.
Today I learned you can bulk close tabs by tapping and holding on the tab button (overlapping squares) in Mobile Safari
A mess is not a technical debt. A mess is just a mess. Technical debt decisions are made based on real project constraints. They are risky, but they can be beneficial. —Uncle Bob