Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror

Comment: Accessing the data being deserialized (Score 1) 194

by tepples (#49622887) Attached to: Singapore's Prime Minister Shares His C++ Sudoku Solver Code

If you had a hard requirement such as "has to be ASCII-based" or "char must be 8 bits wide", then I'd wonder where it comes from.

The fact that Internet protocols use 8-bit bytes and either ASCII or its superset UTF-8.

For requiring char to be of some specific width, there's hardly a reason, unless you're improperly (de)serializing.

Last time I checked, the C standard offered no facility for networking, graphics, or even enumeration of the files in a directory. This means most nontrivial interactive programs will need to use POSIX or Windows functions, which are defined in the POSIX and Win32 specifications but are undefined behavior from the perspective of the C standard, in order to access the data that the program is (de)serializing in the first place. Or is there a portable way to do this that I'm somehow missing?

Comment: Asserting implementation-defined behavior (Score 1) 194

by tepples (#49621585) Attached to: Singapore's Prime Minister Shares His C++ Sudoku Solver Code

You're not making it better by actively promoting horrible, non-portable, implementation-dependent and error-prone coding practices.

What's wrong with making assumptions about implementation-defined behaviors and using static assertions to verify them? For example, would it be poor form to assume (and assert) things like 8-bit bytes or that the character set is ASCII, and if so, why?

extern char assert_8bitbytes[(
    CHAR_BIT == 8 && sizeof(uint32_t) == 4
) ? 1 : -1];
extern char assert_ascii[(
    'A' == 0x41 && 's' == 0x73
) ? 1 : -1];

This way, the compiler will fail and kick out a diagnostic if the environment doesn't match the assumptions.

Comment: Contributory infringement (Score 1) 93

by tepples (#49620833) Attached to: UK High Court Orders Block On Popcorn Time

you're not infringing copyright by creating Popcorn Time.

You're only infringing once you USE it, unless a court deems otherwise, and so far only one court in one jurisdiction has.

I'd be interested to see where you get the idea that "one court in one jurisdiction" recognizes the legal theory of contributory infringement. Napster, Aimster, Grokster...

Comment: Re:Follow up a rejection letter (Score 1) 510

by tepples (#49616827) Attached to: Recruiters Use 'Digital Native' As Code For 'No Old Folks'

What could the company possibly say that wouldn't possibly come back to harm them?

"Pretty soon we'll be posting openings for technologies X, Y, and Z, so bone up on those" would be a start. Or "Customer service representatives need to be understandable on the phone. Here are some videos about improving your speech."

Comment: Prevent long-term unemployment (Score 2) 510

by tepples (#49613833) Attached to: Recruiters Use 'Digital Native' As Code For 'No Old Folks'

I don't really understand the forced-melting-pot concept of hiring. If a company wants young people, who am I to force them to take me?

Anti-discrimination laws keep older people from becoming long-term unemployed before they are old enough to qualify for social security. Long-term unemployment is associated with increased costs to the government to control crime.

The earth is like a tiny grain of sand, only much, much heavier.

Working...