352 karma · joined February 22, 2013
So to actually answer your question - when applying, write why you are interested in the job. Make it at least sound like you know what the company you're applying to does. Ask questions about the job. If it's just some generic "I'm good at this and that" we'll just throw it in the bin even if you seem to have the skills.
For example, iterating and adding stuff to arrays:
array[index++] = object;
instead of
array[index] = object; index += 1;
and the other way around:
array[++index] = object;
instead of:
index += 1; array[index] = object;
There is no way you will miss incrementing your index here, or do it in the wrong place. This is so common, that as a C-programmer you WILL recognize this pattern.
It's even better when iterating pointers instead of integers. May I ask what the following means to you?
float *float_ptr; float_ptr += 1;
I think writing ++float_ptr here is just much more clear. Incrementing pointers by integers just feels wrong when what you really are doing is incrementing it with sizeof(float_ptr).
And the other way around: If you specify int8_t, but your program runs on a 64-bit platform which only can address memory in 64 bit chunks, then you might waste 32-bits of memory for this variable, and addressing it can be slower since the program has to find the 8 interesting bits in a 64-bit register, and discard the rest of the bits so they don't affect calculations.
The only reason to use specific sizes IMO is if you work with loads of data and need to pack it efficiently, or work with bit-specified protocols like TCP packets or files. If you need _at least_ 16 bit of data for example, then you can use the int_least_16_t, which may be 64-bit or 16-bit depending on the architecture.
Citation: "I don’t think that purely functional programming writ large is a pragmatic development plan, because it makes for very obscure code and spectacular inefficiencies, but if a function only references a piece or two of global state, it is probably wise to consider passing it in as a variable."
Then it also would need to make sure that those parameters can't change between different calls within the same function.
This wouldn't be feasible in the example above, since that function explicitly depends on outside variables. If you were to supply both `health` and `alive` as arguments, you could pretty much write the check yourself from the beginning.
Of course, there are many bigger checks that could benefit from this, but still, you (or the compiler) have to make sure that all functions are pure, that no arguments can change etc etc. I imagine that this could make compile times quite slow (and also complicated to write the compiler itself).
I stand by my point. Simply "not using C" isn't magically going to make your application so much more secure.
There has been a lot of negativity/arguments against C here lately, which in my opinion has been very exaggerated.
Seriously, how often do you guys write GUI apps that _also need to be secure_? An application isn't secure just because you write it in another language, there's a lot more work to it. If there is even such a thing as secure.
Another reason is that the underlying tools used by this library are likely in C as well, so it's probably the easiest language to use for the task.
When developing it, I made the game logic into a library, which was also used by a friend to create a GameBoy version! Check it out: https://github.com/rotmoset/gb-mines
It helped me understand them quickly, with easy to understand, practical examples.
Don't mind the "Flash 8" context, there really isn't anything flash-specific in there.
I guess bash is a good choice since it can be run pretty much everywhere.