Blog Blog · Dmitry Frank
https://dmitryfrank.com/
2024-02-19T15:43:09+00:00Dmitry Frank
https://dmitryfrank.com/
https://dmitryfrank.com/lib/images/favicon.icotext/html2023-06-11T19:31:57+00:00Dmitry FrankRust Module System Encourages Poor Practices (Comparing to Go)
https://dmitryfrank.com/blog/2023/0611_rust_module_system_encourages_poor_practices_comparing_to_go#
Rust Module System Encourages Poor Practices (Comparing to Go)
Note that I'm not gonna be saying that it's confusing, hard to understand etc. Those things would be subjective, and even if I agree that it's not too intuitive, it's still totally learnable and not a big deal. In this article I'm gonna be talking about matters which are more objective.text/html2023-05-27T14:07:23+00:00Dmitry FrankConnect Four 3D
https://dmitryfrank.com/blog/2023/0527_connect_four_3d#
Connect Four 3D
There is a board game called “Connect Four 3D”, in real life it looks like this:
And as part of my efforts to learn Rust in 2023, I implemented a virtual version of it.text/html2022-12-18T16:49:49+00:00Dmitry FrankTreating Email More Like a Password Manager
https://dmitryfrank.com/blog/2022/1218_treating_email_more_like_a_password_manager#
Treating Email More Like a Password Manager
There is a natural tendency that communication tools, which never meant to be security devices, end up being used heavily for security purposes. This happened to both emails and mobile phones. You know, SMS to a mobile phone is still sometimes the only option for a second factor authentication, despite a lot of evidence that in real life it 's a very bad idea due to SIM swap attacks (check e.g.text/html2022-03-09T09:22:27+00:00Dmitry FrankBulgaria Freelance Taxes Detailed Breakdown
https://dmitryfrank.com/blog/2022/0309_bulgaria_freelance_taxes_detailed_breakdown#
Bulgaria Freelance Taxes Detailed Breakdown
In the past few years I've been living in Bulgaria, working remotely as a software engineer (technically, “consultant”) for foreign companies (both European and US), and by now I have a pretty good idea about all the taxes and other business-related expenses one has to pay in this setup. Since it's ridiculously hard to find a good and detailed breakdown like that (most often you'll find that income tax is 10%, and dividend tax is 5%, which is accurate…text/html2021-09-30T09:15:42+00:00Dmitry FrankMocking time and testing event loops in Go
https://dmitryfrank.com/blog/2021/0930_mocking_time_and_testing_event_loops_in_go#
Mocking time and testing event loops in Go
Initially I wanted to write articles on those two topics separately (mocking time and testing event loops), but during the process I realized that the things I want to talk about are too interrelated: when I need to mock time, it's usually to test some event loop with it, and when I test event loops, typically mocked time is also involved in that.text/html2018-08-15T09:54:55+00:00Dmitry FrankReliable, Secure and Universal Backup for U2F Token
https://dmitryfrank.com/blog/2018/0815_reliable_secure_and_universal_backup_for_u2f_token#
Reliable, Secure and Universal Backup for U2F Token
I really love the security level U2F provides, but together with security, we have to think carefully about the backup and recovery plan. It would totally suck to get locked out of my accounts if something happens with my U2F token. At the same time, it doesn't make sense to have a backup which compromises U2F security.text/html2018-03-02T10:14:33+00:00Dmitry FrankWhy not improve error handling in our Go projects?
https://dmitryfrank.com/blog/2018/0302_why_not_improve_error_handling_in_our_go_projects#
Why not improve error handling in our Go projects?
As I was saying already, I love Go, I really do. And in particular I like the minimalistic approach to error handling: no exceptions, each caller should check the error explicitly and deal with it as it wants.text/html2018-03-02T10:12:20+00:00Dmitry FrankHere's why I love Go
https://dmitryfrank.com/blog/2018/0302_here_s_why_i_love_go#
Here's why I love Go
Many years ago, I've been waiting for a language like Go. Back then, I was primarily working with C (for microcontrollers), and C++/Java/Python/etc (for bigger machines). These are great tools, but still I was longing for compiled, statically typed, memory-safe (and garbage collected) language, which compiles for the target platform machine code, and has a big enough community.text/html2017-02-28T00:13:04+00:00Dmitry FrankMongoose Embedded Networking Library on nRF51 and nRF52 (Bluetooth)
https://dmitryfrank.com/blog/2017/0228_mongoose_embedded_networking_library_on_nrf51_and_nrf52#
Mongoose Embedded Networking Library on nRF51 and nRF52 (Bluetooth)
The article is hosted at hackster.io: <https://www.hackster.io/dfrank/mongoose-embedded-networking-library-on-nrf51-and-nrf52-547b15>.
programming embedded bluetoothtext/html2016-12-11T17:33:03+00:00Dmitry FrankI'm Tired of Makefiles
https://dmitryfrank.com/blog/2016/1211_i_am_tired_of_makefiles#
I'm Tired of Makefiles
At Cesanta, we use Makefiles to build our firmwares, libraries, and perform other things. But the more I use make, the less I like it. I want my incremental builds to be reliable, and I want to be able to reuse my Makefiles as needed.text/html2016-08-01T12:59:48+00:00Dmitry FrankDocker Printable Quick Reference Card
https://dmitryfrank.com/blog/2016/0801_docker_printable_quick_reference_card#
Docker Printable Quick Reference Card
I use Docker, but not often enough to memorize even basic Dockerfile instructions and CLI commands. After all I got so annoyed by being unable to quickly sketch some Dockerfile or to do something with the existing containers occasionally, so I decided to write a concise cheat sheet which I can print once and constantly keep on my desktop:text/html2016-07-18T17:11:15+00:00Dmitry FrankLet's Run Lisp on a Microcontroller
https://dmitryfrank.com/blog/2016/0718_let_s_run_lisp_on_a_microcontroller#
Let's Run Lisp on a Microcontroller
embedded c lisp programmingtext/html2016-01-26T21:16:53+00:00Dmitry FrankHeap on Embedded Devices Analysis and Improvement
https://dmitryfrank.com/blog/2016/0127_heap_on_embedded_devices_analysis_and_improvement#
Heap on Embedded Devices Analysis and Improvement
The heap on a device is usually a kind of black box: heap API rarely provides anything more than just returning free space size, and quite often it doesn't provide even that (since C standard doesn't oblige it to). We have little idea of the fragmentation (in particular, we're interested in longest contiguous free chunk of memory) and the behaviour of the allocator in general. But in the resource-limited circumstances we're highly concerned abou…text/html2015-10-09T17:56:15+00:00Dmitry FrankStandard interface between a text editor and an IDE?
https://dmitryfrank.com/blog/2015/1009_why_we_still_don_t_have_any_standard_interface_between_a_text_editor_and_an_ide#
Standard interface between a text editor and an IDE?
You may probably consider this a rant post.
UPD 2023 actually, the rant is now irrelevant. These days, we have LSP (Language Server Protocol), which is exactly what I was talking about back in 2015. Still, I'll leave the rest of the text below unchanged.text/html2015-10-07T00:05:19+00:00Dmitry FrankMicrochip PICkit3, Don't Halloo Till You Are Out of the Wood
https://dmitryfrank.com/blog/2015/1007_auto-program_with_pickit3_mdb_fails_but_i_got_it_working#
Microchip PICkit3, Don't Halloo Till You Are Out of the Wood
Microchip has a tool called MDB: Microchip command-line debugger. It's a very nice idea: we can automatize things; at least, we can program a hex from a script. Implementation, however, is far from perfect, but, well, it works somehow.text/html2015-10-05T15:12:39+00:00Dmitry FrankUnit-testing (embedded) C applications with Ceedling
https://dmitryfrank.com/blog/2015/1005_unit-testing_embedded_c_applications_with_ceedling#
Unit-testing (embedded) C applications with Ceedling
Just like a lot of other embedded software engineers, I used to ship my embedded applications to production without testing them properly. Only some manual tests were done. I was under the impression that there's no real way to test them: you know, embedded applications run in a custom hardware and interact with this specific hardware heavily, which makes them not so easy to test automatically.text/html2015-09-20T22:02:17+00:00Dmitry FrankHow I ended up writing new real-time kernel
https://dmitryfrank.com/blog/2015/0921_how_i_ended_up_writing_new_real-time_kernel#
How I ended up writing new real-time kernel
I work with embedded stuff for several years: our company develops and manufactures car trip computers, battery chargers, and other car-related electronic devices.
The processors used for our designs are primarily 16- and 32-bit Microchip MCUs, with RAM from 8 to 32 KB, and ROM from 128 to 512 KB, without any kind of MMU. Sometimes, there are even more modest 8-bit chips.text/html2015-09-17T01:29:07+00:00Dmitry FrankTesting Socket.io with authentication by Passport.socketio
https://dmitryfrank.com/blog/2015/0917_testing_socket.io_with_authentication_by_passport.socketio#
Testing Socket.io with authentication by Passport.socketio
The usage of real-time socket connection with authentication data seems quite regular thing to me. And, personally, I find it very strange that this topic receives so little interest.
programming javascript web socketiotext/html2015-09-09T07:45:52+00:00Dmitry FrankHow do JavaScript closures work under the hood
https://dmitryfrank.com/blog/2015/0909_how_do_javascript_closures_work_under_the_hood#
How do JavaScript closures work under the hood
From my experience, a lot of JavaScript programmers, mine included, learned how to use closures without having clear understanding of how closures actually work, and what exactly is going on behind the scenes when we use them. What the closure actually is, to begin with? When it is created and deleted? What the implementation should look like?text/html2015-07-16T10:28:00+00:00Dmitry FrankQt Creator in VirtualBox with Windows guest OS
https://dmitryfrank.com/blog/2015/0716_qt_creator_in_virtualbox_with_windows_guest_os#
Qt Creator in VirtualBox with Windows guest OS
I needed to develop an utility application in Qt, which should work in Windows. I use Linux, and this is no problem since Qt is crossplatform, but anyway, to make sure resulting application works in Windows as intended, I've installed Qt in Windows guest