Programmer's Lounge

<p>Let's talk about various programming-related topics in a common "Lounge" thread. Everyone interested in programming is welcome to share ideas and suggest discussion topics. Just not people in AP Java.</p>

<p>Okay fine, AP Java people too. Let's get it going...</p>

<p>Cryptic Programming
What is your opinion on cryptic coding techniques such as</p>

<p>


!x%2

to test if a number is even or


while(<em>t++=</em>s++)

to copy a string? While admittedly more fun and gratifying, I feel that the main purpose is to frustrate novice programmers.</p>

<p>Shaking my head.</p>

<p>I wouldn’t exactly call the modulus operator or basic pointer operations cryptic. In general, you want to opt towards verbosity so your code documents itself, but for small scripts, it really doesn’t matter- you can be clever. Still, when you or someone else is going to be maintaining the code, or modifying it, or reusing it, getting clever doesn’t do anyone any good. Machine cycles are cheap- unless you’re making a large operation significantly faster, the speed increase from being clever is negligible.</p>

<p>I was referring to saying</p>

<p>


if (!x%2)

instead of


if (x%2==0)

</p>

<p>Anyways one last shot before thread dies…</p>

<p>** Best CS Schools **</p>

<p>Where are the best undergraduate CS programs located? There really aren’t any rankings so it’s hard to know without actually seeing the curriculum / visiting the school…</p>

<p>Well… Carnegie Mellon and MIT are highly regarded… Stanford, the usual.</p>

<p>And the first one is a quicker way to write it. A lot easier for me.</p>

<p>Ternary operator anyone ? Cool: you suck.</p>

<p>SEE WHAT I DID THAR?</p>

<p>Somebody laugh at my joke goddamit</p>

<p>hahaha. funny.</p>

<p>My life is complete. I made a joke about the ternary operator.</p>