HNHacker News
TopNewBestAskShowJobs

codebeaker

1,632 karma · joined May 4, 2012

http://lee.hambley.name/ http://www.capistranorb.com/ https://www.harrow.io/
submissionscomments
codebeaker··on Ask HN: How to Buy Microcontrollers?
Reply to myself having done a bit more research

- https://docs.onion.io/omega2-project-book-vol1/omega2-intro.... looks amazing

which I found researching and filtering in Mouser's embedded computing -> system on module page

- https://eu.mouser.com/Embedded-Solutions/Computing/System-On...

codebeaker··on Ask HN: How to Buy Microcontrollers?
Thank you sincerely for one of the most valuable interactions I've had on the internet in recent memory.

Perhaps I've been deceived by how "simple" the schematics for the Pi compute module look, and overconfident after my first experience designing PCBs. There doesn't _seem_ to be that much (that I would need) actually routed on the pi compute module (hdmi, audio, etc, etc, etc)

I always seem to forget about NXP family of chips, but indeed NXP seems to do an amazing job of supporting their products and pricing competitively.

Again, my sincere thanks <3

codebeaker··on Commercial submarine trips to the bottom of the Marianas Trench
Novel naming of the submersible vessel too, it's named after one of the hero-characters from an Iain Banks novel (one of The Culture series).

Nice juxtaposition using a name of a space faring craft for a deep ocean sub.

codebeaker··on Proxyman – native HTTP/HTTPS requests observation and manipulation app
I couldn't find the Linux version, perhaps something is wonky with the browser/os detection, it's assuming I'm on a mac and showing macOS screenshot previews, etc.
codebeaker··on RuboCop 0.80: Ruby static code analyzer and code formatter
I'd say that in our environment we introduced Rubocop into a 4 year old Ruby project that started on Ruby 1.9 and is now on 2.5, our code has a lot of warts.

We run rubocop (including a handful of our own custom cops for enforcing US-english spelling, and some specific "remember to use a transaction here") only on changed files (using codeclimate)

That means as we gradually touch more and more of our older code, we slowly enforce the styleguide.

We don't run a lot of custom configs globally (none, I think) and disable selective overzealous cops on specific lines, or blocks.

Some notable annoyances are `def Something()` which is named this way to model it after the coercions in Kernel, which rubocop complains about because of the pascal casing, and a couple of cases of too-long-lines in long, long, long doubles/mocks in rspec specs, which is a separate problem of its own.

codebeaker··on Raw Gadget is a kernel module that allows to emulate USB devices from userspace
Could this be useful to "mock" A USB device for integration testing hardware (or specifically writing specs against not-plugged-in-hardware)?
codebeaker··on The sad state of screen sharing on desktop Linux
The Elgato 4k HDMI capture card at least has no linux support and cannot be made to work. I believe the non-4k version can be made to work.
codebeaker··on OT and CRDT trade-offs for Real-Time collaboration
I have been using Automerge recently for a project, and I have found it to be very, very user-friendly.

Our use-case is offline-editing of documents with an eventual sync-with-yourself-online. It's mostly there as a sync tool, not as a p2p colalb editing. Unless you count yourself as a peer, I guess!

We store a document in local storage which is the result of `Automerge.save(automergedoc) => serializable string`. That can be loaded with `Automerge.load(s) => doc`.

"Changes" are a first-class concept in automerge (makes sense, I guess) so you can do

   before = Automerge.from({..some doc..})
   after = Automerge.change(before, "optional commit msg", (doc) => doc.hello = "world);
With that done, you can get a diff, `Automerge.getChanges(before, after) => [changes]`.

Those `[changes]` are what we try and send to a server and keep them in a `Set()` for each document (background sync, service worker, etc make a nice experience.

This is all wrapped up in Redux, and a middleware that captures the changes, and a reduxStore subscriber that puts the document back into local storage after any changes.

It is for the application programmer virtually transparent, and so far we've yet to find a fault with it.

I'm sure I'll come to regret making "changes" my principle data type, as the server implementation just sees serialized blobs of data, and has no concept of the structure of the document. That's solveable if I need it ever, because there's a protcol compatible implementation in Rust, and I could always use the JavaScript one on the server too, just haven't needed yet.

The serialization is also quite large, in the order of kilobytes for what are actually quite small docs, but they do contain the original commit messages too, and the Automerge team is planning to release an optimized serialization format early this year, which they say will be especially useful for fields with lots of changes, such as text fields, which currently pay a heavy toll in terms of tracking `[changes]`. Fortunately that also doesn't affect me.

I can also +1 some of the advice to keep your whole document in a CRDT. We use React+Redux, but since React Hooks made stateless functional components a reality, we felt it was appropriate to use React exclusively for the UI state, and track only document states in Redux reducers. It feels light-weight and sustainable, although we're only about a month and 5k LOC into the project. Time will tell I guess.

codebeaker··on Home in Nix – dotfile management
GNU Stow is _great_ for this. I have the following in my dotfiles dir:

    [~/code/dotfiles]$ tree -a -R -L 2
    ├── aws
    │   └── .aws
    ├── git
    │   ├── .gitconfig
    │   └── .gitignore_global
    ├── .gitignore
    ├── .gitmodules
    ├── gpg
    │   └── .gnupg
    ├── README
    ├── ssh
    │   └── .ssh
    ├── tmux
    │   ├── .tmux
    │   └── .tmux.conf
    ├── vim
    │   ├── .viminfo
    │   └── .vimrc
    └── zsh
        ├── .oh-my-zsh
        └── .zshrc
I can then stow any of these into my home dir with:

    $cd ~/code/dotfiles
    $ stow -t $HOME git
That sets up a link from all the files in my home dir like:

    .gitconfig -> code/dotfiles/git/.gitconfig
codebeaker··on Show HN: Ryeboard – Visual Workspace
Not to take away from OPs product announcement at all but recently I ran a remote event storming workshop using https://miro.com/ with a standard "whiteboard" and their regular postits feature.

The sizing and color options, the simple way some small things in the UX works to make grabbing a postit fast, and coloring it correctly was really, really surprisingly nice

codebeaker··on Arduino Goes Pro at CES 2020
I wonder if this will finally bring HD video encoding to arduino platforms?! I'll have to check what kind of VPU IPU the STM32H7 has, at least I don't see how they can break out the IO for a camera interface, but this would be amazing.

Looks like the STM32H7 supports one MIPI CSI-2 peripheral (and/or one MIPI DSI).

Another comment on this thread mentioned on the back of this module are two long flat board-to-board style connectors.

codebeaker··on Tell HN: I used to be homeless and want to work as a software developer
It might help to put your contact Info in your profile. I wanted to contact you to offer maybe some help
codebeaker··on Build Your First Real-Time App in Node
I'm on the fence, having done embedded work, I understand the importance of hard-/soft-realtime distinctions.

Our technical terms to some extent do need to be gate-kept against having their meanings watered down, but I've seen so many "realtime" browser projects, that I'm afraid we have to accept it has entered into the common vernacular like "serverless" has, in spite of the inaccuracies.

codebeaker··on Pwn the ESP32 Forever: Flash Encryption and SEC. Boot Keys Extraction
The efuses are still part of hardware initialization, before one gets into the bootrom, so it's feasible to assume that this 500us is still "hardware" init, during which time it's typical for an MCU to be reading input from pins to know about voltage, clock, mode selector jumpers, etc.

And, the way all of those things work is by setting registers so that they're visible in the software either _still_ in a register, or mapped into the address space.

Edit: I checked your profile and see that you're an embedded engineer, so I must have missed some nuance in your question, because power glitching the boot sequence to mess with hardware init it a really popular vector for attacking embedded devices. Please feel free to disregard my reply.

codebeaker··on It's later than you think
I took a step back in my career to work from home, and bring my kids to the kindergarten with my bike some days, and take a late lunch and eat their "dinner" with them, and it has been totally, totally worth-it.

Remote work being a set-back is possibly a side-effect of how I selected my new gig, but it has suited me so well, I don't care about the (temporary) career stagnation.

Beautiful story, I felt it hard.

codebeaker··on 2019 Hyundai Kona EV Explodes When Parked
I've read cases (in the US) where the electric charger shares a toggle circuit with the washer/dryer combo or some other high current consuming device. If your car charger kicks in whilst you have the dryer on it can trip the breaker.

I could also imagine that having a breaker in the house for a high amperage circuit which is regularly toggled-off is just a good safety precaution against the neighbors stealing your power!

codebeaker··on OpenSSH taking minutes to become available, booting takes half an hour (2018)
Needs a (2018) at least (article date) in the headline. Although it reports an issue introduced to Linux in (2013) which was "discovered" in (2017).
codebeaker··on Vugu – Modern UI Library for Go and WebAssembly
Does "modern" here mean that it supports all the expected ARIA accessibility standards, or are they talking about a shiny developer experience and fancy APIs whilst ignoring usability completely?

I checked some examples in the playground and they seemed to be devoid of any kind of accessibility tags, and the generated HTML sources didn't look super friendly to screen readers.

codebeaker··on Volkswagen backed shuttle service will grow in Hamburg
This is wonderful. The zone covered by the MOIA service is restricted by the number of vehicles they have available, and I live a couple of Km outside.

For non German speakers, the taxi unions sued to restrict either zone, or number of vehicles back in April and won.

This article is about that being overturned by a higher court and allowing MOIA to extend the fleet from 200 to 1000 vehicles.

There's a paragraph in the article dedicated to "massive criticism from the taxi drivers" where the chairman of the Hamburg Taxi association says:

> ...The aim of the VW subsidiary Moia is to replace as much of today's public transport by private offers...

That implies that he thinks Taxis are a public transport, but of course, they aren't. Taxis have no affiliation with the city to my knowledge, save for some regulation.

Hamburg has an excellent multi-line metro network carrying millions of passengers per day and taxis are prohibitively expensive here. A taxi from my place to the airport, a < 10 minute drive is easily over 30 EUR, with MOIA (if serviced) it would be something like 85% cheaper.

codebeaker··on Mistakes we made adopting event sourcing and how we recovered
> Sorry to be so negative about this topic but I've worked on several of these projects at a decent scale and it's been the biggest disaster of my professional life. The idea may be viable but tooling is so bad that you're almost surely making a huge mistake implementing these patterns in production code.

Quite, which is why I'm both writing a book, and developing tooling to help with this problem. ES/CQRS is a nice pattern that you can explain to someone on the back of an envelope in 5 minutes, but the devil really is in the details.

codebeaker··on Mistakes we made adopting event sourcing and how we recovered
> Not separating persisting the event history and persisting a view of the current state

This seems like the classic half-way that people take when adopting ES without buying into CQRS.

In my experience you need a minimal amount of historical knowledge about an aggregate to validate business rules, and that is strictly orthogonal to ways you may want to build projections over the data.

If I understand OP correctly they are saying that rather than deriving state by consuming their events, they were maintaining a kind of snapshot that served as both the read/write model representation of a given aggregate in addition to storing the events.

It can be very, very tempting to try and reuse "models" in both parts of an application, but some basic scrutiny and some hard-won experience will lead to examples such as how.. in a view model for a User there's almost certainly no need to ever consume PasswordChanged type events, but in the write model (business logic) you may need to consume not only the newest state (to compare for authentication purposes) but maybe some kind of analysis over time of how frequently passwords have been changed recently. This asymmetry is a bit contrived in this case, but I'm sure OP has similar examples from their own codebase.

In reality I have found that at most a handful of fields on otherwise quite rich models ever end up being "rehydrated" in the write model, and rarely ever as dumb attr setters; in the read models by comparison the vast majority of events recorded against any given aggregate end up being used by one projection or another.

codebeaker··on Losing My Perfect Job
Posted by an hour old throwaway account referring to a pseudonymous Medium writer discussing an anonymous company's two year old laying off procedure.

I wonder how this made it to the front page, and what we are supposed to take from it other than "company lays people off after assuring them it wouldn't, employee wasn't given much notice and online accounts were locked out during the dismissal call" all of which, in my experience on both sides of the table is completely normal.

It is standard corporate hedging and damage control, and it doesn't make it right, but it is pervasive.

codebeaker··on Self-Contained Pure-Go Web Server with Lua, MD, HTTP/2, QUIC, Redis Support
Also, according to the spec HTTP servers may not always honour the value in the `Accept-Encoding` header[0].

> Even if both the client and the server supports the same compression algorithms, the server may choose not to compress the body of a response, if the identity value is also acceptable.

I've actually run into this twice in my career and it has been a surprise to those around me in both cases. Both times in the context of small payloads where the server is applying some heuristic about whether to encode or not. (e.g status page stops sending gzipped output when the server is becoming "unhealthy")

[0]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ac...

codebeaker··on Google One
My guess would be a slow introduction of concierge type services linked into their phone AI thing that they launched 6 months ago to great fanfair, and a general move from software service companies (and my bank.) into offering concierge type services in general.
codebeaker··on Lessons learned from creating a real-time collaborative rich-text editor
if jira and confluence allowed this my company would benefit from probably a double digit efficiency boost.

we have to split our "collaborating" to google docs, and our "carving in stone" in JIRA and Confluence.

I'll say though that the "suggested edit" and "comment on a range" features (and the distinct edit modes about commenting, suggesting and approving edits, and free for all battle royale are all valid modes for us all the time.) (300 person SF+intl. software company)

codebeaker··on Lessons learned from creating a real-time collaborative rich-text editor
You both may enjoy http://archagon.net/blog/2018/03/24/data-laced-with-history/ if you haven't seen it already, it's an absolute gem, and touches on exactly this.
codebeaker··on Show HN: Namegine – find a name for your startup or product
> -Im not really a fan of the name, which is a problem that stands out when your product is about good names. "Namegine" parses strangely, I think my brain's looking for another "n" to complete the word "engine" and keeps wanting to pronounce this word "Namm-Egg-Inn". Honestly, I think just NameEngine would be a better name. Obviously very subjective though.

Absolutely, at the risk of bike shedding, for a German/English speaker this parses really strangely. The parent comment nailed the problems I have looking for another missing consonant.

codebeaker··on Hyperledger Fabric: A Distributed Operating System for Permissioned Blockchains
BFTDL?
codebeaker··on Redesigned MacBook Pro keyboard uses new method for repelling dust, says iFixit
I wonder if my late 2016 15" inch has had 4 top cases will be eligible/compatible with this redesign.
codebeaker··on Vibora: Fast, asynchronous and sexy Python web framework
Am I missing some wordplay about vipers and sexual organs or something? What's the "sexy" part of this framework and why is marketing technical products this way deemed to be acceptable?
← PreviousPage 2 of 9Next →