The Traveller's Last Journey DEDICATED TO SHAI MAROM Z"L

Continuing early progress in python

C

The topology of progress is frustrating in the revelations of its unexpected troughs, and heights that transcend themselves into plateaus.

The revelation of progress is frustration, proving itself only by the quagmire of unfamiliar stretches, yet (do not fear, for) they hide in their shadows easy slopes of epiphanies spurring euphoria.

New lessons earn new vistas promising fresh territories for exploration. Having acquired the use of classes, the strategy of inheritance becomes possible; the use of unit testing reveals its own schools of philosophy and paraphernalia. Every door is a pathway to doors.

That which was hard becomes incidental, and the horizon shelters more unknown, that first presents itself as an inky blackness; or alien horde whose members are indistinguishable, united by the mystery and concealment of their purpose and mechanism.

Counting the steps and reading the signs

My gaze backwards and forwards takes its measure by some base goals, established, nourished, and clarified since my outset. Without these measures the senses of evaluation grasp without grip.

My studies of python will lead (it is intended) to:

(1) A wide and strong knowledge base, that is familiar with the tools inherent in the code, and the opportunities expanded by its libraries

(2) An intuition and skill for the writing of good code, that is intelligent in its problem solving, well-designed for its purpose, and that makes good use of available resources

(3) An act of creation, to be epitomized in the materialization of ideas and brainstorms into software.

Expanding a knowledge base

I began my journey with codecadamy, then LearnPythonTheHardWay (LPTHW), and recently begun ThePythonGameBook (TPGB). This has been peppered with readings from PythonStandardLibraryByExample (PSLBE).

The beginnings of progress

Codecadamy endowed me with a capacity for reading and writing the fundamental semiotics and syntax of python. It led me through the initial morass, guileless and naive. It ordered me through the necessary fundamentals, and by gentle interrogations, walked me through overgrown creases (not yet pathways) in my mind.

Having finished the course I could think of python in terms of its basic building blocks, beginning with its laws of words and spaces, and continuing on to include variables, conditionals, and loops.

My sense for python was thus an imagination of the ways data (mostly strings and numbers) could be combined (mostly into lists and dictionaries), and manipulated by the laws of logic and the incredible manifestations of iteration. My imagination saw strange patterns emerge from these possibilities, taking non-idiosyncratic inputs (variables treated in their generic sense), pitting them against their own inner logic, and allowing for outcomes dependent on the patient repetition that is a computer’s raison d’etre.

Delving further into pastures known and unknown

In addition to reinforcing lessons learned, LPTHW added more complex tools to my nascent tool-kit (especially conditional lists and classes), and opened up unfamiliar opportunities offering expansion (especially unit testing and packages).

Sophisticated syntax (like conditional lists, and beyond the course, generator functions) add a heightened sense for the ability of code to be succinct, concentrated, and purposeful. I had already been able to achieve similar results using mere loops and functions, but these began to appear unwieldy when used without these new considerations. This, in turn, sharpened my understanding and appreciation of “good” code in line, studied in the light of these strengths.

The use of classes was a great epiphany, modifying my sense of how modules of an algorithm could relate to each other on a macro scale. Classes forced me to contend with the philosophy of object-oriented coding, and comprehend (so as to manipulate and obey) the mechanics of inheritance (in classes) and variable storage (moving from classes to functions to globals). The change in perception that follows object-oriented design is revolutionary; functions already herald an emphasis on the power of modularity, but objects add a greater structure with which to imagine virtual threads whose relationships cast silhouettes of concrete cityscapes and dreams within dreams.

The addition of unit testing was a different species of epiphany to classes. In the case of unit testing, a domain whose basic motif was already known to me became enlarged beyond the scope of what I would have thought to think. It is impossible to not already know the necessities of debugging, and the manual testing occupied by devious inputs and the measurements marked off through myriad print commands. But unit testing introduced an entire domain of testing to be explored and enhanced; it provided a robust means for its automation; and in line with its structure, recommended a methodology for writing – yet another description of modularity – and parallel testing (which becomes its own art and invisible product serving the transience of creation).

Directed investigations

Codecadamy and LPTHW were bought (with time) in exchange for the foundation they could teach. They provided the base upon which Pygame could be explored, qua (and paralleling any alternative) niche range of opportunities and applications within the expanding realm of programming education. The pygame library was selected because it suited a particular need I had prioritized, including a rapid development of graphical interface.

Studying pygame obviously benefits general python comprehension and skill, but it also introduces an internal range of possibilities. The first major motif to be enlarged was the consideration of ready-made objects and methods like Surfaces, clocks, and events, which need to be understood according to the paradigm that is pygame. Seen this way, pygame is a range of opportunities revolving around abstractions that attract currents of design according to their laws and dominating powers.

Training good writing

I heuristically define the aspiration for good code along three planes: (1) creatively intelligent (esp. on a micro-level), (2) well-designed (esp. on a macro level), and (3) succinctly opportunistic (esp. in use of python features and libraries).

The first I undertook to hone by practising Prolog challenges, pitting my sparks of solutions against the technicalities of the problem, and then measuring these against solutions posted by others online. The Prolog are merely the first opportunity that revealed itself (and I have since audited and switched to codewars, inspired by the latter’s variations, and sensing the limitation in Prolog’s tight focus for my present state of education).

These challenges should also help progress the second aspiration (ie. goodness qua well-designed). There is a state of mind that develops in all practice, and in moments between when reflecting on a problem or possibilities for design, when the novice programmer is learning to think about “the” meta-algorithm which exists between the classes and methods; a synergy of transcendence appears in the sum of space between logical determinism. These abstract insights are hinted at by concepts like object-oriented, modular, and flexibility, and reflecting upon these may consolidate some underlying ethos of well-designed code.

When I surveyed answers others offered to challenges online, or to problems I was researching, there were often references to library usages that were (to me, the uninitiated) novel. Exploring the standard library, via PSLBE, opened up new short-circuits for solutions I had previously imagined (in less succinct form), and opened new – or stretched existing – vistas, to encompass frames of focus previously unimagined (e.g. codecs).

All three of these aspirations (and their appearance in reflection) continue to iterate through cycles of finesse and scope. Thus the standards for good code become more stringent and delicate, perceiving clunk in what had previously been measured as wit; arbitrariness for that which had been called direct; calling ill-fitting that I had considered resourceful.

Original creation

I have held different magnifications of intent and visions in directing my motivation along the axis of proficiency. The most literal strand of this thread is the search for a basic proficiency which will nurture itself into an advanced proficiency. But I have also sought to measure my progress by the capacity for acts of creation, and these I have dreamed near and far.

The first milestone of my achievement will be a game that I will make. It will involve a graphical interface, obvious inputs, file usage, and network interaction. There is significant value in knowing the milestones that need to be surpassed on the way to a destination. I have repeatedly streamlined the widening berth of my education to ensure this outcome.

There is not enough time to explore the ocean, so I have cast my gaze upon a constellation, and raise my head from the stellar displays beneath the waves only to adjust my course before the currents. Who knows what the place shall be, from where the stars I seek are reflected, and all that is left is to dive down, down, down, seeking possibilities yet impossible.

matrix-434035_960_720

Print Friendly, PDF & Email

About the author

Add comment

By Pala
The Traveller's Last Journey DEDICATED TO SHAI MAROM Z"L

Search by Category

Search by Date

Shai