Daily Habits

I’ve picked up quite a few daily habits since the start of the year. To name a few: I’ve been doing daily sketches, I’ve been going on a daily walking routine, learning Spanish on Duolingo, I have a quick stretching/exercise routine I do in the mornings, etc. (I’m also supposed to be writing daily, but this has proven more difficult to keep doing consistently…)

I like those daily habits that can be easily tracked with technology. Duolingo tracks my Spanish learning streak (currently on a 147-day streak). r/sketchdaily tracks my drawing streaks. I have an app on my phone that tracks how often I meet my daily walking target (usually the only problem is if it rains)

There’s a productivity tip supposedly advocated by Jerry Seinfeld called “Don’t Break the Chain”. It recognizes the power of tracking your streaks. The longer your streak gets, the more it motivates (or pressures?) you to maintain the streak and keep it going. It also helps you realize that doing things repeatedly on a daily basis leads to small, incremental improvements that can quickly compound into big improvements

Daily habits can be difficult sometimes unless you live a totally boring life. Most people will have differing circumstances from day-to-day that may cause you to miss your daily habits every so often. Maybe you have an out-of-town trip that makes your daily gym habit impossible, or maybe you needed to go overtime all week so you needed to skip your extra learnings, and so on. That’s kind of fine – as long as you understand the tradeoffs you’re making (it is your life to live and prioritize after all)

But even when you’re short on time, you can still look for ways to keep your streak going. With Duolingo, I usually do it in the mornings on my desktop pc, but if I’m busy all day I can do a quick Duolingo session on my mobile. For sketches, if I don’t have much time I can pick up a small post-it and do a quick and small doodle. If it’s raining too hard for me to go out and take my walk, I can go to the nearest mall and just do a walkabout there, maybe even running some errands at the same time. I’m also supposed to be reading books daily – one of the daily habits I’m not consistent at – but if I don’t have time, maybe I can just read a few paragraphs or pages right before I sleep

Depending on your personality, trying to maintain a streak can seem to be a burden sometimes. You feel like you’re becoming a slave to the habit. But as the book “The Greatest Salesman in the World” implies, humans by nature are slaves to habit, and if we must be slaves to habit we might as well be slaves to good habits of our own choosing


Favor Composition Over Inheritance

Composition over inheritance” is an object-oriented programming principle that I’m sad to say many devs I’ve encountered aren’t too familiar with. Composition provides greater flexibility, modularity, and extensibility in large software systems as compared to inheritance, especially for statically typed languages like Java that don’t support multiple inheritance

The most common examples of the problems caused by too much inheritance involved generic object such as the game objects example in the wikipedia page linked above. I want to cite a more enterprise-y example I’ve encountered in past projects

Let’s say in your system, you have a base class “ScreenController”, which contains all the common behaviors for screens in your system. Behaviors could include startup behaviors, variables the screen needs to track, how to handle the actions when the user clicks buttons, that sort of thing. Then each dev working on a different screen in your system will just extend this base class for their own screen, and you have a type hierarchy that looks something like this:


Alright, that’s fine, a perfectly acceptable use of inheritance. But then as your system grows larger, you notice some of the screens share some other behaviors could be refactored so that they aren’t repeated. For example, some of the screens might be Search screens that have similar behavior. Or maintenance (CRUD) screens that share common action handlers. Using inheritance, you might extend ScreenController and add additional hierarchy levels to handle those common behaviors, and you end up with something like:


Okay, it’s a bit more complicated now, but it’s probably still manageable right? But then one of the devs realizes that your project needs some modal screens too, which have some additional behavior as well. An example would be a modal screen that allows the user to select some parameters (a “selection screen”). Some modal screens also need to be search screens or maintenance screens too. If you insist on using inheritance, you need to mix and match all the possible combinations and might start seeing a hierarchy similar to:


Okay, things are starting to get really unwieldy now, but hopefully there aren’t any further complications right? Then your team starts to implement multiple subsystems with different domains, and some of the different domains have common behavior that they want to have in base classes too. So for example, the finance domain wants to have a FinanceScreen parent class they can use. But what about the existing hierarchy above? Should you duplicate it for each domain and up with ridiculous things like FinanceModalSearchScreen? I’m not even going to bother making an example of such a type hierarchy!

Now, you look at this mess and wonder how could it have been done better? Well, (as if the spoilers in the post title didn’t make this obvious), one alternative would have been to use composition. Composition means creating objects to encapsulate behavior and attaching them to other objects as necessary.

In our example, if you still had the flat hierarchy from the start, you could have a base ScreenBehavior class, and the ScreenController could have an addBehavior() method. Your class hierarchy would end up similar to:


And each screen will just have to add the specific behaviors it needs like so:

public ScreenA() {
		addBehavior(new SearchScreenBehavior());
		addBehavior(new ModalScreenBehavior());
		addBehavior(new FinanceScreenBehavior());

This setup is a lot more flexible and easily extensible, since you don’t have to uproot entire type hierarchies when some new common behavior needs to be added. Such robust design is especially important for larger projects and systems that may have hundreds of screens. The only downside is that you have to implement support for this approach early in the project – the longer you wait, the more complicated it becomes to adjust the existing code to the new paradigm. Definitely something to consider if you’re a technical lead on a large project just starting out



Introspection and Self-Awareness

Sometimes I write something and at the end I find that it upsets me. Or I think about something I haven’t thought about in a long time just before I sleep, then I have a nightmare about it and it saddens me to think that my subconscious still hasn’t let go of it after all this time

That’s a good thing though, right? One of the purpose of writing and introspection is to become more attuned to your inner thoughts and emotions, to better understand and work with your own self. I try to have this self-awareness that I’m sure not many people bother with

Just yesterday, a friend asked me why I tracked a certain thing that I do. I told him that I track a lot of things because memory is poor and fragile. I track the restaurants I go to, the shows I watch, the books I read, the games I play, the things I spend money on, how much I sleep, etc. Maybe I should add “how I feel” to that list too

Introspection and self-awareness is a fine line to walk. You don’t want to be so absorbed in yourself that you get bogged down in overthinking. Yet everyone needs some level of self-awareness in their life – if only to be able to identify when their own prejudices, fears, or other emotions are starting to affect daily decisions

Coding Frameworks

For the better part of my software development career so far, I’ve had the doubtful pleasure of being one of the devs using and maintaining our in-house web development framework. Framework coding is a bit different from the actual application development. At the core it’s a simple idea: you have a whole bunch of code that helps do programming tasks that you expect will often be necessary in a certain set of projects, so you write that code with the intent of reusing it across multiple projects. For a web development framework, those tasks will be things like handling request parameters, form validation, form to database mapping, and so on. You can have frameworks for a variety of domains too, not just web development. There are mobile development frameworks, and game development frameworks, and so on

Typically, a framework is developed alongside a project using that framework (to save on costs), but the framework’s objective of code reuse may not always align with the project’s objectives of “get stuff done already”.  Investing in reusable code often means there will be a bit more work done as you start up, to make sure that the code is flexible and reusable enough for future projects, but when your schedules are tight, these concerns may become secondary and you will be tempted to write in some substandard code that you will “just refactor later”. Technical debt by itself already tends to be a problem, it gets worse when it’s technical debt in framework code since you’re going to carry that across multiple projects, so be wary when sacrificing the quality of framework code for the sake of one project

Another thing is that you need to be more aware of separation of concerns, especially if the application development team overlaps with the framework development team. The idea of a framework is that it should be handling the most common tasks in a typical project, but when you’re embedded in a project there will be a tendency to try to handle even those special cases that are unique to the project. The danger here is that parts of the project domain will start seeping into your framework code because of requests by devs to provide a way to handle so-and-so scenario. And you end up with a situation where a few years later you ask, what the hell is this code doing, and the answer is that it was something needed by a developer three projects ago

Speaking of separation of concerns, I’ve also found that devs working on framework code need to be more cognizant of things like that, meaning they have to be able to write good, modular, flexible code that can be easily reused for future projects. That means you need a solid understanding of coupling, separation of concerns, interfaces, and so on

Flexibility is particularly important, as I’ve found in one of my later projects that was sold to multiple clients. Different clients will have varying needs and wants, so making sure your code is flexible and configurable enough to cater to a wide variety of needs. When you’re writing framework code, your clients are other developers, all the more reason to present an API that is consistent and flexible enough for their use. If you expect your framework to be used as the baseline for multiple projects, you will need to make sure it can cater to a wide variety of projects

That flexibility will have limits though. Frameworks will tend to require a “certain way of doing things”, meaning devs will have to do some adapting to be able to use it. For example, if you post about an out of the box approach on a Ruby on Rails forum, you might get some replies about how “that’s not how things are done in Rails”. In practice, it’s impossible for a framework’s maintainers to anticipate all possible future needs of different projects, and developers will need to be able to build on top of your framework or even extend it as necessary. Instead of wasting effort trying to anticipate everything, framework developers should provide an easy, default path for the most common things, but be flexible enough to allow divergence for things the framework doesn’t support

Another thing to pay attention to is how tightly coupled different components of your framework are. Is the framework still useful if you have to support a third-party component to replace some functionality later on? What if you need to use a different database vendor? What if the client requires a different way of storing resource strings? You don’t have to support all the different possible implementations up front, but it would be wise to leave room for a future extension or plug-in to be easily swappable with the framework’s components

The most important thing to keep in mind is that the objectives of a framework are two-fold: (a) be reusable across multiple projects; (b) make it easier for developers to do the most common tasks in the chosen domain. Anything else beyond that, tread carefully

Large Projects and Losing Focus

I’m kind of a serial project starter. I’m sure it’s a very common thing. I’ll often have random ideas for projects I could do, big or small. I’d have a dozen of them percolating in my head at any one time. And somewhere between four to five dozen scattered down in various documents, notepads and what not, waiting to be explored. (I literally have two such small post-it notes with 5 such items in front of me right now)

These projects range from the small (programming: small scripts to automate some stuff I do regularly; sketches: quick sketches I want to do; writing: blog posts, short stories;) to the rather large and time-consuming (game development ideas, complicated data analysis ideas, novel ideas, some major reorganization/sorting of stuff, and so on). Unfortunately, starting new projects is rarely fruitful unless you actually finish those projects. And I rarely finish the larger projects.

I think about what it takes for me to get one of the largest projects to completion. At which stages do I typically falter?

Typically it starts with an idea. Something cool I could do. Or make. Or write. At this stage there’s a lot of optimism. I’m probably in love with the idea. If it’s a big enough idea, I might even think it’ll make me famous. Or earn me a lot of money. Or win me a nobel prize. Or all of those!

If I don’t like the idea enough to start on it immediately, I’ll add it to one of my lists that hopefully I manage to get back to sometime within the next century.

If I do like the idea enough, I’ll move on to some form of brainstorming. Maybe I’ll let the idea run around in my head for a couple of nights. Typically I’ll run the idea through some people I trust and would have a similar interest in the area. Then maybe draw up a short idea document outlining some of the details I’ve already imagined, to be expanded or reduced later as needed. If it’s a writing thing, I start to think in broad strokes: what the setting is, who the protag is, where I imagine him to be ending etc

At this point I pretty much have an idea of what I want to do. The next step is to study what I need to execute. If it’s a programming or game development project, I look into what tools I’ll need or programming techniques I need to learn. I might need to access or scrape some sort of data source for analysis so I’ll start looking for sources

Then I would try to get started. For programming stuff I might make a small prototype already. If it’s a writing thing, I might write a scene or two.

After the first tranche of work, I’m going to assess how much farther I need to go. And typically this is where many of the projects will drop off. At this point I become aware of the size and scope of what I plan to do. I would look at the sheer amount of work needed to bring the project to conclusion, and it can be disheartening.

I start out optimistic, thinking about the exciting, cool stuff I get to try out, amazing scenes I want to write, interesting gameplay mechanics I thought of, and so on. But once I get past that I start to realize that finishing the job will require a lot of drudgework too. That means a lot of small, annoying, menial tasks that I’ll put off and won’t want to do

I read a lot of self-improvement and “getting things done” sort of stuff, so I know all the usual advice: break down the big tasks into small tasks, take one step at a time, and so on. The problem is usually lack of focus. Since at this point there’s a lull in my interest towards the project, it’s an opportune time for some other idea to come along and distract me. Or maybe some shiny new video game or book starts taking up my time. Or some other random distraction that takes my time away. Then I’m too lazy to pick it up again, and the vicious cycle repeats with the next big project.

Smaller projects are fine – the ones that only take me a few hours or a day to do. It’s the bigger ones that are the problem. I mostly know where I have to improve – I have to be able to focus and commit my time. Eliminate distractions. Stay on track. And so on. Someday I’ll get it right


A Programmer’s Hubris

“We will encourage you to develop the three great virtues of a programmer: laziness, impatience, and hubris.” — Larry Wall, Programming Perl (1st edition)

Hubris is a fancier word for an excessive sense of pride. Why is this to be considered a great virtue for a programmer? Programming is at least partly an act of creation, which means there is an element of craftsmanship involved. A craftsman imbued with hubris is able to take pride in his work – he is driven to create work that is the best quality he can provide. For a programmer, this quality reflects both externally (low number of defects) and internally (code that is easy to read and maintain)

There are also programmers who do not see themselves as craftsmen, but rather simply code-generating cogs in a machine. They are not imbued with hubris, and hence have no concern with the quality of their work. Their only concern is to be able to do the bare minimum to satisfy the requirements of their tasks. And if you that is the way you choose to live and work, that can be fine for many people

In general however, I find that programmers who are able to take pride in their work are more able to go the extra mile. They will tend to be more productive, they will be more able to think outside the box, they will be more able to provide suggestions for improvement, they will be more willing and able to help and support other programmers, and so on

This ability to take pride in one’s work applies at the company level too. There are companies that don’t like to focus on quality or standards or doing things right. When your company decides that quality is not that important and sacrifices it at the altar of profits, it reflects poorly upon the craftsmen in your company and affects their happiness and morale. No craftsman will be happy being pressured to do substantial work simply because the company is unwilling to manage schedules properly.

If you are a leader in a company who has developed a culture of quality and craftsmanship, think long and hard before pivoting to any direction that takes away from that culture. There are people who stay at a company simply because they enjoy being craftsmen able to do high-quality work. If you take that away, well, you can imagine the consequences

Appearances and Diplomacy

(A bit of Philippine politics in this post, if that sort of thing bothers you)

Recently as the whole world watched one of our political leaders display his expected lack of diplomatic finesse on the global stage, I couldn’t help but think about how in my younger days there’s a good chance I might have approved of his frank, straight-talking, shoot-from-the-hip brand of diplomacy. I have a bit of a reputation myself for preferring to speak frankly and directly instead of dancing around the issues, although these days I understand the wisdom of adapting to the situation as needed

In my youth I was the sort of person who disdained those who prioritized form over substance. For this reason I disliked protocol and ritual and dress codes and formalities and all that. I imagine that IT people are notorious for preferring casual dress and disliking suits. I proudly enjoyed games with dated graphics when other people would fawn over the latest Crysis or whatever. I felt that anyone who prioritized appearances was somehow shallow and that one should focus more on the functional and practical. This is somewhat related to my views on lying and salesmanship

As I got older though, I began to appreciate that sometimes appearances can matter too. Formalities and rituals can have meaning, especially when other people value them. And sometimes you have to dress up, either to impress people, or to fit in with the situation. These are concessions one has to make in order to be member of society. As Sheldon Cooper would say, “it’s the social convention”. I guess I consider learning to navigate society’s social conventions is part of being a mature adult

Which is part of why the current leadership’s lack of diplomacy is so annoying for me personally. It smacks of immaturity. Reacting to criticism with cussing and swearing and dredging up century-old mistakes and calling other people gay, these are behaviors I’d (sadly) expect from a 10 year old on XBox Live, not the leader of a sovereign nation.

And supporters will say at least he’s honest and direct and real. I’m pretty sure I’m honest and direct and real (ask anyone!) and I don’t go around swearing at people just because they point out my faults. There’s no reason to antagonize people just because they don’t agree with you. It’s possible to disagree and still be diplomatic. Not even the leadership of North Korea talks like that. Well, I could talk my head off politics if given the chance, so I’ll just abruptly end this post here



Type Interfaces Matter

…especially for strongly-typed languages.

In one of the bigger Java projects that I took over, I was often annoyed to find some devs had written method signatures like

public void doTheThing(HashMap<K, V> params)

Which is silly – not because of the naming, that’s obviously not a real-world function name. The silly part is requiring a particular implementation (HashMap) instead of the generic interface (Map). It unnecessarily restricts your API and makes it less flexible. Unless your function specifically cares about the hashing part, there’s no reason the parameter isn’t a Map instead

Since most Java libraries will perform proper encapsulation and give you a generic Map type, it adds some mismatch when you have to plug one of those types into your function; one would need to instantiate a new HashMap and copy the contents of the generic Map into it so that your function accepts it

Use the generic interface as much as possible! Use the specific implementation type only when instantiating!

Lying and Salesmanship

A recent post on Wait But Why had me thinking about lying.


Some people will scoff if I say I don’t lie. They’re not wrong. I once spun a tall tale about a childhood rival I had visited in the province who challenged me to a swimming contest to explain why I had lost my glasses to the sea. The lie was so good, I got a follow-up question about it a year later and was so surprised I just blurted out that my rival died in accident before finally admitting to the fib

But I will intentionally lie often only for fun or mischief, or in the rare case, to protect someone or avoid some problem or injustice. Even for that last scenario I will try to avoid it as much as possible. I am more likely to stay quiet or avoid discussion or maybe even stretch the truth a bit to “technically correct”, but I try to avoid any outright falsehoods unless absolutely necessary

For this same reason, I kind of have the same aversion to any form of salesmanship, although I am occasionally told that I am good at writing copy. At work I was sometimes asked to write some response to questions in a tender that would be less than honest.

“We don’t have this feature, how should I respond?”

“Just say we have it.”

“But we don’t. How about I just write that this feature will be available?”

You can see the use of optimistic future tense to stretch the truth a bit. At one point a higher-up even told me that all the other suppliers do that to, as if that justifies it. Being asked to outright be dishonest was stressful for me at best so I later on learned to avoid such tasks altogether.

I understand that not all salesmanship is dishonest and that not all salesmen are scammers looking to sell snake oil. But we basically live in a world that is caveat emptor don’t we? I feel like those salesmen who are honestly just extolling the virtues of their wares are the exception rather than the norm.

I recognize the need for salesmanship as a skill in everyday life, although younger me would have scoffed at that idea, believing that things should be judged solely on their merits. But merits aren’t always obvious, and you still need some level of presentation and good communication skills to push your ideas and merits forward.  I’m fine with that I guess, as long as we try to keep things honest.

Investigating the Drug Killings

It’s no secret that many are unhappy with the way the congressional investigations into the so-called “drug war” and related killings here in the Philippines. If I were in charge of these investigations, these are the some of the questions I’d want answered:

(Disclaimers: I’m not a lawyer or any kind of expert. Understandably, the resource persons may be reluctant to answer some of these in open session, in which case an executive session could be done. Some may have already been asked/answered during the hearings and I just missed them as I do not watch all the sessions live. Additional or different sets of resource persons may need to be called upon)

Drug war and prevalence:

  • Are there any official marching orders regarding the drug war? What are they?
  • What is the prevalence of drug usage in the country?
  • How many drug users are there?
  • Where does this data come from?
  • How does the prevalence compare with previous years and administrations?
  • How does the prevalence (per capita) compare with other countries, particularly those with similar economic levels?
  • What are the sources of intel that leads to the “drug watchlists”?
  • What are the sources of intel that lead to the president’s “narco-list”?
  • How do our tactics in this drug war compare to those of other countries with similar programs? Which of those countries have been successful?
  • Do we have data on the prevalence of drug usage during the president’s term in Davao? Have the harsh methods proven to be effective?
  • Do we have any updated data since the “drug war” began? Has the drug prevalence gone down?
  • Do we have any quantifiable target for the “drug war”? When do we declare success? Can we receive regular updates?

Drug surrenderees:

  • How many of the drug surrenderees were previously on police watchlists?
  • How many came forward vs rounded up by the police?
  • What are the consequences for not coming forward?
  • How many of the surrenderees surrendered or gave confessions with the benefit of legal counsel? Are they entitled to legal counsel?
  • Have any of the surrenderees later been found to still be involved in drug operations?
  • There are reports of people mistakenly added to these surrenderee lists or forced to come forward, are the police investigating them?

Suspects killed during police operations (“nanlaban”):

  • How many drug-related operations have the police conducted? How does this rate compare with previous years and administrations?
  • How many suspects are killed vs arrested? How does this rate compare with previous years and administrations?
  • How do the above rates compare with other countries, particularly those with similar drug prevalence rates? How does it compare with other countries that have ongoing “drug wars”?
  • How many cases of suspects killed during police operations are under investigation? Who conducts the investigations? Do they have enough resources?
  • What are the rules of engagement during police operations? Are all officers given the proper training re: these rules?
  • Are there any resources or other things that could be provided to the police to help minimize unnecessary loss of life?
  • What is the protocol/procedure when a suspect is killed during a police operation? Is there any automatic investigation or counseling for the officer involved?
  • Is there any autopsy or other forensic analysis done on suspects killed during police operations? Are they checked for powder burns, or for fingerprints on the alleged weapon they used? Ballistics matching on bullets recovered at the scene?
  • Is it possible that some officers are becoming overzealous because of the president’s violent rhetoric? Is it possible that some officers misinterpret the president’s violent rhetoric?
  • Do we have data on the incidence rate of police killings during the president’s term in Davao? How did it compare to other areas?
  • If relatives of those killed suspect foul play, who can they turn to? Most of them will be poor with limited resources, do we need to provide them legal assistance?

Suspects killed while in custody (mainly “nang-agaw ng baril”):

  • How many suspects have been killed while in custody (compared with arrests)? How does this rate compare with previous years and administrations?
  • What is the protocol or procedure for officers handling suspects in custody? Are there any procedures to prevent the suspect being able to grab officers’ weapons? Are all officers given the proper training re: these rules?
  • What is the protocol/procedure when a suspect is killed  in custody? Is there any automatic investigation or counseling for the officer involved?
  • Are the involved officers under any sort of administrative or criminal liability for carelessness in such situations?
  • Do we have data on the incidence rate of suspects killed in custody during the president’s term in Davao? How did it compare to other areas?

Non-suspects killed during any sort of police operations (“collateral damage”):

  • Are there any such incidents?
  • In case there are such incidents, are the involved officers under any sort of administrative or criminal liability? Is there any automatic investigation or counseling for the officers involved?

Vigilante killings (“cardboard killings” and riding-in-tandem killings):

  • How many such incidents have been recorded and are under investigation by the police?
  • What are the statuses of these investigations? What priority is given by to these cases?
  • What is the protocol/procedure when a body is found under such circumstances?
  • Are police able to identify all the victims? Why or why not?
  • Is there any kind of autopsy or forensic analysis done on the victims’ bodies?
  • Many of the victims are alleged to be drug users or pushers, have the bodies been tested to check the truth of this?
  • How many of the victims were on police watchlists?
  • Where are the victims killed? What weapons are used? What materials are used for the cardboard/tape/etc? What model and make of vehicle/motorcycle are often used?
  • Which areas have the highest rate of such incidents? Do they correspond to areas with high drug use? Has there been any initiative to increase police visibility in those areas?
  • Is there any common pattern or modus operandi identified in such killings?
  • Are there any leads? (Understandably, the police may not be able to disclose this, or maybe only in executive session)
  • Do the killings bear any similarity to any previous cases?
  • Is it possible that there are law enforcers involved in these killings?
  • Do we have any intel or watchlists for hitmen the same way we do for drug dealers?
  • Do we have data on the incidence rate of vigilante killings during the president’s term in Davao? How did it compare to other areas? Were the police able to find ways to reduce or solve those killings?

Bonus: Bilibid drug operations (in addition to whatever narrative the DOJ secretary felt like bringing forward):

  • What % of drug volume in the country passes through Bilibid? Where does this data come from? How does it compare to previous years and administrations?
  • How many inmates are involved in illegal activities inside Bilibid?
  • What is the daily routine of the involved inmates?
  • What are the existing legal procedures/protocols for inmates caught in illegal activities inside the Bilibid? Are we allowed to isolate or transfer the problematic inmates?
  • Which/how many Bilibid officers and guards are aware of the illegal activities?
  • How long have these illegal operations been going on? Are they still going on?
  • Where do the inmates get the money to fund these activities or to allegedly give to the former secretary as payoffs?

Final disclaimer: This is simply a thought exercise on my part, as to what guide questions I would start asking if I were in search of the truth. I have no expectations that any of the people in authority would actually follow these lines of questioning. I’m also sure there are many other pertinent questions that I have not considered at this time, but basically my approach would center around: what is the data, where does it come from, how does it compare to other data? And what are the procedures, who is liable for any problems, what is the progress of investigations? These avenues would seem to me (as a layman) to be the most useful in terms of improvements to legislation