Knowing more tools and more tech doesn't necessarily relate to making your employer significantly more profit, you might produce less bugs and be slightly more efficient than someone with less experience but it doesn't scale well, they can easily just hire 5 grads instead of giving you 5 times your current salary. Working in financial markets is one place where your coding efforts can have significant impact on a company's bottom line and where the rewards can scale accordingly. Honestly, if you're not a 'wiz' and adding multiple times your peers to the bottom line why would you expect to be further rewarded for experience or years of service to the company or industry? It is fine to plateau.
Josh Gray2
Posts
-
How did you overcome this obstacle ? -
WML and Coal ChuteI've been working at the same company for 16 years, occasionally I find some real nuggets of 2005 Josh code
-
I just got beaten up by a 5 ft 100 lb girlOh man, I'm living in The Netherlands at the moment and had a similar experience at an emergency dentist on new years day. Similarly sized dentist and I had similar concerns, especially when she said "do you want me to try the anesthetic, it probably wont work well due to all the infection". We got there in the end and she told me to take some paracetamol, if I needed it later. I went home and self-medicated
-
Nuts and bolts - Programming contestI believe that the official scale is neither metric nor imperial. Say you found yourself in a urologists' office with your pants down being told you had a tumor on old lefty and that it has to come out pronto. If this happened to you in Australia about 10 years ago the doctor would likely tell you that the government has a program offering free prosthetics and that he can whack in a replacement at the same time since he'll already have his hand in your scrotum. If you accepted this generous offer he would pull out something which looks a lot like a circle template a draftsman would of used many years ago to determine the appropriate size replacement. In a pretty dark day being told that you're a medium large in bollocks is a real highlight.
-
Nuts and bolts - Programming contestI believe that the official scale is neither metric nor imperial. Say you found yourself in a urologists' office with your pants down being told you had a tumor on old lefty and that it has to come out pronto. If this happened to you in Australia about 10 years ago the doctor would likely tell you that the government has a program offering free prosthetics and that he can whack in a replacement at the same time since he'll already have his hand in your scrotum. If you accepted this generous offer he would pull out something which looks a lot like a circle template a draftsman would of used many years ago to determine the appropriate size replacement. In a pretty dark day being told that you're a medium large in bollocks is a real highlight.
-
Just one well placed virtual function saves the dayThis is a very specific topic but oddly I received an email from a colleague today about a library called simdjson which gives a significant performance improvement over other c++ json libraries. simdjson claim 'Standalone UTF8 Validation' at 13/GB/s
-
Performance woes. I'm appalled.Are you familiar with the Compiler Explorer[^] ? It's a very useful tool for looking at the assembly generated by gcc and other compilers
-
How many cores do you need?I have 96 core boxes at work, they're awesome
-
What is the longest programming misconception you've held (that you are aware of)?Here's an excellent explanation of two's compliment Twos complement: Negative numbers in binary - YouTube[^]
-
What's the closest thing to anonymous function pointers I can achieve that compiles with GCC?arnold_w wrote:
Could someone knowledgeable in C++ please help with the syntax for the example I provided? Do I need to put it inside a C++ file or it is possible have sections of a C-file containing C++ code?
#include typedef std::function readDataResultCallback_t;
typedef struct __attribute__((__packed__)) {
stateMachineState_e state;
uint32_t startAddr;
uint16_t numRegsToRead;
readDataResultCallback_t readDataResultCallback;
} stateMachineStep_s;stateMachineStep_s stateMachineSteps[3] = {
{STATE1, 10, 2, [](uint8_t* readData, uint16_t sizeOfReadData) {
if (stringCompare(readData, "AB") {
... Do stuff here...
state = STATE_2;
} else {
... Do stuff here...
state = STATE_3;
}},
... -
Reading Files on network boxDo you want to force linux to do the windows thing, or windows to do the linux thing? For the former run samba on the linux box and create shares you can access from windows. This will probably suck, the degree to which it sucks will depend on the file system you are using on the linux side. For the latter you can run an ftp server on the linux side or setup ssh and use scp. These will suck less.
-
What's the closest thing to anonymous function pointers I can achieve that compiles with GCC?the
readDataResultCallback
member of your structure is just a fancy pointer, either 32 or 64 bits long depending on your architecture, so it can only be initialised with the memory address of a function. So you could have something like the following...
void OnState1(uint8_t* readData, uint16_t sizeOfReadData)
{
...
}stateMachineStep_s stateMachineSteps[3] = {
{STATE1, 10, 2, &OnState1}
...
}which, to be honest, is not significantly more typing. You could also use macros to generate some of the code but that comes with it's own issues. C++11 and greater support lambda expressions which will allow you to initialise your structs with a similar syntax to your example but in that case you would have to swap your function pointer to an std::function<> type. If you don't have c++11 support the boost library offers a similar function pointer but without the nicer lambda syntax.