CS Concepts: Scopes, Enums

Although I’ve taken some courses about the application of discrete mathematical methods to programming and done some database/application programming of my own, I’ve never really had a formal education in computer science.

I read a little bit about scopes (e.g. lexical and dynamic scope), which I have had to work within / work around, but which I’ve not really had enough of a CS disciplinary backgruond or cross-language experience to understand systematically.

Spent a few minutes looking up enums (a.k.a. enumerated types), and the trade-offs versus defining the types and relationships in a normalised table.

I’m recording this to signpost my learning, as well as to record sources.

*

As a kind of syllabus for myself, I intend to cover the following (h/t):

Foundation

  • basic types (int, float, bool, char, string)
  • operators and boolean operators
  • scopes: in general as well as if / else if / else and rough explanation of methods
  • arrays / lists and loops
  • More about methods (parameters and return values)
  • enums and switch statements
  • recursive methods

Extension

  • classes, classes, classes and struts
  • member variables, static fields and properties (if c#)
  • public, private, …
  • inheritance, abstract classes and interfaces
  • passing parameters by reference vs by value
  • delegates and events / callbacks
  • generics (C#) / templates (C++)
  • design patterns (gang of 4)
  • serialization
  • unit tests

Silence and Violence

‘Silence and Violence’ is a theme in the Crucial Conversations course I’m currently attending. Silence and violence are basically situations of entrenched ill-will and distrust which tend to arise from misaligned motives and miscommunication.

The course identified three forms of violence, namely controlling, labelling, and attacking. During the course, the facilitator suggested that ‘controlling’ was often one of the ‘milder’ forms of violence that could play out. While I could agree that there are differences of degree, I did not think ‘controlling’ was inherently a milder form of violence. I shared about the supervisor who, before the presentation to the boss, dictated changes over my shoulder. Said supervisor required me to deliver the ultimately truth-deficient and unwieldy proposal.

*

The thought I wanted to record, however, was the idea that silence is also an attempt to maintain control. This could manifest as child-like superstitious avoidance of thought or mention, as highly conscious and selective omission, or other things in between. Silence can easily be as destructive as violence, even as silence obscures and elides the very question of agency.

Sometimes, silence is all the resistance that can be mustered, to that which ought to be resisted. As for silence that is just silence, I believe it waits for us, outside of the games we play.

Knowledge Management & Organisational Development

In organisational development, a possible goal is to impart knowledge, with the goal being for everyone to have the knowledge that they need to perform at some required level. Organisations that incentivise this model of learning and performance will tend to succeed at re-producing a common core of knowledge and standards of performance.

A system breeds uniformity when it is designed to eliminate deviations. When “measure and improve” is the tried-and-tested way, it can feel almost heretical to suggest courses of action where there isn’t a straightforward line of progress between the present and the future. The free energy required to take such actions in the first place is limited, and the chance of transformational initiatives succeeding falls in proportion to the energy required to persuade measurers to suspend orthodoxy.

The antithesis to the impart-and-promote model would be to look for knowledge that the organisation doesn’t have, and to recognise the effective application of that knowledge.

There are conceptual challenges that are inherent to such a model, for instance, in how to realistically identify knowledge that the organisation doesn’t currently have, because the organisation can’t know what it doesn’t know. However, this doesn’t mean such models are impractical; some organisations do find success, by being intentional in recruiting. Another tactic is to create a bias towards diversity, but I expect the adaptive value of this will vary depending on the survival imperatives underlying your ecosystem; caveat emptor.

Another conceptual challenge is that the transformative drive tends towards decoherence, over time. A theoretically perfect transformation champion would have a plan for the return of “measure and improve” that is as rich as the plan to break away from the start state.

In reality, no organisation will be perfectly in either ideological orientation; leaders and individuals can and do exercise agency to create pockets of chaos and influence the direction of drift. It is a mercy.

Afghanistan

That the Taliban are once again in charge in Afghanistan was sadly and entirely predictable (paywalls). The US has never had core national interests in the Middle East, beyond the ideological and imperial interests that it took on during the post-Cold War moment. Even prior to the last announcement, the Taliban had been ready to consolidate every quarter the US conceded.

From 2021, the post-Cold War moment looks exactly like a moment. Years before 45 even took office, the American political establishment had already been commissioning research into US-China competition, albeit primarily in non-military domains to begin with. References to “revisionist states” in US defence & security-domain documents also pre-dated Trump, although references to China as a strategic competitor in such documents grew markedly more direct in 2017-2018.

I mention China, because the US withdrawal from Afghanistan at this time, just shy of twenty years since 9/11, is the final result of a country that only reliably makes decisions based on political expedience, rather than from a ‘realist’ consideration of national interest. (My first caveat is, that that’s most democracies. My second is that I think realism looks for what tends to be right in the end, as in this case.)

It feels almost cynical to frame the US’ withdrawal in terms of spin calculations, but what else is there, when the thing that has to be done is only just that?

Randian Builders

“When you hit 40, you realise you’ve met or seen every kind of person there is, and I know what kind you are. Because I believe we are alike.”

“I assume that’s flattering.”

“By that I mean that you are a productive, reasonable man, and in the end completely self-interested.”

– Bertram Cooper to Don Draper, in S1E8 of AMC’s Mad Men.

Atlas Shrugged in the background, Cooper continues, “It’s strength. We are different, unsentimental about all the people who depend on our hard work.” Don eventually disappoints him.

Leadership and Trust

I think the essential duty of a leader or a manager, is to be worthy of their subordinates’ trust. Why is this the case?

The essential realisation is that subordinates do not really have any good option with regard to not trusting their superiors or their teams.

  • If leaders are not trustworthy, operating defensively is possible, but collective outcomes are guaranteed to be poor regardless of individual effort; only limitedly positive individual outcomes become possible.
  • On the other hand, if leaders are not trustworthy and team members try to operate in good faith, they are likely to end up with outcomes that leave them worse off than team members who choose to operate defensively.

While it is important for leaders to be trusted by their superiors, I think this is actually ultimately part of being worthy of their subordinates’ trust as well.

Cyber Expertise

Basics

  • Computer Science – the math of it, the fundamental understanding of how microprocessors made the digital world, encryption.
  • Networking – can you explain how the internet works?
  • Business – for every layer of how the internet works, could you estimate the scale and extent of centralisation?
  • Governance – regulatory institutions, professional bodies, open source, etc.
  • Politics – see the earlier two layers.
  • International Norms and Law – self-explanatory.

Conceptual

  • InfoSec
  • Cyber Security
  • Cyber Deterrence

On the Arts of the Courtier

From The Mirror and the Light by Hilary Mantel:

The king believes that even if he were not king, he would still be a great man. This is because God likes him.

He needs to be liked and he needs to be right. But above all he needs to be listened to, with very close attention.

Never enter a contest of wills with the king.

Do not flatter him. Instead, give him something he can take credit for.

Ask him questions to which you know the answers. Do not ask him the other sort of question.

The Mirror and the Light (2020), p.336

A few pages earlier, “ars longa, vita brevis” was given by Henry as, “Life is short and art is long, the opportunity sudden and fleeting: experiment dangerous, judgment difficult.” Later (and more pithily) by Chaucer, “The lyf so short, the craft so long to lerne.”

Weird Optimisation

Reflecting on the past five years is difficult, because the memory that tends to dominate is emotional pain and psychological destruction.

In truth, other things happened over that time, too.

Watching David Patterson speak on the AI Podcast was a joy in itself, but it also triggered the reflection that global developments in technology and research are a subject that I’ve tracked closely for about five years – the point being that I can now look back on how the ‘zero-day‘ insights have given way to the ‘Lindy‘ ones, selected over time. The specific reflection was triggered by Patterson’s discussion of the end of Moore’s Law (the point he makes being that it’s truest to say that it has ended, rather than slowed, etc.).

The other reflection I had this morning about the past five years was about my own professional choices. It’s actually unusual for me to think in such terms, because usually when I think back on those decisions, their immediate associations was the experience of pain and stress and isolation; when I’ve narrated them for a diverse range of others, serendipity (“Doors just opened”) and sacrifice (“I didn’t have much of a choice”) have been the narrative poles.

This morning I was thinking about them in terms of weird optimisation. Reflecting (in a different light) on how the situational constraints and personal priorities shaped my decisions, I saw how the optimisation was ultimately about buying some financial breathing-room; learning-by-doing and -being; and avoiding over-investment in institutionally or vocationally specific experiences.

It’s a weird optimisation to have had to attempt. Ahead of many of my past decisions, it was the consciousness of the trade-offs between the first and third factors that stood out. In my most recent job, the trade-offs between the second and third have been more challenging. I’ve tended to be more internally confused about the second and third factors, I think because it’s been difficult to imagine what ‘later’ looks like for me, personally.

In the spirit of that imagining, I’ll venture a thesis: My fundamental motivation is curiosity and wanting to be right about something big.