Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for Nick Alexeev
| Type | On... | Excerpt | Status | Date |
|---|---|---|---|---|
| Comment | Post #296645 |
@#8176 Fun fact. [The quants](https://en.wikipedia.org/wiki/Quantitative_analysis_(finance)) use floating point money in their calculations. But they don't require high accuracy. Accounting requires accuracy down to a penny. (more) |
— | 7 days ago |
| Comment | Post #288098 |
Hungarian notation would be something like `dictLogRecord`. `log_record_dict` is snake case, and not at all Hungarian. More about the departure of Hungarian notation here: http://prolifictec.com/blog/2014/09/hungarian-notation-in-microcontroller-code.html (more) |
— | 7 days ago |
| Comment | Post #288098 |
@#53890 In the O.P.'s code the `dict` is contents of one log record, as opposed to a collection of several records. I think that the variable name is okay, considering that it's a short-lived local. (more) |
— | 7 days ago |
| Edit | Post #296643 | Initial revision | — | 7 days ago |
| Answer | — |
A: Declaring a callback function in `usart.h`, using it in `usart.c` but defining it in `main.c` [ `rbput(UDR0)` sounds like an AVR. I'll be using STM32 in some examples, because I'm not familiar with AVRs. You were asking about about STM32 on EE.Codidact recently. ] > But I have a gut feeling that this is wrong. It feels wrong that I handle an intrinsic UART construct `UDRE0` in `main.c`... (more) |
— | 7 days ago |
| Edit | Post #296636 |
Post edited: |
— | 10 days ago |
| Edit | Post #296636 | Initial revision | — | 10 days ago |
| Answer | — |
A: JSON log formatter Some exception objects carry additional fields. For example, a `subprocess.CalledProcessError()` exception carries `returncode`, `output` (the stdout), `stderr`, etc. It’s useful information, but self.formatException() ignores it. You can add a few lines which format the extra fields, and save... (more) |
— | 10 days ago |
| Comment | Post #296618 |
I edited the question with the replies to your comment. (more) |
— | 17 days ago |
| Edit | Post #296618 |
Post edited: |
— | 17 days ago |
| Edit | Post #296618 | Initial revision | — | 17 days ago |
| Question | — |
Concise way to capture stderr output in an exception when calling a process from Python I’d like to call an external executable from a Python script. If it exits with a nonzero code, I’d like an exception containing the return code and the `stderr` output. The exception will be caught and logged by the `UncaughtExceptionHook`. The `subprocess.checkcall(…)` would be nice and conci... (more) |
— | 17 days ago |
| Edit | Post #296383 |
Post edited: slight improvement to tags |
— | 2 months ago |
| Comment | Post #296383 |
Here’s a tutorial about `extern` . It [starts at the end of this page](https://cs.emory.edu/~cheung/Courses/255/Syllabus/1-C-intro/cprep2a.html) and [continues at the beginning of this one](https://cs.emory.edu/~cheung/Courses/255/Syllabus/1-C-intro/cprep3.html). It explains how to set up `exte... (more) |
— | 2 months ago |
| Suggested Edit | Post #296383 |
Suggested edit: slight improvement to tags (more) |
helpful | 2 months ago |
| Comment | Post #286910 |
You could read [Effective Modern C++ by Scott Meyers](https://www.goodreads.com/book/show/22800553-effective-modern-c). (more) |
— | almost 4 years ago |
| Edit | Post #286530 |
Post edited: |
— | over 4 years ago |
| Edit | Post #286530 | Initial revision | — | over 4 years ago |
| Answer | — |
A: A state machine in Python I think you've got an architectural error. A state machine (SM) determines it's own actions based on it's state and the messages it may receive. The calling code may send messages (information) to a SM. But the calling code shouldn't send actions (imperative commands) to a SM. A SM should b... (more) |
— | over 4 years ago |
