82 karma · joined December 29, 2011
Full time on site starting Fall 2021
Would you like to teach and help design a broad cross-disciplinary computing curriculum at a small liberal arts college in southern Vermont?
Applicants with academic, industrial, and/or artistic backgrounds in computer science and from all sub-specializations are encouraged to apply. An advanced degree in computer science or a closely related field is desirable but not required.
See https://bennington.recruiterbox.com/jobs/fk0u26e/ for all the specifics.
Jim Mahoney | Computer Science Faculty Bennington College | jimmahoney@bennington.edu
But I agree with the author's central point that the language has a number of issues.
He mentions the python2 vs python3 issues, but doesn't discuss what is to me the biggest problem of all that: there is no standard simple way to identify within the code what version of python it needs or is written for. Coming originally from the perl world, that has always seemed like a significant oversight.
Nor does he mention several of my other biggest issues with the language, such as the arbitrary assignment of some operations to global functions (i.e. a=[3,2,1]; len(a)) while others are method calls (i.e. a.reverse()) which return nothing. And then there's list(reversed(a)) and all the iterator awkwardness ...
Explaining to students learning programming for the first time why neither of these do what they expect is never fun.
>>> print(a.reverse())
>>> print(reversed(a)) $ time curl cs.marlboro.college
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://cs.marlboro.college /">here</a>.</p>
<hr>
<address>Apache/2.4.18 (Ubuntu) Server at cs.marlboro.college Port 80</address>
</body></html>
real 0m0.269s
user 0m0.004s
sys 0m0.005s
$ time http cs.marlboro.college
HTTP/1.1 301 Moved Permanently
Connection: Keep-Alive
Content-Length: 321
Content-Type: text/html; charset=iso-8859-1
Date: Sat, 27 Jan 2018 18:04:17 GMT
Keep-Alive: timeout=5, max=100
Location: https://cs.marlboro.college/
Server: Apache/2.4.18 (Ubuntu)
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://cs.marlboro.college/">here</a>.</p>
<hr>
<address>Apache/2.4.18 (Ubuntu) Server at cs.marlboro.college Port 80</address>
</body></html>
real 0m30.553s
user 0m0.437s
sys 0m0.052sGiven that this test essentially measures attention and distractions would seem to affect performance, I wonder what the results would be for some other object on the desk in the field of view - a book or a photo say - rather than just a phone.
Though the recent second time was as an audio book on a long car trip.
While I agree that the Aeron is great (and have one at work that I use regularly), the Marcus fit in my budget ($200 for the Marcus vs $800+ for a new Aeron) and is perfectly reasonable. I usually leave it in the locked forward typing position.
For twelve hour stints, I stand for part of the time (my desk will move up to standing height).
I tried an exercise ball - didn't work for me.
While it doesn't use the spiffy lazy lists of itertools, and does have the typical "if x % n == 0" test, it does generalize easily to the "and print Baz every 37th number" case.
def joinmap(func, elements, separator):
return separator.join(map(func, elements))
def fb_value(x, fb={3:'Fizz', 5:'Buzz'}):
words = joinmap(lambda n: fb[n] if x % n == 0 else '', fb.keys(), '')
return words if words else str(x)
def fb_range(low=1, high=100):
return joinmap(fb_value, range(low, 1 + high), '\n')
print fb_range()- Guardians of the Galaxy
- Back to the Future series
- Men in Black
- Groundhog Day
- Elysium
- Planet of the Apes (old & new)
- Ender's Game
- Independence Day
- The Island
- John Carter
- I Robot
- The Day the Earth Stood Still (old & new)
Essentially this highlights the difference between your particular policy opinions and your enthusiasm for having a government enforce those policies on everyone.
The problem wasn't that their code didn't have a nice user interface, or wasn't designed for reuse. The problem was that it was often impossible to really know whether it worked correctly or not.
In my experience, whether the code you're writing is going to run once or go into production, it needs to testable and understandable - enough that you have confidence that it does what you think it's doing. And that means building it in small enough pieces to analyze. Otherwise you just don't know.
My students have particularly liked the "bomb lab" which requires reverse engineering an x86 binary to understand what input it expects, and the stack overflow exercises.
Highly recommended.
"the electric company sends electricity through a wire to a customer, then immediately gets the electricity back through another wire, then (this is the brilliant part) sends it right back to the customer again. This means that an electric company can sell a customer the same batch of electricity thousands of times a day and never get caught, since very few customers take the time to examine their electricity closely. In fact, the last year any new electricity was generated was 1937."
and
"AMAZING ELECTRONIC FACT: If you scuffed your feet long enough without touching anything, you would build up so many electrons that your finger would explode! But this is nothing to worry about unless you have carpeting."
Four dimensional space-time has a metric analogous to but not quite the same as euclidean space: the time part has the opposite sign from the space parts.
ds^2 = (c dt)^2 - (dx^2 + dy^2 + dz^2)
ds is an "invariant proper time" which has the same value in all frames of reference. Check any special relativity textbook for the details.Just as you can start with distance and then build up to momentum and energy in classical physics, in relativistic mechanics you can start with this metric and build up vectors in 4-space for velocity and energy/momentum. (Turns out that the time part is an energy while the space parts are momentum.) The upshot is that
(m_0 c^2)^2 = E^2 - (p c)^2
which is the frame-invariant length of the energy-momentum 4-vector.
(I think that m is better written as m_0, the rest mass, since the "m" notation sometimes means relativistic mass, which is different.)In that notation, a vector |a> which is basis independent has components <i|a> in some basis |i> , where (say) |i_1> , |i_2> are the basis vectors. Then to change to another basis <k| the "operator one" (which is the outer product of a basis, i.e. sum over i of |i><i|) is inserted to get <k|a> = sum over i <k|i><i|a> , which turns into the matrix mechanics.
(Each of the outer products e.g. |1><1| is a "projection operator" which projects a vector onto that basis vector. The sum of all of them projects onto the whole space spanned by the vectors, which is the same as doing nothing, which is therefore the identity operator.)
Once you get your head around the connections between coordinates (i.e. a_x = a_1) and the dot product with a basis vector (i.e. dot(i_1, a) = <i_1 | a> = <1|a>), this notation can make the whole thing intuitive and mechanical.
I have an explanation of this online at http://cs.marlboro.edu/talks/bra_ket.pdf .