Details
-
AboutWriting full-time embedded Rust professionally since 2019
-
SkillsC#, C++, Rust
-
LocationThe Netherlands
-
Website
-
Github
Joined devRant on 7/28/2017
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
I am always perplexed by people who write stuff like: "I don't know why people would use Rust, I simply never write code with bugs in it"
Just, lol
Like, using C or C++ is fine of course, but don't pretend you're perfect and that all of your bounds are checked, all of your allocations are freed exactly once and that you never forget to lock a mutex.19 -
Most successful? Well, this one kinda is...
So I just started working at the company and my manager has a project for me. There are almost no requirements except:
- I want a wireless device that I can put in a box
- I want to be able to know where that device is with enough accuracy to be able to determine in which box the device was put in if multiple boxes were standing together
So, I had to make a real time localization system. RTLS.
A solo project.
Ok, first a lot of experiments. What will the localization technique be? Which radio are we going to use?
How will the communication be structured?
After about two months I had tested a lot, but hadn't found THE solution. So I convinced my manager to try out UWB radio with Time Difference Of Arrival as localization technique. This couldn't be thrown together quickly because it needed more setup.
Two months later I had a working proof of concept. It had a lot of problems because we needed to distribute a clock signal because the radio listeners needed to be sub-nanosecond synchronous to achieve the accuracy my manager wanted. That clock signal wasn't great we later found out.
The results were good enough to continue to work on a prototype.
This time all wired communication would be over ethernet and we'd use PTP to synchronize the time.
Lockdown started.
There was a lot of trouble with getting the radio chip to work on the prototype, ethernet was tricky and the PTP turned out to be not accurate enough. A lot of dev work went into getting everything right.
A year and 5 hardware revisions later I had something that worked pretty well!
All time synchronization was done hybridly on the anchors and server where the best path to the time master was dynamically found.
Everything was synchronized to the subnanosecond. In my bedroom where I had my test setup I achieved an accuracy of about 30cm in 3d. This was awesome!
It was time to order the actual prototype and start testing it for real in one of the factory halls.
The order was made for 40 anchors and an appointment was made for the installation in the hall.
Suddenly my manager is fired.
Oh...
Ehh... That sucks. Well, let's just continue.
The hardware arrives and I prepare everything. Everything is ready and I'm pretty nervous. I've put all my expertise in this project. This is gonna make my career at this company.
Two weeks before the installation was to take place, not even a month after my manager was fired, I hear that my project was shelved.
...
...
Fuck
"We're not prioritizing this project right now" they said.
...
It would've been so great! And they took it away.
Including my salary and hardware dev cost, this project so far has cost them over €120k and they just shelved it.
I was put on other projects and they did try to find me something that suited me.
But I felt so betrayed and the projects we're not to my liking, so after another 2-3 months I quit and went to my current job.
It would've so nice and they ruined it.
Everything was made with Rust. Tags, anchors, RTLS server, web server & web frontend.
So yeah, sorry for the rambling.5 -
Me: So, I've been looking through the code and there's barely any comments and documentation. What's up with that?
Him: Yeah, it's really complex and low level, so it's difficult to actually describe what it does.
Me: But that's exactly why you should document it! 🤦🤦🤦
Him: ...3 -
Me: Keep the abstractions in check. Go too far and you'll end up with something called 'thing' or 'object'!
C#: Hold my beer 🍺🍺🍺7 -
Ugh... I don't like how TCP is a stream protocol and how UDP is unreliable and unordered.
I want a semi-reliable, ordered, message protocol dang it!13 -
Heck yes!
I implement a stack trace in my embedded systems!
Whenever a device crashes, it makes a stack dump in an unused part of ram.
After it has rebooted and is connected to the server again, it uploads the stack dump.
The server then opens the correct firmware elf file, walks the stack and associates the debug info from the elf.
The result? A beautiful stack trace with file names, function names and line numbers.
No more guessing where random crashes come from.12 -
Best:
Really getting into Rust. It has taught me so many things.
1. Null is evil
2. Sum types are amazing
3. Compiler can actually have good error output
4. Multi threading is actually really scary if you don't have a compiler to back you up
Worst:
I had to deal with SSIS. It has also taught me many things:
1. No matter how 'mature' a product is, it can be awful. Simply dump a random error code, the user can figure out what went wrong, no need for good error messages.
2. The modern concept of the database is crap. It's a gigantic global state that is used by everyone and owned by no one.
3. Don't use tools that aren't made to be used with version control.
4. Even when you tell your team that it's bad, you will be ignored. -
Rust: Unclear error output is seen as a compiler bug.
Me: 👏
SSIS & SQL Server: Unclear or absent error output is seen as an enterprise feature. It's so mature!
Me: 😩 -
Scratch away the PCB trace that was initially connected and solder a wire straight to the IC pin to connect it it to the place you want1
-
Always nice when you discover that your hardware has an *ELABORATE* HARDWARE OFFLOADING ENGINE with full protocol implementation for something you spent two months writing software for...
Well, at least the current solution works like it is supposed to. Don't know that yet of the hardware implementation.
It would save 4 euro component cost though if we switch to the offloading engine -
With all the people here using and loving Linux, I wonder how many of you have contributed money to either a distro, drivers or the kernel itself?6
-
I think I have configuphobia.
When you need to setup configurations for like anything, it's always super loosely coupled and can break when you even breathe on it.
Database table columns? Configured once.
Authorization management? Create a user and configure the password and username in the application.
Backups? Configure the network path to backup to.
All these things are so EASY to break!
Maybe I'm overcautious, but I really dislike it.
There are ways around it of course, like documentation and automation, but it's all so much work. And even then it's still loosely coupled.
What do you all do to keep your configs working without getting nightmares?3 -
Being alone for so much of the time.
Kinda miss being around my colleagues. Luckily I have a cat that keeps me accompanied during the day!3 -
Have you ever felt that an idea hit you like a truck?
I just had that and my brain went in full analysis mode to see if the idea would hold up under all circumstances. I think it might! But for a good 5 minutes I couldn't think of anything else.
Weird how brains and thoughts sometimes work.7 -
If I wanted to write some article about code, where would you prefer to read it?
Medium? Dev.to? Something else?14 -
So my company is preparing to do a deployment now... It's Friday 4pm...
And it's just yesterday that the build system was upgraded to a way newer version...
Luckily I'm not responsible of things go sideways 😅2 -
So my team lead told me in a code review that you shouldn't use 'else if' in code.
Instead you should best them like:
if
else
if
else
if
else
Apparently that would improve readability...
Am I crazy, or what?18 -
I may have convinced my boss to start using Gitea to manage our git repos! 😆
Right now we have a NAS with bare repos, so we have no access rights, no overviews, no forks, no issues, no pull requests, nothing! 🤐
Now it's time to pray to the gods for his decision. 🤞 -
I'm doing my own sci-fi D&D story and need some new weapons! So why not use programming names? 🤔
So far:
voidpointer
nullifier
destructor
finalizer
One player is also a dev and I want to trigger him as hard as I can 😈6 -
Just got the Oreo 8.0 update for my OnePlus 5T. Yay!
But it broke something, so now I can't debug my app with Xamarin... 😐
Luckily there's already a bugreport on their bugzilla! It seems like it's been fixed. Just need to update Visual Studio. Guess I'm lucky after all. 😁
...
The problem is still there... 😡
Don't know what to do now... 😕5 -
Started the year well :D
Making an app to view our home energy usage and output (solar panels).
Raspberry pi is connected to our energy meter and is used as a server.
But some of you may not like this...
The Pi is running Windows IOT :P2 -
So I just read up on what the language D has to offer. It seems quite good!
- Active community
- Multiple compilers
- Modern (no header files, garbage collector, etc.)
- No VM or framework needed to run it (like C# and Java)
Looking forward to trying it out!
Does anyone have any experience with it? What are your thoughts?7 -
Loving inaccurate documentation...
And it's from a big company as well!
Reset value: 0x0000007F
I didn't get it to work for several hours.
And then I checked...
The actual value it gets reset to is 0.
Just 0. -
So I just finished my first 40 hour work week.
And just an hour ago I had a meeting.
In that meeting I said pretty much this:
"Your old system is rubbish, I want to make a new one"
"Also we can't use the old framework"
"Also it needs to be in a different language that nobody knows here"
And they went for it!
At this point I think I can sell anything to anyone.8