> modern C++ style using auto almost whenever possible.
Using auto everywhere, to me, is bad code. It's hard to understand what types we're dealing with, at a glance.
5,693 karma · joined December 14, 2011
> modern C++ style using auto almost whenever possible.
Using auto everywhere, to me, is bad code. It's hard to understand what types we're dealing with, at a glance.
objcopy --input binary --output elf64-x86-64 myfile.txt myfile.oTo me, the CMake language is the only part that keeps me on the lookout for a CMake replacement.
cut is line oriented, like most Unix style filters. It needs to keep only one line in memory at most.
If you say:
pd.read_csv(f)[[x,y,z]]
It has to read and parse the entire 28GB into memory (because it is not lazily evaluated; cf Julia).If you actually need to operate on three columns in memory and discard the rest, you should:
pd.read_csv(f, usecols=[x,y,z])
Then you get exactly what you need, and avoid swapping.The lack of lazy evaluation does inhibit composition--just look at the myriad options in read_csv(), some of which are only there to enable eager evaluation to remain efficient.
For those who may say if a remote lasts five years it's good enough: maybe you're right in today's context. Things I grew up with came with remotes that lasted 20 years and were only obsolete when the thing they controlled was. I guess that's true of Turn Touch too, if you consider that the device it controls is your iPhone.
Similarly, kt means knots as in speed, but the very same kt also means kilotonnes as in dynamite.
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
Now it will just die on Ctrl-C. For text filter programs it's a good idea to do the same for SIGPIPE too.Could my team be ranked in the top ten in the US or Korea or wherever if we only ever play via the internet?
Why Backspace? It was a gift for a friend who had what we called Rusty Degenerative Typing Syndrome. His typo rate was just terrible.
The pedal did not improve his typing error rate but it night have saves hid friends a lot of contusion.
Better to always use struct and never class, or the opposite. Always class is simpler because the first members declared in most classes are public, and struct saves you typing "public:" at the top of every class. But always class has the advantage that it is far more popular in C++ library code...including std::array which has no invariants.
Some tests will seem impossible to complete in the alotted time. Often that's intentional. It saves time for the candidates and gives a better spread of scores (very few will get 100% in some test batteries). But it can be disheartening. For these initial online tests I try to give enough time that most people won't really run out of time unless they get stuck.
They serve as a relatively simple early-stage screen for applications from people we've never met. Ours costs each candidate 1-2 hours. But we do not require cover letters, which in the good old days might have taken about half that time, and been thrown in the bin.
Some may think no CS graduate would fail a test that let you choose any popular language to implement some basic string parsing. But in practice about half the candidates fail this stage of the hiring process, which saves us quite a lot of time. Yes, it costs each candidate an hour or so, but that's a feature, similar to the oft-proposed idea that sending email could cost one cent to reduce spam.
Our applicant tracking systems won't be upset if you ghost them/us. Your application will simply expire after a while.
1. It would not make sense to run on mobile.
2. Mining this way is inefficient, so if the site gets one penny worth of work done, it costs me five pennies.
3. Unless readers have decent GPUs, it's probably not enough money.
We used to do something like that with Flash: make the user click it if they want it to run.