From New York City, where the American stage begins, here is another program with a cast of outstanding players. Public service time has been made available by this station to bring you this story as proudly we hail the United States Air Force. Our story today is entitled Storm Approach. This is the story of the men in the Air Force, who man ground control approach installations around the world. Through all kinds of weather, they stand ready to guide pilots and their aircraft to safe and accurate landings, using that modern device that knows no bounds, radar. Our first act curtain will rise in just a moment, but first, there's no thrill in the world like flying a jet, cleaving through the sky at the speed of sound, pushing against the outer limits of space, blazing the way to a new air future. Yes, it's an exciting life, one that offers unlimited opportunities to young men of ambition and vision. If you're between 19 and 26 and a half, single and a high school graduate, a wonderful future in jet aviation is open to you. Become an Air Force Aviation Cadet. You'll be flying jets easily and safely within 18 months. In Cadet training is rough, rugged, rigorous, but the rewards are well worth it. You graduate as an Air Force Lieutenant, earning more than $5,000 a year, with a promising career ahead of you. You'll be a man fully equipped for positions of responsibility in the fields of military and commercial aviation. Guarantee your future as an aviation cadet. See your nearest United States Air Force Recruiting Station, or pay a visit to your nearest United States Air Force Base for complete details. And now your United States Air Force presents the proudly-vehiled production, Storm Approach. During the night, the men on duty at the weather station of Hill Air Force Base near Ogden, Utah, observed the familiar signs and read their meaning. A low pressure area to the northeast was building rapidly and swirling angrily down the Wasatch Mountains. They predicted it would hit the Ogden area with heavy snow, driving winds and freezing temperatures. In the parlance of the old timers, the storm was a ring-tailed blue northern, which had no business yawning around so far from the panhandle. But in anybody's language, it meant a blizzard was moving in. At 0800 hours, when Sergeants Jim Carrey and Martin Pierce went off duty at the GCA installation, the first fine flakes had already begun to sift down. Oh boy, this is gonna be a doozy. Yeah, let's hit the road. Coffee, man. Coffee. Nancy'll fix your cup when we get to my place. What's the big rush? You afraid of a little snow or your home sick? Both. Come on, Martin. I'm in a hurry. Look, this snow isn't gonna get that bad for a while, Jim. Yeah, not the snow. I'm worried about Nancy. Why? What's the matter with her? I don't know. She wasn't feeling so hot when I left last night. You talk like a newlywed. I am. Seven years. Get in. You know, I don't know why I let you order me around. I got just as much rank as you. Because I'm older and wiser, and you don't want to walk ten miles home. Well, I suppose you got something there. As far as the walking goes. Let's hope these windshield wipers don't stick. What's the matter with Nancy? She got a bug or something?  I wasn't worried until she finally admitted she took a spill on the ice yesterday afternoon. Hey, that's not so good. Oh, that's why I want to get home. If she's not feeling any better, I'll bring her back here to the base hospital. Why don't you call her up? I don't want to waste time more than I want to get home. The storm's beginning to get rough.  No, no, I like your wife's coffee. If she's not feeling well, maybe I can give you a hand. Appreciate it. I'll send you a bill. Yeah. Come on, follow me. Watch the ice. Hey, you're talking to a polar bear, son. Nancy? Hey, honey, I'm home. Maybe she's still asleep. Yeah, maybe. Hey, kiddo, you... Nancy! Nancy, for the love of... Wait a minute, Jim, don't move her yet. She didn't... No, no, I don't think anything's broken. Let's get her up on the couch. Get her legs. Yeah, yeah. Nancy? Nancy? She's out, Jim. Get some blankets. Smell the salt if you got any. Right. I'll call the base, tell them to send an ambulance. There's a waste of time. Call the base hospital and tell them we're on our way with it. Here, let's try this. Hold her head up a little here. Now she's coming around. Oh, Jim. I thought you'd never come. We better get moving. All right, call the hospital. I'll get her wrapped up in this blanket. Yeah. Hello! Hello! Hello! Oh, no dice. Line must have gone out. That went out fast. Let's get some more blankets around her and hit the road. Better slow down a bit, Jim. Don't always skid. They'll dig us out three days from now. I can see. Yeah, well, I can too. About two and a half feet. How is she? She's gonna be all right. Slower? Oh, that's what I meant about slowing down. Can't see a blasted thing. As long as the road stays straight, we'll be okay. Yeah, but it doesn't. I can't stop now. If I stop, we'll never get started again. They're starting to drift pretty bad. I know. I think they'd have a snow plow off. Just pray we don't run into a stuck car or a truck. Just pray. Well, one thing... Look how, Jim! What was that? Oh, I'm getting too old for this sort of thing. Was that snow plow you were hoping for? It's done some good. The road's a little better here. Don't start hitting the accelerator again. How is she? She's not gonna get any better if you don't watch it.  The road turns off here somewhere. Slow up. I don't dare stop. There's the fork! Left, left, man, left. I gotta apply for an instrument rating. An old age pension will do for me. There's the main gate at the base ahead. Sergeant, call the hospital. Tell him we got an emergency. Hey, what's the scoop, man? My wife, she's sick. Let's not waste time talking. Come through and watch the road. Get the mighty means. You're telling us! Want a cigarette? No, no, thanks. It's gonna be all right. So I keep telling myself. Only I don't believe me. I wouldn't kid you. Yeah, yeah, I know. Look, look, one thing, you... How is she, Doctor? You can go in now and see her for a minute if you want. Is she gonna be all right? When she fell on the ice, she injured herself internally. That would be too serious except for one thing. What's that? Well, she has a blood condition. Her blood won't clot. What do you mean? We are giving her plasma, Sergeant. I said what does it mean, Captain? Well, it means, Sergeant, that she's in bad shape. Isn't there anything you can do? Well, there's a serum called fibridgen. It's used to make blood clot. Have you used it? Well, I would, Sergeant. If we had any, it's very rare. It's hard to come by. Can't you get hold of some? I've already called the base commander, Colonel Cole, and told him the situation. He's contacting the Red Cross people. They're working on it at this very moment. I suppose there isn't much time. I'm afraid not a great deal, Sergeant. Is she conscious? Semi-conscious. We've given her a shot. I'll go in and see her. Colonel Cole is over at the Red Cross building. We'll go over there, if you like, after you've seen your wife. Captain, they've just got to locate some of that stuff. They will, Sergeant. I'm sure they will. Fine when I am. Well, the finest. Now, you just take it easy. What happened? I began to feel dizzy. You're going to be all right. You hurt yourself on your fight yesterday. Silly girl. How do you feel? Kind of dopey.  I'll be right here. Yes, I think I will go to sleep. I look so worried, honey. I'll be all right. Sure you will. Colonel Cole, this is Sergeant Kerry. Hello, Sergeant. Tough luck about your wife. Yes, sir. Colonel, our regional Red Cross headquarters and Salt Lake City reports that they had no private furniture on hand. We have calls out to every major city in the west. Thank you, Mrs. Roberts. Let us know as soon as you locate some. Tacoma, negative. Spokane, negative. San Francisco, negative. Los Angeles. We need four units, and we need them just as soon as possible. No, no, no, we've got to have them faster than that. You stand by for a call from us. We'll work out the details here. Right. Thanks. Mrs. Roberts, we thank you. From the bottom of my heart. You people have done an excellent job. Well, I'm just happy we were able to locate the serum so quickly. I'm afraid the biggest problem lies ahead. Yes. What are the reports on the storm, sir? How soon can we expect a break so that a plane can get in here? Hold that up for the next 24 hours at least. Oh, we can't wait that long. Sir, could a jet make it in here? I don't know, Captain. I honestly don't know. With GCA, a pilot. It's not the approach I'm worried about, Sergeant. It's as much as the storm itself. No commander would order a man to fly in here under present weather conditions. I think we'd better get on the phone to Air Force Headquarters, sir, in Washington there isn't much time. Can you tell me how much, Captain? No, sir, but I wouldn't want to say any more than two hours. You're taking 86 about half that to get here from Los Angeles. Now all we have to do is find ourselves a pilot. Operator, this is Colonel Cole. I want you to put a top priority call through. You are listening to the proudly-behaved production Storm Approach. We'll return in just a moment for the second act. Daring and imagination, courage and science, these have propelled us straight into the jet age, the age of airspeed faster than sound, of flight into the farthest frontiers of the sky. How would you, young man, listening today, like to master one of those jet planes, sleek, powerful aircraft which represent the last word in military aviation? They're considered safer to fly than propeller planes. If you qualify for, and successfully complete, the interesting, exacting training of an aviation cadet, you'll have your chance. As a pilot in the United States Air Force, practicing a challenging career in the service of your country, you'll start as a second lieutenant, earning more than $5,000 a year. Now, if you're between 19 and 26 and a half in excellent health, single, and meet the mental and educational requirements, you're eligible to apply for the 16-month flight training course. See if you can qualify at your nearest Air Force Base, or drop in at your local United States Air Force recruiting station. You are listening to Proudly We Hail, and now we present the second act of Storm Approach. Luck was with Sergeant Jim Carey and his wife that day because they found a pilot, one of the best. Major Robert B. Madden, Quality Control Pilot of the Air Material Command, who was assigned to the Inglewood, California plant of North American aviation. Major, there's one thing about this serum. Yes, I know, handle it with care. That, of course, but it's got to be kept at a temperature between 32 and 50 degrees, and above all, it mustn't freeze up. I see. Well, suppose I set my cockpit temperature at 40. That would be fine. Yes, and I'll freeze up. Well, let's get it aboard. I'll get out of here. They seem to want the stuff in a hurry. It's really a matter of life and death. This is Air Force Jet 764-3, in number one position, ready for takeoff. Roger, 764-3, rolling. We have an inbound report from Flight Service. According to them, his ETA is 1210. Well, it can't be much later than that. You're a quest that we have our final controller, man, on the scope. Sir, that's me. Well, now I don't... Sir, right now I'm the best final controller on this field or any field. You were on duty last night, weren't you, Sergeant? Captain, I don't care if I'd been on duty seven nights in a row. Right now I'm the best. I want to be on that scope. You will be, Sergeant. Let's get on over to the GCA shack. I'll be at the hospital, Colonel Cole, waiting. We better not try to walk it. We're going my jeep. Not sure we could walk it. I'm not sure anybody can fly in it. You might get the idea. It was snowing. All right, here we are. Piling, man. There's a little better in here. At least you can sit up and look around. Sir, I don't think anybody can fly in this stuff. You don't know Major Madden, Sergeant. Oh, but I know it's out there, sir. Now we better worry about what's right here. Come on, baby. Get the ice out of your throat. It's gonna be a long walk, sir. Come on, girl. Grab a hold. Fire. There you see? I knew she wouldn't let me down in the clutch. How about the windshield, sir? We'll go on instruments. That'll start melting once we get a little heat in here. That'll be about next summer, won't it, sir? April anyway. You all set to take off? Baby, you just home on the GCA shacky here. Yes, Lieutenant? No word, Captain. Not yet. Can a plane fly in this kind of weather? I'm no pilot. Any change? No, sir. Would you like some coffee? No, thank you. I'd just like that phone to ring. Any chance of the storm letting up? Evidently, not for some time. All we can do now is to wait and hope and pray. Poor husband, the Sergeant. I wonder if he's... He's over in the GCA shack. He's going to bring the pile of in. He's what? Captain Morari speaking. What? No, no. This isn't a basic exchange. Okay. Well, I'll let you know if there's any change, Captain. Who's with her now? Lieutenant Marks. All right. Both of you better stand by. As soon as I get word, I'll... Captain Morari speaking. Yes, Lieutenant? I'll be right there. That was Lieutenant Marks. Mrs. Carey is starting to slip fast. Come along. You should be contacting the tower any minute now. I don't envy him. I sure don't know how I'll ever thank him. It'll be up to you, Sergeant, as much as to him. Yes, I know. Picking up anything? Just a bad case of nerves. You sure you want to be on the scope, Sergeant? I wouldn't be any place else. No, I didn't figure you would be. I'll call. Oh, yes, yes. Right, go ahead. I see. No, no, that's all right. Any decided change, call me at once. Right. Thank you. Goodbye. That was the weather. The storm setters passed, but there'll be no appreciable change for the next four or five hours. Isn't that peachy? Well, at least now we're sure of the straight odds. About a million to one. I wouldn't say that, Sergeant, with you on the scope and Major Matton flying, that'll make it better than that. With all the moral support you've got, that cuts it down about 50-50. Which, if you're willing to take a chance, isn't bad at all. Ah, nothing to it. I guess I'll take the chance, but I sure wish we'd hear from the Major. Hill Tower, Air Force Jet 7643, over your range station at 3, 2, 40,000 feet. Looks kind of rough down there, boys. Roger Air Force Jet 7643, over a hill range at 3, 2, to send to 7,000 feet. I repeat, 7,000 feet. Contact GCA on Fox Channel. The words back and forth sound calm enough, almost routine, but there's nothing calm or routine about the drama building to its climax. If you've flown in the clear above the storm crest, you know the feeling of repugnance for what lies under you. You know the feeling of wanting to stay clear and escape.  You know there are winds there to rip and tear. There was snow and ice to weigh down and spoil the delicate precision of flight. You know death is waiting, crouched in the black sea below, hungrily, confidently. 2, 7, 0 degrees. Roll out. Now throttle back. Try to relax. Keep relaxed. And now into the vortex. Air Force Jet 7-6-4-3, this is Hill GCA. Now continue your let down. I've got you nicely on the scope. Roger Hill GCA. Air Force Jet 7-6-4-3, this is Hill GCA. If no transmissions are received for a period of one minute during this approach, make an emergency pull up, climb to and maintain an altitude of 6,500. Hold on the southeast course of Hill Radio Range between the station and a .4 minute southeast. Contact Hill GCA for further instructions. Over. Roger, understand emergency instructions. Initial cockpit check complete. Gear down and locked. Air Force Jet 7-6-4-3, level off at 6,000 feet. Turn to a heading of 2, 5, 0 degrees. 2, 5, 0 degrees. Do you read? Over. Receiving you loud and clear. Turbulence increasing. All right. Now turn to a heading of 1, 6, 0 degrees. Maintain 6,000 feet. You're on the downwind leg. Roger, turning to 1, 6, 0 degrees. Holding 6,000 feet. Can you hold 1, 6, 0 degrees? Doing all I can. You're doing fine. Maintain your altitude. Air Force Jet 7-6-4-3, this is your final controller. Turn left to heading of 3, 4, 0 degrees. You're 4 miles from touchdown cleared for standard rate of descent. Now you're drifting left. Turn 5 degrees east. The new heading is 3, 4, 5. You're now on final approach. You're below your glide path and drifting right. Correct 3 degrees left. Your heading is 3, 4, 2. You're 50 feet below the glide path. Pull up a little. You are now 2 miles from touchdown. You're on the glide path. The glide path is excellent. Hold it steady. You're 1 mile from touchdown. It's starting to drift off right. You're drifting right. Correct 3 degrees left. You'll have to pull up and go around again. Make an emergency pull up. Climb to and maintain. What happened, Sergeant? I had to send him around again, sir. Well, he simply got to get him down here in one piece. If anyone can, he will see. Captain Marari, Colonel Cole. Yes, sir. We haven't got Major Madden Downes yet. What's the situation there? Is there still a chance? If there's no chance, I'll order the Major to get out of here. On the glide path, 2 miles from touchdown. A holder, Major. Hold her right there. Check gear. 1 mile from touchdown. Now, correct 3 degrees left. That's good. That's fine. Fine. 20 feet below glide path. It's good. It's good. You're over the edge of the runway. Can you see it? I've got it, boy. Hold on. Get that Jeep out of that runway on the double. Major, you look frozen, Colonel. I am. It was a cross between freezing the death and being scared to death. Not to mention landing in the middle of a blue gnaw. Is that what you call it? I've got another name for it. Slightly rough, eh? That's the understatement of the year, Colonel. I don't ever want it any rougher than that. Well, there's one man around here who won't have the words to thank you with. The same goes for me. Where is that final controller? I don't think there's a better one in the Air Force. Well, I wouldn't be surprised, Bob. It was his wife you brought the serum for. Wow. I think maybe he and I will spend the rest of the day patting each other on the back. You're looking better already. I feel better. I went to sleep. It seemed like I'd never wake up. But I did. It was like you'd never gone away. Never have. Been with you the whole time. You must be tired. A cup of coffee, and I'll feel fine. You think I'll be in here long? Yeah. With these wonder drugs, I'll have you fixed up in no time. Nice to have them so handy. Yeah, the doctor says you'd better rest. I'll see you in the morning. All right, darling. And thank everyone for me. I love you. I love you. Major Madden, I don't know how a man thanks another man for saving his wife's life. Well, Sergeant, if I helped to save your wife's life, you sure helped to save mine. You didn't have to take the risk, sir. Oh, I suppose I didn't. But then we all do a lot of things in this old world we don't have to do. I guess it makes life interesting. How is she? She's going to be fine. Just fine. The word opportunity is described in the dictionary as a convenient chance, a favorable opening as in business. And that definition can certainly be applied to the United States Air Force Medical Service when it comes to the opportunity they offer all qualified registered nurses. Because of our increased military mobilization, more and more opportunities, favorable openings in the profession of nursing are now open in the Air Force Nurse Corps. For example, the Air Force Nurse Corps offers you a life which combines service with travel, work with recreation. You'll be a commissioned officer with officers' pay and allowances, free service insurance, paid vacation and retirement credits, too. In addition, you have the chance of taking postgraduate training in many nursing fields, thus qualify for further advancement. There are other benefits, too, such as worldwide travel and attractive uniform and the chance to serve with the finest men and women in the world. Most important of all, though, is the fact that you can contribute your nursing skills to keep the United States Air Force strong and healthy, ready to perform their mission when needed. Get all the details on how you can become an Air Force Nurse by writing to the Surgeon General, United States Air Force, Washington, 25 D.C. This has been another program on Proudly We Hail, presented transcribed in cooperation with this station. Proudly We Hail is produced by the Recruiting Publicity Center in New York for the United States Air Force. This is Mark Hamilton speaking, inviting you to tune in this same station next week for another interesting story on Proudly We Hail.


Yes.  So we're all here for using subtree splits to spread Drupal into everything, which this has actually expanded a little bit. But I'm going to be talking only about Drupal 8 and Drupal.org. I'm not going to be talking about Drupal 7. I know quite a bit about it, but that's a whole different presentation. So my name is David Barrett. I'm David W. Barrett on Drupal.org. So if you want to Drupal, greet me, feel free. I'm a software engineer for Gulf Channel, who sponsored my trip here. So I'll put their logo up here. This session came out of an issue I started for the Drupal.org infrastructure team, and whenever you're creating issues for them, be careful what you wish for because they might email you and ask you to speak in front of a bunch of people.  Because every other session you've probably gone to, they refer to Drupal. They're talking about the entire Git repository, or they're talking about the tar ballers that you can download. But I'm going to make a little bit of a clarification, just to make our lives easier, that when I talk about Drupal, I'm talking about everything except for what's in the core folder. When I talk about Drupal Core, I'm talking about everything in the core folder. So it's just going to make our lives easier. Otherwise, it's going to get way too confusing too quickly. So I'm also going to talk to you, like you don't know anything about Composer. So if you do a lot about it, like many people I see in here, that's fine. But if you've used or heard of any of these other dependency management systems, like Node Package Manager, or Bauer, or Bundler, this is a very similar conversation. But if you haven't heard of them, it's okay. Because we do dependency management in Drupal, and we've actually done it for a very, very long time, as long as I can remember at least. So I just took this example from the module info example, but the really neat widget, and it has two dependencies, views, and panels, and everyone has tried to install module, and it needs some dependency, and you have to go find it and download it. But that's really the magic of Drupal module development. So I don't have to rewrite the entity API every time I'm going to use it, I can just depend on it. And I think that's really, this is going to sound really nerdy, but I think that's one of the greatest features that Drupal has that other systems do not. Or they don't implement it nearly as well as we do. And it's been relatively unchanged for quite a long time, too. But a lot of people will talk about how composers just like Drushmake, and I've never used Drushmake, so I don't know. So for me, I think of modules. Okay, so we already talked about composer. Composer is a tool for dependency management in PHP, so it's way more generic than just Drupal modules or just WordPress plugins or whatever dependency management tool you want to use. It can be used for PHP libraries. It can actually, there's plugins to use it for other JavaScript libraries and things like that. But I would argue that composer, while it's written in PHP and it's really for PHP, it's probably one of the better dependency management systems of any of them that I've seen. And I can get to more of that why if you want to know later. So I'm going to kind of split this up because, and I came up with these terms, because it's going to make it easier to understand these different Drupal.org issues that we're asking of the infrastructure team and into consumers and providers and sometimes both. So I consider, if we go back to this Drupal module example, this module is consuming views and panels, but every module is also a provider because any module can depend on yours. So in this case, we have a module that is a provider and a consumer. Does this make sense to everyone? Okay, so we're good on the definitions. Okay, but in our world of composer, consumers are just projects that consume libraries via Composer. And so I'm going to show you what this looks like in a very easy, simple example. If you were to create, just put in a folder, a composer.json file and add, you just, it's pretty basic syntax you require and there's a namespace, which is Guzzle HTTP and Guzzle, which if you haven't used the Guzzle library before, it's Phenomenal Curl Rapper for handling HTTP requests with PHP, it's a lifesaver. So I highly recommend it. It's actually one of the Drupal dependencies. So you can go ahead and start using this now if you wanted to. And I do. But, and we want any version in the 5.0 series. So that can be 5, 1, 5, 2, any of those. Okay, so and here's a pro tip for you if you don't want to mess with editing JSON at all. You can generate or update an existing composer file by just running composer require, the same package again, and the same version constraint. And where it gets all of this data from is, or where I got this from is from a website called Packagist, it's package.org. It's very similar to how we have a repository of, you know, thousands of modules. They have thousands of PHP libraries available and they have the versions for them and it's very similar to the way we handle modules too. And so, back to our composer.json file, the way we would get guzzle is by just running composer install. And then we, the magic happens. And for me, these dependencies were loaded from cache but if you look, like, a lot more than just guzzle was installed. And this is the nice magical thing about composer is that it's recursive and it downloads all your dependencies for you. So you don't have to go looking for this module's dependency and then another module's dependency on and on down the rabbit hole. It does all of that for you. And so, for instance, guzzle required a library called ring PHP and ring PHP require a library called promise and on and on. And it goes backwards up the tree. And for me, I had already done this when I ran this so it was loaded from cache. I didn't even have to go out to the web to find it anymore. But I believe every time it checks any packages just to make sure that nothing's been changed. Okay, so after I run that, I now have other stuff. I have a composer.lock file and I'll talk about that in a vendor directory. And vendor directory is actually where all of guzzle is and all of those other dependencies. But let's first talk about the lock file. So the lock file is a JSON file that is auto-generated by composer and you don't ever need to touch it for the most part. Unless you have git conflicts, that would be the only reason. But if you notice something, it has a specific version. So just like in my output on the console, it says 5.2.0 and I have a specific git commit hash that was given to me. And what will happen is if someone downloads my repository and they run composer install, it will, the most part will ignore that composer JSON file that we created and it will only look at this lock file. And the advantage in that is that all of the people you share your repository with will have the exact same version of the dependencies. Yay, we don't have to deal with mismatch dependencies. So that leads to the question of why have the vendor directory at all? You could just remove that from your repository. Everyone will run composer install and get the exact same version of the dependencies. You could do this on a remote server. I've done that before too. And it works pretty much beautifully. I've had really any issues. You could have your test bot run composer install and I'll get more into that. But this is actually recommended by the guys that made composer that you would just remove it from your repository. And this is how you would use that library now. And you would just require, I forgot to mention this, but composer also because it's so lovely with PHP also includes a PSR0 and PSR4 autoloader. So you just require the autoloader and then you can just start using the library immediately. And obviously all of the dependencies will be loaded as well. And if you look at the eight repo there's a file called autoload.php and you'll see where we're requiring the composer autoloader. And that's how we're loading all of the outside dependencies. So when we talk about getting off the island, well in my humble opinion, composer pretty much single-handedly did this for us. And I could not fit all of our dependencies on a single slide. So I just picked some to throw up there. But there are a lot. So if you open core composer.json, you'll see all of them. There's symphony components, there's PHP unit, there's a bunch of stuff. And that's how we're managing all of that. So I'm gonna start going through these proposals that are on, some are on Drupal.org and they have issues. Some are, I can just see them coming. So they're in David Barrett's head and probably other people's heads. So I'll kind of explain those and what we're going for. So this is the first one, which is remove the external dependencies from the core repo and let composer manage the dependencies instead. A lot of people, including myself, want this one to pretty much go first because this makes our life on all the other issues so much easier. And the last time I counted, there's 15 megabytes or so of dependencies in the vendor directory. So if you wanna do things like move the vendor directory or update dependencies, they are huge patches. And it's really hard to wade through that and make sure nothing else has changed. And if we remove the vendor directory completely, the patches are much smaller. There's just changes to composer.json and composer.lock. Obviously that will require some work from the info team because there's two systems that we'd need to be updated. The packaging script that takes Drupal in terms of into that zip and that tarbol, it would need to be updated to CD into core and rank composer install. And also what the test bot would have to do this every time before. This sounds crazy, but it's actually exactly what Symphony and Larvel and Guzzle and everyone else that provides tarbols and zip files does. We're actually pretty unique in having our vendor directory in the repository. I can't think of another major project that does. We've made aware of this one, which is to move PHPUnitMink to RequireDev, that's the title of it, but there's other Dev dependencies. And I'll show you what this looks like. Basically there's a special place rather than the requirements, which are the requirements of your project, the dependencies of your projects, there's development requirements, which could be PHPUnit, Bing, Behat, it could be all kinds of things. And so these things are things that you want in development, that you want in contribution, but you don't necessarily need them for the actual running of Drupal. I think this would be really helpful for a lot of reasons. First of all, we can include development dependencies that don't have to go into Drupal. So there's more tools and things that we could use. We could update them more often. And also, it makes Drupal smaller for most users. It makes it smaller on their server and it makes also the zip and the tarball smaller, so there's less bandwidth being used. And this is the change that would have to be made there, which is just to the packaging script, not to the testing bot, but basically to CD into core, Composer and so forth, we'd add the no dev flag, which basically skips all those required dev dependencies. And the informative that one of the biggest reasons why they made Drush able to install on a per repo basis, you don't actually have to install it globally anymore. That's pretty new. Is that they could get all the Drupal contributors on the same version of Drush. And the way that would look is it would look something like this. So we would require dev Drush. And this is nice because we're not including Drush in every single installed Drupal. We're only including it for the people who want to develop with Drupal. And they're doing this explicitly. That would reduce a lot of the, there seems to be, or what they informed me of was there's a lot of, this doesn't work right through Drush and there's just a lot of mismatching of versions with Drush, just like you would have with PHP unit. Because you can install PHP unit globally, but we've included with Drupal so it makes all the testing work a lot better. Okay, so I'm gonna talk about providers now. And this is when a package, typically a library but doesn't have to be, that can be consumed by another package or project. So how do you make something a provider? It's really easy. You just give it a name. I took this name from the Gezzle project so this is exactly how there shows up and this is how I'm able to consume it. But to be fair, the packages.org website also requires a description. So we'll give a description as well. So this is what the core composer.json looks like. We have a name, a description and a type. And typically that type is a library and by default that's what it is. We actually made this up but it's something other than a library. And we couldn't think of some other bucket that Drupal fit in so it became its own thing. But this gives people a way to kind of come to our island right, because it's great here. We have pinnacleadas and you know. So in a lot of the times we're talking about people we're talking about us getting off our island and it's like maybe our island's not so bad, you know? So that's how that works. You're probably asking yourself why would you ever want to do that? Why would you ever want to consume Drupal? It seems like a lot, but we'll get to that. And this is what that would look like. If you did want to do that, it would look like you would require Drupal core and something in the 8.0 series. And if you look at the root in our 8.0 repository, that's exactly what you'll see. Okay, so, but I forgot to mention this. If you installed it just like this, as I described before, what Composer would do is it would put it in the vendor directory, just like Guzzle, right? Because that's where everything goes, the vendor. But Drupal doesn't work in vendor. So there's this nice little plugin that's maintained by the Composer guys that what I described, a Composer plugin that installs packages of a specific type in a specific directory. So they have all of these types defined, and like they have Drupal module, they have WordPress plugin, they have a bunch of other ones, and it will install those where they need to go. So we worked with them to get Drupal core supported, so we'll dump it into the core directory. So what that looks like is you just require the Composer installer's version, and we need at least that version is what we're saying, which that's when they added Drupal core support, and that will install it in the core directory where we need it to go. So it's a really best practice to give every Composer file a name. I do this just for semantic reasons, but you may share it once in a blue moon, but I do this anyways. But there's a special type called project, and that means that this is a project, it's not a library, it's not Drupal core, it's project. And there are some special commands that work with projects, but basically the gist of it is that it's a starting point, is what the ones you see shared. So if you see type project, they usually intend this to be a starting point, but it could also refer to your own project. So this is some example of what's kind of happening, and why I gave that clarification at the beginning, was that you have projects, which are starting points that require frameworks. And so symphony standard requires symphony, letter val requires letter val framework for us, and maybe these naming conventions are bad, don't know what else to call them yet, Drupal requires Drupal core. And if you look again in the root composer.json file, you'll see that it's a type project, it's a starting point. Okay, so this is proposal number four, is to permanently split Drupal and Drupal core to separate repositories. That would make us like symphony, like several other projects, but that's a lot of work. And I think myself and a lot of other people realized how much work that was, because it basically required that every patch that's out there would have to be rewritten to basically move down one directory, instead of being core it would be root. So probably not gonna happen for a long time, is what we came up with. So the next one, this is the reason why we're all here, is number five which is create and maintain a subtree split of Drupal core. I'll go into more detail about this. But if you look at symphonies.github, github.com slash symphony, you'll see all of these repositories that are marked read only. And what they are is they're symphony components that are in the symphony repository, but they used to get to, and they automate this process to create subtree splits of these components. And the reason they do that is because you can now consume these components with Composer without having to take all of symphony, okay? And that's actually why we're able to use those components. If they didn't do that, then we wouldn't have them. Because if you don't know this, we're not using all of symphony, we're just using specific components. So if you go on to packages, this is what packages looks like, Jury's actually has an account now. Yay. And there are two, we have two packages. One is Drupal Drupal, which is the root of Drupal, the project. And the other one, the big one, is Drupal core. And this is actually a subtree split of Drupal core. It's maintained, and I'm gonna put off this one by T. Stoykler. And so this is what the repository looks like. It's on github. It's obviously not being maintained by Drupal.org. I think he doesn't see a tree split every time there's a release on his laptop. So this is something that we would like done because if I go back here, I mean, we've installed it 2300 times just off of this little test subtree split. And I think that this is only gonna expand. So keeping up with that and Drupal.org maintaining that, I think is a huge win. Making it more of an automated process would be huge. And I don't think it needs to be every commit. I'm not really sure what Symphony does. But even if it's every release, that would be huge, but probably like nightly every release. I know it takes a long time to create those splits. So I think that's every time it's not loaded from cache. This is what I understand. But yeah, it's a little iffy. I'll get to another. I think it's a little, probably a little inflated, but. Okay, so this is number six, which is to split each component into a read-only repository like I was talking about. A lot of people don't know this, but if you go into core lib Drupal component, this is a segment of the readme, but there are 16 components that are ready to be shared. And I say ready, they're beta like Drupal beta is, but they can be shared and they could be included in other libraries or other CMSs, for instance. Like it's crazy to think like we use symphony components when symphony could use our components or WordPress could use our components. Like how great would that be? WordPress is built on Drupal. But to show how crazy this is, like these are the top most popular installed packages from packages. So I don't know how they come up with this data, but several of these are symphony components that are just subtree splits of their repository that are decoupled components. So if you look at the top one, the top symphony component, I mean this is the symphony event dispatcher which has been one of our dependencies. And I mean it's been installed like 10 million times. So it's kind of happened, but if you look at a lot of libraries you'll see symphony components in there or they'll be requiring libraries that require symphony components. So let's talk about Contra. And this is where it gets really hairy. Okay, so back to my widget module that I created. Let's say that I wanted to work with the Twitter API. And if anyone's worked with OAuth 1, it's not fun. But there's this great plugin for a Guzzle called the OAuth Subscriber. And it helps you make OAuth 1 request. And I'd highly recommend it because it works well for me. But if I wanna require this in my module, I would probably just put this in Composer, right? That'd make sense. I mean I can't include it because Drupal.org doesn't allow that. So okay, so I'm gonna put it in there. So how do my users load it? Well, in Drupal 7 and a little bit in Drupal 8, they would use a module called ComposerManager. And this gets recommended a lot. And I think there's a little bit of confusion about what it does. But what it does is it takes all of your modules, Composer files, and it generates one, a single one, off of all of those. So it would take that OAuth Subscriber and put it in your root, composer.json file. Which worked pretty well in Drupal 7. I'm kinda weary that it's not gonna work in Drupal 8 because we already are using Composer. So I think that's where it gets a little hairy. But it gets really hairy when you try to, when you wanna manually edit something. Like if you wanna manually edit your root composer to add a custom library or to add patches or something like that, obviously the generated file gets overwritten. So that can get a little hairy. So what's the alternative? Well, you just load the whole module, right? If I load the whole module, Composer will download the module, put it in the right place with Composer Installers, and then it will also download my dependencies for my module. And if you notice the version number looks really funny. That's because the 8.x-1.0 version numbers that we use in Contrib are not composer compatible. And it only works with the WXYZ version numbers. So four digits with dots in between them. And I've talked to them about making some sort of plugin that would interpret other version numbers, but it doesn't seem like that's gonna happen. So, but to get around that, the Drupal Composer community, basically they took packages, which is an open source project, and they forked it and it's going to look like this. It doesn't yet, but it is up there and it does work. And basically every Drupal module is on there and they generate a composer.json file essentially for each module that has the module's dependencies and they've also translated the version numbers. So the version number I used is what is ready for from, it comes from this website. So I highly recommend this too. This is what this would look like adding it. So you just add the repository, it's type composer and that's their URL. And it will, whenever you load a Drupal module, it will go here first before it looks at the official packages. So the webflow informed me of a issue which was that there are no web hooks for releases on Drupal modules. So there's no real way of knowing when someone releases something other than going and checking and that causes a lot of strain. Also there, I'd have to get with him with exactly why this is, but there's some data that they're actually scraping off the page rather than using the APIs and I think it's because some of it's not available through the APIs. So some web hooks would be nice and some better APIs and for Drupal.org. And also the official packages supports web hooks as well. So we've been talking about the Drupal package and the Drupal core. They don't stay up to date very well in packages because we're not submitting a web hook to them yet. Okay, this is number seven. Instead of translating the version numbers, what we could do, and this is a huge issue if you wanna look this up, it would take you forever to read, but switching to semantic versioning for Drupal contract extensions like modules. So that way it follows the same logic that Drupal core does. Makes perfect sense. I think it would be great for the community not technically a composer requirement because we have Drupal packages so I bowed out of that one, but I think that would be immensely helpful. It would also be a huge amount of work for the Drupal infrastructure team. Oops. So number eight is to move this packages that we're running, which I think is right now it's being hosted, John's donating the hosting for it, but if we move this to Drupal.org, then it can be officially used, it can be put in our root composer.json, we can better use it in documentation, we can kind of direct more traffic there when people wanna use modules with composer. The last one, and this gets another hairy one is allow contract developers to define subfolders, should be anything, modules or libraries that should have subtree splits created for them by Drupal.org. And we already see, if you download a module, it has subfolders or it has submodules rather, and those could be subtree split out, which would be nice, right? Because you don't have to like load the entire module, you just need that submodule, but also libraries and doing components like Drupal core does would be huge and automating that process would also be huge because this keeps people kind of on Drupal.org, it keeps us in our infrastructure and people are looking on our website for these libraries and components that would be fantastic. I think it would also help Drupal.contrib become more library focused rather than this module. It would become more of a module first design. If you wanna look at a good example of this, which they kind of moved away from Drupal.org because it didn't suit their needs, was the 8.0 version of commerce because they went library first and they also, all their submodules are loaded with Composer as well. So they're gonna run into this problem because what happens when someone just wants to install their module without Composer, and that's gonna become an issue and there's been a lot of conversations about whether we replace the whole Drupal like a module system with Composer or whether it's possible to create a user interface for that. And so that's still ongoing, but basically, as far as I know, the Composer kind of group has kind of reached an end of what we can do for Drupal 8.0 without infrastructure's involvement because most of the things like I talked about, it really requires infrastructure, so. And I think that's it, so if you have any questions, comments or you can now hurdle your insults. Thank you for our speaking, but all of the proposals involves having the entire Drupal community to drastically change the way everything is structured. So do we have any plans to push it that way? Because one thing I can think of is that since Drupal is an open source community and Dries and many of the Drupal community members have been pushing, saying that there should be sponsorship from corporations, shouldn't companies like the Golf Channel or NBC be supporting some of the development board to push the structure to be more packages rather than just Drupal? Yeah, you asked a lot of great questions. Let me see if I can get them all. Well, first of all, I do recognize, and this is a huge discussion, because this is kind of a matter of opinion, but data says something else. The opinion is that, well, everybody should just use Composer and use the command line. And data says that that's not the case. The minority actually uses Drosch or the command line, the majority just download the zip and install Drupal that way. So I think there's a lot of work that needs to be done to kind of maintain that compatibility with that. As far as corporate contributions, I don't know if I'm the person to answer that question, but I know that it's a lot of work. And it's something that everyone's gonna kind of have to help figure out before contra modules can effectively use outside libraries in Drupal 8, because I don't know how exactly that's gonna happen unless they use Composer. So that's kind of my fears that there's gonna be all these modules that are out there that require third-party libraries, and there's gonna be a lot of people who are just like, I don't know how to do that, a lot of site builders. So. Thank you. You're welcome. Yes, hi. I just need a little clarification. So you did say that you could use Composer to install Drupal, like you wouldn't just go into the vendor directory, did you not? Correct. Okay, good. Yeah, I'll look at the notes. I'll figure it out from there. Well, so are you suggesting that the module, the contra modules go into the vendor directory? No, Composer installers will put them in the modules directory for you. So Composer installers will, it'll put core in the right directory, it'll put your modules in the right directory, so that'll all happen for you. You can actually customize it if you want it, like if you wanted it in like profiles, in a profile, if you wanted that, but otherwise I think it just goes in modules slash, which is where the contra modules go in Drupal, yeah. Right, so does that require modifications on my part to get that to work? No, that only requires depending on Composer installers. That library will handle all of that for you. Okay, so I wouldn't put that in my Composer JSON, sorry for the specificity, I just thought, I mean, I like this, I think it's cool, but it's not just change for change sake, it's really a good idea. Yeah, so if you look at the core, if you go to the Drupal A repo, and you look in the Composer.json file that's in the root, you'll see where, well, we haven't added the repository for Drupal packages, but if you added that, then you could just rely on other Drupal modules, yeah. How does Composer handle... Okay, so they actually, if you go onto, if you Google Composer version schema or something like that, they have all of these different version schemas or constraints you can use, and they have some for semantic versioning, which makes life a lot easier, but some projects don't adhere to that, they adhere to other versioning schemas, so you kind of have to know what the library is doing and you can adapt your constraints to however you want. So, for instance, if you wanted just the Drupal 8.0 whatever security, you could do like 8.0.star and that would, that you'd be stuck at 8.0 point whatever the last point releases, and it won't go forward. So yeah, so when you run Composer install, or, oh, yeah, update, okay, it pulls the existing update status and all of that. Infrastructure we've built up around there. Yeah, it works the same way as if, and this is the thing that's a little, you would have to understand about, if you decide to go, I'm gonna use Composer, is that the only thing that's gonna update is the core folder. Everything else you're responsible for updating, which hopefully there shouldn't be that many changes because there's only a few files, like index.php for instance, but it will update that folder just as if you were to download it and drag that folder in, I mean that's what it's doing, and it's also gonna update all cores dependencies, so it's gonna update whatever they've defined in their Composer file. Yes, whatever they've defined in their Composer file. So my background is in release management and being able to reliably reproduce a given set of code. So if our package script on Drupal.org runs Composer install, and it gets, for example, 5.0 squiggly is the latest 5.0 release from this library somewhere. A month later, I'm trying to reproduce this bug. I run it again. Now that latest release has been revised, now I'm getting version 5.0.8. And there's no good way for me to know what actual version got packaged, how do I reliably reproduce that, et cetera, et cetera. So this is maybe my back in the old days, but my superstitious fear of going to this kind of model in general is that it becomes much harder to reliably know what version of what code is everybody talking about. So I offer that as a concern. That's a great question. And so the composer.lock file is what saves your life because it pins your dependencies to a specific commit hash. And what you're gonna do is you're going to, you're gonna put that into version control. So now you know exactly what commit hash you were at of that dependency at that specific point in your version control. So when you run composer install, I think I mentioned this, but it ignores what's in composer.json and it only looks at composer.lock for the most part. There are some instances where it looks at it just to make sure it's in sync, but it's going to like, for instance, let's say you ran composer install and you got 5.0.0 and you run composer install again later and they've come out with like 5.6, it doesn't care. So we'll just run 5.0.0 again. Until you run composer update and that's the magic command that updates your.lock file. And then you commit that to version control and you know what you were updated to. Is that answer your question? And composer is kind of unique because a lot of version control systems don't have that lock file. They just let you, you would run into that exact problem if you were running a lot of the other ones. And also the nice thing about composer is it takes the version numbers off of the git tags rather than the whatever the maintainers put in the version spot of their file. There is no version spot. You don't define that. The library doesn't define that. It just pulls that off the git repo. So Drupal core, it comes with a whole bunch of modules. Node module views now, which is awesome. Do you foresee this subtree split happening on the Drupal project to where you could download Drupal core's version of Node from Drupal.org slash project slash node? I think that would be incredible. I think that's the next kind of step after the components because I think the components are probably more important. But yeah, the modules being available like that I think would be super helpful because then people can kind of if they wanted to build a system that had a API that was compatible with Drupal, they could use those modules in that way. What modules do you see? What Drupal modules do you see useful outside of Drupal? Well, that's a good question because I would have said none except for that I was using the serialization module and that's a very simple module in Drupal core that could completely be, it's just a collection of classes. I'm not even really sure why it's a module but it could be used outside of core. Yeah. So it really depends if you wanna support all of the APIs that that module needs and that's up to the person that depends on it. And do you see what are your thoughts on profiles? Cause right now you set up like you have profiles slash standard, we have profile, I think testing is in there as well. I could be wrong. Install profiles, yes. And distributions as well. How do you see that happening? I mean, in an ideal world, the install profile would be able to just define all the models that it needs or the libraries or whatever its dependencies are. And then when you download, just like with Drupal core, when you download the distribution, you also get all the libraries or you would run composer install if you get cloned at. But yeah, I envision it working the same kind of way that so Drupal in the way we know it is just a distribution. And so if you think of the core directory being that dependency that all of these distributions would require. So just like a symphony standard, they call that a distribution of symphony. It's just one of them. I don't think there are any others actually, but that's a, I look at it the same way. Awesome. You're doing an awesome job with this. Thanks so much. I started collecting a lot of questions while trying to keep it short. Working on the Drupal CI stuff, I definitely saw a need for the sub tree splits of core because they had copied the whole plugin architecture from Drupal core into the Drupal CI console app. And so it was like, oh, that would be nice if we could include that via Composer so I can see right away that that would definitely have some value. One issue that we kept running into was dependencies and subdependencies relying on different versions of different modules that were incompatible. We had one that relied on Guzzle 4 and one that relied on Guzzle 5 and it just wouldn't work. So how does dependency management like that work if you have modules that are old or un-maintained that rely on old versions of libraries? And would you envision those like checking in lock files or would you envision those having? Well, the lock file is ignored on anything other than the root. So if a library checks in a lock file, that's ignored. But really what should be done, and this is kind of what Symphony did because they ran into that problem, is they kind of created a wide of a range of dependencies that they would support. And they actually added the, for testing purposes, they added the, there's two flags in Composer one which will give you the lowest requirement that you support and will get the highest. So they run all of their tests on both the lowest and the highest that they support. And as far as like old un-maintained modules, I mean, that's a problem with any module that requires a third-party library. You could, and you know, there's different work, there's different work surrounds that people have. Like they will, they'll just bypass that Composer file and stuff and just, if you know what you're doing, you can get around that. But it would be better just to contribute to that module and be like, you need to support this. But if you don't test it, I don't know how you know whether it's supported or not. Cool, I have one other question. There's a lot of discussion on one of the threads about the Packagist and people having its own namespace around Packagist.org now. And there was a lot of people that expressed a strong vehement desire to not move Packagist over to Drupal.org and have our own self-hosted version to keep everything on basically the Symphony Packagist repository. What can you say about that? Like, I think, I don't know who made the point. They basically expressed everything I was thinking, which was that I'm all for that but we have a version numbering problem. We can't put a single module on Composer's Packagist because they don't support the version numbers, so it won't work. The only work around to that is to everyone who has a Drupal module to double tag every release in Git. But until we're willing to switch everyone over, you know, and that issue is gigantic of whether we should switch everyone over or not because people ran into like, what is them, you know, it was more than I could handle. But yeah, I'm all for it as soon as we can figure out that version number because I think the more that we integrate with other people and the more we use what everyone else is using, the better. One more, sorry. The Composer, when you're saying that like the tarball should come with CD Composer, Composer install, where does Composer come from from the, on the builder's directory? Is that included as a FAR file or something inside of the distribution or? I mean, it's installed globally on whatever machine is running that. Always, or should, or needs to be beforehand. It needs to be beforehand. Okay, so that's a prerequisite. Yep, you can download the FAR file every time, but I mean, it's just kind of a waste. Right. But yeah, I typically just install Composer globally, that's the best way to really run it. But yeah, it is a FAR file. Cool, thanks. Yep, you're welcome. If the vendor directory is in the get ignore, right? This is a little bit different than say, NPM node modules directory, right? We need the vendor directory on production. We need that upstream. So what are you, how do you suggest? I mean, running Composer up on production to get the vendor directory? You could either, yeah, you could either run Composer install depending on your workflow, or, and you could automate this, obviously if you're doing some sort of integration like that. Or you, another solution I heard, which if you feel more comfortable doing this, is just copying the vendor directory over, that would also work. The dependencies should be the same.  If you don't want to, or can't, some servers can't run Composer, but you can do it that way too. There's no difference. Copying, okay, that's a thought. What we do for that sort of thing for deploying Drupal.org is we have two repositories. One we commit to is a Drushmake file and some other Composers. We have to run it and check that into a second repository. Some modules include a getignore that we can't, don't actually want ignored, so we getignore there, getignore, there's some tricks. Mostly a Drushmake workflow, so it'll get rid of the get. Whoa, hi. So what are the big things for Drupal.org that need to happen? Is it all just the proposals that you went through? Yeah, that's where it's, I mean, it becomes a mess, but I think the big one, and the one that started this was having Drupal.org to maintain the subtrary split of Drupal Core, I think it would be huge. Right now we have it, but it's kind of being maintained by one person, and that's hard, so it would be nice if that was part of it, then we can say, yeah, we officially support Composer, and Drupal.org is handling, downloading either Drupal itself or Drupal Core, that's all coming from there, and there's, actually there's already a namespace, it would be Drupal.org slash project slash core that isn't being used, so that's already available, and I think that's kind of how that would work, and that's probably the big one, and then the next one would be quite the Drupal components, but as I said, there's also this contra problem of how do we solve this problem, and that's probably a whole bigger issue. Someone marked it as the contra of issue as a critical issue, and that was not down, which I agree, it's not really a critical issue, it shouldn't stop release, but I think it's gonna become more and more of a problem as time goes on, and yeah, I don't think people are aware of how big of a problem it's gonna become. Well, thank you, everyone, unless you have, did you have a question? Oh yeah, go for it, I was too fast, sorry. So this does bring up that site builders versus developers thing where the implication is you expect Composer to be installed on whatever shared hosting environment people are trying to build a Drupal site on, and I guess is there a proposal for a solution on how to make that easier so that users can use the add a module interface that they have now, or how would that work? There is not, but there should be, because I know the only proposal I know of is to remove that update function and add a module function completely, because I guess there's some problems with it working with 8 right now, so that's kind of people's solution, which I don't think that's a good solution, but there does need to be some sort of user interface, but I don't know what that's gonna look like, if that's even possible, there's a lot of unknowns, but yeah, I mean, like I said, the data supports that there are way more site builders than there are developers that use these tools, so, but the developers want to use libraries, so, well the problem with the Contrib modules is that you don't want more than a bunch of vendor directories, because then you have dependency hell, because if my module requires the OAuth subscriber and your module does too, if someone site builds it, they're gonna get portal. Thank you so much for coming.


Following his election as the next DCU Student President, I spoke to Niall Behan about his plans for Wellness Wednesday for the incoming year. Wellness Wednesday is an event that already takes place on the St Patrick's campus in the form of an open mic session. Behan outlined in his manifesto plans to expand the event across all DCU campuses. Effectively, what I wanted to bring in was building on the St Patrick's idea that on the Wednesday it's the home for the day, it's part of the week when people are trying to get a little bit down, teamed in with the fact that on Tuesday nights a lot of college students like to do it and go out late nights and they wake up the next day and aren't feeling too good about themselves. So those things combined and very well were actually brought in, especially down in St Patrick's SU, and brought on to the DCU Students Union this year to kind of push forward in that, especially for education students who are nine to five every single day, so especially in the home of the week they're feeling down. So next week, next year what I want to do is basically change some attitudes as regards to mindfulness and well-being and healthy living, but not just in a way about food and alcohol, but by focusing on I suppose a variant range of different possibilities. So it could be social inclusion, the way people interact with each other, making sure that everybody feels like they have a place on campus and they're mindfulness and their mental health is actually looked after, and by putting it right in the middle of the week I think we're stamping down I suppose a barrier that we are actually looking out for and it's actually something right in the centre of our college that we're actually going to make, going to work around.


Hello and welcome to this session in which we would look at non-monetary exchanges. This topic gives students difficulty for several reasons. One, it involves gain and losses. Two, it involves commercial substance versus non-commercial substance. And in some transaction, although the transaction is non-monetary, cashed might be paid or cashed might be received. So given all these three levels together, gains and losses, commercial substance and cash, it will give students some difficulty analyzing and recording the transaction. On farhatlectures.com, whether you are a CPA candidate or an accounting student, I can help you with this topic. I can explain the topic to you in details in contrast to your CPA review course. If you're studying for your CPA review course, I cannot replace your CPA exam review course. What I can do, I can be an alternative explanation, a backup explanation, a useful addition. I can explain the material differently, which will help you with your CPA review course. My material is organized to mirror image your course. So if you are stuck in your course somewhere, you can go to my material and I will can give you an alternative explanation. My subscription is monthly. So you can try me for a month, you like it, you keep it. That's your risk. If not, you cancel and your potential gain is passing the exam. And if not for anything, take a look at my website to find out how well your university is doing on the CPA exam. Please take a look at my website also for other resources. I do have courses for other topics as well. Connect with me on LinkedIn if you haven't done so. And take a look at my LinkedIn recommendation. Students that actually use my material to pass the CPA exam, like this recording, connect with me on LinkedIn, Instagram, Facebook, as well as Twitter. Let's take a look at this first question. The questions will start always easy. And this is basically on the exam. It will start easy. Then it will start to become a little bit more difficult. So first they might ask you, they might ask you a question like this. If you don't know the answer, then they will start to notice that you are weak in non monetary exchanges. So let's start with this question and see if you can answer this question. What is the basic principle used to value an asset acquired in a non monetary exchange? First of all, what is a non monetary exchange? Non monetary exchange is when you give a non monetary asset and you would receive a non monetary asset. It's an exchange. Non means it doesn't involve money. Again, some transaction would involve money, but the majority of the transaction, the value of the transaction, the majority of its value is non monetary. Simply put, you are exchanging a truck for another truck or for a truck for two old trucks for a new truck. This is non monetary exchange. So what's the basic principle? Well, how do you value? In other words, when you record the transaction, how do you value? This is important and we're going to do certain journal entries, several journal entries explaining this, but what is the basic principle? Well, the basic principle is this. Please listen to me carefully and try to understand it. You're going to value the transaction based on the fair value that you gave up. This is the basic principle. So the answer is fair value of the asset given up.  Simply put, let's keep it simple. Let's assume you purchase something for $500 cash. You gave up $500 and you received something. I don't care what it is. I don't care what that something is, but you paid $500. That something is worth $500. And when you do a non monetary exchange, what matters is the fair value of what you gave up. And that's how you would record your transaction. It does not matter what the other people think about their fair value. If they agree to your fair value, that's the true fair value. It doesn't matter.  You think it's worth $5,000. That's fine. I think it's worth $500. It's worth $500. I don't care what you think it's worth. It's worth what I paid for it. I paid for it $500. The same concept applies in non-monetary exchanges. And this is an important concept to understand as you are going through this topic. It's not the book value of the asset plus any cash or other monetary consideration. It's the fair value of the asset. If the fair value is here, then the transaction will be correct. Fair value or book value, whichever is smaller, no, that's not how it works. A book value of the asset giving, no. It's fair value, not the asset, not the only asset giving, anything else is giving in addition to the asset. So notice and B, if we can say fair value plus, so you may give the older truck, which has a fair value, plus you may add some cash. Well, if that's the case, then what you are getting is the value of the fair value of the older truck plus any cash plus any other monetary consideration. If you received anything, for example, they removed your liability. That also, as if they gave you money, if they take over your liability. So the answer is it's valued at the fair value of the asset given up. I know I'm taking a little bit longer to explain this topic because it's going to get easier when you work with numbers. In a non-monetary exchange of equipment, if the exchange has commercial substance, now what does that mean, commercial substance? It means that your cash flow position will change as a result of this transaction. The cash flow timing and amount will change. It means this transaction made an effect in terms of cash flow, in terms of timing, in terms of amount. So you're going to be receiving more cash or for a longer period of time. Therefore, it has commercial substance. So if the transaction has a commercial substance, a gain is recognized if what? If it has commercial substance. Well, let's take a look. If the fair value of the asset received exceeds the fair value of the equipment received exceeds the book value of the equipment received. Now, when you determine the gain or the loss, you don't look at the asset received. You determine the gain or the loss based on the asset that you gave up. So this is incorrect. Okay. The book value of the equipment received. Now, it doesn't matter. Once I see received, the gain and the loss is determined based on the asset that you're given up. The fair value of the equipment surrendered, this is given up, exceeds the book value of the equipment given up. Yes, basically, it's the fair value. What are you given up, surrendering, giving up versus the book value of the asset given up. So if you gave up an asset with a book value of 10,000, this is the book value, and it has a fair value of 12,000, you have a gain of 2000. Now, this is the gain. If this exchange, if you exchange this asset and the exchange they told you in the problem, it has commercial substance, then a gain is recognized. This is how you recognize a gain. The fair value of the asset given up, surrendering the asset is greater than its book value, you have a gain. And if you have a gain, it is recognized when the transaction has commercial substance. So are you saying if the transaction does not have a commercial substance, does not have a commercial substance, or what we called lax commercial substance, what happened, then no gain is recognized. Under those circumstances, the gain would reduce the new fair value of the new asset. And we'll work an example, if not, if you want to learn a little bit more about the rules, because there's a lot involved here, go to farhatlectures.com. Let's start to apply what we just learned. Adam Company Exchange Equipment and 17,800 cash for similar equipment. The book value and the fair value of the old equipment were 80,200 and 90,000 dollar. Assuming that the exchange has commercial substance, Adam would recognize again or a loss of how much. The first thing you have to do in any transaction is determine the gain or the loss. So how do we determine the gain or the loss? As I just told you, you would look at the asset given up, the asset surrendering, and you are the book value and the fair value of the old equipment, the book value. So the difference between 92,000 is our book value, our fair value, 92,000 is the fair value minus 80,200. The book value will give us 11,800. Therefore, we have a gain, notice here, they're trying to trick you, negative 11,000, which is a loss or positive, it's a gain of 11,800. So this is how you will book this transaction. Now, I'm going to go a step further, although they're only asking you for the gain. If I ask you to journalize this transaction, will you be able to journalize this transaction? Simply put, what is the value of the new equipment? What's the value of the new equipment? So what's the new equipment? So how much do you debit the new equipment? Let's first get rid of the old equipment. The old equipment, we're going to credit old equipment, 80,200. We credit cash, 17,800. We have a gain of 11,800 and we know we're going to record the gain because the gain we said it has commercial substance. Now, what about the new equipment? How much would you record the new equipment for? And obviously at this point, it's easy because you add all the sub because that's the debit, that's the debit that's missing. But simply put, what you do is you take the fair value of the asset given up. Remember, the fair value of the asset given up, remember, we recorded that fair value of the asset given up, 92,000, the fair value of the asset given up.  Remember, you exchange it also for cash. So you paid cash. So this is how much you paid for the, you paid, you paid for the asset. So let's take a look at this, 92,000 plus 17,800 equal to 109,800. Now, we want to make sure that this transaction balances minus 80,200 minus 17,800 minus 11,800. Notice total debits equal total credits. So these two equal to each other. But I told you at this point, if you could do these three entries, the new equipment is a plug-in 109,800 or I gave up 92,000 and I gave up cash. This is what I would record the new equipment at. Notice, notice, this is why I spend a little bit more time on this, on this question, fair value of assets given up. It's what I gave up. I gave up an asset worth 92,000 and cash. This is the new equipment will be recorded at that price. Adam exchange equipment 17,000 equipment and 17,000 cash for similar equipment. Looks like the other problem. The bulk value and the fair value of the old equipment were 80,300 and 90,700. Assuming the exchange lacks commercial substance. So the difference between this problem and the previous problem is it lacks commercial substance. Adam would record, is it a gain or a loss on the exchange? First, we have to determine whether we have a gain or whether we have a loss. Well, we have fair value of 90,700 minus 80,300. We have 16,000, oops, that doesn't sound right, 90,700 minus 80,300. So first, determine the gain or the loss. We have a gain of 10,400 and there is an insert of 10,400. There's also a loss of 10,400. We know it's a gain. Now, the difference between this transaction and the prior transaction is this transaction, it's telling you that the exchange lacks commercial substance. When the exchange lacks commercial substance, you cannot recognize the gain. So the answer is zero. Whoa, hold on. So why am I computing the gain if I'm not going to recognize the gain? And what am I going to do with this gain? Am I going to compute the gain? Say I have a gain then say, okay, I don't have to worry about this gain. No, I have the gain. But what I have to do, the gain will be at the third gain. Now, what does that mean the third gain? It means I'm going to push the gain down the road. How do I do so? Let me show you how am I going to push the gain down the road? Let's book this transaction. Well, we get rid of the old equipment. The old equipment has a book value of 80,300. We paid cash of 17,800. Now, how do we book the new equipment? Okay, how do we book the new equipment? We said in the old lesson, we said, we'll take the amount given up, okay, which is 90,700 plus 17,800. But here we have a gain that we are deferring. Okay, here's what's going to happen. So the gain we know the gain is 10,400. How do we record the new value? The new value, the new value, it's going to have what's called the third component. What do I mean by the third component? Okay, let's take a look at what we gave up. We gave up 90,700. We gave up cash of 17,800. Let's add those up. So if we take 90,700 plus 17,800 plus the cash, this is going to oops, plus. So 90,700 plus 17,800. That's going to give us 108,500. And I can assure you, if you put 108,500, the entry will not, the entry will not balance. The entry will not balance. As you can tell, 80,000 plus, 80,000 plus 17,000 is not equal to 108. So what do we have to do? Do you remember the gain that we said we have 10,400 of gain? What's going to happen with the gain? It's going to reduce the value of the equipment. And by reducing the value of the equipment, it means we are lowering our cost. Lowering our cost now with the result in an increase of gains in the future. And this is what we mean by deferring the gain. It means we're not going to recognize the gain until later. Later means when we sell this asset. But when we sell this asset, the asset, it's going to have a reduction in its value of 10,400. So let's do that minus 10,400 equal to 98,100 equal to 98,100. Let's see now if 98,100. So notice what I did is I, let me put this in a different color. All what I did is I took the gain and I deferred it. Deferred it means pushing the gain into the future. How do I push the gain into the future by reducing what the value of the asset should be? So 98,100 minus 80,300 to see if my entry balance minus 17,800 you got it. Okay, zero. So now my total debit is equal to my total credits. So the difference between this transaction and this transaction, this one I recognize the gain. If I did not recognize the gain, what I would do, I will take out the gain and I would reduce the new equipment. If this was lax, if this question was lax commercial substance, and this is what I did here. I did a transaction that lacks commercial substance. If it has commercial substance, then I will increase this by 10,400 and I would have a gain of 10,400. And in this way, the transaction will have a commercial substance. It has commercial substance. So that's why you have to know the difference, whether it has commercial substance or it doesn't. Now, in case of losses, I'm going to give you the tip. You would always recognize your losses. So it's easy with losses. Let's take a look at this question. Adam exchange all the equipment for new equipment into exchange transaction. We have equipment A and equipment B. So we're only looking for equipment A. So what would they record the new equipment at? And hopefully at this point, you became an expert in this. And by the way, I needed to maybe make a clarification about these exchanges. Everything I'm teaching you here is on the FAR exam or it's for GAP purposes. The reason I need to make this distinction is because if you are studying for RAG, the rules are a little bit different. So you have to follow the IRS. That's not what we are doing here. If you want to do that, look at my RAG courses or RAG lectures. So how much would they record the new equipment at? Well, let's see. How much do we record the new equipment at? At the value of the value that we gave up. That's how we would record the transaction. This transaction has commercial substance. So the first thing you do is to determine whether you have a gain or a loss. So you have a fair value of 80, a book value of 75. Well, you have a gain. So first of all, we have a gain of 5,000. And we can recognize the gain. So what you need to do is start to enter the entry. We have a gain of 5,000. We know we received cash of 12,000. So cash is 12,000. We get rid of the old equipment for 75, old asset. And we credit that 75. Well, at this point, if you are stuck, guess what? You'll count it for everything. So this is 80. And therefore, all we're missing is a debit of 80. It means we are missing a debit of new equipment of 68. So the new equipment is recorded at 68. Whoa, whoa, whoa. Hold on. Didn't you just said that it's based on what you gave up? I gave up an asset worth of 80,000. Why am I recording the new asset at 68? New equipment? Well, the reason you are is because in addition to the, in addition to the asset that you received, they gave you cash. So between those two, you did receive 80,000 and you did receive what you gave up. Okay? So notice here, once again, you might be saying, Professor Farhad, you said we record the new asset based on the based on the value that we gave up. And you're saying, you know, we gave up 80, we are recording it on 68. You did. But look, they gave you an additional 12,000. So you did indeed record 80,000 of new asset on your books. They're not all in physical asset, they gave you some cash. Okay? But if you did observe this, that's a good thing because generally speaking, what you give up, the fair value of the give up should equal to the fair value of what you received. At the end of this recording, I'm going to remind you again that if you are a CPA candidate or an accounting student, I strongly suggest you check out my website, farhadlectures.com. I can help you pass the exam by giving you alternative explanation, detailed explanation. Good luck, study hard, invest in your CPA. It's a long term investment in your career 20 to 30 years. Don't shortchange yourself and stay safe.