Epiphany.
In Python, with iterators, the Visitor design pattern is useless. And a strongly-ingrained habit. Which I'm trying to break.
Here's a common Visitor approach:
class Visitor: def __init__( self ): ... def visit( self, some_target_thing ): ... def all_done( self ): ... v = Visitor() for thing in some_iterator(): v.visit(thing) v.all_done()
If we …
more ...This is the kind of little program that would be in HamCalc. But doesn't appear to be.
Looking at the Airfoil web page, specifically, this one: http://airfoiltools.com/airfoil/details?airfoil=ls013-il.
The measurements are all given in fractions of the depth of the airfoil. So you have to …
more ...An excellent exposition of secure salted password hashing.
https://crackstation.net/hashing-security.htm
This was really quite nice. It didn't have a Python version, but the clarity of the exposition makes the Python easy to write.
A few months back, I had this mystery conversation: {filename}/blog/2013/06/2013_06_27-password_encryption_short_answer_dont …
more ...Finally upgraded to Python 3.3.3. The ordinary maintenance release fixed the problem with the previous release.
The previously documented patch ({filename}/blog/2013/10/2013_10_25-mac_os_x_109_mavericks_crashes_python_patch_available.rst) is no longer required.
Time to start incrementally installing all the various add-on components: docutils, PyYaml, Django, Jinja2, SQLAlchemy, etc.
Also, time …
more ...This: Python Displacing R As The Programming Language For Data Science.
Recently, I've had a former colleague asking questions about Data Science. See Obstinate Idiocy They -- weirdly -- insisted that the only language that made sense to them was Excel.
My response was a blunt "What?"
The Python vs. R post …
more ...The correct answer is: It Doesn't Matter. In spite of this. (A) The question gets asked. And worse. (B) It gets answered. And people take their answers seriously. As if there are Profound Differences among programming languages. Among Turing Complete programming languages there are few Profound Differences. The pragmatic differences …
more ...I upgraded to Mac OS X 10.9 "Mavericks" today.
Python 3.2.4 crashed in odd places. Not all the time. But help() stopped working to give one example.
I upgraded to Python 3.3 (it's about time to do that, anyway.)
It crashed, also. Similar places.
Here's the …
more ...I've revised PyLit to work with Python3. See https://github.com/slott56/PyLit-3 The code seems to pass all the unit tests. The changes include Python3 revisions, plus a small change to handle trailing spaces in a sightly cleaner fashion. This was necessary because I have most of my editors …
more ...Even though I wrote a literate programming tool (PyWeb) I slowly came to realize that it's not very good.
Mostly, I followed the Web/Weave world view and cribbed their markup syntax. It's not bad, but, the PyWeb markup is based on some presumptions about literate programming that were, perhaps …
more ...