Welcome to another episode of GUI Challenges, where I build interfaces my way, not a challenge you to do your way. With dark creative minds combined, we'll find multiple ways to solve these interfaces and expand the diversity of our skills. And on today's GUI Challenge, we're building a sci-fi-scrolling text effect. Well, here's what we're going to start working with. It's just paragraphs of text. You can't see that they've got a max width on them. That's just because we needed to be, like, not spanning the whole width of the layout here. And I like to do this to my paragraphs anyway. It's no fun reading something that goes from, like, the left edge all the way to the right edge. And there's studies that have said, like, 60 characters of reading width is optimal, or 40, or whatever it is that you find that, like, works harmoniously with your font size and your layout. But anyway, we're just going to transform this regular old set of paragraphs into something awesome. But I kind of want to read the story here. This was created by Bard as Google's AI. And I asked it to make a CSS vs JavaScript intergalactic battle. And it came up with this pretty funny story. It says, the year in 2089, the world is a very different place. The intergalactic JavaScript empire is taken over, and CSS is the only thing standing in their way. CSS, or Cascading Style Sheets, is a language used to style web pages. It's a powerful tool that can be used to create beautiful and complex designs. But it is also a weapon. It's so funny. It comes down here. It even says, like, but CSS isn't going down without a fight. A group of rebels banded together to fight the empire and led by a young woman named Sarah, who's a brilliant CSS programmer. She's determined to save the world. But they will use CSS to create a virus that will cripple the empire's computer systems. That's just funny. Anyway, the virus will be hidden in a simple website. And once it's accessed by the empire, it will spread like wildfire. The plan is risky. Blah, blah, blah. Anyway, CSS saves the world. But because it's a, you know, Bard created AI things. So of course it's going to be happy ending. Anyway, the empire will regroup and they'll come back for revenge. The rebels must be ready for them.  And they must continue to fight for freedom. And they must never give up hope. All right. So we've got this story. It would be awesome if this story was told like a classic sci-fi intro. That's what we're going to do today. And we're going to do that with scroll driven animations. I'm in Chrome Canary right now. So if I go to about version. I can see I'm in Chrome Canary 114. And the scroll driven animations and stuff has been kind of behind an experimental flag in here. That's another place when you go about flags. So here I have experimental web platform features turned on as well as the view transition API and stuff like that. Because that's good stuff. All the view transition API that shipped and stable. That's good stuff too. So anyway, maybe another episode on that later. So anyway, I'm using a latest version of chromium. I'm using an experimental API to do this. It's a really fun API. And I thought it made for this really kind of cool effect here. So that's this could be challenge. We're building this sci-fi text effect off of this basic text. Now, one of the things we want to do too is only, you know, heavily manipulate this text and do this cool sci-fi effect. If the user is okay with motion. And we're going to check for support for scroll driven animations before we use it. So let's start checking it out. And first we'll look at our HTML. We've just got an article with a bunch of paragraphs. But there is this cover viewport class. So this is part of the trickery that we have to do because we don't actually want to scroll our content. We want to fix our content into the viewport here in the center and then make it look like it's traveling off into the distance when the user scrolls. So we're going to link the page scroll to an animation that translates an element in three dimensions, you know, vanishing into the distance or coming into the forefront. And so with that foundational information and that background on what we're going to do, let's dig in at some CSS. I can just kind of see a general outline of how this all works. So here I am in my sci-fi scroll CSS file. I've got an animation to find here at the top and we'll go in and debug some of that soon. But let's get started with some of our essentials. So one of the first things is it's pretty annoying that our text is over here on the left edge. So let's put that in the center with, we'll target our cover viewport div that we had. We'll set it to display grid and we'll place the content in the center and we can see we have our content placed in the center. Excellent, that's a great step one. Now the other thing you notice, we don't have a whole lot of scrolling runway, which means if we wanted to turn this into a vanishing animation, we only have that little bit of a wiggle room. So we're going to set the body to be min block size 300 viewport height. And that's going to give us some scroll runway to work with. So then the next thing you want to do is we're going to check for at supports of animation timeline scroll route. So animation timeline is your ability to instead of have an animation be powered by the screen refresh rate, right? That's why something goes so smoothly from point A to point B. Since it's using the refresh rate of the browser to do that. We're going to set that timeline to be an animation timeline that targets a scroller. And in this case, we're targeting the route scroller, which is the page scroller here. So we're essentially saying we want to animate something based on the scroll position here. We can see that we're about halfway through our animation. We're halfway through the scroll and we're going to map that to an animation. And that's what the animation timeline lets us do. And you can target different scrollers with this keyword here. But right here, we're targeting the route one. And we're also going to say if the user has a prefers media like reduced motion, if they don't have any preference, meaning that they don't exclusively not want to see it, I know double negatives are annoying, but this is pretty much saying it's okay for us to do some motion. This user hasn't expressed any particular needs around motion. Well then cool. So we're going to target that viewport element. We're going to set it to position fixed. We're going to inset zero. And then we're going to set the perspective to 50. And we can really the perspective isn't important yet. So I'm just going to hit save. And we don't really see a difference because our content was already spanning the entire viewport. But what we've done is we've made it fixed inside of the viewport. So as we scroll, look, it doesn't move anymore. And that's crucial because we want the animation to be what's active here, not a scroll interaction. So we're going to take that scroll interaction that looks like it's doing nothing. And we're going to map it into an animation. The perspective is what's going to have us be in three dimensions as we get in there in a second. Okay, so now we have an article full of paragraphs and that containing element, that article element. Let's bring that in. The block size is set to 75%. Well here, let's just comment that out for now and look at the kind of essentials here. So if I hit save, we can immediately see that what I've done is set an animation for one second. The time doesn't really matter because time is sort of irrelevant in a concept of like a scroll timeline. The scroll position is more relevant in terms of like duration. We're going to set it to linear so that there's a one-to-one mapping between when I scroll and the results that we see in our animation. I'm going to target those keyframes that I made up here called keyframes sci-fi from Intusa to 0% and 100% essentially. And we'll go over that in a second and we set it to forwards, which I don't really think matters. Let's get rid of that and see if we get the exact same result. We do. So I'm going to get rid of that and commit that into my repo. Look at that. We're fixing little unnecessary bugs. Well, it's not a bug. It's just we're reducing the amount of complex surface area of this effect. Anyway, okay. So then here's the kicker though. We've got this animation timeline scroll route. And look, my editor doesn't even know what's going on. It's like, what's an animation timeline? What's the scroll function? And why are you passing it the word root? What does this all mean? And well, it just means we want the timeline for this animation that's running to be the like we were describing earlier attached to the amount of progress that the scroller has. So scroll progress will equate to the amount of time that has passed inside of an animation. So as I scroll, like I scroll down, it's going to progress through the animation. And if I scroll back up, it's going to reverse the animation. So we kind of get both directions for free by tying something to animation. It's super cool. So then why did I block size 75%? Well, let's see. It just kind of zooms the text up a little bit. And I liked it when the text was kind of coming in fully out of the bottom here. It just, I don't know, is more reminiscent of the effect. Plus it kind of filled the space made it easier to read. I just thought it looked nice. So that is why I have block size 75% here. And here's the crutch of the animation. And then we're looking at these keyframes going, OK, Adam, why'd you do transform rotate 45 degrees? And then you translated why 100 VH? And then you're going to go to negative 500 VH. What is going on here? And that's because if you look as I scroll out and out and out, that's 500 VH. I could even make it 1000 VH and it would be even tinier.  What I want to do really quicker is let me double click. Let's inspect because it's fun to play with positions. So let's get rid of the animation. So now we're back into a state that isn't transformed in 3D. And let's make one. Transform. We're going to rotate 45 degrees, right? That was one of the things we did. And then we also translated Y into 100 VH. Well, here, let's just knock that down. Oh, it looks like our rotate was X. Yes, we have rotate X. And so what's cool is we get a couple of, like, fun dev tools that we can use here. So the first one is we have this rotation tool. I can pop it open. Oh, let me click and pop it open. And I can change the amount of tilt that's on our effect here, which is, oh, let's go like this. What does this look like? Oh, we haven't hooked it up to the animation. Anyway, so this is essentially though how I measured and got to the value that I was looking for. So I was like, oh, I think 45 degrees is pretty good. And this is how you can adjust it. So in case you wanted to tweak or twist the result, you can do it there. And the other thing that we can do here is if you see, I get a little cursor here that's like a left and a right arrow over top of my 30 VH. And I can pull this left and right just like I'm in Figma. And I can see the animation. Well, I was able to pre-plan the animation by just writing the transform, deciding and finding what rotation X looked good, and then looking at what translate Ys looked good. And so the first thing I wanted to do is I wanted it to start out of the viewport. And so that's why we started translate Y 100%. And then I was like, okay, well, what about the out state? The out state looks good over here somewhere. Look, it just keeps going. Okay, we'll go back to something more reasonable. Anyway, so if you're wondering how I came up with those keyframes, that was the way I did it. And we shrink this back up and close out of DevTools. Thank you DevTools, that was very helpful. And I'll save and I'll just scroll to the top and refresh. And we got ourselves back into our scrolling scenario. So that is the essentials of this GUI challenge. I wanted to introduce you to scrolling to animations where we attach the time of an animation to a scroller's progress. And they kind of do a decently cool little effect where we go from a translate Y 100 so it's out of the viewport. And then by the end of the scrolling position, see I'm all the way down at the bottom, we're going to reach this translate Y of negative 500 VH. And we get this really cool effect that tells us a sci-fi CSS story. Anyway, I hope you liked this GUI challenge. And I'll see you on the next one, y'all. Take it easy.


The next item of business is a debate on motion 9.648 in the name of Roseanna Cunningham on the Wild Animals in Travelling Circuses Scotland Bill at stage 3. Before the debate begins, the Presiding Officer has required understanding orders to decide whether or not, in his view, any provision of the bill relates to a protected subject matter. Put briefly, that is whether it modifies the electoral system and franchises for Scottish parliamentary elections. If it does, the motion to pass the bill will require support from a supermajority of members, that is two-thirds majority of all members, which is 86. In the case of this bill, the Presiding Officer has decided that, in his view, no provision of the wild animals in travelling circuses Scotland Bill relates to a protected subject matter. Therefore, the bill does not require a supermajority to be passed at stage 3. Can I now invite all members who wish to press the request to speak buttons, and I call on Roseanna Cunningham, cabinet secretary, to speak and move the motion. I am pleased to open the brief debate. I would like to thank at the outset all those stakeholders who provided evidence and the committee members who were involved for their detailed and constructive consideration of the issues raised. First, I would like to deal with a very formal matter. I would like to advise Parliament for the purposes of rule 9.11 of the standing orders that Her Majesty, having been informed of the purport of the wild animals in travelling circuses Scotland Bill, has consented to place her prerogative and interests so far as they are affected by the bill at the disposal of the Parliament for the purposes of the bill. The bill, it turned out, required crown consent. The principle of a ban on wild animals in travelling circuses has had cross-party support for many years, although such circuses rarely visit Scotland now. The bill is therefore a preventative measure based on ethical concerns about the use of animals in travelling circuses in general. It makes a clear statement to the world that the Scottish people respect the innate character of wild animals and will not tolerate their subjection to a nomadic lifestyle as a spectacle for entertainment. The Environment, Climate Change and Land Reform Committee raised some concerns about the wording of the bill in the stage 1 report. I responded by explaining the reasoning behind the wording and supporting some changes to the bill at stage 2 when the definitions of wild animals and travelling circuses in particular were debated vigorously and on occasion humorously as well. Suitable amendments were, however, agreed to avoid requiring a list of types of animal or characteristics of a circus on the face of the bill. Presiding Officer, I do not have much time, so I want to deal with one substantive issue, which has arisen more recently and subsequent to my appearances at committee. I believe that the Delegated Powers and Law Reform Committee regard as unusual the new powers to specify whether a kind of animal is or is not wild and whether a kind of undertaking is or is not a travelling circus. The scenarios covered by the powers are themselves unusual. Guidance on the meaning of wild animal and travelling circus and how those phrases should be applied in practice will of course be provided. However, the Environment, Climate Change and Land Reform Committee felt that that guidance alone was insufficient given the crucial role of the definitions in the bill. There is a huge variety of forms of entertainment using wild animals and, obviously, of kinds of wild animals themselves. Although the bill's definitions will be sufficient in the vast majority of cases, the additional powers provide a mechanism to provide clarity in marginal cases, whether it is uncertainty, confusion or disagreement about whether or not particular kinds of animals or undertakings fall within the definitions. The powers in the bill to specify a kind of animal as wild or not and an undertaking as a travelling circus or not are for the purposes of the bill. It is expected that a court would, in the case of that animal or undertaking, apply the act on the basis that the specified animal is a wild animal and the specified undertaking is a travelling circus. The regulations specifying what is a wild animal or a travelling circus are, however, expressly without prejudice to the general definitions in sections 2 and 3. It is possible that, after regulations come into force, difficult issues could arise in a specific case because, for example, circumstances relating to that status of the animal have changed. We often refer to the llamas and alpacas as being an animal where that has happened in our lifetime. We therefore accept that a court would have to construe the act on the basis that sections 2 and 3 have a determinative effect, regardless of what previously had been specified by regulations. In that sense, we accept that the regulations would have been indicative only. Those powers, and specifically the way in which they were drafted to protect the generality of the definitions in the bill, were supported by committee members at stage 2. They would be used only after looking at the evidence case by case and through the affirmative procedure after consideration by Parliamentary Committee. I believe that those powers, backed up by the clear guidance that we will be issuing, will ensure that we have a robust bill that is practical and easy to enforce. Once again, I want to say thank you to all those who have been involved in the process of this bill, those who tested the notion of list one way or the other in terms of wild and domesticated animals, and those who came to the same conclusion that we had that it was extremely difficult to do that. In conclusion, I move. Well, it has to be very brief for cabinet secretaries over our time, just a wee minute, Mr Scott. Very brief, very brief. Thank you. Will the guidance be issued to me as well? It will. In conclusion, I move that the Parliament agrees that the Wild Animals in Travelling Circuses Scotland bill be agreed. Thank you, Deputy Presiding Officer. Here we are again, ringside at stage 3 of this bill. In sincerity, I am delighted that, as we reached the end of what has been an eventful year in politics, we are here today to discuss legislation that will protect many wild animals and prohibit their use in Scotland within the realm of a travelling circus. With the likely passage of the bill to royal assent, we are catching up with the 18 other European countries that presently have restrictions on the use of wild animals in circuses, and it appears that there is now to be UK Government legislation on the matter forthcoming too. I think that we have all agreed that on both animal welfare and ethical grounds it is correct that we now ban the use of wild animals in travelling circuses, while there is no evidence that there have been such circuses operating recently in Scotland. I think that everyone acknowledges that it remains imperative that we pass legislation to ban it. This was a bill in which the Eclare committee has played an important role, and, although it cannot be said that this is a landmark bill, it is a bill that highlights the necessity of our committee system and the rig and scrutiny that it provides. When this bill was first discussed at stage 1, we collectively raised a variety of concerns around legal definitions, which were primarily concerns of the many and varied industries that potentially could have been affected. At the time, we raised the fact that the bill raised criminalising shows and events that have high standards of animal welfare such as llama displays at the Royal Highlands show or organisations in my own region of the Highlands and Islands such as the Cairn Gorm Reindeer Centre. We raised the fact that there was a problem around the definition of circus and travelling circus and a lack of clarity as to what constituted a wild animal. All in all, this presented many legal issues with the bill as it stood. However, it is testimony to the Eclare committee, which was able to listen to the evidence and work with the Scottish Government to implement needed changes. I thank my colleagues John Scott, Mark Ruskell, David Stewart and the convener, Graham Day, who, in my hope, will not mind being described as veterans of the system and help to guide us, novices, through the intricacies of stage 2 and the amendments that were lodged, either to improve the definitions or to provide assurances of one kind or another. Although several amendments were not moved in their original form, it is clear that they prompted a response from the Scottish Government. I thank the cabinet secretary for the clarity that she has provided both today and on past occasions. I should also comment on the input of the Delegated Powers and Law Reform Committee, who raised several points last week around similar issues. I again thank the cabinet secretary for clarifying those issues today on the record in relation to definitions and accompanying guidance. Those are not just matters of arcane legal interest to lawyers like herself and me, but they are very important. I am glad that they have been taken on board. It is abundantly clear, Deputy Presiding Officer, that the Eclare committee has played an important role in ensuring that the bill is fit for purpose and addresses many of the concerns that operators had with the initial wording of the bill. As a result, the Scottish Conservatives are satisfied that the bill will deliver what it sets out to achieve, and we will be voting for it at stage 3 today. It will ensure that shows and exhibitions that adhere to high standards that are presently set out will be able to continue operating whilst ensuring that the exploitation of wild animals in the arena of travelling circuses is now at an end. As a result of the passage of the historic bill on to the statue book, we will in Scotland finally and at last truly be able to say that Nelly the Elephant has packed her trunk and said goodbye to the circus. I know that there is just more of that to come. David Stewart, please. Thank you, Presiding Officer. Labour will support the wild animals in travelling circuses Scotland bill at decision time. As a member of the clear committee and a strong supporter of a number of animal welfare organisations such as One Kind, I moved a number of amendments that I felt would have improved the bill. I am grateful to the cabinet secretary and the committee for supporting my amendment on the offence ground. At one level, of course, you could argue that we are attempting to restrict something that does not happen as we have no travelling circuses in Scotland. However, the bill once passed will fruitually approve the position by introducing the bill on ethical rather than welfare grounds. As the spice paper makes clear, circuses is Latin for circle or ring. One of the first major entertainment complexes in ancient Rome was Circus Maximus, which held up to 300,000 spectators. Moving to more modern times, in 2014, the Scottish Government public consultation received over 2,000 responses, with a strong majority in favour of the ban at 98 per cent, while 96 per cent were opposed to the performance or exhibition of wild animals. The bill, as we have heard, proposes to be a tribute to the performance, display or exhibition of wild animals in travelling circuses, and the policy memorandum lists the Scottish Government's view of the ethical challenges, which are basically the impact and respect for animals, the impact on the travelling environments and the ethical costs and benefit. On a technical point, the bill does not seek to prohibit circuses when travelling with our animals, but to create a criminal offence of travelling with or transporting for the purpose of performance, display or exhibition. It is on a summary conviction of level 5, which is currently £5,000. Enforcement, of course, will be by local authorities, but the philosophical underpinning will be based on the five freedoms set out by the Farm Animal Welfare Council statement of 1979, which is basically freedom of environment, diets, normal behaviour to be housed with or apart from other animals, or protected from suffering, injury or disease. As I said during the stage 1 debate, Animal Welfare organisations such as OneKind believe that there are strong animal welfare justifications for ban on the use of wild animals in travelling circuses. In their excellent petition to the Petitions Committee, they said, and I quote, that a travelling circus combines a number of specific characteristics, including extreme confinement, frequent transport and relocation and training for performance, which creates an environment where the needs of wild animals cannot be met. That combination is not found elsewhere, even in zoos, where wild animals are kept captive. It increases the risk of stress and, in some cases, ill treatment of the animals and makes effective inspection and regulation very difficult. Investigations into the UK circuses in recent years have documented shocking examples of severe habitual abuse of animals. For example, in 1999, individuals from tripplefield circuses were found guilty of cruelty to a champusie in anilphant. On 2009, the Great British Circus, the beating of elephants prior to performance, was filmed by animal defenders international. Earlier this year, a further expose by animal defenders showed anisrhystryc elephant named Ann being repeatedly beaten and abused by members of staff in the Bobby Roberts circus. As one kind of argued, it is crucial that, in the future, there are no gaps in legislation covering performance, display or exhibition of animals in Scotland. The Scottish Government has announced its intention to develop new licensure requirements to protect the welfare of wild and domestic animals not covered by the current legislation. I am pleased to support the bill and endorse it to Parliament. The road to this point, where, in a couple of hours or less, we will hopefully pass this bill, has been a long one to say the least. It was 13 years ago that the then Scottish Executive consulted on the Animal Health and Welfare Scotland Bill, and in the process identified significant concerns regarding the use of wild animals in travelling circuses, and it will be three years next month since the Scottish Government launched its consultation on introducing a ban. We are here now and right to be so. As children, many of us will have attended travelling circuses and marveled at the lions and tigers and elephants, but times change, and so does society's view on what is and isn't ethically or morally justifiable. The scrutiny process undertaken by the Environment, Climate Change and Land Reform Committee highlighted a number of issues, and I want to reflect on some of those. Criticisms made around the justification of the bill included the assertion that it was harmful to young people to see animals being used in such a way. It was pointed out that the opinion of children and young people hadn't actually been sought. Helpfully, however, in parallel with the committee's consideration, the Scottish Parliament's education service used the bill as a live example of the passage of legislation, and as school groups visiting horrid their views on whether wild animals in travelling circuses should be banned. Of over 1,000 votes cast by 9 to 13-year-olds, 81 per cent were in favour of introducing a ban. I would contend that, as we head into the year of young people, we might, as a Parliament, do well to consider how we ought to more formally build on that sort of engagement. Young people have opinions, very often considered, valid and well-formed opinions, and we, as MSPs, ought to take those on board as we consider legislative change. I am pleased that the bill that we have before us is one that is widely supported by that next generation. Definitions were, as we have heard, perhaps the main concern for the committee—definitions that made clear what is and isn't a circus, and therefore when travelling, woody would not be captured by the bill and what is and isn't a wild or indeed domesticated animal. The absence of such definitions being offered by the Government in response to the stage 1 report and a number of members brought forward amendments at stage 2. The amendments proposed by David Stewart, John Scott and Mark Ruskell were entirely constructive and well-intentioned, seeking, in line with the committee's stage 1 report, to secure helpful clarity. Unfortunately, as the stage 2 process unfolded, it became clear that none of those would achieve their laudable intentions and overcome the challenges that are involved in seeking to define circuses, wild animals and those domesticated in nature. The exchanges around those matters were splendidly and humorously captured on a Hollywood magazine sketch penned by Liam Kerchory. If members have not read it, I highly recommend getting online and doing so. The discussions around the emissions of raccoon dogs are rather woolly lemurs, tamarins, vaikunas, night monkeys and squirrel monkeys, and the ambiguity surrounding wallabies in the context of John Scott and Mark Ruskell's amendments were quite amusing at the time, even more so when wrapped up in a superbly written piece. However, there is, of course, a serious side to this, and we did, where possible, need to find some mechanism for addressing the legitimate concerns that have been highlighted. In the context of circus definition at least, I was appreciative of the support of colleagues and indeed the cabinet secretary in backing a stage 2 amendment I tabled, which affords ministers a power to bring forward regulation, either to define an activity that was perhaps contending that was not a travelling circus when it was indeed intended to be subject to the bill and similarly define an activity that was never intended to be captured but might become the subject of efforts to contend it was. In moving the amendment, I made the point that, if accompanied by clear guidance, it would go some way to addressing the committee's concerns and not create wriggle room either for activities that should be captured by the scope of the bill to escape it or what might be described as acts of entertainment that were never intended to be captured I understand the concerns raised by the DPLR committee but hopefully the cabinet secretary in her opening comments has addressed those. In conclusion, let me as others have acknowledged the contribution made by a raft of individuals and organisations to getting us to the point that we are today and welcome the cross-party support that appears, the bill will command at decision time. In the stage 1 debate, there were plenty of puns and mine certainly won't be as slick as Donald Cameron's but bear with me, mine certainly won't be as our elephant. Perhaps the Labour group should have been leading this debate today with the bill going through the Parliament, the only circus to look forward to will be the next leadership election. And since Kezia's trip to visit the wild animals in the jungle, she certainly has the qualifications. However, as I've said previously, the light-hearted manner in which the members across the chamber have approached this in previous debates in no way reflects the serious manner in which we've dealt with this bill or indeed the importance with which this committee and my colleagues take the subject relating to animal welfare. The Scottish Conservatives supported the general principles of this bill at stage 1 and put forward amendments at stage 2, reflecting the commitment that we have to ensure that we have good laws to secure the highest standards of animal welfare. We are supportive of a ban on the use of wild animals in travelling circuses on ethical and welfare grounds by delivering robust legislation. Across the chamber, we've heard a number of concerns over the drafting of the bill, concerns that we now believe that the cabinet secretary has taken on board. Those concerns were chiefly around definitions of what is a wild animal and what is a travelling circus. Our concerns have always been founded on the desire to see the most effective legislation without a regular room for those who would seek to either continue to use wild animals in this type of activity or indeed those who would seek to outlaw other types of activity which was never intended to be covered by the bill, including llamas and raptors at country fairs or even sheepdog trials. Vague definitions risk criminalising those who put on a show or events where animals had to be transported to the event and that needed clarification. The committee's view was that the bill, as initially drafted, did not fully address the issues that it set out to cover and was at risk of capturing animal performances and shows as mentioned, although that may not have been the intention. This amended bill should now not result in another piece of weak legislation from the Scottish Government that will fall down or be ineffective in the courts. The fact that little time was spent exploring the use of ethics, the ethical argument behind the bill indicates that right across this chamber, whether on welfare or ethical grounds, we believe that public performance of wild animals is no longer acceptable. The debate around the legislation has largely centred on poor drafting and fears that it had the potential to fail and what it set out to achieve. We in those benches believe that significant process has been made and we will be supporting the bill this evening. I am pleased to have the opportunity to contribute to what I hope will be the next step in ending cruelty and distress inflicted on animals in travelling circumstances. As your deputy convener on the cross-party group on animal welfare, I was delighted that we unanimously agreed the principle of the bill when it was previously debated. I am sure that today we will also unanimously make clear that the days of exploiting wild animals for human gratification in Scotland will soon be nothing more than a shameful memory sending a welcome powerful message about the value that we place on animal welfare. The use of wild animals in travelling circumstances is fundamentally cruel and a full ban is the only way to put a stop to this mistreatment returning to Scotland in the future. Highly respected animal welfare charities such as One Kind have rightly made the powerful case that there are strong ethical and animal welfare grounds to ban that practice. The mobile nature of travelling circumstances means that they invariably fail to effectively recreate a wild animal's natural environment. Animals are often subjected to restrictive conditions and uninteresting surroundings without the space to recreate their natural behaviour, to explore, to socialise and to find food as they would in the wild. That can have a wide range of serious physical and psychological implications for the animals. Likewise, the performances and tricks animals are forced to do require intensive training and can inflict significant amounts of pain and distress on those animals. There is widespread use of negative reinforcement and, in some instances, abusive training techniques. Even in instances of best practice, the very act of forcing wild animals to perform on command alters their natural behaviour and suppresses their natural instincts. That is directly in opposition to their welfare and is fundamentally unethical. There is a great deal of research into the impact of travelling circumstances on the welfare and wellbeing of wild animals that support that view. The conclusion of research that was undertaken by the Welsh Government was that captive animals in a quote, in circuses and other travelling animal shows, do not achieve their optimal animal welfare requirements and the evidence would therefore support a ban. Those are not problems that can be fixed through increased regulation or strengthened guidelines. They are inherent to travelling circuses and must be addressed with a full ban. We now have considerably more insight into the intelligence and sentience of wild animals, and we did in the past yet the appalling use of wild animals for entertainment continues. By reducing wild animals to a source of entertainment at the expense of their wellbeing, travelling circumstances contribute to a culture that undervalues the welfare and the rights of those animals. The initial bill was, by no means, perfect. I would like to thank the Environment, Climate Change and Land Reform Committee, who have tried to tackle those imperfections and shortcomings through their commendable work on the bill. Pre-empting many of the potential problems that the bill may face. It is vital that the laws that we pass are legally watertight and easily enforceable, and the changes made in line with the committee's recommendation have very much improved the bill significantly. The inclusion of more clearly defined terms in the establishment of ministerial powers to clarify those definitions protects against willful misinterpretation and potential loopholes, albeit it could be argued that more could have been done to incorporate that message within the bill itself. Likewise, I am pleased that David Stewart's amendment clarifying what constitutes an offence was also agreed. However, I am disappointed that the Scottish Government has failed to respond to other points raised by the committee and by members during the stage 1 debate. In particular, serious concerns were raised by council officials and the SSPCA about the practicalities of enforcement. The discretionary nature of local authorities enforcement duty combined with continued cuts to their budgets poses serious questions about the bill's enforceability. Enforcement on the ground must be closely monitored and the possibility of an inspector appointed by ministers must be revisited should there be any evidence of problems in this regard. There is also a need to ensure that there are no gaps in legislation covering performance display or exhibition of animals in Scotland. I look forward to the Scottish Government coming forward with new licensing requirements to further protect the welfare of all animals used for public performances not covered by the bill. That being said, I believe that the bill is a positive step forward. Finally, I can sign in this archaic outdated crotie to the history books where it belongs. I declare an interest as a member of the British Veterinary Association and I welcome the stage 3 debate today, which marks a watershed moment. For years, we have seen incremental improvements in welfare legislation, protecting key freedoms and placing responsibilities on animal keepers, but I believe that this is the first time that ethical reasons have been used alongside the welfare evidence to bring about a change, and that is very welcome. The bill fundamentally recognises that meeting basic welfare needs is not enough and that, for a wild animal to be unable to display its natural behaviours for its entire life is unethical and unacceptable. Any educational benefits of seeing wild animals in a travelling circus or conservation benefits are non-existent. There may have been educational benefits in an age before internet or TV, but we live in a very different world now, where the power and grace of a hunting tiger or the social intelligence of an elephant is displayed on primetime TV or even on the digital whiteboard of a school classroom. It is an important precedent that is being set today for anyone concerned about the rights of animals, and it begs the question about where do we go next. I welcome the Government's commitment to review further the regulations of all performance animals. I still believe that it would have been better to have conducted that full review in advance of the bill being brought forward, as the Welsh Government did, with clear conclusions as to which animal performances to either ban, regulate further or leave alone. The use of wild animals in travelling circuses is the starkest example of a practice that needs to be banned, but we should not have closed minds to reforming how both domestic and wild animals are used in other performances, particularly in static circuses. Although some members may poke fun at Christmas reindeer or birds of prey displays at garden centres being further regulated, I would say look at the evidence with an open mind, and if there are welfare issues to be answered, why would we not wish to regulate further? Turning to the bill at stage 2, there are clearly concerns about which animals should be included in the ban and the definition of a circus. The cabinet secretary pointed out omissions in both John Scott's amendment and my own, which to me only suggested that there probably is a list of animals that the Government considers as captured by the ban. It just does not want to put it on the face of the bill. However, the committee's central argument that there needs to be greater definition has been acknowledged, and I welcome that draft guidance has now been produced by the Government with a commitment that this is finalised and introduced at the same time as the act is implemented. Officials, I believe, have written out to stakeholders stating that the guidance cannot give a definitive interpretation of the law and that questions of interpretation are ultimately determined by the courts. I hope that we do not get to the point of a court test and that the eventual guidance does prove adequate. Presiding Officer, the bill is a further step today in our journey towards a society that respects and values animals. There are many more steps to take, but I look forward to approving the wild animals in travelling circuses bill at decision time tonight. I call Liam McArthur to follow by Angus MacDonald. Mr McArthur, please. Thank you, Presiding Officer. I, like Mark Ruskell, must declare that I am an honorary member of the BBA. Unlike most other speakers, I do not have the benefit of having sat through the committee's deliberations, but I am all the more grateful to the Eclare Committee for their efforts, along with all those who submitted evidence to the important piece of legislation that Scottish Liberal Democrats strongly support and look forward to voting for later on this afternoon. At stage 1, the concerns that I outlined were shared by most. I concentrated in a couple of areas. One was the decision to go around an ethical approach as opposed to a welfare approach in the bill. The other was the definitional problems that many other colleagues have already articulated. On the latter, I am pleased to see that considerable progress appears to be made since that stage 1 debate. I think that David Stewart has had a hand in that graham day, but I think that I would acknowledge the Government and the Cabinet Secretary in addressing many of those concerns. I note that one kind of animal defenders international believes that a combination of regulation-making powers and draft guidance has successfully addressed a number of the concerns that they identified at stage 1. In terms of the definition, I note that the Cabinet Secretary has clarified that the ban is targeted at travelling circuses so that static circuses and in the other enterprises that are not considered to be travelling circuses are not caught by the ban and only where those animals are being transported. I know, certainly from correspondence that I received from constituents, that there are those who wish to see the legislation extended to cover a far wider range of circumstances, including fixed animal shows involving sea mammals, falconry and others. I understand why there is a reluctance by the Government and indeed the committee to go down this route in the context of the bill, but I acknowledge that the Scottish Government has since announced its intention to develop new licensing requirements to protect all wild and domestic animal displays or performances that have not already been addressed by the bill or those taking place in licensed zoos, and I very much look forward to considering those proposals in due course. In the meantime, I think that the regulation-making power under affirmative procedure to establish and amend the types of animals that are covered seems to me a sensible approach. As the cabinet secretary has made clear, the approach that is taken to secondary legislation around animal welfare therefore seems to be logical and allow the committee an opportunity to scrutinise that in due course. As for the debate around whether or not an ethical as opposed to a welfare approach should be taken, I know that the cabinet secretary expressed concern about a lack of evidence for a welfare approach in the fear that that could open up the bill to a legal challenge. I am not entirely sure where the committee got to in that debate, but certainly at this stage it did not seem to be a reason to delay or reject the bill. In conclusion, the Scottish Liberal Democrats welcome the ban to use wild animals in travelling circuses. It reflects our values as a society and the importance that we attach to the highest standards of animal welfare. I am sure that I speak for all the members of the committee that I am pleased to see this bill finally being put to bed at stage 3. Not least because the issues related to the use of wild animals in circuses have been the subject of deliberation by campaigners, policy makers and legislators for decades. As we know, part of the existing framework for regulation in this area is covered by the performing animals regulation act of 1925 and the whole issue was raised again in response to the Scottish Government on the animal health and welfare bill, which subsequently became an act in 2006. The scope of the bill has been purposefully focused on wild animals in travelling circuses with some clear reasons in mind, mainly because the use of wild animals in travelling circuses involves the use of wild animals whose nature is still genetically and behaviourally hardwired, the performance of behaviours or tricks for entertainment that are not natural behaviours, inadequate temporary or mobile accommodation, which is not a lot of animals to act naturally and the fact that there is little or no educational or conservation value. All of those issues combined present a cumulative ethical challenge to Scottish society, giving strong ethical reasons for the ban. I am delighted that Scotland is leading the way on improving animal welfare, not just with the bill, but on plans to develop new licensing requirements to protect the welfare of wild and domesticated animals that are used for public performances or display in other circumstances that are not covered by the bill, which I understand will be achieved by an SSI under the Animal Health and Welfare Act 2006, and such will require consultation and an affirmative resolution. There is more work to do, although that legislation is intended to apply to all wild and domestic animal displays or performance, except for those that are already banned under the bill or those that are taking place in zoos that are already licensed under the zoo legislation, so hopefully there will be no gaps once that is introduced. There was some concern at the start of the passage of the bill that a more comprehensive approach would be preferable and more effective to what some referred to as a piecemeal approach. We had Andrew Mitchell from the City of Edinburgh Council calling for one piece of legislation, but it was acknowledged not least by Nicola O'Brien of the Captive Animals Protection Society that a comprehensive review of legislation would be a very lengthy process and that taking action now would have more immediate impact. I am content that the so-called piecemeal action is delivering the desired outcome much more quickly than would otherwise have been the case. In fact, the bill will enable the ban to be put into effect immediately. I am picking up on one of the comments from Colin Smyth. I think that we have got the bill right, but he raised the issue with regard to inspections and enforcement. I did have concerns earlier on with regard to that myself, but I am satisfied that we have got it right at this stage. In closing, Presiding Officer, I was pleased to see the inclusion of children and young people in the consultation process. It was the committee not just going through a box ticking exercise but making sure that their opinions were heard. One of the key ethical concerns on which the bill is based includes an adverse impact on children and young people that seeing wild animals and travelling circuses may have on the development of respectful and responsible attitudes towards animals in general. An overwhelming majority of respondents to the Scottish Government's consultation 94.7 per cent agreed, which is why the committee identified the importance of engaging with children and young people on this issue, which the convener Graham Day has already alluded to. As a result, 1,045 children and young people were asked through the Scottish Parliament Education Service, and I quote, should it be an offence to use wild animals in travelling circuses, to which 815 responded in favour of a ban. In addition, an online survey with Young Scott last September asked young people aged 11 to 25 the same question, with 80 per cent agreed or strongly agreed with the proposed ban, and 57 per cent agreed or strongly agreed that seeing wild animals in travelling circuses will make young people respect them less. Judging by the verdict of the next generation of decision makers, it is clear that we have taken the right steps in tackling this important ethical issue in the most timely way possible, and I am pleased that we are leading the way in the UK. I now call on Claudia Beamish to close with Labour. Ms Beamish, please, a generous four minutes. Thank you, Presiding Officer. Scottish Labour welcomes the passing of this bill, which hopefully will be imminent tonight. As the cabinet secretary stated today, wild animals in circuses should not be a spectacle. Today, with travelling circuses, this must surely lead to a similar position in our view on static circuses. There was also much discussion in the committee about the protection of wild and indeed domestic animals performing in other venues, whether travelling or not, and this must indeed be addressed in future. Mark Ruskell and others have stressed this point. My colleague David Stewart has highlighted the welfare issues, as have others. Scottish Labour has a robust approach to animal welfare and ethics under his leadership in our brief. That is one of a range of issues that we must tackle. Ensuring that legislation on hunting with dogs is fit for purpose, the banning of shock collars, tail docking, fighting to reverse the exemptions in our view, consulting to ban on the culling of mountain hares and tackling exotic animal trade, to name but a few. Emma Harper today has a member's debate, adopt don't shop, which is timely before Christmas. That and many other actions across the chamber show that there is cross-party support for many of the animal welfare and ethics issues that we will be addressing in the rest of this Parliament. Angus MacDonald and Graham Day spoke today of the next generation's interest and concern about those issues. Definitions in bills always rightly take up committee and Scottish Government time, and that is no exception. Sometimes we revert to common sense approaches and others, it seems correct to define or indeed to have lists in secondary legislation. With this bill, it has been challenging that committee grappled with definitions throughout the bill process, as did the Scottish Government. Circuses with or without tents, definitions of wild and domestic animals or lists, it is reassuring that the bill was amended at stage 2 to grant power on the Scottish ministers to make regulations to describe a particular type of undertaking act, entertainment or similar thing that is or is not to be regarded as a travelling circus for the purposes of the bill. In terms of the definition of a wild animal, I am convinced that the power agreed at stage 2 provides certainty in difficult or borderline cases to ensure that circus operators know what kind of animals may or may not be used in travelling circuses in order to avoid committing an offence. It is also reassuring that these regulations will be subject to the affirmative procedure. Those among us, certainly not myself, but the cabinet secretary and Donald Cameron, who are lawyers, made the point that it is not just arcane these definitions, they have to be as exact as possible. The cabinet secretary's remarks today in relation to the Delegated Powers Committee's deliberations are, in our view, reassuring. The committee heard evidence from local authorities about enforcement procedures, as Colin Smyth highlighted, and Angus MacDonald gave us some reassurance on that. It will be essential that there is absolute clarity in regulation and guidance to ensure that action can be taken. I make the point strongly that cuts to budgets could indeed cause challenges for local authority officers. However, one kind states in its stage 3 debate briefing, for which we thank them. The Scottish Government has issued clarification on a number of points raised in the stage 1 report, has created regulation-making powers to clarify definitions, and has produced draft guidance that clarifies some of the most significant policy areas. One kind is grateful to the Scottish Government and to members of the Eclair Committee for probing those issues. I think and hope that we have got it right. In the words of my colleague Colin Smyth, it is fundamentally cruel. Therefore, we support a band strongly and we look forward to the passing of the bill and also to future ethical and animal welfare issues that we will debate and act on in this Parliament. I call on John Scott to pose to the Conservatives a generous form in its minutes. I, too, begin by declaring an interest as a non-remember of the British Veterinary Association and that I believe that they and I welcome the passage of the bill. That is because the BVA and the Scottish Conservatives believe that the needs, particularly the needs of non-domesticated wild animals, cannot be met in the environment of a travelling circus, where their ability to express normal behaviour is likely to be completely restricted. We welcome the passage of the bill at stage 3 today, which builds on the five welfare needs of animals as detailed in the Animal Health and Welfare Scotland Act 2006, and which allows Scotland to be first in developing the legislation in the United Kingdom. Today, we welcome the cabinet secretary's assurances to develop guidance where required in the bill, and our committee is grateful to the Delegated Powers and Law Reform Committee for picking up the Government's oversights in this regard when bringing forward their stage 2 amendment on definitions of wild animals. We also acknowledge the hard work of our clerks on the Environment, Climate Change and Land Reform Committee, as well as the Parliament bill team, who have supported us in helping to bring forward amendments, as well as the bill itself. We thank the many witnesses who gave evidence to us in committee, as well as those who responded to our call for evidence at stage 1, and trust that the bill stops wild animals in travelling circuses ever performing in Scotland again. Presiding Officer, I joined the committee this autumn when discussions were still on-going as to the definitions of travelling circuses, wild animals, lists of animals, and David Stewart and Mark Ruskell and Donald Cameron and Graven Day. We could perhaps call ourselves survivors of that debate, but we have all referred to that today. Like them, I still had residual concerns over those definitions, and the amendments that were brought forward by the Government at stage 2 were a welcome response to the probing amendments lodged by David Stewart, Mark Ruskell and myself at that time. However, I now also acknowledge, as I said a moment ago, that the Government has endeavoured to respond to the DPLR's subsequent concerns and the concerns of others that the effect of the powers in new sections 3A1A and section 3A2A and section 3B1A and section 3B2A are unusual in principle, because they are indicative only and that those regulations are not of themselves apparently sufficient or the appropriate forms of instruments to deliver the interpretations that the amendments seek to provide. That is why I welcome the cabinet secretary's detailed assurances today that guidance that would be a more appropriate form of instrument will be brought forward to address the concerns of the DPLR committee and to further make clear the intentions of the bill. In addition, that guidance should be put in place forthwith and certainly be available at the time that the bill becomes law after receiving royal assent, and I welcome the cabinet secretary's assurances today that that guidance will be brought forward to me. Our work is done with regard to the World Animals and Travelling Circuses Bill. Again, our grateful thanks to those who have contributed in any way to the passage of this bill. I now look forward to the cabinet secretary's closing remarks, and we will be voting for this bill at decision time tonight. Thank you. Thank you, Mr Scott. I call Roseanna Cunningham to close for the cabinet secretary. You can have seven minutes if you want. You obviously do not. Six minutes. I will speak very slowly, Presiding Officer. Can I thank all the members who are here today and have taken part in this debate for a lively, informed and very interesting debate? It is of intrinsic interest to even those who may simply have wandered into the chamber or are on chamber duty, as it is known, to listen to some of the concerns and some of the issues that they may not have thought were anything to do with this particular bill, because this is exactly—I think that a number of members have commented on this—the kind of thing that happens when a committee begins to unpack what looks like on the surface a relatively straightforward thing. The minute you begin to look at it with some care and detail, you understand that it is not as straightforward or as simple as perhaps it looked at at first thought. The debate today has been constructive, but the engagement all the way through this process has also been constructive. I think that it is sometimes a rare joy in a parliamentary setup to be able to say that, that the process throughout has been constructive. I think that it reflects the concern that people have. It demonstrates the extent to which we all agree the importance and value of the very good intentions behind this bill. I have been struck, as I was at stage one, by members' passion for the issue, yet I am also grateful that they have looked beyond a purely emotional response—because that would have been the easy response—to fully unpack the practicalities around that proposed prohibition. I deal with some of those practicalities in my opening speech. Those issues reflect that this is not a fixed situation. I referenced Llamas and Dalpacas in my opening speech, but they are not meant to be a joking reference, because they are a precise example of where an animal that would have seemed exotic and wild to our parents' generation looks like domesticated animals to us now, so they have undergone a change in the way that they are viewed, treated and how they live in our country. I thank the Parliament and all the members of the Environment, Climate Change and Land Reform Committee and, indeed, the Delegated Powers and Law Reform Committee members for their constructive comments and their invaluable support during the bill's passage. Furthermore, I thank all the organisations, stakeholders in the animal welfare sector and in the circus industry, local authorities and representatives from our screen industry. They have all made constructive contributions, and I look forward to including them in continued dialogue as we, hopefully, move forward to implementing this landmark bill. I cannot of course mention everyone, but I should pay particular tribute to one kind for lodging the petition that brought the issue of wild animals and circuses sharply back into focus in 2011 and to COSLA for their continuing help to make the bill and accompany in guidance fit for purpose. John Scott Thank you, cabinet secretary, for taking the intervention. The screen of COSLA and Colin Smith raised the matter of local authorities. Are you optimistic that the amendments and the guidance that you will be issuing should be sufficient to allow the local authorities what we are less and less likely to have to go to court now as a result of the amendments that you have brought forward at stage 2, and the guidance that you will be issuing after this. The cabinet secretary On continuing engagement with stakeholders, including COSLA, I thank John Scott for his ever-glant intervention, which clearly helps to use up some excess time. I also want to pay particular tribute to the travelling circus industry. This has been a difficult issue for them. Those few in the UK who are still using wild animals are small family-run operations. The circus is not so much a business but a way of life for them. They have debated and co-operated throughout the development of this bill with courtesy and openness. I remind them that travelling circuses without wild animals will always be welcome in Scotland. Our own circus sector is an example of how circuses as an art form can develop and remain popular without wild animals. I want to take just a minute or two to go through some of the contributions that we heard this afternoon. A couple of members, Donald Cameron and Finlay Carson, tried some humour. Donald Cameron carried that off a little better than Finlay Carson, whose colleagues looked perplexed and then somewhat bemused at his attempts to interject some humour into the proceedings, but they did try. That has been a mark of the way that the engagement in this bill has proceeded throughout the bill. Donald Cameron quite rightly flagged up the role of the committee here as well, but if you think that those jokes here were funny, then you really do need to go and look at the proceedings of the committee on this and then read the Holyrood article that was mentioned by Graham Day. David Stewart attempted a lesson in Roman history, which was interesting, but he also highlighted abuses and reminded us of the reason why we are here. Graham Day referred to the views of young people very helpfully. It is easy to forget about the extensive survey work that was taken there and how important in the early stages that was to the bill that understanding. Mark Ruskell said that there is no list. The committee surely and the member must be aware of how difficult compiling a list would be having attempted the exercise themselves. Not only is there not a list, but I noticed that Peter Jolley's circus included a list of wild animals that it was using, one of which was something called a zebu. I have no idea what a zebu is. I guess that it is a hybrid between a zebra and something else, but it is precisely that example that probably would have been left off any attempted list on wild animals that shows why there is not a list. I am now at the limit of the time that I have. Could I ask that members support the motion and approve the wild animals in Travelling Circuses Scotland Bill? That concludes our stage 2 debate on the wild animals in Travelling Circuses Scotland Bill. The next item of business is consideration of three business motions. Motion 9686, setting out a business programme, and motions 9684 and 9685 on timetables for two bills. If anyone wishes to speak against any of those motions, please say so now. I call on Jovis Patrick on behalf of the Bureau to move the motions. No one has asked to speak against the motions. The question is that motions 9686, 9684 and 9685 be approved. Are we all agreed? We are agreed. The next item of business is consideration of two parliamentary bureau motions. I would ask Jovis Patrick on behalf of the Bureau to move motion 9682 in approval of NSSI and motion 9683 on designation of a lead committee. The next item of business is consideration of parliamentary bureau motion 9681 on approval of the criminal legal assistance miscellaneous amendments Scotland regulations 2017. Can I ask Jovis Patrick on behalf of the Bureau to move the motion? I would ask any member who wishes to speak against this motion to press their request to speak button now. I call on Liam Kerr. I rise to speak against the criminal legal assistance miscellaneous amendments Scotland regulations 2017. Parliament is being asked to vote on this with undue and unnecessary haste, given that there is time before part 1 of the Criminal Justice Scotland Act 2016, which contains provisions relating to the police station duty scheme, comes into force on 25 January 2018. In seeking to consider this SSI, the Justice Committee received a number of written submissions from the legal profession. It contained grave concerns around the proposed changes that were made by the SSI. It was suggested at the time that a reasonable course of action would be to allow those organisations to put their points to the committee in a formal evidence session, but the minister refused to withdraw the SSI to allow that to happen. The concerns include, but are not limited to, the Dumfermlyn District Society of Solicitors. Who stated that there will be an increased demand in terms of police station attendance under a fee structure that is not fit for purpose? There will be significant issues in terms of sex and equality discrimination against solicitors, leading to greater recruitment of those who do not have children, are unlikely to have, and do not have caring responsibilities, and that a change of employment contracts will be required. They concluded, and I quote, if the regulations are laid in the present form, then no firm will participate in the police duty scheme. The Edinburgh Bar Association stated that this will increase the number of people eligible for legal advice by 163,360 and, due to the downsizing of many legal firms, quote, it is unknown whether they will actually have the capacity to provide the level of service required. The association expressed concerns about the potential impact that the operation of this regulation will have on their workload at a time when rates of pay are at an historic low, and they conclude, quote, the Edinburgh Bar Association is wholly unable to recommend to its members that they participate in the provision of police station advice. Finally, the society of solicitors in the Supreme Courts expressed concerns that the unsociable hours may offend the article 8, Right to Private and Family Life, particularly where solicitors have child care responsibilities or responsibilities to family members that are elderly or disabled. And now, it has recently been reported that solicitors have confirmed they are withdrawing from the police station duty scheme. Colleagues, there is parliamentary time to take further evidence on this SSI at the beginning of January. There is no need to rush into something about which such significant doubts have been expressed. I therefore call on the minister, even at this late stage, to withdraw the SSI to ensure that these concerns are given a fair hearing, failing which I ask Parliament to think very carefully before voting tonight, and if it agrees that the sensible course of action is a short delay to January when there is parliamentary time to resolve this, Parliament should vote against approving the criminal legal assistance, miscellaneous amendments Scotland regulations 2017 at decision time tonight. Thank you very much. I would call on Annabelle Ewing to respond for the Government. I withdraw members' attention to my entry in the register of interest, where they will find that I am a member of the Lost Society of Scotland, holding a current practising certificate, albeit that I am not currently practising. Those regulations on criminal legal aid are the last in a series of regulations implementing part 1 of the Criminal Justice Scotland Act 2016. They provide a significant improvement on the current fee levels, including an increase to the block fee, an enhanced antisocial hours premium, an extension of the antisocial hours premium to travel time, a flat fee for providing telephone advice no matter how short and, importantly, an easy process for claiming fees. The current arrangements for providing advice to those held in police custody are delivered by a combination of solicitors employed by the Scottish legal aid board and private practitioners. It is entirely voluntary for private practitioners who can therefore choose to participate or not. Even when a firm is on duty, which can average around one week every six to 18 months, they are not obliged to attend. Therefore, the system is flexible to the needs and availability of solicitors at any given time, and employed solicitors provide cover for the smooth running of the scheme. The flexibility will extend to the new arrangements. The rights to legal advice in a police station are twofold, the right to a consultation, which can be via telephone, and the right for a solicitor to be present at interview. Therefore, not all legal advice is provided in person in a police station. Also, it is to be noted that, as far as travel time is concerned, which is of course of particular relevance to those operating in rural areas, the antisocial hours premium can be added and additional payment is possible for travel time for journeys over two hours. The Scottish Government and legal aid board officials have sought to provide reassurance on the requirements of the new duty scheme and the improved fee package and flexibilities. There were, Presiding Officer, very few responses to the consultation on the regulations. Notwithstanding, some solicitors have elected to withdraw from the duty scheme as they feel they cannot meet the potential additional demands that come with the increased rights of citizens held in police custody. That is the right of those solicitors. However, it is important to stress that the rights of those held in police stations will be upheld both in the short term and when the new scheme is implemented through the continued combination of private and employed solicitors. Indeed, the provision of police station advice is under constant scrutiny and review by the Scottish legal aid board, which works closely with Police Scotland to ensure that sufficient cover is available across Scotland. That scrutiny will continue up to and beyond the implementations of the new arrangements from 25 January 2018. Those regulations provide an improved financial package for those solicitors who provide police station advice. They make provision for legal aid in consequence of legislative changes already approved by the Scottish Parliament. If those regulations are not agreed, we will have to rely on the current legal aid framework, which is less attractive to solicitors both in terms of level of fees and in terms of submitting a claim. I urge members to support those regulations. It is important to declare that I am a solicitor and hold a practice certificate at the Law Society of Scotland and the Law Society of England and Wales, and I apologise to Parliament for not having done so at the start. The question on the SSI will be put at decision time. To which we now come, and there are four questions this evening. The first question is that motion 9.648, in the name of Roseanna Cunningham, on the wild animals in travelling circuses Scotland Bill at stage 3, be agreed. Because this is at stage 3, we will have a division, so members may cast their votes now. The result of the vote on motion 9.648, in the name of Roseanna Cunningham, is yes, 112, no, zero, abstain, zero. The motion is therefore agreed, and the wild animals in travelling circuses Scotland Bill is passed. The next question is that motion 9.682, in the name of Joe Fitzpatrick, on approval of an SSI be agreed. Are we all agreed? The next question is that motion 9.683, in the name of Joe Fitzpatrick, on designation of a lead committee, be agreed. Are we all agreed? We are agreed. The final question is that motion 9.681, in the name of Joe Fitzpatrick, on approval of the criminal legal assistance miscellaneous regulations 2017, be agreed. Are we all agreed? We are not agreed. We move to a vote, and members may cast their votes now. The result of the vote on motion 9.681, in the name of Joe Fitzpatrick, is yes, 86, no, 25, there are no abstentions, the motion is therefore agreed. That concludes decision time. We will now move on to members' business, in the name of Emma Harper. We will just take a few moments for members to change seats.


I think we can get started so because it's wonderful thing. So the next talk is by, is it a meme? I hope I'm pronouncing your name correctly. I'm actually using the middle name, UR, but it's fine. Okay. So we'll have UR talk about hybrid cloud storage. Okay. Thank you very much. Hi everyone. My name is UR. I am a Ph.D. student at Boston University and also doing an internship at Red Hat SEP team at the CTO's office. So today I will talk about the hybrid cloud storage caching projects. So we designed an implemented cache architecture to improve the performance of big data analytical workloads. So in our own data center, we don't have a full bisection bandwidth, which is the case for many other data centers out there today. And we have a tremendous amount of data reuse. So we built a cache called D3N for a single data center. And the main idea behind the cache that we built is that it caches the data at the access side of network bottlenecks. It is a multi-layer cache, as you see in the figure, where we store the data on local racks and we forward to request to the upper layers using concepts and hashing.  It's actually as an extension to the existing data lake and it's designed in a way that it shared among multiple cluster. So we put everything in the RGW code and the code is upstream now by the Red Hat engineers. So we run a bunch of experiments and we have a paper about this work. But overall, the implementation imposes minimum overhead and it's significantly improved the performance of big data on analytical workloads. We run experiments on one of the Facebook's MapReduce cluster traces and we see a reduction on the back-end traffic and improvements on the performance. So everything so far, what we've done is for a single data center. But now we want to take this work and extend it for a hybrid cloud use case. So the value offered by public cloud services are clear for many workloads. However, today many organizations want to keep their data sets in their private data center for different reasons, could be calls or security. For instance, Two Sigma financial hedge fund and one of our collaborators, they use spot instances to run their computation and they create compute cluster in multiple regions. And however, due to the security issues, they want to keep their data sets in their private data center. And because of the current asymmetric network prices, companies like Two Sigma has a strong incentive for on-premise storage and cache data locally in different cloud regions. So here is our new proposed architecture for a hybrid cloud scenario and I'm going to go over all of the components. So what we did is instead of like in our previous design it was only for read-only and intermediate data sets. However, now if we want to cache the data on the other side of the wide area networks, write cache is important. So therefore, we also deploy a write cache. However, rather than implementing a replicated durable write cache, we use the existing self-code and stand up a local OSD cluster as a cache layer in each public cloud region. And also, as you see, we have read caches collocated with that. So read cache in our design stores data in like block granularity. However, in the write cache, we store data in object granularity and any data coming from the client is first written into the write cache and once the data is age, after some time, Rado's gateway flushed the data to the back end. So we have also like inclusive cache model here where the same objects can be present in both read and write cache. And in the write cache, we also use erasure coding. We are still exploring its performance and the right redundancy in the write cache. The second thing we've done is in our previous design, we were using consistent hashing to locate the objects in the caches because it was simple. It doesn't require any protocol changes and it was like easily upstream. However, now we have a write cache, we need a directory to know where the data is stored and to prevent any data loss, a directory must be durable and reliable. So in the implementation, we are using Redis as a directory and a Rado's gateways contact like talk to the Redis and get the location of each objects and forward their request to retrieve that objects. So the directory stores information for each blocks, objects, and this is just an example. It acts as a database. And also other information in the system like cache service itself, what is their capacity, what is the hit count, what is the bandwidth. And the other thing is like RGWs doesn't aware of how the data is indexed in directory. So directory really act like a database and it just serves the queries. And in the feature, not just like our cache services, but we also want other components in like analytic clusters to talk to the directory. For example, cluster schedulers like yarn or to allocate the jobs based on where the data is like cached or your Kubernetes or your DNS server when they forward to the request based on, I don't know, like cache servers load, for example, or certain bandwidth information. So that directory like really in the feature will provide us a lot of information, which not just the cache, but other components of this entire ecosystem can benefit. And finally, when you're in a single data center, you usually have a fixed, not usually, but all the time you have a fixed network topology. And in our previous design, we were using any cache based lookup service to locate the cache services. However, when we are in the public clouds, we cannot take advantage of the topology in the same way because there is no topology. So therefore, we will use the Kubernetes DNS servers to forward the client's request to the nearest cache in the region. And finally, most of the object stores today use S3 protocol. And we wanna generalize our cache implementation. We just wanna support multiple data lakes, not just SEP. Therefore, we are using S3 for this purpose. And this way, we can deploy these cache caches not only in front of the SEP, but any other data lake like S3 or Minio or nothing comes to my mind right now about whatever support S3. And so what we have in here is there has been over half a century of research into the caching techniques in multiple processors, file system, web caches, right? Now, however, we have this like huge opportunity with the global or with the shared this directory, right? We are right now currently looking at how can we use this directory to do better cache management, right? Because as I mentioned in earlier slide, as in the directory, we store a huge amount of information about the data. We store who is accessing data? What is the access size? How frequently they are accessing? What applications they are accessing? And basically we have like the information about like the entire system, what's going on in our system. The second thing is when we are dealing with object stores, it's different than, for example, like CPUs, right? In here we are dealing with like large granularity object accesses. For instance, in SEP, I can say it's like formic. Each object is formic. Every time you're reading or writing formic chunks, right? And these are also immutable. So these unique features provide us the opportunity to explore different caching techniques, different than prior works like on CPUs or other web caches, right? So we can now run simple realistic or even like machine learning techniques to find common access patterns. For example, we know that like there are objects which are written many times, never read or hot objects or cold objects and can we detect these patterns? And so our key idea right now that we are working on this cache management scheme is that we wanna make sure objects spend enough time in the cache and then we learn about each objects and each accesses. And then we can find the right candidates for eviction. We also wanna use this information store in directory and use these like historical based approach to predict feature accesses. So where are we going now? So this design and implementation allow us to do all interesting research. As I mentioned, directory provide us now a global cache view and we wanna build a platform for other researchers to use the directory and explore different cache management algorithms, different policies. We wanna build a cache not for a single data lake but for multiple data lakes, geo-distributed data lakes. For instance, the open storage network deploy one petabyte data lakes all around the country and one of the problem they are facing today is there each user has to define which where to store their data, which data lake they have to store data. So can we use the caching and do this more automatically and can we place the data on behalf of the user without user telling us? Like can we place, I don't know, user A's data in data lake A, user B data in data lake and for instance, right? Also we wanna explore like how erasure coding works in the cache layer and this hasn't done much in the literature as well and not redundantly store the data in cache. We are also interesting in looking where do we run the computation of the data? For example, one example is that if you have the data cache in region one, then can we spin up the cluster in region one or the other way around, right? You spin up your clusters, both instances in let's say region N then can we prefetch the data before computation starts? So we are looking at these techniques as well and finally to realistically design all the things that we mentioned, we need real system traces, right? And because of these traces, these logs will help us to understand better each application, each user, each jobs and this way we can provide, we can develop better algorithms and improve the cache management efficiency. So if anyone who is listening to this talk has such a traces or would like to talk about more about that, I will be happy to chat. Also, as I mentioned, the first version of the cache, D2N is upstream and you can find the details from our link for the hybrid cloud cache implementation is also on GitHub. It's like you can download and play with it. We are still updating the GitHub repo whenever we have new functionalities. And also we are right now working on a simulation for this cache management algorithm. That code is not available right now but hopefully it will be available soon on our GitHub repo as well. And if you wanna learn more about our projects, please visit our web pages. So I believe that's all I'm happy to answer any questions you have. I am just going through the shots and I don't see any questions. So maybe we can give folks a few minutes. Okay, sure. And see if any questions come through we'll just move over to the break room. Break up. Oh, okay. Somebody shared the, yeah. Oh, so I have to verify. Should I stop sharing? Yeah, you can stop sharing now. Okay. Great. Yeah. All right, people. I guess we don't have questions. Okay, that's why. We're very clear or that's good. We appreciate your time so much. Thank you, no problem. So I have to move to the breakout room right now, right? Yes, yes. Okay, all right. Great, thanks for listening. Okay, thank you. Bye.


In this discussion, we will discuss the discussion question of, describe the characteristics of a corporation. If we see a discussion question or essay question such as this, we can define a corporation and when doing so, we want to keep in mind other types of entities. What's the difference between a corporation, other types of entities such as a sole proprietorship or partnership? That can give us an idea by comparison of what a corporation is in comparison to other types of entities. So clearly a corporation has similarities as well to other types of entities. It is a form of business, a form of business, a business type. Its objective will be to generate revenue just like any other type of business type. But of course we're going to focus in on those things that differ typically when discussing a corporation. And I think the main thing is differing from a corporation to other types of entities as it being a separate legal entity. Most of the other things that we think about of differences in a corporation, advantages and disadvantages to a corporation stem from the fact that it is a separate legal entity. That's kind of like the invention of a corporation that really opened the door for a lot of innovation within business. This idea of a separate legal entity. So what does that mean? It means that we're going to give actual rights and privileges to a corporation which typically we had not given to anybody but individuals before. So it's almost like the corporation has characteristics given to it by the law as a person in some ways and some of those include the characteristic to own property and the characteristic of being responsible in terms of liability for those property. Why is that such a big benefit? It's going to be a huge benefit because if the corporation is thought of as a separate person and it gets sued then the corporation then is going to be liable but not necessarily the owners in the form of shareholders. That's different from a sole proprietorship or a partnership, a general partnership where we always keep the books separate. Remember that we always keep the books separate but in terms of a separate entity they're not a separate entity for a sole proprietorship or a partnership, a general partnership and therefore if the partnership or sole proprietor is sued the lawsuit can go after not just the business assets but personal after a personal home or something like that. The corporation allows us not to have that the shareholders should have some shield, a corporate shield and liability protection through their personal assets. Huge benefit because it really allows more investment so the corporate type of entity because of that has a benefit of capital investment from people like even normal people like myself if I want to put money into a corporation I can put it into a mutual fund even and put money into a corporation without knowing too much about it because if the corporation loses money then it should only lose the money that I invested in it. It shouldn't be exposing anything else to me. I shouldn't have to lose any of my personal assets like a home or something like that through the investment in the corporation. Therefore the corporation through the issuance of stock can typically generate more capital. That's going to be one huge benefit of the corporate form of entity. One of the disadvantages of the corporate form of entity is that because it is a separate legal entity it also has to pay taxes on the corporate level unlike a sole proprietorship or partnership. And the reason that's typically thought of as a disadvantage is because the thing that a corporation cannot do unlike an individual or a sole proprietor or a partnership is really just give the money that they've earned obviously the business is going to earn money and then give it to the owner in some way. Unlike an individual the corporation has individual rights it can't just give money to the owners so it can earn money it has expenses but it can't just give money to the owners because there could typically be a tax effect on that. So in other words when a partnership gives money to the owner it's called a draw and it's tax-free when a corporation gives money to the owner it's called a dividend which is typically taxed. And that means that the tax happened on the corporate level when it earned the revenue and then when that revenue is then taken out of the corporation and given to the owners it's typically taxed again on the individual level in terms of dividends. So that's going to be one of the major drawbacks of a corporate type of entity and again it kind of stems from this idea that it is a separate legal entity and therefore pays tax on the corporate level. The owners of the corporation are going to be stockholders so the stockholders are going to be the owners of the corporation. There's really pros and cons to that form of ownership as well. The great thing about the stocks is that they're all standardized so unlike a partnership where we have to keep track of each individual capital account for each individual partner the corporation we're just going to say hey all the stocks are the same they're all common stocks they're like tokens they're like money they're almost like currency they're all the same. How do we differentiate one partner or one owner not a partner one stockholder from another one owns more of these tokens they own more of the stock. So that really standardizes things and from a tracking standpoint for the financial statements we just have to basically know the number of stocks that are out there and the price of those stocks for reporting the financial statements we don't have to list in other words any individual owner. The other great benefit to that is that the owners of the stock then can easily trade the stock because they're all standardized they're all the same unlike a partnership where if we wanted to sell the partner or buy into a partnership it's a much more difficult type of transaction because it's all a unique transaction that we'll have to figure out whereas the standardization of the corporate stock allows us to really be able to trade more easily and to be able oftentimes to judge what the market price is through the trading process. Another advantage of a corporation is going to be that it can live past just like the life of the owners unlike a partnership or a corporate or a sole proprietor which at the point in time when the ownership changes what happens is the sole proprietorship basically goes down or the partnership basically is closed and then reopened if the partnership wants to continue at that point. But the corporation because it's a separate legal entity is going to live beyond any one individual because it's the stockholders that own it and the stock can always be transferred to another owner the corporation is separate from the owners it's a separate legal entity so if you trade stocks or if a stockholder dies or something like that the corporation does not it continues on and then theoretically of course a corporation which isn't physical doesn't die could have continued life forever theoretically into the future One more advantage is going to be that there's not that kind of agency problem that we see in a partnership type of organization in other words the partners if we have two partners that are directly involved in the partnership any of the partners that are involved can then have agreements with themselves and they can bind the partnership into those types of agreements which binds the other partners so the partners themselves are acting as agents of the partnership which binds the other partners in any agreement the corporation doesn't have quite that same problem it's got different kind of problems meaning because the stockholders are a step removed the stockholders really vote for the board of directors the board of directors then are the ones that are going to hire management so the board of directors then is hired management and therefore the management should be there in order to act on behalf of the stockholders but you don't have the same kind of agency problem with the owners making direct decisions in that case if in this case where if you have a large corporation where the stockholders are voting for the board of directors who are then hiring management now you do still have some kind of agency problems whereas management although they should be acting on behalf of the stockholders have different incentives to themselves personal incentives and there still could be agency problems as the management makes decisions that they have incentive to benefit themselves possibly not benefiting the stockholders ultimately and the choice can still get distorted so that's one of the cons of a corporation one of their cons of the corporation is also that it's more expensive there's more regulations to a corporation because it's a separate legal entity you have to set up the corporation and you have to do more recording and tracking on the corporation including things like filing taxes on a yearly basis and recording the taxes for the corporate legal entity