• 0 Posts
  • 21 Comments
Joined 1 year ago
cake
Cake day: June 4th, 2023

help-circle









  • If it had been up to me, I would have included a proper real-time-clock in the design and done things a lot differently.

    But the device was designed by one company and the BLE and processor module by another. For some ungodly reason neither trusted each other, so nobody was given access to the firmware source on either side. I worked for a third company that was their customer paying the bill. I was allowed to see the firmware for both sides, but only read only, on laptops provided by each company, one at a time, in a conference room with their own people watching everything. Yeah, it was strange.

    I was there because the MCU and the BLE processor sometimes glitched and introduced random noise. Turned out the connection between the two parts were unshielded UART with no error detection/correction 🤦🏻‍♂️

    It was concidental that we hit the date glitch. Took all our effort just to get them to add a checksum and retry. The tiny MCU was maxed out of space. No way to fit in any more code for date math.



  • Embedded portable device with a teeny ARM processor. Sadly, no room for linux anything or even an RTC. Every time it connected to a phone, the phone would set its clock so the timestamps were somewhat close to being accurate.

    However, if you swapped out the AAA battery and DIDN’T connect it to the phone at least once, all your subsequent readings would go back to zero epoch and would be forgotten 🤷🏻‍♂️

    Good times.


  • Worked on a project where devices just magically froze, but only during the month of February!

    Turned out the people who had written the firmware had decided to do their own time math to save space and had put in an exception in the code for leap year values. Except instead of February 29th, it kicked in for the whole month. And the math was wrong so you ended up with negative values.

    The product was due for launch in March of that year and was headed to manufacturing. It was by sheer luck that someone ran a test on February 1st and caught the problem.

    Don’t mess with time in code, kids.


  • Haven’t gone through the whole spec, but based on interviews with the CEO, the main advantages are the ability for users to move easily from one node to another without losing anything, and better moderation tools.

    Since at the moment there’s only one BSKY server out there, it’ll be hard to verify the first claim.

    On the content moderation part, Mike Masnick of TechDirt who is deep into the moderation weeds made it sound like their system is pretty well thought out.

    But ultimately, adoption will come down to the community and where they land.



  • A few suggestions:

    • Having people remember all the docker, django, and poetry commands just slows things down. Maybe wrap those in a shell script, or better, in a pyinvoke tasks.py, or more even better, in a CLI using argparse or click. This way, people can install your tool using pip and create new projects, manage, and run them quickly.

    • If you need the user to answer a few interactive questions, questionary is pretty decent. The click library also lets you ask for input, have defaults, and also load values from environment variables.

    • Have lots of defaults in a central .env or config file that people can customize once the project has been created. Things like separate dev, test, prod or local and cloud settings.py files help keep things organized.

    • Think about ultimate deployment. Where is such a project going to get installed? As a single docker container, scalability is limited. Which cloud hosting services can you push to with one command? Add those to your pyinvoke or CLI.

    • When deploying to cloud, make sure security best practices are maintained. Keep SECRETS and API keys in a separate file which is also listed in your .gitignore so it doesn’t get accidentally checked in.

    • Think about the different stages. Initial, ongoing dev, testing, first deploy, and continuing updates after that. What can you do to make the job of the dev easier?


  • Let’s rewind the time machine… the original web concept was addressing a much smaller problem. That a document could reference or ‘link’ to another document. It came right after ‘gopher’ which was used as an index of indexes and had a text-based app that let you navigate the line items back and forth.

    Then came Ted Nelson’s idea of ‘hyperlinks.’ The original web mashed those two ideas together and threw in a sprinkling of SGML. There was no notion of styling of the presentation, a GUI, use of the mouse, multimedia, animation, or ‘scripting.’ It was just gopher with inline links, expressed in embedded markup.

    Multiple other players (Netscape, Microsoft, IBM, et al) morphed and bolted on extensions without really considering the consequences. The thing the web had going for it was precisely this decentralized process. It made for rapid evolution, but it also meant there was (and continues to be) a lot of fragmentation. Anyone wanting to go back and revisit something hacky had a lot of legacy inertia to overcome.

    So here we are today. It’s a messy, junkyard jalopy, but it does just enough that nobody has the time or energy to go back and clean up the technical debt. And if you want to start from scratch, it has to do much better than what is there today, while offering a reason for millions of people to unlearn what they know.

    As for sending ‘processes’ that’s essentially what a VM is. You’re sending a compact process as code (javascript, python, wasm, native binary) that a local runtime executes. We have app stores that manage the lifecycle, and script libraries to create abstractions and hide details. The embedded Javascript VM is as close as we have to a universal code execution environment.

    Sending ‘processes’ around also should account for malicious actors trying to do bad things. We’ve all seen how that ended up.

    That’s not to say people shouldn’t try to innovate, but at this point, it’s like trying to reinvent driving or the telephone.