Refactoring

Dear Tim,

I spent the day cleaning up the study and fixing my PC after the CPU water cooler died (it was about time, the thing has been running for 10 years. Good thing it didn’t explode). Gave me some time to think about things and consider how Kalmany needs to move forward. The work on the newest update is going slowly due to a little difficulty in conceptualising how it will run together. However, that won’t stop me, even if it has delayed me.

Instead, I’ve decided to do some work in cleaning up my code and basically updating how the current system works to be more accurate. Last time, I wrote about how I’d update Gender and Sexuality, and I think those changes will occur first before including time. It also gives me chance to update a bugging issue with the system’s simplification.

When I first designed the premise of the government sectors, the industries, and the privatisation/nationalisation system, I used data on the spending that the UK government dishes out its taxes to, and used their categorisation system for industries. This does mean, however, we’ve got a few bundles that honestly I’m not too happy about. Afterall, do we really consider Pensions a government sector? We’ve got no distinction between retail and motor services in the industry retail and motor services. It needs to be more distinctive. We need to consider a better way to consider government efficiency.

So let’s brainstorm! I actually didn’t think about this much before I started writing this post so let’s see my train of thought in practise. It’s fun – we’ll have a bit of digression here and there, maybe wrap things up or wind things down at the end, depending how exciting we go.

Industry

Yeah so we currently call industry the sector of which our citizens work in, so it’s more their profession than an industry but we’ll remain consistent.

We’ve got three constants we have to maintain: student, retired & unemployed. These basically describe the “non-working” force. We also separate retired from unemployed, as one will receive benefits, the other pensions. This means we can influence how much benefits are awarded or how easy they’re awarded, versus how much pensions we allow. In the future, capitalism will allow private pensions.

The following are also fine to keep in my opinion: agriculture, mining, manufacturing, electricity, waterworks, construction, transport, communication, financial, scientific research, administration, education, healthcare, real estate, servile – we can also group these up in some ways to assist us:

  • education, healthcare, transport are our public services.
  • electricity, waterworks, communication apply to our utilities
  • construction & real estate are interesting as they can manage housing, but also office space, industrial estates, commercial spaces, etc.
  • agriculture, mining, manufacturing, financial, scientific research, administration, servile are fine on their own

Now retail and motor services, accommodation and food, public administration, arts and entertainment, and recreation are our industries that are a little too broad. For one, we don’t have military? Or sports? So let’s change some of these up a little.

Both retail and motor services, and accommodation and food should split out into retail, motor services, accommodation, and food (I keep misspelling accomodation – it’s getting annoying).

Public administration is too vague, so we’ll just say government. Then we’ll also split out certain public sectors so security (including law enforcement), military, legal (because I’m not tracking anyone as a lawyer or judge or court personnel), and rescue (so we can get fire services and the coastguard in there).

I also realise we have no media, so communication, should sub off that to separate those in charge of communication tech from those in television, radio, newspapers, and any and all writing. We’ll also pop out technology, as I think that is useful to separate.

Reviewing the UK classification, arts, entertainment and recreation should be joined – I’m interested in splitting it off more frugally, so let’s have arts and entertainment be retained, recreation, retained, and then sports split off from the two.

To also better manage the services available to government, I want to introduce waste disposal, but that seems too specific. It should include our general cleanliness and environmental workers. In fact these kind of include a number of cleaners and janitors. Let’s go with sanitation as that’s already pretty prevalent.

So now we have our industries as:

  • accommodation (hotels, resorts, general hospitality services)
  • administration (office work, accounting, legal teams, in-house bureaucracy, those damn bureaucrats)
  • agriculture (farming, forestry, fishing, and other natural services)
  • arts and entertainment (theatres, galleries, museums, libraries, and general admission to see something going on)
  • communication (telecommunications, internet lines, support of the communication utility)
  • construction (building infrastructure! Any and all, anything with a hardhat)
  • education (teaching students and any application of passing on knowledge to the masses)
  • electricity (powering the nation!)
  • financial (banking, insurance, money begets money here)
  • food services (restaurants, cafés, fast food and so on)
  • government (oh yes, our MPs don’t classify, but those working to provide the government workings)
  • healthcare (doctors, nurses, dentists, chiropractors – everyone who tells us we’re unhealthy)
  • legal services (lawyers, judges, anyone involved in our courts)
  • manufacturing (working in factory? Join the club!)
  • media (TV, radio, news reporting and managing those various channels by which we reach the people)
  • military (defending the nation!)
  • mining (gotta get them raw materials)
  • motor services (repair of cars, motorcycles, car washes, you name it)
  • real estate (providing of spaces for living, commercial, industrial, or office)
  • recreation (gaming and the like – anyone promoting “fun” as their main attraction)
  • rescue (coastguard, fire services, the modern day hero)
  • retail (shops, shopping, commercialism)
  • sanitation (waste disposal, remediation, cleaners and janitors)
  • scientific research (scientists!)
  • security (law enforcement, or private security)
  • servile (um… general butlery)
  • sports (athletes and alike)
  • technology (making phones, new devices that make our life easier, etc.)
  • transport (driving dem buses)
  • waterworks (water for all!)
  • student (under 21)
  • unemployed (over 21, under 67)
  • retired (over 67)

So that looks like a more clear cut and definitive list to me. Let’s look at government:

Government

So I set out basing the sectors of government as being based of spending. Let’s not do that. They can be applied to the various industries – let’s not do this either. We’re going to keep things separate. This will require modifying our privatisation & nationalisation policies:

To reflect the actual more accurately, rather than influence the whether government has a say in the industries, we’ll make sure that government can always dictate how an industry is run. But in true form, we’ll make it so that how much is spent in the industry is the only policy affected. This will affect the salaries given to the industry, which will affect sector spending, which will affect taxes and so on.

Because I’ll be switching this around, there won’t be need for managing what sector an industry will be part of (apart from if its private or public).

NOW comes the real part of determining our sectors – our governmental departments. What do we need to rank and survey?

Well for the UK, the generalised departments are: Business, Energy & Industrial, Digital, Culture, Media & Sport, Education, Environment Food & Rural Affairs, International Trade, Levelling Up, Housing & Communities, Transport, Work & Pensions, Health & Social Care, Defence and Justice. Let’s do like we did Sexuality & Gender – implement my own philosophy.

So let’s start off with the fundamental services: Healthcare, Education, Transport, Security, and Safety. We can then have our departments for Healthcare & Social Services, Education & Development, Transport & Infrastructure, and Security & Safety. We also need to manage the Welfare & Pensions for our unemployed, retired, and student citizens. Our Business & Industry sector can remain. Housing & Utilities can also remain, to manage some of our fundamental resources. Food, social services, entertainment and our various living activities can be conglomerated to Culture, Media, Recreation & Tourism. Environment can remain, but we’ll include sanitation. Defence can also include foreign affairs, so let’s go Defence and Diplomacy – we’ll marry the two dichotomies. We could consider legal, but that bundles into Security.

So let’s list out Kalmany’s Government Departments:

  • Department for Business and Industry (or just Industry)
  • Department for Culture, Media, Recreation & Tourism (or CMRT)
  • Department for Defence and Diplomacy (or Foreign Affairs)
  • Department for Education and Development (or just Education)
  • Department for Environmental and Sanitation Services (or just Environment)
  • Department for Healthcare and Social Services (or just Healthcare)
  • Department for Housing and Utilities (or Communities)
  • Department for Security and Safety (or Public Services)
  • Department for Transport and Infrastructure (or just Transport)
  • Department for Welfare and Pensions (or just Welfare)

And…

  • National Treasury
  • National Courts

This’ll bring down our measurable sectors from 11 to 10. Not much but at least it’s respectable.

With these changes, we’ll probably reconsider our policies. A policy should be restructured to be:

  • legislation or,
  • initiative

Initiatives will change the constituency infrastructure, and legislation will change citizen perceptions and general living.

Ahhh, but I like the visuals of seeing the sectors they are affiliated to, so we’ll keep the government sector indicators. But the nationalism and privatisation policies will not be initiatives for the whole sector, just each industry. I wonder if I should allow the policy for taxes…

With that little brainstorm, that finalising some plans that will help me in my refactoring. As you’ve seen in my coding, I flit between camelCase and snake_case, so I’ve decided to settle on camelCase. And rather than do it bit by bit, like they say you should, I’m doing it all at once (it’s very complicated to determine what’s used where so it’s easier to read through it all in one go.)

That and I’m rearranging my codes bases – they’ll need to be split up and I’m going to add some deployment routines to better manage it all. It’s going to be a bit of work, but the end result will be a more streamlined development release process. And an accurate version number in the site. That’s the aim anyway.

So I hope you’re well. I hear you’re back in London overseeing some updates at the lounge. I hear there’s an infestation of rats. Hopefully you won’t need to involve the Rat King. If you do, remember his weakness is Gouda. Every rat loves gouda. Heck, I love gouda. I’ll send you some gouda. Just in case.

Yours,
Stan

Leave a comment